Page MenuHomeHEPForge

No OneTemporary

This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -1,28 +1,29 @@
168ae2110e964d62fbc1331a1c2e095952a67748 release-2-5-2
3abb4fa42e20e332796c2572334c2d77204cd0e0 release-2-4-2
4796ca080aafd5daa3b7349b015cb1df944428a2 release-2-5-0
76da042f056eb153981b4d005d5474ffb90a5e88 release-2-4-1
81a684a558413c69df314365eabf09893ffd43d8 release-2-6-0
bd75cd00d99f4bdbaed992daf98f0a73c0f91e9b release-2-4-0
ff6ecc8d49ce10299303b050394bd5cb5837f1c3 release-2-5-1
d0389f5453b2c210923e1adc7b872b18269de668 release-2-6-1
f8998033021185942533b824607285feb3fbd2dc release-2-6-1a
cead23e428b9aacaf2d709e722624e54f844498b release-2-6-1b
191db4655439045f912cb21bd905e729d59ec7bc release-2-6-2
edb538156e9c3d64bb842934b4cebf0126aeb9ea release-2-6-3
eb4a104591859ecac18746b1ad54d6aa0c2a5d1a release-2-7-0
568971ac5b3c1d044c9259f2280a8304fc5a62e9 trunk-before-QED
6e3edb6cfeb4ee48687eb4eb3d016026fc59d602 trunk-after-QED
633abb80b571aa23088957df60e9b0000bbb8a22 release-2-7-1
1bdde095d2346c15ee548e5406a96f0fc6d6e0f1 beforeHQ
a0f9fb821396092bdbeee532bcb0bd624f58335b before_MB_merge
270c1e6b34aa7f758f1d9868c4d3e1ec4bf4e709 herwig-7-0-0
6e0f198c1c2603ecd1a0b6cfe40105cda4bd58c5 herwig-7-0-1
566c1de845a8070559cda45b1bdb40afa18cb2cc herwig-7-0-2
f5c4aa956880f2def763ebd57de7b5bfa55cb1db herwig-7-0-3
65282dedfc2e4bec184e68678dbf4c553c968f38 herwig-7-0-4
541e7790b65ed423c86780bf66ec30e6b99b5a18 herwig-7-1-0
dd35a1c12d57c047169e8c5fb18644972d49c6ac herwig-7-1-1
0d651b079756b63713e32a1341d81e4dfc7eeb7b herwig-7-1-2
4b97934bc41c861c4be04f563ffa68a94a982560 herwig-7-1-3
97aca5398cfa1f3273804f03fa96fa0fa23eca61 herwig-7-1-4
+3d69fbe18c682c98891c5f9204947f2eb7a72686 herwig-7-1-5
diff --git a/Analysis/BasicConsistency.h b/Analysis/BasicConsistency.h
--- a/Analysis/BasicConsistency.h
+++ b/Analysis/BasicConsistency.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// BasicConsistency.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_BasicConsistency_H
#define THEPEG_BasicConsistency_H
//
// This is the declaration of the BasicConsistency class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* The BasicConsistency class is a simple analysis which performs a basic
* analysis of the event checking that energy, momentum and charge are
* conserved and no quarks or clusters are final-state particles.
*
* @see \ref BasicConsistencyInterfaces "The interfaces"
* defined for BasicConsistency.
*/
class BasicConsistency: public AnalysisHandler {
public:
/**
* The default constructor.
*/
BasicConsistency();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BasicConsistency & operator=(const BasicConsistency &);
+ BasicConsistency & operator=(const BasicConsistency &) = delete;
private:
/**
* Maximum momentum deviation
*/
Energy _epsmom;
/**
* check for quarks
*/
bool _checkquark;
/**
* check for charge conservation
*/
bool _checkcharge;
/**
* Check for clusters in the final-state
*/
bool _checkcluster;
/**
* Check the branching ratios
*/
bool _checkBR;
/**
* Maximum absolute momentum deviation before warning
*/
Energy _absolutemomentumtolerance;
/**
* Maximum momentum deviation relative to beam energy before warning
*/
double _relativemomentumtolerance;
};
}
#endif /* THEPEG_BasicConsistency_H */
diff --git a/Analysis/CrossSectionAnalysis.h b/Analysis/CrossSectionAnalysis.h
--- a/Analysis/CrossSectionAnalysis.h
+++ b/Analysis/CrossSectionAnalysis.h
@@ -1,105 +1,105 @@
// -*- C++ -*-
#ifndef Herwig_CrossSectionAnalysis_H
#define Herwig_CrossSectionAnalysis_H
//
// This is the declaration of the CrossSectionAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the CrossSectionAnalysis class.
*
* @see \ref CrossSectionAnalysisInterfaces "The interfaces"
* defined for CrossSectionAnalysis.
*/
class CrossSectionAnalysis: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
CrossSectionAnalysis();
/**
* The destructor.
*/
virtual ~CrossSectionAnalysis();
//@}
protected:
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- CrossSectionAnalysis & operator=(const CrossSectionAnalysis &);
+ CrossSectionAnalysis & operator=(const CrossSectionAnalysis &) = delete;
};
}
#endif /* Herwig_CrossSectionAnalysis_H */
diff --git a/Analysis/DrellYanPT.h b/Analysis/DrellYanPT.h
--- a/Analysis/DrellYanPT.h
+++ b/Analysis/DrellYanPT.h
@@ -1,127 +1,127 @@
// -*- C++ -*-
#ifndef HERWIG_DrellYanPT_H
#define HERWIG_DrellYanPT_H
//
// This is the declaration of the DrellYanPT class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
*
* This AnalysisHandler books histograms
* of the weak boson's pt in Drell-Yan
* processes.
*
* An Interface switch allows you to choose
* between output of the histograms
* as TopDraw or plain ASCII files, which
* may be processed further, e.g. by gnuplot.
*
* @see \ref DrellYanPTInterfaces "The interfaces"
* defined for DrellYanPT.
*/
class DrellYanPT: public AnalysisHandler {
public:
/**
* The default constructor.
*/
DrellYanPT();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* Histogram of the Z's pt
*/
Histogram _Zpt;
/**
* Histogram of the W+'s pt
*/
Histogram _Wppt;
/**
* Histogram of the W-'s pt
*/
Histogram _Wmpt;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DrellYanPT & operator=(const DrellYanPT &);
+ DrellYanPT & operator=(const DrellYanPT &) = delete;
};
}
#endif /* HERWIG_DrellYanPT_H */
diff --git a/Analysis/GammaGammaAnalysis.h b/Analysis/GammaGammaAnalysis.h
--- a/Analysis/GammaGammaAnalysis.h
+++ b/Analysis/GammaGammaAnalysis.h
@@ -1,179 +1,179 @@
// -*- C++ -*-
//
// GammaGammaAnalysis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GammaGammaAnalysis_H
#define HERWIG_GammaGammaAnalysis_H
//
// This is the declaration of the GammaGammaAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* GammaGammaAnalysis is for the analysis of events with a pair of hard
* photons produced. These are selected as the two highest pt photons
* in the final state of the event. A topdrawer file with histograms
* is written to the working directory.
*
* @see \ref GammaGammaAnalysisInterfaces "The interfaces"
* defined for GammaGammaAnalysis.
*/
class GammaGammaAnalysis: public AnalysisHandler {
public:
/**
* The default constructor.
*/
GammaGammaAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GammaGammaAnalysis & operator=(const GammaGammaAnalysis &);
+ GammaGammaAnalysis & operator=(const GammaGammaAnalysis &) = delete;
private:
/**
* \f$p_T\f$ of the harder photon
*/
Histogram _ptharder;
/**
* \f$p_T\f$ of the softer photon
*/
Histogram _ptsofter;
/**
* \f$p_T\f$ of the photon pair
*/
Histogram _ptpair;
/**
* Energy of the harder photon
*/
Histogram _Eharder;
/**
* Energy of the softer photon
*/
Histogram _Esofter;
/**
* Energy of the photon pair
*/
Histogram _Epair;
/**
* Rapidity of the harder photon
*/
Histogram _rapharder;
/**
* Rapidity of the softer photon
*/
Histogram _rapsofter;
/**
* Rapidity of the photon pair
*/
Histogram _rappair;
/**
* Azimuth of the harder photon
*/
Histogram _phiharder;
/**
* Azimuth of the softer photon
*/
Histogram _phisofter;
/**
* Azimuth of the photon pair
*/
Histogram _deltaphi;
/**
* Invariant mass of the pair
*/
Histogram _mpair;
};
}
#endif /* HERWIG_GammaGammaAnalysis_H */
diff --git a/Analysis/GammaJetAnalysis.h b/Analysis/GammaJetAnalysis.h
--- a/Analysis/GammaJetAnalysis.h
+++ b/Analysis/GammaJetAnalysis.h
@@ -1,133 +1,133 @@
// -*- C++ -*-
//
// GammaJetAnalysis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GammaJetAnalysis_H
#define HERWIG_GammaJetAnalysis_H
//
// This is the declaration of the GammaJetAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* GammaJetAnalysis selects the photon with the hightest pt in the final
* state and books a number of histograms from its four momentum. The
* results are witten in topdrawer format to the working directory.
*
* @see \ref GammaJetAnalysisInterfaces "The interfaces"
* defined for GammaJetAnalysis.
*/
class GammaJetAnalysis: public AnalysisHandler {
public:
/**
* The default constructor.
*/
GammaJetAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GammaJetAnalysis & operator=(const GammaJetAnalysis &);
+ GammaJetAnalysis & operator=(const GammaJetAnalysis &) = delete;
private:
/**
* \f$p_T\f$ of the photon
*/
Histogram _ptg;
Histogram _ptgZoom;
/**
* Energy of the photon
*/
Histogram _Eg;
/**
* Rapidity of the photon
*/
Histogram _rapg;
/**
* Azimuth of the photon
*/
Histogram _phig;
};
}
#endif /* HERWIG_GammaJetAnalysis_H */
diff --git a/Analysis/HJetsAnalysis.h b/Analysis/HJetsAnalysis.h
--- a/Analysis/HJetsAnalysis.h
+++ b/Analysis/HJetsAnalysis.h
@@ -1,212 +1,212 @@
// -*- C++ -*-
#ifndef Herwig_HJetsAnalysis_H
#define Herwig_HJetsAnalysis_H
//
// This is the declaration of the HJetsAnalysis class.
//
#include "Herwig/Analysis/JetsPlusAnalysis.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HJetsAnalysis class.
*
* @see \ref HJetsAnalysisInterfaces "The interfaces"
* defined for HJetsAnalysis.
*/
class HJetsAnalysis: public Herwig::JetsPlusAnalysis {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
HJetsAnalysis();
/**
* The destructor.
*/
virtual ~HJetsAnalysis();
//@}
public:
/**
* Reconstruct the desired electroweak objects and fill the
* respective momenta. Remove the reconstructed particles from the
* list.
*/
virtual void reconstructHardObjects(ParticleVector&);
protected:
/**
* Perform any additional analysis required
*/
virtual void analyzeSpecial(long id, double weight);
/**
* Append any additional histograms to the given histogram element
*/
virtual void finalize(XML::Element&);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Relative rapidity of the Higgs between the first two jets
*/
Statistics::Histogram theHiggsYStar;
/**
* Relative rapidity of the third jet between the first two jets
*/
Statistics::Histogram theThirdJetYStar;
/**
* Relative rapidity of the fourth jet between the first two jets
*/
Statistics::Histogram theFourthJetYStar;
/**
* Delta phi between the Higgs and the two-jet system
*/
Statistics::Histogram theJet12HiggsDeltaPhi;
/**
* Jeppe's delta phi
*/
Statistics::Histogram theJeppeDeltaPhi;
protected:
/**
* Calculate ystar given two jets and object of interest
*/
double yStar(const LorentzMomentum& jet1, const LorentzMomentum& jet2,
const LorentzMomentum& obj) const {
double y1 = jet1.rapidity();
double y2 = jet2.rapidity();
double res =
obj.rapidity() - 0.5*(y1+y2);
return res/(y1-y2);
}
/**
* Relative rapidity of the Higgs between the first two jets
*/
Statistics::Histogram& higgsYStar() {
if ( !theHiggsYStar.bins().empty() )
return theHiggsYStar;
return theHiggsYStar =
Statistics::Histogram("HiggsYStar",Statistics::Histogram::regularBinEdges(-6,6,120),false,false);
}
/**
* Relative rapidity of the third jet between the first two jets
*/
Statistics::Histogram& thirdJetYStar() {
if ( !theThirdJetYStar.bins().empty() )
return theThirdJetYStar;
return theThirdJetYStar =
Statistics::Histogram("Jet3YStar",Statistics::Histogram::regularBinEdges(-6,6,120),false,false);
}
/**
* Relative rapidity of the fourth jet between the first two jets
*/
Statistics::Histogram& fourthJetYStar() {
if ( !theFourthJetYStar.bins().empty() )
return theFourthJetYStar;
return theFourthJetYStar =
Statistics::Histogram("Jet4YStar",Statistics::Histogram::regularBinEdges(-6,6,120),false,false);
}
/**
* Delta phi between the Higgs and the two-jet system
*/
Statistics::Histogram& jet12HiggsDeltaPhi() {
if ( !theJet12HiggsDeltaPhi.bins().empty() )
return theJet12HiggsDeltaPhi;
return theJet12HiggsDeltaPhi =
Statistics::Histogram("Jet12hDeltaPhi",
Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
make_pair(-Constants::pi,Constants::pi));
}
/**
* Delta phi between the Higgs and the two-jet system
*/
Statistics::Histogram& jeppeDeltaPhi() {
if ( !theJeppeDeltaPhi.bins().empty() )
return theJeppeDeltaPhi;
return theJeppeDeltaPhi =
Statistics::Histogram("JeppeDeltaPhi",
Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
make_pair(-Constants::pi,Constants::pi));
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HJetsAnalysis & operator=(const HJetsAnalysis &);
+ HJetsAnalysis & operator=(const HJetsAnalysis &) = delete;
};
}
#endif /* Herwig_HJetsAnalysis_H */
diff --git a/Analysis/HiggsJetAnalysis.h b/Analysis/HiggsJetAnalysis.h
--- a/Analysis/HiggsJetAnalysis.h
+++ b/Analysis/HiggsJetAnalysis.h
@@ -1,133 +1,133 @@
// -*- C++ -*-
//
// HiggsJetAnalysis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HiggsJetAnalysis_H
#define HERWIG_HiggsJetAnalysis_H
//
// This is the declaration of the HiggsJetAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* HiggsJetAnalysis assumes that there is one Higgs in the final state
* and books some observables computed from its four momentum. It
* shouldn't do anything in case there is no Higgs in the event.
*
* @see \ref HiggsJetAnalysisInterfaces "The interfaces"
* defined for HiggsJetAnalysis.
*/
class HiggsJetAnalysis: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
HiggsJetAnalysis();
//@}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HiggsJetAnalysis & operator=(const HiggsJetAnalysis &);
+ HiggsJetAnalysis & operator=(const HiggsJetAnalysis &) = delete;
private:
/**
* \f$p_T\f$ of the h boson
*/
Histogram _pth;
Histogram _pthZoom;
/**
* Rapidity of h
*/
Histogram _raph;
/**
* Azimuth of h
*/
Histogram _phih;
};
}
#endif /* HERWIG_HiggsJetAnalysis_H */
diff --git a/Analysis/JetsPlusAnalysis.h b/Analysis/JetsPlusAnalysis.h
--- a/Analysis/JetsPlusAnalysis.h
+++ b/Analysis/JetsPlusAnalysis.h
@@ -1,659 +1,659 @@
// -*- C++ -*-
#ifndef Herwig_JetsPlusAnalysis_H
#define Herwig_JetsPlusAnalysis_H
//
// This is the declaration of the JetsPlusAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "ThePEG/Cuts/JetFinder.h"
#include "ThePEG/Cuts/JetRegion.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/Utilities/Statistics/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the JetsPlusAnalysis class.
*
* @see \ref JetsPlusAnalysisInterfaces "The interfaces"
* defined for JetsPlusAnalysis.
*/
class JetsPlusAnalysis: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
JetsPlusAnalysis();
/**
* The destructor.
*/
virtual ~JetsPlusAnalysis();
//@}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
protected:
/**
* Analyze one subprocess, given the event number it belongs to
*/
void analyze(ParticleVector&, long, double);
/**
* Clear the hard objects and jets for the next event
*/
void clear() {
theHardObjects.clear();
theJets.clear();
}
/**
* Reconstruct the desired electroweak objects and fill the
* respective momenta. Remove the reconstructed particles from the
* list.
*/
virtual void reconstructHardObjects(ParticleVector&) {}
/**
* Set the momentum of the indicated electroweak object.
*/
LorentzMomentum& hardObjectMomentum(const string& id) {
return theHardObjects[id];
}
/**
* Reconstruct the jets and fill the respective momenta.
*/
virtual void reconstructJets(const ParticleVector&);
/**
* The jet finder to use
*/
Ptr<JetFinder>::tptr jetFinder() const {
return theJetFinder;
}
/**
* The jet regions to match.
*/
const vector<Ptr<JetRegion>::ptr>& jetRegions() const { return theJetRegions; }
/**
* Return the number of matched jets
*/
unsigned int nJets() const { return theJets.size(); }
/**
* Set the momentum of the indicated jet.
*/
LorentzMomentum& jetMomentum(const unsigned int id) {
return theJets[id];
}
protected:
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/**
* Collection of object histograms; ranges are adjusted to the
* maximum, so range constraints and rebinning can be applied later.
*/
struct ObjectProperties {
/**
* Transverse momentum
*/
Statistics::Histogram pt;
Statistics::Histogram pt_logx;
/**
* Rapidity
*/
Statistics::Histogram y;
/**
* Azimuth
*/
Statistics::Histogram phi;
/**
* Mass
*/
Statistics::Histogram mass;
/**
* Default constructor
*/
ObjectProperties() {}
/**
* Construct given Ecm
*/
ObjectProperties(const string& name, Energy)
: pt(name + "Pt",Statistics::Histogram::regularBinEdges(0,1000,1000),true,false),
pt_logx(name + "PtLogX",Statistics::Histogram::logBinEdges(0.1,1000,1000),true,false),
y(name + "Y",Statistics::Histogram::regularBinEdges(-6,6,120),false,false),
phi(name + "Phi",Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
make_pair(-Constants::pi,Constants::pi)),
mass(name + "Mass",Statistics::Histogram::regularBinEdges(0,1000,1000),true,false) {}
/**
* Count given momentum, weight and id
*/
void count(const LorentzMomentum& p, double weight, unsigned int id) {
pt.count(Statistics::EventContribution(p.perp()/GeV,weight,1.),id);
pt_logx.count(Statistics::EventContribution(p.perp()/GeV,weight,1.),id);
y.count(Statistics::EventContribution(p.rapidity(),weight,0.1),id);
phi.count(Statistics::EventContribution(p.phi(),weight,0.1),id);
mass.count(Statistics::EventContribution(p.m()/GeV,weight,1.),id);
}
/**
* Count given momentum components, weight and id
*/
void count(Energy perp, double rapidity,
double xphi, Energy m,
double weight, unsigned int id) {
pt.count(Statistics::EventContribution(perp/GeV,weight,1.),id);
pt_logx.count(Statistics::EventContribution(perp/GeV,weight,1.),id);
y.count(Statistics::EventContribution(rapidity,weight,0.1),id);
phi.count(Statistics::EventContribution(xphi,weight,0.1),id);
mass.count(Statistics::EventContribution(m/GeV,weight,1.),id);
}
/**
* Convert to XML
*/
void finalize(XML::Element& elem) {
pt.finalize(); elem.append(pt.toXML());
pt_logx.finalize(); elem.append(pt_logx.toXML());
y.finalize(); elem.append(y.toXML());
phi.finalize(); elem.append(phi.toXML());
mass.finalize(); elem.append(mass.toXML());
}
};
/**
* Collection of pair histograms; ranges are adjusted to the
* maximum, so range constraints and rebinning can be applied later.
*/
struct PairProperties
: public ObjectProperties {
/**
* Calculate deltaPhi
*/
static double dPhi(const LorentzMomentum& a,
const LorentzMomentum& b){
double phi1 = a.phi();
double phi2 = b.phi();
double diff=phi1-phi2;
if(diff<-Constants::pi){
diff+=(2.0*Constants::pi);
}
else if (diff>Constants::pi){
diff-=(2.0*Constants::pi);
}
return diff;
}
/**
* Calculate deltaY
*/
static double dY(const LorentzMomentum& a,
const LorentzMomentum& b){
return abs(a.rapidity()-b.rapidity());
}
/**
* Calculate deltaR
*/
static double dR(const LorentzMomentum& a,
const LorentzMomentum& b){
return sqrt(sqr(dPhi(a,b))+sqr(dY(a,b)));
}
/**
* Calculate ydoty
*/
static double yy(const LorentzMomentum& a,
const LorentzMomentum& b){
double ya = a.rapidity();
double yb = b.rapidity();
double yres = sqrt(abs(ya*yb));
return ya*yb < 0. ? -yres : yres;
}
/**
* Delta y
*/
Statistics::Histogram deltaY;
/**
* Delta phi
*/
Statistics::Histogram deltaPhi;
/**
* Delta phi
*/
Statistics::Histogram deltaR;
/**
* Product of the rapidities
*/
Statistics::Histogram yDotY;
/**
* Default constructor
*/
PairProperties()
: ObjectProperties() {}
/**
* Construct given Ecm
*/
PairProperties(const string& name, Energy ecm)
: ObjectProperties(name,ecm),
deltaY(name + "DeltaY",Statistics::Histogram::regularBinEdges(0,6,60),true,false),
deltaPhi(name + "DeltaPhi",Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
make_pair(-Constants::pi,Constants::pi)),
deltaR(name + "DeltaR",Statistics::Histogram::regularBinEdges(0,10,100),true,false),
yDotY(name + "YDotY",Statistics::Histogram::regularBinEdges(-6,6,120),false,false) {}
/**
* Count given momentum, weight and id
*/
void count(const LorentzMomentum& p, const LorentzMomentum& q, double weight, unsigned int id) {
ObjectProperties::count(p+q,weight,id);
deltaY.count(Statistics::EventContribution(dY(p,q),weight,0.1),id);
deltaPhi.count(Statistics::EventContribution(dPhi(p,q),weight,0.1),id);
deltaR.count(Statistics::EventContribution(dR(p,q),weight,0.1),id);
yDotY.count(Statistics::EventContribution(yy(p,q),weight,0.1),id);
}
/**
* Convert to XML
*/
void finalize(XML::Element& elem) {
ObjectProperties::finalize(elem);
deltaY.finalize(); elem.append(deltaY.toXML());
deltaPhi.finalize(); elem.append(deltaPhi.toXML());
deltaR.finalize(); elem.append(deltaR.toXML());
yDotY.finalize(); elem.append(yDotY.toXML());
}
};
private:
/**
* Switch between fixed order and showered
*/
bool theIsShowered;
/**
* The jet finder to use
*/
Ptr<JetFinder>::ptr theJetFinder;
/**
* The jet regions to match.
*/
vector<Ptr<JetRegion>::ptr> theJetRegions;
/**
* The reconstructed hard objects.
*/
map<string,LorentzMomentum> theHardObjects;
/**
* The reconstructed jets
*/
map<unsigned int,LorentzMomentum> theJets;
/**
* Hard object properties
*/
map<string,ObjectProperties> theHardObjectProperties;
/**
* Jet properties
*/
map<unsigned int,ObjectProperties> theJetProperties;
/**
* Exclusive jet properties
*/
map<unsigned int,ObjectProperties> theExclusiveJetProperties;
/**
* Jet-inclusive properties
*/
ObjectProperties theJetInclusiveProperties;
/**
* Jet-summed properties
*/
ObjectProperties theJetSummedProperties;
/**
* Jet-average properties
*/
ObjectProperties theJetAverageProperties;
/**
* Inclusive jet multiplicities
*/
Statistics::Histogram theNJetsInclusive;
/**
* Exclusive jet multiplicities
*/
Statistics::Histogram theNJetsExclusive;
/**
* Hard object pair properties
*/
map<pair<string,string>,PairProperties> theHardPairProperties;
/**
* Jet pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theJetPairProperties;
/**
* Jet/hard pair properties
*/
map<pair<unsigned int,string>,PairProperties> theJetHardPairProperties;
/**
* Trijet properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,ObjectProperties> theThreeJetProperties;
/**
* Fourjet properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties> theFourJetProperties;
protected:
/**
* Hard object properties
*/
ObjectProperties& hardObjectProperties(const string& id) {
map<string,ObjectProperties>::iterator h =
theHardObjectProperties.find(id);
if ( h != theHardObjectProperties.end() )
return h->second;
return
theHardObjectProperties[id] =
ObjectProperties(id,generator()->maximumCMEnergy());
}
/**
* Jet properties
*/
ObjectProperties& jetProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theJetProperties.find(id);
if ( h != theJetProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id;
return
theJetProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Exclusive jet properties
*/
ObjectProperties& exclusiveJetProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theExclusiveJetProperties.find(id);
if ( h != theExclusiveJetProperties.end() )
return h->second;
ostringstream ids; ids << "ExclusiveJet" << id;
return
theExclusiveJetProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet-inclusive properties
*/
ObjectProperties& jetInclusiveProperties() {
if ( !theJetInclusiveProperties.pt.bins().empty() )
return theJetInclusiveProperties;
return
theJetInclusiveProperties =
ObjectProperties("JetInclusive",generator()->maximumCMEnergy());
}
/**
* Jet-summed properties
*/
ObjectProperties& jetSummedProperties() {
if ( !theJetSummedProperties.pt.bins().empty() )
return theJetSummedProperties;
return
theJetSummedProperties =
ObjectProperties("JetSummed",generator()->maximumCMEnergy());
}
/**
* Jet-average properties
*/
ObjectProperties& jetAverageProperties() {
if ( !theJetAverageProperties.pt.bins().empty() )
return theJetAverageProperties;
return
theJetAverageProperties =
ObjectProperties("JetAverage",generator()->maximumCMEnergy());
}
/**
* Inclusive jet multiplicities
*/
Statistics::Histogram& nJetsInclusive() {
if ( !theNJetsInclusive.bins().empty() )
return theNJetsInclusive;
return
theNJetsInclusive =
Statistics::Histogram("NJetsInclusive",
Statistics::Histogram::regularBinEdges(-0.5,theJetRegions.size()+0.5,
theJetRegions.size()+1),
true,true);
}
/**
* Exclusive jet multiplicities
*/
Statistics::Histogram& nJetsExclusive() {
if ( !theNJetsExclusive.bins().empty() )
return theNJetsExclusive;
return
theNJetsExclusive =
Statistics::Histogram("NJetsExclusive",
Statistics::Histogram::regularBinEdges(-0.5,theJetRegions.size()+0.5,
theJetRegions.size()+1),
true,true);
}
/**
* Hard object pair properties
*/
PairProperties& hardPairProperties(const string& id, const string& jd) {
map<pair<string,string>,PairProperties>::iterator h =
theHardPairProperties.find(make_pair(id,jd));
if ( h != theHardPairProperties.end() )
return h->second;
return theHardPairProperties[make_pair(id,jd)] =
PairProperties(id+jd,generator()->maximumCMEnergy());
}
/**
* Jet pair properties
*/
PairProperties& jetPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theJetPairProperties.find(make_pair(id,jd));
if ( h != theJetPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << jd;
return theJetPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet/hard pair properties
*/
PairProperties& jetHardPairProperties(const unsigned int id, const string& jd) {
map<pair<unsigned int,string>,PairProperties>::iterator h =
theJetHardPairProperties.find(make_pair(id,jd));
if ( h != theJetHardPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << jd;
return theJetHardPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Trijet properties
*/
ObjectProperties& threeJetProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
theThreeJetProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theThreeJetProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << id3;
return theThreeJetProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Fourjet properties
*/
ObjectProperties& fourJetProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3, const unsigned int id4) {
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
theFourJetProperties.find(std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4));
if ( it != theFourJetProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << id3 << id4;
return theFourJetProperties[std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4)] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Perform any additional analysis required
*/
virtual void analyzeSpecial(long, double) {}
/**
* Append any additional histograms to the given histogram element
*/
virtual void finalize(XML::Element&) {}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- JetsPlusAnalysis & operator=(const JetsPlusAnalysis &);
+ JetsPlusAnalysis & operator=(const JetsPlusAnalysis &) = delete;
};
}
#endif /* Herwig_JetsPlusAnalysis_H */
diff --git a/Analysis/LEPBMultiplicity.h b/Analysis/LEPBMultiplicity.h
--- a/Analysis/LEPBMultiplicity.h
+++ b/Analysis/LEPBMultiplicity.h
@@ -1,179 +1,179 @@
// -*- C++ -*-
//
// LEPBMultiplicity.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LEPBMultiplicity_H
#define HERWIG_LEPBMultiplicity_H
//
// This is the declaration of the LEPBMultiplicity class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* Struct for the multiplcity data
*/
struct BranchingInfo {
/**
* Default constructor
* @param mult The observed multiplcity.
* @param error The error on the observed multiplicity
*/
BranchingInfo(double mult=0.,double error=0.);
/**
* The observed multiplicity
*/
double obsBranching;
/**
* The error on the observed multiplicity
*/
double obsError;
/**
* Number of particles of this type
*/
long actualCount;
/**
* Sum of squares of number per event for error
*/
double sumofsquares;
/**
* The average fraction per quark
* @param N The number of events
* @param den The denominator to give the fraction
*/
double simBranching(long N,BranchingInfo den=BranchingInfo());
/**
* The error on the average number per event
* @param N The number of events
* @param den The denominator to give the fraction
*/
double simError(long N,BranchingInfo den=BranchingInfo());
/**
* Is the result more than \f$3\sigma\f$ from the experimental result
* @param N The number of events
* @param den The denominator to give the fraction
*/
double nSigma(long N,BranchingInfo den=BranchingInfo());
/**
* Plot standard error in a simple barchart
* @param N The number of events
* @param den The denominator to give the fraction
*/
string bargraph(long N,BranchingInfo den=BranchingInfo());
};
/**
* The LEPBBMultiplicity class is designed to compare the production
* rates of \f$B^+\f$, \f$B^0\f$, \f$B^0_s\f$ and B-baryons in
* B events at LEP
*
* @see \ref LEPBMultiplicityInterfaces "The interfaces"
* defined for LEPBMultiplicity.
*/
class LEPBMultiplicity: public AnalysisHandler {
public:
/**
* The default constructor.
*/
LEPBMultiplicity();
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LEPBMultiplicity & operator=(const LEPBMultiplicity &);
+ LEPBMultiplicity & operator=(const LEPBMultiplicity &) = delete;
private:
/**
* Map of PDG codes to multiplicity info
*/
map<long,BranchingInfo> _data;
};
}
#endif /* HERWIG_LEPBMultiplicity_H */
diff --git a/Analysis/LEPEventShapes.h b/Analysis/LEPEventShapes.h
--- a/Analysis/LEPEventShapes.h
+++ b/Analysis/LEPEventShapes.h
@@ -1,233 +1,233 @@
// -*- C++ -*-
//
// LEPEventShapes.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LEPEventShapes_H
#define HERWIG_LEPEventShapes_H
//
// This is the declaration of the LEPEventShapes class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "ThePEG/Vectors/Lorentz5Vector.h"
#include "EventShapes.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* The LEPEventShapes class performs the analysis of global event shapes and
* compares with LEP data. This handler is solely intended as a slave
* handler for the EventShapesMasterAnalysis class.
*
* @see \ref LEPEventShapesInterfaces "The interfaces"
* defined for LEPEventShapes
*/
class LEPEventShapes: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Transform the event to the desired Lorentz frame and return the
* corresponding LorentzRotation.
* @param event a pointer to the Event to be transformed.
* @return the LorentzRotation used in the transformation.
*/
virtual LorentzRotation transform(tEventPtr event) const;
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
using AnalysisHandler::analyze;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LEPEventShapes & operator=(const LEPEventShapes &);
+ LEPEventShapes & operator=(const LEPEventShapes &) = delete;
private:
/**
* Histogram for \f$1-T\f$ distribution.
*/
HistogramPtr _omthr;
/**
* Histogram for the major distribution
*/
HistogramPtr _maj;
/**
* Histogram for the minor distribution
*/
HistogramPtr _min;
/**
* Histogram for the oblateness distribution
*/
HistogramPtr _obl;
/**
* Histogram for the sphericity distribution
*/
HistogramPtr _sph;
/**
* Histogram for the aplanarity distribution
*/
HistogramPtr _apl;
/**
* Histogram for the planarity distribution
*/
HistogramPtr _pla;
/**
* Histogram for the C distribution
*/
HistogramPtr _c;
/**
* Histogram for the D distribution
*/
HistogramPtr _d;
/**
* Histogram for the \f$M_{\rm high}\f$ distribution
*/
HistogramPtr _mhi;
/**
* Histogram for the \f$M_{\rm low}\f$ distribution
*/
HistogramPtr _mlo;
/**
* Histogram for the \f$M_{\rm high}-M_{\rm low}\f$ distribution
*/
HistogramPtr _mdiff;
/**
* Histogram for the \f$B_{\rm max}\f$ distribution
*/
HistogramPtr _bmax;
/**
* Histogram for the \f$B_{\rm min}\f$ distribution
*/
HistogramPtr _bmin;
/**
* Histogram for the \f$B_{\rm max}+B_{\rm min}\f$ distribution
*/
HistogramPtr _bsum;
/**
* Histogram for the \f$B_{\rm max}-B_{\rm min}\f$ distribution
*/
HistogramPtr _bdiff;
/**
* Pointer to the object which calculates the event shapes
*/
EventShapesPtr _shapes;
};
}
#endif /* HERWIG_LEPEventShapes_H */
diff --git a/Analysis/LEPMultiplicityCount.h b/Analysis/LEPMultiplicityCount.h
--- a/Analysis/LEPMultiplicityCount.h
+++ b/Analysis/LEPMultiplicityCount.h
@@ -1,194 +1,194 @@
// -*- C++ -*-
//
// LEPMultiplicityCount.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LEPMultiplicityCount_H
#define HERWIG_LEPMultiplicityCount_H
//
// This is the declaration of the LEPMultiplicityCount class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "ThePEG/Repository/Repository.h"
#include "ThePEG/PDT/ParticleData.h"
#include "Herwig/Utilities/Histogram.h"
#include "MultiplicityInfo.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* The LEPMultiplicityCount class is designed to count particle multiplicities and
* compare them to LEP data.
*
* @see \ref LEPMultiplicityCountInterfaces "The interfaces"
* defined for LEPMultiplicityCount.
*/
class LEPMultiplicityCount: public AnalysisHandler {
public:
/**
* The default constructor.
*/
LEPMultiplicityCount();
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
using AnalysisHandler::analyze;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LEPMultiplicityCount & operator=(const LEPMultiplicityCount &);
+ LEPMultiplicityCount & operator=(const LEPMultiplicityCount &) = delete;
private:
/**
* The PDG codes of the particles
*/
vector<long> _particlecodes;
/**
* The multiplcity
*/
vector<double> _multiplicity;
/**
* The error
*/
vector<double> _error;
/**
* Species of particle
*/
vector<unsigned int> _species;
/**
* Map of PDG codes to multiplicity info
*/
map<long,MultiplicityInfo> _data;
/// Histograms for cluster mass dependence
map<long,Histogram> _histograms;
/**
* Histograms of the clusters after cluster splitting
*/
map<int,Histogram> _clusters;
/**
* Histograms of the primary clusters
*/
map<int,Histogram> _primary;
/**
* Map of number of final-state particles to PDG code
*/
map<long,long> _finalstatecount;
/**
* Particles in hard process
*/
map<long,long> _collisioncount;
/// Make histograms of cluster mass dependence
bool _makeHistograms;
};
}
#endif /* HERWIG_LEPMultiplicityCount_H */
diff --git a/Analysis/LPairAnalysis.h b/Analysis/LPairAnalysis.h
--- a/Analysis/LPairAnalysis.h
+++ b/Analysis/LPairAnalysis.h
@@ -1,156 +1,156 @@
// -*- C++ -*-
#ifndef HERWIG_LPairAnalysis_H
#define HERWIG_LPairAnalysis_H
//
// This is the declaration of the LPairAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* The LPairAnalysis class is designed to analyse lepton pairs.
* Therefore the lepton and antilepton with highest pt are selected from
* the event and some observables are computed and booked into
* histograms. The analysis is intended to anaylse top pair events
* where both W's are decaying semileptonically. Therefore, only the
* semileptonic top quark decay channels should be switched on. If no
* pair of (opposite sign) leptons is found in the final state a warning
* message is printed and nothing is booked. Output is created as
* topdrawer file
*
* @see \ref LPairAnalysisInterfaces "The interfaces"
* defined for LPairAnalysis.
*/
class LPairAnalysis: public AnalysisHandler {
public:
/**
* The default constructor.
*/
LPairAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LPairAnalysis & operator=(const LPairAnalysis &);
+ LPairAnalysis & operator=(const LPairAnalysis &) = delete;
private:
/**
* \f$p_T\f$ of the leptons
*/
Histogram _ptp;
Histogram _ptm;
Histogram _ptpair;
/**
* \f$E_T\f$ of the leptons
*/
Histogram _etp;
Histogram _etm;
Histogram _etpair;
/**
* Energy of the leptons
*/
Histogram _ep;
Histogram _em;
Histogram _epair;
/**
* Rapidity of the leptons
*/
Histogram _rapp;
Histogram _rapm;
Histogram _rappair;
/**
* Azimuth of the leptons
*/
Histogram _phip;
Histogram _phim;
Histogram _deltaphi;
/**
* Invariant mass of the pair
*/
Histogram _mpair;
/**
* scalar sums of Et, pt
*/
Histogram _etsum;
Histogram _ptsum;
};
}
#endif /* HERWIG_LPairAnalysis_H */
diff --git a/Analysis/LeptonsJetsAnalysis.h b/Analysis/LeptonsJetsAnalysis.h
--- a/Analysis/LeptonsJetsAnalysis.h
+++ b/Analysis/LeptonsJetsAnalysis.h
@@ -1,1137 +1,1137 @@
// -*- C++ -*-
#ifndef Herwig_LeptonsJetsAnalysis_H
#define Herwig_LeptonsJetsAnalysis_H
//
// This is the declaration of the LeptonsJetsAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "ThePEG/Cuts/JetFinder.h"
#include "ThePEG/Cuts/JetRegion.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/Utilities/Statistics/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the LeptonsJetsAnalysis class.
*
* @see \ref LeptonsJetsAnalysisInterfaces "The interfaces"
* defined for LeptonsJetsAnalysis.
*/
class LeptonsJetsAnalysis: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
LeptonsJetsAnalysis();
/**
* The destructor.
*/
virtual ~LeptonsJetsAnalysis();
//@}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
protected:
/**
* Analyze one subprocess, given the event number it belongs to
*/
void analyze(ParticleVector&, long, double);
/**
* Clear the electroweak objects and jets for the next event
*/
void clear() {
theJets.clear();
theEWIDs.clear();
theChargedLeptons.clear();
theNeutrinos.clear();
theHiggs.clear();
}
/**
* Reconstruct the jets and fill the respective momenta.
*/
virtual void reconstructJets(const ParticleVector&);
/**
* The jet finder to use
*/
Ptr<JetFinder>::tptr jetFinder() const {
return theJetFinder;
}
/**
* The jet regions to match.
*/
const vector<Ptr<JetRegion>::ptr>& jetRegions() const { return theJetRegions; }
/**
* Return the number of matched jets
*/
unsigned int nJets() const { return theJets.size(); }
/**
* Set the momentum of the indicated jet.
*/
LorentzMomentum& jetMomentum(const unsigned int id) {
return theJets[id];
}
/**
* Reconstruct all the variables for EW particles and fill the respective momenta.
*/
virtual void reconstructEWParticles(ParticleVector&);
/**
* Set the momentum of the indicated electroweak particle.
*/
LorentzMomentum& eWIDMomentum(const unsigned int id) {
return theEWIDs[id];
}
/**
* Set the momentum of the indicated charged lepton.
*/
LorentzMomentum& chargedLeptonMomentum(const unsigned int id) {
return theChargedLeptons[id];
}
/**
* Set the momentum of the indicated neutrino.
*/
LorentzMomentum& neutrinoMomentum(const unsigned int id) {
return theNeutrinos[id];
}
/**
* Set the missing pT momentum.
*/
LorentzMomentum& pTmissMomentum() {
return thePTmiss;
}
/**
* Set the momentum of the indicated Higgs.
*/
LorentzMomentum& higgsMomentum(const unsigned int id) {
return theHiggs[id];
}
protected:
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/**
* Collection of object histograms; ranges are adjusted to the
* maximum, so range constraints and rebinning can be applied later.
*/
struct ObjectProperties {
/**
* Transverse momentum
*/
Statistics::Histogram pt;
Statistics::Histogram ptlow;
Statistics::Histogram pt_logx;
/**
* Rapidity
*/
Statistics::Histogram y;
/**
* Azimuth
*/
Statistics::Histogram phi;
/**
* Mass
*/
Statistics::Histogram mass;
Statistics::Histogram masslow;
/**
* Default constructor
*/
ObjectProperties() {}
/**
* Construct given Ecm
*/
ObjectProperties(const string& name, Energy)
: pt(name + "Pt",Statistics::Histogram::regularBinEdges(0,1000,200),true,false),
ptlow(name + "Ptlow",Statistics::Histogram::regularBinEdges(0,200,100),true,false),
pt_logx(name + "PtLogX",Statistics::Histogram::logBinEdges(0.1,1000,100),true,false),
y(name + "Y",Statistics::Histogram::regularBinEdges(-6,6,120),false,false),
phi(name + "Phi",Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,62),
make_pair(-Constants::pi,Constants::pi)),
mass(name + "Mass",Statistics::Histogram::regularBinEdges(0,5000,500),true,false),
masslow(name + "Masslow",Statistics::Histogram::regularBinEdges(0,250,100),true,false) {}
/**
* Count given momentum, weight and id
*/
void count(const LorentzMomentum& p, double weight, unsigned int id) {
pt.count(Statistics::EventContribution(p.perp()/GeV,weight,5.),id);
ptlow.count(Statistics::EventContribution(p.perp()/GeV,weight,2.),id);
pt_logx.count(Statistics::EventContribution(p.perp()/GeV,weight,1.),id);
y.count(Statistics::EventContribution(p.rapidity(),weight,0.1),id);
phi.count(Statistics::EventContribution(p.phi(),weight,0.1),id);
mass.count(Statistics::EventContribution(p.m()/GeV,weight,10.),id);
masslow.count(Statistics::EventContribution(p.m()/GeV,weight,2.5),id);
}
/**
* Count given momentum components, weight and id
*/
void count(Energy perp, double rapidity,
double xphi, Energy m,
double weight, unsigned int id) {
pt.count(Statistics::EventContribution(perp/GeV,weight,5.),id);
ptlow.count(Statistics::EventContribution(perp/GeV,weight,1.),id);
pt_logx.count(Statistics::EventContribution(perp/GeV,weight,1.),id);
y.count(Statistics::EventContribution(rapidity,weight,0.1),id);
phi.count(Statistics::EventContribution(xphi,weight,0.1),id);
mass.count(Statistics::EventContribution(m/GeV,weight,5.),id);
masslow.count(Statistics::EventContribution(m/GeV,weight,1.25),id);
}
/**
* Convert to XML
*/
void finalize(XML::Element& elem) {
pt.finalize(); elem.append(pt.toXML());
ptlow.finalize(); elem.append(ptlow.toXML());
pt_logx.finalize(); elem.append(pt_logx.toXML());
y.finalize(); elem.append(y.toXML());
phi.finalize(); elem.append(phi.toXML());
mass.finalize(); elem.append(mass.toXML());
masslow.finalize(); elem.append(masslow.toXML());
}
};
/**
* Collection of pair histograms; ranges are adjusted to the
* maximum, so range constraints and rebinning can be applied later.
*/
struct PairProperties
: public ObjectProperties {
/**
* Calculate deltaPhi
*/
static double dPhi(const LorentzMomentum& a,
const LorentzMomentum& b){
double phi1 = a.phi();
double phi2 = b.phi();
double diff=phi1-phi2;
if(diff<-Constants::pi){
diff+=(2.0*Constants::pi);
}
else if (diff>Constants::pi){
diff-=(2.0*Constants::pi);
}
return diff;
}
/**
* Calculate deltaY
*/
static double dY(const LorentzMomentum& a,
const LorentzMomentum& b){
return abs(a.rapidity()-b.rapidity());
}
/**
* Calculate deltaR
*/
static double dR(const LorentzMomentum& a,
const LorentzMomentum& b){
return sqrt(sqr(dPhi(a,b))+sqr(dY(a,b)));
}
/**
* Calculate ydoty
*/
static double yy(const LorentzMomentum& a,
const LorentzMomentum& b){
double ya = a.rapidity();
double yb = b.rapidity();
double yres = sqrt(abs(ya*yb));
return ya*yb < 0. ? -yres : yres;
}
/**
* Delta y
*/
Statistics::Histogram deltaY;
/**
* Delta phi
*/
Statistics::Histogram deltaPhi;
/**
* Delta phi
*/
Statistics::Histogram deltaR;
/**
* Product of the rapidities
*/
Statistics::Histogram yDotY;
/**
* Default constructor
*/
PairProperties()
: ObjectProperties() {}
/**
* Construct given Ecm
*/
PairProperties(const string& name, Energy ecm)
: ObjectProperties(name,ecm),
deltaY(name + "DeltaY",Statistics::Histogram::regularBinEdges(0,6,60),true,false),
deltaPhi(name + "DeltaPhi",Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
make_pair(-Constants::pi,Constants::pi)),
deltaR(name + "DeltaR",Statistics::Histogram::regularBinEdges(0,10,100),true,false),
yDotY(name + "YDotY",Statistics::Histogram::regularBinEdges(-6,6,120),false,false) {}
/**
* Count given momentum, weight and id
*/
void count(const LorentzMomentum& p, const LorentzMomentum& q, double weight, unsigned int id) {
ObjectProperties::count(p+q,weight,id);
deltaY.count(Statistics::EventContribution(dY(p,q),weight,0.1),id);
deltaPhi.count(Statistics::EventContribution(dPhi(p,q),weight,0.1),id);
deltaR.count(Statistics::EventContribution(dR(p,q),weight,0.1),id);
yDotY.count(Statistics::EventContribution(yy(p,q),weight,0.1),id);
}
/**
* Convert to XML
*/
void finalize(XML::Element& elem) {
ObjectProperties::finalize(elem);
deltaY.finalize(); elem.append(deltaY.toXML());
deltaPhi.finalize(); elem.append(deltaPhi.toXML());
deltaR.finalize(); elem.append(deltaR.toXML());
yDotY.finalize(); elem.append(yDotY.toXML());
}
};
/**
* Collection of triple histograms; ranges are adjusted to the
* maximum, so range constraints and rebinning can be applied later.
*/
struct TripleProperties
: public ObjectProperties {
/**
* Calculate deltaY^*
*/
static double dYstar(const LorentzMomentum& a,
const LorentzMomentum& b,
const LorentzMomentum& c){
return c.rapidity()-(a.rapidity()+b.rapidity())/2.;
}
/**
* Calculate deltaZ^* -- normalized deltaY^*
*/
static double dZstar(const LorentzMomentum& a,
const LorentzMomentum& b,
const LorentzMomentum& c){
return dYstar(a,b,c)*2./abs(a.rapidity()-b.rapidity());
}
/**
* Delta y^*
*/
Statistics::Histogram deltaYstar;
/**
* Delta z^*
*/
Statistics::Histogram deltaZstar;
/**
* Default constructor
*/
TripleProperties()
: ObjectProperties() {}
/**
* Construct given Ecm
*/
TripleProperties(const string& name, Energy ecm)
: ObjectProperties(name,ecm),
deltaYstar(name + "DeltaYstar",Statistics::Histogram::regularBinEdges(-6,6,120),true,false),
deltaZstar(name + "DeltaZstar",Statistics::Histogram::regularBinEdges(-3,3,120),true,false) {}
/**
* Count given momentum, weight and id
*/
void count(const LorentzMomentum& p, const LorentzMomentum& q, const LorentzMomentum& r,
double weight, unsigned int id) {
ObjectProperties::count(p+q+r,weight,id);
deltaYstar.count(Statistics::EventContribution(dYstar(p,q,r),weight,0.1),id);
deltaZstar.count(Statistics::EventContribution(dZstar(p,q,r),weight,0.05),id);
}
/**
* Convert to XML
*/
void finalize(XML::Element& elem) {
ObjectProperties::finalize(elem);
deltaYstar.finalize(); elem.append(deltaYstar.toXML());
deltaZstar.finalize(); elem.append(deltaZstar.toXML());
}
};
private:
/**
* Switch between fixed order and showered
*/
bool theIsShowered;
/**
* Switch whether to apply extra analysis cuts
*/
bool theApplyCuts;
/**
* The jet finder to use
*/
Ptr<JetFinder>::ptr theJetFinder;
/**
* The jet regions to match.
*/
vector<Ptr<JetRegion>::ptr> theJetRegions;
/**
* The reconstructed jets
*/
map<unsigned int,LorentzMomentum> theJets;
/**
* The reconstructed electroweak particles
*/
map<unsigned int,LorentzMomentum> theEWIDs;
/**
* The reconstructed charged leptons
*/
map<unsigned int,LorentzMomentum> theChargedLeptons;
/**
* The reconstructed neutrinos
*/
map<unsigned int,LorentzMomentum> theNeutrinos;
/**
* The reconstructed missing pT
*/
LorentzMomentum thePTmiss;
/**
* The reconstructed Higgs
*/
map<unsigned int,LorentzMomentum> theHiggs;
/**
* Jet properties
*/
map<unsigned int,ObjectProperties> theJetProperties;
/**
* Exclusive jet properties
*/
map<unsigned int,ObjectProperties> theExclusiveJetProperties;
/**
* Jet-inclusive properties
*/
ObjectProperties theJetInclusiveProperties;
/**
* Jet-summed properties
*/
ObjectProperties theJetSummedProperties;
/**
* Jet-average properties
*/
ObjectProperties theJetAverageProperties;
/**
* Inclusive jet multiplicities
*/
Statistics::Histogram theNJetsInclusive;
/**
* Exclusive jet multiplicities
*/
Statistics::Histogram theNJetsExclusive;
/**
* Electroweak properties
*/
map<unsigned int,ObjectProperties> theEWIDProperties;
/**
* Charged lepton properties
*/
map<unsigned int,ObjectProperties> theChargedLeptonProperties;
/**
* Neutrino properties
*/
map<unsigned int,ObjectProperties> theNeutrinoProperties;
/**
* missing pT properties
*/
ObjectProperties thePTmissProperties;
/**
* Higgs properties
*/
map<unsigned int,ObjectProperties> theHiggsProperties;
/**
* Jet pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theJetPairProperties;
/**
* Jet/electroweak pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theJetEWIDPairProperties;
/**
* Jet/charged lepton pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theJetChargedLeptonPairProperties;
/**
* Jet/neutrino pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theJetNeutrinoPairProperties;
/**
* Jet/missing pT pair properties
*/
map<unsigned int,PairProperties> theJetPTmissPairProperties;
/**
* Jet/Higgs pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theJetHiggsPairProperties;
/**
* Electroweak pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theEWIDPairProperties;
/**
* Charged lepton pair properties
*/
map<pair<unsigned int,unsigned int>,PairProperties> theChargedLeptonPairProperties;
/**
* Trijet properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theThreeJetProperties;
/**
* Jet-pair/electroweak triple properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairEWIDTripleProperties;
/**
* Jet-pair/charged lepton triple properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairChargedLeptonTripleProperties;
/**
* Jet-pair/neutrino triple properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairNeutrinoTripleProperties;
/**
* Jet-pair/missing pT triple properties
*/
map<pair<unsigned int,unsigned int>,TripleProperties> theJetPairPTmissTripleProperties;
/**
* Jet-pair/Higgs triple properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theJetPairHiggsTripleProperties;
/**
* Triple electroweak properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theThreeEWIDProperties;
/**
* Triple charged lepton properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties> theThreeChargedLeptonProperties;
/**
* Fourjet properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties> theFourJetProperties;
/**
* Four electroweak properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties> theFourEWIDProperties;
/**
* Four charged lepton properties
*/
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties> theFourChargedLeptonProperties;
protected:
/**
* Jet properties
*/
ObjectProperties& jetProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theJetProperties.find(id);
if ( h != theJetProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id;
return
theJetProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Exclusive jet properties
*/
ObjectProperties& exclusiveJetProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theExclusiveJetProperties.find(id);
if ( h != theExclusiveJetProperties.end() )
return h->second;
ostringstream ids; ids << "ExclusiveJet" << id;
return
theExclusiveJetProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet-inclusive properties
*/
ObjectProperties& jetInclusiveProperties() {
if ( !theJetInclusiveProperties.pt.bins().empty() )
return theJetInclusiveProperties;
return
theJetInclusiveProperties =
ObjectProperties("JetInclusive",generator()->maximumCMEnergy());
}
/**
* Jet-summed properties
*/
ObjectProperties& jetSummedProperties() {
if ( !theJetSummedProperties.pt.bins().empty() )
return theJetSummedProperties;
return
theJetSummedProperties =
ObjectProperties("JetSummed",generator()->maximumCMEnergy());
}
/**
* Jet-average properties
*/
ObjectProperties& jetAverageProperties() {
if ( !theJetAverageProperties.pt.bins().empty() )
return theJetAverageProperties;
return
theJetAverageProperties =
ObjectProperties("JetAverage",generator()->maximumCMEnergy());
}
/**
* Inclusive jet multiplicities
*/
Statistics::Histogram& nJetsInclusive() {
if ( !theNJetsInclusive.bins().empty() )
return theNJetsInclusive;
return
theNJetsInclusive =
Statistics::Histogram("NJetsInclusive",
Statistics::Histogram::regularBinEdges(-0.5,theJetRegions.size()+0.5,
theJetRegions.size()+1),
true,true);
}
/**
* Exclusive jet multiplicities
*/
Statistics::Histogram& nJetsExclusive() {
if ( !theNJetsExclusive.bins().empty() )
return theNJetsExclusive;
return
theNJetsExclusive =
Statistics::Histogram("NJetsExclusive",
Statistics::Histogram::regularBinEdges(-0.5,theJetRegions.size()+0.5,
theJetRegions.size()+1),
true,true);
}
/**
* Lepton properties -- all sorted by ID
*/
ObjectProperties& eWIDProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theEWIDProperties.find(id);
if ( h != theEWIDProperties.end() )
return h->second;
ostringstream ids; ids << "EWID" << id;
return
theEWIDProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Charged lepton properties
*/
ObjectProperties& chargedLeptonProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theChargedLeptonProperties.find(id);
if ( h != theChargedLeptonProperties.end() )
return h->second;
ostringstream ids; ids << "ChargedLepton" << id;
return
theChargedLeptonProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Neutrino properties
*/
ObjectProperties& neutrinoProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theNeutrinoProperties.find(id);
if ( h != theNeutrinoProperties.end() )
return h->second;
ostringstream ids; ids << "Neutrino" << id;
return
theNeutrinoProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Missing pT properties
*/
ObjectProperties& pTmissProperties() {
if ( !thePTmissProperties.pt.bins().empty() )
return thePTmissProperties;
return
thePTmissProperties =
ObjectProperties("PTmiss",generator()->maximumCMEnergy());
}
/**
* Higgs properties
*/
ObjectProperties& higgsProperties(const unsigned int id) {
map<unsigned int,ObjectProperties>::iterator h =
theHiggsProperties.find(id);
if ( h != theHiggsProperties.end() )
return h->second;
ostringstream ids; ids << "Higgs" << id;
return
theHiggsProperties[id] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet pair properties
*/
PairProperties& jetPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theJetPairProperties.find(make_pair(id,jd));
if ( h != theJetPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << jd;
return theJetPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet/lepton(all sorted by ID) pair properties
*/
PairProperties& jetEWIDPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theJetEWIDPairProperties.find(make_pair(id,jd));
if ( h != theJetEWIDPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << "EWID" << jd;
return theJetEWIDPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet/charged lepton pair properties
*/
PairProperties& jetChargedLeptonPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theJetChargedLeptonPairProperties.find(make_pair(id,jd));
if ( h != theJetChargedLeptonPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << "ChargedLepton" << jd;
return theJetChargedLeptonPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet/neutrino pair properties
*/
PairProperties& jetNeutrinoPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theJetNeutrinoPairProperties.find(make_pair(id,jd));
if ( h != theJetNeutrinoPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << "Neutrino" << jd;
return theJetNeutrinoPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet/missing pT pair properties
*/
PairProperties& jetPTmissPairProperties(const unsigned int id) {
map<unsigned int,PairProperties>::iterator h =
theJetPTmissPairProperties.find(id);
if ( h != theJetPTmissPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << "PTmiss";
return theJetPTmissPairProperties[id] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet/Higgs pair properties
*/
PairProperties& jetHiggsPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theJetHiggsPairProperties.find(make_pair(id,jd));
if ( h != theJetHiggsPairProperties.end() )
return h->second;
ostringstream ids; ids << "Jet" << id << "Higgs" << jd;
return theJetHiggsPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Electroweak pair properties
*/
PairProperties& eWIDPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theEWIDPairProperties.find(make_pair(id,jd));
if ( h != theEWIDPairProperties.end() )
return h->second;
ostringstream ids; ids << "EWID" << id << jd;
return theEWIDPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Charged lepton pair properties
*/
PairProperties& chargedLeptonPairProperties(const unsigned int id, const unsigned int jd) {
map<pair<unsigned int,unsigned int>,PairProperties>::iterator h =
theChargedLeptonPairProperties.find(make_pair(id,jd));
if ( h != theChargedLeptonPairProperties.end() )
return h->second;
ostringstream ids; ids << "ChargedLepton" << id << jd;
return theChargedLeptonPairProperties[make_pair(id,jd)] =
PairProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Trijet properties
*/
TripleProperties& threeJetProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
theThreeJetProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theThreeJetProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << id3;
return theThreeJetProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet-pair/electroweak triple properties
*/
TripleProperties& jetPairEWIDTripleProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
theJetPairEWIDTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theJetPairEWIDTripleProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << "EWID" << id3;
return theJetPairEWIDTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet-pair/charged lepton triple properties
*/
TripleProperties& jetPairChargedLeptonTripleProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
theJetPairChargedLeptonTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theJetPairChargedLeptonTripleProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << "ChargedLepton" << id3;
return theJetPairChargedLeptonTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet-pair/neutrino triple properties
*/
TripleProperties& jetPairNeutrinoTripleProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
theJetPairNeutrinoTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theJetPairNeutrinoTripleProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << "Neutrino" << id3;
return theJetPairNeutrinoTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet-pair/missing pT triple properties
*/
TripleProperties& jetPairPTmissTripleProperties(const unsigned int id1, const unsigned int id2) {
map<pair<unsigned int,unsigned int>,TripleProperties>::iterator it =
theJetPairPTmissTripleProperties.find(pair<unsigned int,unsigned int>(id1,id2));
if ( it != theJetPairPTmissTripleProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << "PTmiss";
return theJetPairPTmissTripleProperties[pair<unsigned int,unsigned int>(id1,id2)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Jet-pair/Higgs triple properties
*/
TripleProperties& jetPairHiggsTripleProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
theJetPairHiggsTripleProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theJetPairHiggsTripleProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << "Higgs" << id3;
return theJetPairHiggsTripleProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Triple electroweak properties -- all sorted by ID
*/
TripleProperties& threeEWIDProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
theThreeEWIDProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theThreeEWIDProperties.end() )
return it->second;
ostringstream ids;
ids << "EWID" << id1 << id2 << id3;
return theThreeEWIDProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Triple charged lepton properties
*/
TripleProperties& threeChargedLeptonProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3) {
map<std::tuple<unsigned int,unsigned int,unsigned int>,TripleProperties>::iterator it =
theThreeChargedLeptonProperties.find(std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3));
if ( it != theThreeChargedLeptonProperties.end() )
return it->second;
ostringstream ids;
ids << "ChargedLepton" << id1 << id2 << id3;
return theThreeChargedLeptonProperties[std::tuple<unsigned int,unsigned int,unsigned int>(id1,id2,id3)] =
TripleProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Fourjet properties
*/
ObjectProperties& fourJetProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3, const unsigned int id4) {
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
theFourJetProperties.find(std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4));
if ( it != theFourJetProperties.end() )
return it->second;
ostringstream ids;
ids << "Jet" << id1 << id2 << id3 << id4;
return theFourJetProperties[std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4)] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Four electroweak properties
*/
ObjectProperties& fourEWIDProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3, const unsigned int id4) {
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
theFourEWIDProperties.find(std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4));
if ( it != theFourEWIDProperties.end() )
return it->second;
ostringstream ids;
ids << "EWID" << id1 << id2 << id3 << id4;
return theFourEWIDProperties[std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4)] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Four charged lepton properties
*/
ObjectProperties& fourChargedLeptonProperties(const unsigned int id1, const unsigned int id2,
const unsigned int id3, const unsigned int id4) {
map<std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>,ObjectProperties>::iterator it =
theFourChargedLeptonProperties.find(std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4));
if ( it != theFourChargedLeptonProperties.end() )
return it->second;
ostringstream ids;
ids << "ChargedLepton" << id1 << id2 << id3 << id4;
return theFourChargedLeptonProperties[std::tuple<unsigned int,unsigned int,unsigned int,unsigned int>(id1,id2,id3,id4)] =
ObjectProperties(ids.str(),generator()->maximumCMEnergy());
}
/**
* Perform any additional analysis required
*/
virtual void analyzeSpecial(long, double) {}
/**
* Append any additional histograms to the given histogram element
*/
virtual void finalize(XML::Element&) {}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LeptonsJetsAnalysis & operator=(const LeptonsJetsAnalysis &);
+ LeptonsJetsAnalysis & operator=(const LeptonsJetsAnalysis &) = delete;
};
}
#endif /* Herwig_LeptonsJetsAnalysis_H */
diff --git a/Analysis/Makefile.am b/Analysis/Makefile.am
--- a/Analysis/Makefile.am
+++ b/Analysis/Makefile.am
@@ -1,26 +1,26 @@
pkglib_LTLIBRARIES = HwAnalysis.la
-HwAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 11:0:0
+HwAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 12:0:0
HwAnalysis_la_SOURCES = \
BasicConsistency.cc BasicConsistency.h \
LEPMultiplicityCount.cc LEPMultiplicityCount.h \
MultiplicityInfo.h \
LEPBMultiplicity.cc\
LEPBMultiplicity.h \
SimpleLHCAnalysis.h SimpleLHCAnalysis.cc\
TTbarAnalysis.h TTbarAnalysis.cc\
LPairAnalysis.h LPairAnalysis.cc\
GammaGammaAnalysis.h GammaGammaAnalysis.cc\
GammaJetAnalysis.h GammaJetAnalysis.cc\
HiggsJetAnalysis.h HiggsJetAnalysis.cc \
ParallelRunAnalysis.h ParallelRunAnalysis.cc \
DrellYanPT.h DrellYanPT.cc
pkglib_LTLIBRARIES += HwJetsAnalysis.la
-HwJetsAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
+HwJetsAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
HwJetsAnalysis_la_SOURCES = \
LeptonsJetsAnalysis.h LeptonsJetsAnalysis.cc \
JetsPlusAnalysis.h JetsPlusAnalysis.cc \
HJetsAnalysis.h HJetsAnalysis.cc \
ZJetsAnalysis.h ZJetsAnalysis.cc \
TTJetsAnalysis.h TTJetsAnalysis.cc \
CrossSectionAnalysis.h CrossSectionAnalysis.cc
diff --git a/Analysis/ParallelRunAnalysis.h b/Analysis/ParallelRunAnalysis.h
--- a/Analysis/ParallelRunAnalysis.h
+++ b/Analysis/ParallelRunAnalysis.h
@@ -1,123 +1,123 @@
// -*- C++ -*-
//
// ParallelRunAnalysis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ParallelRunAnalysis_H
#define HERWIG_ParallelRunAnalysis_H
//
// This is the declaration of the ParallelRunAnalysis class.
//
//#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
//#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* This analysis prints out information necessary for the combination of multiple
* Herwig runs during the run step.
*
* @see \ref ParallelRunAnalysisInterfaces "The interfaces"
* defined for ParallelRunAnalysis.
*/
class ParallelRunAnalysis: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ParallelRunAnalysis();
//@}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ParallelRunAnalysis & operator=(const ParallelRunAnalysis &);
+ ParallelRunAnalysis & operator=(const ParallelRunAnalysis &) = delete;
private:
};
}
#endif /* HERWIG_ParallelRunAnalysis_H */
diff --git a/Analysis/README b/Analysis/README
deleted file mode 100644
--- a/Analysis/README
+++ /dev/null
@@ -1,1 +0,0 @@
-testing
diff --git a/Analysis/SimpleLHCAnalysis.h b/Analysis/SimpleLHCAnalysis.h
--- a/Analysis/SimpleLHCAnalysis.h
+++ b/Analysis/SimpleLHCAnalysis.h
@@ -1,176 +1,176 @@
// -*- C++ -*-
//
// SimpleLHCAnalysis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SimpleLHCAnalysis_H
#define HERWIG_SimpleLHCAnalysis_H
//
// This is the declaration of the SimpleLHCAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* The SimpleLHCAnalysis class is designed to perform some simple analysis of
* gauge boson, W and Z, distributions in hadron-hadron collisions. The main
* distriubtions are the transverse momentum and rapidities of the gauge bosons
* which are of physical interest, and the azimuthal angle distribution for
* testing purposes.
*
* @see \ref SimpleLHCAnalysisInterfaces "The interfaces"
* defined for SimpleLHCAnalysis.
*/
class SimpleLHCAnalysis: public AnalysisHandler {
public:
/**
* The default constructor.
*/
SimpleLHCAnalysis();
/** @name Virtual Functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SimpleLHCAnalysis & operator=(const SimpleLHCAnalysis &);
+ SimpleLHCAnalysis & operator=(const SimpleLHCAnalysis &) = delete;
private:
/**
* \f$p_T\f$ of the Z boson
*/
vector<Histogram> _ptZ;
/**
* \f$p_T\f$ of the \f$W^+\f$ boson
*/
vector<Histogram> _ptWp;
/**
* \f$p_T\f$ of the \f$W^-\f$ boson
*/
vector<Histogram> _ptWm;
/**
* Mass of the Z boson
*/
Histogram _mZ;
/**
* Mass of the \f$W^+\f$ boson
*/
Histogram _mWp;
/**
* Mass of the \f$W^-\f$ boson
*/
Histogram _mWm;
/**
* Rapidity of Z
*/
Histogram _rapZ;
/**
* Rapidity of \f$W^+\f$ boson
*/
Histogram _rapWp;
/**
* Rapidity of \f$W^-\f$ boson
*/
Histogram _rapWm;
/**
* Azimuth of Z
*/
Histogram _phiZ;
/**
* Azimuth of \f$W^+\f$ boson
*/
Histogram _phiWp;
/**
* Azimuth of \f$W^-\f$ boson
*/
Histogram _phiWm;
};
}
#endif /* HERWIG_SimpleLHCAnalysis_H */
diff --git a/Analysis/TTJetsAnalysis.h b/Analysis/TTJetsAnalysis.h
--- a/Analysis/TTJetsAnalysis.h
+++ b/Analysis/TTJetsAnalysis.h
@@ -1,106 +1,106 @@
// -*- C++ -*-
#ifndef Herwig_TTJetsAnalysis_H
#define Herwig_TTJetsAnalysis_H
//
// This is the declaration of the TTJetsAnalysis class.
//
#include "Herwig/Analysis/JetsPlusAnalysis.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the TTJetsAnalysis class.
*
* @see \ref TTJetsAnalysisInterfaces "The interfaces"
* defined for TTJetsAnalysis.
*/
class TTJetsAnalysis: public Herwig::JetsPlusAnalysis {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
TTJetsAnalysis();
/**
* The destructor.
*/
virtual ~TTJetsAnalysis();
//@}
public:
/**
* Reconstruct the desired electroweak objects and fill the
* respective momenta. Remove the reconstructed particles from the
* list.
*/
virtual void reconstructHardObjects(ParticleVector&);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TTJetsAnalysis & operator=(const TTJetsAnalysis &);
+ TTJetsAnalysis & operator=(const TTJetsAnalysis &) = delete;
};
}
#endif /* Herwig_TTJetsAnalysis_H */
diff --git a/Analysis/TTbarAnalysis.h b/Analysis/TTbarAnalysis.h
--- a/Analysis/TTbarAnalysis.h
+++ b/Analysis/TTbarAnalysis.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// TTbarAnalysis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TTbarAnalysis_H
#define HERWIG_TTbarAnalysis_H
//
// This is the declaration of the TTbarAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
* The TTbarAnalysis class tries to find a top antitop pair in the final
* state and books a number of histograms. It only makes sense if
* hadronization and decays are switched off. However, if there is is
* no top quark pair in the final state then a warning is printed and
* nothing is booked. Some of the histograms will be sensitive to the
* initial state shower.
*
* @see \ref TTbarAnalysisInterfaces "The interfaces"
* defined for TTbarAnalysis.
*/
class TTbarAnalysis: public AnalysisHandler {
public:
/**
* The default constructor.
*/
TTbarAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TTbarAnalysis & operator=(const TTbarAnalysis &);
+ TTbarAnalysis & operator=(const TTbarAnalysis &) = delete;
private:
/**
* \f$p_T\f$ of the tops
*/
Histogram _pttop;
Histogram _pttbar;
Histogram _ptpair;
/**
* \f$E_T\f$ of the tops
*/
Histogram _ettop;
Histogram _ettbar;
Histogram _etpair;
/**
* Energy of the tops
*/
Histogram _etop;
Histogram _etbar;
Histogram _epair;
/**
* Rapidity of the tops
*/
Histogram _raptop;
Histogram _raptbar;
Histogram _rappair;
/**
* Azimuth of the tops
*/
Histogram _phitop;
Histogram _phitbar;
Histogram _deltaphi;
/**
* Invariant mass of the pair
*/
Histogram _mpair;
/**
* scalar sums of Et, pt
*/
Histogram _etsum;
Histogram _ptsum;
};
}
#endif /* HERWIG_TTbarAnalysis_H */
diff --git a/Analysis/ZJetsAnalysis.h b/Analysis/ZJetsAnalysis.h
--- a/Analysis/ZJetsAnalysis.h
+++ b/Analysis/ZJetsAnalysis.h
@@ -1,106 +1,106 @@
// -*- C++ -*-
#ifndef Herwig_ZJetsAnalysis_H
#define Herwig_ZJetsAnalysis_H
//
// This is the declaration of the ZJetsAnalysis class.
//
#include "Herwig/Analysis/JetsPlusAnalysis.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the ZJetsAnalysis class.
*
* @see \ref ZJetsAnalysisInterfaces "The interfaces"
* defined for ZJetsAnalysis.
*/
class ZJetsAnalysis: public Herwig::JetsPlusAnalysis {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ZJetsAnalysis();
/**
* The destructor.
*/
virtual ~ZJetsAnalysis();
//@}
public:
/**
* Reconstruct the desired electroweak objects and fill the
* respective momenta. Remove the reconstructed particles from the
* list.
*/
virtual void reconstructHardObjects(ParticleVector&);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZJetsAnalysis & operator=(const ZJetsAnalysis &);
+ ZJetsAnalysis & operator=(const ZJetsAnalysis &) = delete;
};
}
#endif /* Herwig_ZJetsAnalysis_H */
diff --git a/Contrib/AcerDetInterface/AcerDet.h b/Contrib/AcerDetInterface/AcerDet.h
--- a/Contrib/AcerDetInterface/AcerDet.h
+++ b/Contrib/AcerDetInterface/AcerDet.h
@@ -1,278 +1,278 @@
// -*- C++ -*-
#ifndef HERWIG_AcerDet_H
#define HERWIG_AcerDet_H
//
// This is the declaration of the AcerDet class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "HepMC/GenEvent.h"
#include "HepMC/IO_HEPEVT.h"
namespace Herwig {
using namespace ThePEG;
/**
* The AcerDet class is designed to interface Herwig with the
* AcerDet fast detector simulation
*
* @see \ref AcerDetInterfaces "The interfaces"
* defined for AcerDet.
*/
class AcerDet: public AnalysisHandler {
public:
/**
* The default constructor.
*/
inline AcerDet() {}
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* Members to analyse the information from AcerDet
*/
//@{
/**
* Number of photons
*/
inline unsigned int numberOfPhotons() const {return _nphoton;}
/**
* Momenta of the photons
*/
inline const vector<LorentzMomentum> & photonMomentum() const {return _photonMomentum;}
/**
* Number of leptons
*/
inline unsigned int numberOfLeptons() const {return _nlepton;}
/**
* Momenta of the leptons
*/
inline const vector<LorentzMomentum> & leptonMomentum() const {return _leptonMomentum;}
/**
* PDG codes for the leptons
*/
inline const vector<int> & leptonID() const {return _leptonID;}
/**
* Number of jets
*/
inline unsigned int numberOfJets() const {return _njet;}
/**
* Momenta of the jets
*/
inline const vector<LorentzMomentum> & jetMomentum() const {return _jetMomentum;}
/**
* PDG codes for the jets (0 for light 5 for bottom)
* probably not very relible
*/
inline const vector<int> & jetID() const {return _jetID;}
/**
* The missing \f$E_T\f$ from the calorimeter
* @return \f$p_x\f$, \f$p_y\f$
*/
inline const pair<Energy,Energy> & missingETCalorimeter() const {_etcalo;}
/**
* The missing \f$E_T\f$ from the neutrinos
* @return \f$p_x\f$, \f$p_y\f$
*/
inline const pair<Energy,Energy> & missingETNeutrino() const {_etneutrino;}
/**
* The missing \f$E_T\f$ from the user identified stable neutral particles
* @return \f$p_x\f$, \f$p_y\f$
*/
inline const pair<Energy,Energy> & missingETStable() const {_etstable;}
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static NoPIOClassDescription<AcerDet> initAcerDet;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- AcerDet & operator=(const AcerDet &);
+ AcerDet & operator=(const AcerDet &) = delete;
private:
/**
* Converter from HepMC to HEPEVT
*/
HepMC::IO_HEPEVT * _converter;
/**
* Number of photons
*/
unsigned int _nphoton;
/**
* Momenta of the photons
*/
vector<LorentzMomentum> _photonMomentum;
/**
* Number of leptons
*/
unsigned int _nlepton;
/**
* Momenta of the leptons
*/
vector<LorentzMomentum> _leptonMomentum;
/**
* PDG codes for the leptons
*/
vector<int> _leptonID;
/**
* Number of jets
*/
unsigned int _njet;
/**
* Momenta of the jets
*/
vector<LorentzMomentum> _jetMomentum;
/**
* PDG codes for the jets
*/
vector<int> _jetID;
/**
* The missing \f$E_T\f$ from the calorimeter
*/
pair<Energy,Energy> _etcalo;
/**
* The missing \f$E_T\f$ from the neutrinos
*/
pair<Energy,Energy> _etneutrino;
/**
* The missing \f$E_T\f$ from the user identified stable neutral particles
*/
pair<Energy,Energy> _etstable;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of AcerDet. */
template <>
struct BaseClassTrait<Herwig::AcerDet,1> {
/** Typedef of the first base class of AcerDet. */
typedef AnalysisHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the AcerDet class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::AcerDet>
: public ClassTraitsBase<Herwig::AcerDet> {
/** Return a platform-independent class name */
static string className() { return "Herwig::AcerDet"; }
/**
* The name of a file containing the dynamic library where the class
* AcerDet is implemented. It may also include several, space-separated,
* libraries if the class AcerDet depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwAcerDet.so"; }
};
/** @endcond */
}
#endif /* HERWIG_AcerDet_H */
diff --git a/Contrib/AcerDetInterface/ZAnalysis.h b/Contrib/AcerDetInterface/ZAnalysis.h
--- a/Contrib/AcerDetInterface/ZAnalysis.h
+++ b/Contrib/AcerDetInterface/ZAnalysis.h
@@ -1,157 +1,157 @@
// -*- C++ -*-
#ifndef HERWIG_ZAnalysis_H
#define HERWIG_ZAnalysis_H
//
// This is the declaration of the ZAnalysis class.
//
#include "AcerDet.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* The ZAnalysis class is a simple example of using the interface
* to AcerDet to look at the Z mass at the hadron and detector levels
*
* @see \ref ZAnalysisInterfaces "The interfaces"
* defined for ZAnalysis.
*/
class ZAnalysis: public AcerDet {
public:
/**
* The default constructor.
*/
ZAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an concrete class without persistent data.
*/
static NoPIOClassDescription<ZAnalysis> initZAnalysis;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZAnalysis & operator=(const ZAnalysis &);
+ ZAnalysis & operator=(const ZAnalysis &) = delete;
private:
/**
* Z mass at the hadron level
*/
Histogram ZmassHadron_;
/**
* Z mass at the detector level
*/
Histogram ZmassDetector_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of ZAnalysis. */
template <>
struct BaseClassTrait<Herwig::ZAnalysis,1> {
/** Typedef of the first base class of ZAnalysis. */
typedef Herwig::AcerDet NthBase;
};
/** This template specialization informs ThePEG about the name of
* the ZAnalysis class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::ZAnalysis>
: public ClassTraitsBase<Herwig::ZAnalysis> {
/** Return a platform-independent class name */
static string className() { return "Herwig::ZAnalysis"; }
/**
* The name of a file containing the dynamic library where the class
* ZAnalysis is implemented. It may also include several, space-separated,
* libraries if the class ZAnalysis depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwAcerDet.so ZAnalysis.so"; }
};
/** @endcond */
}
#endif /* HERWIG_ZAnalysis_H */
diff --git a/Contrib/AlpGen/AlpGenHandler.h b/Contrib/AlpGen/AlpGenHandler.h
--- a/Contrib/AlpGen/AlpGenHandler.h
+++ b/Contrib/AlpGen/AlpGenHandler.h
@@ -1,567 +1,567 @@
// -*- C++ -*-
#ifndef HERWIG_AlpGenHandler_H
#define HERWIG_AlpGenHandler_H
//
// This is the declaration of the AlpGenHandler class.
//
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include "Herwig/Shower/ShowerHandler.h"
#include "ThePEG/Config/Pointers.h"
#include "Herwig/Shower/ShowerAlpha.h"
#include "fastjet/PseudoJet.hh"
#include "fastjet/ClusterSequence.hh"
namespace Herwig {
class AlpGenHandler;
}
//declaration of thepeg ptr
namespace ThePEG {
ThePEG_DECLARE_POINTERS(Herwig::AlpGenHandler,AlpGenHandlerPtr);
}
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the AlpGenHandler class.
*
* @see \ref AlpGenHandlerInterfaces "The interfaces"
* defined for AlpGenHandler.
*/
class AlpGenHandler: public QTildeShowerHandler {
public:
/**
* The default constructor.
*/
AlpGenHandler();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize the object
*/
virtual void dofinish();
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
public:
/**
* Hook to allow vetoing of event after showering hard sub-process
* as in e.g. MLM merging.
*/
virtual bool showerHardProcessVeto() const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/*
* Run MLM jet-parton matching on the 'extra' jets.
*/
bool lightJetPartonVeto();
/*
* Function that calculates deltaR between a parton and a jet
*/
double partonJetDeltaR(ThePEG::tPPtr partonptr, LorentzMomentum jetmom) const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Initialize calorimeter for calsim_m and getjet_m. Note that
* because initialization is separte calsim_m can be called more
* than once to simulate pileup of several events.
*/
void calini_m() const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Simple calorimeter simulation - assume uniform Y and phi bins.
*/
void calsim_m() const;
/**
* Find jets using the FastJet package on particlesToCluster_.
*/
void getFastJets(double rjet, Energy ejcut, double etajcut) const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Simple jet-finding algorithm (similar to UA1). Find highest
* remaining cell > ETSTOP and sum surrounding cells with --
* DELTA(Y)**2+DELTA(PHI)**2 < RJET**2 , ET>ECCUT.
* Keep sets with ET>EJCUT and ABS(ETA)<ETACUT. The UA1
* parameters are RJET=1.0 and EJCUT=5.0.
*/
void getjet_m(double rjet, Energy ejcut, double etajcut) const;
/**
* Deletes particles from partonsToMatch_ and particlesToCluster_
* vectors so that these contain only the partons to match to the
* jets and the particles used to build jets respectively. By and
* large the candidates for deletion are: vector bosons and their
* decay products, Higgs bosons, photons as well as _primary_, i.e.
* present in the lowest multiplicity process, heavy quarks and
* any related decay products.
*/
void caldel_m() const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Label all particles with status between ISTLO and ISTHI
* (until a particle with status ISTOP is found) as final-state,
* call calsim_m and then put labels back to normal. This
* version keeps only all IST=1 particles rejected by caldel as
* daughters of vetoed heavy-quark mothers: jets complementary
* to those reconstructed by caldel.
*/
void caldel_hvq() const;
/**
* Get the particles from lastXCombPtr filling the pair
* preshowerISPs_ and particle pointer vector preshowerFSPs_.
*/
void getPreshowerParticles() const;
/**
* Get the particles from eventHandler()->currentEvent()->...
* filling the particle pairs showeredISHs_, showeredISPs_,
* showeredRems_ and the particle pointer vector showeredFSPs_.
*/
void getShoweredParticles() const;
/**
* Allows printing of debug output and sanity checks like
* total momentum consrvation to be carried out.
* debugLevel = -1, 0, ...5
* = no debugging, minimal debugging, ... verbose.
*/
void doSanityChecks(int debugLevel) const;
/**
* Given a pointer to a particle this finds all its final state
* descendents.
*/
void getDescendents(PPtr theParticle) const;
/**
* Accumulates all descendents of tops down to the b and W
* but not including them.
*/
void getTopRadiation(PPtr theParticle) const;
/**
* Sorts a given vector of particles by descending pT or ETJET
*/
ParticleVector pTsort(ParticleVector unsortedVec);
pair< vector<Energy>, vector<Lorentz5Momentum> > ETsort(vector<Energy> unsortedetjet, vector<Lorentz5Momentum> unsortedVec);
/*
* A function that prints a vector of Lorentz5Momenta in a fancy way
*/
void printMomVec(vector<Lorentz5Momentum> momVec);
/*
* A probability function for varying etclus_ about the mean value
*/
Energy etclusran_(double petc) const;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<AlpGenHandler> initAlpGenHandler;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- AlpGenHandler & operator=(const AlpGenHandler &);
+ AlpGenHandler & operator=(const AlpGenHandler &) = delete;
private:
/**
* Initial-state incoming partons prior to showering
* (i.e. from lastXCombPtr).
*/
mutable PPair preshowerISPs_;
/**
* Final-state outgoing partICLEs prior to showering
* (i.e. from lastXCombPtr).
*/
mutable ParticleVector preshowerFSPs_;
/**
* Final-state outgoing partICLEs prior to showering _to_be_removed_
* from preShowerFSPs_ prior to the light-parton-light-jet matching
* step. This same list is the starting point for determining
* partonsToMatch_ for the case of merging in heavy quark production.
*/
mutable ParticleVector preshowerFSPsToDelete_;
/**
* Initial-state incoming hadrons after shower of hard process
* (eventHandler()->currentEvent()->incoming()).
*/
mutable PPair showeredISHs_;
/**
* Initial-state incoming partons after shower of hard process
* (look for partonic children of showeredISHs_).
*/
mutable PPair showeredISPs_;
/**
* Final-state outgoing partICLEs after shower of hard process
* (eventHandler()->currentEvent()->getFinalState()).
*/
mutable tPVector showeredFSPs_;
/**
* Final-state outgoing partICLEs after shower of hard process
* _to_be_removed_ from showeredFSPs_ prior to the
* light-parton-light-jet matching step. This same list is the
* starting point for determining particlesToCluster_ for the
* case of merging in heavy quark production.
*/
mutable ParticleVector showeredFSPsToDelete_;
/**
* ONLY the final-state partons from preshowerFSPs_ that are
* supposed to enter the jet-parton matching.
*/
mutable ParticleVector partonsToMatch_;
/*
* The shower progenitors
*/
mutable PPtr theProgenitor;
mutable PPtr theLastProgenitor;
/**
* ONLY the final-state particles from showeredFSPs_ (and maybe
* also showeredRems_) that are supposed to go for jet clustering.
*/
mutable tPVector particlesToCluster_;
/**
* Final-state remnants after shower of hard process
* (look for remnants initially in showeredFSPs_).
*/
mutable PPair showeredRems_;
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr alphaS_;
/**
* Information extracted from the XComb object
*/
//@{
/**
* The fixed factorization scale used in the MEs.
*/
Energy pdfScale_;
/**
* Centre of mass energy
*/
Energy2 sHat_;
/**
* Constant alphaS used to generate LH events - if not already
* using CKKW scale (ickkw = 1 in AlpGen for example).
*/
double alphaSME_;
//@}
/*
* Number of rapidity segments of the calorimeter.
*/
unsigned int ncy_;
/*
* Number of phi segments of the calorimeter.
*/
unsigned int ncphi_;
/*
* Heavy flavour in WQQ,ZQQ,2Q etc (4=c, 5=b, 6=t).
*/
int ihvy_;
/*
* Number of photons in the AlpGen process.
*/
int nph_;
/*
* Number of higgses in the AlpGen process.
*/
int nh_;
/*
* Jet ET cut to apply in jet clustering (in merging).
*/
mutable Energy etclus_;
/*
* Mean Jet ET cut to apply in jet clustering (in merging).
*/
Energy etclusmean_;
/*
* maximum deviation from mean Jet ET cut to apply in jet clustering (in merging).
*/
Energy epsetclus_;
/*
* Cone size used in jet clustering (in merging).
*/
double rclus_;
/*
* Max |eta| for jets in clustering (in merging).
*/
double etaclmax_;
/*
* Default 1.5 factor used to decide if a jet matches a parton
* in merging: if DR(parton,jet)<rclusfactor*rclus the parton
* and jet are said to have been matched.
*/
double rclusfactor_;
/*
* The AlpGen hard process code. Relation to the AlpGen process names:
* 1: wqq, 2: zqq, 3: wjet, 4: zjet, 5: vbjet, 6: 2Q, 8: QQh, 9: Njet,
* 10: wcjet, 11: phjet, 12: hjet, 13: top, 14: wphjet, 15: wphqq,
* 16: 2Qph.
*/
int ihrd_;
/*
* The number of light jets in the AlpGen process (i.e. the 'extra' ones).
*/
int njets_;
/*
* Mimimum parton-parton R-sep used for generation (used for hvq merging).
*/
double drjmin_;
/*
* This flags that the highest multiplicity ME-level process is
* being processed.
*/
bool highestMultiplicity_;
/*
* This flags that the highest NLO multiplicity ME-level process is
* being processed.
*/
bool highestNLOMultiplicity_;
/*
* This flags whether the etclus_ (merging scale) should be fixed or variable according to a prob. distribution around the mean
*/
bool etclusfixed_;
/*
* The forwards rapidity span of the calorimeter.
*/
double ycmax_;
/*
* The backwards rapidity span of the calorimeter.
*/
double ycmin_;
/*
* The jet algorithm used for parton-jet matching in the MLM procedure.
*/
int jetAlgorithm_;
/*
* Allows the vetoing to be turned off completely - just for convenience.
*/
bool vetoIsTurnedOff_;
/*
* Signals that the LH file being read-in is a NLO (Powheg one).
*/
bool inputIsNLO_;
/*
* Cosine of phi values of calorimeter cell centres.
* Goes phi~=0 to phi~=2*pi (index = 0 ---> ncphi).
* ==> Cosine goes from +1 ---> +1 (index = 0 ---> ncphi).
*/
mutable vector<double> cphcal_;
/*
* Sine of phi values of calorimeter cell centres.
* Goes phi~=0 to phi~=2*pi (index = 0 ---> ncphi).
* ==> Sine goes 0 -> 1 -> 0 -> -1 -> 0 (index = 0 ---> ncphi).
*/
mutable vector<double> sphcal_;
/*
* Cosine of theta values of calorimeter cell centres in Y.
* Goes bwds th~=pi to fwds th~=0 (index = 0 ---> ncy).
* ==> Cosine goes from -1 ---> +1 (index = 0 ---> ncy).
*/
mutable vector<double> cthcal_;
/*
* Sine of theta values of calorimeter cell centres in Y.
* Goes bwds th~=pi to fwds th~=0 (index = 0 ---> ncy).
* ==> Sine goes from 0 ---> +1 ---> 0 (index = 0 ---> ncy).
*/
mutable vector<double> sthcal_;
/*
* Transverse energy deposit in a given calorimeter cell.
* First array index corresponds to rapidity index of cell,
* second array index corresponds to phi cell index.
*/
mutable vector<vector<Energy> > et_;
/*
* For a given calorimeter cell this holds the index of the jet
* that the cell was clustered into.
*/
mutable vector<vector<int> > jetIdx_;
/*
* Vector holding the Lorentz 5 momenta of each jet.
*/
mutable vector<Lorentz5Momentum> pjet_;
/*
* Vector holding the list of FS particles resulting from
* the particle input to getDescendents.
*/
mutable ParticleVector tmpList_;
/*
* Variables for the C++ translation of the calini_m(), calsim_m(),
* getjet_m(...) and caldel_m() functions
*/
mutable vector<Energy> etjet_;
mutable double dely_, delphi_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of AlpGenHandler. */
template <>
struct BaseClassTrait<Herwig::AlpGenHandler,1> {
/** Typedef of the first base class of AlpGenHandler. */
typedef Herwig::QTildeShowerHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the AlpGenHandler class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::AlpGenHandler>
: public ClassTraitsBase<Herwig::AlpGenHandler> {
/** Return a platform-independent class name */
static string className() { return "Herwig::AlpGenHandler"; }
/**
* The name of a file containing the dynamic library where the class
* AlpGenHandler is implemented. It may also include several, space-separated,
* libraries if the class AlpGenHandler depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "AlpGenHandler.so"; }
};
/** @endcond */
}
#endif /* HERWIG_AlpGenHandler_H */
diff --git a/Contrib/AlpGen/BasicLesHouchesFileReader.h b/Contrib/AlpGen/BasicLesHouchesFileReader.h
--- a/Contrib/AlpGen/BasicLesHouchesFileReader.h
+++ b/Contrib/AlpGen/BasicLesHouchesFileReader.h
@@ -1,333 +1,333 @@
// -*- C++ -*-
//
// BasicLesHouchesFileReader.h is a part of Herwig - A multi-purpose
// Monte Carlo event generator.
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the BasicLesHouchesFileReader class.
//
#ifndef HERWIG_BasicLesHouchesFileReader_H
#define HERWIG_BasicLesHouchesFileReader_H
// This is the declaration of the BasicLesHouchesFileReader class.
#include "ThePEG/LesHouches/LesHouchesReader.h"
#include "BasicLesHouchesFileReader.fh"
#include "ThePEG/PDT/Decayer.h"
#include "ThePEG/Utilities/CFileLineReader.h"
#include <stdio.h>
namespace Herwig {
using namespace ThePEG;
/**
* BasicLesHouchesFileReader derives from the LesHouchesReader base class
* to be used for objects which read event files from matrix element
* generators. It extends LesHouchesReader by defining a file handle to be
* read from, which is opened and closed by the open() and close()
* functions. Note that the file handle is a standard C filehandle and
* not a C++ stream. This is because there is no standard way in C++
* to connect a pipe to a stream for reading eg. gzipped files. This
* class is able to read plain event files conforming to the Les
* Houches Event File accord.
*
* @see \ref BasicLesHouchesFileReaderInterfaces "The interfaces"
* defined for BasicLesHouchesFileReader.
* @see LesHouchesReader
* @see BasicLesHouchesFileReader
*/
class BasicLesHouchesFileReader: public LesHouchesReader {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
BasicLesHouchesFileReader() : neve(0), ieve(0) {}
/**
* Copy-constructor. Note that a file which is opened in the object
* copied from will have to be reopened in this.
*/
BasicLesHouchesFileReader(const BasicLesHouchesFileReader &);
/**
* Destructor.
*/
virtual ~BasicLesHouchesFileReader();
//@}
public:
/** @name Virtual functions specified by the LesHouchesReader base class. */
//@{
/**
* Initialize. This function is called by the LesHouchesEventHandler
* to which this object is assigned.
*/
virtual void initialize(LesHouchesEventHandler & eh);
/**
* Calls readEvent() or uncacheEvent() to read information into the
* LesHouches common block variables. This function is called by the
* LesHouchesEventHandler if this reader has been selectod to
* produce an event.
*
* @return the weight asociated with this event. If negative weights
* are allowed it should be between -1 and 1, otherwise between 0
* and 1. If outside these limits the previously estimated maximum
* is violated. Note that the estimated maximum then should be
* updated from the outside.
*/
virtual double getEvent();
/**
* Calls doReadEvent() and performs pre-defined reweightings. A
* sub-class overrides this function it must make sure that the
* corresponding reweightings are done.
*/
virtual bool readEvent();
/**
* Skip \a n events. Used by LesHouchesEventHandler to make sure
* that a file is scanned an even number of times in case the events
* are not ramdomly distributed in the file.
*/
virtual void skip(long n);
/**
* Scan the file or stream to obtain information about cross section
* weights and particles etc. This function should fill the
* variables corresponding to the /HEPRUP/ common block. The
* function returns the number of events scanned.
*/
virtual long scan();
/**
* Open a file with events. Derived classes should overwrite it and
* first calling it before reading in the run information into the
* corresponding protected variables.
*/
virtual void open();
/**
* Close the file from which events have been read.
*/
virtual void close();
/**
* Read the next event from the file or stream into the
* corresponding protected variables. Return false if there is no
* more events or if this was not a LHF event file.
*/
virtual bool doReadEvent();
//@}
/**
* Return the name of the file from where to read events.
*/
string filename() const { return theFileName; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
/** @name Standard (and non-standard) Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Return true if this object needs to be initialized before all
* other objects because it needs to extract PDFs from the event file.
*/
virtual bool preInitialize() const;
//@
protected:
/**
* The wrapper around the C FILE stream from which to read
*/
CFileLineReader cfile;
protected:
/**
* The number of events in this file.
*/
long neve;
/**
* The current event number.
*/
long ieve;
/**
* If the file is a standard Les Houches formatted file (LHF) this
* is its version number. If empty, this is not a Les Houches
* formatted file
*/
string LHFVersion;
/**
* If LHF. All lines (since the last open() or readEvent()) outside
* the header, init and event tags.
*/
string outsideBlock;
/**
* If LHF. All lines from the header block.
*/
string headerBlock;
/**
* If LHF. Additional comments found in the init block.
*/
string initComments;
/**
* If LHF. Map of attributes (name-value pairs) found in the init
* tag.
*/
map<string,string> initAttributes;
/**
* If LHF. Additional comments found with the last read event.
*/
string eventComments;
/**
* If LHF. Map of attributes (name-value pairs) found in the last
* event tag.
*/
map<string,string> eventAttributes;
private:
/**
* The name of the file from where to read events.
*/
string theFileName;
/**
* Determines whether events in the LH file are or are not read
* more than once in order to generate the requested number of
* events.
*/
bool overSampling_;
private:
/**
* Describe an abstract base class with persistent data.
*/
static ClassDescription<BasicLesHouchesFileReader> initBasicLesHouchesFileReader;
/**
* Private and non-existent assignment operator.
*/
- BasicLesHouchesFileReader & operator=(const BasicLesHouchesFileReader &);
+ BasicLesHouchesFileReader & operator=(const BasicLesHouchesFileReader &) = delete;
public:
/** @cond EXCEPTIONCLASSES */
/** Exception class used by BasicLesHouchesFileReader if reading the file
* fails. */
class LesHouchesFileError: public Exception {};
/** @endcond */
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/**
* This template specialization informs ThePEG about the
* base class of BasicLesHouchesFileReader.
*/
template <>
struct BaseClassTrait<Herwig::BasicLesHouchesFileReader,1> {
/** Typedef of the base class of BasicLesHouchesFileReader. */
typedef LesHouchesReader NthBase;
};
/**
* This template specialization informs ThePEG about the name of the
* BasicLesHouchesFileReader class and the shared object where it is
* defined.
*/
template <>
struct ClassTraits<Herwig::BasicLesHouchesFileReader>
: public ClassTraitsBase<Herwig::BasicLesHouchesFileReader> {
/**
* Return the class name.
*/
static string className() { return "Herwig::BasicLesHouchesFileReader"; }
/**
* Return the name of the shared library to be loaded to get access
* to the BasicLesHouchesFileReader class and every other class it uses
* (except the base class).
*/
static string library() { return "BasicLesHouchesFileReader.so"; }
};
/** @endcond */
}
#endif /* HERWIG_BasicLesHouchesFileReader_H */
diff --git a/Contrib/AnomalousHVV/AnomalousWWHVertex.h b/Contrib/AnomalousHVV/AnomalousWWHVertex.h
--- a/Contrib/AnomalousHVV/AnomalousWWHVertex.h
+++ b/Contrib/AnomalousHVV/AnomalousWWHVertex.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
#ifndef HERWIG_AnomalousWWHVertex_H
#define HERWIG_AnomalousWWHVertex_H
//
// This is the declaration of the AnomalousWWHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/GeneralVVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The AnomalousWWHVertex class implements the option of an anomalous
* coupling in the \f$h^0W^+W^+\f$ and \f$h^0Z^0Z^0\f$ vertices.
*
* The options of using either the exact Standard Model, a CP-odd
* \f[\frac1{\Lambda}J_1^\mu J_2^\nu\epsilon^{\mu\nu\alpha\beta}q_{1\alpha}q_{2\beta},\f]
* or CP-even
* \f[\frac1{\Lambda}J_1^\mu J_2^\nu
* \left[g_{\mu\nu}q_1 \cdot q_2-q_{1\nu}q_{2\mu}\right],\f]
* form, where \f$\Lambda\f$ is the scale of the new operator.
*
* @see \ref AnomalousWWHVertexInterfaces "The interfaces"
* defined for AnomalousWWHVertex.
*/
class AnomalousWWHVertex: public Helicity::GeneralVVSVertex {
public:
/**
* The default constructor.
*/
AnomalousWWHVertex();
/**
* Calculate coupling.
* @param q2 Scale at which to evaluate couplings
* @param part1 ParticleDataPointer to first particle
* @param part2 ParticleDataPointer to second particle
* @param part3 ParticleDataPointer to third particle
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- AnomalousWWHVertex & operator=(const AnomalousWWHVertex &);
+ AnomalousWWHVertex & operator=(const AnomalousWWHVertex &) = delete;
/**
* Switch for the type of interaction
*/
unsigned int interactionType_;
/**
* The scale \f$\Lambda\f$
*/
Energy Lambda_;
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex couplast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2last_;
/**
* The mass of the \f$W\f$ boson.
*/
Energy mw_;
/**
* The factor for the \f$Z\f$ vertex.
*/
double zfact_;
//@}
};
}
#endif /* HERWIG_AnomalousWWHVertex_H */
diff --git a/Contrib/AnomalousHVV/SimpleVBFAnalysis.h b/Contrib/AnomalousHVV/SimpleVBFAnalysis.h
--- a/Contrib/AnomalousHVV/SimpleVBFAnalysis.h
+++ b/Contrib/AnomalousHVV/SimpleVBFAnalysis.h
@@ -1,126 +1,126 @@
// -*- C++ -*-
#ifndef HERWIG_SimpleVBFAnalysis_H
#define HERWIG_SimpleVBFAnalysis_H
//
// This is the declaration of the SimpleVBFAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SimpleVBFAnalysis class.
*
* @see \ref SimpleVBFAnalysisInterfaces "The interfaces"
* defined for SimpleVBFAnalysis.
*/
class SimpleVBFAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SimpleVBFAnalysis & operator=(const SimpleVBFAnalysis &);
+ SimpleVBFAnalysis & operator=(const SimpleVBFAnalysis &) = delete;
private:
/**
* Histogram for \f$\Delta\phi\f$
*/
HistogramPtr _deltaPhi;
};
}
#endif /* HERWIG_SimpleVBFAnalysis_H */
diff --git a/Contrib/DecayAnalysis/BabarBDecayAnalysis.h b/Contrib/DecayAnalysis/BabarBDecayAnalysis.h
--- a/Contrib/DecayAnalysis/BabarBDecayAnalysis.h
+++ b/Contrib/DecayAnalysis/BabarBDecayAnalysis.h
@@ -1,116 +1,116 @@
// -*- C++ -*-
#ifndef THEPEG_BabarBDecayAnalysis_H
#define THEPEG_BabarBDecayAnalysis_H
//
// This is the declaration of the BabarBDecayAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Analysis/MultiplicityInfo.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the BabarBDecayAnalysis class.
*
* @see \ref BabarBDecayAnalysisInterfaces "The interfaces"
* defined for BabarBDecayAnalysis.
*/
class BabarBDecayAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Member to find the charmed children of a B meson
*/
void findCharm(tcPPtr,vector<tcPPtr> & charmed);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BabarBDecayAnalysis & operator=(const BabarBDecayAnalysis &);
+ BabarBDecayAnalysis & operator=(const BabarBDecayAnalysis &) = delete;
private:
/**
* Map of PDG codes to multiplicity info
*/
map<long,MultiplicityInfo> _b0data,_bplusdata;
};
}
#endif /* THEPEG_BabarBDecayAnalysis_H */
diff --git a/Contrib/DecayAnalysis/BeamCorrelationAnalysis.h b/Contrib/DecayAnalysis/BeamCorrelationAnalysis.h
--- a/Contrib/DecayAnalysis/BeamCorrelationAnalysis.h
+++ b/Contrib/DecayAnalysis/BeamCorrelationAnalysis.h
@@ -1,117 +1,117 @@
// -*- C++ -*-
#ifndef HERWIG_BeamCorrelationAnalysis_H
#define HERWIG_BeamCorrelationAnalysis_H
//
// This is the declaration of the BeamCorrelationAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* The documentation of the BeamCorrelationAnalysis class
* is designed to plot the angle in the lab frame of an outgoing particle
* w.r.t to an incoming particle to test the spin correlations.
*
* @see \ref BeamCorrelationAnalysisInterfaces "The interfaces"
* defined for BeamCorrelationAnalysis.
*/
class BeamCorrelationAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BeamCorrelationAnalysis & operator=(const BeamCorrelationAnalysis &);
+ BeamCorrelationAnalysis & operator=(const BeamCorrelationAnalysis &) = delete;
private:
/**
* PDG code of the outgoing particle
*/
vector<int> _outgoing;
/**
* PDG code of the incoming particle
*/
vector<int> _incoming;
/**
* Histograms
*/
vector<HistogramPtr> _angle;
};
}
#endif /* HERWIG_BeamCorrelationAnalysis_H */
diff --git a/Contrib/DecayAnalysis/BranchingRatioAnalysis.h b/Contrib/DecayAnalysis/BranchingRatioAnalysis.h
--- a/Contrib/DecayAnalysis/BranchingRatioAnalysis.h
+++ b/Contrib/DecayAnalysis/BranchingRatioAnalysis.h
@@ -1,151 +1,151 @@
// -*- C++ -*-
#ifndef THEPEG_BranchingRatioAnalysis_H
#define THEPEG_BranchingRatioAnalysis_H
//
// This is the declaration of the BranchingRatioAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/PDT/DecayMode.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the BranchingRatioAnalysis class.
*
* @see \ref BranchingRatioAnalysisInterfaces "The interfaces"
* defined for BranchingRatioAnalysis.
*/
class BranchingRatioAnalysis: public AnalysisHandler {
public:
/**
* Constructor
*/
inline BranchingRatioAnalysis() : _total(101,0.) {};
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BranchingRatioAnalysis & operator=(const BranchingRatioAnalysis &);
+ BranchingRatioAnalysis & operator=(const BranchingRatioAnalysis &) = delete;
private:
/**
* The particle for whihc we are performing the analysis
*/
PDPtr _particle;
/**
* The various decay modes
*/
map<tDMPtr,vector<double> > _points;
/**
* Total entry
*/
vector<double> _total;
};
}
#endif /* THEPEG_BranchingRatioAnalysis_H */
diff --git a/Contrib/DecayAnalysis/BtoSGammaAnalysis.h b/Contrib/DecayAnalysis/BtoSGammaAnalysis.h
--- a/Contrib/DecayAnalysis/BtoSGammaAnalysis.h
+++ b/Contrib/DecayAnalysis/BtoSGammaAnalysis.h
@@ -1,127 +1,127 @@
// -*- C++ -*-
#ifndef HERWIG_BtoSGammaAnalysis_H
#define HERWIG_BtoSGammaAnalysis_H
//
// This is the declaration of the BtoSGammaAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the BtoSGammaAnalysis class.
*
* @see \ref BtoSGammaAnalysisInterfaces "The interfaces"
* defined for BtoSGammaAnalysis.
*/
class BtoSGammaAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BtoSGammaAnalysis & operator=(const BtoSGammaAnalysis &);
+ BtoSGammaAnalysis & operator=(const BtoSGammaAnalysis &) = delete;
private:
/**
* Histograms for the hadronic mass
*/
vector<HistogramPtr> _hadmass;
/**
* Histograms for the spectrum
*/
vector<HistogramPtr> _spectrum;
};
}
#endif /* HERWIG_BtoSGammaAnalysis_H */
diff --git a/Contrib/DecayAnalysis/DDalitzAnalysis.h b/Contrib/DecayAnalysis/DDalitzAnalysis.h
--- a/Contrib/DecayAnalysis/DDalitzAnalysis.h
+++ b/Contrib/DecayAnalysis/DDalitzAnalysis.h
@@ -1,303 +1,303 @@
// -*- C++ -*-
#ifndef HERWIG_DDalitzAnalysis_H
#define HERWIG_DDalitzAnalysis_H
//
// This is the declaration of the DDalitzAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
#include "ThePEG/EventRecord/Particle.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the DDalitzAnalysis class.
*
* @see \ref DDalitzAnalysisInterfaces "The interfaces"
* defined for DDalitzAnalysis.
*/
class DDalitzAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Transform the event to the desired Lorentz frame and return the
* corresponding LorentzRotation.
* @param event a pointer to the Event to be transformed.
* @return the LorentzRotation used in the transformation.
*/
virtual LorentzRotation transform(tEventPtr event) const;
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Find the stable decay products
*/
void findChildren(tPPtr,ParticleVector &);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DDalitzAnalysis & operator=(const DDalitzAnalysis &);
+ DDalitzAnalysis & operator=(const DDalitzAnalysis &) = delete;
private:
/**
* Histograms for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
//@{
/**
* \f$m^2_+\f$
*/
HistogramPtr _m2plus1;
/**
* \f$m^2_+\f$
*/
HistogramPtr _m2minus1;
/**
* \f$m^2_{\pi\pi}\f$
*/
HistogramPtr _m2pipi1;
/**
* Vectors for the Dalitz plot
*/
vector<pair<Energy2,Energy2> > _points1;
//@}
/**
* Histograms for \f$D^0\to K^-\pi^+\pi^0\f$
*/
//@{
/**
* Histogram for the \f$K^-\pi^+\f$ mass
*/
HistogramPtr _m2minus2;
/**
* Histogram for the \f$\pi^+\pi^0\f$ mass
*/
HistogramPtr _m2pipi2;
/**
* Histogram for the \f$K^-\pi^0\f$ mass
*/
HistogramPtr _m2neutral2;
/**
* Vectors for the Dalitz plot
*/
vector<pair<Energy2,Energy2> > _points2;
//@}
/**
* Histograms for \f$D^+\to K^-\pi^+\pi^+\f$
*/
//@{
/**
* Histogram for \f$K^-\pi^+\f$ low
*/
HistogramPtr _mKpilow3;
/**
* Histogram for \f$K^-\pi^+\f$ high
*/
HistogramPtr _mKpihigh3;
/**
* Histogram for \f$K^-\pi^+\f$ all
*/
HistogramPtr _mKpiall3;
/**
* Histogram for \f$\pi^+\pi^-\f$
*/
HistogramPtr _mpipi3;
/**
* Vectors for the Dalitz plot
*/
vector<pair<Energy2,Energy2> > _points3;
//@}
/**
* Histograms for \f$D^+\to\bar{K}^0\pi^+\pi^0\f$
*/
//@{
/**
* Histogram for the \f$\bar{K}^0\pi^+\f$ mass
*/
HistogramPtr _m2Kpip4;
/**
* Histogram for the \f$\pi^+\pi^0\f$ mass
*/
HistogramPtr _m2pipi4;
/**
* Histogram for the \f$\bar{K}^0\pi^0\f$ mass
*/
HistogramPtr _m2Kpi04;
/**
* Vectors for the Dalitz plot
*/
vector<pair<Energy2,Energy2> > _points4;
//@}
/**
* Histograms for \f$D^+\to K^+\pi^-\pi^+\f$
*/
//@{
/**
* Histogram for \f$K^+\pi^-\f$
*/
HistogramPtr _mkppim5;
/**
* Histogram for \f$K^+\pi^+\f$
*/
HistogramPtr _mkppip5;
/**
* Histogram for \f$\pi^+\pi^-\f$
*/
HistogramPtr _mpippim5;
/**
* Vectors for the Dalitz plot
*/
vector<pair<Energy2,Energy2> > _points5;
//@}
/**
* Histograms for \f$D_s^+\to K^+\pi^-\pi^+\f$
*/
//@{
/**
* Histogram for \f$K^+\pi^-\f$
*/
HistogramPtr _mkppim6;
/**
* Histogram for \f$K^+\pi^+\f$
*/
HistogramPtr _mkppip6;
/**
* Histogram for \f$\pi^+\pi^-\f$
*/
HistogramPtr _mpippim6;
/**
* Vectors for the Dalitz plot
*/
vector<pair<Energy2,Energy2> > _points6;
//@}
};
}
#endif /* HERWIG_DDalitzAnalysis_H */
diff --git a/Contrib/DecayAnalysis/EtaDecayAnalysis.h b/Contrib/DecayAnalysis/EtaDecayAnalysis.h
--- a/Contrib/DecayAnalysis/EtaDecayAnalysis.h
+++ b/Contrib/DecayAnalysis/EtaDecayAnalysis.h
@@ -1,200 +1,200 @@
// -*- C++ -*-
#ifndef HERWIG_EtaDecayAnalysis_H
#define HERWIG_EtaDecayAnalysis_H
//
// This is the declaration of the EtaDecayAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* The EtaDecayAnalysis class performs the analysis of the decays of
* the \f$\eta\f$ and \f$\eta'\f$ mesons.
*
* @see \ref EtaDecayAnalysisInterfaces "The interfaces"
* defined for EtaDecayAnalysis.
*/
class EtaDecayAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- EtaDecayAnalysis & operator=(const EtaDecayAnalysis &);
+ EtaDecayAnalysis & operator=(const EtaDecayAnalysis &) = delete;
private:
/**
* Histograms for the decay \f$\eta\to\pi^0\gamma\gamma\f$
*/
//@{
/**
* Histogram for the mass of \f$\gamma\gamma\f$
*/
vector<HistogramPtr> _mgammagamma;
/**
* Histogrma for the mass of \f$\pi^0\gamma\f$
*/
vector<HistogramPtr> _mpi0gamma;
//@}
/**
* Histograms for the decay \f$\eta\to\pi^+\pi^-\gamma\f$
*/
//@{
/**
* Histogram for the mass of \f$\pi^+\gamma\f$
*/
vector<HistogramPtr> _mpipgamma;
/**
* Histogram for the mass of \f$\pi^-\gamma\f$
*/
vector<HistogramPtr> _mpimgamma;
/**
* Histogram for the mass of \f$\pi^+\pi^-\f$
*/
vector<HistogramPtr> _mpippim;
/**
* Histogram for the photon energy
*/
vector<HistogramPtr> _photonenergy;
//@}
/**
* Histograms for the decay \f$\eta\pi\pi\pi\f$ and \f$\eta'\to\eta\pi\pi\f$.
*/
//@{
/**
* Histogram for the mass of \f$\pi^+\pi^-\f$
*/
vector<HistogramPtr> _dpippim;
/**
* Histogram for the mass of \f$\pi^0\pi^0\f$
*/
vector<HistogramPtr> _dpi0pi0;
/**
* Histogram for the mass of \f$\pi^0\pi^+\f$
*/
vector<HistogramPtr> _dpi0pip;
/**
* Histogram for the mass of \f$\pi^0\pi^-\f$
*/
vector<HistogramPtr> _dpi0pim;
/**
* Histogram for the mass of \f$\pi^+\eta\f$
*/
vector<HistogramPtr> _dpipeta;
/**
* Histogram for the mass of \f$\pi^-\eta\f$
*/
vector<HistogramPtr> _dpimeta;
/**
* Histogram for the mass of \f$\pi^0\eta\f$
*/
vector<HistogramPtr> _dpi0eta;
//@}
};
}
#endif /* HERWIG_EtaDecayAnalysis_H */
diff --git a/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.h b/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.h
--- a/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.h
+++ b/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.h
@@ -1,171 +1,171 @@
// -*- C++ -*-
#ifndef HERWIG_OmegaPhi3PionAnalysis_H
#define HERWIG_OmegaPhi3PionAnalysis_H
//
// This is the declaration of the OmegaPhi3PionAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the OmegaPhi3PionAnalysis class.
*
* @see \ref OmegaPhi3PionAnalysisInterfaces "The interfaces"
* defined for OmegaPhi3PionAnalysis.
*/
class OmegaPhi3PionAnalysis: public AnalysisHandler {
public:
/**
* Default Constructor
*/
inline OmegaPhi3PionAnalysis() : _nmax(50000) {}
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- OmegaPhi3PionAnalysis & operator=(const OmegaPhi3PionAnalysis &);
+ OmegaPhi3PionAnalysis & operator=(const OmegaPhi3PionAnalysis &) = delete;
private:
/**
* Histogram for the \f$x\f$-values
*/
vector<HistogramPtr> _xhist;
/**
* Histogram for the \f$y\f$-values
*/
vector<HistogramPtr> _yhist;
/**
* Histograms for the masses
*/
//@{
/**
* The mass of the \f$\rho^+\f$
*/
vector<HistogramPtr> _mplus;
/**
* The mass of the \f$\rho^-\f$
*/
vector<HistogramPtr> _mminus;
/**
* The mass of the \f$\rho^0\f$
*/
vector<HistogramPtr> _m0;
//@}
/**
* Vectors to store the \f$x\f$ and\f$y\f$ values for
*/
//@{
/**
* The \f$x\f$ value
*/
vector<vector<Energy> > _xvalue;
/**
* The \f$y\f$ value
*/
vector<vector<Energy> > _yvalue;
//@}
/**
* Maximum number of points for the Dalitz plots
*/
unsigned int _nmax;
};
}
#endif /* HERWIG_OmegaPhi3PionAnalysis_H */
diff --git a/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.h b/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.h
--- a/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.h
+++ b/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.h
@@ -1,135 +1,135 @@
// -*- C++ -*-
#ifndef HERWIG_OniumToOniumPiPiAnalysis_H
#define HERWIG_OniumToOniumPiPiAnalysis_H
//
// This is the declaration of the OniumToOniumPiPiAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Analysis
*
* The OniumToOniumPiPiAnalysis class performs the analysis of the decays
* of bottom and charmonium resonances to lighter resonances and \f$\pi\pi\f$.
*
* @see \ref OniumToOniumPiPiAnalysisInterfaces "The interfaces"
* defined for OniumToOniumPiPiAnalysis.
*/
class OniumToOniumPiPiAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- OniumToOniumPiPiAnalysis & operator=(const OniumToOniumPiPiAnalysis &);
+ OniumToOniumPiPiAnalysis & operator=(const OniumToOniumPiPiAnalysis &) = delete;
private:
/**
* Incoming onium states
*/
vector<long> _incoming;
/**
* Outgoing onium states
*/
vector<long> _outgoing;
/**
* Histograms for the \f$\pi^+\pi^-\f$ masses
*/
vector<pair<HistogramPtr,HistogramPtr> > _mpipi;
/**
* Histmgrams for the helicity angles
*/
vector<pair<HistogramPtr,HistogramPtr> > _hel;
};
}
#endif /* HERWIG_OniumToOniumPiPiAnalysis_H */
diff --git a/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.h b/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.h
--- a/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.h
+++ b/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.h
@@ -1,146 +1,146 @@
// -*- C++ -*-
#ifndef HERWIG_PScalarVectorFermionsAnalysis_H
#define HERWIG_PScalarVectorFermionsAnalysis_H
//
// This is the declaration of the PScalarVectorFermionsAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the PScalarVectorFermionsAnalysis class.
*
* @see \ref PScalarVectorFermionsAnalysisInterfaces "The interfaces"
* defined for PScalarVectorFermionsAnalysis.
*/
class PScalarVectorFermionsAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
inline virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PScalarVectorFermionsAnalysis & operator=(const PScalarVectorFermionsAnalysis &);
+ PScalarVectorFermionsAnalysis & operator=(const PScalarVectorFermionsAnalysis &) = delete;
private:
/**
* PDG codes for the incoming particles
*/
vector<long> _incoming;
/**
* PDG codes for the outgoing vector meson
*/
vector<long> _outgoingV;
/**
* PDG code for the outgoing fermions
*/
vector<int> _outgoingf;
/**
* Histograms for the mass of the fermion-antifermion pair
*/
vector<HistogramPtr> _mffa;
/**
* Histograms for the mass of the fermion-antifermion pair
*/
vector<HistogramPtr> _mffb;
/**
* Histograms for the masses of the vector and the fermion
*/
vector<HistogramPtr> _mVf;
/**
* Histograms for the masses of the vector and the antifermion
*/
vector<HistogramPtr> _mVfbar;
};
}
#endif /* HERWIG_PScalarVectorFermionsAnalysis_H */
diff --git a/Contrib/DecayAnalysis/Pi4ElectronAnalysis.h b/Contrib/DecayAnalysis/Pi4ElectronAnalysis.h
--- a/Contrib/DecayAnalysis/Pi4ElectronAnalysis.h
+++ b/Contrib/DecayAnalysis/Pi4ElectronAnalysis.h
@@ -1,123 +1,123 @@
// -*- C++ -*-
#ifndef HERWIG_Pi4ElectronAnalysis_H
#define HERWIG_Pi4ElectronAnalysis_H
//
// This is the declaration of the Pi4ElectronAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the Pi4ElectronAnalysis class.
*
* @see \ref Pi4ElectronAnalysisInterfaces "The interfaces"
* defined for Pi4ElectronAnalysis.
*/
class Pi4ElectronAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
inline virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
inline virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Pi4ElectronAnalysis & operator=(const Pi4ElectronAnalysis &);
+ Pi4ElectronAnalysis & operator=(const Pi4ElectronAnalysis &) = delete;
private:
/**
* Histogram for the mass distribution
*/
vector<HistogramPtr> _mffbar;
};
}
#endif /* HERWIG_Pi4ElectronAnalysis_H */
diff --git a/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.h b/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.h
--- a/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.h
+++ b/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.h
@@ -1,180 +1,180 @@
// -*- C++ -*-
#ifndef HERWIG_SemiLeptonicDPiAnalysis_H
#define HERWIG_SemiLeptonicDPiAnalysis_H
//
// This is the declaration of the SemiLeptonicDPiAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
#include "ThePEG/EventRecord/Event.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SemiLeptonicDPiAnalysis class.
*
* @see \ref SemiLeptonicDPiAnalysisInterfaces "The interfaces"
* defined for SemiLeptonicDPiAnalysis.
*/
class SemiLeptonicDPiAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Transform the event to the desired Lorentz frame and return the
* corresponding LorentzRotation.
* @param event a pointer to the Event to be transformed.
* @return the LorentzRotation used in the transformation.
*/
virtual LorentzRotation transform(tEventPtr event) const;
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
protected:
/**
* Find the stable decay products
*/
void findChildren(tPPtr,ParticleVector &);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SemiLeptonicDPiAnalysis & operator=(const SemiLeptonicDPiAnalysis &);
+ SemiLeptonicDPiAnalysis & operator=(const SemiLeptonicDPiAnalysis &) = delete;
private:
/**
* The PDG code of the incoming particle
*/
vector<int> _incoming;
/**
* The PDG code of the outgoing D meson
*/
vector<int> _outgoingD;
/**
* The PDG code of the outgoing pion
*/
vector<int> _outgoingP;
/**
* The PDG code of the outgoing lepton
*/
vector<long> _outgoingL;
/**
* The energy of the leptons
*/
vector<HistogramPtr> _energy;
/**
* The mass of the lepton-neutrino pair
*/
vector<HistogramPtr> _scale;
/**
* the mass of the D pi system
*/
vector<HistogramPtr> _mDpi;
};
}
#endif /* HERWIG_SemiLeptonicDPiAnalysis_H */
diff --git a/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.h b/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.h
--- a/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.h
+++ b/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.h
@@ -1,142 +1,142 @@
// -*- C++ -*-
#ifndef HERWIG_SemiLeptonicDecayAnalysis_H
#define HERWIG_SemiLeptonicDecayAnalysis_H
//
// This is the declaration of the SemiLeptonicDecayAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SemiLeptonicDecayAnalysis class.
*
* @see \ref SemiLeptonicDecayAnalysisInterfaces "The interfaces"
* defined for SemiLeptonicDecayAnalysis.
*/
class SemiLeptonicDecayAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SemiLeptonicDecayAnalysis & operator=(const SemiLeptonicDecayAnalysis &);
+ SemiLeptonicDecayAnalysis & operator=(const SemiLeptonicDecayAnalysis &) = delete;
private:
/**
* PDG codes of the decaying mesons
*/
vector<long> _incoming;
/**
* PDG codes of the decay products
*/
vector<long> _outgoing;
/**
* Identidies of the leptons
*/
vector<long> _outgoingL;
/**
* Histograms
*/
//@{
/**
* The lepton energy
*/
vector<HistogramPtr> _energy;
/**
* The \f$q\f$ value
*/
vector<HistogramPtr> _scale;
//@}
};
}
#endif /* HERWIG_SemiLeptonicDecayAnalysis_H */
diff --git a/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.h b/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.h
--- a/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.h
+++ b/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.h
@@ -1,110 +1,110 @@
// -*- C++ -*-
#ifndef HERWIG_Upsilon4SMultiplicityCount_H
#define HERWIG_Upsilon4SMultiplicityCount_H
//
// This is the declaration of the Upsilon4SMultiplicityCount class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Analysis/MultiplicityInfo.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the Upsilon4SMultiplicityCount class.
*
* @see \ref Upsilon4SMultiplicityCountInterfaces "The interfaces"
* defined for Upsilon4SMultiplicityCount.
*/
class Upsilon4SMultiplicityCount: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Upsilon4SMultiplicityCount & operator=(const Upsilon4SMultiplicityCount &);
+ Upsilon4SMultiplicityCount & operator=(const Upsilon4SMultiplicityCount &) = delete;
private:
/**
* Map of PDG codes to multiplicity info
*/
map<long,MultiplicityInfo> _data;
};
}
#endif /* HERWIG_Upsilon4SMultiplicityCount_H */
diff --git a/Contrib/DecayAnalysis/Upsilon4SSpectrumAnalysis.h b/Contrib/DecayAnalysis/Upsilon4SSpectrumAnalysis.h
--- a/Contrib/DecayAnalysis/Upsilon4SSpectrumAnalysis.h
+++ b/Contrib/DecayAnalysis/Upsilon4SSpectrumAnalysis.h
@@ -1,139 +1,139 @@
// -*- C++ -*-
#ifndef HERWIG_Upsilon4SSpectrumAnalysis_H
#define HERWIG_Upsilon4SSpectrumAnalysis_H
//
// This is the declaration of the Upsilon4SSpectrumAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the Upsilon4SSpectrumAnalysis class.
*
* @see \ref Upsilon4SSpectrumAnalysisInterfaces "The interfaces"
* defined for Upsilon4SSpectrumAnalysis.
*/
class Upsilon4SSpectrumAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Upsilon4SSpectrumAnalysis & operator=(const Upsilon4SSpectrumAnalysis &);
+ Upsilon4SSpectrumAnalysis & operator=(const Upsilon4SSpectrumAnalysis &) = delete;
private:
/**
* The \f$\pi^\pm\f$ spectrum without \f$K^0_S\f$ and \f$\Lambda^0\f$ decay products
*/
HistogramPtr _spectrumpipNo;
/**
* The \f$\pi^\pm\f$ spectrum with \f$K^0_S\f$ and \f$\Lambda^0\f$ decay products
*/
HistogramPtr _spectrumpipAll;
/**
* The \f$\pi^0\f$ spectrum
*/
HistogramPtr _spectrumpi0;
/**
* The \f$K^\pm\f$ spectrum
*/
HistogramPtr _spectrumKpA,_spectrumKpB;
/**
* The proton spectrum without \f$\Lambda^0\f$ decay products
*/
HistogramPtr _spectrumprotonNo;
/**
* The proton spectrum with \f$\Lambda^0\f$ decay products
*/
HistogramPtr _spectrumprotonAll;
/**
* \f$K_0^S\f$ spectrum
*/
HistogramPtr _spectrumK0;
};
}
#endif /* HERWIG_Upsilon4SSpectrumAnalysis_H */
diff --git a/Contrib/DecayAnalysis/VPPGammaAnalysis.h b/Contrib/DecayAnalysis/VPPGammaAnalysis.h
--- a/Contrib/DecayAnalysis/VPPGammaAnalysis.h
+++ b/Contrib/DecayAnalysis/VPPGammaAnalysis.h
@@ -1,173 +1,173 @@
// -*- C++ -*-
#ifndef HERWIG_VPPGammaAnalysis_H
#define HERWIG_VPPGammaAnalysis_H
//
// This is the declaration of the VPPGammaAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VPPGammaAnalysis class.
*
* @see \ref VPPGammaAnalysisInterfaces "The interfaces"
* defined for VPPGammaAnalysis.
*/
class VPPGammaAnalysis: public AnalysisHandler {
public:
/**
* The default constructor.
*/
VPPGammaAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VPPGammaAnalysis & operator=(const VPPGammaAnalysis &);
+ VPPGammaAnalysis & operator=(const VPPGammaAnalysis &) = delete;
private:
/**
* id's of the vector mesons to consider
*/
vector<long> _id;
/**
* id's of the outgoing decay products
*/
//@{
/**
* First outgoing particle
*/
vector<long> _outgoing1;
/**
* Second outgoing particle
*/
vector<long> _outgoing2;
//@}
/**
* histogram for the mass
*/
vector<HistogramPtr> _masstotal;
/**
* Histograms for the energies
*/
/**
* Total photon energy
*/
vector<HistogramPtr> _etotal;
/**
* Energy of all the photons
*/
vector<HistogramPtr> _eall;
/**
* Single photon energy
*/
vector<HistogramPtr> _esingle;
//@}
/**
* histograms for the multiplicities
*/
vector<HistogramPtr> _nphoton;
};
}
#endif /* HERWIG_VPPGammaAnalysis_H */
diff --git a/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.h b/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.h
--- a/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.h
+++ b/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
#ifndef HERWIG_VectorPScalarFermionsAnalysis_H
#define HERWIG_VectorPScalarFermionsAnalysis_H
//
// This is the declaration of the VectorPScalarFermionsAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VectorPScalarFermionsAnalysis class.
*
* @see \ref VectorPScalarFermionsAnalysisInterfaces "The interfaces"
* defined for VectorPScalarFermionsAnalysis.
*/
class VectorPScalarFermionsAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VectorPScalarFermionsAnalysis & operator=(const VectorPScalarFermionsAnalysis &);
+ VectorPScalarFermionsAnalysis & operator=(const VectorPScalarFermionsAnalysis &) = delete;
private:
/**
* PDG codes of the incoming particles
*/
vector<long> _incoming;
/**
* PDG codes of the outgoing pseudoscalar mesons
*/
vector<long> _outgoingP;
/**
* PDG codes of the outgoing fermion
*/
vector<long> _outgoingf;
/**
* Histograms for the mass of the fermion-antifermion pair
*/
vector<HistogramPtr> _mffa;
/**
* Histograms for the mass of the fermion-antifermion pair
*/
vector<HistogramPtr> _mffb;
/**
* Histograms for the masses of the pseudoscalar and the fermion
*/
vector<HistogramPtr> _mPf;
/**
* Histograms for the masses of the pseudoscalar and the antifermion
*/
vector<HistogramPtr> _mPfbar;
};
}
#endif /* HERWIG_VectorPScalarFermionsAnalysis_H */
diff --git a/Contrib/DecayAnalysis/VffGammaAnalysis.h b/Contrib/DecayAnalysis/VffGammaAnalysis.h
--- a/Contrib/DecayAnalysis/VffGammaAnalysis.h
+++ b/Contrib/DecayAnalysis/VffGammaAnalysis.h
@@ -1,157 +1,157 @@
// -*- C++ -*-
#ifndef HERWIG_VffGammaAnalysis_H
#define HERWIG_VffGammaAnalysis_H
//
// This is the declaration of the VffGammaAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VffGammaAnalysis class.
*
* @see \ref VffGammaAnalysisInterfaces "The interfaces"
* defined for VffGammaAnalysis.
*/
class VffGammaAnalysis: public AnalysisHandler {
public:
/**
* The default constructor.
*/
VffGammaAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VffGammaAnalysis & operator=(const VffGammaAnalysis &);
+ VffGammaAnalysis & operator=(const VffGammaAnalysis &) = delete;
private:
/**
* id's of the vector mesons to consider
*/
vector<long> _id;
/**
* histogram for the mass
*/
vector<HistogramPtr> _masstotal;
/**
* Histograms for the energies
*/
/**
* Total photon energy
*/
vector<HistogramPtr> _etotal;
/**
* Energy of all the photons
*/
vector<HistogramPtr> _eall;
/**
* Single photon energy
*/
vector<HistogramPtr> _esingle;
//@}
/**
* Histogram for the multiplicities
*/
vector<HistogramPtr> _nphoton;
};
}
#endif /* HERWIG_VffGammaAnalysis_H */
diff --git a/Contrib/DecayAnalysis/ZPhotonsAnalysis.h b/Contrib/DecayAnalysis/ZPhotonsAnalysis.h
--- a/Contrib/DecayAnalysis/ZPhotonsAnalysis.h
+++ b/Contrib/DecayAnalysis/ZPhotonsAnalysis.h
@@ -1,173 +1,173 @@
// -*- C++ -*-
#ifndef HERWIG_ZPhotonsAnalysis_H
#define HERWIG_ZPhotonsAnalysis_H
//
// This is the declaration of the ZPhotonsAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the ZPhotonsAnalysis class.
*
* @see \ref ZPhotonsAnalysisInterfaces "The interfaces"
* defined for ZPhotonsAnalysis.
*/
class ZPhotonsAnalysis: public AnalysisHandler {
public:
/**
* Default constructor
*/
ZPhotonsAnalysis() : _iferm(11) {}
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZPhotonsAnalysis & operator=(const ZPhotonsAnalysis &);
+ ZPhotonsAnalysis & operator=(const ZPhotonsAnalysis &) = delete;
private:
/**
* id of the fermions to look at
*/
int _iferm;
/**
* histogram for the mass
*/
vector<HistogramPtr> _masstotal;
/**
* histogram for the energy
*/
vector<HistogramPtr> _etotal;
/**
* histogram for the mass
*/
vector<HistogramPtr> _mphoton;
/**
* histograms for the energies of different photons
*/
vector<HistogramPtr> _ephoton;
/**
* histograms for the cos thetas of different photons
*/
HistogramPtr _cphoton;
/**
* histogram for the photon multiplicity
*/
HistogramPtr _nphoton;
};
}
#endif /* HERWIG_ZPhotonsAnalysis_H */
diff --git a/Contrib/DecayAnalysis/a1DecayAnalysis.h b/Contrib/DecayAnalysis/a1DecayAnalysis.h
--- a/Contrib/DecayAnalysis/a1DecayAnalysis.h
+++ b/Contrib/DecayAnalysis/a1DecayAnalysis.h
@@ -1,179 +1,179 @@
// -*- C++ -*-
#ifndef HERWIG_a1DecayAnalysis_H
#define HERWIG_a1DecayAnalysis_H
//
// This is the declaration of the a1DecayAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the a1DecayAnalysis class.
*
* @see \ref a1DecayAnalysisInterfaces "The interfaces"
* defined for a1DecayAnalysis.
*/
class a1DecayAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* find the pions produced in the decay
*/
void findPions(tPPtr part,ParticleVector & pions);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- a1DecayAnalysis & operator=(const a1DecayAnalysis &);
+ a1DecayAnalysis & operator=(const a1DecayAnalysis &) = delete;
private:
/**
* Histograms for \f$a_1^0\to\pi^0\pi^0\pi^0\f$
*/
HistogramPtr _hist0;
/**
* Histograms for \f$a_1^+\to\pi^0\pi^0\pi^+\f$
*/
//@{
/**
* Mass of the \f$\pi^0\pi^0\f$ pair
*/
HistogramPtr _hist1A;
/**
* Mass of the \f$\pi^0\pi^+\f$ pair
*/
HistogramPtr _hist1B;
//@}
/**
* Histograms for \f$a_1^0\to\pi^+\pi^-\pi^0\f$
*/
//@{
/**
* Mass of the \f$\pi^+\pi^-\f$ pair
*/
HistogramPtr _hist2A;
/**
* Mass of the \f$\pi^+\pi^0\f$ pair
*/
HistogramPtr _hist2B;
/**
* Mass of the \f$\pi^-\pi^0\f$ pair
*/
HistogramPtr _hist2C;
//@}
/**
* Histograms for \f$a_1^+\to\pi^+\pi^+\pi^-\f$
*/
//@{
/**
* Mass of the \f$\pi^+\pi^+\f$ pair
*/
HistogramPtr _hist3A;
/**
* Mass of the \f$\pi^+\pi^-\f$ pair
*/
HistogramPtr _hist3B;
//@}
};
}
#endif /* HERWIG_a1DecayAnalysis_H */
diff --git a/Contrib/FxFx/FxFxAnalysis.h b/Contrib/FxFx/FxFxAnalysis.h
--- a/Contrib/FxFx/FxFxAnalysis.h
+++ b/Contrib/FxFx/FxFxAnalysis.h
@@ -1,262 +1,262 @@
// -*- C++ -*-
#ifndef THEPEG_FxFxAnalysis_H
#define THEPEG_FxFxAnalysis_H
//
// This is the declaration of the FxFxAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Rivet/AnalysisHandler.hh"
#include "FxFxReader.h"
#include "FxFxEventHandler.h"
namespace ThePEG {
/**
* Here is the documentation of the FxFxAnalysis class.
*
* @see \ref FxFxAnalysisInterfaces "The interfaces"
* defined for FxFxAnalysis.
*/
class FxFxAnalysis: public ThePEG::AnalysisHandler {
public:
/**
* The default constructor.
*/
FxFxAnalysis();
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(ThePEG::tEventPtr event, long ieve, int loop, int state);
/**
* Produca a HepMC event for the given subprocess
*/
HepMC::GenEvent * makeEvent(tEventPtr event, tSubProPtr sub, long no,
Energy eUnit, Length lUnit,
CrossSection xsec, CrossSection xsecErr) const;
/**
* Produca a HepMC event for the given subprocess
*/
HepMC::GenEvent * makeEventW(tEventPtr event, tSubProPtr sub, long no,
Energy eUnit, Length lUnit,
CrossSection xsec, CrossSection xsecErr, double evoptweight, double centralweight) const;
int _i;
int _numweights;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(ThePEG::PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(ThePEG::PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual ThePEG::IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual ThePEG::IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the read phase.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ThePEG::ClassDescription<FxFxAnalysis> initFxFxAnalysis;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FxFxAnalysis & operator=(const FxFxAnalysis &);
+ FxFxAnalysis & operator=(const FxFxAnalysis &) = delete;
private:
/**
* The PDG ID to be used for remnants
*/
long _remnantId;
/**
* The HepMC format
*/
int _format;
/**
* Selector for the choice of units
*/
int _unitchoice;
/**
* Choice of output precision in GenEvent format
*/
unsigned int _geneventPrecision;
/**
* The Analyses to use
*/
vector<string> _analyses;
/**
* The base name of the output file.
*/
string filename;
/**
* Enable debugging information from FxFx
*/
bool debug;
/**
* Enable use of optional weights in analysis
*/
bool useoptweights = false;
/**
* normalize optional weights to the central weight
*/
bool normoptweights = false;
/**
* The FxFxAnalysisHandler
*/
Rivet::AnalysisHandler * _rivet;
/**
* The FxFxAnalysisHandlers for multiple weights
*/
Rivet::AnalysisHandler * _rivetMULTI[120];
/**
* holders of weights and cross section
*/
std::vector< std::pair<int,double> > OptWeights;
std::vector<double> OptXS;
map<string,CrossSection> optxsec;
/**
* Event count
*/
unsigned long _nevent;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FxFxAnalysis. */
template <>
struct BaseClassTrait<FxFxAnalysis,1> {
/** Typedef of the first base class of FxFxAnalysis. */
typedef AnalysisHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FxFxAnalysis class and the shared object where it is defined. */
template <>
struct ClassTraits<FxFxAnalysis>
: public ClassTraitsBase<FxFxAnalysis> {
/** Return a platform-independent class name */
static string className() { return "ThePEG::FxFxAnalysis"; }
/**
* The name of a file containing the dynamic library where the class
* FxFxAnalysis is implemented. It may also include several, space-separated,
* libraries if the class FxFxAnalysis depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "FxFxAnalysis.so"; }
};
/** @endcond */
}
#endif /* THEPEG_FxFxAnalysis_H */
diff --git a/Contrib/FxFx/FxFxEventHandler.h b/Contrib/FxFx/FxFxEventHandler.h
--- a/Contrib/FxFx/FxFxEventHandler.h
+++ b/Contrib/FxFx/FxFxEventHandler.h
@@ -1,448 +1,448 @@
// -*- C++ -*-
//
// FxFxEventHandler.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_FxFxEventHandler_H
#define THEPEG_FxFxEventHandler_H
//
// This is the declaration of the FxFxEventHandler class.
//
#include "ThePEG/Handlers/EventHandler.h"
#include "FxFxEventHandler.fh"
#include "FxFxReader.fh"
#include "FxFxAnalysis.h"
#include "ThePEG/Utilities/CompSelector.h"
#include "ThePEG/Utilities/XSecStat.h"
namespace ThePEG {
/**
* The FxFxEventHandler inherits from the general EventHandler
* class and administers the reading of events generated by external
* matrix element generator programs according to the Les Houches
* accord.
*
* The class has a list of <code>FxFxReader</code>s which
* typically are connected to files with event data produced by
* external matrix element generator programs. When an event is
* requested by FxFxEventHandler, one of the readers are chosen,
* an event is read in and then passed to the different
* <code>StepHandler</code> defined in the underlying
* EventHandler class.
*
* @see \ref FxFxEventHandlerInterfaces "The interfaces"
* defined for FxFxEventHandler.
*/
class FxFxEventHandler: public EventHandler {
public:
/**
* A vector of FxFxReader objects.
*/
typedef vector<FxFxReaderPtr> ReaderVector;
/**
* A selector of readers.
*/
typedef CompSelector<int,CrossSection> ReaderSelector;
/**
* Enumerate the weighting options.
*/
enum WeightOpt {
unitweight = 1, /**< All events have unit weight. */
unitnegweight = -1, /**< All events have wight +/- 1. */
varweight = 2, /**< Varying positive weights. */
varnegweight = -2 /**< Varying positive or negative weights. */
};
friend class FxFxHandler;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FxFxEventHandler()
: theWeightOption(unitweight), theUnitTolerance(1.0e-6), warnPNum(true), theNormWeight(0)
{
selector().tolerance(unitTolerance());
}
/**
* The destructor.
*/
virtual ~FxFxEventHandler();
//@}
public:
/** @name Initialization and finalization functions. */
//@{
/**
* Initialize this event handler and all related objects needed to
* generate events.
*/
virtual void initialize();
/**
* Write out accumulated statistics about intergrated cross sections
* and stuff.
*/
virtual void statistics(ostream &) const;
/**
* Histogram scale. A histogram bin which has been filled with the
* weights associated with the Event objects should be scaled by
* this factor to give the correct cross section.
*/
virtual CrossSection histogramScale() const;
/**
* The estimated total integrated cross section of the processes
* generated in this run.
* @return 0 if no integrated cross section could be estimated.
*/
virtual CrossSection integratedXSec() const;
virtual int ntriesinternal() const;
/**
* The estimated error in the total integrated cross section of the
* processes generated in this run.
* @return 0 if no integrated cross section error could be estimated.
*/
virtual CrossSection integratedXSecErr() const;
virtual map<string,CrossSection> optintegratedXSecMap() const;
//@}
/** @name Functions used for the actual generation */
//@{
/**
* Generate an event.
*/
virtual EventPtr generateEvent();
/**
* Create the Event and Collision objects. Used by the
* generateEvent() function.
*/
virtual tCollPtr performCollision();
/**
* Continue generating an event if the generation has been stopped
* before finishing.
*/
virtual EventPtr continueEvent();
//@}
/** @name Functions to manipulate statistics. */
//@{
/**
* An event has been selected. Signal that an event has been
* selected with the given \a weight. If unit weights are requested,
* the event will be accepted with that weight. This also takes care
* of the statistics collection of the selected reader object.
*/
void select(double weight);
/**
* Accept the current event, taking care of the statistics
* collection of the corresponding reader objects.
*/
void accept();
/**
* Reject the current event, taking care of the statistics
* collection of the corresponding reader objects.
*/
void reject(double weight);
/**
* Increase the overestimated cross section for the selected reader.
*/
void increaseMaxXSec(CrossSection maxxsec);
/**
* Skip some events. To ensure a reader file is scanned an even
* number of times, skip a number of events for the selected reader.
*/
void skipEvents();
//@}
/** @name Simple access functions. */
//@{
/**
* The way weights are to be treated.
*/
WeightOpt weightOption() const { return theWeightOption; }
/**
* If the weight option is set to unit weight, do not start
* compensating unless the weight is this much larger than unity.
*/
double unitTolerance() const { return theUnitTolerance; }
/**
* Access the list of readers.
*/
const ReaderVector & readers() const { return theReaders; }
/**
* The selector to choose readers according to their overestimated
* cross section.
*/
const ReaderSelector & selector() const { return theSelector; }
/**
* The currently selected reader object.
*/
tFxFxReaderPtr currentReader() const { return theCurrentReader; }
/**
* Set the currently selected reader object.
*/
void currentReader(tFxFxReaderPtr x) { theCurrentReader = x; }
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* The currently selected reader object.
*/
tFxFxReaderPtr theCurrentReader;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
protected:
/**
* Access the list of readers.
*/
ReaderVector & readers() { return theReaders; }
/**
* The selector to choose readers according to their overestimated
* cross section.
*/
ReaderSelector & selector() { return theSelector; }
/**
* Helper function for the interface;
*/
void setUnitTolerance(double);
/**
* Collect statistics for this event handler.
*/
XSecStat stats;
map<string,XSecStat> optstats;
map<string,CrossSection> optxs;
int ntries;
map<string,XSecStat> OptStatsFunc() { return optstats; }
map<string,CrossSection> OptXsFunc() { return optxs; }
/**
* Collect statistics for this event handler. To be used for
* histogram scaling.
*/
XSecStat histStats;
map<string,XSecStat> opthistStats;
/*
* The weight identifiers for the events
*/
vector<string> weightnames;
private:
/**
* The list of readers.
*/
ReaderVector theReaders;
/**
* The selector to choose readers according to their overestimated
* cross section.
*/
ReaderSelector theSelector;
/**
* The way weights are to be treated.
*/
WeightOpt theWeightOption;
/**
* If the weight option is set to unit weight, do not start
* compensating unless the weight is this much larger than unity.
*/
double theUnitTolerance;
/**
* Warn if the same process number is used in more than one
* FxFxReader.
*/
bool warnPNum;
/**
* How to normalize the weights
*/
unsigned int theNormWeight;
public:
/** @cond EXCEPTIONCLASSES */
/**
* Exception class used if no readers were assigned.
*/
class FxFxInitError: public InitException {};
/**
* Exception class used if the same process number is used by more
* than ne reader.
*/
class FxFxPNumException: public InitException {};
/** @endcond */
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FxFxEventHandler> initFxFxEventHandler;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FxFxEventHandler & operator=(const FxFxEventHandler &);
+ FxFxEventHandler & operator=(const FxFxEventHandler &) = delete;
};
}
// CLASSDOC OFF
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FxFxEventHandler. */
template <>
struct BaseClassTrait<FxFxEventHandler,1> {
/** Typedef of the first base class of FxFxEventHandler. */
typedef EventHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FxFxEventHandler class and the shared object where it is defined. */
template <>
struct ClassTraits<FxFxEventHandler>
: public ClassTraitsBase<FxFxEventHandler> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FxFxEventHandler"; }
/** Return the name of the shared library be loaded to get access to
* the FxFxEventHandler class and every other class it uses
* (except the base class). */
static string library() { return "FxFx.so"; }
};
/** @endcond */
}
#endif /* THEPEG_FxFxEventHandler_H */
diff --git a/Contrib/FxFx/FxFxFileReader.h b/Contrib/FxFx/FxFxFileReader.h
--- a/Contrib/FxFx/FxFxFileReader.h
+++ b/Contrib/FxFx/FxFxFileReader.h
@@ -1,333 +1,333 @@
// -*- C++ -*-
//
// FxFxFileReader.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_FxFxFileReader_H
#define THEPEG_FxFxFileReader_H
// This is the declaration of the FxFxFileReader class.
#include "FxFxReader.h"
#include "FxFxFileReader.fh"
#include "ThePEG/PDT/Decayer.h"
#include "ThePEG/Utilities/CFileLineReader.h"
#include <stdio.h>
namespace ThePEG {
/**
* FxFxFileReader is an base class to be used for objects which
* reads event files from matrix element generators. It inherits from
* FxFxReader and extends it by defining a file handle to be
* read from, which is opened and closed by the open() and close()
* functions. Note that the file handle is a standard C filehandle and
* not a C++ stream. This is because there is no standard way in C++
* to connect a pipe to a stream for reading eg. gzipped files. This
* class is able to read plain event files conforming to the Les
* Houches Event File accord.
*
* @see \ref FxFxFileReaderInterfaces "The interfaces"
* defined for FxFxFileReader.
* @see Event
* @see FxFxReader
*/
class FxFxFileReader: public FxFxReader {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
FxFxFileReader() : neve(0), ieve(0), theQNumbers(false), theIncludeFxFxTags(true),
theIncludeCentral(false) {}
/**
* Copy-constructor. Note that a file which is opened in the object
* copied from will have to be reopened in this.
*/
FxFxFileReader(const FxFxFileReader &);
/**
* Destructor.
*/
virtual ~FxFxFileReader();
//@}
public:
/** @name Virtual functions specified by the FxFxReader base class. */
//@{
/**
* Initialize. This function is called by the FxFxEventHandler
* to which this object is assigned.
*/
virtual void initialize(FxFxEventHandler & eh);
/**
* Open a file with events. Derived classes should overwrite it and
* first calling it before reading in the run information into the
* corresponding protected variables.
*/
virtual void open();
/**
* Close the file from which events have been read.
*/
virtual void close();
/**
* Read the next event from the file or stream into the
* corresponding protected variables. Return false if there is no
* more events or if this was not a LHF event file.
*/
virtual bool doReadEvent();
//@}
/**
* Return the name of the file from where to read events.
*/
string filename() const { return theFileName; }
/* vector<string> optionalWeightsNames;
virtual vector<string> optWeightNamesFunc();*/
virtual vector<string> optWeightsNamesFunc();
/**
* Erases all occurences of a substring from a string
*/
void erase_substr(std::string& subject, const std::string& search);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
/** @name Standard (and non-standard) Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Return true if this object needs to be initialized before all
* other objects because it needs to extract PDFs from the event file.
*/
virtual bool preInitialize() const;
//@
protected:
/**
* The wrapper around the C FILE stream from which to read
*/
CFileLineReader cfile;
protected:
/**
* The number of events in this file.
*/
long neve;
/**
* The current event number.
*/
long ieve;
/**
* If the file is a standard Les Houches formatted file (LHF) this
* is its version number. If empty, this is not a Les Houches
* formatted file
*/
string LHFVersion;
/**
* If LHF. All lines (since the last open() or readEvent()) outside
* the header, init and event tags.
*/
string outsideBlock;
/**
* If LHF. All lines from the header block.
*/
string headerBlock;
/**
* If LHF. Additional comments found in the init block.
*/
string initComments;
/**
* If LHF. Map of attributes (name-value pairs) found in the init
* tag.
*/
map<string,string> initAttributes;
/**
* If LHF. Additional comments found with the last read event.
*/
string eventComments;
/**
* If LHF. Map of attributes (name-value pairs) found in the last
* event tag.
*/
map<string,string> eventAttributes;
private:
/**
* The name of the file from where to read events.
*/
string theFileName;
/**
* Whether or not to search for QNUMBERS stuff
*/
bool theQNumbers;
/**
* Include/Read FxFx tags
*/
bool theIncludeFxFxTags;
/**
* Include central weight (for backup use)
*/
bool theIncludeCentral;
/**
* Decayer for any decay modes read from the file
*/
DecayerPtr theDecayer;
/**
* Further information on the weights
*/
map<string,string> scalemap;
/**
* Temporary holder for optional weights
*/
map<string,double> optionalWeightsTemp;
private:
/**
* Describe an abstract base class with persistent data.
*/
static ClassDescription<FxFxFileReader> initFxFxFileReader;
/**
* Private and non-existent assignment operator.
*/
- FxFxFileReader & operator=(const FxFxFileReader &);
+ FxFxFileReader & operator=(const FxFxFileReader &) = delete;
public:
/** @cond EXCEPTIONCLASSES */
/** Exception class used by FxFxFileReader if reading the file
* fails. */
class FxFxFileError: public Exception {};
/** @endcond */
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/**
* This template specialization informs ThePEG about the
* base class of FxFxFileReader.
*/
template <>
struct BaseClassTrait<FxFxFileReader,1>: public ClassTraitsType {
/** Typedef of the base class of FxFxFileReader. */
typedef FxFxReader NthBase;
};
/**
* This template specialization informs ThePEG about the name of the
* FxFxFileReader class and the shared object where it is
* defined.
*/
template <>
struct ClassTraits<FxFxFileReader>
: public ClassTraitsBase<FxFxFileReader> {
/**
* Return the class name.
*/
static string className() { return "Herwig::FxFxFileReader"; }
/**
* Return the name of the shared library to be loaded to get access
* to the FxFxFileReader class and every other class it uses
* (except the base class).
*/
static string library() { return "FxFx.so"; }
};
/** @endcond */
}
#endif /* THEPEG_FxFxFileReader_H */
diff --git a/Contrib/FxFx/FxFxHandler.h b/Contrib/FxFx/FxFxHandler.h
--- a/Contrib/FxFx/FxFxHandler.h
+++ b/Contrib/FxFx/FxFxHandler.h
@@ -1,640 +1,640 @@
// -*- C++ -*-
#ifndef HERWIG_FxFxHandler_H
#define HERWIG_FxFxHandler_H
//
// This is the declaration of the FxFxHandler class.
//
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include "Herwig/Shower/ShowerHandler.h"
#include "ThePEG/Config/Pointers.h"
#include "Herwig/Shower/ShowerAlpha.h"
#include "fastjet/PseudoJet.hh"
#include "fastjet/ClusterSequence.hh"
#include "ThePEG/Utilities/CompSelector.h"
#include "ThePEG/Utilities/XSecStat.h"
namespace Herwig {
class FxFxHandler;
}
//declaration of thepeg ptr
namespace ThePEG {
ThePEG_DECLARE_POINTERS(Herwig::FxFxHandler,FxFxHandlerPtr);
}
namespace Herwig {
using namespace ThePEG;
typedef vector< string > split_vector_type;
/**
* Here is the documentation of the FxFxHandler class.
*
* @see \ref FxFxHandlerInterfaces "The interfaces"
* defined for FxFxHandler.
*/
class FxFxHandler: public QTildeShowerHandler {
/**
* FxFxHandler should have access to our private parts.
*/
friend class FxFxEventHandler;
friend class FxFxReader;
public:
/**
* The default constructor.
*/
FxFxHandler();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize the object
*/
virtual void dofinish();
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
public:
/**
* Hook to allow vetoing of event after showering hard sub-process
* as in e.g. MLM merging.
*/
virtual bool showerHardProcessVeto() const;
/**
* information for FxFx merging
*/
mutable int npLO_;
mutable int npNLO_;
/**
* information for tree-level merging
*/
mutable vector<double> ptclust_;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/*
* whether a heavy quark has been found in the merging
*/
mutable bool hvqfound = false;
/*
* Run MLM jet-parton matching on the 'extra' jets.
*/
bool lightJetPartonVeto();
/*
* Function that calculates deltaR between a parton and a jet
*/
double partonJetDeltaR(ThePEG::tPPtr partonptr, LorentzMomentum jetmom) const;
/*
* Function that calculates deltaR between two jets
*/
double partonJetDeltaR(LorentzMomentum jetmom1, LorentzMomentum jetmom2) const;
/**
* Find jets using the FastJet package on particlesToCluster_.
*/
void getFastJets(double rjet, Energy ejcut, double etajcut) const;
/**
* Find jets using the FastJet package on particlesToCluster_.
*/
void getFastJetsToMatch(double rjet, Energy ejcut, double etajcut) const;
/**
* Deletes particles from partonsToMatch_ and particlesToCluster_
* vectors so that these contain only the partons to match to the
* jets and the particles used to build jets respectively. By and
* large the candidates for deletion are: vector bosons and their
* decay products, Higgs bosons, photons as well as _primary_, i.e.
* present in the lowest multiplicity process, heavy quarks and
* any related decay products.
*/
void caldel_m() const;
/**
* Deletes particles from partonsToMatch_ and particlesToCluster_
* vectors so that these contain only the partons to match to the
* jets and the particles used to build jets respectively. The candidates
* are chosen according to the information passed from madgraph.
*/
void caldel_mg() const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Label all particles with status between ISTLO and ISTHI
* (until a particle with status ISTOP is found) as final-state,
* call calsim_m and then put labels back to normal. This
* version keeps only all IST=1 particles rejected by caldel as
* daughters of vetoed heavy-quark mothers: jets complementary
* to those reconstructed by caldel.
*/
void caldel_hvq() const;
/**
* get the MG5_aMC information required for FxFx merging
*/
void getnpFxFx() const;
/**
* get the MG5_aMC information required for FxFx merging
*/
void getECOM() const;
/**
* get the MG5_aMC information required for tree-level merging
*/
void getptclust() const;
/**
* Erases all occurences of a substring from a string
*/
void erase_substr(std::string& subject, const std::string& search) const;
/**
* Get the particles from lastXCombPtr filling the pair
* preshowerISPs_ and particle pointer vector preshowerFSPs_.
*/
void getPreshowerParticles() const;
/**
* Get the particles from eventHandler()->currentEvent()->...
* filling the particle pairs showeredISHs_, showeredISPs_,
* showeredRems_ and the particle pointer vector showeredFSPs_.
*/
void getShoweredParticles() const;
/**
* Allows printing of debug output and sanity checks like
* total momentum consrvation to be carried out.
* debugLevel = -1, 0, ...5
* = no debugging, minimal debugging, ... verbose.
*/
void doSanityChecks(int debugLevel) const;
/**
* Given a pointer to a particle this finds all its final state
* descendents.
*/
void getDescendents(PPtr theParticle) const;
/**
* Accumulates all descendents of tops down to the b and W
* but not including them.
*/
void getTopRadiation(PPtr theParticle) const;
/**
* Sorts a given vector of particles by descending pT or ETJET
*/
ParticleVector pTsort(ParticleVector unsortedVec);
pair< vector<Energy>, vector<Lorentz5Momentum> > ETsort(vector<Energy> unsortedetjet, vector<Lorentz5Momentum> unsortedVec);
/*
* A function that prints a vector of Lorentz5Momenta in a fancy way
*/
void printMomVec(vector<Lorentz5Momentum> momVec);
/*
* A probability function for varying etclus_ about the mean value
*/
Energy etclusran_(double petc) const;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FxFxHandler> initFxFxHandler;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FxFxHandler & operator=(const FxFxHandler &);
+ FxFxHandler & operator=(const FxFxHandler &) = delete;
private:
/**
* Initial-state incoming partons prior to showering
* (i.e. from lastXCombPtr).
*/
mutable PPair preshowerISPs_;
/**
* Final-state outgoing partICLEs prior to showering
* (i.e. from lastXCombPtr).
*/
mutable ParticleVector preshowerFSPs_;
/**
* Final-state outgoing partICLEs prior to showering _to_be_removed_
* from preShowerFSPs_ prior to the light-parton-light-jet matching
* step. This same list is the starting point for determining
* partonsToMatch_ for the case of merging in heavy quark production.
*/
mutable ParticleVector preshowerFSPsToDelete_;
/**
* Initial-state incoming hadrons after shower of hard process
* (eventHandler()->currentEvent()->incoming()).
*/
mutable PPair showeredISHs_;
/**
* Initial-state incoming partons after shower of hard process
* (look for partonic children of showeredISHs_).
*/
mutable PPair showeredISPs_;
/**
* Final-state outgoing partICLEs after shower of hard process
* (eventHandler()->currentEvent()->getFinalState()).
*/
mutable tPVector showeredFSPs_;
/**
* Final-state outgoing partICLEs after shower of hard process
* _to_be_removed_ from showeredFSPs_ prior to the
* light-parton-light-jet matching step. This same list is the
* starting point for determining particlesToCluster_ for the
* case of merging in heavy quark production.
*/
mutable ParticleVector showeredFSPsToDelete_;
/**
* ONLY the final-state partons from preshowerFSPs_ that are
* supposed to enter the jet-parton matching.
*/
mutable ParticleVector partonsToMatch_;
/*
* The shower progenitors
*/
mutable PPtr theProgenitor;
mutable PPtr theLastProgenitor;
/**
* ONLY the final-state particles from showeredFSPs_ (and maybe
* also showeredRems_) that are supposed to go for jet clustering.
*/
mutable tPVector particlesToCluster_;
/**
* Final-state remnants after shower of hard process
* (look for remnants initially in showeredFSPs_).
*/
mutable PPair showeredRems_;
/**
* the COM of the incoming hadrons
*/
mutable double ECOM_;
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr alphaS_;
/**
* Information extracted from the XComb object
*/
//@{
/**
* The fixed factorization scale used in the MEs.
*/
Energy pdfScale_;
/**
* Centre of mass energy
*/
Energy2 sHat_;
/**
* Constant alphaS used to generate LH events - if not already
* using CKKW scale (ickkw = 1 in AlpGen for example).
*/
double alphaSME_;
//@}
/*
* Number of rapidity segments of the calorimeter.
*/
unsigned int ncy_;
/*
* Number of phi segments of the calorimeter.
*/
unsigned int ncphi_;
/*
* Heavy flavour in WQQ,ZQQ,2Q etc (4=c, 5=b, 6=t).
*/
int ihvy_;
/*
* Number of photons in the AlpGen process.
*/
int nph_;
/*
* Number of higgses in the AlpGen process.
*/
int nh_;
/*
* Jet ET cut to apply in jet clustering (in merging).
*/
mutable Energy etclus_;
/*
* Mean Jet ET cut to apply in jet clustering (in merging).
*/
Energy etclusmean_;
/*
* maximum deviation from mean Jet ET cut to apply in jet clustering (in merging).
*/
Energy epsetclus_;
/*
* Cone size used in jet clustering (in merging).
*/
double rclus_;
/*
* Max |eta| for jets in clustering (in merging).
*/
double etaclmax_;
/*
* Default 1.5 factor used to decide if a jet matches a parton
* in merging: if DR(parton,jet)<rclusfactor*rclus the parton
* and jet are said to have been matched.
*/
double rclusfactor_;
/*
* Determines whether to detect the hard process or to manually determine which particles
* to include in the merging. If False, then the ihrd code below is used.
*/
bool hpdetect_;
/*
* The AlpGen hard process code. Relation to the AlpGen process names:
* 1: wqq, 2: zqq, 3: wjet, 4: zjet, 5: vbjet, 6: 2Q, 8: QQh, 9: Njet,
* 10: wcjet, 11: phjet, 12: hjet, 13: top, 14: wphjet, 15: wphqq,
* 16: 2Qph.
*/
int ihrd_;
/*
* The number of light jets in the AlpGen process (i.e. the 'extra' ones).
*/
int njets_;
/*
* Mimimum parton-parton R-sep used for generation (used for hvq merging).
*/
double drjmin_;
/*
* This flags that the highest multiplicity ME-level process is
* being processed.
*/
mutable bool highestMultiplicity_;
/*
* This flags whether the etclus_ (merging scale) should be fixed or variable according to a prob. distribution around the mean
*/
bool etclusfixed_;
/*
* The forwards rapidity span of the calorimeter.
*/
double ycmax_;
/*
* The backwards rapidity span of the calorimeter.
*/
double ycmin_;
/*
* The jet algorithm used for parton-jet matching in the MLM procedure.
*/
int jetAlgorithm_;
/*
* The merging mode (FxFx vs tree-level) used.
*/
int mergemode_;
/*
* Allows the vetoing to be turned off completely - just for convenience.
*/
bool vetoIsTurnedOff_;
/*
* Allows the vetoing on heavy quark decay products to be turned off.
*/
bool vetoHeavyQ_;
/*
* Allows vetoing of heavy flavour
*/
bool vetoHeavyFlavour_;
/*
* Veto if there exist softer unmatched jets than matched
*/
bool vetoSoftThanMatched_;
/*
* Cosine of phi values of calorimeter cell centres.
* Goes phi~=0 to phi~=2*pi (index = 0 ---> ncphi).
* ==> Cosine goes from +1 ---> +1 (index = 0 ---> ncphi).
*/
vector<double> cphcal_;
/*
* Sine of phi values of calorimeter cell centres.
* Goes phi~=0 to phi~=2*pi (index = 0 ---> ncphi).
* ==> Sine goes 0 -> 1 -> 0 -> -1 -> 0 (index = 0 ---> ncphi).
*/
vector<double> sphcal_;
/*
* Cosine of theta values of calorimeter cell centres in Y.
* Goes bwds th~=pi to fwds th~=0 (index = 0 ---> ncy).
* ==> Cosine goes from -1 ---> +1 (index = 0 ---> ncy).
*/
vector<double> cthcal_;
/*
* Sine of theta values of calorimeter cell centres in Y.
* Goes bwds th~=pi to fwds th~=0 (index = 0 ---> ncy).
* ==> Sine goes from 0 ---> +1 ---> 0 (index = 0 ---> ncy).
*/
vector<double> sthcal_;
/*
* Transverse energy deposit in a given calorimeter cell.
* First array index corresponds to rapidity index of cell,
* second array index corresponds to phi cell index.
*/
vector<vector<Energy> > et_;
/*
* For a given calorimeter cell this holds the index of the jet
* that the cell was clustered into.
*/
vector<vector<int> > jetIdx_;
/*
* Vector holding the Lorentz 5 momenta of each jet.
*/
mutable vector<Lorentz5Momentum> pjet_;
/*
* Vector holding the Lorentz 5 momenta of each jet from ME partons
*/
mutable vector<Lorentz5Momentum> pjetME_;
/*
* Vector holding the list of FS particles resulting from
* the particle input to getDescendents.
*/
mutable ParticleVector tmpList_;
/*
* Variables for the C++ translation of the calini_m(), calsim_m(),
* getjet_m(...) and caldel_m() functions
*/
mutable vector<Energy> etjet_;
vector<Energy> etjetME_;
mutable double dely_, delphi_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FxFxHandler. */
template <>
struct BaseClassTrait<Herwig::FxFxHandler,1> {
/** Typedef of the first base class of FxFxHandler. */
typedef Herwig::QTildeShowerHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FxFxHandler class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FxFxHandler>
: public ClassTraitsBase<Herwig::FxFxHandler> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FxFxHandler"; }
/**
* The name of a file containing the dynamic library where the class
* FxFxHandler is implemented. It may also include several, space-separated,
* libraries if the class FxFxHandler depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "FxFxHandler.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FxFxHandler_H */
diff --git a/Contrib/FxFx/FxFxLHReader.h b/Contrib/FxFx/FxFxLHReader.h
--- a/Contrib/FxFx/FxFxLHReader.h
+++ b/Contrib/FxFx/FxFxLHReader.h
@@ -1,333 +1,333 @@
// -*- C++ -*-
//
// FxFxLHReader.h is a part of Herwig - A multi-purpose
// Monte Carlo event generator.
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FxFxLHReader class.
//
#ifndef HERWIG_FxFxLHReader_H
#define HERWIG_FxFxLHReader_H
// This is the declaration of the FxFxLHReader class.
#include "ThePEG/LesHouches/LesHouchesReader.h"
#include "FxFxLHReader.fh"
#include "ThePEG/PDT/Decayer.h"
#include "ThePEG/Utilities/CFileLineReader.h"
#include <stdio.h>
namespace Herwig {
using namespace ThePEG;
/**
* FxFxLHReader derives from the LesHouchesReader base class
* to be used for objects which read event files from matrix element
* generators. It extends LesHouchesReader by defining a file handle to be
* read from, which is opened and closed by the open() and close()
* functions. Note that the file handle is a standard C filehandle and
* not a C++ stream. This is because there is no standard way in C++
* to connect a pipe to a stream for reading eg. gzipped files. This
* class is able to read plain event files conforming to the Les
* Houches Event File accord.
*
* @see \ref FxFxLHReaderInterfaces "The interfaces"
* defined for FxFxLHReader.
* @see LesHouchesReader
* @see FxFxLHReader
*/
class FxFxLHReader: public LesHouchesReader {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
FxFxLHReader() : neve(0), ieve(0) {}
/**
* Copy-constructor. Note that a file which is opened in the object
* copied from will have to be reopened in this.
*/
FxFxLHReader(const FxFxLHReader &);
/**
* Destructor.
*/
virtual ~FxFxLHReader();
//@}
public:
/** @name Virtual functions specified by the LesHouchesReader base class. */
//@{
/**
* Initialize. This function is called by the LesHouchesEventHandler
* to which this object is assigned.
*/
virtual void initialize(LesHouchesEventHandler & eh);
/**
* Calls readEvent() or uncacheEvent() to read information into the
* LesHouches common block variables. This function is called by the
* LesHouchesEventHandler if this reader has been selectod to
* produce an event.
*
* @return the weight asociated with this event. If negative weights
* are allowed it should be between -1 and 1, otherwise between 0
* and 1. If outside these limits the previously estimated maximum
* is violated. Note that the estimated maximum then should be
* updated from the outside.
*/
virtual double getEvent();
/**
* Calls doReadEvent() and performs pre-defined reweightings. A
* sub-class overrides this function it must make sure that the
* corresponding reweightings are done.
*/
virtual bool readEvent();
/**
* Skip \a n events. Used by LesHouchesEventHandler to make sure
* that a file is scanned an even number of times in case the events
* are not ramdomly distributed in the file.
*/
virtual void skip(long n);
/**
* Scan the file or stream to obtain information about cross section
* weights and particles etc. This function should fill the
* variables corresponding to the /HEPRUP/ common block. The
* function returns the number of events scanned.
*/
virtual long scan();
/**
* Open a file with events. Derived classes should overwrite it and
* first calling it before reading in the run information into the
* corresponding protected variables.
*/
virtual void open();
/**
* Close the file from which events have been read.
*/
virtual void close();
/**
* Read the next event from the file or stream into the
* corresponding protected variables. Return false if there is no
* more events or if this was not a LHF event file.
*/
virtual bool doReadEvent();
//@}
/**
* Return the name of the file from where to read events.
*/
string filename() const { return theFileName; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
/** @name Standard (and non-standard) Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Return true if this object needs to be initialized before all
* other objects because it needs to extract PDFs from the event file.
*/
virtual bool preInitialize() const;
//@
protected:
/**
* The wrapper around the C FILE stream from which to read
*/
CFileLineReader cfile;
protected:
/**
* The number of events in this file.
*/
long neve;
/**
* The current event number.
*/
long ieve;
/**
* If the file is a standard Les Houches formatted file (LHF) this
* is its version number. If empty, this is not a Les Houches
* formatted file
*/
string LHFVersion;
/**
* If LHF. All lines (since the last open() or readEvent()) outside
* the header, init and event tags.
*/
string outsideBlock;
/**
* If LHF. All lines from the header block.
*/
string headerBlock;
/**
* If LHF. Additional comments found in the init block.
*/
string initComments;
/**
* If LHF. Map of attributes (name-value pairs) found in the init
* tag.
*/
map<string,string> initAttributes;
/**
* If LHF. Additional comments found with the last read event.
*/
string eventComments;
/**
* If LHF. Map of attributes (name-value pairs) found in the last
* event tag.
*/
map<string,string> eventAttributes;
private:
/**
* The name of the file from where to read events.
*/
string theFileName;
/**
* Determines whether events in the LH file are or are not read
* more than once in order to generate the requested number of
* events.
*/
bool overSampling_;
private:
/**
* Describe an abstract base class with persistent data.
*/
static ClassDescription<FxFxLHReader> initFxFxLHReader;
/**
* Private and non-existent assignment operator.
*/
- FxFxLHReader & operator=(const FxFxLHReader &);
+ FxFxLHReader & operator=(const FxFxLHReader &) = delete;
public:
/** @cond EXCEPTIONCLASSES */
/** Exception class used by FxFxLHReader if reading the file
* fails. */
class LesHouchesFileError: public Exception {};
/** @endcond */
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/**
* This template specialization informs ThePEG about the
* base class of FxFxLHReader.
*/
template <>
struct BaseClassTrait<Herwig::FxFxLHReader,1> {
/** Typedef of the base class of FxFxLHReader. */
typedef LesHouchesReader NthBase;
};
/**
* This template specialization informs ThePEG about the name of the
* FxFxLHReader class and the shared object where it is
* defined.
*/
template <>
struct ClassTraits<Herwig::FxFxLHReader>
: public ClassTraitsBase<Herwig::FxFxLHReader> {
/**
* Return the class name.
*/
static string className() { return "Herwig::FxFxLHReader"; }
/**
* Return the name of the shared library to be loaded to get access
* to the FxFxLHReader class and every other class it uses
* (except the base class).
*/
static string library() { return "FxFxLHReader.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FxFxLHReader_H */
diff --git a/Contrib/FxFx/FxFxReader.h b/Contrib/FxFx/FxFxReader.h
--- a/Contrib/FxFx/FxFxReader.h
+++ b/Contrib/FxFx/FxFxReader.h
@@ -1,1006 +1,1006 @@
// -*- C++ -*-
//
// FxFxReader.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_FxFxReader_H
#define THEPEG_FxFxReader_H
// This is the declaration of the FxFxReader class.
#include "FxFx.h"
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Utilities/ObjectIndexer.h"
#include "ThePEG/Utilities/Exception.h"
#include "ThePEG/Utilities/XSecStat.h"
#include "ThePEG/PDF/PartonBinInstance.h"
#include "ThePEG/PDF/PartonBin.fh"
#include "ThePEG/MatrixElement/ReweightBase.h"
#include "FxFxEventHandler.fh"
#include "FxFxReader.fh"
#include "ThePEG/Utilities/CFile.h"
#include <cstdio>
#include <cstring>
namespace ThePEG {
/**
* FxFxReader is an abstract base class to be used for objects
* which reads event files or streams from matrix element
* generators. Derived classes must at least implement the open() and
* doReadEvent() methods to read in information about the whole run into
* the HEPRUP variable and next event into the HEPEUP variable
* respectively. Also the close() function to close the file or stream
* read must be implemented. Although these functions are named as if
* we are reading from event files, they could just as well implement
* the actual generation of events.
*
* After filling the HEPRUP and HEPEUP variables, which are protected
* and easily accesible from the sub-class, this base class will then
* be responsible for transforming this data to the ThePEG Event
* record in the getEvent() method. <code>FxFxReader</code>s can
* only be used inside FxFxEventHandler objects.
*
* In the initialization the virtual open() and scan() functions are
* called. Here the derived class must provide the information about
* the processes in the variables corresponding to the HEPRUP common
* block. Note that the IDWTUP is required to be +/- 1, and sub
* classes are required to change the information accordingly to
* ensure the correct corss section sampling. Note also that the
* controlling FxFxEventHandler may choose to generate weighted
* events even if IDWTUP is 1.
*
* Note that the information given per process in e.g. the XSECUP and
* XMAXUP vectors is not used by the FxFxEventHandler and by
* default the FxFxReader is not assumed to be able to actively
* choose between the sub-processes. Instead, the
* FxFxEventHandler can handle several FxFxReader objects
* and choose between them. However, a sub-class of FxFxReader
* may set the flag isActive, in which case it is assumed to be able
* to select between its sub-processes itself.
*
* The FxFxReader may be assigned a number ReweightBase objects
* which either completely reweights the events produced (in the
* reweights vector), or only biases the selection without influencing
* the cross section (in the preweights vector). Note that it is the
* responsibility of a sub-class to call the reweight() function and
* multiply the weight according to its return value (typically done
* in the readEvent() function).
*
* @see \ref FxFxReaderInterfaces "The interfaces"
* defined for FxFxReader.
* @see Event
* @see FxFxEventHandler
*/
class FxFxReader: public HandlerBase, public LastXCombInfo<> {
/**
* FxFxEventHandler should have access to our private parts.
*/
friend class FxFxEventHandler;
/**
* Map for accumulating statistics of cross sections per process
* number.
*/
typedef map<int,XSecStat> StatMap;
/**
* Map of XComb objects describing the incoming partons indexed by
* the corresponding PartonBin pair.
*/
typedef map<tcPBPair,XCombPtr> XCombMap;
/**
* A vector of pointers to ReweightBase objects.
*/
typedef vector<ReweightPtr> ReweightVector;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor. If the optional argument is true, the reader
* is assumed to be able to produce events on demand for a given
* process.
*/
FxFxReader(bool active = false);
/**
* Copy-constructor.
*/
FxFxReader(const FxFxReader &);
/**
* Destructor.
*/
virtual ~FxFxReader();
//@}
public:
/** @name Main virtual fuctions to be overridden in
* sub-classes. They are named as if we are reading from event
* files, but could equally well implement the actual generation of
* events. */
//@{
/**
* Open a file or stream with events and read in the run information
* into the heprup variable.
*/
virtual void open() = 0;
/**
* Read the next event from the file or stream into the
* corresponding protected variables. Return false if there is no
* more events.
*/
virtual bool doReadEvent() = 0;
/**
* Close the file or stream from which events have been read.
*/
virtual void close() = 0;
/**
* return the weight names
*/
// virtual vector<string> optWeightsNamesFunc();
virtual vector<string> optWeightsNamesFunc() = 0;
//virtual vector<string*> optWeightNamesFunc() = 0;
vector<string> optionalWeightsNames;
/**
* The ID (e.g. 100x, 2001) for the weight
*/
// vector<string> optionalWeightsNames;
//@}
/** @name Other important function which may be overridden in
* sub-classes which wants to bypass the basic HEPRUP or HEPEUP
* variables or otherwise facilitate the conversion to ThePEG
* objects. */
//@{
/**
* Initialize. This function is called by the FxFxEventHandler
* to which this object is assigned.
*/
virtual void initialize(FxFxEventHandler & eh);
/**
* Calls readEvent() or uncacheEvent() to read information into the
* FxFx common block variables. This function is called by the
* FxFxEventHandler if this reader has been selectod to
* produce an event.
*
* @return the weight asociated with this event. If negative weights
* are allowed it should be between -1 and 1, otherwise between 0
* and 1. If outside these limits the previously estimated maximum
* is violated. Note that the estimated maximum then should be
* updated from the outside.
*/
virtual double getEvent();
/**
* Calls doReadEvent() and performs pre-defined reweightings. A
* sub-class overrides this function it must make sure that the
* corresponding reweightings are done.
*/
virtual bool readEvent();
/**
* Skip \a n events. Used by FxFxEventHandler to make sure
* that a file is scanned an even number of times in case the events
* are not ramdomly distributed in the file.
*/
virtual void skip(long n);
/**
* Get an XComb object. Converts the information in the Les Houches
* common block variables to an XComb object describing the sub
* process. This is the way information is conveyed from the reader
* to the controlling FxFxEventHandler.
*/
tXCombPtr getXComb();
/**
* Get a SubProcess object corresponding to the information in the
* Les Houches common block variables.
*/
tSubProPtr getSubProcess();
/**
* Scan the file or stream to obtain information about cross section
* weights and particles etc. This function should fill the
* variables corresponding to the /HEPRUP/ common block. The
* function returns the number of events scanned.
*/
virtual long scan();
/**
* Take the information corresponding to the HEPRUP common block and
* initialize the statistics for this reader.
*/
virtual void initStat();
/**
* Reweights the current event using the reweights and preweights
* vectors. It is the responsibility of the sub-class to call this
* function after the HEPEUP information has been retrieved.
*/
double reweight();
/**
* Converts the information in the Les Houches common block
* variables into a Particle objects.
*/
virtual void fillEvent();
/**
* Removes the particles created in the last generated event,
* preparing to produce a new one.
*/
void reset();
/**
* Possibility for subclasses to recover from non-conformant
* settings of XMAXUP when an event file has been scanned with \a
* neve events. Should set weightScale so that the average XMAXUP
* times weightScale gives the cross section for a process. (This is
* needed for MadEvent).
*/
virtual void setWeightScale(long neve);
//@}
/** @name Access information about the current event. */
//@{
/**
* Return the size of this event in bytes. To be used for the cache
* file. \a npart is the number of particles. If \a npart is 0, the
* number is taken from NUP.
*/
static size_t eventSize(int N) {
return (N + 1)*sizeof(int) + // IDPRUP, ISTUP
(7*N + 4)*sizeof(double) + // XWGTUP, SCALUP, AQEDUP, AQCDUP, PUP,
// VTIMUP, SPINUP
N*sizeof(long) + // IDUP
2*N*sizeof(pair<int,int>) + // MOTHUP, ICOLUP
sizeof(pair<double,double>) + // XPDWUP.
2*sizeof(double); // lastweight and preweight
}
/**
* The current event weight given by XWGTUP times possible
* reweighting. Note that this is not necessarily the same as what
* is returned by getEvent(), which is scaled with the maximum
* weight.
*/
double eventWeight() const { return hepeup.XWGTUP*lastweight; }
/**
* Return the optional named weights associated to the current event.
*/
const map<string,double>& optionalEventWeights() const { return optionalWeights; }
/**
* Return the optional npLO and npNLO
*/
const int& optionalEventnpLO() const { return optionalnpLO; }
const int& optionalEventnpNLO() const { return optionalnpNLO; }
/**
* The pair of PartonBinInstance objects describing the current
* incoming partons in the event.
*/
const PBIPair & partonBinInstances() const { return thePartonBinInstances; }
/**
* Return the instances of the beam particles for the current event.
*/
const PPair & beams() const { return theBeams; }
/**
* Return the instances of the incoming particles to the sub process
* for the current event.
*/
const PPair & incoming() const { return theIncoming; }
/**
* Return the instances of the outgoing particles from the sub process
* for the current event.
*/
const PVector & outgoing() const { return theOutgoing; }
/**
* Return the instances of the intermediate particles in the sub
* process for the current event.
*/
const PVector & intermediates() const { return theIntermediates; }
/**
* If this reader is to be used (possibly together with others) for
* CKKW reweighting and veto, this should give the multiplicity of
* outgoing particles in the highest multiplicity matrix element in
* the group.
*/
int maxMultCKKW() const { return theMaxMultCKKW; }
/**
* If this reader is to be used (possibly together with others) for
* CKKW reweighting and veto, this should give the multiplicity of
* outgoing particles in the lowest multiplicity matrix element in
* the group.
*/
int minMultCKKW() const { return theMinMultCKKW; } //@}
/** @name Other inlined access functions. */
//@{
/**
* The number of events found in this reader. If less than zero the
* number of events are unlimited.
*/
long NEvents() const { return theNEvents; }
/**
* The number of events produced so far. Is reset to zero if an
* event file is reopened.
*/
long currentPosition() const { return position; }
/**
* The maximum number of events to scan to collect information about
* processes and cross sections. If less than 0, all events will be
* scanned.
*/
long maxScan() const { return theMaxScan; }
/**
* Return true if this reader is active.
*/
bool active() const { return isActive; }
/**
* True if negative weights may be produced.
*/
bool negativeWeights() const { return heprup.IDWTUP < 0; }
/**
* The collected cross section statistics for this reader.
*/
const XSecStat & xSecStats() const { return stats; }
/**
* Collected statistics about the individual processes.
*/
const StatMap & processStats() const { return statmap; }
/**
* Select the current event. It will later be rejected with a
* probability given by \a weight.
*/
void select(double weight) {
stats.select(weight);
statmap[hepeup.IDPRUP].select(weight);
}
/**
* Accept the current event assuming it was previously selcted.
*/
void accept() {
stats.accept();
statmap[hepeup.IDPRUP].accept();
}
/**
* Reject the current event assuming it was previously accepted.
*/
void reject(double w) {
stats.reject(w);
statmap[hepeup.IDPRUP].reject(w);
}
/**
* Increase the overestimated cross section for this reader.
*/
virtual void increaseMaxXSec(CrossSection maxxsec);
/**
* The PartonExtractor object used to construct remnants.
*/
tPExtrPtr partonExtractor() const { return thePartonExtractor; }
/**
* Return a possibly null pointer to a CascadeHandler to be used for
* CKKW-reweighting.
*/
tCascHdlPtr CKKWHandler() const { return theCKKW; }
/**
* The pairs of PartonBin objects describing the partons which can
* be extracted by the PartonExtractor object.
*/
const PartonPairVec & partonBins() const { return thePartonBins; }
/**
* The map of XComb objects indexed by the corresponding PartonBin
* pair.
*/
const XCombMap & xCombs() const { return theXCombs; }
/**
* The Cuts object to be used for this reader.
*/
const Cuts & cuts() const { return *theCuts; }
//@}
protected:
/** @name Functions for manipulating cache files. */
//@{
/**
* Name of file used to cache the events form the reader in a
* fast-readable form. If empty, no cache file will be generated.
*/
string cacheFileName() const { return theCacheFileName; }
/**
* Determines whether to apply cuts to events converting them to
* ThePEG format.
*/
bool cutEarly() const { return doCutEarly; }
/**
* File stream for the cache.
*/
CFile cacheFile() const { return theCacheFile;}
/**
* Open the cache file for reading.
*/
void openReadCacheFile();
/**
* Open the cache file for writing.
*/
void openWriteCacheFile();
/**
* Close the cache file;
*/
void closeCacheFile();
/**
* Write the current event to the cache file.
*/
void cacheEvent() const;
/**
* Read an event from the cache file. Return false if something went wrong.
*/
bool uncacheEvent();
/**
* Reopen a reader. If we have reached the end of an event file,
* reopen it and issue a warning if we have used up a large fraction
* of it.
*/
void reopen();
/**
* Helper function to write a variable to a memory location
*/
template <typename T>
static char * mwrite(char * pos, const T & t, size_t n = 1) {
std::memcpy(pos, &t, n*sizeof(T));
return pos + n*sizeof(T);
}
/**
* Helper function to read a variable from a memory location
*/
template <typename T>
static const char * mread(const char * pos, T & t, size_t n = 1) {
std::memcpy(&t, pos, n*sizeof(T));
return pos + n*sizeof(T);
}
//@}
/** @name Auxilliary virtual methods which may be verridden by sub-classes. */
//@{
/**
* Check the existence of a pair of PartonBin objects corresponding
* to the current event.
*
* @return false if no pair of suitable PartonBin objects was found.
*/
virtual bool checkPartonBin();
/**
* Create instances of all particles in the event and store them
* in particleIndex.
*/
virtual void createParticles();
/**
* Using the already created particles create a pair of
* PartonBinInstance objects corresponding to the incoming
* partons. Return the corresponding PartonBin objects.
*/
virtual tcPBPair createPartonBinInstances();
/**
* Create instances of the incoming beams in the event and store
* them in particleIndex. If no beam particles are included in the
* event they are created from the run info.
*/
virtual void createBeams();
/**
* Go through the mother indices and connect up the Particles.
*/
virtual void connectMothers();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Set functions for some variables not in the Les Houches accord. */
//@{
/**
* The number of events in this reader. If less than zero the number
* of events is unlimited.
*/
void NEvents(long x) { theNEvents = x; }
/**
* The map of XComb objects indexed by the corresponding PartonBin
* pair.
*/
XCombMap & xCombs() { return theXCombs; }
//@}
/** @name Standard (and non-standard) Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish() {
close();
HandlerBase::dofinish();
}
/**
* Return true if this object needs to be initialized before all
* other objects because it needs to extract PDFs from the event file.
*/
virtual bool preInitialize() const;
/**
* Called from doinit() to extract PDFs from the event file and add
* the corresponding objects to the current EventGenerator.
*/
virtual void initPDFs();
//@}
protected:
/**
* The HEPRUP common block.
*/
HEPRUP heprup;
/**
* The HEPEUP common block.
*/
HEPEUP hepeup;
/**
* The ParticleData objects corresponding to the incoming particles.
*/
tcPDPair inData;
/**
* The PDFBase objects which has been used for the beam particle
* when generating the events being read. Specified in the interface
* or derived from PDFGUP and PDFSUP.
*/
pair<PDFPtr,PDFPtr> inPDF;
/**
* The PDFBase object to be used in the subsequent generation.
*/
pair<cPDFPtr,cPDFPtr> outPDF;
/**
* The PartonExtractor object used to construct remnants.
*/
PExtrPtr thePartonExtractor;
/**
* A pointer to a CascadeHandler to be used for CKKW-reweighting.
*/
tCascHdlPtr theCKKW;
/**
* The pairs of PartonBin objects describing the partons which can
* be extracted by the PartonExtractor object.
*/
PartonPairVec thePartonBins;
/**
* The map of XComb objects indexed by the corresponding PartonBin
* pair.
*/
XCombMap theXCombs;
/**
* The Cuts object to be used for this reader.
*/
CutsPtr theCuts;
/**
* The number of events in this reader. If less than zero the number
* of events is unlimited.
*/
long theNEvents;
/**
* The number of events produced by this reader so far. Is reset
* every time an event file is reopened.
*/
long position;
/**
* The number of times this reader has been reopened.
*/
int reopened;
/**
* The maximum number of events to scan to collect information about
* processes and cross sections. If less than 0, all events will be
* scanned.
*/
long theMaxScan;
/**
* Flag to tell whether we are in the process of scanning.
*/
bool scanning;
/**
* True if this is an active reader.
*/
bool isActive;
/**
* Name of file used to cache the events form the reader in a
* fast-readable form. If empty, no cache file will be generated.
*/
string theCacheFileName;
/**
* Determines whether to apply cuts to events before converting them
* to ThePEG format.
*/
bool doCutEarly;
/**
* Collect statistics for this reader.
*/
XSecStat stats;
/**
* Collect statistics for each individual process.
*/
StatMap statmap;
/**
* The pair of PartonBinInstance objects describing the current
* incoming partons in the event.
*/
PBIPair thePartonBinInstances;
/**
* Association between ColourLines and colour indices in the current
* translation.
*/
ObjectIndexer<long,ColourLine> colourIndex;
/**
* Association between Particles and indices in the current
* translation.
*/
ObjectIndexer<long,Particle> particleIndex;
/**
* The instances of the beam particles for the current event.
*/
PPair theBeams;
/**
* The instances of the incoming particles to the sub process for
* the current event.
*/
PPair theIncoming;
/**
* The instances of the outgoing particles from the sub process for
* the current event.
*/
PVector theOutgoing;
/**
* The instances of the intermediate particles in the sub process for
* the current event.
*/
PVector theIntermediates;
/**
* File stream for the cache.
*/
CFile theCacheFile;
/**
* The reweight objects modifying the weights of this reader.
*/
ReweightVector reweights;
/**
* The preweight objects modifying the weights of this reader.
*/
ReweightVector preweights;
/**
* The factor with which this reader was last pre-weighted.
*/
double preweight;
/**
* Should the event be reweighted by PDFs used by the PartonExtractor?
*/
bool reweightPDF;
/**
* Should PDFBase objects be constructed from the information in the
* event file in the initialization?
*/
bool doInitPDFs;
/**
* If this reader is to be used (possibly together with others) for
* CKKW reweighting and veto, this should give the multiplicity of
* outgoing particles in the highest multiplicity matrix element in
* the group.
*/
int theMaxMultCKKW;
/**
* If this reader is to be used (possibly together with others) for
* CKKW reweighting and veto, this should give the multiplicity of
* outgoing particles in the lowest multiplicity matrix element in
* the group.
*/
int theMinMultCKKW;
/**
* The weight multiplying the last read event due to PDF
* reweighting, CKKW reweighting or assigned reweight and preweight
* objects.
*/
double lastweight;
/**
* The optional weights associated to the last read events.
*/
map<string,double> optionalWeights;
/**
* npLO for FxFx merging
*/
int optionalnpLO;
/**
* npNLO for FxFx merging
*/
int optionalnpNLO;
/**
* If the maximum cross section of this reader has been increased
* with increaseMaxXSec(), this is the total factor with which it
* has been increased.
*/
double maxFactor;
/**
* The (reweighted) XWGTUP value should be scaled with this cross
* section when compared to the overestimated cross section.
*/
CrossSection weightScale;
/**
* Individual scales for different sub-processes if reweighted.
*/
vector<double> xSecWeights;
/**
* Individual maximum weights for individual (possibly reweighted)
* processes.
*/
map<int,double> maxWeights;
/**
* Is set to true when getEvent() is called from skip(int).
*/
bool skipping;
/**
* Option for the treatment of the momenta supplied
*/
unsigned int theMomentumTreatment;
/**
* Set to true if warnings about possible weight incompatibilities
* should be issued.
*/
bool useWeightWarnings;
/**
* Option to allow reopening of the file
*/
bool theReOpenAllowed;
/**
* Use the spin information
*/
bool theIncludeSpin;
private:
/** Access function for the interface. */
void setBeamA(long id);
/** Access function for the interface. */
long getBeamA() const;
/** Access function for the interface. */
void setBeamB(long id);
/** Access function for the interface. */
long getBeamB() const;
/** Access function for the interface. */
void setEBeamA(Energy e);
/** Access function for the interface. */
Energy getEBeamA() const;
/** Access function for the interface. */
void setEBeamB(Energy e);
/** Access function for the interface. */
Energy getEBeamB() const;
/** Access function for the interface. */
void setPDFA(PDFPtr);
/** Access function for the interface. */
PDFPtr getPDFA() const;
/** Access function for the interface. */
void setPDFB(PDFPtr);
/** Access function for the interface. */
PDFPtr getPDFB() const;
private:
/**
* Describe an abstract base class with persistent data.
*/
static AbstractClassDescription<FxFxReader> initFxFxReader;
/**
* Private and non-existent assignment operator.
*/
- FxFxReader & operator=(const FxFxReader &);
+ FxFxReader & operator=(const FxFxReader &) = delete;
public:
/** @cond EXCEPTIONCLASSES */
/** Exception class used by FxFxReader in case inconsistencies
* are encountered. */
class FxFxInconsistencyError: public Exception {};
/** Exception class used by FxFxReader in case more events
than available are requested. */
class FxFxReopenWarning: public Exception {};
/** Exception class used by FxFxReader in case reopening an
event file fails. */
class FxFxReopenError: public Exception {};
/** Exception class used by FxFxReader in case there is
information missing in the initialization phase. */
class FxFxInitError: public InitException {};
/** @endcond */
};
/// Stream output for HEPEUP
ostream & operator<<(ostream & os, const HEPEUP & h);
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/**
* This template specialization informs ThePEG about the
* base class of FxFxReader.
*/
template <>
struct BaseClassTrait<FxFxReader,1>: public ClassTraitsType {
/** Typedef of the base class of FxFxReader. */
typedef HandlerBase NthBase;
};
/**
* This template specialization informs ThePEG about the name of the
* FxFxReader class and the shared object where it is
* defined.
*/
template <>
struct ClassTraits<FxFxReader>
: public ClassTraitsBase<FxFxReader> {
/**
* Return the class name.
*/
static string className() { return "Herwig::FxFxReader"; }
/**
* Return the name of the shared library to be loaded to get access
* to the FxFxReader class and every other class it uses
* (except the base class).
*/
static string library() { return "FxFx.so"; }
};
/** @endcond */
}
#endif /* THEPEG_FxFxReader_H */
diff --git a/Contrib/HiggsPair/MEHiggsPair.h b/Contrib/HiggsPair/MEHiggsPair.h
--- a/Contrib/HiggsPair/MEHiggsPair.h
+++ b/Contrib/HiggsPair/MEHiggsPair.h
@@ -1,507 +1,507 @@
// -*- C++ -*-
//
// MEHiggsPair.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2009-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEHiggsPair_H
#define HERWIG_MEHiggsPair_H
//
// This is the declaration of the MEHiggsPair class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Repository/UseRandom.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
/*
* Interface to external FORTRAN hpair functions (T.Plehn, M.Spira & P.Zerwas, arXiv:hep-ph/9603205)
* original Program found at http://people.web.psi.ch/spira/hpair/
*/
extern "C" {
complex<double> eta_(complex<double>* C1, complex<double>* C2);
complex<double> d04_(double* P1, double* P2, double* P3, double* P4, double* P12,double* P23, double* M1, double* M2, double* M3, double* M4);
complex<double> c03_(double* P1,double* P2,double* P3,double* M1,double* M2,double* M3);
complex<double> cspen_(double* Z);
complex<double> sqe_(double* A, double* B, double* C);
complex<double> etas_(complex<double>*Y,complex<double>* R,complex<double>*RS);
void formfac_(double* AMQ, double* S, double* T, double* U, double* M1, double* M2, complex<double>* C0AB,complex<double>* C0AC,complex<double>* C0AD,complex<double>* C0BC,complex<double>* C0BD,complex<double>* C0CD,complex<double>* D0ABC,complex<double>* D0BAC,complex<double>* D0ACB);
}
extern "C" {
extern struct{
complex<double> A1;
complex<double> A2;
complex<double> H1;
complex<double> H2;
complex<double> Z1;
complex<double> Z2;
complex<double> AA1;
complex<double> AA2;
complex<double> HH1;
complex<double> HH2;
complex<double> AH1;
complex<double> AH2;
} form_;
}
/**
* The MEHiggsPair class implements the matrix elements for
* HiggsPairian \f$2\to2\f$ scattering process
*/
class MEHiggsPair: public HwMEBase {
public:
/**
* The default constructor.
*/
MEHiggsPair();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const { return 0; }
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const { return 0; }
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Generate internal degrees of freedom
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/*
* Fix alphaS
*/
unsigned int fixedalphaS() const { return _fixedalphaS; }
/*
* Fixed alphaS value if AlphaS is chosen (option 2 above)
*/
double alphasfixedvalue() const { return _alphasfixedvalue; }
/**
* Return multiplier for scale
*/
double scalemultiplier() const {return _scalemultiplier;}
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans);
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
/**
* Access to the higgs data
*/
PDPtr higgs() const { return _higgs; }
/**
* Set the higgs data
*/
void higgs(PDPtr in) {_higgs =in;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Helper functions for me2. */
//@{
/**
*/
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<MEHiggsPair> initMEHiggsPair;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEHiggsPair & operator=(const MEHiggsPair &);
+ MEHiggsPair & operator=(const MEHiggsPair &) = delete;
/**
* The higgs boson
*/
PDPtr _higgs;
/*
* The W mass
*/
Energy _Wmass;
/*
* The top mass
*/
Energy _topmass;
/*
* The bottom mass
*/
Energy _bottommass;
/*
* The Z boson mass
*/
Energy _zmass;
/*
* Higgs boson mass(es)
*/
Energy _m1, _m2;
/*
* Heavy H mass
*/
Energy _heavyHmass;
/*
* Heavy H width
*/
Energy _heavyHwidth;
/*
* top yukawa multiplier, Heavy
*/
double _yH;
/*
* top yukawa multiplier, light
*/
double _yh;
/*
* bottom yukawa multiplier, Heavy
*/
double _ybH;
/*
* bottom yukawa multiplier, light
*/
double _ybh;
private:
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr _hmass;
/**
* multiplier for the SM triple-coupling
*/
double _selfcoupling;
/**
* multiplier for the hhH triple-coupling
*/
double _hhHcoupling;
/**
* Processes to include
*/
unsigned int _process;
/*
* Fix alphaS
*/
unsigned int _fixedalphaS;
/*
* Scale to use for alpha_S if fixed
*/
Energy _alphascale;
/*
* Value of AlphaS if fixed using option 2 above
*/
double _alphasfixedvalue;
/*
* Base scale to use if chosen to be fixed
*/
Energy _basescale;
/*
* scale multiplier
*/
double _scalemultiplier;
/*
* Fix scale of whole process
*/
unsigned int _fixedscale;
/**
* On-shell mass for the higgs
*/
Energy _mh;
/**
* On-shell width for the higgs
*/
Energy _wh;
/**
* On-shell mass for the W
*/
Energy _mW;
/*
* _cH, effective theory coefficient
*/
double _cH;
/* _c6, effective theory coefficient
*
*/
double _c6;
/*
* _cg1, effective theory coefficient
*/
double _cg1;
/* _cg2, effective theory coefficient
*
*/
double _cg2;
/*
* _ct1, effective theory coefficient
*/
double _ct1;
/*
* _ct2, effective theory coefficient
*/
double _ct2;
/* _ct2, effective theory coefficient
*
*/
double _cb1;
/* f_b2, effective theory coefficient
*
*/
double _cb2;
/* effective theory scale
*
*/
Energy _EFTScale;
/* Scalar integral initialization from hpair.f (T.Plehn, M.Spira & P.Zerwas, arXiv:hep-ph/9603205)
Program found at http://people.web.psi.ch/spira/hpair/ */
virtual vector<Complex> iniscal(double AMQ, double S, double T,double U, double M1, double M2) const;
/* Matrix element calculation from hpair */
virtual double MATRIX(double S, double T,double U, double M1, double M2) const;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of MEHiggsPair. */
template <>
struct BaseClassTrait<Herwig::MEHiggsPair,1> {
/** Typedef of the first base class of MEHiggsPair. */
typedef Herwig::HwMEBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the MEHiggsPair class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::MEHiggsPair>
: public ClassTraitsBase<Herwig::MEHiggsPair> {
/** Return a platform-independent class name */
static string className() { return "Herwig::MEHiggsPair"; }
/**
* The name of a file containing the dynamic library where the class
* MEHiggsPair is implemented. It may also include several, space-separated,
* libraries if the class MEQCD2to2Fast depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "MEHiggsPair.so"; }
};
/** @endcond */
}
#endif /* HERWIG_MEHiggsPair_H */
diff --git a/Contrib/HiggsPairOL/AlpGenHandlerOL.h b/Contrib/HiggsPairOL/AlpGenHandlerOL.h
--- a/Contrib/HiggsPairOL/AlpGenHandlerOL.h
+++ b/Contrib/HiggsPairOL/AlpGenHandlerOL.h
@@ -1,587 +1,587 @@
// -*- C++ -*-
#ifndef HERWIG_AlpGenHandlerOL_H
#define HERWIG_AlpGenHandlerOL_H
//
// This is the declaration of the AlpGenHandlerOL class.
//
#include "Herwig/Shower/ShowerHandler.h"
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include "ThePEG/Config/Pointers.h"
#include "Herwig/Shower/ShowerAlpha.h"
#include "fastjet/PseudoJet.hh"
#include "fastjet/ClusterSequence.hh"
#include "HiggsPair.h"
namespace Herwig {
class AlpGenHandlerOL;
}
//declaration of thepeg ptr
namespace ThePEG {
ThePEG_DECLARE_POINTERS(Herwig::AlpGenHandlerOL,AlpGenHandlerOLPtr);
}
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the AlpGenHandlerOL class.
*
* @see \ref AlpGenHandlerOLInterfaces "The interfaces"
* defined for AlpGenHandlerOL.
*/
class AlpGenHandlerOL: public QTildeShowerHandler {
public:
/**
* The default constructor.
*/
AlpGenHandlerOL();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize the object
*/
virtual void dofinish();
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
public:
/**
* Hook to allow vetoing of event after showering hard sub-process
* as in e.g. MLM merging.
*/
virtual bool showerHardProcessVeto() const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/*
* Run MLM jet-parton matching on the 'extra' jets.
*/
bool lightJetPartonVeto();
/*
* Function that calculates deltaR between a parton and a jet
*/
double partonJetDeltaR(ThePEG::tPPtr partonptr, LorentzMomentum jetmom) const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Initialize calorimeter for calsim_m and getjet_m. Note that
* because initialization is separte calsim_m can be called more
* than once to simulate pileup of several events.
*/
void calini_m() const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Simple calorimeter simulation - assume uniform Y and phi bins.
*/
void calsim_m() const;
/**
* Find jets using the FastJet package on particlesToCluster_.
*/
void getFastJets(double rjet, Energy ejcut, double etajcut) const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Simple jet-finding algorithm (similar to UA1). Find highest
* remaining cell > ETSTOP and sum surrounding cells with --
* DELTA(Y)**2+DELTA(PHI)**2 < RJET**2 , ET>ECCUT.
* Keep sets with ET>EJCUT and ABS(ETA)<ETACUT. The UA1
* parameters are RJET=1.0 and EJCUT=5.0.
*/
void getjet_m(double rjet, Energy ejcut, double etajcut) const;
/**
* Deletes particles from partonsToMatch_ and particlesToCluster_
* vectors so that these contain only the partons to match to the
* jets and the particles used to build jets respectively. By and
* large the candidates for deletion are: vector bosons and their
* decay products, Higgs bosons, photons as well as _primary_, i.e.
* present in the lowest multiplicity process, heavy quarks and
* any related decay products.
*/
void caldel_m() const;
/**
* c++ translation of subroutine of same name from alpsho.f.
* Label all particles with status between ISTLO and ISTHI
* (until a particle with status ISTOP is found) as final-state,
* call calsim_m and then put labels back to normal. This
* version keeps only all IST=1 particles rejected by caldel as
* daughters of vetoed heavy-quark mothers: jets complementary
* to those reconstructed by caldel.
*/
void caldel_hvq() const;
/**
* Get the particles from lastXCombPtr filling the pair
* preshowerISPs_ and particle pointer vector preshowerFSPs_.
*/
void getPreshowerParticles() const;
/**
* Get the particles from eventHandler()->currentEvent()->...
* filling the particle pairs showeredISHs_, showeredISPs_,
* showeredRems_ and the particle pointer vector showeredFSPs_.
*/
void getShoweredParticles() const;
/**
* Allows printing of debug output and sanity checks like
* total momentum consrvation to be carried out.
* debugLevel = -1, 0, ...5
* = no debugging, minimal debugging, ... verbose.
*/
void doSanityChecks(int debugLevel) const;
/**
* Given a pointer to a particle this finds all its final state
* descendents.
*/
void getDescendents(PPtr theParticle) const;
/**
* Accumulates all descendents of tops down to the b and W
* but not including them.
*/
void getTopRadiation(PPtr theParticle) const;
/**
* Sorts a given vector of particles by descending pT or ETJET
*/
ParticleVector pTsort(ParticleVector unsortedVec);
pair< vector<Energy>, vector<Lorentz5Momentum> > ETsort(vector<Energy> unsortedetjet, vector<Lorentz5Momentum> unsortedVec);
/*
* A function that prints a vector of Lorentz5Momenta in a fancy way
*/
void printMomVec(vector<Lorentz5Momentum> momVec);
/*
* A probability function for varying etclus_ about the mean value
*/
Energy etclusran_(double petc) const;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<AlpGenHandlerOL> initAlpGenHandlerOL;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- AlpGenHandlerOL & operator=(const AlpGenHandlerOL &);
+ AlpGenHandlerOL & operator=(const AlpGenHandlerOL &) = delete;
private:
/**
* Initial-state incoming partons prior to showering
* (i.e. from lastXCombPtr).
*/
mutable PPair preshowerISPs_;
/**
* Final-state outgoing partICLEs prior to showering
* (i.e. from lastXCombPtr).
*/
mutable ParticleVector preshowerFSPs_;
/**
* Final-state outgoing partICLEs prior to showering _to_be_removed_
* from preShowerFSPs_ prior to the light-parton-light-jet matching
* step. This same list is the starting point for determining
* partonsToMatch_ for the case of merging in heavy quark production.
*/
mutable ParticleVector preshowerFSPsToDelete_;
/**
* Initial-state incoming hadrons after shower of hard process
* (eventHandler()->currentEvent()->incoming()).
*/
mutable PPair showeredISHs_;
/**
* Initial-state incoming partons after shower of hard process
* (look for partonic children of showeredISHs_).
*/
mutable PPair showeredISPs_;
/**
* Final-state outgoing partICLEs after shower of hard process
* (eventHandler()->currentEvent()->getFinalState()).
*/
mutable tPVector showeredFSPs_;
/**
* Final-state outgoing partICLEs after shower of hard process
* _to_be_removed_ from showeredFSPs_ prior to the
* light-parton-light-jet matching step. This same list is the
* starting point for determining particlesToCluster_ for the
* case of merging in heavy quark production.
*/
mutable ParticleVector showeredFSPsToDelete_;
/**
* ONLY the final-state partons from preshowerFSPs_ that are
* supposed to enter the jet-parton matching.
*/
mutable ParticleVector partonsToMatch_;
/*
* The shower progenitors
*/
mutable PPtr theProgenitor;
mutable PPtr theLastProgenitor;
/**
* ONLY the final-state particles from showeredFSPs_ (and maybe
* also showeredRems_) that are supposed to go for jet clustering.
*/
mutable tPVector particlesToCluster_;
/**
* Final-state remnants after shower of hard process
* (look for remnants initially in showeredFSPs_).
*/
mutable PPair showeredRems_;
/**
* Pointer to the object calculating the strong coupling
*/
mutable ShowerAlphaPtr alphaS_;
/**
* Information extracted from the XComb object
*/
//@{
/**
* The fixed factorization scale used in the MEs.
*/
mutable Energy pdfScale_;
/**
* Centre of mass energy
*/
mutable Energy2 sHat_;
/**
* Constant alphaS used to generate LH events - if not already
* using CKKW scale (ickkw = 1 in AlpGen for example).
*/
mutable double alphaSME_;
//@}
/*
* Number of rapidity segments of the calorimeter.
*/
mutable unsigned int ncy_;
/*
* Number of phi segments of the calorimeter.
*/
mutable unsigned int ncphi_;
/*
* Heavy flavour in WQQ,ZQQ,2Q etc (4=c, 5=b, 6=t).
*/
mutable int ihvy_;
/*
* Number of photons in the AlpGen process.
*/
mutable int nph_;
/*
* Number of higgses in the AlpGen process.
*/
mutable int nh_;
/*
* Jet ET cut to apply in jet clustering (in merging).
*/
mutable Energy etclus_;
/*
* Mean Jet ET cut to apply in jet clustering (in merging).
*/
mutable Energy etclusmean_;
/*
* maximum deviation from mean Jet ET cut to apply in jet clustering (in merging).
*/
mutable Energy epsetclus_;
/*
* type of smoothing function to use
*/
mutable unsigned int smoothingtype_;
/*
* Cone size used in jet clustering (in merging).
*/
mutable double rclus_;
/*
* Max |eta| for jets in clustering (in merging).
*/
double etaclmax_;
/*
* Default 1.5 factor used to decide if a jet matches a parton
* in merging: if DR(parton,jet)<rclusfactor*rclus the parton
* and jet are said to have been matched.
*/
double rclusfactor_;
/*
* The AlpGen hard process code. Relation to the AlpGen process names:
* 1: wqq, 2: zqq, 3: wjet, 4: zjet, 5: vbjet, 6: 2Q, 8: QQh, 9: Njet,
* 10: wcjet, 11: phjet, 12: hjet, 13: top, 14: wphjet, 15: wphqq,
* 16: 2Qph.
*/
mutable int ihrd_;
/*
* The number of light jets in the AlpGen process (i.e. the 'extra' ones).
*/
mutable int njets_;
/*
* Mimimum parton-parton R-sep used for generation (used for hvq merging).
*/
mutable double drjmin_;
/*
* This flags that the highest multiplicity ME-level process is
* being processed.
*/
mutable bool highestMultiplicity_;
/*
* This is the highest number of jets to be included in the matching.
* This implies that exclusive rates will be calculated up to highestNjets_-1 and
* inclusive for highestNjets_.
*/
mutable int highestNjets_;
/*
* This flags that the highest NLO multiplicity ME-level process is
* being processed.
*/
mutable bool highestNLOMultiplicity_;
/*
* This flags whether the etclus_ (merging scale) should be fixed or variable according to a prob. distribution around the mean
*/
mutable bool etclusfixed_;
/*
* The forwards rapidity span of the calorimeter.
*/
mutable double ycmax_;
/*
* The backwards rapidity span of the calorimeter.
*/
mutable double ycmin_;
/*
* The jet algorithm used for parton-jet matching in the MLM procedure.
*/
mutable int jetAlgorithm_;
/*
* Allows the vetoing to be turned off completely - just for convenience.
*/
mutable bool vetoIsTurnedOff_;
/*
* Switch between original and OpenLoops implementations of the handler
*
*/
mutable int vetoType_;
/*
* Signals that the LH file being read-in is a NLO (Powheg one).
*/
mutable bool inputIsNLO_;
/*
* Cosine of phi values of calorimeter cell centres.
* Goes phi~=0 to phi~=2*pi (index = 0 ---> ncphi).
* ==> Cosine goes from +1 ---> +1 (index = 0 ---> ncphi).
*/
mutable vector<double> cphcal_;
/*
* Sine of phi values of calorimeter cell centres.
* Goes phi~=0 to phi~=2*pi (index = 0 ---> ncphi).
* ==> Sine goes 0 -> 1 -> 0 -> -1 -> 0 (index = 0 ---> ncphi).
*/
mutable vector<double> sphcal_;
/*
* Cosine of theta values of calorimeter cell centres in Y.
* Goes bwds th~=pi to fwds th~=0 (index = 0 ---> ncy).
* ==> Cosine goes from -1 ---> +1 (index = 0 ---> ncy).
*/
mutable vector<double> cthcal_;
/*
* Sine of theta values of calorimeter cell centres in Y.
* Goes bwds th~=pi to fwds th~=0 (index = 0 ---> ncy).
* ==> Sine goes from 0 ---> +1 ---> 0 (index = 0 ---> ncy).
*/
mutable vector<double> sthcal_;
/*
* Transverse energy deposit in a given calorimeter cell.
* First array index corresponds to rapidity index of cell,
* second array index corresponds to phi cell index.
*/
mutable vector<vector<Energy> > et_;
/*
* For a given calorimeter cell this holds the index of the jet
* that the cell was clustered into.
*/
mutable vector<vector<int> > jetIdx_;
/*
* Vector holding the Lorentz 5 momenta of each jet.
*/
mutable vector<Lorentz5Momentum> pjet_;
/*
* Vector holding the list of FS particles resulting from
* the particle input to getDescendents.
*/
mutable ParticleVector tmpList_;
/*
* Variables for the C++ translation of the calini_m(), calsim_m(),
* getjet_m(...) and caldel_m() functions
*/
mutable vector<Energy> etjet_;
mutable double dely_, delphi_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of AlpGenHandlerOL. */
template <>
struct BaseClassTrait<Herwig::AlpGenHandlerOL,1> {
/** Typedef of the first base class of AlpGenHandlerOL. */
typedef Herwig::QTildeShowerHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the AlpGenHandlerOL class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::AlpGenHandlerOL>
: public ClassTraitsBase<Herwig::AlpGenHandlerOL> {
/** Return a platform-independent class name */
static string className() { return "Herwig::AlpGenHandlerOL"; }
/**
* The name of a file containing the dynamic library where the class
* AlpGenHandlerOL is implemented. It may also include several, space-separated,
* libraries if the class AlpGenHandlerOL depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "AlpGenHandlerOL.so"; }
};
/** @endcond */
}
#endif /* HERWIG_AlpGenHandlerOL_H */
diff --git a/Contrib/HiggsPairOL/HiggsPair.h b/Contrib/HiggsPairOL/HiggsPair.h
--- a/Contrib/HiggsPairOL/HiggsPair.h
+++ b/Contrib/HiggsPairOL/HiggsPair.h
@@ -1,496 +1,496 @@
// -*- C++ -*-
//
// MEHiggsPair.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2009-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HiggsPair_H
#define HERWIG_HiggsPair_H
//
// This is the declaration of the HiggsPair class.
//
// The implementation of this process is based upon hep-ph/0112161 by G.F. Giudice, R. Rattazzi, J.D. Wells.
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Repository/UseRandom.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Config/Pointers.h"
namespace Herwig {
class HiggsPair;
}
namespace ThePEG {
ThePEG_DECLARE_POINTERS(Herwig::HiggsPair,HiggsPairPtr);
}
namespace Herwig {
using namespace ThePEG;
/**
* The HiggsPair class implements the matrix elements for
* HiggsPairian \f$2\to2\f$ scattering process
*/
class HiggsPair: public BSMModel {
public:
/**
* The default constructor.
*/
HiggsPair();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
virtual void doinitrun();
virtual void InitOpenLoops();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Return multiplier for the SM triple-coupling
*/
double selfcoupling() const {return _selfcoupling;}
/**
* Processes to include
*/
unsigned int process() const { return _process; }
/*
* Fix alphaS
*/
unsigned int fixedalphaS() const { return _fixedalphaS; }
/*
* Fixed alphaS value if AlphaS is chosen (option 2 above)
*/
double alphasfixedvalue() const { return _alphasfixedvalue; }
/*
* Fix scale for the whole process.
*/
unsigned int fixedscale() const { return _fixedscale; }
/*
* Return Scale to use for alpha_S if fixed
*/
Energy alphascale() const { return _alphascale; }
/*
* Return choice between the OpenLoops and HPAIR implementations
*/
unsigned int implementation() const { return _implementation; }
/*
* Return choice to include the widths
*/
unsigned int includeWidths() const { return _includeWidths; }
/*
* Return choice whether to include the b quark loops
*/
unsigned int includeBquark() const { return _includeBquark; }
/*
* Return number of allowed flavours for the incoming quarks
*/
int maxflavour() const { return _maxflavour; }
/*
* Return number of allowed flavours for the incoming quarks
*/
Energy basescale() const { return _basescale; }
/*
* Return the SubProcess to include in pp > HHj
*/
unsigned int subprocessjet() const { return _subprocessjet; }
/*
* enable
*/
unsigned int alphasreweight() const { return _alphasreweight; }
/**
* Return multiplier for scale
*/
double scalemultiplier() const {return _scalemultiplier;}
/**
* Return OL Ids
*/
int id1() const {return _id1;}
int id2() const {return _id2;}
int id3() const {return _id3;}
int id4() const {return _id4;}
int id1tri() const {return _id1tri;}
int id2tri() const {return _id2tri;}
int id3tri() const {return _id3tri;}
int id4tri() const {return _id4tri;}
int id1box() const {return _id1box;}
int id2box() const {return _id2box;}
int id3box() const {return _id3box;}
int id4box() const {return _id4box;}
int id1int() const {return _id1int;}
int id2int() const {return _id2int;}
int id3int() const {return _id3int;}
int id4int() const {return _id4int;}
int id() const {return _id;}
int idtri() const {return _idtri;}
int idbox() const {return _idbox;}
int idint() const {return _idint;}
/**
* The higgs boson
*/
PDPtr _higgs;
/*
* The top mass
*/
Energy _topmass;
/*
* The bottom mass
*/
Energy _bottommass;
/*
* The Z boson mass
*/
Energy _zmass;
/*
* Higgs boson mass(es)
*/
Energy _m1, _m2;
/*
* Heavy H mass
*/
Energy _heavyHmass;
/*
* Heavy H width
*/
Energy _heavyHwidth;
private:
/**
* Pointer to the model.
*/
tcSMPtr _theModel;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr _hmass;
/**
* multiplier for the SM triple-coupling
*/
double _selfcoupling;
/**
* Processes to include
*/
unsigned int _process;
/**
* On-shell mass for the higgs
*/
Energy _mh;
/**
* On-shell width for the higgs
*/
Energy _wh;
/*
* Fix alphaS
*/
unsigned int _fixedalphaS;
/*
* Value of AlphaS if fixed using option 2 above
*/
double _alphasfixedvalue;
/*
* Fix scale of whole process
*/
unsigned int _fixedscale;
/*
* Scale to use for alpha_S if fixed
*/
Energy _alphascale;
/*
* Choose between the OpenLoops and HPAIR implementations
*/
unsigned int _implementation;
/*
* include the widths
*/
unsigned int _includeWidths;
/*
* include the b quark loops
*/
unsigned int _includeBquark;
/*
* Base scale to use if chosen to be fixed
*/
Energy _basescale;
/*
* scale multiplier
*/
double _scalemultiplier;
/*
* Masses of fermions
*/
double Mass_E;
double Mass_M;
double Mass_L;
double Mass_T;
double Mass_U;
double Mass_C;
double Mass_D;
double Mass_S;
double Mass_B;
double Mass_Z;
double Mass_W;
double Mass_H;
double Width_C;
double Width_B;
double Width_T;
double Width_W;
double Width_Z;
double Width_H;
double getMass_E() const { return Mass_E; }
double getMass_M() const { return Mass_M; }
double getMass_L() const { return Mass_L; }
double getMass_T() const { return Mass_T; }
double getMass_U() const { return Mass_U; }
double getMass_C() const { return Mass_C; }
double getMass_D() const { return Mass_D; }
double getMass_S() const { return Mass_S; }
double getMass_B() const { return Mass_B; }
/*
* Masses of bosons
*/
double getMass_Z() const { return Mass_Z; }
double getMass_W() const { return Mass_W; }
double getMass_H() const { return Mass_H; }
/*
* Widths of particles
*/
double getWidth_C() const { return Width_C; }
double getWidth_B() const { return Width_B; }
double getWidth_T() const { return Width_T; }
double getWidth_W() const { return Width_W; }
double getWidth_Z() const { return Width_Z; }
double getWidth_H() const { return Width_H; }
/**
* Access to the higgs data
*/
PDPtr higgs() const { return _higgs; }
/*
* QCD and QED couplings
*/
double Coupl_Alpha_QED;
double Coupl_Alpha_QCD;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Helper functions for me2. */
//@{
/**
*/
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<HiggsPair> initHiggsPair;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HiggsPair & operator=(const HiggsPair &);
+ HiggsPair & operator=(const HiggsPair &) = delete;
/**
* process identifiers
*/
/*
* hh + j
*/
int _id1, _id1tri, _id1box, _id1int;
int _id2, _id2tri, _id2box, _id2int;
int _id3, _id3tri, _id3box, _id3int;
int _id4, _id4tri, _id4box, _id4int;
/*
* hh
*/
int _id, _idtri, _idbox, _idint;
private:
/*
* Which subprocesses to include for the pp -> HHj
*/
unsigned int _subprocessjet;
/*
* alphaS reweighting
*/
unsigned int _alphasreweight;
/*
* max flavour
*/
int _maxflavour;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of HiggsPair. */
template <>
struct BaseClassTrait<Herwig::HiggsPair,1> {
/** Typedef of the first base class of HiggsPair. */
typedef Herwig::BSMModel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the HiggsPair class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::HiggsPair>
: public ClassTraitsBase<Herwig::HiggsPair> {
/** Return a platform-independent class name */
static string className() { return "Herwig::HiggsPair"; }
/**
* The name of a file containing the dynamic library where the class
* HiggsPair is implemented. It may also include several, space-separated,
* libraries if the class MEQCD2to2Fast depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HiggsPair.so"; }
};
/** @endcond */
}
#endif /* HERWIG_HiggsPair_H */
diff --git a/Contrib/HiggsPairOL/MEHiggsPairJet.h b/Contrib/HiggsPairOL/MEHiggsPairJet.h
--- a/Contrib/HiggsPairOL/MEHiggsPairJet.h
+++ b/Contrib/HiggsPairOL/MEHiggsPairJet.h
@@ -1,518 +1,518 @@
// -*- C++ -*-
//
// MEHiggsPair.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2009-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEHiggsPairJet_H
#define HERWIG_MEHiggsPairJet_H
//
// This is the declaration of the MEHiggsPairJet class.
//
// The implementation of this process is based upon hep-ph/0112161 by G.F. Giudice, R. Rattazzi, J.D. Wells.
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Repository/UseRandom.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "HiggsPair.h"
namespace Herwig {
using namespace ThePEG;
/*
* Interface to external FORTRAN hpair functions (T.Plehn, M.Spira & P.Zerwas, arXiv:hep-ph/9603205)
* original Program found at http://people.web.psi.ch/spira/hpair/
*/
extern "C" {
void ol_setparameter_int(const char* param, int val);
void ol_setparameter_double(const char* param, double val);
void ol_setparameter_string(const char* param, char* val);
int ol_register_process(const char* process, int amptype);
int ol_n_external(int id);
void ol_phase_space_point(int id, double sqrt_s, double* pp);
void ol_start();
void ol_finish();
void ol_evaluate_tree(int id, double* pp, double* m2_tree);
void ol_evaluate_loop(int id, double* pp, double* m2_tree, double* m2_loop, double* acc);
void ol_evaluate_loop2(int id, double* pp, double* m2_loop2, double* acc);
}
/**
* The MEHiggsPairJet class implements the matrix elements for
* HiggsPairian \f$2\to2\f$ scattering process
*/
class MEHiggsPairJet: public HwMEBase {
public:
/**
* The default constructor.
*/
MEHiggsPairJet();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const { return 0; }
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const { return 0; }
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Generate internal degrees of freedom
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object before the run phase
* @throws InitException if object could not be initialized properly.
*/
virtual void doinitrun();
/* OpenLoops initialization */
virtual void InitOpenLoops();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans);
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
/**
* Access to the higgs data
*/
PDPtr higgs() const { return _higgs; }
/**
* Set the higgs data
*/
void higgs(PDPtr in) {_higgs =in;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Helper functions for me2. */
//@{
/**
*/
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<MEHiggsPairJet> initMEHiggsPairJet;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEHiggsPairJet & operator=(const MEHiggsPairJet &);
+ MEHiggsPairJet & operator=(const MEHiggsPairJet &) = delete;
/**
* process identifiers
*/
int _id1, _id1tri, _id1box, _id1int;
int _id2, _id2tri, _id2box, _id2int;
int _id3, _id3tri, _id3box, _id3int;
int _id4, _id4tri, _id4box, _id4int;
/**
* The higgs boson
*/
PDPtr _higgs;
/*
* The top mass
*/
Energy _topmass;
/*
* The bottom mass
*/
Energy _bottommass;
/*
* The Z boson mass
*/
Energy _zmass;
/*
* Higgs boson mass(es)
*/
Energy _m1, _m2;
/*
* Heavy H mass
*/
Energy _heavyHmass;
/*
* Heavy H width
*/
Energy _heavyHwidth;
/**
* Storage of the triangon/boxon mass to avoid the need to recalculate
*/
Energy2 _mbt2;
/**
* Storage of the scale to avoid the need to recalculate
*/
Energy2 _scale;
/**
* Allowed flavours for the incoming quarks
*/
int _maxflavour;
private:
/**
* Pointer to the model.
*/
tcSMPtr _theModel;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr _hmass;
/**
* multiplier for the SM triple-coupling
*/
double _selfcoupling;
/**
* multiplier for the hhH triple-coupling
*/
double _hhHcoupling;
/**
* Processes to include
*/
unsigned int _process;
/**
* On-shell mass for the higgs
*/
Energy _mh;
/**
* On-shell width for the higgs
*/
Energy _wh;
/*
* Fix alphaS
*/
unsigned int _fixedalphaS;
/*
* Value of AlphaS if fixed using option 2 above
*/
double _alphasfixedvalue;
/*
* Fix scale for the whole process.
*/
unsigned int _fixedscale;
/*
* Scale to use for alpha_S if fixed
*/
Energy _alphascale;
/*
* Choose between the OpenLoops and HPAIR implementations
*/
unsigned int _implementation;
/*
* include the widths
*/
unsigned int _includeWidths;
/*
* include the b quark loops
*/
unsigned int _includeBquark;
/*
* Base scale to use if chosen to be fixed
*/
Energy _basescale;
/*
* Which subprocesses to include in the pp > HHj process
*/
unsigned int _subprocessjet;
/*
* AlphaS reweighting
*/
unsigned int _alphasreweight;
/*
* scale multiplier
*/
double _scalemultiplier;
/*
* Masses of fermions
*/
double Mass_E;
double getMass_E() const { return Mass_E; }
double Mass_M;
double getMass_M() const { return Mass_M; }
double Mass_L;
double getMass_L() const { return Mass_L; }
double Mass_T;
double getMass_T() const { return Mass_T; }
double Mass_U;
double getMass_U() const { return Mass_U; }
double Mass_C;
double getMass_C() const { return Mass_C; }
double Mass_D;
double getMass_D() const { return Mass_D; }
double Mass_S;
double getMass_S() const { return Mass_S; }
double Mass_B;
double getMass_B() const { return Mass_B; }
/*
* Masses of bosons
*/
double Mass_Z;
double getMass_Z() const { return Mass_Z; }
double Mass_W;
double getMass_W() const { return Mass_W; }
double Mass_H;
double getMass_H() const { return Mass_H; }
/*
* Widths of particles
*/
double Width_C;
double getWidth_C() const { return Width_C; }
double Width_B;
double getWidth_B() const { return Width_B; }
double Width_T;
double getWidth_T() const { return Width_T; }
double Width_W;
double getWidth_W() const { return Width_W; }
double Width_Z;
double getWidth_Z() const { return Width_Z; }
double Width_H;
double getWidth_H() const { return Width_H; }
/*
* QCD and QED couplings
*/
double Coupl_Alpha_QED;
double Coupl_Alpha_QCD;
/* OpenLoops initialization */
// virtual void InitOpenLoops() const;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of MEHiggsPairJet. */
template <>
struct BaseClassTrait<Herwig::MEHiggsPairJet,1> {
/** Typedef of the first base class of MEHiggsPairJet. */
typedef Herwig::HwMEBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the MEHiggsPairJet class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::MEHiggsPairJet>
: public ClassTraitsBase<Herwig::MEHiggsPairJet> {
/** Return a platform-independent class name */
static string className() { return "Herwig::MEHiggsPairJet"; }
/**
* The name of a file containing the dynamic library where the class
* MEHiggsPairJet is implemented. It may also include several, space-separated,
* libraries if the class MEQCD2to2Fast depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HiggsPair.so"; }
};
/** @endcond */
}
#endif /* HERWIG_MEHiggsPairJet_H */
diff --git a/Contrib/HiggsPairOL/MEHiggsPairOL.h b/Contrib/HiggsPairOL/MEHiggsPairOL.h
--- a/Contrib/HiggsPairOL/MEHiggsPairOL.h
+++ b/Contrib/HiggsPairOL/MEHiggsPairOL.h
@@ -1,519 +1,519 @@
// -*- C++ -*-
//
// MEHiggsPair.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2009-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEHiggsPairOL_H
#define HERWIG_MEHiggsPairOL_H
//
// This is the declaration of the MEHiggsPairOL class.
//
// The implementation of this process is based upon hep-ph/0112161 by G.F. Giudice, R. Rattazzi, J.D. Wells.
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Repository/UseRandom.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "HiggsPair.h"
namespace Herwig {
using namespace ThePEG;
/*
* Interface to external FORTRAN hpair functions (T.Plehn, M.Spira & P.Zerwas, arXiv:hep-ph/9603205)
* original Program found at http://people.web.psi.ch/spira/hpair/
*/
extern "C" {
complex<double> eta_(complex<double>* C1, complex<double>* C2);
complex<double> d04_(double* P1, double* P2, double* P3, double* P4, double* P12,double* P23, double* M1, double* M2, double* M3, double* M4);
complex<double> c03_(double* P1,double* P2,double* P3,double* M1,double* M2,double* M3);
complex<double> cspen_(double* Z);
complex<double> sqe_(double* A, double* B, double* C);
complex<double> etas_(complex<double>*Y,complex<double>* R,complex<double>*RS);
void formfac_(double* AMQ, double* S, double* T, double* U, double* M1, double* M2, complex<double>* C0AB,complex<double>* C0AC,complex<double>* C0AD,complex<double>* C0BC,complex<double>* C0BD,complex<double>* C0CD,complex<double>* D0ABC,complex<double>* D0BAC,complex<double>* D0ACB);
}
extern "C" {
void ol_setparameter_int(const char* param, int val);
void ol_setparameter_double(const char* param, double val);
void ol_setparameter_string(const char* param, char* val);
int ol_register_process(const char* process, int amptype);
int ol_n_external(int id);
void ol_phase_space_point(int id, double sqrt_s, double* pp);
void ol_start();
void ol_finish();
void ol_evaluate_tree(int id, double* pp, double* m2_tree);
void ol_evaluate_loop(int id, double* pp, double* m2_tree, double* m2_loop, double* acc);
void ol_evaluate_loop2(int id, double* pp, double* m2_loop2, double* acc);
}
extern "C" {
extern struct{
complex<double> A1;
complex<double> A2;
complex<double> H1;
complex<double> H2;
complex<double> Z1;
complex<double> Z2;
complex<double> AA1;
complex<double> AA2;
complex<double> HH1;
complex<double> HH2;
complex<double> AH1;
complex<double> AH2;
} form_;
}
/**
* The MEHiggsPairOL class implements the matrix elements for
* HiggsPairian \f$2\to2\f$ scattering process
*/
class MEHiggsPairOL: public HwMEBase {
public:
/**
* The default constructor.
*/
MEHiggsPairOL();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const { return 0; }
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const { return 0; }
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Generate internal degrees of freedom
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object before the run phase
* @throws InitException if object could not be initialized properly.
*/
virtual void doinitrun();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans);
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
/**
* Access to the higgs data
*/
PDPtr higgs() const { return _higgs; }
/**
* Set the higgs data
*/
void higgs(PDPtr in) {_higgs =in;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Helper functions for me2. */
//@{
/**
*/
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<MEHiggsPairOL> initMEHiggsPairOL;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEHiggsPairOL & operator=(const MEHiggsPairOL &);
+ MEHiggsPairOL & operator=(const MEHiggsPairOL &) = delete;
/**
* process identifiers
*/
int _id, _idtri, _idbox, _idint;
/**
* The higgs boson
*/
PDPtr _higgs;
/*
* The top mass
*/
Energy _topmass;
/*
* The bottom mass
*/
Energy _bottommass;
/*
* The Z boson mass
*/
Energy _zmass;
/*
* Higgs boson mass(es)
*/
Energy _m1, _m2;
/*
* Heavy H mass
*/
Energy _heavyHmass;
/*
* Heavy H width
*/
Energy _heavyHwidth;
private:
/**
* Pointer to the model.
*/
tcSMPtr _theModel;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr _hmass;
/**
* multiplier for the SM triple-coupling
*/
double _selfcoupling;
/**
* Processes to include
*/
unsigned int _process;
/**
* On-shell mass for the higgs
*/
Energy _mh;
/**
* On-shell width for the higgs
*/
Energy _wh;
/*
* Fix alphaS
*/
unsigned int _fixedalphaS;
/*
* Value of AlphaS if fixed using option 2 above
*/
double _alphasfixedvalue;
/*
* Fix scale of whole process
*/
unsigned int _fixedscale;
/*
* Scale to use for alpha_S if fixed
*/
Energy _alphascale;
/*
* Choose between the OpenLoops and HPAIR implementations
*/
unsigned int _implementation;
/*
* include the widths
*/
unsigned int _includeWidths;
/*
* include the b quark loops
*/
unsigned int _includeBquark;
/*
* Base scale to use if chosen to be fixed
*/
Energy _basescale;
/*
* scale multiplier
*/
double _scalemultiplier;
/*
* Masses of fermions
*/
double Mass_E;
double Mass_M;
double Mass_L;
double Mass_T;
double Mass_U;
double Mass_C;
double Mass_D;
double Mass_S;
double Mass_B;
double Mass_Z;
double Mass_W;
double Mass_H;
double Width_C;
double Width_B;
double Width_T;
double Width_W;
double Width_Z;
double Width_H;
double getMass_E() const { return Mass_E; }
double getMass_M() const { return Mass_M; }
double getMass_L() const { return Mass_L; }
double getMass_T() const { return Mass_T; }
double getMass_U() const { return Mass_U; }
double getMass_C() const { return Mass_C; }
double getMass_D() const { return Mass_D; }
double getMass_S() const { return Mass_S; }
double getMass_B() const { return Mass_B; }
/*
* Masses of bosons
*/
double getMass_Z() const { return Mass_Z; }
double getMass_W() const { return Mass_W; }
double getMass_H() const { return Mass_H; }
/*
* Widths of particles
*/
double getWidth_C() const { return Width_C; }
double getWidth_B() const { return Width_B; }
double getWidth_T() const { return Width_T; }
double getWidth_W() const { return Width_W; }
double getWidth_Z() const { return Width_Z; }
double getWidth_H() const { return Width_H; }
/*
* QCD and QED couplings
*/
double Coupl_Alpha_QED;
double Coupl_Alpha_QCD;
/* Scalar integral initialization from hpair.f (T.Plehn, M.Spira & P.Zerwas, arXiv:hep-ph/9603205)
Program found at http://people.web.psi.ch/spira/hpair/ */
virtual vector<Complex> iniscal(double AMQ, double S, double T,double U, double M1, double M2) const;
/* Matrix element calculation from hpair */
virtual double MATRIX(double S, double T,double U, double M1, double M2) const;
/* OpenLoops initialization */
virtual void InitOpenLoops();
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of MEHiggsPairOL. */
template <>
struct BaseClassTrait<Herwig::MEHiggsPairOL,1> {
/** Typedef of the first base class of MEHiggsPairOL. */
typedef Herwig::HwMEBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the MEHiggsPairOL class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::MEHiggsPairOL>
: public ClassTraitsBase<Herwig::MEHiggsPairOL> {
/** Return a platform-independent class name */
static string className() { return "Herwig::MEHiggsPairOL"; }
/**
* The name of a file containing the dynamic library where the class
* MEHiggsPairOL is implemented. It may also include several, space-separated,
* libraries if the class MEQCD2to2Fast depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HiggsPair.so"; }
};
/** @endcond */
}
#endif /* HERWIG_MEHiggsPairOL_H */
diff --git a/Contrib/LeptonME/MEee2Z.h b/Contrib/LeptonME/MEee2Z.h
--- a/Contrib/LeptonME/MEee2Z.h
+++ b/Contrib/LeptonME/MEee2Z.h
@@ -1,208 +1,208 @@
// -*- C++ -*-
//
// MEee2Z.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEee2Z_H
#define HERWIG_MEee2Z_H
//
// This is the declaration of the <!id>MEee2Z<!!id> class.
//
#include "ThePEG/MatrixElement/ME2to2Base.h"
#include "ThePEG/MatrixElement/MEBase.h"
#include "Herwig/Models/RSModel/RSModel.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/Utilities/Rebinder.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SpinorWaveFunction;
using Helicity::SpinorBarWaveFunction;
using Helicity::VectorWaveFunction;
/**
* The MEee2Z class implements the matrix element for \f$e^+e^-\to Z\f$ for
* the testing of spin correlations
*/
class MEee2Z: public MEBase {
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given 'nDim()' uniform
* random numbers in the interval ]0,1[. To help the phase space
* generator, the 'dSigHatDR()' should be a smooth function of these
* numbers, although this is not strictly necessary. Return
* false if the chosen points failed the kinematical cuts.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The matrix element
* @param fin The spinors for the incoming fermion
* @param ain The spinors for the incoming antifermion
* @param vout The polarization vectors for the outgoing Z
* @param me The spin averaged matrix element
*/
ProductionMatrixElement HelicityME(vector<SpinorWaveFunction> fin,
vector<SpinorBarWaveFunction> ain,
vector<VectorWaveFunction> vout,double& me) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2Z & operator=(const MEee2Z &);
+ MEee2Z & operator=(const MEee2Z &) = delete;
private:
/**
* Pointer to the Z vertex
*/
AbstractFFVVertexPtr _theFFZVertex;
};
}
#endif /* HERWIG_MEee2Z_H */
diff --git a/Contrib/MultiWeight/MultiWeight.h b/Contrib/MultiWeight/MultiWeight.h
--- a/Contrib/MultiWeight/MultiWeight.h
+++ b/Contrib/MultiWeight/MultiWeight.h
@@ -1,162 +1,162 @@
// -*- C++ -*-
//
// MultiWeight.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MultiWeight_H
#define HERWIG_MultiWeight_H
//
// This is the declaration of the MultiWeight class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
#include <cmath>
#include <fstream>
namespace Herwig {
using namespace ThePEG;
/**
* The MultiWeight class is designed to perform some simple analysis of
* gauge boson, W and Z, distributions in hadron-hadron collisions. The main
* distriubtions are the transverse momentum and rapidities of the gauge bosons
* which are of physical interest, and the azimuthal angle distribution for
* testing purposes.
*
* @see \ref MultiWeightInterfaces "The interfaces"
* defined for MultiWeight.
*/
class MultiWeight: public AnalysisHandler {
public:
/**
* The default constructor.
*/
inline MultiWeight();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
inline virtual void doinitrun();
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static NoPIOClassDescription<MultiWeight> initMultiWeight;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MultiWeight & operator=(const MultiWeight &);
+ MultiWeight & operator=(const MultiWeight &) = delete;
private:
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of MultiWeight. */
template <>
struct BaseClassTrait<Herwig::MultiWeight,1> {
/** Typedef of the first base class of MultiWeight. */
typedef AnalysisHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the MultiWeight class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::MultiWeight>
: public ClassTraitsBase<Herwig::MultiWeight> {
/** Return a platform-independent class name */
static string className() { return "Herwig::MultiWeight"; }
/** Return the name(s) of the shared library (or libraries) be loaded to get
* access to the MultiWeight class and any other class on which it depends
* (except the base class). */
static string library() { return "MultiWeight.so"; }
};
/** @endcond */
}
#endif /* HERWIG_SimpleLHCAnalysis_H */
diff --git a/Contrib/PGSInterface/PGSInterface.h b/Contrib/PGSInterface/PGSInterface.h
--- a/Contrib/PGSInterface/PGSInterface.h
+++ b/Contrib/PGSInterface/PGSInterface.h
@@ -1,301 +1,301 @@
// -*- C++ -*-
#ifndef HERWIG_PGSInterface_H
#define HERWIG_PGSInterface_H
//
// This is the declaration of the PGSInterface class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "ThePEG/Vectors/Lorentz5Vector.h"
#include "HepMC/GenEvent.h"
#include "HepMC/IO_HEPEVT.h"
namespace Herwig {
using namespace ThePEG;
/**
* Enumeration for the different types of reconstructed objects
*/
enum ObjectType {
Photon=0, /**< Photons */
Electron, /**< Electrons */
Muon, /**< Muons */
Tau, /**< Taus */
Jet, /**< Jets */
HeavyCharged /**< Heavy Charged Objects */
};
/**
* Enumeration for the type of b-tag
*/
enum bTag {
None=0, /**< No b-tag */
Loose, /**< Loose b-tag */
Tight, /**< Tight b-tag */
Both , /**< Both loose and tight b-tag */
};
/**
* Struct to store the properties of the reconstructed objects
*/
struct ReconstructedObject {
/**
* Type of object
*/
ObjectType type;
/**
* Momentum of the object
*/
Lorentz5Momentum momentum;
/**
* Charge of the particle
*/
double charge;
/**
* Electromagnetic energy
*/
Energy emenergy;
/**
* Hadronic energy
*/
Energy hadenergy;
/**
* Track energy
*/
Energy trackenergy;
/**
* Number of tracks
*/
int numtracks;
/**
* PDG Code for the particle
*/
int PDGcode;
/**
* Whether it is a loose or tight b-tag
*/
bTag btagging;
/**
* Transverse energy
*/
Energy ET;
/**
* Transverse energy in the isolation cone
*/
Energy isolationET;
/**
* Transverse momentum in the isolation cone
*/
Energy isolationpT;
/**
* Ratio of hadronic to electromagentic energy
*/
double hadronicem;
/**
* Ratio of electromagnetic energy to track momentum
*/
double ep;
/**
* track isolation energy
*/
Energy trkisoEnergy;
/**
* Number of pi0 in cone for tau
*/
int npi0;
/**
* Sum of pt of pi0 not in cone for tau
*/
Energy taupTpi0;
/**
* Sum of pt of tracks not in cone for tau
*/
Energy taupTtracks;
/**
* pT of highest track in tau decays
*/
Energy ptHightestTrack;
/**
* Cluster width
*/
Energy clusterWidth;
};
/**
* Here is the documentation of the PGSInterface class.
*
* @see \ref PGSInterfaceInterfaces "The interfaces"
* defined for PGSInterface.
*/
class PGSInterface: public AnalysisHandler {
public:
/**
* The default constructor.
*/
inline PGSInterface() : _pgs_param_file("lhc.par")
{}
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
/**
* Public access to the reconstructed objects
*/
inline vector<ReconstructedObject> reconstructedObjects() const {
return _objects;
}
/**
* Missing transverse energy in calorimeter and azimuthal angle
*/
inline pair<Energy,double> missingETCalorimeter() const {
return _calorimeterMET;
}
/**
* Missing transverse energy after muon correction and azimuthal angle
*/
inline pair<Energy,double> missingETCorrected() const {
return _muonMET;
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PGSInterface & operator=(const PGSInterface &);
+ PGSInterface & operator=(const PGSInterface &) = delete;
private:
/**
* Converter from HepMC to HEPEVT
*/
HepMC::IO_HEPEVT * _converter;
/**
* file name for the PGS parameters
*/
string _pgs_param_file;
/**
* The reconstructed objects after PGS
*/
vector<ReconstructedObject> _objects;
/**
* missing ET measured in calorimeter
*/
pair <Energy,double> _calorimeterMET;
/**
* missing ET aftrer muon correction
*/
pair <Energy,double> _muonMET;
};
}
#endif /* HERWIG_PGSInterface_H */
diff --git a/Contrib/PGSInterface/ZAnalysis.h b/Contrib/PGSInterface/ZAnalysis.h
--- a/Contrib/PGSInterface/ZAnalysis.h
+++ b/Contrib/PGSInterface/ZAnalysis.h
@@ -1,116 +1,116 @@
// -*- C++ -*-
#ifndef HERWIG_ZAnalysis_H
#define HERWIG_ZAnalysis_H
//
// This is the declaration of the ZAnalysis class.
//
#include "PGSInterface.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* The ZAnalysis class is a simple example of using the interface
* to PGS to look at the Z mass at the hadron and detector levels
*
* @see \ref ZAnalysisInterfaces "The interfaces"
* defined for ZAnalysis.
*/
class ZAnalysis: public PGSInterface {
public:
/**
* The default constructor.
*/
ZAnalysis();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZAnalysis & operator=(const ZAnalysis &);
+ ZAnalysis & operator=(const ZAnalysis &) = delete;
private:
/**
* Z mass at the hadron level
*/
Histogram ZmassHadron_;
/**
* Z mass at the detector level
*/
Histogram ZmassDetector_;
};
}
#endif /* HERWIG_ZAnalysis_H */
diff --git a/Contrib/RadiativeZPrime/AnomalousVVVVertex.h b/Contrib/RadiativeZPrime/AnomalousVVVVertex.h
--- a/Contrib/RadiativeZPrime/AnomalousVVVVertex.h
+++ b/Contrib/RadiativeZPrime/AnomalousVVVVertex.h
@@ -1,107 +1,107 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_AnomalousVVVVertex_H
#define RADIATIVEZPRIME_AnomalousVVVVertex_H
//
// This is the declaration of the AnomalousVVVVertex class.
//
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
namespace RadiativeZPrime {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The AnomalousVVVVertex class implements the anomalous Vector-Vector-Vector vertex.
*
* Only the member which evaluates the matrix element is implemented. The vertex
* is defined to be
* \[ i\epsilon_{\mu\nu\alpha\beta}
* \varepsilon^\mu_1 \varepsilon^\nu_2 \varepsilon^\alpha_2 p_1^\beta\]
*
*
* @see \ref AnomalousVVVVertexInterfaces "The interfaces"
* defined for AnomalousVVVVertex.
*/
class AnomalousVVVVertex: public AbstractVVVVertex {
public:
/**
* Members to calculate the helicity amplitude expressions for vertices
* and off-shell particles.
*/
//@{
/**
* Evaluate the vertex.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param vec1 The wavefunction for the first vector.
* @param vec2 The wavefunction for the second vector.
* @param vec3 The wavefunction for the third vector.
*/
virtual Complex evaluate(Energy2 q2, const VectorWaveFunction & vec1,
const VectorWaveFunction & vec2,
const VectorWaveFunction & vec3);
/**
* Evaluate the off-shell vector coming from the vertex.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param iopt Option of the shape of the Breit-Wigner for the off-shell vector.
* @param out The ParticleData pointer for the off-shell vector.
* @param vec2 The wavefunction for the second vector.
* @param vec3 The wavefunction for the third vector.
* @param mass The mass of the off-shell particle if not taken from the ParticleData
* object
* @param width The width of the off-shell particle if not taken from the ParticleData
* object
*/
virtual VectorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out,
const VectorWaveFunction & vec2,
const VectorWaveFunction & vec3,
complex<Energy> mass=-GeV,
complex<Energy> width=-GeV);
//@}
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3)=0;
/**
* Dummy setCouplings for a four point interaction
* This method is virtual and must be implemented in
* classes inheriting from this.
*/
virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr,tcPDPtr) {
assert(false);
}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- AnomalousVVVVertex & operator=(const AnomalousVVVVertex &);
+ AnomalousVVVVertex & operator=(const AnomalousVVVVertex &) = delete;
};
}
#endif /* RADIATIVEZPRIME_AnomalousVVVVertex_H */
diff --git a/Contrib/RadiativeZPrime/FFZPrimeVertex.h b/Contrib/RadiativeZPrime/FFZPrimeVertex.h
--- a/Contrib/RadiativeZPrime/FFZPrimeVertex.h
+++ b/Contrib/RadiativeZPrime/FFZPrimeVertex.h
@@ -1,117 +1,117 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_FFZPrimeVertex_H
#define RADIATIVEZPRIME_FFZPrimeVertex_H
//
// This is the declaration of the FFZPrimeVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace RadiativeZPrime {
using namespace ThePEG;
/**
* Here is the documentation of the FFZPrimeVertex class.
*
* @see \ref FFZPrimeVertexInterfaces "The interfaces"
* defined for FFZPrimeVertex.
*/
class FFZPrimeVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
inline FFZPrimeVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFZPrimeVertex & operator=(const FFZPrimeVertex &);
+ FFZPrimeVertex & operator=(const FFZPrimeVertex &) = delete;
/**
* Storage of the couplings.
*/
//@{
/**
* The left couplings of the Standard Model fermions.
*/
vector<double> _gl;
/**
* The right couplings of the Standard Model fermions.
*/
vector<double> _gr;
//@}
};
}
#endif /* RADIATIVEZPRIME_FFZPrimeVertex_H */
diff --git a/Contrib/RadiativeZPrime/GammaZPrimeZVertex.h b/Contrib/RadiativeZPrime/GammaZPrimeZVertex.h
--- a/Contrib/RadiativeZPrime/GammaZPrimeZVertex.h
+++ b/Contrib/RadiativeZPrime/GammaZPrimeZVertex.h
@@ -1,113 +1,113 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_GammaZPrimeZVertex_H
#define RADIATIVEZPRIME_GammaZPrimeZVertex_H
//
// This is the declaration of the GammaZPrimeZVertex class.
//
#include "AnomalousVVVVertex.h"
namespace RadiativeZPrime {
using namespace ThePEG;
/**
* Here is the documentation of the GammaZPrimeZVertex class.
*
* @see \ref GammaZPrimeZVertexInterfaces "The interfaces"
* defined for GammaZPrimeZVertex.
*/
class GammaZPrimeZVertex: public AnomalousVVVVertex {
public:
/**
* The default constructor.
*/
GammaZPrimeZVertex();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GammaZPrimeZVertex & operator=(const GammaZPrimeZVertex &);
+ GammaZPrimeZVertex & operator=(const GammaZPrimeZVertex &) = delete;
private:
/**
* Storage of the coupling
*/
double _coup;
};
}
#endif /* RADIATIVEZPRIME_GammaZPrimeZVertex_H */
diff --git a/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma.h b/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma.h
--- a/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma.h
+++ b/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma.h
@@ -1,217 +1,217 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_MEqq2ZPrime2ZGammma_H
#define RADIATIVEZPRIME_MEqq2ZPrime2ZGamma_H
//
// This is the declaration of the MEqq2ZPrime2ZGamma class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.fh"
namespace RadiativeZPrime {
using namespace ThePEG;
using namespace Herwig;
/**
* The MEqq2ZPrime2ZGamma class implements the matrix element for
* \f$q\bar{q}\to Z'\to Z\gamma\f$.
*
* @see \ref MEqq2ZPrime2ZGammaInterfaces "The interfaces"
* defined for MEqq2ZPrime2ZGamma.
*/
class MEqq2ZPrime2ZGamma: public HwMEBase {
public:
/**
* The default constructor.
*/
MEqq2ZPrime2ZGamma();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const { return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const { return new_ptr(*this);}
//@}
protected:
/**
* Matrix element for \f$q\bar{q}\to \gamma/Z \to f\bar{f}\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param Zout Polarization vectors for outgoing Z
* @param gammaout Polarization vectors for the the outgoing photon
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qqME(vector<SpinorWaveFunction> & fin ,
vector<SpinorBarWaveFunction> & ain ,
vector<VectorWaveFunction> & Zout,
vector<VectorWaveFunction> & gammaout,
bool me) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEqq2ZPrime2ZGamma & operator=(const MEqq2ZPrime2ZGamma &);
+ MEqq2ZPrime2ZGamma & operator=(const MEqq2ZPrime2ZGamma &) = delete;
private:
/**
* Pointer to the vertices for the helicity calculations
*/
//@{
/**
* Pointer to the \f$Z'\f$ vertex
*/
AbstractFFVVertexPtr _theFFZPrimeVertex;
/**
* Pointer to the \f$\gamma Z' Z vertex\f$
*/
AbstractVVVVertexPtr _theGammaZPrimeZVertex;
//@}
/**
* Pointer to the \f$Z'\f$ ParticleData object
*/
tcPDPtr _zPrime;
/**
* Switches to control the particles in the hard process
*/
//@{
/**
* Allowed flavours for the incoming quarks
*/
unsigned int _maxflavour;
//@}
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
};
}
#endif /* RADIATIVEZPRIME_MEqq2ZPrime2ZGamma_H */
diff --git a/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma2ffGamma.h b/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma2ffGamma.h
--- a/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma2ffGamma.h
+++ b/Contrib/RadiativeZPrime/MEqq2ZPrime2ZGamma2ffGamma.h
@@ -1,270 +1,270 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_MEqq2ZPrime2ZGamma2ffGamma_H
#define RADIATIVEZPRIME_MEqq2ZPrime2ZGamma2ffGamma_H
//
// This is the declaration of the MEqq2ZPrime2ZGamma2ffGamma class.
//
#include "ThePEG/MatrixElement/MEBase.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.fh"
namespace RadiativeZPrime {
using namespace ThePEG;
using namespace Herwig;
/**
* The MEqq2ZPrime2ZGamma2ffGamma class simulates \f$q\bar{q}\to Z'\to Z\gamma\f$
* including the decay of the Z boson.
*
* @see \ref MEqq2ZPrime2ZGamma2ffGammaInterfaces "The interfaces"
* defined for MEqq2ZPrime2ZGamma2ffGamma.
*/
class MEqq2ZPrime2ZGamma2ffGamma: public MEBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
inline MEqq2ZPrime2ZGamma2ffGamma() :_maxflavour(5) {}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Used internally by generateKinematics, after calculating the
* limits on cos(theta).
*/
double getCosTheta(double cthmin, double cthmax, const double r);
/**
* Matrix elements for the different subprocesses
*/
//@{
/**
* Matrix element for \f$q\bar{q}\to Z/\gamma g\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param gout Polarization vectors for the outgoing photon
* @param lm Spinors for outgoing lepton
* @param lp Spinors for outgoing antilepton
* @param me Whether or not to calculate the matrix element for spin correlations
**/
InvEnergy2 qqbarME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
vector<VectorWaveFunction> & gout,
vector<SpinorBarWaveFunction> & lm, vector<SpinorWaveFunction> & lp,
bool me=false) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEqq2ZPrime2ZGamma2ffGamma & operator=(const MEqq2ZPrime2ZGamma2ffGamma &);
+ MEqq2ZPrime2ZGamma2ffGamma & operator=(const MEqq2ZPrime2ZGamma2ffGamma &) = delete;
private:
/**
* Vertices for the helicity amplitude calculation
*/
//@{
/**
* Pointer to the Z vertex
*/
AbstractFFVVertexPtr _theFFZVertex;
/**
* Pointer to the \f$Z'\f$ vertex
*/
AbstractFFVVertexPtr _theFFZPrimeVertex;
/**
* Pointer to the \f$\gamma Z' Z vertex\f$
*/
AbstractVVVVertexPtr _theGammaZPrimeZVertex;
//@}
/**
* @name Pointers to the \f$Z^0\f$ and \f$Z'\f$ ParticleData objects
*/
//@{
/**
* Pointer to the Z ParticleData object
*/
tcPDPtr _z0;
/**
* Pointer to the \f$Z'\f$ ParticleData object
*/
tcPDPtr _zPrime;
//@}
/**
* Switches to control the particles in the hard process
*/
//@{
/**
* Allowed flavours for the incoming quarks
*/
unsigned int _maxflavour;
//@}
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
/**
* Storage of the off-shell Z mass to avoid the need to recalculate
*/
Energy2 _mz2;
};
}
#endif /* RADIATIVEZPRIME_MEqq2ZPrime2ZGamma2ffGamma_H */
diff --git a/Contrib/RadiativeZPrime/MEqq2ZPrime2ff.h b/Contrib/RadiativeZPrime/MEqq2ZPrime2ff.h
--- a/Contrib/RadiativeZPrime/MEqq2ZPrime2ff.h
+++ b/Contrib/RadiativeZPrime/MEqq2ZPrime2ff.h
@@ -1,243 +1,243 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_MEqq2ZPrime2ff_H
#define RADIATIVEZPRIME_MEqq2ZPrime2ff_H
//
// This is the declaration of the MEqq2ZPrime2ff class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
namespace RadiativeZPrime {
using namespace ThePEG;
using namespace Herwig;
/**
* The MEqq2ZPrime2ff class implements the matrix element for
* \f$q\bar{q}\to Z'\to f \bar{f}\f$
*
* @see \ref MEqq2ZPrime2ffInterfaces "The interfaces"
* defined for MEqq2ZPrime2ff.
*/
class MEqq2ZPrime2ff: public HwMEBase {
public:
/**
* The default constructor.
*/
MEqq2ZPrime2ff();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Matrix element for \f$q\bar{q}\to \gamma/Z \to f\bar{f}\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param fout Spinors for incoming quark
* @param aout Spinors for incoming antiquark
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qqME(vector<SpinorWaveFunction> & fin ,
vector<SpinorBarWaveFunction> & ain ,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
bool me) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEqq2ZPrime2ff & operator=(const MEqq2ZPrime2ff &);
+ MEqq2ZPrime2ff & operator=(const MEqq2ZPrime2ff &) = delete;
private:
/**
* Pointer to the vertices for the helicity calculations
*/
//@{
/**
* Pointer to the \f$Z'\f$ vertex
*/
AbstractFFVVertexPtr _theFFZPrimeVertex;
/**
* Pointer to the Z vertex
*/
AbstractFFVVertexPtr _theFFZVertex;
/**
* Pointer to the photon vertex
*/
AbstractFFVVertexPtr _theFFPVertex;
//@}
/**
* Pointers to the intermediate resonances
*/
//@{
/**
* Pointer to the \f$Z'\f$ ParticleData object
*/
tcPDPtr _zPrime;
/**
* Pointer to the Z ParticleData object
*/
tcPDPtr _z0;
/**
* Pointer to the photon ParticleData object
*/
tcPDPtr _gamma;
//@}
/**
* Switches to control the particles in the hard process
*/
//@{
/**
* Allowed flavours for the incoming quarks
*/
unsigned int _maxflavour;
/**
* Whether to include both \f$Z^0\f$ and \f$\gamma\f$ or only one
*/
unsigned int _gammaZ;
/**
* Which processes to include
*/
unsigned int _process;
//@}
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
};
}
#endif /* RADIATIVEZPRIME_MEqq2ZPrime2ff_H */
diff --git a/Contrib/RadiativeZPrime/RadiativeZPrimeModel.h b/Contrib/RadiativeZPrime/RadiativeZPrimeModel.h
--- a/Contrib/RadiativeZPrime/RadiativeZPrimeModel.h
+++ b/Contrib/RadiativeZPrime/RadiativeZPrimeModel.h
@@ -1,226 +1,226 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_RadiativeZPrimeModel_H
#define RADIATIVEZPRIME_RadiativeZPrimeModel_H
//
// This is the declaration of the RadiativeZPrimeModel class.
//
#include "Herwig/Models/StandardModel/StandardModel.h"
namespace RadiativeZPrime {
using namespace ThePEG;
/**
* The RadiativeZPrimeModel class is the main class for the radiative
* \f$Z'\f$ model of hep-ph/0501154.
*
* @see \ref RadiativeZPrimeModelInterfaces "The interfaces"
* defined for RadiativeZPrimeModel.
*/
class RadiativeZPrimeModel: public Herwig::StandardModel {
public:
/**
* The default constructor.
*/
inline RadiativeZPrimeModel() :
_gZprime(1.), _useZcouplings(true),
_vnu(1.0), _ve(-0.072), _vu(0.3813), _vd(-0.6907),
_anu(1.0), _ae(-1.0), _au(1.0), _ad(-1.0) {}
/**
* The coupling of the \f$Z'\f$
*/
inline double gZprime() const {return _gZprime;}
/**
* The vector neutrino-\f$Z^0\f$ coupling.
*/
inline double zPrimevnu() const {return _vnu;}
/**
* The vector charged lepton-\f$Z^0\f$ coupling.
*/
inline double zPrimeve() const {return _ve;}
/**
* The vector up-type-\f$Z^0\f$ coupling.
*/
inline double zPrimevu() const {return _vu;}
/**
* The vector down-type-\f$Z^0\f$ coupling.
*/
inline double zPrimevd() const {return _vd;}
/**
* The axial neutrino-\f$Z^0\f$ coupling.
*/
inline double zPrimeanu() const {return _anu;}
/**
* The axial charged lepton-\f$Z^0\f$ coupling.
*/
inline double zPrimeae() const {return _ae;}
/**
* The axial up-type-\f$Z^0\f$ coupling.
*/
inline double zPrimeau() const {return _au;}
/**
* The axial down-type-\f$Z^0\f$ coupling.
*/
inline double zPrimead() const {return _ad;}
/**
* The \f$f\bar{f}Z'\f$ vertex
*/
inline AbstractFFVVertexPtr vertexFFZPrime() const {return _ffZPrimeVertex;}
/**
* The \f$\gamma Z'Z\f$ vertex
*/
inline AbstractVVVVertexPtr vertexGammaZPrimeZ() const {return _gammaZPrimeZVertex;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RadiativeZPrimeModel & operator=(const RadiativeZPrimeModel &);
+ RadiativeZPrimeModel & operator=(const RadiativeZPrimeModel &) = delete;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The free coupling \f$g_{Z'}\f$
*/
double _gZprime;
/**
* Switch to control the setting of the \f$Z'\f$ couplings to fermions
*/
bool _useZcouplings;
/**
* Vector coupling between a fundamental fermion and \f$Z'\f$.
*/
double _vnu;
/**
* Vector coupling between a fundamental fermion and \f$Z'\f$.
*/
double _ve;
/**
* Vector coupling between a fundamental fermion and \f$Z'\f$.
*/
double _vu;
/**
* Vector coupling between a fundamental fermion and \f$Z'\f$.
*/
double _vd;
/**
* Axial coupling between a fundamental fermions and \f$Z'\f$.
*/
double _anu;
/**
* Axial coupling between a fundamental fermions and \f$Z'\f$.
*/
double _ae;
/**
* Axial coupling between a fundamental fermions and \f$Z'\f$.
*/
double _au;
/**
* Axial coupling between a fundamental fermions and \f$Z'\f$.
*/
double _ad;
/**
* The \f$f\bar{f}\f$ vertex
*/
AbstractFFVVertexPtr _ffZPrimeVertex;
/**
* The \f$\gamma Z'Z\f$ vertex
*/
AbstractVVVVertexPtr _gammaZPrimeZVertex;
};
}
namespace ThePEG {
ThePEG_DECLARE_POINTERS(RadiativeZPrime::RadiativeZPrimeModel,
RadiativeZPrimeModelPtr);
}
#endif /* RADIATIVEZPRIME_RadiativeZPrimeModel_H */
diff --git a/Contrib/RadiativeZPrime/SimpleZPrimeAnalysis.h b/Contrib/RadiativeZPrime/SimpleZPrimeAnalysis.h
--- a/Contrib/RadiativeZPrime/SimpleZPrimeAnalysis.h
+++ b/Contrib/RadiativeZPrime/SimpleZPrimeAnalysis.h
@@ -1,186 +1,186 @@
// -*- C++ -*-
#ifndef RADIATIVEZPRIME_SimpleZPrimeAnalysis_H
#define RADIATIVEZPRIME_SimpleZPrimeAnalysis_H
//
// This is the declaration of the SimpleZPrimeAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace RadiativeZPrime {
using namespace ThePEG;
using Herwig::HistogramPtr;
/**
* Here is the documentation of the SimpleZPrimeAnalysis class.
*
* @see \ref SimpleZPrimeAnalysisInterfaces "The interfaces"
* defined for SimpleZPrimeAnalysis.
*/
class SimpleZPrimeAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SimpleZPrimeAnalysis & operator=(const SimpleZPrimeAnalysis &);
+ SimpleZPrimeAnalysis & operator=(const SimpleZPrimeAnalysis &) = delete;
private:
/**
* Histogram for the Z \f$p_T\f$
*/
HistogramPtr _ptZ;
/**
* Histogram for the Z rapidity
*/
HistogramPtr _rapZ;
/**
* Histogram for the Z azimuth
*/
HistogramPtr _phiZ;
/**
* Histogram for the photon \f$p_T\f$
*/
HistogramPtr _ptgamma;
/**
* Histogram for the photon rapidity
*/
HistogramPtr _rapgamma;
/**
* Histogram for the photon azimuth
*/
HistogramPtr _phigamma;
/**
* Histogram for the \f$e^+\f$ \f$p_T\f$
*/
HistogramPtr _ptep;
/**
* Histogram for the \f$e^+\f$ rapidity
*/
HistogramPtr _rapep;
/**
* Histogram for the \f$e^+\f$ azimuth
*/
HistogramPtr _phiep;
/**
* Histogram for the \f$e^-\f$ \f$p_T\f$
*/
HistogramPtr _ptem;
/**
* Histogram for the \f$e^-\f$ rapidity
*/
HistogramPtr _rapem;
/**
* Histogram for the \f$e^-\f$ azimuth
*/
HistogramPtr _phiem;
/**
* Histogram for the mass of the photon and Z
*/
HistogramPtr _masspair;
/**
* Histgram for the mass of the Z
*/
HistogramPtr _massZ;
/**
* Histogram for the mass of the photon and \f$e^+\f$
*/
HistogramPtr _massgammaep;
/**
* Histogram for the mass of the photon and \f$e^-\f$
*/
HistogramPtr _massgammaem;
};
}
#endif /* RADIATIVEZPRIME_SimpleZPrimeAnalysis_H */
diff --git a/Contrib/ShowerVeto/NonBShowerVeto.h b/Contrib/ShowerVeto/NonBShowerVeto.h
--- a/Contrib/ShowerVeto/NonBShowerVeto.h
+++ b/Contrib/ShowerVeto/NonBShowerVeto.h
@@ -1,75 +1,75 @@
// -*- C++ -*-
#ifndef Herwig_NonBShowerVeto_H
#define Herwig_NonBShowerVeto_H
//
// This is the declaration of the NonBShowerVeto class.
//
#include "Herwig/Shower/QTilde/Base/FullShowerVeto.h"
namespace Herwig {
using namespace ThePEG;
/**
* The NonBShowerVeto class vetos parton showers where no b (anti)quarks are produced.
*
* @see \ref NonBShowerVetoInterfaces "The interfaces"
* defined for NonBShowerVeto.
*/
class NonBShowerVeto: public FullShowerVeto {
public:
/**
* The default constructor.
*/
NonBShowerVeto() {}
protected:
/**
* Determine whether to not to veto the shower, to be implemented in inheriting classes
*/
virtual bool vetoShower();
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NonBShowerVeto & operator=(const NonBShowerVeto &);
+ NonBShowerVeto & operator=(const NonBShowerVeto &) = delete;
};
}
#endif /* Herwig_NonBShowerVeto_H */
diff --git a/Contrib/TauAnalysis/Tau5Pion.h b/Contrib/TauAnalysis/Tau5Pion.h
--- a/Contrib/TauAnalysis/Tau5Pion.h
+++ b/Contrib/TauAnalysis/Tau5Pion.h
@@ -1,187 +1,187 @@
// -*- C++ -*-
#ifndef HERWIG_Tau5Pion_H
#define HERWIG_Tau5Pion_H
//
// This is the declaration of the Tau5Pion class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the Tau5Pion class.
*
* @see \ref Tau5PionInterfaces "The interfaces"
* defined for Tau5Pion.
*/
class Tau5Pion: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
using AnalysisHandler::analyze;
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Tau5Pion & operator=(const Tau5Pion &);
+ Tau5Pion & operator=(const Tau5Pion &) = delete;
private:
/**
* Histograms for the \f$\pi\pi\f$ masses
*/
//@{
/**
* Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay
*/
vector<HistogramPtr> _pipi1;
/**
* Histograms for the \f$4\pi^02\pi^-\f$ decay
*/
vector<HistogramPtr> _pipi2;
/**
* Histograms for the \f$3\pi^-2\pi^+\f$ decay
*/
vector<HistogramPtr> _pipi3;
//@}
/**
* Histograms for the \f$\pi\pi\pi\f$ masses
*/
//@{
/**
* Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay
*/
vector<HistogramPtr> _pipipi1;
/**
* Histograms for the \f$4\pi^02\pi^-\f$ decay
*/
vector<HistogramPtr> _pipipi2;
/**
* Histograms for the \f$3\pi^-2\pi^+\f$ decay
*/
vector<HistogramPtr> _pipipi3;
//@}
/**
* Histograms for the \f$\pi\pi\pi\pi\f$ masses
*/
//@{
/**
* Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay
*/
vector<HistogramPtr> _pipipipi1;
/**
* Histograms for the \f$4\pi^02\pi^-\f$ decay
*/
vector<HistogramPtr> _pipipipi2;
/**
* Histograms for the \f$3\pi^-2\pi^+\f$ decay
*/
vector<HistogramPtr> _pipipipi3;
//@}
/**
* Histograms for the total hadronic mass
*/
//@{
/**
* Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay
*/
HistogramPtr _q1;
/**
* Histograms for the \f$4\pi^02\pi^-\f$ decay
*/
HistogramPtr _q2;
/**
* Histograms for the \f$3\pi^-2\pi^+\f$ decay
*/
HistogramPtr _q3;
//@}
};
}
#endif /* HERWIG_Tau5Pion_H */
diff --git a/Contrib/TauAnalysis/TauCorrelationAnalysis.h b/Contrib/TauAnalysis/TauCorrelationAnalysis.h
--- a/Contrib/TauAnalysis/TauCorrelationAnalysis.h
+++ b/Contrib/TauAnalysis/TauCorrelationAnalysis.h
@@ -1,169 +1,169 @@
// -*- C++ -*-
#ifndef HERWIG_TauCorrelationAnalysis_H
#define HERWIG_TauCorrelationAnalysis_H
//
// This is the declaration of the TauCorrelationAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* The documentation of the TauCorrelationAnalysis class is designed to
* perform some analysis of the distributions of tau decay products in
* Higgs decays.
*
* The analysis of the pion decays is based on hep-ph/0202007 and the
* rho decays is based on hep-ph/0204292.
*
* @see \ref TauCorrelationAnalysisInterfaces "The interfaces"
* defined for TauCorrelationAnalysis.
*/
class TauCorrelationAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
protected:
/**
* Methods to perform the analysis
*/
//@{
/**
* Analyze the given particle for correlations with pi.
* @param particle pointer to the particle to be analyzed.
*/
void analyzePi(tPPtr particle, ParticleVector children);
/**
* Analyze the given particle for correlations with rho.
* @param particle pointer to the particle to be analyzed.
*/
void analyzeRho(tPPtr particle, ParticleVector children);
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TauCorrelationAnalysis & operator=(const TauCorrelationAnalysis &);
+ TauCorrelationAnalysis & operator=(const TauCorrelationAnalysis &) = delete;
private:
/**
* Histogram of the \f$\phi\f$ angle in
* \f$H\to\tau^+\tau^-\to\pi^+\bar{\nu}_tau\pi^-\nu_tau\f$
*/
HistogramPtr _phi;
/**
* Histogram of the \f$\delta\f$ angle in
* \f$H\to\tau^+\tau^-\to\pi^+\bar{\nu}_tau\pi^-\nu_tau\f$
*/
HistogramPtr _delta;
/**
* Histogram of the \f$\phi\f$ angle in
* \f$H\to\tau^+\tau^-\to\rho^+\bar{\nu}_tau\rho^-\nu_tau\f$
*/
//@{
/**
* First angle
*/
HistogramPtr _rhoangle1;
/**
* Second angle
*/
HistogramPtr _rhoangle2;
//@}
};
}
#endif /* HERWIG_TauCorrelationAnalysis_H */
diff --git a/Contrib/TauAnalysis/TauTo2MesonAnalysis.h b/Contrib/TauAnalysis/TauTo2MesonAnalysis.h
--- a/Contrib/TauAnalysis/TauTo2MesonAnalysis.h
+++ b/Contrib/TauAnalysis/TauTo2MesonAnalysis.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
#ifndef HERWIG_TauTo2MesonAnalysis_H
#define HERWIG_TauTo2MesonAnalysis_H
//
// This is the declaration of the TauTo2MesonAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* The TauTo2MesonAnalysis class is designed to perform the analysis of the
* mass distribution of the hadronic decay products of the \f$\tau\f$ in the decays
* \f$\tau^\pm\to\nu_\tau\{\pi^\pm\pi^0,K^\pm\pi^0,K^0\pi^\pm,K^\pm\eta,K^\pm K^0\}\f$.
* In order to work the \f$\pi^0\f$, \f$K^0\f$, \f$K^\pm\f$ and \f$\eta\f$ should be
* set stable.
*
* The mass spectrum of the \f$pi^\pm\pi^0\f$ final state is compared to CLEO and
* BELLE data.
*
* @see \ref TauTo2MesonAnalysisInterfaces "The interfaces"
* defined for TauTo2MesonAnalysis.
*/
class TauTo2MesonAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
using AnalysisHandler::analyze;
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TauTo2MesonAnalysis & operator=(const TauTo2MesonAnalysis &);
+ TauTo2MesonAnalysis & operator=(const TauTo2MesonAnalysis &) = delete;
private:
/**
* Histograms for the mass plots
*/
//@{
/**
* Mass of the pions in \f$\tau\pm\to\nu_\tau\pi^0\pi^\pm\f$ compared to BELLE
* and CLEO data.
*/
HistogramPtr _m2pipiBELLE,_mpipiCLEO;
/**
* Mass of the Kaons and pions in \f$\tau\to K\pi\f$
*/
HistogramPtr _m2KpiA,_m2KpiB,_mKpiA,_mKpiB,_m2KpiC,_m2KpiD;
/**
* Mass of the \f$K\eta\f$
*/
HistogramPtr _m2Keta,_mKeta;
/**
* Mass of the \f$KK\f$
*/
HistogramPtr _m2KK,_mKK;
//@}
};
}
#endif /* HERWIG_TauTo2MesonAnalysis_H */
diff --git a/Contrib/TauAnalysis/TauTo3MesonAnalysis.h b/Contrib/TauAnalysis/TauTo3MesonAnalysis.h
--- a/Contrib/TauAnalysis/TauTo3MesonAnalysis.h
+++ b/Contrib/TauAnalysis/TauTo3MesonAnalysis.h
@@ -1,187 +1,187 @@
// -*- C++ -*-
#ifndef HERWIG_TauTo3MesonAnalysis_H
#define HERWIG_TauTo3MesonAnalysis_H
//
// This is the declaration of the TauTo3MesonAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* The TauTo3MesonAnalysis class is designed to perform the analysis of the
* mass distribution of the hadronic decay products of the \f$\tau\f$ in the decays
* - \f$\tau^-\to\nu_tau \pi^+\pi^-\pi^- \f$
* - \f$\tau^-\to\nu_tau \pi^0\pi^0\pi^- \f$
* - \f$\tau^-\to\nu_tau K^-K^+\pi^- \f$
* - \f$\tau^-\to\nu_tau K^0\bar{K}^0\pi^-\f$
* - \f$\tau^-\to\nu_tau K^-K^0\pi^0 \f$
* - \f$\tau^-\to\nu_tau \pi^0-\pi^0K^- \f$
* - \f$\tau^-\to\nu_tau K^-\pi^-\pi^+ \f$
* - \f$\tau^-\to\nu_tau \pi^-K^0\pi^0 \f$
* - \f$\tau^-\to\nu_tau \pi^-\pi^0\eta \f$
* - \f$\tau^-\to\nu_tau \pi^-\pi^0\gamma \f$
*
* @see \ref TauTo3MesonAnalysisInterfaces "The interfaces"
* defined for TauTo3MesonAnalysis.
*/
class TauTo3MesonAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
using AnalysisHandler::analyze;
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TauTo3MesonAnalysis & operator=(const TauTo3MesonAnalysis &);
+ TauTo3MesonAnalysis & operator=(const TauTo3MesonAnalysis &) = delete;
private:
/**
* Histograms for \f$\tau^-\to\nu_tau \pi^+\pi^-\pi^- \f$
*/
vector<HistogramPtr> _m3pippimpim;
/**
* Histograms for \f$\tau^-\to\nu_tau \pi^0\pi^0\pi^- \f$
*/
vector<HistogramPtr> _m3pi0pi0pim;
/**
* Histograms for \f$\tau^-\to\nu_tau K^-K^+\pi^- \f$
*/
vector<HistogramPtr> _m3kmpimkp;
/**
* Histograms for \f$\tau^-\to\nu_tau K^0\bar{K}^0\pi^-\f$
*/
vector<HistogramPtr> _m3k0pimk0;
/**
* Histograms for \f$\tau^-\to\nu_tau K^-K^0\pi^0 \f$
*/
vector<HistogramPtr> _m3kmpi0k0;
/**
* Histograms for \f$\tau^-\to\nu_tau \pi^0\pi^0K^- \f$
*/
vector<HistogramPtr> _m3pi0pi0km;
/**
* Histograms for \f$\tau^-\to\nu_tau K^-\pi^-\pi^+ \f$
*/
vector<HistogramPtr> _m3kmpimpip;
/**
* Histograms for \f$\tau^-\to\nu_tau \pi^-K^0\pi^0 \f$
*/
vector<HistogramPtr> _m3pimk0pi0;
/**
* Histograms for \f$\tau^-\to\nu_tau \pi^-\pi^0\eta \f$
*/
vector<HistogramPtr> _m3pimpi0eta;
/**
* Histograms for \f$\tau^-\to\nu_tau \pi^-\pi^0\gamma \f$
*/
vector<HistogramPtr> _m3pimpi0gamma;
/**
* Histograms for \f$\tau^-\to\nu_tau K^0_SK^0_S\pi^-\f$
*/
vector<HistogramPtr> _m3kspimks;
/**
* Histograms for \f$\tau^-\to\nu_tau K^0_LK^0_L\pi^-\f$
*/
vector<HistogramPtr> _m3klpimkl;
/**
* Histograms for \f$\tau^-\to\nu_tau K^0_SK^0_L\pi^-\f$
*/
vector<HistogramPtr> _m3kspimkl;
};
}
#endif /* HERWIG_TauTo3MesonAnalysis_H */
diff --git a/Contrib/TauAnalysis/TauTo4MesonAnalysis.h b/Contrib/TauAnalysis/TauTo4MesonAnalysis.h
--- a/Contrib/TauAnalysis/TauTo4MesonAnalysis.h
+++ b/Contrib/TauAnalysis/TauTo4MesonAnalysis.h
@@ -1,122 +1,122 @@
// -*- C++ -*-
#ifndef HERWIG_TauTo4MesonAnalysis_H
#define HERWIG_TauTo4MesonAnalysis_H
//
// This is the declaration of the TauTo4MesonAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the TauTo4MesonAnalysis class.
*
* @see \ref TauTo4MesonAnalysisInterfaces "The interfaces"
* defined for TauTo4MesonAnalysis.
*/
class TauTo4MesonAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
using AnalysisHandler::analyze;
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TauTo4MesonAnalysis & operator=(const TauTo4MesonAnalysis &);
+ TauTo4MesonAnalysis & operator=(const TauTo4MesonAnalysis &) = delete;
private:
/**
* Histograms for the \f$\pi\pi\f$ mass distributions
*/
vector<HistogramPtr> _mpipi;
/**
* Histograms for the \f$\pi\pi\pi\f$ mass distributions
*/
vector<HistogramPtr> _mpipipi;
/**
* Histograms for the \f$\pi\pi\pi\pi\f$ mass distributions
*/
vector<HistogramPtr> _mpipipipi;
};
}
#endif /* HERWIG_TauTo4MesonAnalysis_H */
diff --git a/Contrib/TauAnalysis/TauToLeptonsAnalysis.h b/Contrib/TauAnalysis/TauToLeptonsAnalysis.h
--- a/Contrib/TauAnalysis/TauToLeptonsAnalysis.h
+++ b/Contrib/TauAnalysis/TauToLeptonsAnalysis.h
@@ -1,117 +1,117 @@
// -*- C++ -*-
#ifndef HERWIG_TauToLeptonsAnalysis_H
#define HERWIG_TauToLeptonsAnalysis_H
//
// This is the declaration of the TauToLeptonsAnalysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the TauToLeptonsAnalysis class.
*
* @see \ref TauToLeptonsAnalysisInterfaces "The interfaces"
* defined for TauToLeptonsAnalysis.
*/
class TauToLeptonsAnalysis: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
using AnalysisHandler::analyze;
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TauToLeptonsAnalysis & operator=(const TauToLeptonsAnalysis &);
+ TauToLeptonsAnalysis & operator=(const TauToLeptonsAnalysis &) = delete;
private:
/**
* Histogram for the electron final state
*/
HistogramPtr _emode;
/**
* Histogram for the muon final state
*/
HistogramPtr _mmode;
};
}
#endif /* HERWIG_TauToLeptonsAnalysis_H */
diff --git a/Contrib/VBFTest/QuickVBF.h b/Contrib/VBFTest/QuickVBF.h
--- a/Contrib/VBFTest/QuickVBF.h
+++ b/Contrib/VBFTest/QuickVBF.h
@@ -1,111 +1,111 @@
// -*- C++ -*-
#ifndef HERWIG_QuickVBF_H
#define HERWIG_QuickVBF_H
//
// This is the declaration of the QuickVBF class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the QuickVBF class.
*
* @see \ref QuickVBFInterfaces "The interfaces"
* defined for QuickVBF.
*/
class QuickVBF: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- QuickVBF & operator=(const QuickVBF &);
+ QuickVBF & operator=(const QuickVBF &) = delete;
private:
HistogramPtr _mH ,_cosH ,_eH ,_phiH ;
HistogramPtr _cosnu ,_enu ,_phinu ;
HistogramPtr _cosnub,_enub,_phinub;
HistogramPtr _cosem ,_eem ,_phiem ;
HistogramPtr _cosep ,_eep ,_phiep ;
};
}
#endif /* HERWIG_QuickVBF_H */
diff --git a/Contrib/VBFTest/QuickVBFHadron.h b/Contrib/VBFTest/QuickVBFHadron.h
--- a/Contrib/VBFTest/QuickVBFHadron.h
+++ b/Contrib/VBFTest/QuickVBFHadron.h
@@ -1,111 +1,111 @@
// -*- C++ -*-
#ifndef HERWIG_QuickVBFHadron_H
#define HERWIG_QuickVBFHadron_H
//
// This is the declaration of the QuickVBFHadron class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the QuickVBFHadron class.
*
* @see \ref QuickVBFHadronInterfaces "The interfaces"
* defined for QuickVBFHadron.
*/
class QuickVBFHadron: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- QuickVBFHadron & operator=(const QuickVBFHadron &);
+ QuickVBFHadron & operator=(const QuickVBFHadron &) = delete;
private:
HistogramPtr _mH ,_yH ,_pTH[2] ,_phiH ;
HistogramPtr _yjet,_pTjet[2],_phijet;
HistogramPtr _mjj;
static bool _doOnce;
};
}
#endif /* HERWIG_QuickVBFHadron_H */
diff --git a/Decay/Baryon/Baryon1MesonDecayerBase.cc b/Decay/Baryon/Baryon1MesonDecayerBase.cc
--- a/Decay/Baryon/Baryon1MesonDecayerBase.cc
+++ b/Decay/Baryon/Baryon1MesonDecayerBase.cc
@@ -1,978 +1,978 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the Baryon1MesonDecayerBase class.
//
#include "Baryon1MesonDecayerBase.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/PDT/DecayMode.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorBarWaveFunction.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
// The following static variable is needed for the type
// description system in ThePEG.
DescribeAbstractNoPIOClass<Baryon1MesonDecayerBase,DecayIntegrator>
describeHerwigBaryon1MesonDecayerBase("Herwig::Baryon1MesonDecayerBase", "HwBaryonDecay.so");
void Baryon1MesonDecayerBase::Init() {
static ClassDocumentation<Baryon1MesonDecayerBase> documentation
("The Baryon1MesonDecayerBase class is the base class for"
" the decays of the baryons to a baryon and a pseudoscalar or vector meson.");
}
// return the matrix element squared for a given mode and phase-space channel
// (inherited from DecayIntegrator and implemented here)
double Baryon1MesonDecayerBase::me2(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
double me(0.);
// decide which matrix element we are doing
// incoming spin-1/2 particle
if(inpart.dataPtr()->iSpin()==2) {
// decay to spin-1/2 particle
if(decay[0]->dataPtr()->iSpin()==2) {
// scalar meson
if(decay[1]->dataPtr()->iSpin()==1)
me=halfHalfScalar(ichan,inpart,decay,meopt);
// vector meson
else if(decay[1]->dataPtr()->iSpin()==3)
me=halfHalfVector(ichan,inpart,decay,meopt);
else
throw DecayIntegratorError() << "Unknown outgoing meson spin in "
<< "Baryon1MesonDecayerBase::me2()"
<< Exception::abortnow;
}
// decay to spin-3/2 particle
else if(decay[0]->dataPtr()->iSpin()==4) {
// scalar meson
if(decay[1]->dataPtr()->iSpin()==1)
me=halfThreeHalfScalar(ichan,inpart,decay,meopt);
// vector meson
else if(decay[1]->dataPtr()->iSpin()==3)
me=halfThreeHalfVector(ichan,inpart,decay,meopt);
else
throw DecayIntegratorError() << "Unknown outgoing meson spin in "
<< "Baryon1MesonDecayerBase::me2()"
<< Exception::abortnow;
}
// unknown
else
throw DecayIntegratorError() << "Unknown outgoing baryon spin in "
<< "Baryon1MesonDecayerBase::me2()"
<< Exception::abortnow;
}
// incoming spin-3/2 particle
else if(inpart.dataPtr()->iSpin()==4) {
// decay to spin-1/2 particle
if(decay[0]->dataPtr()->iSpin()==2) {
// scalar meson
if(decay[1]->dataPtr()->iSpin()==1)
me=threeHalfHalfScalar(ichan,inpart,decay,meopt);
// vector meson
else if(decay[1]->dataPtr()->iSpin()==3)
me=threeHalfHalfVector(ichan,inpart,decay,meopt);
else
throw DecayIntegratorError() << "Unknown outgoing meson spin in "
<< "Baryon1MesonDecayerBase::me2()"
<< Exception::abortnow;
}
// decay to spin-3/2 particle
else if(decay[0]->dataPtr()->iSpin()==4) {
// scalar meson
if(decay[1]->dataPtr()->iSpin()==1)
me=threeHalfThreeHalfScalar(ichan,inpart,decay,meopt);
else
throw DecayIntegratorError() << "Unknown outgoing meson spin in "
<< "Baryon1MesonDecayerBase::me2()"
<< Exception::abortnow;
}
// unknown
else
throw DecayIntegratorError() << "Unknown outgoing baryon spin in "
<< "Baryon1MesonDecayerBase::me2()"
<< Exception::abortnow;
}
// unknown
else
throw DecayIntegratorError() << "Unknown incoming spin in "
<< "Baryon1MesonDecayerBase::me2()"
<< Exception::abortnow;
return me;
}
// matrix element for the decay of a spin-1/2 fermion to a spin-1/2 fermion and
// a pseudoscalar meson
double Baryon1MesonDecayerBase::
halfHalfScalar(const int,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin1Half,PDT::Spin1Half,PDT::Spin0)));
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
// matrix element
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorBarWaveFunction::constructSpinInfo(_inHalfBar,decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorWaveFunction::constructSpinInfo(_inHalf,decay[0],outgoing,true);
}
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
// spinors for the decay product
if(inpart.id()>0) {
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,decay[0],outgoing);
}
else {
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,decay[0],outgoing);
}
// get the couplings
Complex A,B;
halfHalfScalarCoupling(imode(),inpart.mass(),decay[0]->mass(),decay[1]->mass(),A,B);
Complex left,right,meout;
// coupling for an incoming particle
if(inpart.id()>0) {
left = (A-B);
right = (A+B);
}
// coupling for an incoming antiparticle
else {
left = conj(A+B);
right = conj(A-B);
}
// calculate the matrix element
vector<unsigned int> ispin(3,0);
unsigned int ix,iy;
// Complex output(0.);
for(ix=0;ix<2;++ix) {
for(iy=0;iy<2;++iy) {
if(decay[0]->id()>0){ispin[0]=iy;ispin[1]=ix;}
else{ispin[0]=ix;ispin[1]=iy;}
- (*ME())(ispin)=_inHalf[iy].generalScalar(_inHalfBar[ix],left,right)/inpart.mass();
+ (*ME())(ispin)=Complex(_inHalf[iy].generalScalar(_inHalfBar[ix],left,right)/inpart.mass());
// output += norm(ME()(ispin));
}
}
// test of the matrix elemen// t
// Energy m1(inpart.mass()),m2(decay[0]->mass()),m3(decay[1]->mass());
// Energy Qp(sqrt(sqr(m1+m2)-sqr(m3))),Qm(sqrt(sqr(m1-m2)-sqr(m3)));
// Complex h1(2.*Qp*A/inpart.mass()),h2(-2.*Qm*B/inpart.mass());
// generator()->log() << "testing 1/2->1/2 0 "
// << 0.5*output << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2)) << " "
// << 0.5*(h1*conj(h1)+h2*conj(h2))/output << endl;
// generator()->log() << "testing alpha " <<
// (norm(0.5*(h1+h2))-norm(0.5*(h1-h2)))/
// (norm(0.5*(h1+h2))+norm(0.5*(h1-h2))) << "\n";
// Energy pcm(Kinematics::pstarTwoBodyDecay(m1,m2,m3));
// generator()->log() << "testing masses " << m1/GeV << " " << m2/GeV << " " << m3/GeV
// << "\n";
// generator()->log() << "testing partial " << pcm*0.5*output/8./Constants::pi/MeV
// << "\n";
// store the matrix element
return (ME()->contract(_rho)).real();
}
// matrix element for the decay of a spin-1/2 fermion to a spin-1/2 fermion and
// a vector meson
double Baryon1MesonDecayerBase::
halfHalfVector(const int,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin1Half,PDT::Spin1Half,PDT::Spin1)));
// check if the outgoing meson is really a photon
bool photon=decay[1]->id()==ParticleID::gamma;
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
// matrix element
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorBarWaveFunction::constructSpinInfo(_inHalfBar,decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorWaveFunction::constructSpinInfo(_inHalf,decay[0],outgoing,true);
}
VectorWaveFunction::constructSpinInfo(_inVec,decay[1],outgoing,true,photon);
return 0.;
}
// spinors for the decay product
if(inpart.id()>0) {
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,decay[0],outgoing);
}
else {
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,decay[0],outgoing);
}
VectorWaveFunction::calculateWaveFunctions(_inVec,decay[1],outgoing,photon);
// get the couplings
Complex A1,A2,B1,B2;
halfHalfVectorCoupling(imode(),inpart.mass(),decay[0]->mass(),decay[1]->mass(),
A1,A2,B1,B2);
Complex lS,rS,lV,rV;
complex<Energy> scalar;
// couplings for an incoming particle
if(inpart.id()>0) {
lS = (A2-B2);
rS = (A2+B2);
lV = (A1-B1);
rV = (A1+B1);
}
else {
lS = -conj(A2+B2);
rS = -conj(A2-B2);
lV = conj(A1-B1);
rV = conj(A1+B1);
}
// calculate the matrix element
// decide which type of mode to do
Energy msum(inpart.mass()+decay[0]->mass());
vector<unsigned int> ispin(3);
LorentzVector<complex<Energy> > svec;
Complex prod;
// Complex output(0.);
unsigned int ix,iy;
for(ix=0;ix<2;++ix) {
for(iy=0;iy<2;++iy) {
// scalar like piece
scalar = _inHalf[iy].generalScalar(_inHalfBar[ix],lS,rS);
// vector like piece
svec = _inHalf[iy].generalCurrent(_inHalfBar[ix],lV,rV);
if(decay[0]->id()>0) {
ispin[0] = iy;
ispin[1] = ix;
}
else {
ispin[0] = ix;
ispin[1] = iy;
}
for(ispin[2]=0;ispin[2]<3;++ispin[2]) {
ispin[2]=ispin[2];
prod=_inVec[ispin[2]].dot(inpart.momentum())/msum;
(*ME())(ispin)=(svec.dot(_inVec[ispin[2]])+prod*scalar)/inpart.mass();
// output += norm(ME()(ispin));
}
}
}
// test of the matrix element
// Energy m1(inpart.mass()),m2(decay[0]->mass()),m3(decay[1]->mass());
// Energy Qp(sqrt(sqr(m1+m2)-sqr(m3))),Qm(sqrt(sqr(m1-m2)-sqr(m3)));
// double r2(sqrt(2.));
// Energy pcm(Kinematics::pstarTwoBodyDecay(m1,m2,m3));
// Complex h1(2.*r2*Qp*B1/inpart.mass()),h2(-2.*r2*Qm*A1/inpart.mass()),
// h3(2./m3*(Qp*(m1-m2)*B1-Qm*m1*B2*pcm/(m1+m2))/inpart.mass()),
// h4(2./m3*(Qm*(m1+m2)*A1+Qp*m1*A2*pcm/(m1+m2))/inpart.mass());
// generator()->log() << "testing 1/2->1/2 1 "
// << 0.5*output << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2)+h3*conj(h3)+h4*conj(h4)) << " "
// << 0.50*(h1*conj(h1)+h2*conj(h2)+h3*conj(h3)+h4*conj(h4))/output
// << "\n";
// generator()->log() << "alpha = " << 2.*(norm(h3)+norm(h4))/(norm(h1)+norm(h2))-1.
// << "\n";
// return the answer
return (ME()->contract(_rho)).real();
}
// matrix element for the decay of a spin-1/2 fermion to a spin-3/2 fermion and
// a scalar meson
double Baryon1MesonDecayerBase::halfThreeHalfScalar(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin1Half,PDT::Spin3Half,PDT::Spin0)));
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
// matrix element
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorBarWaveFunction::constructSpinInfo(_inThreeHalfBar,
decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorWaveFunction::constructSpinInfo(_inThreeHalf,
decay[0],outgoing,true);
}
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
// spinors for the decay product
LorentzPolarizationVector in=UnitRemoval::InvE*inpart.momentum();
if(inpart.id()>0) {
RSSpinorBarWaveFunction::
calculateWaveFunctions(_inThreeHalfBar,decay[0],outgoing);
_inHalfBar.resize(_inThreeHalfBar.size());
for(unsigned int ix=0;ix<_inThreeHalfBar.size();++ix)
_inHalfBar[ix] = _inThreeHalfBar[ix].dot(in);
}
else {
RSSpinorWaveFunction::
calculateWaveFunctions(_inThreeHalf,decay[0],outgoing);
_inHalf.resize(_inThreeHalf.size());
for(unsigned int ix=0;ix<_inThreeHalf.size();++ix)
_inHalf[ix] = _inThreeHalf[ix].dot(in);
}
// get the couplings
Complex A,B,left,right;
Energy msum(inpart.mass()+decay[0]->mass());
halfThreeHalfScalarCoupling(imode(),inpart.mass(),decay[0]->mass(),decay[1]->mass(),
A,B);
// incoming particle
if(inpart.id()>0) {
left=(A-B);
right=(A+B);
}
// incoming anti-particle
else {
left=conj(A+B);
right=conj(A-B);
}
vector<unsigned int> ispin(3,0);
//Complex output(0.);
for(unsigned ixa=0;ixa<2;++ixa) {
for(unsigned int iya=0;iya<4;++iya) {
unsigned int ix(iya),iy(ixa);
if(decay[0]->id()<0) swap(ix,iy);
ispin[0]=ixa;
ispin[1]=iya;
complex<double> value = _inHalf[iy].generalScalar(_inHalfBar[ix],left,right)
*UnitRemoval::E/inpart.mass()/msum;
(*ME())(ispin) = value;
//output+= norm(ME()(ispin));
}
}
double output = (ME()->contract(_rho)).real();
// test of the matrix element
// Energy m1(inpart.mass()),m2(decay[0]->mass()),m3(decay[1]->mass());
// Energy Qp(sqrt(sqr(m1+m2)-sqr(m3))),Qm(sqrt(sqr(m1-m2)-sqr(m3)));
// double r23(sqrt(2./3.));
// Energy pcm(Kinematics::pstarTwoBodyDecay(m1,m2,m3));
// complex<Energy> h1(-2.*r23*pcm*m1/m2*Qm*B/(m1+m2)),h2( 2.*r23*pcm*m1/m2*Qp*A/(m1+m2));
// cout << "testing 1/2->3/2 0 " << inpart.id() << " "
// << output << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2))/sqr(inpart.mass()) << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2))/sqr(inpart.mass())/output << endl;
// return the answer
return output;
}
// matrix element for the decay of a spin-1/2 fermion to a spin-3/2 fermion and
// a vector meson
double Baryon1MesonDecayerBase::
halfThreeHalfVector(const int,const Particle & inpart,
const ParticleVector & decay, MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin1Half,PDT::Spin3Half,PDT::Spin1)));
// check if the outgoing meson is really a photon
bool photon=decay[1]->id()==ParticleID::gamma;
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
// matrix element
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorBarWaveFunction::constructSpinInfo(_inThreeHalfBar,
decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorWaveFunction::constructSpinInfo(_inThreeHalf,
decay[0],outgoing,true);
}
VectorWaveFunction::constructSpinInfo(_inVec,decay[1],outgoing,true,photon);
return 0.;
}
LorentzPolarizationVector in=UnitRemoval::InvE*inpart.momentum();
if(inpart.id()>0) {
RSSpinorBarWaveFunction::
calculateWaveFunctions(_inThreeHalfBar,decay[0],outgoing);
_inHalfBar.resize(_inThreeHalfBar.size());
for(unsigned int ix=0;ix<_inThreeHalfBar.size();++ix)
_inHalfBar[ix] = _inThreeHalfBar[ix].dot(in);
}
else {
RSSpinorWaveFunction::
calculateWaveFunctions(_inThreeHalf,decay[0],outgoing);
_inHalf.resize(_inThreeHalf.size());
for(unsigned int ix=0;ix<_inThreeHalf.size();++ix)
_inHalf[ix] = _inThreeHalf[ix].dot(in);
}
ME()->zero();
VectorWaveFunction::calculateWaveFunctions(_inVec,decay[1],outgoing,photon);
// get the couplings
Complex A1,A2,A3,B1,B2,B3;
halfThreeHalfVectorCoupling(imode(),inpart.mass(),decay[0]->mass(),decay[1]->mass(),
A1,A2,A3,B1,B2,B3);
Energy msum(inpart.mass()+decay[0]->mass());
Complex lS,rS,lV,rV,left,right;
// incoming particle
if(inpart.id()>0) {
lS=(A3-B3);rS=(A3+B3);
lV=(A2-B2);rV=(A2+B2);
left=(A1-B1);right=(A1+B1);
}
// incoming anti-particle
else {
lS=conj(A3+B3);rS=conj(A3-B3);
lV=-conj(A2-B2);rV=-conj(A2+B2);
left=conj(A1+B1);right=conj(A1-B1);
}
// compute the matrix element
vector<unsigned int> ispin(3);
LorentzVector<complex<Energy> > svec;
Complex prod;
complex<Energy> scalar;
LorentzSpinor<SqrtEnergy> stemp;
LorentzSpinorBar<SqrtEnergy> sbtemp;
for(unsigned iya=0;iya<4;++iya) {
ispin[1]=iya;
// piece where the vector-spinor is dotted with the momentum of the
// incoming fermion
for(unsigned ixa=0;ixa<2;++ixa) {
unsigned int ix(iya),iy(ixa);
if(decay[0]->id()<0) swap(ix,iy);
scalar = _inHalf[iy].generalScalar (_inHalfBar[ix],lS,rS);
svec = _inHalf[iy].generalCurrent(_inHalfBar[ix],lV,rV);
ispin[0]=ixa;
for(unsigned int iz=0;iz<3;++iz) {
ispin[2]=iz;
prod=_inVec[iz].dot(inpart.momentum())/msum;
(*ME())(ispin) += (svec.dot(_inVec[iz])+prod*scalar)*
UnitRemoval::E/msum/inpart.mass();
}
}
// the piece where the vector spinor is dotted with the polarization vector
for(unsigned int iz=0;iz<3;++iz) {
ispin[2]=iz;
if(decay[0]->id()>0) sbtemp = _inThreeHalfBar[iya].dot(_inVec[iz]);
else stemp = _inThreeHalf[iya].dot(_inVec[iz]);
for(unsigned int ixa=0;ixa<2;++ixa) {
ispin[0]=ixa;
if(decay[0]->id()>0) stemp = _inHalf[ixa];
else sbtemp = _inHalfBar[ixa];
- (*ME())(ispin) += stemp.generalScalar(sbtemp,left,right)/inpart.mass();
+ (*ME())(ispin) += Complex(stemp.generalScalar(sbtemp,left,right)/inpart.mass());
}
}
}
double output = (ME()->contract(_rho)).real();
// test of the matrix element
// Energy m1(inpart.mass()),m2(decay[0]->mass()),m3(decay[1]->mass());
// Energy2 m12(m1*m1),m22(m2*m2),m32(m3*m3);
// Energy Qp(sqrt(sqr(m1+m2)-sqr(m3))),Qm(sqrt(sqr(m1-m2)-sqr(m3)));
// double r2(sqrt(2.)),r3(sqrt(3.));
// Energy pcm(Kinematics::pstarTwoBodyDecay(m1,m2,m3));
// complex<Energy> h1(-2.*Qp*A1),h2(2.*Qm*B1);
// complex<Energy> h3(-2./r3*Qp*(A1-Qm*Qm/m2*A2/msum));
// complex<Energy> h4( 2./r3*Qm*(B1-Qp*Qp/m2*B2/msum));
// complex<Energy> h5(-2.*r2/r3/m2/m3*Qp*(0.5*(m12-m22-m32)*A1+0.5*Qm*Qm*(m1+m2)*A2/msum
// +m12*pcm*pcm*A3/msum/msum));
// complex<Energy> h6( 2.*r2/r3/m2/m3*Qm*(0.5*(m12-m22-m32)*B1-0.5*Qp*Qp*(m1-m2)*B2/msum
// +m12*pcm*pcm*B3/msum/msum));
// cout << "testing 1/2->3/2 1 " << inpart.id() << " "
// << output << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2)+h3*conj(h3)+
// h4*conj(h4)+h5*conj(h5)+h6*conj(h6))/sqr(inpart.mass()) << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2)+h3*conj(h3)+
// h4*conj(h4)+h5*conj(h5)+h6*conj(h6))/sqr(inpart.mass())/output << endl;
// return the answer
return output;
}
// matrix element for the decay of a spin-3/2 fermion to a spin-1/2 fermion and
// a scalar meson
double Baryon1MesonDecayerBase::
threeHalfHalfScalar(const int,const Particle & inpart,
const ParticleVector & decay, MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin3Half,PDT::Spin1Half,PDT::Spin0)));
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0) {
RSSpinorWaveFunction ::calculateWaveFunctions(_inThreeHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
else {
RSSpinorBarWaveFunction::calculateWaveFunctions(_inThreeHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
// matrix element
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
RSSpinorWaveFunction::
constructSpinInfo(_inThreeHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorBarWaveFunction::constructSpinInfo(_inHalfBar,decay[0],outgoing,true);
}
else {
RSSpinorBarWaveFunction::
constructSpinInfo(_inThreeHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorWaveFunction::constructSpinInfo(_inHalf,decay[0],outgoing,true);
}
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
// spinors for the decay product
if(inpart.id()>0) {
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,decay[0],outgoing);
}
else {
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,decay[0],outgoing);
}
LorentzPolarizationVector out=UnitRemoval::InvE*decay[0]->momentum();
if(inpart.id()>0) {
_inHalf.resize(_inThreeHalf.size());
for(unsigned int ix=0;ix<_inThreeHalf.size();++ix)
_inHalf[ix] = _inThreeHalf[ix].dot(out);
}
else {
_inHalfBar.resize(_inThreeHalfBar.size());
for(unsigned int ix=0;ix<_inThreeHalfBar.size();++ix)
_inHalfBar[ix] = _inThreeHalfBar[ix].dot(out);
}
// get the couplings
Complex A,B;
Energy msum=inpart.mass()+decay[0]->mass();
threeHalfHalfScalarCoupling(imode(),inpart.mass(),decay[0]->mass(),decay[1]->mass(),
A,B);
Complex left,right;
// incoming particle
if(inpart.id()>0) {
left=(A-B);
right=(A+B);
}
// incoming anti-particle
else {
left=conj(A+B);
right=conj(A-B);
}
// compute the matrix element
vector<unsigned int> ispin(3,0);
for(unsigned ixa=0;ixa<2;++ixa) {
for(unsigned iya=0;iya<4;++iya) {
unsigned int iy=iya,ix=ixa;
if(decay[0]->id()<0) swap(ix,iy);
ispin[0]=iya;
ispin[1]=ixa;
- (*ME())(ispin) = _inHalf[iy].generalScalar(_inHalfBar[ix],left,right)*
- UnitRemoval::E/msum/inpart.mass();
+ (*ME())(ispin) = Complex(_inHalf[iy].generalScalar(_inHalfBar[ix],left,right)*
+ UnitRemoval::E/msum/inpart.mass());
}
}
double output = (ME()->contract(_rho)).real();
// test of the matrix element
// Energy m1(inpart.mass()),m2(decay[0]->mass()),m3(decay[1]->mass());
// Energy Qp(sqrt(sqr(m1+m2)-sqr(m3))),Qm(sqrt(sqr(m1-m2)-sqr(m3)));
// double r23(sqrt(2./3.));
// Energy pcm(Kinematics::pstarTwoBodyDecay(m1,m2,m3));
// complex<Energy> h1(-2.*r23*pcm*Qm*B/(m1+m2)),h2( 2.*r23*pcm*Qp*A/(m1+m2));
// cout << "testing 3/2->1/2 0 " << inpart.id() << " "
// << output << " "
// << 0.125*(h1*conj(h1)+h2*conj(h2))/sqr(inpart.mass()) << " "
// << 0.125*(h1*conj(h1)+h2*conj(h2))/sqr(inpart.mass())/output << endl;
// return the answer
return output;
}
// matrix element for the decay of a spin-3/2 fermion to a spin-3/2 fermion and
// a scalar meson
double Baryon1MesonDecayerBase::threeHalfThreeHalfScalar(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin3Half,PDT::Spin3Half,PDT::Spin0)));
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0) {
RSSpinorWaveFunction ::calculateWaveFunctions(_inThreeHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
else {
RSSpinorBarWaveFunction::calculateWaveFunctions(_inThreeHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
// matrix element
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
RSSpinorWaveFunction::
constructSpinInfo(_inThreeHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorBarWaveFunction::constructSpinInfo(_inThreeHalfBar,
decay[0],outgoing,true);
}
else {
RSSpinorBarWaveFunction::
constructSpinInfo(_inThreeHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorWaveFunction::constructSpinInfo(_inThreeHalf,
decay[0],outgoing,true);
}
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
// spinors for the decay product
LorentzPolarizationVector in=UnitRemoval::InvE*inpart.momentum();
if(inpart.id()>0) {
RSSpinorBarWaveFunction::
calculateWaveFunctions(_inThreeHalfBar,decay[0],outgoing);
}
else {
RSSpinorWaveFunction::
calculateWaveFunctions(_inThreeHalf,decay[0],outgoing);
}
_inHalf.resize(_inThreeHalf.size());
_inHalfBar.resize(_inThreeHalfBar.size());
for(unsigned int ix=0;ix<_inThreeHalf.size();++ix) {
_inHalf[ix] = _inThreeHalf[ix].dot(in);
_inHalfBar[ix] = _inThreeHalfBar[ix].dot(in);
}
// get the couplings
Complex A1,B1,A2,B2;
Energy msum(inpart.mass()+decay[0]->mass());
threeHalfThreeHalfScalarCoupling(imode(),inpart.mass(),decay[0]->mass(),
decay[1]->mass(),A1,A2,B1,B2);
Complex left1,right1,left2,right2;
// incoming particle
if(inpart.id()>0) {
left1=(A1-B1); right1=(A1+B1);
left2=(A2-B2); right2=(A2+B2);
}
// incoming anti-particle
else {
left1=(A1+B1); right1=(A1-B1);
left2=(A2+B2); right2=(A2-B2);
}
// compute the matrix element
vector<unsigned int> ispin(3,0);
for(unsigned ixa=0;ixa<4;++ixa) {
for(unsigned iya=0;iya<4;++iya) {
unsigned int iy=iya,ix=ixa;
if(decay[0]->id()<0) swap(ix,iy);
ispin[0]=iya;
ispin[1]=ixa;
- (*ME())(ispin)=(_inThreeHalf[iy].generalScalar(_inThreeHalfBar[ix],left1,right1)
- +_inHalf[iy].generalScalar( _inHalfBar[ix],left2,right2)
- *UnitRemoval::E2/sqr(msum))/inpart.mass();
+ (*ME())(ispin)=Complex((_inThreeHalf[iy].generalScalar(_inThreeHalfBar[ix],left1,right1)
+ +_inHalf[iy].generalScalar( _inHalfBar[ix],left2,right2)
+ *UnitRemoval::E2/sqr(msum))/inpart.mass());
}
}
// return the answer
return (ME()->contract(_rho)).real();
}
// matrix element for the decay of a spin-3/2 fermion to a spin-1/2 fermion and
// a vector meson
double Baryon1MesonDecayerBase::
threeHalfHalfVector(const int,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin3Half,PDT::Spin1Half,PDT::Spin1)));
// check if the outgoing meson is really a photon
bool photon=decay[1]->id()==ParticleID::gamma;
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0) {
RSSpinorWaveFunction ::calculateWaveFunctions(_inThreeHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
else {
RSSpinorBarWaveFunction::calculateWaveFunctions(_inThreeHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
// matrix element
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
RSSpinorWaveFunction::
constructSpinInfo(_inThreeHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorBarWaveFunction::constructSpinInfo(_inHalfBar,decay[0],outgoing,true);
}
else {
RSSpinorBarWaveFunction::
constructSpinInfo(_inThreeHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorWaveFunction::constructSpinInfo(_inHalf,decay[0],outgoing,true);
}
VectorWaveFunction::constructSpinInfo(_inVec,decay[1],outgoing,true,photon);
return 0.;
}
// spinors for the decay product
if(inpart.id()>0) {
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,decay[0],outgoing);
}
else {
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,decay[0],outgoing);
}
LorentzPolarizationVector out=UnitRemoval::InvE*decay[0]->momentum();
if(inpart.id()>0) {
_inHalf.resize(_inThreeHalf.size());
for(unsigned int ix=0;ix<_inThreeHalf.size();++ix)
_inHalf[ix] = _inThreeHalf[ix].dot(out);
}
else {
_inHalfBar.resize(_inThreeHalfBar.size());
for(unsigned int ix=0;ix<_inThreeHalfBar.size();++ix)
_inHalfBar[ix] = _inThreeHalfBar[ix].dot(out);
}
ME()->zero();
VectorWaveFunction::calculateWaveFunctions(_inVec,decay[1],outgoing,photon);
// get the couplings
Complex A1,A2,A3,B1,B2,B3,prod,meout;
threeHalfHalfVectorCoupling(imode(),inpart.mass(),decay[0]->mass(),decay[1]->mass(),
A1,A2,A3,B1,B2,B3);
Energy msum(inpart.mass()+decay[0]->mass());
Complex lS,rS,lV,rV,left,right;
// incoming particle
if(inpart.id()>0) {
lS=(A3-B3);rS=(A3+B3);
lV=(A2-B2);rV=(A2+B2);
left=(A1-B1);right=(A1+B1);
}
// incoming anti-particle
else {
lS=conj(A3+B3);rS=conj(A3-B3);
lV=-conj(A2-B2);rV=-conj(A2+B2);
left=conj(A1+B1);right=conj(A1-B1);
}
// compute the matrix element
vector<unsigned int> ispin(3);
LorentzVector<complex<Energy> > svec;
LorentzSpinor<SqrtEnergy> stemp;
LorentzSpinorBar<SqrtEnergy> sbtemp;
complex<Energy> scalar;
for(unsigned iya=0;iya<4;++iya) {
ispin[0]=iya;
for(unsigned ixa=0;ixa<2;++ixa) {
unsigned int iy=iya,ix=ixa;
if(decay[0]->id()<0) swap(ix,iy);
scalar = _inHalf[iy].generalScalar( _inHalfBar[ix],lS,rS);
svec = _inHalf[iy].generalCurrent(_inHalfBar[ix],lV,rV);
ispin[1]=ixa;
for(unsigned int iz=0;iz<3;++iz) {
ispin[2]=iz;
prod=_inVec[iz].dot(decay[0]->momentum())/msum;
(*ME())(ispin) += (svec.dot(_inVec[iz])+prod*scalar)*
UnitRemoval::E/msum/inpart.mass();
}
}
// the piece where the vector spinor is dotted with the polarization vector
for(unsigned iz=0;iz<3;++iz) {
ispin[2]=iz;
if(decay[0]->id()>0) stemp = _inThreeHalf[iya].dot(_inVec[iz]);
else sbtemp = _inThreeHalfBar[iya].dot(_inVec[iz]);
for(unsigned int ixa=0;ixa<2;++ixa) {
ispin[1]=ixa;
if(decay[0]->id()>0) sbtemp = _inHalfBar[ixa];
else stemp = _inHalf[ixa];
- (*ME())(ispin) += stemp.generalScalar(sbtemp,left,right)/inpart.mass();
+ (*ME())(ispin) += Complex(stemp.generalScalar(sbtemp,left,right)/inpart.mass());
}
}
}
double output = (ME()->contract(_rho)).real();
// testing code
// Energy m1(inpart.mass()),m2(decay[0]->mass()),m3(decay[1]->mass());
// Energy2 m12(m1*m1),m22(m2*m2),m32(m3*m3);
// Energy Qp(sqrt(sqr(m1+m2)-sqr(m3))),Qm(sqrt(sqr(m1-m2)-sqr(m3)));
// double r2(sqrt(2.)),r3(sqrt(3.));
// Energy pcm(Kinematics::pstarTwoBodyDecay(m1,m2,m3));
// complex<Energy> h1(-2.*Qp*A1),h2(2.*Qm*B1);
// complex<Energy> h3(-2./r3*Qp*(A1-Qm*Qm/m1*A2/msum));
// complex<Energy> h4( 2./r3*Qm*(B1-Qp*Qp/m1*B2/msum));
// complex<Energy> h5(-2.*r2/r3/m1/m3*Qp*(0.5*(m22-m12-m32)*A1+0.5*Qm*Qm*(m1+m2)*A2/msum
// +m12*pcm*pcm*A3/msum/msum));
// complex<Energy> h6( 2.*r2/r3/m1/m3*Qm*(0.5*(m22-m12-m32)*B1-0.5*Qp*Qp*(m2-m1)*B2/msum
// +m22*pcm*pcm*B3/msum/msum));
// cout << "testing 3/2->1/2 1 " << inpart.id() << " "
// << output << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2)+h3*conj(h3)+
// h4*conj(h4)+h5*conj(h5)+h6*conj(h6))/sqr(inpart.mass()) << " "
// << 0.25*(h1*conj(h1)+h2*conj(h2)+h3*conj(h3)+
// h4*conj(h4)+h5*conj(h5)+h6*conj(h6))/sqr(inpart.mass())/output << endl;
// return the answer
return output;
}
void Baryon1MesonDecayerBase::halfHalfScalarCoupling(int,Energy,Energy,Energy,
Complex&,Complex&) const {
throw DecayIntegratorError() << "Baryon1MesonDecayerBase::halfHalfScalarCoupling()"
<< " called from base class this must be implemented"
<< " in the inheriting class" << Exception::abortnow;
}
void Baryon1MesonDecayerBase::halfHalfVectorCoupling(int,Energy,Energy,Energy,
Complex&,Complex&,
Complex&,Complex&) const {
throw DecayIntegratorError() << "Baryon1MesonDecayerBase::halfHalfVectorCoupling()"
<< " called from base class this must be implemented "
<< "in the inheriting class" << Exception::abortnow;
}
void Baryon1MesonDecayerBase::halfThreeHalfScalarCoupling(int,Energy,Energy,Energy,
Complex&,Complex&) const {
throw DecayIntegratorError() << "Baryon1MesonDecayerBase::halfThreeHalfScalarCoupling"
<< "() called from base class this must be implemented"
<< " in the inheriting class" << Exception::abortnow;
}
void Baryon1MesonDecayerBase::halfThreeHalfVectorCoupling(int,Energy,Energy,Energy,
Complex&,Complex&,
Complex&,Complex&,
Complex&,Complex&) const {
throw DecayIntegratorError() << "Baryon1MesonDecayerBase::halfThreeHalfVectorCoupling"
<< "() called from base class this must be implemented "
<< "in the inheriting class" << Exception::abortnow;
}
void Baryon1MesonDecayerBase::threeHalfHalfScalarCoupling(int,Energy,Energy,Energy,
Complex&,Complex&) const {
throw DecayIntegratorError() << "Baryon1MesonDecayerBase::threeHalfHalfScalarCoupling"
<< "() called from base class this must be implemented"
<< " in the inheriting class" << Exception::abortnow;
}
void Baryon1MesonDecayerBase::threeHalfHalfVectorCoupling(int,Energy,Energy,Energy,
Complex&,Complex&,
Complex&,Complex&,
Complex&,Complex&) const {
throw DecayIntegratorError() << "Baryon1MesonDecayerBase::threeHalfHalfVectorCoupling"
<< "() called from base class this must be implemented "
<< "in the inheriting class" << Exception::abortnow;
}
void Baryon1MesonDecayerBase::threeHalfThreeHalfScalarCoupling(int,Energy,Energy,
Energy,Complex&,
Complex&,Complex&,
Complex&) const {
throw DecayIntegratorError() << "Baryon1MesonDecayerBase::threeHalfThreeHalfScalar"
<< "Coupling() called from base class this must be "
<< "implemented in the inheriting class"
<< Exception::abortnow;
}
bool Baryon1MesonDecayerBase::twoBodyMEcode(const DecayMode & dm,int & mecode,
double & coupling) const {
coupling=1.;
unsigned int inspin(dm.parent()->iSpin()),outspin,outmes;
ParticleMSet::const_iterator pit(dm.products().begin());
bool order;
if((**pit).iSpin()%2==0) {
order=true;
outspin=(**pit).iSpin();
++pit;outmes=(**pit).iSpin();
}
else {
order=false;
outmes=(**pit).iSpin();++pit;
outspin=(**pit).iSpin();
}
mecode=-1;
if(inspin==2) {
if(outspin==2){if(outmes==1){mecode=101;}else{mecode=102;}}
else if(outspin==4){if(outmes==1){mecode=103;}else{mecode=104;}}
}
else if(inspin==4) {
if(outspin==2){if(outmes==1){mecode=105;}else{mecode=106;}}
else if(outspin==4){if(outmes==1){mecode=107;}else{mecode=108;}}
}
return order;
}
void Baryon1MesonDecayerBase::dataBaseOutput(ofstream & os,bool header) const {
DecayIntegrator::dataBaseOutput(os,header);
}
diff --git a/Decay/Baryon/Baryon1MesonDecayerBase.h b/Decay/Baryon/Baryon1MesonDecayerBase.h
--- a/Decay/Baryon/Baryon1MesonDecayerBase.h
+++ b/Decay/Baryon/Baryon1MesonDecayerBase.h
@@ -1,353 +1,353 @@
// -*- C++ -*-
#ifndef HERWIG_Baryon1MesonDecayerBase_H
#define HERWIG_Baryon1MesonDecayerBase_H
//
// This is the declaration of the Baryon1MesonDecayerBase class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/PDT/BaryonWidthGenerator.fh"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzSpinor.h"
#include "ThePEG/Helicity/LorentzSpinorBar.h"
#include "ThePEG/Helicity/LorentzRSSpinor.h"
#include "ThePEG/Helicity/LorentzRSSpinorBar.h"
#include "Baryon1MesonDecayerBase.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>Baryon1MesonDecayerBase</code> class is the base class for the decay of
* a baryon to another baryon and a pseudoscalar or vector meson.
* All the matrix elements involving either a spin-1/2 or spin-3/2 baryons are
* now implemented apart from \f$\frac32\to\frac32+1\f$. The matrix elements
* are implemented in a general form with general couplings which must be
* supplied in classes inheriting from the one by implementing one of the coupling
* members.
*
* - The matrix element for \f$\frac12\to\frac12+0\f$
* \f[\mathcal{M} = \bar{u}(p_1)(A+B\gamma_5)u(p_0)\f]
* - The matrix element for \f$\frac12\to\frac12+1\f$
* \f[\mathcal{M} = \bar{u}(p_1)\epsilon^{*\beta}\left[
* \gamma_\beta(A_1+B_1\gamma_5)
* +p_{0\beta}(A_2+B_2\gamma_5)\right]u(p_0)\f]
* - The matrix element for \f$\frac12\to\frac32+0\f$
* \f[\bar{u}^\alpha(p_1) p_{0\alpha}\left[A+B\gamma_5\right]u(p_0)\f]
* - The matrix element for \f$\frac12\to\frac32+1\f$
* \f[\bar{u}^\alpha(p_1)\epsilon^{*\beta}\left[
* g_{\alpha\beta}(A_1+B_1\gamma_5)
* +p_{0\alpha}(A_2+B_2\gamma_5)
* +p_{0\alpha}p_{0\beta}(A_3+B_3\gamma_5)
* \right]u(p_0)\f]
* - The matrix element for \f$\frac32\to\frac12+0\f$
* \f[\bar{u}(p_1) p_{1\alpha}\left[A+B\gamma_5\right]u^\alpha(p_0)\f]
* - The matrix element for \f$\frac32\to\frac12+1\f$
* \f[\bar{u}(p_1)\epsilon^{*\beta}\left[
* g_{\alpha\beta}(A_1+B_1\gamma_5)
* +p_{1\alpha}(A_2+B_2\gamma_5)
* +p_{1\alpha}p_{0\beta}(A_3+B_3\gamma_5)
* \right]u^\alpha(p_0)\f]
* - The matrix element for \f$\frac32\to\frac32+0\f$
* \f[\bar{u}^\alpha(p_1)\left[(A_1+B_1\gamma_5)g_{\alpha\beta}
* +p_{0\alpha}p_{1\beta}(A_2+B_2\gamma_5)\right]u^\beta(p_0)\f]
*
* @see DecayIntegrator
*/
class Baryon1MesonDecayerBase: public DecayIntegrator {
/**
* The BaryonWidthGenerator is a friend to get access to the couplings
*/
friend class BaryonWidthGenerator;
public:
/**
* Return the matrix element squared for a given mode and phase-space channel.
* This version uses the generalised couplings to compute the matrix elements
* given above.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt The option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay,MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
virtual bool twoBodyMEcode(const DecayMode & dm, int & mecode,
double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a scalar.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac12+0\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfHalfScalarCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a vector.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac12+1\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void halfHalfVectorCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac32+0\f$ or \f$\frac32\to\frac12+0\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfThreeHalfScalarCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a vector.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac32+1\f$ or \f$\frac32\to\frac12+1\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param A3 The coupling \f$A_3\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
* @param B3 The coupling \f$B_3\f$ described above.
*/
virtual void halfThreeHalfVectorCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A1,Complex& A2,Complex& A3,
Complex& B1,Complex& B2,Complex& B3) const;
/**
* Couplings for spin-\f$\frac32\f$ to spin-\f$\frac12\f$ and a scalar.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac32+0\f$ or \f$\frac32\to\frac12+0\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void threeHalfHalfScalarCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac32\f$ to spin-\f$\frac12\f$ and a vector.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac32+1\f$ or \f$\frac32\to\frac12+1\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param A3 The coupling \f$A_3\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
* @param B3 The coupling \f$B_3\f$ described above.
*/
virtual void threeHalfHalfVectorCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A1,Complex& A2,Complex& A3,
Complex& B1,Complex& B2,Complex& B3) const;
/**
* Couplings for spin-\f$\frac32\f$ to spin-\f$\frac32\f$ and a scalar.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac32\to\frac32+0\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void threeHalfThreeHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
//@}
public:
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
private:
/**
* Matrix Element Calculation Members
*/
//@{
/**
* Matrix element for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a scalar.
* @param ichan The phase-space channel.
* @param inpart The decaying particle.
* @param decay The decay products.
* @param meopt The option for the matrix element
* @return The matrix element squared.
*/
double halfHalfScalar(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a vector.
* @param ichan The phase-space channel.
* @param inpart The decaying particle.
* @param decay The decay products.
* @param meopt The option for the matrix element
* @return The matrix element squared.
*/
double halfHalfVector(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param ichan The phase-space channel.
* @param inpart The decaying particle.
* @param decay The decay products.
* @param meopt The option for the matrix element
* @return The matrix element squared.
*/
double halfThreeHalfScalar(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a vector.
* @param ichan The phase-space channel.
* @param inpart The decaying particle.
* @param decay The decay products.
* @param meopt The option for the matrix element
* @return The matrix element squared.
*/
double halfThreeHalfVector(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for spin-\f$\frac32\f$ to spin-\f$\frac12\f$ and a scalar.
* @param ichan The phase-space channel.
* @param inpart The decaying particle.
* @param decay The decay products.
* @param meopt The option for the matrix element
* @return The matrix element squared.
*/
double threeHalfHalfScalar(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for spin-\f$\frac32\f$ to spin-\f$\frac12\f$ and a vector.
* @param ichan The phase-space channel.
* @param inpart The decaying particle.
* @param decay The decay products.
* @param meopt The option for the matrix element
* @return The matrix element squared.
*/
double threeHalfHalfVector(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for spin-\f$\frac32\f$ to spin-\f$\frac32\f$ and a scalar.
* @param ichan The phase-space channel.
* @param inpart The decaying particle.
* @param decay The decay products.
* @param meopt The option for the matrix element
* @return The matrix element squared.
*/
double threeHalfThreeHalfScalar(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- Baryon1MesonDecayerBase & operator=(const Baryon1MesonDecayerBase &);
+ Baryon1MesonDecayerBase & operator=(const Baryon1MesonDecayerBase &) = delete;
private:
/**
* Spin density matrx
*/
mutable RhoDMatrix _rho;
/**
* Spin-\f$\frac12\f$ spinor
*/
mutable vector<Helicity::LorentzSpinor<SqrtEnergy> > _inHalf;
/**
* Spin-\f$\frac12\f$ barred spinor
*/
mutable vector<Helicity::LorentzSpinorBar<SqrtEnergy> > _inHalfBar;
/**
* Spin-\f$\frac32\f$ spinor
*/
mutable vector<Helicity::LorentzRSSpinor<SqrtEnergy> > _inThreeHalf;
/**
* Spin-\f$\frac32\f$ barred spinor
*/
mutable vector<Helicity::LorentzRSSpinorBar<SqrtEnergy> > _inThreeHalfBar;
/**
* Polarization vector
*/
mutable vector<Helicity::LorentzPolarizationVector> _inVec;
};
}
#endif /* HERWIG_Baryon1MesonDecayerBase_H */
diff --git a/Decay/Baryon/BaryonFactorizedDecayer.cc b/Decay/Baryon/BaryonFactorizedDecayer.cc
--- a/Decay/Baryon/BaryonFactorizedDecayer.cc
+++ b/Decay/Baryon/BaryonFactorizedDecayer.cc
@@ -1,804 +1,804 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the BaryonFactorizedDecayer class.
//
#include "BaryonFactorizedDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorBarWaveFunction.h"
#include "Herwig/Decay/DecayVertex.h"
#include "ThePEG/Helicity/FermionSpinInfo.h"
#include "ThePEG/Helicity/RSFermionSpinInfo.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
BaryonFactorizedDecayer::BaryonFactorizedDecayer() {
// default values taken from PRD56, 2799
_a1c= 1.1;
_a2c=-0.5;
_a1b= 1.0;
_a2b= 0.28;
// intermediates
generateIntermediates(true);
}
void BaryonFactorizedDecayer::doinitrun() {
_current->initrun();
_form->initrun();
DecayIntegrator::doinitrun();
_weights.clear();_wgtloc.clear();_wgtmax.clear();
unsigned int ix,iy;
for(ix=0;ix<numberModes();++ix) {
_wgtmax.push_back(mode(ix)->maxWeight());
_wgtloc.push_back(_weights.size());
for(iy=0;iy<mode(ix)->numberChannels();++iy)
_weights.push_back(mode(ix)->channelWeight(iy));
}
}
void BaryonFactorizedDecayer::doinit() {
DecayIntegrator::doinit();
// get the CKM matrix elements
unsigned int ix,iy,iz,iform,icurr;
// get the CKM matrix (unsquared for interference)
Complex ckmmat[3][3];
vector< vector<Complex > > CKM(_theCKM->getUnsquaredMatrix(SM().families()));
for(ix=0;ix<3;++ix){for(iy=0;iy<3;++iy){ckmmat[ix][iy]=CKM[ix][iy];}}
// make sure the current and form factor got initialised
_current->init();
_form->init();
// find all the possible modes
vector<unsigned int> tformmap,tcurrmap;
vector<int> inquark,outquark,currq,curra;
vector<tPDVector> particles;
tPDVector extpart,extpartb,ptemp;
Energy min,minb;
int iq,ia,spect1,spect2,inq,outq,id0,id1,Wcharge,ispin,ospin;
for(iform=0;iform<_form->numberOfFactors();++iform)
{
// particles from the form factor
extpart.resize(2);
_form->particleID (iform,id0,id1);
_form->formFactorInfo(iform,ispin,ospin,spect1,spect2,inq,outq);
// particles from the form factor
extpart[0]=getParticleData(id0);
extpart[1]=getParticleData(id1);
// the charge of the decay products
Wcharge = extpart[0]->iCharge()-extpart[1]->iCharge();
// max mass for the particles in the current
min = extpart[0]->massMax()-extpart[1]->massMin();
for(icurr=0;icurr<_current->numberOfModes();++icurr)
{
extpart.resize(2);
// get the particles from the current
_current->decayModeInfo(icurr,iq,ia);
ptemp=_current->particles(Wcharge,icurr,iq,ia);
minb=ZERO;
for(iz=0;iz<ptemp.size();++iz)
{extpart.push_back(ptemp[iz]);minb+=ptemp[iz]->massMin();}
// valid mode
if(extpart.size()>2&&minb<min&&
(Wcharge!=0||(Wcharge==0&&((inq>0&&inq%2!=iq%2)||
(inq<0&&abs(inq)%2!=abs(ia)%2)))))
{
tformmap.push_back(iform);tcurrmap.push_back(icurr);
particles.push_back(extpart);
inquark.push_back(inq);outquark.push_back(outq);
currq.push_back(iq);curra.push_back(ia);
}
// if the meson is neutral try the CC mode
if(Wcharge==0&&iq!=-ia&&((inq>0&&inq%2!=iq%2)||
(inq<0&&abs(inq)%2!=abs(ia)%2)))
{
extpart.resize(2);
ptemp=_current->particles(Wcharge,icurr,-ia,-iq);
minb=ZERO;
for(iz=0;iz<ptemp.size();++iz)
{extpart.push_back(ptemp[iz]);minb+=ptemp[iz]->massMin();}
if(extpart.size()>2&&minb<min)
{
tformmap.push_back(iform);tcurrmap.push_back(icurr);
particles.push_back(extpart);
inquark.push_back(inq);outquark.push_back(outq);
currq.push_back(-ia);curra.push_back(-iq);
}
}
}
}
vector<bool> modecc;
vector<unsigned int> modeloc,ttform,ttcurr;
vector<Complex> tCKM; Complex ckm;
bool done;
DecayPhaseSpaceModePtr mode;
DecayPhaseSpaceChannelPtr channel;
vector<double>::iterator start,end;
double maxweight;
vector<double> channelwgts;
_formmap.clear();
_currentmap.clear();
// loop over the modes and find the dupliciates
for(ix=0;ix<particles.size();++ix)
{
while(true)
{
if ( particles[ix].empty() ) {break;}
findModes(ix,particles,modeloc,modecc);
// if more than three particles only allow one diagram
if ( particles[ix].size() > 3 && !modeloc.empty() ) {break;}
// create the mode and set the particles as for the first instance
mode=new_ptr(DecayPhaseSpaceMode(particles[ix],this));
channel = new_ptr(DecayPhaseSpaceChannel(mode));
channel->addIntermediate(particles[ix][0],0,0.0,1,-1);
min = particles[ix][0]->massMax()-particles[ix][1]->massMin();
Wcharge = particles[ix][0]->iCharge()-particles[ix][1]->iCharge();
done=_current->createMode(Wcharge,tcurrmap[ix],mode,2,1,channel,min);
if(!done){throw InitException() << "Failed to construct mode in "
<< "BaryonFactorizedDecayer::doinit()."
<< Exception::abortnow;}
// set the parameters for the additional modes
ttform.clear();ttcurr.clear();
ttform.push_back(tformmap[ix]);ttcurr.push_back(tcurrmap[ix]);
for(iy=0;iy<modeloc.size();++iy)
{
ttform.push_back(tformmap[modeloc[iy]]);
ttcurr.push_back(tcurrmap[modeloc[iy]]);
}
tCKM.clear();
for(iy=0;iy<ttcurr.size();++iy)
{
// get the quarks involved in the process
if(iy==0)
{iq=currq[ix];ia=curra[ix];inq=inquark[ix];outq=outquark[ix];}
else
{
if(!modecc[iy-1])
{
iq=currq[modeloc[iy-1]];ia=curra[modeloc[iy-1]];
inq=inquark[modeloc[iy-1]];outq=outquark[modeloc[iy-1]];
}
else
{
ia=-currq[modeloc[iy-1]];iq=-curra[modeloc[iy-1]];
inq=-inquark[modeloc[iy-1]];outq=-outquark[modeloc[iy-1]];
}
}
_form->particleID(ttform[iy],id0,id1);
Wcharge = getParticleData(id0)->iCharge()-getParticleData(id1)->iCharge();
ckm=1.;
if(Wcharge!=0)
{
ckm=1.;
if(abs(iq)%2==0){ckm *= conj(ckmmat[abs(iq)/2-1][(abs(ia)-1)/2]);}
else{ckm *= conj(ckmmat[abs(ia)/2-1][(abs(iq)-1)/2]);}
if(abs(inq)%2==0){ckm *= ckmmat[abs(inq)/2-1][(abs(outq)-1)/2];}
else{ckm *= ckmmat[abs(outq)/2-1][(abs(inq)-1)/2];}
if(abs(inq)==5){ckm*=_a1b;}
else{ckm*=_a1c;}
}
else
{
ckm=1.;
if(inq>0)
{
if(abs(inq)%2==0){ckm *= ckmmat[abs(inq)/2-1][(abs(iq)-1)/2];}
else{ckm *= ckmmat[abs(iq)/2-1][(abs(inq)-1)/2];}
if(abs(outq)%2==0)
{ckm *= conj(ckmmat[abs(outq)/2-1][(abs(ia)-1)/2]);}
else{ckm *= conj(ckmmat[abs(ia)/2-1][(abs(outq)-1)/2]);}
}
else
{
if(abs(inq)%2==0){ckm *= ckmmat[abs(inq)/2-1][(abs(ia)-1)/2];}
else{ckm *= ckmmat[abs(ia)/2-1][(abs(inq)-1)/2];}
if(abs(outq)%2==0)
{ckm *= conj(ckmmat[abs(outq)/2-1][(abs(iq)-1)/2]);}
else{ckm *= conj(ckmmat[abs(iq)/2-1][(abs(outq)-1)/2]);}
}
if(abs(inq)==5){ckm*=_a2b;}
else{ckm*=_a2c;}
}
if((abs(inq)%2==0&&inq<0)||(abs(inq)%2!=0&&inq>0)){ckm=conj(ckm);}
tCKM.push_back(ckm);
}
// add the parameters for the mode to the list
_currentmap.push_back(ttcurr);_formmap.push_back(ttform);
_factCKM.push_back(tCKM);
// add the mode to the list
if(_wgtmax.size()>numberModes()){maxweight=_wgtmax[numberModes()];}
else{maxweight=0.;}
// the weights for the channel
if(_wgtloc.size()>numberModes()&&
_wgtloc[numberModes()]+mode->numberChannels()<=_weights.size())
{
start=_weights.begin()+_wgtloc[numberModes()];
end = start+mode->numberChannels();
channelwgts=vector<double>(start,end);
}
else
{channelwgts.resize(mode->numberChannels(),1./(mode->numberChannels()));}
// don't need channels for two body decays
if(particles[ix].size()==3)
{
channelwgts.clear();
mode=new_ptr(DecayPhaseSpaceMode(particles[ix],this));
}
addMode(mode,maxweight,channelwgts);
// resize the duplicate modes to remove them
for(iy=0;iy<modeloc.size();++iy){particles[modeloc[iy]]=tPDVector();}
break;
}
}
}
bool BaryonFactorizedDecayer::accept(tcPDPtr parent, const tPDVector & children) const {
bool allowed=false;
unsigned int iform(0),ix;
int idin(parent->id()),ibaryon,foundb,id0,id1;
vector<int> idall,idother;
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
for( ; pit!=pend;++pit){idall.push_back((**pit).id());}
// loop over the particles in the form factor
do
{
_form->particleID(iform,id0,id1);
ibaryon=0;
if(id0==idin){ibaryon=id1;}
else if(id0==-idin){ibaryon=-id1;}
if(ibaryon!=0)
{
foundb=false;
idother.clear();
for(ix=0;ix<idall.size();++ix)
{
if(idall[ix]==ibaryon){foundb=true;}
else{idother.push_back(idall[ix]);}
}
if(foundb){allowed=_current->accept(idother);}
}
++iform;
}
while(!allowed&&iform<_form->numberOfFactors());
return allowed;
}
int BaryonFactorizedDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
unsigned int ix,iy;
int idin(parent->id()),ibaryon,foundb,id0,id1,icurr(-1),iform(0);
vector<int> idall,idother;
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
for( ; pit!=pend;++pit){idall.push_back((**pit).id());}
// loop over the particles in the form factor
do
{
_form->particleID(iform,id0,id1);
ibaryon=0;
if(id0==idin){ibaryon=id1;}
else if(id0==-idin){ibaryon=-id1;}
++iform;
foundb=false;
idother.clear();
for(ix=0;ix<idall.size();++ix)
{
if(idall[ix]==ibaryon){foundb=true;}
else{idother.push_back(idall[ix]);}
}
if(foundb){icurr=_current->decayMode(idother);}
}
while(icurr<0&&iform<int(_form->numberOfFactors()));
// now find the mode
int imode=-1;
ix=0;
--iform;
do
{
for(iy=0;iy<_currentmap[ix].size();++iy)
{if(int(_currentmap[ix][iy])==icurr&&int(_formmap[ix][iy])==iform){imode=ix;}}
++ix;
}
while(imode<0&&ix<numberModes());
if(imode<0){throw DecayIntegratorError() << "Unable to find the mode in "
<< "BaryonFactorizedDecayer::decay()"
<< Exception::abortnow;}
// generate the mode
cc=id0!=idin;
return imode;
}
void BaryonFactorizedDecayer::persistentOutput(PersistentOStream & os) const {
os << _current << _form << _a1b << _a2b <<_a1c <<_a2c
<< _currentmap << _formmap << _factCKM << _wgtloc << _wgtmax << _weights
<< _theCKM;
}
void BaryonFactorizedDecayer::persistentInput(PersistentIStream & is, int) {
is >> _current >> _form >> _a1b >> _a2b >>_a1c >>_a2c
>> _currentmap >> _formmap >> _factCKM >> _wgtloc >> _wgtmax >> _weights
>> _theCKM;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<BaryonFactorizedDecayer,DecayIntegrator>
describeHerwigBaryonFactorizedDecayer("Herwig::BaryonFactorizedDecayer", "HwBaryonDecay.so");
void BaryonFactorizedDecayer::Init() {
static ClassDocumentation<BaryonFactorizedDecayer> documentation
("The BaryonFactorizedDecayer class combines the baryon form factor and a"
" weak current to perform a decay in the naive factorization approximation.");
static Reference<BaryonFactorizedDecayer,WeakDecayCurrent> interfaceWeakCurrent
("Current",
"The reference for the decay current to be used.",
&BaryonFactorizedDecayer::_current, false, false, true, false, false);
static ParVector<BaryonFactorizedDecayer,int> interfaceWeightLocation
("WeightLocation",
"The locations of the weights for a given channel in the vector",
&BaryonFactorizedDecayer::_wgtloc,
0, 0, 0, 0, 10000, false, false, true);
static ParVector<BaryonFactorizedDecayer,double> interfaceWeightMax
("MaximumWeight",
"The maximum weight for a given channel.",
&BaryonFactorizedDecayer::_wgtmax,
0, 0, 0, 0., 100., false, false, true);
static ParVector<BaryonFactorizedDecayer,double> interfaceWeights
("Weights",
"The weights for the integration.",
&BaryonFactorizedDecayer::_weights,
0, 0, 0, 0., 1., false, false, true);
static Reference<BaryonFactorizedDecayer,BaryonFormFactor> interfaceFormFactor
("FormFactor",
"The form-factor",
&BaryonFactorizedDecayer::_form, true, true, true, false, false);
static Parameter<BaryonFactorizedDecayer,double> interfacea1Bottom
("a1Bottom",
"The factorization paramter a_1 for decays of bottom baryons",
&BaryonFactorizedDecayer::_a1b, 1., -10.0, 10.0,
false, false, true);
static Parameter<BaryonFactorizedDecayer,double> interfacea2Bottom
("a2Bottom",
"The factorization paramter a_2 for decays of bottom baryons",
&BaryonFactorizedDecayer::_a2b, 0.28, -10.0, 10.0,
false, false, true);
static Parameter<BaryonFactorizedDecayer,double> interfacea1Charm
("a1Charm",
"The factorization paramter a_1 for decays of charm baryons",
&BaryonFactorizedDecayer::_a1c, 1.1, -10.0, 10.0,
false, false, true);
static Parameter<BaryonFactorizedDecayer,double> interfacea2Charm
("a2Charm",
"The factorization paramter a_2 for decays of charm baryons",
&BaryonFactorizedDecayer::_a2c, -0.5, -10.0, 10.0,
false, false, true);
static Reference<BaryonFactorizedDecayer,StandardCKM> interfaceCKM
("CKM",
"Reference to the Standard Model object",
&BaryonFactorizedDecayer::_theCKM, false, false, true, false);
}
double BaryonFactorizedDecayer::me2(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
double me(0.);
assert(inpart.dataPtr()->iSpin()==2);
if(decay[0]->dataPtr()->iSpin()==2)
me=halfHalf(ichan,inpart,decay,meopt);
else if(decay[0]->dataPtr()->iSpin()==4)
me=halfThreeHalf(ichan,inpart,decay,meopt);
else
assert(false);
return me;
}
// matrix element for a 1/2 -> 1/2 decay
double BaryonFactorizedDecayer::halfHalf(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
Energy scale;
// extract the spins of the particles
vector<PDT::Spin> spin;
for(unsigned ix=0;ix<decay.size();++ix)
spin.push_back(decay[ix]->dataPtr()->iSpin());
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1Half,spin)));
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorBarWaveFunction::constructSpinInfo(_inHalfBar,decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorWaveFunction::constructSpinInfo(_inHalf,decay[0],outgoing,true);
}
ParticleVector::const_iterator start = decay.begin()+1,
end = decay.end();
ParticleVector hadpart(start,end);
_current->current(_currentmap[imode()][0],
ichan,scale,hadpart,meopt);
return 0.;
}
ME()->zero();
// spinors for the decay product
if(inpart.id()>0) {
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,decay[0],outgoing);
}
else {
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,decay[0],outgoing);
}
// get the information on the form-factor
int id0(inpart.id()),id1(decay[0]->id());
// work out the value of q and calculate the form factors
Lorentz5Momentum q(inpart.momentum()-decay[0]->momentum());q.rescaleMass();
Energy m0(inpart.mass()),m1(decay[0]->mass());
Energy2 q2(q.mass2());
Lorentz5Momentum sum(inpart.momentum()+decay[0]->momentum());
// calculate the baryon part of the current for the decay
vector<LorentzPolarizationVectorE> baryon;
Complex f1v,f2v,f3v,f1a,f2a,f3a;
baryon.resize(4);
Complex left,right;
ParticleVector::const_iterator start,end;
ParticleVector hadpart;
vector<LorentzPolarizationVectorE> hadron;
double pre(0.);
unsigned int mhel,ix,iy,lhel;
vector<unsigned int> constants,ihel;
int itemp; unsigned int ibar;
for(unsigned int mode=0;mode<_formmap[imode()].size();++mode) {
// calculate the form factor piece
_form->SpinHalfSpinHalfFormFactor(q2,_formmap[imode()][mode],id0,id1,m0,m1,
f1v,f2v,f3v,f1a,f2a,f3a);
left = f1v-f1a-f2v-double((m0-m1)/(m0+m1))*f2a;
right = f1v+f1a-f2v+double((m0-m1)/(m0+m1))*f2a;
for(ix=0;ix<2;++ix) {
for(iy=0;iy<2;++iy) {
LorentzPolarizationVectorE
vtemp = _inHalf[ix].generalCurrent(_inHalfBar[iy],left,right);
complex<Energy> vspin=_inHalf[ix].scalar(_inHalfBar[iy]);
complex<Energy> aspin=_inHalf[ix].pseudoScalar(_inHalfBar[iy]);
// the momentum like pieces
if(inpart.id()>0) {
vtemp+= (f2v*vspin+f2a*aspin)/(m0+m1)*sum;
vtemp+= (f3v*vspin+f3a*aspin)/(m0+m1)*q;
}
else {
vtemp+= (f2v*vspin-f2a*aspin)/(m0+m1)*sum;
vtemp+= (f3v*vspin-f3a*aspin)/(m0+m1)*q;
}
if(inpart.id()>0){baryon[2*ix+iy]=vtemp;}
else{baryon[2*iy+ix]=vtemp;}
}
}
// construct the weak current
start=decay.begin()+1;
end =decay.end();
hadpart = ParticleVector(start,end);
hadron=_current->current(_currentmap[imode()][mode],
ichan,scale,hadpart,meopt);
pre=pow(inpart.mass()/scale,int(hadpart.size()-2));pre*=pre;
constants.resize(decay.size()+1);ihel.resize(decay.size()+1);
itemp=1;ibar=0;
for(int iz=int(decay.size()-1);iz>=0;--iz) {
if(abs(decay[iz]->id())!=id1) {
itemp *= decay[iz]->data().iSpin();
constants[iz]=itemp;
}
else ibar=iz;
constants[decay.size()]=1;
constants[ibar]=constants[ibar+1];
}
for(mhel=0;mhel<baryon.size();++mhel) {
ihel[0 ]=mhel/2;
ihel[ibar+1]=mhel%2;
for(lhel=0;lhel<hadron.size();++lhel) {
// map the index for the hadrons to a helicity state
for(ix=decay.size();ix>0;--ix) {
if(ix-1!=ibar){ihel[ix]=(lhel%constants[ix-1])/constants[ix];}}
- (*ME())(ihel) += hadron[lhel].dot(baryon[mhel])*
- _factCKM[imode()][mode]*SM().fermiConstant();
+ (*ME())(ihel) += Complex(hadron[lhel].dot(baryon[mhel])*
+ _factCKM[imode()][mode]*SM().fermiConstant());
}
}
}
// return the answer
return 0.5*pre*(ME()->contract(_rho)).real();
}
// matrix element for a 1/2 -> 3/2 decay
double BaryonFactorizedDecayer::halfThreeHalf(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
// spins
Energy scale;
vector<PDT::Spin> spin(decay.size());
for(unsigned int ix=0;ix<decay.size();++ix)
spin[ix]=decay[ix]->data().iSpin();
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1Half,spin)));
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
}
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorBarWaveFunction::constructSpinInfo(_inThreeHalfBar,
decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorWaveFunction::constructSpinInfo(_inThreeHalf,
decay[0],outgoing,true);
}
ParticleVector::const_iterator start = decay.begin()+1,
end = decay.end();
ParticleVector hadpart(start,end);
_current->current(_currentmap[imode()][0],
ichan,scale,hadpart,meopt);
return 0.;
}
ME()->zero();
// spinors for the decay product
LorentzPolarizationVector in=UnitRemoval::InvE*inpart.momentum();
if(inpart.id()>0) {
RSSpinorBarWaveFunction::
calculateWaveFunctions(_inThreeHalfBar,decay[0],outgoing);
_inHalfBar.resize(_inThreeHalfBar.size());
for(unsigned int ix=0;ix<_inThreeHalfBar.size();++ix)
_inHalfBar[ix] = _inThreeHalfBar[ix].dot(in);
}
else {
RSSpinorWaveFunction::
calculateWaveFunctions(_inThreeHalf,decay[0],outgoing);
_inHalf.resize(_inThreeHalf.size());
for(unsigned int ix=0;ix<_inThreeHalf.size();++ix)
_inHalf[ix] = _inThreeHalf[ix].dot(in);
}
// get the information on the form-factor
int id0(inpart.id()),id1(decay[0]->id());
// work out the value of q and calculate the form factors
Lorentz5Momentum q(inpart.momentum()-decay[0]->momentum());q.rescaleMass();
Energy m0(inpart.mass()),m1(decay[0]->mass());
Energy2 q2(q.mass2());
Lorentz5Momentum sum(inpart.momentum()+decay[0]->momentum());
LorentzPolarizationVectorE baryon[4][2];
Complex f1v,f2v,f3v,f4v,f1a,f2a,f3a,f4a;
LorentzPolarizationVector vtemp;
complex<InvEnergy2> lS1,lS2,rS1,rS2;
Complex left,right;
complex<InvEnergy> lV,rV;
InvEnergy ms(1./(m0+m1));
InvEnergy2 ms2(ms*ms);
unsigned int ix,iy,ixa,iya;
ParticleVector::const_iterator start,end;
ParticleVector hadpart;
vector<LorentzPolarizationVectorE> hadron;
double pre(0.);
vector<unsigned int> constants,ihel;
int itemp; unsigned int ibar;
for(unsigned int mode=0;mode<_formmap[imode()].size();++mode) {
// calculate the form factors
_form->SpinHalfSpinThreeHalfFormFactor(q2,_formmap[imode()][mode],id0,id1,m0,m1,
f1v,f2v,f3v,f4v,f1a,f2a,f3a,f4a);
if(inpart.id()>0) {
left = f1a-f1v;
right = f1a+f1v;
lS1 = ms2*(f3a-f4a-f3v+f4v);
rS1 = ms2*(f3a-f4a+f3v-f4v);
lS2 = ms2*(f4a-f4v);
rS2 = ms2*(f4a+f4v);
lV = ms*(f2a-f2v);
rV = ms*(f2a+f2v);
}
else {
left = conj(f1a+f1v);
right = conj(f1a-f1v);
lS1 = ms2*conj(f3a-f4a+f3v-f4v);
rS1 = ms2*conj(f3a-f4a-f3v+f4v);
lS2 = ms2*conj(f4a-f4v);
rS2 = ms2*conj(f4a+f4v);
lV = ms *conj(f2a-f2v);
rV = ms *conj(f2a+f2v);
}
// construct the vectors for the decay
Complex scalar1,scalar2;
complex<Energy> lfact,rfact;
LorentzPolarizationVectorE tvec;
LorentzPolarizationVector svec;
for(iya=0;iya<4;++iya) {
for(ixa=0;ixa<2;++ixa) {
if(decay[0]->id()>0){ix=iya;iy=ixa;}
else{ix=ixa;iy=iya;}
// scalar like terms
lfact = _inHalf[iy].leftScalar( _inHalfBar[ix]);
rfact = _inHalf[iy].rightScalar(_inHalfBar[ix]);
- scalar1 = (lS1*lfact+rS1*rfact)*UnitRemoval::E;
- scalar2 = (lS2*lfact+rS2*rfact)*UnitRemoval::E;
+ scalar1 = Complex((lS1*lfact+rS1*rfact)*UnitRemoval::E);
+ scalar2 = Complex((lS2*lfact+rS2*rfact)*UnitRemoval::E);
svec = _inHalf[iy].generalCurrent(_inHalfBar[ix],lV/ms,rV/ms)*ms;
if(inpart.id()>0) {
tvec=_inThreeHalfBar[ix].generalCurrent(_inHalf[iy],left,right);
}
else {
tvec=_inThreeHalf[iy].generalCurrent(_inHalfBar[ix],left,right);
}
baryon[iya][ixa] = tvec+svec*UnitRemoval::E
+scalar1*decay[0]->momentum()+scalar2*inpart.momentum();
}
}
start=decay.begin()+1;
end =decay.end();
hadpart=ParticleVector(start,end);
hadron=_current->current(_currentmap[imode()][mode],
ichan,scale,hadpart,meopt);
// prefactor
pre = pow(inpart.mass()/scale,int(hadpart.size()-2));pre*=pre;
// work out the mapping for the hadron vector
constants.resize(decay.size()+1);ihel.resize(decay.size()+1);
itemp=1;ibar=0;
for(int ix=int(decay.size()-1);ix>=0;--ix) {
if(abs(decay[ix]->id())!=id1) {
itemp*=decay[ix]->data().iSpin();
constants[ix]=itemp;
}
else{ibar=ix;}
}
constants[decay.size()]=1;
constants[ibar]=constants[ibar+1];
for(iya=0;iya<4;++iya) {
ihel[1]=iya;
for(ixa=0;ixa<2;++ixa) {
ihel[0]=ixa;
for(unsigned int lhel=0;lhel<hadron.size();++lhel) {
// map the index for the hadrons to a helicity state
for(unsigned int ix=decay.size();ix>0;--ix)
{if(ix-1!=ibar){ihel[ix]=(lhel%constants[ix-1])/constants[ix];}}
- (*ME())(ihel) += hadron[lhel].dot(baryon[iya][ixa])*
- _factCKM[imode()][mode]*SM().fermiConstant();
+ (*ME())(ihel) += Complex(hadron[lhel].dot(baryon[iya][ixa])*
+ _factCKM[imode()][mode]*SM().fermiConstant());
}
}
}
}
// return the answer
return 0.5*pre*(ME()->contract(_rho)).real();
}
void BaryonFactorizedDecayer::findModes(unsigned int imode,
vector<tPDVector> & particles,
vector<unsigned int> & loc,
vector<bool> & cc) {
unsigned int ix,iy,nfound,iz;
// resize the vectors
loc.clear();cc.clear();
// get the id's for the mode
vector<int> id,idbar;
int idtemp; bool found;
for(ix=0;ix<particles[imode].size();++ix)
{
id.push_back(particles[imode][ix]->id());
if(particles[imode][ix]->CC()){idbar.push_back(particles[imode][ix]->CC()->id());}
else{idbar.push_back(id[ix]);}
}
vector<bool> done(id.size(),false);
// loop over the modes
for(ix=0;ix<particles.size();++ix)
{
if(ix==imode||particles[ix].empty()) continue;
assert(!particles[ix].empty());
assert(particles[ix][0]);
// the particle mode
if(particles[ix][0]->id()==id[0]&&particles[ix].size()==id.size())
{
nfound=1;
for(iy=0;iy<id.size();++iy){done[iy]=false;}
for(iy=1;iy<id.size();++iy)
{
idtemp=particles[ix][iy]->id();
iz=1;found=false;
do{if(idtemp==id[iz]&&!done[iz]){done[iz]=true;found=true;}++iz;}
while(iz<id.size()&&!found);
if(found){++nfound;}
}
if(nfound==id.size()){cc.push_back(false);loc.push_back(ix);}
}
// the charge conjugate mode
if(particles[ix][0]->id()==idbar[0]&&particles[ix].size()==idbar.size())
{
nfound=1;
for(iy=0;iy<idbar.size();++iy){done[iy]=false;}
for(iy=1;iy<idbar.size();++iy)
{
idtemp=particles[ix][iy]->id();
iz=1;found=false;
do{if(idtemp==idbar[iz]&&!done[iz]){done[iz]=true;found=true;}++iz;}
while(iz<idbar.size()&&!found);
if(found){++nfound;}
}
if(nfound==idbar.size()){cc.push_back(false);loc.push_back(ix);}
}
}
}
// output the setup information for the particle database
void BaryonFactorizedDecayer::dataBaseOutput(ofstream & output, bool header) const
{
unsigned int ix;
if(header){output << "update decayers set parameters=\"";}
DecayIntegrator::dataBaseOutput(output,false);
output << "newdef " << name() << ":a1Bottom " << _a1b << "\n";
output << "newdef " << name() << ":a2Bottom " << _a2b << "\n";
output << "newdef " << name() << ":a1Charm " << _a1c << "\n";
output << "newdef " << name() << ":a2Charm " << _a2c << "\n";
output << "newdef " << name() << ":CKM " << _theCKM->name() << " \n";
for(ix=0;ix<_wgtloc.size();++ix)
{output << "insert " << name() << ":WeightLocation " << ix << " "
<< _wgtloc[ix] << "\n";}
for(ix=0;ix<_wgtmax.size();++ix)
{output << "insert " << name() << ":MaximumWeight " << ix << " "
<< _wgtmax[ix] << "\n";}
for(ix=0;ix<_weights.size();++ix)
{output << "insert " << name() << ":Weights " << ix << " "
<< _weights[ix] << "\n";}
_current->dataBaseOutput(output,false,true);
output << "newdef " << name() << ":Current " << _current->name() << " \n";
_form->dataBaseOutput(output,false,true);
output << "newdef " << name() << ":FormFactor " << _form->name() << " \n";
if(header){output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;}
}
diff --git a/Decay/Baryon/BaryonFactorizedDecayer.h b/Decay/Baryon/BaryonFactorizedDecayer.h
--- a/Decay/Baryon/BaryonFactorizedDecayer.h
+++ b/Decay/Baryon/BaryonFactorizedDecayer.h
@@ -1,281 +1,281 @@
// -*- C++ -*-
#ifndef HERWIG_BaryonFactorizedDecayer_H
#define HERWIG_BaryonFactorizedDecayer_H
//
// This is the declaration of the BaryonFactorizedDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/WeakCurrents/WeakDecayCurrent.h"
#include "Herwig/Decay/FormFactors/BaryonFormFactor.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Models/StandardModel/StandardCKM.h"
#include "ThePEG/Helicity/LorentzRSSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The BaryonFactorizedDecayer class is designed to combine the form factor
* for a weak baryon transition and a weak decay current to produce a decayer.
* It is mainly based on the results of PRD56, 2799.
*
* @see BaryonFactorizedDecayer
* @see BaryonFormFactor
* @see WeakDecayCurrent
*/
class BaryonFactorizedDecayer: public DecayIntegrator {
public:
/**
* The default constructor.
*/
BaryonFactorizedDecayer();
/**
* Check if this decayer can perfom the decay for a particular mode.
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* This method combines the form factor and the weka current to
* calculate the matrix element.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt The option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
protected:
/**
* Matrix element for \f$\frac12\to\frac12\f$.
* @param ichan The channel we are calculating the matrix element for.
* @param inpart The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt The option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double halfHalf(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for \f$\frac12\to\frac32\f$.
* @param ichan The channel we are calculating the matrix element for.
* @param inpart The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt The option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double halfThreeHalf(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* Find duplicate modes in the list of particles
* @param imode The mode we are studying
* @param particles The external particles for the different modes
* @param loc The location of the duplicate mode
* @param cc If the duplicate is the charge conjugate
*/
void findModes(unsigned int imode,vector<tPDVector> & particles,
vector<unsigned int> & loc,vector<bool> & cc);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BaryonFactorizedDecayer & operator=(const BaryonFactorizedDecayer &);
+ BaryonFactorizedDecayer & operator=(const BaryonFactorizedDecayer &) = delete;
private:
/**
* The weak decay current
*/
WeakDecayCurrentPtr _current;
/**
* The baryon form factor
*/
BaryonFormFactorPtr _form;
/**
* The perturbative coefficients
*/
//@{
/**
* The perturbative \f$a_1\f$ coefficient for b decays.
*/
double _a1b;
/**
* The perturbative \f$a_2\f$ coefficient for b decays.
*/
double _a2b;
/**
* The perturbative \f$a_1\f$ coefficient for c decays.
*/
double _a1c;
/**
* The perturbative \f$a_2\f$ coefficient for c decays.
*/
double _a2c;
//@}
/**
* Mapping of the modes to the currents
*/
vector<vector<unsigned int> > _currentmap;
/**
* Mapping of the modes to the form factors
*/
vector<vector<unsigned int> > _formmap;
/**
* The CKM factors
*/
vector<vector <Complex> > _factCKM;
/**
* location of the weights
*/
vector<int> _wgtloc;
/**
* the maximum weights
*/
vector<double> _wgtmax;
/**
* weights for the different channels
*/
vector<double> _weights;
/**
* Pointer to the CKM object.
*/
Ptr<StandardCKM>::pointer _theCKM;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Spin-\f$\frac12\f$ spinors
*/
mutable vector<LorentzSpinor<SqrtEnergy> > _inHalf;
/**
* Spin-\f$\frac12\f$ barred spinors
*/
mutable vector<LorentzSpinorBar<SqrtEnergy> > _inHalfBar;
/**
* Spin-\f$\frac32\f$ spinors
*/
mutable vector<LorentzRSSpinor<SqrtEnergy> > _inThreeHalf;
/**
* Spin-\f$\frac32\f$ barred spinors
*/
mutable vector<LorentzRSSpinorBar<SqrtEnergy> > _inThreeHalfBar;
};
}
#endif /* HERWIG_BaryonFactorizedDecayer_H */
diff --git a/Decay/Baryon/KornerKramerCharmDecayer.h b/Decay/Baryon/KornerKramerCharmDecayer.h
--- a/Decay/Baryon/KornerKramerCharmDecayer.h
+++ b/Decay/Baryon/KornerKramerCharmDecayer.h
@@ -1,349 +1,349 @@
// -*- C++ -*-
#ifndef HERIWG_KornerKramerCharmDecayer_H
#define HERIWG_KornerKramerCharmDecayer_H
//
// This is the declaration of the KornerKramerCharmDecayer class.
//
#include "Baryon1MesonDecayerBase.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>KornerKramerCharmDecayer</code> class implements the model of
* Z.Phys.C55,659 (1992) for the non-leptonic decay of charm baryons.
* The couplings of the model are calculated at initialisation and stored. These
* couplings are then returned when requested using the coupling members of the
* base class.
*
* @see Baryon1MesonDecayerBase.
*
*/
class KornerKramerCharmDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
KornerKramerCharmDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void halfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfThreeHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param A3 The coupling \f$A_3\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
* @param B3 The coupling \f$B_3\f$ described above.
*/
virtual void halfThreeHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,Complex& A3,
Complex& B1,Complex& B2,Complex& B3) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- KornerKramerCharmDecayer & operator=(const KornerKramerCharmDecayer &);
+ KornerKramerCharmDecayer & operator=(const KornerKramerCharmDecayer &) = delete;
private:
/**
* one over the number of colours
*/
double oneNC_;
/**
* Pion decay constant, \f$f_\pi\f$.
*/
Energy fpi_;
/**
* Kaon decay constant, \f$f_K\f$.
*/
Energy fk_;
/**
* \f$\rho\f$ decay constant, \f$f_\rho\f$.
*/
double frho_;
/**
* \f$K^*\f$ decay constans, \f$f_{K^*}\f$.
*/
double fKstar_;
/**
* Axial-Vector mass for the form factor for the factorizing diagrams
* for the \f$c\to d\f$ transition.
*/
Energy mdcplus_;
/**
* Vector mass for the form factor for the factorizing diagrams
* for the \f$c\to d\f$ transition.
*/
Energy mdcminus_;
/**
* Axial-Vector mass for the form factor for the factorizing diagrams
* for the \f$c\to s\f$ transition.
*/
Energy mscplus_;
/**
* Vector mass for the form factor for the factorizing diagrams
* for the \f$c\to s\f$ transition.
*/
Energy mscminus_;
/**
* Perturbative factor, \f$c_+\f$.
*/
double cplus_;
/**
* Perturbative factor, \f$c_-\f$.
*/
double cminus_;
/**
* \f$H_2\f$ factor for the non-factorizing diagrams.
*/
Energy H2_;
/**
* \f$H_3\f$ factor for the non-factorizing diagrams.
*/
Energy H3_;
/**
* SU(4) invariants for the various modes
*/
//@{
/**
* The \f$I_1\f$ invariant
*/
vector<double> I1_;
/**
* The \f$I_2\f$ invariant
*/
vector<double> I2_;
/**
* The \f$I_3\f$ invariant
*/
vector<double> I3_;
/**
* The \f$I_4\f$ invariant
*/
vector<double> I4_;
/**
* The \f$I_5\f$ invariant
*/
vector<double> I5_;
/**
* The \f$\hat{I}_3\f$ invariant
*/
vector<double> Ihat3_;
/**
* The \f$\hat{I}_4\f$ invariant
*/
vector<double> Ihat4_;
//@}
/**
* The PDG code for the incoming baryon.
*/
vector<int> incoming_;
/**
* The PDG code for the outgoing baryon.
*/
vector<int> outgoingB_;
/**
* The PDG code for the outgoing meson.
*/
vector<int> outgoingM_;
/**
* The maximum weight.
*/
vector<double> maxweight_;
/**
* The couplings for the different modes.
*/
//@{
/**
* The first A coupling
*/
vector<double> A1_;
/**
* The second A coupling
*/
vector<InvEnergy> A2_;
/**
* The third A coupling
*/
vector<InvEnergy2> A3_;
/**
* The first B coupling
*/
vector<double> B1_;
/**
* The second B coupling
*/
vector<InvEnergy> B2_;
/**
* The third B coupling
*/
vector<InvEnergy2> B3_;
//@}
/**
* Initial size of the vectors
*/
unsigned int initsize_;
};
}
#endif /* HERIWG_KornerKramerCharmDecayer_H */
diff --git a/Decay/Baryon/NonLeptonicHyperonDecayer.h b/Decay/Baryon/NonLeptonicHyperonDecayer.h
--- a/Decay/Baryon/NonLeptonicHyperonDecayer.h
+++ b/Decay/Baryon/NonLeptonicHyperonDecayer.h
@@ -1,176 +1,176 @@
// -*- C++ -*-
#ifndef HERWIG_NonLeptonicHyperonDecayer_H
#define HERWIG_NonLeptonicHyperonDecayer_H
//
// This is the declaration of the NonLeptonicHyperonDecayer class.
//
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This is a general class for the non-leptonic decay of hyperons. The
* decays are given in terms of the invariant amplitudes
* \f[\bar{u}_{B_j} \left\{A+B\gamma_5\right\}u_{B_i}\f]
* where \f$B_j\f$ is the outgoing baryon and \f$B_i\f$ is the incoming baryon.
*
* The default amplitudes are taken from the fit in hep-ph/9902351,
* N.B. due to the sign conventions in hep-ph/9902351 the B amplitudes
* have the opposite sign.
*
* @see Baryon1MesonDecayerBase
*
*/
class NonLeptonicHyperonDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
NonLeptonicHyperonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
protected:
/**
* Private and non-existent assignment operator.
*/
- NonLeptonicHyperonDecayer & operator=(const NonLeptonicHyperonDecayer &);
+ NonLeptonicHyperonDecayer & operator=(const NonLeptonicHyperonDecayer &) = delete;
private:
/**
* PDG code for the incoming baryon.
*/
vector<long> _incomingB;
/**
* PDG code for the outgoing baryon.
*/
vector<long> _outgoingB;
/**
* PDG code for the outgoing meson
*/
vector<long> _outgoingM;
/**
* The \f$A\f$ coefficient.
*/
vector<double> _a;
/**
* The \f$B\f$ coefficient.
*/
vector<double> _b;
/**
* the maximum weights for the decays
*/
vector<double> _maxweight;
/**
* initial size fo the vectors
*/
unsigned int _initsize;
};
}
#endif /* HERWIG_NonLeptonicHyperonDecayer_H */
diff --git a/Decay/Baryon/NonLeptonicOmegaDecayer.h b/Decay/Baryon/NonLeptonicOmegaDecayer.h
--- a/Decay/Baryon/NonLeptonicOmegaDecayer.h
+++ b/Decay/Baryon/NonLeptonicOmegaDecayer.h
@@ -1,286 +1,286 @@
// -*- C++ -*-
#ifndef HERWIG_NonLeptonicOmegaDecayer_H
#define HERWIG_NonLeptonicOmegaDecayer_H
// This is the declaration of the NonLeptonicOmegaDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>NonLeptonicOmegaDecayer</code> class is designed for the non-leptonic
* weak decay of the Omega to a baryon from the lightest \f$SU(3)\f$ octet and a
* pseudoscalar meson. The results are taken from hep-ph/9905398.
*
* due to problems with the size of the d-wave term and recent measurements giving
* the opposite sign for the \f$\alpha\f$ parameter we have set this term to zero.
*
* @see Baryon1MesonDecayerBase.
*
*/
class NonLeptonicOmegaDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
NonLeptonicOmegaDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void threeHalfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- NonLeptonicOmegaDecayer & operator=(const NonLeptonicOmegaDecayer &);
+ NonLeptonicOmegaDecayer & operator=(const NonLeptonicOmegaDecayer &) = delete;
private:
/**
* The \f$d^*\f$ coupling for the \f$B^*\f$ multiplet, this is \f$d^* /M_{B^*}\f$
* from the paper.
*/
double _dstar;
/**
* The \f$f^*\f$ coupling for the \f$B^*\f$ multiplet, this is \f$f^* /M_{B^*}\f$
* from the paper.
*/
double _fstar;
/**
* The \f$\omega_d\f$ coupling for the \f$R\f$ multiplet, this is \f$\omega_d/M_R\f$
* from the paper.
*/
double _omegad;
/**
* The \f$\omega_f\f$ coupling for the \f$R\f$ multiplet, this is \f$\omega_f/M_R\f$
* from the paper.
*/
double _omegaf;
/**
* The \f$\mathcal{C}_{B^*}\f$ coupling of the \f$B^*\f$ multiplet to the decuplet.
*/
double _cbstar;
/**
* The \f$s_c\f$ coupling of the \f$R\f$ multiplet to the decuplet.
*/
double _sc;
/**
* The \f$\mathcal{C}\f$ coupling of the decuplet to the ground state baryons.
*/
double _c;
/**
* The pion decay constant \f$f_\pi\f$.
*/
Energy _fpi;
/**
* The \f$h_\pi\f$ pion self-coupling.
*/
double _hpi;
/**
* The \f$h_c\f$ coupling.
*/
Energy _hc;
/**
* The \f$d\f$ coupling for the ground-state baryon multiplet.
*/
Energy _d;
/**
* The \f$f\f$ coupling for the ground-state baryon multiplet.
*/
Energy _f;
/**
* The mass of the \f$\Lambda^0\f$.
*/
Energy _mlambda;
/**
* The mass of the \f$\Xi\f$.
*/
Energy _mxi;
/**
* The mass of the \f$\Omega\f$.
*/
Energy _momega;
/**
* The mass of the \f$\Xi^*\f$.
*/
Energy _mxistar;
/**
* The mass of the \f$\pi^+\f$.
*/
Energy _mpip;
/**
* The mass of the \f$\pi^0\f$.
*/
Energy _mpi0;
/**
* The mass of the \f$K^+\f$.
*/
Energy _mkp;
/**
* The mass of the \f$K^0\f$.
*/
Energy _mk0;
/**
* The mass of the \f$B^*\f$ resonance, this is the \f$\frac12^+\f$ multiplet.
*/
Energy _mbstar;
/**
* The mass of the \f$R\f$ resonance, this is the \f$\frac12^-\f$ multiplet.
*/
Energy _mr;
/**
* use local values for the masses for the couplings
*/
bool _localmasses;
/**
* The PDG code for the incoming baryon.
*/
long _incomingB;
/**
* The PDG code for the outgoing baryon.
*/
vector<long> _outgoingB;
/**
* The PDG code for the outgoing meson.
*/
vector<long> _outgoingM;
/**
* The \f$A\f$ coefficient for the decays.
*/
vector<InvEnergy> _a;
/**
* The \f$B\f$ coefficient for the decays.
*/
vector<InvEnergy> _b;
/**
* The maximum weights for the decays.
*/
vector<double> _maxweight;
};
}
#endif /* HERWIG_NonLeptonicOmegaDecayer_H */
diff --git a/Decay/Baryon/OmegaXiStarPionDecayer.h b/Decay/Baryon/OmegaXiStarPionDecayer.h
--- a/Decay/Baryon/OmegaXiStarPionDecayer.h
+++ b/Decay/Baryon/OmegaXiStarPionDecayer.h
@@ -1,177 +1,177 @@
// -*- C++ -*-
#ifndef HERWIG_OmegaXiStarPionDecayer_H
#define HERWIG_OmegaXiStarPionDecayer_H
// This is the declaration of the OmegaXiStarPionDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The OmegaXiStarPionDecayer class implements the results of
* hep-ph/0405162 for the weak decay of the \f$\Omega\f$ to the \f$\Xi^*\f$ and a pion.
*
* @see Baryon1MesonDecayerBase
*
*/
class OmegaXiStarPionDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
OmegaXiStarPionDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac32\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void threeHalfThreeHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
//@}
public:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- OmegaXiStarPionDecayer & operator=(const OmegaXiStarPionDecayer &);
+ OmegaXiStarPionDecayer & operator=(const OmegaXiStarPionDecayer &) = delete;
private:
/**
* The \f$A_{\rm Comm}\f$ amplitude from hep-ph/0405162
*/
double Acomm_;
/**
* The \f$A_P\f$ amplitude from hep-ph/0405162
*/
double AP_;
/**
* The \f$A_S\f$ amplitude from hep-ph/0405162
*/
double AS_;
/**
* The \f$B_P\f$ amplitude from hep-ph/0405162
*/
double BP_;
/**
* The \f$B_S\f$ amplitude from hep-ph/0405162
*/
double BS_;
/**
* PDG code of the incoming baryon
*/
int idin_;
/**
* PDG code of the outgoing baryon
*/
int idout_;
/**
* maximum weight for the decay
*/
double wgtmax_;
};
}
#endif /* HERWIG_OmegaXiStarPionDecayer_H */
diff --git a/Decay/Baryon/RadiativeHeavyBaryonDecayer.h b/Decay/Baryon/RadiativeHeavyBaryonDecayer.h
--- a/Decay/Baryon/RadiativeHeavyBaryonDecayer.h
+++ b/Decay/Baryon/RadiativeHeavyBaryonDecayer.h
@@ -1,209 +1,209 @@
// -*- C++ -*-
#ifndef HERWIG_RadiativeHeavyBaryonDecayer_H
#define HERWIG_RadiativeHeavyBaryonDecayer_H
//
// This is the declaration of the RadiativeHeavyBaryonDecayer class.
//
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace Herwig;
/** \ingroup Decay
*
* The RadiativeHeavyBaryonDecayer class is designed for the radiative decay
* of a baryon containing a heavy quark to another baryon containing a heavy quark.
* There are four types of transition supported
*
* - \f$\frac12^-\to\frac12^+\f$ \f$E1\f$ transition
* \f[\mathcal{M} = A_{E1}\bar{B}\gamma^\mu\gamma_5B^*F^{\mu\nu}p_{0\mu}\f]
*
* - \f$\frac12^+\to\frac12^+\f$ \f$M1\f$ transition
* \f[\mathcal{M} = A_{M1}\bar{B}\sigma^{\mu\nu}B^*F^{\mu\nu}\f]
*
* - \f$\frac32^-\to\frac12^+\f$ \f$E1\f$ transition
* \f[\mathcal{M} = A_{E1}\bar{B}B^*_\nu F^{\mu\nu}p_{0\mu}\f]
*
* - \f$\frac32^+\to\frac12^+\f$ \f$M1\f$ transition
* \f[\mathcal{M} = A_{M1}\bar{B}\gamma_\mu\gamma_5B^*_\nu F^{\mu\nu}\f]
*
* where \f$p_0\f$ is the momentum of the decaying baryon \f$B^*\f$ is the field for
* the decaying baryon, \f$B\f$ is the field for the baryon produced in the decay and
* \f$F^{\mu\nu}\f$ is the electromagnetic field strength tensor.
*
*/
class RadiativeHeavyBaryonDecayer: public Baryon1MesonDecayerBase {
public:
/**
* The default constructor.
*/
RadiativeHeavyBaryonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void halfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param A3 The coupling \f$A_3\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
* @param B3 The coupling \f$B_3\f$ described above.
*/
virtual void threeHalfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,Complex& A3,
Complex& B1,Complex& B2,Complex& B3) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RadiativeHeavyBaryonDecayer & operator=(const RadiativeHeavyBaryonDecayer &);
+ RadiativeHeavyBaryonDecayer & operator=(const RadiativeHeavyBaryonDecayer &) = delete;
private:
/**
* The \f$M1\f$ coupling
*/
vector<InvEnergy> _m1coupling;
/**
* The \f$E1\f$ coupling
*/
vector<InvEnergy2> _e1coupling;
/**
* PDG code for the incoming baryons
*/
vector<int> _incoming;
/**
* PDG code for the outgoing baryons
*/
vector<int> _outgoingB;
/**
* The type of matrix element
*/
vector<int> _modetype;
/**
* max weight
*/
vector<double> _maxweight;
/**
* The initial size of the arrays
*/
unsigned int _initsize;
};
}
#endif /* HERWIG_RadiativeHeavyBaryonDecayer_H */
diff --git a/Decay/Baryon/RadiativeHyperonDecayer.h b/Decay/Baryon/RadiativeHyperonDecayer.h
--- a/Decay/Baryon/RadiativeHyperonDecayer.h
+++ b/Decay/Baryon/RadiativeHyperonDecayer.h
@@ -1,176 +1,176 @@
// -*- C++ -*-
#ifndef HERWIG_RadiativeHyperonDecayer_H
#define HERWIG_RadiativeHyperonDecayer_H
//
// This is the declaration of the RadiativeHyperonDecayer class.
//
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The RadiativeHyperonDecayer class provides the matrix elements
* for the decay of hyperons in which a photon is produced using the
* model of Phys. Rev. D 59 (1999) 054019 [arXiv:hep-ph/9902431].
*
* @see \ref RadiativeHyperonDecayerInterfaces "The interfaces"
* defined for RadiativeHyperonDecayer.
*/
class RadiativeHyperonDecayer: public Baryon1MesonDecayerBase {
public:
/**
* The default constructor.
*/
RadiativeHyperonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a vector.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac12+1\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void halfHalfVectorCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RadiativeHyperonDecayer & operator=(const RadiativeHyperonDecayer &);
+ RadiativeHyperonDecayer & operator=(const RadiativeHyperonDecayer &) = delete;
private:
/**
* PDG code for the incoming baryon.
*/
vector<long> incomingB_;
/**
* PDG code for the outgoing baryon.
*/
vector<long> outgoingB_;
/**
* The \f$A\f$ coefficient.
*/
vector<InvEnergy> A_;
/**
* The \f$B\f$ coefficient.
*/
vector<InvEnergy> B_;
/**
* the maximum weights for the decays
*/
vector<double> maxweight_;
/**
* initial size fo the vectors
*/
unsigned int initsize_;
};
}
#endif /* HERWIG_RadiativeHyperonDecayer_H */
diff --git a/Decay/Baryon/SU3BaryonDecupletOctetPhotonDecayer.h b/Decay/Baryon/SU3BaryonDecupletOctetPhotonDecayer.h
--- a/Decay/Baryon/SU3BaryonDecupletOctetPhotonDecayer.h
+++ b/Decay/Baryon/SU3BaryonDecupletOctetPhotonDecayer.h
@@ -1,298 +1,298 @@
// -*- C++ -*-
#ifndef HERWIG_SU3BaryonDecupletOctetPhotonDecayer_H
#define HERWIG_SU3BaryonDecupletOctetPhotonDecayer_H
// This is the declaration of the SU3BaryonDecupletOctetPhotonDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SU3BaryonDecupletOctetPhotonDecayer</code> class is designed for the decay
* of a deculpet baryon to an octet baryon and a photon using the SU(3) conserving
* term in the chiral lagrangian.
*
* The lagrangian is taken to be
* \f[ \bar{B}_i^b\gamma^\nu\gamma_5\Delta^\mu_{jbc}Q_j\epsilon^{cij}F_{\mu\nu},\f]
* where \f$B\f$ is the matrix field for the baryon octet, \f$\Delta\f$ is the field for
* the decuplet, \f$Q\f$ is the charge matrix
* \f[Q = \left(\begin{array}{ccc}\frac23&0&0\\
* 0&-\frac13&0\\
* 0&0&-\frac13
* \end{array}\right),\f]
* and \f$F^{\mu\nu}\f$ is the electromagnetic field strength. This form is used when
* the multiplets have the same parity and this form without the \f$\gamma_5\f$ if
* the multiplets have opposite parity.
*
* This is one of a number of decayers based on \f$SU(3)\f$ symmetry which are
* intended for the decay of excited baryons.
*
* @see Baryon1MesonDecayerBase
* @see SU3BaryonOctetOctetPhotonDecayer
* @see SU3BaryonDecupletOctetPhotonDecayer
* @see SU3BaryonDecupletOctetScalarDecayer
* @see SU3BaryonSingletOctetPhotonDecayer
* @see SU3BaryonSingletOctetScalarDecayer
* @see SU3BaryonOctetDecupletScalarDecayer
* @see SU3BaryonOctetOctetScalarDecayer
*
*/
class SU3BaryonDecupletOctetPhotonDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
SU3BaryonDecupletOctetPhotonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param A3 The coupling \f$A_3\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
* @param B3 The coupling \f$B_3\f$ described above.
*/
virtual void threeHalfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,Complex& A3,
Complex& B1,Complex& B2,Complex& B3) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SU3BaryonDecupletOctetPhotonDecayer & operator=(const SU3BaryonDecupletOctetPhotonDecayer &);
+ SU3BaryonDecupletOctetPhotonDecayer & operator=(const SU3BaryonDecupletOctetPhotonDecayer &) = delete;
private:
/**
* set-up the modes
*/
void setupModes(unsigned int) const;
private:
/**
* the coupling
*/
InvEnergy C_;
/**
* the relative parities of the two baryon multiplets
*/
bool parity_;
/**
* PDG codes for the various octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the outgoing octet.
*/
int proton_;
/**
* The PDG code for the \f$n\f$-like member of the outgoing octet.
*/
int neutron_;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int sigma0_;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the outgoing octet.
*/
int sigmap_;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the outgoing octet.
*/
int sigmam_;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int lambda_;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the outgoing octet.
*/
int xi0_;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the outgoing octet.
*/
int xim_;
//@}
/**
* PDG codes for the various decuplet baryons
*/
//@{
/**
* The PDG code for the \f$\Delta^{++}\f$-like member of the outgoing decuplet.
*/
int deltapp_;
/**
* The PDG code for the \f$\Delta^{+}\f$-like member of the outgoing decuplet.
*/
int deltap_;
/**
* The PDG code for the \f$\Delta^{0}\f$-like member of the outgoing decuplet.
*/
int delta0_;
/**
* The PDG code for the \f$\Delta^{-}\f$-like member of the outgoing decuplet.
*/
int deltam_;
/**
* The PDG code for the \f$\Sigma^{*+}\f$-like member of the outgoing decuplet.
*/
int sigmasp_;
/**
* The PDG code for the \f$\Sigma^{*0}\f$-like member of the outgoing decuplet.
*/
int sigmas0_;
/**
* The PDG code for the \f$\Sigma^{*-}\f$-like member of the outgoing decuplet.
*/
int sigmasm_;
/**
* The PDG code for the \f$\Omega^-\f$-like member of the outgoing decuplet.
*/
int omega_;
/**
* The PDG code for the \f$\Xi^{*-}\f$-like member of the outgoing decuplet.
*/
int xism_;
/**
* The PDG code for the \f$\Xi^{*0}\f$-like member of the outgoing decuplet.
*/
int xis0_;
//@}
/**
* PDG code for the incoming baryons
*/
mutable vector<int> incomingB_;
/**
* PDG code for the outgoing baryons
*/
mutable vector<int> outgoingB_;
/**
* the maximum weight for the various modes
*/
vector<double> maxweight_;
/**
* The couplings for the different modes.
*/
mutable vector<InvEnergy> prefactor_;
};
}
#endif /* HERWIG_SU3BaryonDecupletOctetPhotonDecayer_H */
diff --git a/Decay/Baryon/SU3BaryonDecupletOctetScalarDecayer.h b/Decay/Baryon/SU3BaryonDecupletOctetScalarDecayer.h
--- a/Decay/Baryon/SU3BaryonDecupletOctetScalarDecayer.h
+++ b/Decay/Baryon/SU3BaryonDecupletOctetScalarDecayer.h
@@ -1,304 +1,304 @@
// -*- C++ -*-
#ifndef HERWIG_SU3BaryonDecupletOctetScalarDecayer_H
#define HERWIG_SU3BaryonDecupletOctetScalarDecayer_H
//
// This is the declaration of the SU3BaryonDecupletOctetScalarDecayer class.
//
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SU3BaryonDecupletOctetScalarDecayer</code> class is designed for the
* decay of a \f$SU(3)\f$ deculpet baryon to an octet baryon and a pseudoscalar meson
* from the lightest multiplet.
*
* The coupling is taken to have the form
* \f[\frac{C}{f_\pi}\left[
* \bar{\Delta}^{\mu,abc}p_{\phi,\mu}\phi^i_aB^j_b\epsilon_{cij}
* -\bar{B}^b_ip_{\phi,\mu}\phi^a_j\Delta^\mu_{abc}\epsilon^{cij}
* \right],\f]
* where \f$\Delta^\mu_{abc}\f$ is the decuplet field, \f$B^j_b\f$
* is the octet field and
* \f$\phi^i_a\f$ is the pseudoscalar field, \f$f_\pi\f$ is the pion decay constant
* and \f$C\f$ is the coupling for the decay.
*
* This is one of a number of decayers based on \f$SU(3)\f$ symmetry which are
* intended for the decay of excited baryons.
*
* @see Baryon1MesonDecayerBase
* @see SU3BaryonOctetOctetPhotonDecayer
* @see SU3BaryonDecupletOctetPhotonDecayer
* @see SU3BaryonDecupletOctetScalarDecayer
* @see SU3BaryonSingletOctetPhotonDecayer
* @see SU3BaryonSingletOctetScalarDecayer
* @see SU3BaryonOctetDecupletScalarDecayer
* @see SU3BaryonOctetOctetScalarDecayer
*
*/
class SU3BaryonDecupletOctetScalarDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
SU3BaryonDecupletOctetScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void threeHalfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
SU3BaryonDecupletOctetScalarDecayer &
- operator=(const SU3BaryonDecupletOctetScalarDecayer &);
+ operator=(const SU3BaryonDecupletOctetScalarDecayer &) = delete;
private:
/**
* Set-up the modes
*/
void setupModes(unsigned int) const;
private:
/**
* the coupling
*/
double _c;
/**
* the relative parities of the two baryon multiplets
*/
bool _parity;
/**
* the pion decay constant
*/
Energy _fpi;
/**
* PDG codes for the various octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the outgoing octet.
*/
long _proton;
/**
* The PDG code for the \f$n\f$-like member of the outgoing octet.
*/
long _neutron;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
long _sigma0;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the outgoing octet.
*/
long _sigmap;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the outgoing octet.
*/
long _sigmam;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
long _lambda;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the outgoing octet.
*/
long _xi0;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the outgoing octet.
*/
long _xim;
//@}
/**
* PDG codes for the various decuplet baryons
*/
//@{
/**
* The PDG code for the \f$\Delta^{++}\f$-like member of the incoming decuplet.
*/
long _deltapp;
/**
* The PDG code for the \f$\Delta^{+}\f$-like member of the incoming decuplet.
*/
long _deltap;
/**
* The PDG code for the \f$\Delta^{0}\f$-like member of the incoming decuplet.
*/
long _delta0;
/**
* The PDG code for the \f$\Delta^{-}\f$-like member of the incoming decuplet.
*/
long _deltam;
/**
* The PDG code for the \f$\Sigma^{*+}\f$-like member of the incoming decuplet.
*/
long _sigmasp;
/**
* The PDG code for the \f$\Sigma^{*0}\f$-like member of the incoming decuplet.
*/
long _sigmas0;
/**
* The PDG code for the \f$\Sigma^{*-}\f$-like member of the incoming decuplet.
*/
long _sigmasm;
/**
* The PDG code for the \f$\Omega^-\f$-like member of the incoming decuplet.
*/
long _omega;
/**
* The PDG code for the \f$\Xi^{*-}\f$-like member of the incoming decuplet.
*/
long _xism;
/**
* The PDG code for the \f$\Xi^{*0}\f$-like member of the incoming decuplet.
*/
long _xis0;
//@}
/**
* PDG code for the incoming baryons
*/
mutable vector<long> _incomingB;
/**
* PDG code for the outgoing baryons
*/
mutable vector<long> _outgoingB;
/**
* PDG code for the outgoing mesons
*/
mutable vector<long> _outgoingM;
/**
* the maximum weight for the various modes
*/
vector<double> _maxweight;
/**
* The couplings for the different modes
*/
mutable vector<InvEnergy> _prefactor;
};
}
#endif /* HERWIG_SU3BaryonDecupletOctetScalarDecayer_H */
diff --git a/Decay/Baryon/SU3BaryonOctetDecupletScalarDecayer.h b/Decay/Baryon/SU3BaryonOctetDecupletScalarDecayer.h
--- a/Decay/Baryon/SU3BaryonOctetDecupletScalarDecayer.h
+++ b/Decay/Baryon/SU3BaryonOctetDecupletScalarDecayer.h
@@ -1,327 +1,327 @@
// -*- C++ -*-
#ifndef HERWIG_SU3BaryonOctetDecupletScalarDecayer_H
#define HERWIG_SU3BaryonOctetDecupletScalarDecayer_H
// This is the declaration of the SU3BaryonOctetDecupletScalarDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SU3BaryonOctetDecupletScalarDecayer</code> class is designed for the decay
* of an SU(3) octet baryon to a deculpet baryon and a pseudoscalar meson from the
* lightest multiplet.
*
* The coupling is taken to have the form
* \f[\frac{C}{f_\pi}\left[
* \bar{\Delta}^{\mu,abc}p_{\phi,\mu}\phi^i_aB^j_b\epsilon_{cij}
* -\bar{B}^b_ip_{\phi,\mu}\phi^a_j\Delta^\mu_{abc}\epsilon^{cij}
* \right],\f]
* where \f$\Delta^\mu_{abc}\f$ is the decuplet field, \f$B^j_b\f$ is the
* octet field,
* \f$\phi^i_a\f$ is the pseudoscalar field, \f$f_\pi\f$ is the pion decay constant
* and \f$C\f$ is the coupling for the decay.
* This form is used for the \f$\frac12^+\f$ octet mesons and the same form with
* \f$\gamma_5\f$ for the \f$\frac12^-\f$ octet.
*
* The above form is used for the decay \f$\frac12\to\frac32+0\f$ whereas for the
* decay of a spin-\f$\frac32\f$ octet we use
* \f[\frac{C}{f_\pi}\left[
* \bar{\Delta}^{\mu,abc}p_\phi\!\!\!\!\!\!\!\!\not\,\,\,\,\,\phi^i_aB^j_{b\mu}\epsilon_{cij}
* -\bar{B}^b_{i\mu}p_\phi\!\!\!\!\!\!\!\!\not\,\,\,\,\,\phi^a_j\Delta^\mu_{abc}\epsilon^{cij}
* \right]\f]
* where the decuplet and octet have the same parity and the same form with the
* addition of \f$\gamma_5\f$ if they have opposite parity.
*
* This is one of a number of decayers based on \f$SU(3)\f$ symmetry which are
* intended for the decay of excited baryons.
*
* @see Baryon1MesonDecayerBase
* @see SU3BaryonOctetOctetPhotonDecayer
* @see SU3BaryonDecupletOctetPhotonDecayer
* @see SU3BaryonDecupletOctetScalarDecayer
* @see SU3BaryonSingletOctetPhotonDecayer
* @see SU3BaryonSingletOctetScalarDecayer
* @see SU3BaryonOctetDecupletScalarDecayer
* @see SU3BaryonOctetOctetScalarDecayer
*
*/
class SU3BaryonOctetDecupletScalarDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
SU3BaryonOctetDecupletScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfThreeHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac32\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void threeHalfThreeHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SU3BaryonOctetDecupletScalarDecayer & operator=(const SU3BaryonOctetDecupletScalarDecayer &);
+ SU3BaryonOctetDecupletScalarDecayer & operator=(const SU3BaryonOctetDecupletScalarDecayer &) = delete;
private:
/**
* set-up the modes
*/
void setupModes(unsigned int) const;
private:
/**
* the couplings
*/
double _c;
/**
* the relative parities of the two baryon multiplets
*/
bool _parity;
/**
* the pion decay constant
*/
Energy _fpi;
/**
* PDG codes for the various octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the incoming octet.
*/
int _proton;
/**
* The PDG code for the \f$n\f$-like member of the incoming octet.
*/
int _neutron;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the incoming octet.
*/
int _sigma0;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the incoming octet.
*/
int _sigmap;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the incoming octet.
*/
int _sigmam;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the incoming octet.
*/
int _lambda;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the incoming octet.
*/
int _xi0;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the incoming octet.
*/
int _xim;
//@}
/**
* PDG codes for the various decuplet baryons
*/
//@{
/**
* The PDG code for the \f$\Delta^{++}\f$-like member of the outgoing decuplet.
*/
int _deltapp;
/**
* The PDG code for the \f$\Delta^{+}\f$-like member of the outgoing decuplet.
*/
int _deltap;
/**
* The PDG code for the \f$\Delta^{0}\f$-like member of the outgoing decuplet.
*/
int _delta0;
/**
* The PDG code for the \f$\Delta^{-}\f$-like member of the outgoing decuplet.
*/
int _deltam;
/**
* The PDG code for the \f$\Sigma^{*+}\f$-like member of the outgoing decuplet.
*/
int _sigmasp;
/**
* The PDG code for the \f$\Sigma^{*0}\f$-like member of the outgoing decuplet.
*/
int _sigmas0;
/**
* The PDG code for the \f$\Sigma^{*-}\f$-like member of the outgoing decuplet.
*/
int _sigmasm;
/**
* The PDG code for the \f$\Omega^-\f$-like member of the outgoing decuplet.
*/
int _omega;
/**
* The PDG code for the \f$\Xi^{*-}\f$-like member of the outgoing decuplet.
*/
int _xism;
/**
* The PDG code for the \f$\Xi^{*0}\f$-like member of the outgoing decuplet.
*/
int _xis0;
//@}
/**
* PDG code for the incoming baryons
*/
mutable vector<int> _incomingB;
/**
* PDG code for the outgoing baryons
*/
mutable vector<int> _outgoingB;
/**
* PDG code for the outgoing mesons
*/
mutable vector<int> _outgoingM;
/**
* the maximum weight for the various modes
*/
vector<double> _maxweight;
/**
* The couplings for the different modes.
*/
mutable vector<InvEnergy> _prefactor;
};
}
#endif /* HERWIG_SU3BaryonOctetDecupletScalarDecayer_H */
diff --git a/Decay/Baryon/SU3BaryonOctetOctetPhotonDecayer.h b/Decay/Baryon/SU3BaryonOctetOctetPhotonDecayer.h
--- a/Decay/Baryon/SU3BaryonOctetOctetPhotonDecayer.h
+++ b/Decay/Baryon/SU3BaryonOctetOctetPhotonDecayer.h
@@ -1,333 +1,333 @@
// -*- C++ -*-
#ifndef HERWIG_SU3BaryonOctetOctetPhotonDecayer_H
#define HERWIG_SU3BaryonOctetOctetPhotonDecayer_H
// This is the declaration of the SU3BaryonOctetOctetPhotonDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SU3BaryonOctetOctetPhotonDecayer</code> class performs the decay of
* a baryon octet to a different baryon octet and a photon.
*
* The Lagrangian is taken to be
* \f[
* ir_d\left[ {\rm tr}\left(\bar{R}\sigma_{\mu\nu}\{f^{\mu\nu}_+,B\}\right)
* +{\rm tr}\left(\bar{B}\sigma_{\mu\nu}\{f^{\mu\nu}_+,R\}\right)
* \right]
* +ir_f\left[ {\rm tr}\left(\bar{R}\sigma_{\mu\nu}[f^{\mu\nu}_+,B] \right)
* +{\rm tr}\left(\bar{B}\sigma_{\mu\nu}[f^{\mu\nu}_+,R] \right)
* \right],
* \f]
* where \f$B\f$ is the matrix field for the ground state baryon multiplet, \f$R\f$
* is the
* matrix field for the excited baryon multiplet and \f$f^{\mu\nu}_+\f$ is the chiral
* field strength tensor for the electromagentic field given by
* \f[ f^{\mu\nu}_+ = Q F^{\mu\nu} = \left(\begin{array}{ccc}\frac23&0&0\\
* 0&-\frac13&0\\
* 0&0&-\frac13
* \end{array}\right) F^{\mu\nu},\f]
* where \f$F^{\mu\nu}\f$ is the electromagentic field strength tensor.
* This form is used for the case where both baryon multiplets have the same parity and
* an additional \f$\gamma_5\f$ is added for the case where the multiplets have
* opposite parity.
*
* For the decay of spin-\f$\frac32\f$ baryons we use the form
* \f[
* ir_d\left[ {\rm tr}\left(\bar{R}^\mu\gamma_\nu\{f^{\mu\nu}_+,B\}\right)
* +{\rm tr}\left(\bar{B}\gamma_\nu\{f^{\mu\nu}_+,R^\mu\}\right)
* \right]
* +ir_f\left[ {\rm tr}\left(\bar{R}^\mu\gamma_\nu[f^{\mu\nu}_+,B] \right)
* +{\rm tr}\left(\bar{B}\gamma_\nu[f^{\mu\nu}_+,R^\mu] \right)
* \right],
* \f]
* where \f$R^\mu\f$ is the matrix field for the excited baryon multiplet.
* This form is used when the baryon's have the same parity and this form with
* an additional \f$\gamma_5\f$ when they have opposite parity.
*
* This is one of a number of decayers based on \f$SU(3)\f$ symmetry which are
* intended for the decay of excited baryons.
*
* @see Baryon1MesonDecayerBase
* @see SU3BaryonOctetOctetPhotonDecayer
* @see SU3BaryonDecupletOctetPhotonDecayer
* @see SU3BaryonDecupletOctetScalarDecayer
* @see SU3BaryonSingletOctetPhotonDecayer
* @see SU3BaryonSingletOctetScalarDecayer
* @see SU3BaryonOctetDecupletScalarDecayer
* @see SU3BaryonOctetOctetScalarDecayer
*
*/
class SU3BaryonOctetOctetPhotonDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
SU3BaryonOctetOctetPhotonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void halfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param A3 The coupling \f$A_3\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
* @param B3 The coupling \f$B_3\f$ described above.
*/
virtual void threeHalfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,Complex& A3,
Complex& B1,Complex& B2,Complex& B3) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
SU3BaryonOctetOctetPhotonDecayer &
- operator=(const SU3BaryonOctetOctetPhotonDecayer &);
+ operator=(const SU3BaryonOctetOctetPhotonDecayer &) = delete;
private:
/**
* set-up the modes
*/
void setupModes(unsigned int) const;
private:
/**
* The couplings of comutator term.
*/
InvEnergy _lf;
/**
* The couplings of anticomutator term.
*/
InvEnergy _ld;
/**
* the relative parities of the two baryon multiplets
*/
bool _parity;
/**
* PDG codes for the lower lying baryon octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the outgoing octet.
*/
int _proton;
/**
* The PDG code for the \f$n\f$-like member of the outgoing octet.
*/
int _neutron;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _sigma0;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the outgoing octet.
*/
int _sigmap;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the outgoing octet.
*/
int _sigmam;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _lambda;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the outgoing octet.
*/
int _xi0;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the outgoing octet.
*/
int _xim;
//@}
/**
* PDG codes for the higher baryon octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the outgoing octet.
*/
int _eproton;
/**
* The PDG code for the \f$n\f$-like member of the outgoing octet.
*/
int _eneutron;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _esigma0;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the outgoing octet.
*/
int _esigmap;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the outgoing octet.
*/
int _esigmam;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _elambda;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the outgoing octet.
*/
int _exi0;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the outgoing octet.
*/
int _exim;
//@}
/**
* PDG code for the incoming baryons
*/
mutable vector<int> _incomingB;
/**
* PDG code for the outgoing baryons
*/
mutable vector<int> _outgoingB;
/**
* the maximum weight for the various modes
*/
vector<double> _maxweight;
/**
* The couplings for the different modes.
*/
mutable vector<InvEnergy> _prefactor;
};
}
#endif /* HERWIG_SU3BaryonOctetOctetPhotonDecayer_H */
diff --git a/Decay/Baryon/SU3BaryonOctetOctetScalarDecayer.h b/Decay/Baryon/SU3BaryonOctetOctetScalarDecayer.h
--- a/Decay/Baryon/SU3BaryonOctetOctetScalarDecayer.h
+++ b/Decay/Baryon/SU3BaryonOctetOctetScalarDecayer.h
@@ -1,327 +1,327 @@
// -*- C++ -*-
#ifndef HERWIG_SU3BaryonOctetOctetScalarDecayer_H
#define HERWIG_SU3BaryonOctetOctetScalarDecayer_H
// This is the declaration of the SU3BaryonOctetOctetScalarDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SU3BaryonOctetOctetScalarDecayer</code> class is a simple decayer for
* the strong decay of the excited baryon \f$SU(3)\f$ octets to lower lying
* baryon octets and a pseudoscalar meson from the lightest
* multiplet, i.e. \f$\pi\f$, \f$K\f$, \f$\eta\f$, etc..
*
* The interaction Lagrangian is taken to have the form
*
* \f[-\frac{s_d}{4\sqrt{2}f_\pi} \left[{\rm tr} (\bar{R}p_\phi\!\!\!\!\!\!\!\!\not\,\,\,\,\,
* \{\phi,B\})\right]
* -\frac{s_f}{4\sqrt{2}f_\pi} \left[{\rm tr} (\bar{R}p_\phi\!\!\!\!\!\!\!\!\not\,\,\,\,\,
* [\phi,B])\right],\f]
* where \f$R\f$ is the matrix field for the excited resonance, \f$\phi\f$ is the matrix
* field for the pseudoscalar mesons, \f$f_\pi\f$ is the pion decay constant
* and \f$B\f$ is the matrix field for the ground
* state baryon octet for the decay of a spin\f$\frac12\f$ multiplet.
*
* The above form is used for \f$\frac12^-\f$ excited baryon resonances
* and the above form with
* an additional \f$\gamma_5\f$ is used for excited \f$\frac12^+\f$ baryon resonances.
* For the decay of a spin-\f$\frac32\f$ multiplet we use the form
*
* \f[-\frac{s_d}{4\sqrt{2}f_\pi} \left[{\rm tr} (\bar{R}^\mu p_{\phi,\mu}\{\phi,B\})\right]
* -\frac{s_f}{4\sqrt{2}f_\pi} \left[{\rm tr} (\bar{R}^\mu p_{\phi,\mu} [\phi,B])\right],\f]
* where \f$R^\mu\f$ is the matrix field for the excited resonance. This form is used
* for \f$\frac32^+\f$ excited baryon resonances and this form with an additional
* \f$\gamma_5\f$ for excited \f$\frac32^-\f$ resonances.
*
* The decay to spin-\f$\frac32\f$ resonances in not yet implemented but can
* be included if necessary.
*
* This is one of a number of decayers based on \f$SU(3)\f$ symmetry which are
* intended for the decay of excited baryons.
*
* @see Baryon1MesonDecayerBase
* @see SU3BaryonOctetOctetPhotonDecayer
* @see SU3BaryonDecupletOctetPhotonDecayer
* @see SU3BaryonDecupletOctetScalarDecayer
* @see SU3BaryonSingletOctetPhotonDecayer
* @see SU3BaryonSingletOctetScalarDecayer
* @see SU3BaryonOctetDecupletScalarDecayer
* @see SU3BaryonOctetOctetScalarDecayer
*
*/
class SU3BaryonOctetOctetScalarDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
SU3BaryonOctetOctetScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void threeHalfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SU3BaryonOctetOctetScalarDecayer & operator=(const SU3BaryonOctetOctetScalarDecayer &);
+ SU3BaryonOctetOctetScalarDecayer & operator=(const SU3BaryonOctetOctetScalarDecayer &) = delete;
private:
/**
* set-up the modes
*/
void setupModes(unsigned int) const;
private:
/**
* The couplings of comutator term.
*/
double _sf;
/**
* The couplings of anticomutator term.
*/
double _sd;
/**
* the relative parities of the two baryon multiplets
*/
bool _parity;
/**
* the pion decay constant
*/
Energy _fpi;
/**
* PDG codes for the lower lying baryon octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the outgoing octet.
*/
int _proton;
/**
* The PDG code for the \f$n\f$-like member of the outgoing octet.
*/
int _neutron;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _sigma0;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the outgoing octet.
*/
int _sigmap;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the outgoing octet.
*/
int _sigmam;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _lambda;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the outgoing octet.
*/
int _xi0;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the outgoing octet.
*/
int _xim;
//@}
/**
* PDG codes for the higher baryon octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the outgoing octet.
*/
int _eproton;
/**
* The PDG code for the \f$n\f$-like member of the outgoing octet.
*/
int _eneutron;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _esigma0;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the outgoing octet.
*/
int _esigmap;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the outgoing octet.
*/
int _esigmam;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _elambda;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the outgoing octet.
*/
int _exi0;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the outgoing octet.
*/
int _exim;
//@}
/**
* PDG code for the incoming baryons
*/
mutable vector<int> _incomingB;
/**
* PDG code for the outgoing baryons
*/
mutable vector<int> _outgoingB;
/**
* PDG code for the outgoing mesons
*/
mutable vector<int> _outgoingM;
/**
* the maximum weight for the various modes
*/
vector<double> _maxweight;
/**
* The couplings for the different modes
*/
mutable vector<InvEnergy> _prefactor;
};
}
#endif /* HERWIG_SU3BaryonOctetOctetScalarDecayer_H */
diff --git a/Decay/Baryon/SU3BaryonSingletOctetPhotonDecayer.h b/Decay/Baryon/SU3BaryonSingletOctetPhotonDecayer.h
--- a/Decay/Baryon/SU3BaryonSingletOctetPhotonDecayer.h
+++ b/Decay/Baryon/SU3BaryonSingletOctetPhotonDecayer.h
@@ -1,240 +1,240 @@
// -*- C++ -*-
#ifndef THEPEG_SU3BaryonSingletOctetPhotonDecayer_H
#define THEPEG_SU3BaryonSingletOctetPhotonDecayer_H
// This is the declaration of the SU3BaryonSingletOctetPhotonDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SU3BaryonSingletOctetPhotonDecayer</code> class performs the
* radiative decay of an \f$SU(3)\f$ singlet baryon to an \f$SU(3)\f$ octet baryon.
*
* The Lagrangian is taken to be
* \f[iC\left[ {\rm tr}\left(\bar{S}\sigma_{\mu\nu}f^{\mu\nu}_+,B\right)
* +{\rm tr}\left(\bar{B}\sigma_{\mu\nu}f^{\mu\nu}_+,S\right)
* \right]
* \f]
* where \f$B\f$ is the matrix field for the ground state baryon multiplet, \f$S\f$
* is the singlet field and \f$f^{\mu\nu}_+\f$ is the chiral
* field strength tensor for the electromagentic field given by
* \f[ f^{\mu\nu}_+ = Q F^{\mu\nu} = \left(\begin{array}{ccc}\frac23&0&0\\
* 0&-\frac13&0\\
* 0&0&-\frac13
* \end{array}\right) F^{\mu\nu},\f]
* where \f$F^{\mu\nu}\f$ is the electromagentic field strength tensor.
* This form is used for the case where both the singlet and the baryon multiplet
* have the same parity and
* an additional \f$\gamma_5\f$ is added for the case where the multiplets have
* opposite parity.
*
* For the decay of spin-\f$\frac32\f$ baryons we use the form
* \f[
* ir_d\left[ {\rm tr}\left(\bar{S}^\mu\gamma_\nu f^{\mu\nu}_+,B\right)
* +{\rm tr}\left(\bar{B}\gamma_\nu f^{\mu\nu}_+,S^\mu\right)
* \right],\f]
* where \f$S^\mu\f$ is the matrix field for the excited baryon multiplet.
* This form is used when the baryon's have the same parity and this form with
* an additional \f$\gamma_5\f$ when they have opposite parity.
*
* This is one of a number of decayers based on \f$SU(3)\f$ symmetry which are
* intended for the decay of excited baryons.
*
* @see Baryon1MesonDecayerBase
* @see SU3BaryonOctetOctetPhotonDecayer
* @see SU3BaryonDecupletOctetPhotonDecayer
* @see SU3BaryonDecupletOctetScalarDecayer
* @see SU3BaryonSingletOctetPhotonDecayer
* @see SU3BaryonSingletOctetScalarDecayer
* @see SU3BaryonOctetDecupletScalarDecayer
* @see SU3BaryonOctetOctetScalarDecayer
*/
class SU3BaryonSingletOctetPhotonDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
SU3BaryonSingletOctetPhotonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void halfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a vector.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param A3 The coupling \f$A_3\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
* @param B3 The coupling \f$B_3\f$ described above.
*/
virtual void threeHalfHalfVectorCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,Complex& A3,
Complex& B1,Complex& B2,Complex& B3) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SU3BaryonSingletOctetPhotonDecayer & operator=(const SU3BaryonSingletOctetPhotonDecayer &);
+ SU3BaryonSingletOctetPhotonDecayer & operator=(const SU3BaryonSingletOctetPhotonDecayer &) = delete;
private:
/**
* set-up the modes
*/
void setupModes(unsigned int) const;
private:
/**
* the coupling
*/
InvEnergy _c;
/**
* the relative parities of the two baryon multiplets
*/
bool _parity;
/**
* PDG codes for the lower lying baryon octet baryons
*/
//@{
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _sigma0;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _lambda;
/**
* PDG code for the various excited baryon
*/
int _elambda;
/**
* outgoing baryon for the various modes
*/
mutable vector<int> _outgoingB;
/**
* the maximum weight for the various modes
*/
vector<double> _maxweight;
/**
* The couplings for the different modes.
*/
mutable vector<InvEnergy> _prefactor;
};
}
#endif /* THEPEG_SU3BaryonSingletOctetPhotonDecayer_H */
diff --git a/Decay/Baryon/SU3BaryonSingletOctetScalarDecayer.h b/Decay/Baryon/SU3BaryonSingletOctetScalarDecayer.h
--- a/Decay/Baryon/SU3BaryonSingletOctetScalarDecayer.h
+++ b/Decay/Baryon/SU3BaryonSingletOctetScalarDecayer.h
@@ -1,266 +1,266 @@
// -*- C++ -*-
#ifndef HERWIG_SU3BaryonSingletOctetScalarDecayer_H
#define HERWIG_SU3BaryonSingletOctetScalarDecayer_H
// This is the declaration of the SU3BaryonSingletOctetScalarDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SU3BaryonSingletOctetScalarDecayer</code> class is a simple decayer for
* the strong decay of the excited baryon \f$SU(3)\f$ singlets to a lighter
* baryon octet and a pseudoscalar meson from the lightest
* multiplet, \e i.e. \f$\pi\f$, \f$K\f$,\f$\eta\f$.
*
* The interaction Lagrangian is taken to have the form
*
* \f[\frac{2C}{f_\pi} \left[{\rm tr} (\bar{R}p_\phi\!\!\!\!\!\!\!\!\!\not\,\,\,\,\,\,\,\phi B)\right]\f]
* where \f$R\f$ is the field for the excited resonance, \f$\phi\f$ is the matrix
* field for the pseudoscalar mesons and \f$B\f$ is the matrix field for the ground
* state baryon octet.
*
* The above form is used for \f$\frac12^-\f$ excited
* baryon resonances and the above form with
* an additional \f$\gamma_5\f$ is used for excited \f$\frac12^+\f$ baryon resonances.
*
* For the decays of the spin-\f$\frac32\f$ resonances we use the form
*
* \f[\frac{2C}{f_\pi} \left[{\rm tr} (\bar{R}^\mu p_{\phi,\mu}\phi B)\right],\f]
* where \f$R^\mu\f$ is the field for the excited resonance. This form is used for
* the spin\f$\frac32^+\f$ resonances and this form with an additional \f$\gamma_5\f$
* for spin\f$\frac32^-\f$.
*
* This is one of a number of decayers based on \f$SU(3)\f$ symmetry which are
* intended for the decay of excited baryons.
*
* @see Baryon1MesonDecayerBase
* @see SU3BaryonOctetOctetPhotonDecayer
* @see SU3BaryonDecupletOctetPhotonDecayer
* @see SU3BaryonDecupletOctetScalarDecayer
* @see SU3BaryonSingletOctetPhotonDecayer
* @see SU3BaryonSingletOctetScalarDecayer
* @see SU3BaryonOctetDecupletScalarDecayer
* @see SU3BaryonOctetOctetScalarDecayer
*
*/
class SU3BaryonSingletOctetScalarDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
SU3BaryonSingletOctetScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void threeHalfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SU3BaryonSingletOctetScalarDecayer & operator=(const SU3BaryonSingletOctetScalarDecayer &);
+ SU3BaryonSingletOctetScalarDecayer & operator=(const SU3BaryonSingletOctetScalarDecayer &) = delete;
private:
/**
* set-up the modes
*/
void setupModes(unsigned int) const;
private:
/**
* the coupling
*/
double _c;
/**
* the relative parities of the two baryon multiplets
*/
bool _parity;
/**
* the pion decay constant
*/
Energy _fpi;
/**
* PDG codes for the various octet baryons
*/
//@{
/**
* The PDG code for the \f$p\f$-like member of the outgoing octet.
*/
int _proton;
/**
* The PDG code for the \f$n\f$-like member of the outgoing octet.
*/
int _neutron;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _sigma0;
/**
* The PDG code for the \f$\Sigma^+\f$-like member of the outgoing octet.
*/
int _sigmap;
/**
* The PDG code for the \f$\Sigma^-\f$-like member of the outgoing octet.
*/
int _sigmam;
/**
* The PDG code for the \f$\Sigma^0\f$-like member of the outgoing octet.
*/
int _lambda;
/**
* The PDG code for the \f$\Xi^0\f$-like member of the outgoing octet.
*/
int _xi0;
/**
* The PDG code for the \f$\Xi^-\f$-like member of the outgoing octet.
*/
int _xim;
//@}
/**
* PDG code for the excited singlet \f$\Lambda\f$.
*/
int _elambda;
/**
* PDG code for the outgoing baryons
*/
mutable vector<int> _outgoingB;
/**
* PDG code for the outgoing mesons
*/
mutable vector<int> _outgoingM;
/**
* the maximum weight for the various modes
*/
vector<double> _maxweight;
/**
* The couplings for the different modes.
*/
mutable vector<InvEnergy> _prefactor;
};
}
#endif /* HERWIG_SU3BaryonSingletOctetScalarDecayer_H */
diff --git a/Decay/Baryon/SemiLeptonicBaryonDecayer.cc b/Decay/Baryon/SemiLeptonicBaryonDecayer.cc
--- a/Decay/Baryon/SemiLeptonicBaryonDecayer.cc
+++ b/Decay/Baryon/SemiLeptonicBaryonDecayer.cc
@@ -1,489 +1,489 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SemiLeptonicBaryonDecayer class.
//
#include "SemiLeptonicBaryonDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorBarWaveFunction.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "ThePEG/Helicity/FermionSpinInfo.h"
#include "ThePEG/Helicity/RSFermionSpinInfo.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
SemiLeptonicBaryonDecayer::SemiLeptonicBaryonDecayer() {
// intermediates
generateIntermediates(true);
}
void SemiLeptonicBaryonDecayer::doinitrun() {
_current->initrun();
_form->initrun();
DecayIntegrator::doinitrun();
if(initialize()) {
_maxwgt.clear();
for(unsigned int ix=0;ix<numberModes();++ix)
_maxwgt.push_back(mode(ix)->maxWeight());
}
}
void SemiLeptonicBaryonDecayer::doinit() {
DecayIntegrator::doinit();
// make sure the current got initialised
_current->init();
// and the form factors
_form->init();
// the channels
tPDVector extpart,ptemp;
_modemap.clear();
double maxweight;
vector<double> channelwgts(1,1.);
int id0(0),id1(0),Wcharge(0),inspin,spect1,spect2,inquark,outquark,outspin;
Energy min;
DecayPhaseSpaceModePtr mode;
DecayPhaseSpaceChannelPtr channel;
int iq(0),ia(0);
for(unsigned int ix=0;ix<_form->numberOfFactors();++ix) {
// get the external particles for this mode
extpart.resize(2);
_form->particleID(ix,id0,id1);
_form->formFactorInfo(ix,inspin,outspin,spect1,spect2,inquark,outquark);
extpart[0]=getParticleData(id0);
extpart[1]=getParticleData(id1);
Wcharge =(extpart[0]->iCharge()-extpart[1]->iCharge());
min = extpart[0]->mass()+extpart[0]->widthUpCut()
-extpart[1]->mass()+extpart[1]->widthLoCut();
_modemap.push_back(numberModes());
for(unsigned int iy=0;iy<_current->numberOfModes();++iy) {
extpart.resize(2);
ptemp=_current->particles(Wcharge,iy,iq,ia);
for(unsigned int iz=0;iz<ptemp.size();++iz) extpart.push_back(ptemp[iz]);
// create the mode
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
// create the first piece of the channel
channel = new_ptr(DecayPhaseSpaceChannel(mode));
channel->addIntermediate(extpart[0],0,0.0,-1,1);
bool done=_current->createMode(Wcharge,iy,mode,2,1,channel,min);
if(done&&abs(Wcharge)==3&&inspin==2&&(outspin==2||outspin==4)) {
// the maximum weight
maxweight = _maxwgt.size()>numberModes() ? _maxwgt[numberModes()] : 2.;
channelwgts.resize(mode->numberChannels(),1./(mode->numberChannels()));
addMode(mode,maxweight,channelwgts);
}
}
}
}
bool SemiLeptonicBaryonDecayer::accept(tcPDPtr parent,
const tPDVector & children) const {
// find the non-lepton
int ibar(0),idtemp,idin(parent->id());
vector<int> idother; bool dummy;
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(abs(idtemp)>16) ibar=idtemp;
else idother.push_back(idtemp);
}
// check that the form factor exists
if(_form->formFactorNumber(idin,ibar,dummy)<0) return false;
// and the current
return _current->accept(idother);
}
int SemiLeptonicBaryonDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
// find the ids of the particles for the decay current
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
int idtemp,ibar(0),idin(parent->id());
vector<int> idother;
cc=false;
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(abs(idtemp)>16) ibar=idtemp;
else idother.push_back(idtemp);
}
return _modemap[_form->formFactorNumber(idin,ibar,cc)]
+_current->decayMode(idother);
}
void SemiLeptonicBaryonDecayer::persistentOutput(PersistentOStream & os) const {
os << _current << _form << _maxwgt << _modemap;
}
void SemiLeptonicBaryonDecayer::persistentInput(PersistentIStream & is, int) {
is >> _current >> _form >> _maxwgt >> _modemap;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<SemiLeptonicBaryonDecayer,DecayIntegrator>
describeHerwigSemiLeptonicBaryonDecayer("Herwig::SemiLeptonicBaryonDecayer", "HwBaryonDecay.so");
void SemiLeptonicBaryonDecayer::Init() {
static ClassDocumentation<SemiLeptonicBaryonDecayer> documentation
("The SemiLeptonicBaryonDecayer class is designed for"
" the semi-leptonic decay of the baryons.");
static Reference<SemiLeptonicBaryonDecayer,LeptonNeutrinoCurrent> interfaceCurrent
("Current",
"The current for the leptons produced in the decay.",
&SemiLeptonicBaryonDecayer::_current, true, true, true, false, false);
static Reference<SemiLeptonicBaryonDecayer,BaryonFormFactor> interfaceFormFactor
("FormFactor",
"The form factor",
&SemiLeptonicBaryonDecayer::_form, true, true, true, false, false);
static ParVector<SemiLeptonicBaryonDecayer,double> interfaceMaximumWeight
("MaximumWeight",
"The maximum weights for the decays",
&SemiLeptonicBaryonDecayer::_maxwgt,
0, 0, 0, 0, 10000, false, false, true);
}
// combine the currents and form-factors to give the matrix element
double SemiLeptonicBaryonDecayer::me2(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
assert(inpart.dataPtr()->iSpin()==2);
double me(0.);
if(decay[0]->dataPtr()->iSpin()==2)
me = halfHalf(ichan,inpart,decay,meopt);
else if(decay[0]->dataPtr()->iSpin()==4)
me=halfThreeHalf(ichan,inpart,decay,meopt);
else
assert(false);
return me;
}
// matrix element for a 1/2 -> 1/2 semi-leptonic decay
double SemiLeptonicBaryonDecayer::halfHalf(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
// extract the leptons
ParticleVector leptons;
leptons.push_back(decay[decay.size()-2]);
leptons.push_back(decay[decay.size()-1]);
int mode((abs(decay[1]->id())-11)/12);
Energy scale;
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
// work out the mapping for the lepton vector
_constants.resize(decay.size()+1);
_ispin.resize(decay.size());
int itemp(1);
_ibar=0;
for(int ix=int(decay.size()-1);ix>=0;--ix) {
_ispin[ix]=decay[ix]->data().iSpin();
if(abs(decay[ix]->id())<=16) {
itemp*=_ispin[ix];
_constants[ix]=itemp;
}
else _ibar=ix;
}
_constants[decay.size()]=1;
_constants[_ibar]=_constants[_ibar+1];
}
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1Half,_ispin)));
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorBarWaveFunction::constructSpinInfo(_inHalfBar,decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorWaveFunction::constructSpinInfo(_inHalf,decay[0],outgoing,true);
}
_current->current(mode,ichan,scale,leptons,meopt);
return 0.;
}
// spinors for the decay product
if(inpart.id()>0) {
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,decay[0],outgoing);
}
else {
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,decay[0],outgoing);
}
// get the information on the form-factor
int spinin(0),spinout(0),spect1,spect2,inquark,outquark;
int id0(inpart.id()),id1(decay[0]->id());
bool cc; int iloc(_form->formFactorNumber(id0,id1,cc));
_form->formFactorInfo(iloc,spinin,spinout,spect1,spect2,inquark,outquark);
// work out the value of q and calculate the form factors
Lorentz5Momentum q(inpart.momentum()-decay[0]->momentum());
q.rescaleMass();
Energy m0(inpart.mass()),m1(decay[0]->mass());
Energy2 q2(q.mass2());
Lorentz5Momentum sum(inpart.momentum()+decay[0]->momentum());
// calculate the form factors
Complex f1v,f2v,f3v,f1a,f2a,f3a;
_form->SpinHalfSpinHalfFormFactor(q2,iloc,id0,id1,m0,m1,
f1v,f2v,f3v,f1a,f2a,f3a);
// calculate the hadronic current for the decay
vector<LorentzPolarizationVectorE> hadron(4);
Complex left =f1v-f1a-f2v-double((m0-m1)/(m0+m1))*f2a;
Complex right =f1v+f1a-f2v+double((m0-m1)/(m0+m1))*f2a;
LorentzPolarizationVectorE vtemp;
for(unsigned int ix=0;ix<2;++ix) {
for(unsigned int iy=0;iy<2;++iy) {
vtemp = _inHalf[ix].generalCurrent(_inHalfBar[iy],left,right);
complex<Energy> vspin = _inHalf[ix].scalar(_inHalfBar[iy]);
complex<Energy> aspin = _inHalf[ix].pseudoScalar(_inHalfBar[iy]);
// the momentum like pieces
if(inpart.id()>0) {
vtemp+= (f2v*vspin+f2a*aspin)/(m0+m1)*sum;
vtemp+= (f3v*vspin+f3a*aspin)/(m0+m1)*q;
}
else {
vtemp-= (f2v*vspin-f2a*aspin)/(m0+m1)*sum;
vtemp+= (f3v*vspin-f3a*aspin)/(m0+m1)*q;
}
if(inpart.id()>0) hadron[2*ix+iy]=vtemp;
else hadron[2*iy+ix]=vtemp;
}
}
// construct the lepton current
vector<LorentzPolarizationVectorE>
lepton(_current->current(mode,ichan,scale,leptons,meopt));
// matrix element
vector<unsigned int> ihel(decay.size()+1);
unsigned int mhel,ix,lhel;
for(mhel=0;mhel<hadron.size();++mhel) {
ihel[0 ]=mhel/spinout;
ihel[_ibar+1]=mhel%spinout;
for(lhel=0;lhel<lepton.size();++lhel) {
// map the index for the leptons to a helicity state
for(ix=decay.size();ix>0;--ix) {
if(ix-1!=_ibar) ihel[ix]=(lhel%_constants[ix-1])/_constants[ix];
}
- (*ME())(ihel)= lepton[lhel].dot(hadron[mhel])*SM().fermiConstant();
+ (*ME())(ihel) = Complex(lepton[lhel].dot(hadron[mhel])*SM().fermiConstant());
}
}
// ckm factor
double ckm(1.);
if(inquark<=6) {
if(inquark%2==0) ckm = SM().CKM(inquark/2-1,(abs(outquark)-1)/2);
else ckm = SM().CKM(abs(outquark)/2-1,(inquark-1)/2);
}
// return the answer
return 0.5*(ME()->contract(_rho)).real()*ckm;
}
// matrix element for a 1/2 -> 3/2 semi-leptonic decay
double SemiLeptonicBaryonDecayer::halfThreeHalf(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
// extract the leptons
ParticleVector leptons;
leptons.push_back(decay[decay.size()-2]);
leptons.push_back(decay[decay.size()-1]);
int mode((abs(decay[1]->id())-11)/12);
Energy scale;
// spinors etc for the decaying particle
if(meopt==Initialize) {
// spinors and rho
if(inpart.id()>0)
SpinorWaveFunction ::calculateWaveFunctions(_inHalf,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inHalfBar,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
// work out the mapping for the lepton vector
_constants.resize(decay.size()+1);
_ispin.resize(decay.size());
int itemp(1);
_ibar=0;
for(int ix=int(decay.size()-1);ix>=0;--ix) {
_ispin[ix]=decay[ix]->data().iSpin();
if(abs(decay[ix]->id())<=16) {
itemp*=_ispin[ix];
_constants[ix]=itemp;
}
else _ibar=ix;
}
_constants[decay.size()]=1;
_constants[_ibar]=_constants[_ibar+1];
}
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1Half,_ispin)));
// setup spin info when needed
if(meopt==Terminate) {
// for the decaying particle
if(inpart.id()>0) {
SpinorWaveFunction::
constructSpinInfo(_inHalf,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorBarWaveFunction::constructSpinInfo(_inThreeHalfBar,
decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inHalfBar,const_ptr_cast<tPPtr>(&inpart),incoming,true);
RSSpinorWaveFunction::constructSpinInfo(_inThreeHalf,
decay[0],outgoing,true);
}
_current->current(mode,ichan,scale,leptons,meopt);
return 0.;
}
// spinors for the decay product
LorentzPolarizationVector in=UnitRemoval::InvE*inpart.momentum();
if(inpart.id()>0) {
RSSpinorBarWaveFunction::
calculateWaveFunctions(_inThreeHalfBar,decay[0],outgoing);
_inHalfBar.resize(_inThreeHalfBar.size());
for(unsigned int ix=0;ix<_inThreeHalfBar.size();++ix)
_inHalfBar[ix] = _inThreeHalfBar[ix].dot(in);
}
else {
RSSpinorWaveFunction::
calculateWaveFunctions(_inThreeHalf,decay[0],outgoing);
_inHalf.resize(_inThreeHalf.size());
for(unsigned int ix=0;ix<_inThreeHalf.size();++ix)
_inHalf[ix] = _inThreeHalf[ix].dot(in);
}
// get the information on the form-factor
int spinin(0),spinout(0),inquark,outquark,spect1,spect2;
int id0(inpart.id()),id1(decay[0]->id());
bool cc; int iloc(_form->formFactorNumber(id0,id1,cc));
_form->formFactorInfo(iloc,spinin,spinout,spect1,spect2,inquark,outquark);
// work out the value of q and calculate the form factors
Lorentz5Momentum q(inpart.momentum()-decay[0]->momentum());q.rescaleMass();
Energy m0(inpart.mass()),m1(decay[0]->mass());
Energy2 q2(q.mass2());
Lorentz5Momentum sum(inpart.momentum()+decay[0]->momentum());
// calculate the form factors
Complex f1v,f2v,f3v,f4v,f1a,f2a,f3a,f4a;
_form->SpinHalfSpinThreeHalfFormFactor(q2,iloc,id0,id1,m0,m1,
f1v,f2v,f3v,f4v,f1a,f2a,f3a,f4a);
LorentzPolarizationVector vtemp;
complex<InvEnergy2> lS1,lS2,rS1,rS2;
complex<InvEnergy> lV,rV;
Complex left,right;
InvEnergy ms(1./(m0+m1));
InvEnergy2 ms2(ms*ms);
if(inpart.id()>0) {
left = f1a-f1v;
right = f1a+f1v;
lS1 = ms2*(f3a-f4a-f3v+f4v);
rS1 = ms2*(f3a-f4a+f3v-f4v);
lS2 = ms2*(f4a-f4v);
rS2 = ms2*(f4a+f4v);
lV = ms*(f2a-f2v);
rV = ms*(f2a+f2v);
}
else {
left = conj(f1a+f1v);
right = conj(f1a-f1v);
lS1 = ms2*conj(f3a-f4a+f3v-f4v);
rS1 = ms2*conj(f3a-f4a-f3v+f4v);
lS2 = ms2*conj(f4a-f4v);
rS2 = ms2*conj(f4a+f4v);
lV = ms *conj(f2a-f2v);
rV = ms *conj(f2a+f2v);
}
// calculate the hadronic current for the decay
LorentzPolarizationVectorE hadron[4][2];
// construct the vectors for the decay
Complex scalar1,scalar2;
complex<Energy> lfact,rfact;
LorentzPolarizationVectorE tvec;
LorentzPolarizationVector svec;
for(unsigned int iya=0;iya<4;++iya) {
for(unsigned int ixa=0;ixa<2;++ixa) {
unsigned int ix=iya,iy=ixa;
if(decay[0]->id()<0) swap(ix,iy);
// scalar like terms
lfact = _inHalf[iy].leftScalar(_inHalfBar[ix]);
rfact = _inHalf[iy].rightScalar(_inHalfBar[ix]);
- scalar1 = (lS1*lfact+rS1*rfact)*UnitRemoval::E;
- scalar2 = (lS2*lfact+rS2*rfact)*UnitRemoval::E;
+ scalar1 = Complex((lS1*lfact+rS1*rfact)*UnitRemoval::E);
+ scalar2 = Complex((lS2*lfact+rS2*rfact)*UnitRemoval::E);
svec = _inHalf[iy].generalCurrent(_inHalfBar[ix],lV/ms,rV/ms)*ms;
if(inpart.id()>0) tvec=_inThreeHalfBar[ix].generalCurrent(_inHalf[iy],left,right);
else tvec=_inThreeHalf[iy].generalCurrent(_inHalfBar[ix],left,right);
hadron[iya][ixa] = tvec+svec*UnitRemoval::E+scalar1*decay[0]->momentum()
+scalar2*inpart.momentum();
}
}
// construct the lepton current
vector<LorentzPolarizationVectorE>
lepton(_current->current(mode,ichan,scale,leptons,meopt));
vector<unsigned int> ihel(decay.size()+1);
for(unsigned int iya=0;iya<4;++iya) {
ihel[1]=iya;
for(unsigned int ixa=0;ixa<2;++ixa) {
ihel[0]=ixa;
for(unsigned int lhel=0;lhel<lepton.size();++lhel) {
ihel[2] = lhel/2;
ihel[3] = lhel%2;
- (*ME())(ihel) = lepton[lhel].dot(hadron[iya][ixa])*SM().fermiConstant();
+ (*ME())(ihel) = Complex(lepton[lhel].dot(hadron[iya][ixa])*SM().fermiConstant());
}
}
}
// ckm factor
double ckm(1.);
if(inquark<=6) {
if(inquark%2==0){ckm = SM().CKM(inquark/2-1,(abs(outquark)-1)/2);}
else{ckm = SM().CKM(abs(outquark)/2-1,(inquark-1)/2);}
}
// return the answer
return 0.5*(ME()->contract(_rho)).real()*ckm;
}
// output the setup information for the particle database
void SemiLeptonicBaryonDecayer::dataBaseOutput(ofstream & output,bool header) const {
if(header) output << "update decayers set parameters=\"";
DecayIntegrator::dataBaseOutput(output,false);
for(unsigned int ix=0;ix<_maxwgt.size();++ix) {
output << "insert " << name() << ":MaximumWeight " << ix << " "
<< _maxwgt[ix] << " \n";
}
_current->dataBaseOutput(output,false,true);
output << "newdef " << name() << ":Current " << _current->name() << " \n";
_form->dataBaseOutput(output,false,true);
output << "newdef " << name() << ":FormFactor " << _form->name() << " \n";
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/Baryon/SemiLeptonicBaryonDecayer.h b/Decay/Baryon/SemiLeptonicBaryonDecayer.h
--- a/Decay/Baryon/SemiLeptonicBaryonDecayer.h
+++ b/Decay/Baryon/SemiLeptonicBaryonDecayer.h
@@ -1,227 +1,227 @@
// -*- C++ -*-
#ifndef HERWIG_SemiLeptonicBaryonDecayer_H
#define HERWIG_SemiLeptonicBaryonDecayer_H
//
// This is the declaration of the SemiLeptonicBaryonDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/WeakCurrents/LeptonNeutrinoCurrent.h"
#include "Herwig/Decay/FormFactors/BaryonFormFactor.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzRSSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SemiLeptonicBaryonDecayer</code> class is designed for the
* semi-leptonic decay of the baryons. It combine the form-factors from a
* class inheriting from the BaryonFormFactor class and the leptonic current.
*
* The decays of spin-\f$\frac12\f$ baryons to spin-\f$\frac12\f$ and
* spin-\f$\frac32\f$ baryons are currently supported. The only other decays
* which seem to occur in nature is the semi-leptonic decay of the \f$\Omega^-\f$
* which is \f$\frac32\to\frac12\f$.
*
* @see BaryonFormFactor.
*
*/
class SemiLeptonicBaryonDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
SemiLeptonicBaryonDecayer();
/**
* Check if this decayer can perfom the decay for a particular mode.
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt The option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay,MEOption meopt) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
protected:
/**
* Matrix element for \f$\frac12\to\frac12\f$.
* @param ichan The channel we are calculating the matrix element for.
* @param inpart The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt The option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double halfHalf(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
/**
* Matrix element for \f$\frac12\to\frac32\f$.
* @param ichan The channel we are calculating the matrix element for.
* @param inpart The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt The option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double halfThreeHalf(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const;
private:
/**
* Private and non-existent assignment operator.
*/
- SemiLeptonicBaryonDecayer & operator=(const SemiLeptonicBaryonDecayer &);
+ SemiLeptonicBaryonDecayer & operator=(const SemiLeptonicBaryonDecayer &) = delete;
private:
/**
* The current for the leptons
*/
LeptonNeutrinoCurrentPtr _current;
/**
* form-factor
*/
BaryonFormFactorPtr _form;
/**
* the maximum weight
*/
vector<double> _maxwgt;
/**
* mapping of the mode to the form-factor
*/
vector<int> _modemap;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Spin-\f$\frac12\f$ spinors
*/
mutable vector<LorentzSpinor<SqrtEnergy> > _inHalf;
/**
* Spin-\f$\frac12\f$ barred spinors
*/
mutable vector<LorentzSpinorBar<SqrtEnergy> > _inHalfBar;
/**
* Spin-\f$\frac32\f$ spinors
*/
mutable vector<LorentzRSSpinor<SqrtEnergy> > _inThreeHalf;
/**
* Spin-\f$\frac32\f$ barred spinors
*/
mutable vector<LorentzRSSpinorBar<SqrtEnergy> > _inThreeHalfBar;
/**
* Constants for the mapping of the leptonic vector
*/
mutable vector<unsigned int> _constants;
/**
* Spins of the particles
*/
mutable vector<PDT::Spin> _ispin;
/**
* Location of the outgoing baryon
*/
mutable unsigned int _ibar;
};
}
#endif /* HERWIG_SemiLeptonicBaryonDecayer_H */
diff --git a/Decay/Baryon/StrongHeavyBaryonDecayer.h b/Decay/Baryon/StrongHeavyBaryonDecayer.h
--- a/Decay/Baryon/StrongHeavyBaryonDecayer.h
+++ b/Decay/Baryon/StrongHeavyBaryonDecayer.h
@@ -1,273 +1,273 @@
// -*- C++ -*-
#ifndef HERWIG_StrongHeavyBaryonDecayer_H
#define HERWIG_StrongHeavyBaryonDecayer_H
// This is the declaration of the StrongHeavyBaryonDecayer class.
#include "Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>StrongHeavyBaryonDecayer</code> class implements the strong
* decays of charm baryons using the results of hep-ph/9904421.
*
* @see Baryon1MesonDecayerBase.
*
*/
class StrongHeavyBaryonDecayer: public Baryon1MesonDecayerBase {
public:
/**
* Default constructor.
*/
StrongHeavyBaryonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Coupling Members.
*/
//@{
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac12\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac12\to\frac32+0\f$ or \f$\frac32\to\frac12+0\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void halfThreeHalfScalarCoupling(int imode, Energy m0, Energy m1, Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac12\f$ to spin-\f$\frac32\f$ and a scalar.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A The coupling \f$A\f$ described above.
* @param B The coupling \f$B\f$ described above.
*/
virtual void threeHalfHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A,Complex& B) const;
/**
* Couplings for spin-\f$\frac32\f$ to spin-\f$\frac32\f$ and a scalar.
* This method must be implemented in any class inheriting from this one
* which includes \f$\frac32\to\frac32+0\f$ decays.
* @param imode The mode
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the outgoing baryon.
* @param m2 The mass of the outgoing meson.
* @param A1 The coupling \f$A_1\f$ described above.
* @param A2 The coupling \f$A_2\f$ described above.
* @param B1 The coupling \f$B_1\f$ described above.
* @param B2 The coupling \f$B_2\f$ described above.
*/
virtual void threeHalfThreeHalfScalarCoupling(int imode,Energy m0,Energy m1,Energy m2,
Complex& A1,Complex& A2,
Complex& B1,Complex& B2) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- StrongHeavyBaryonDecayer & operator=(const StrongHeavyBaryonDecayer &);
+ StrongHeavyBaryonDecayer & operator=(const StrongHeavyBaryonDecayer &) = delete;
private:
/**
* Strong coupling for the \f$\Sigma_c\to\Lambda_c\pi\f$.
*/
InvEnergy _gsigma_clambda_cpi;
/**
* strong coupling for \f$\Xi^*_c\to\Xi_c\pi\f$.
*/
InvEnergy _gxistar_cxi_cpi;
/**
* Strong coupling for \f$\Lambda_{c1}\to\Sigma_c\pi\f$.
*/
double _flambda_c1sigma_cpi;
/**
* Strong coupling for \f$\Xi_{c1}\to\Xi'_c\pi\f$.
*/
double _fxi_c1xi_cpi;
/**
* Strong coupling for \f$\Lambda_{c1}^*\to\Sigma_c\pi\f$.
*/
InvEnergy2 _flambda_c1starsigma_cpi;
/**
* Strong couplng for \f$\Xi_{c1}^*\to\Xi'_c\pi\f$.
*/
InvEnergy2 _fxi_c1starxi_cpi;
/**
* Strong coupling for the \f$\Sigma_b\to\Lambda_b\pi\f$.
*/
InvEnergy _gsigma_blambda_bpi;
/**
* Strong coupling for \f$\Xi^*_b \to \Xi_b \pi\f$.
*/
InvEnergy _gxistar_bxi_bpi;
/**
* Strong coupling for \f$\Lambda_{b1} \to \Sigma_b \pi\f$.
*/
double _flambda_b1sigma_bpi;
/**
* Strong coupling for \f$\Xi_{b1}\to\Xi'_b\pi\f$.
*/
double _fxi_b1xi_bpi;
/**
* Strong coupling for \f$\Lambda_{b1}^* \to \Sigma_b \pi\f$.
*/
InvEnergy2 _flambda_b1starsigma_bpi;
/**
* Strong couplng for \f$\Xi_{b1}^*\to\Xi'_b\pi\f$.
*/
InvEnergy2 _fxi_b1starxi_bpi;
/**
* PDG code for the incoming baryons
*/
vector<int> _incoming;
/**
* PDG code for the outgoing baryons
*/
vector<int> _outgoingB;
/**
* PDG code for the outgoing mesons.
*/
vector<int> _outgoingM;
/**
* max weight
*/
vector<double> _maxweight;
/**
* The couplings for the different modes.
*/
vector<double> _prefactor;
/**
* The type of matrix element
*/
vector<int> _modetype;
/**
* The initial size of the arrays
*/
unsigned int _initsize;
};
}
#endif /* HERWIG_StrongHeavyBaryonDecayer_H */
diff --git a/Decay/BranchingRatioReweighter.h b/Decay/BranchingRatioReweighter.h
--- a/Decay/BranchingRatioReweighter.h
+++ b/Decay/BranchingRatioReweighter.h
@@ -1,102 +1,102 @@
// -*- C++ -*-
#ifndef Herwig_BranchingRatioReweighter_H
#define Herwig_BranchingRatioReweighter_H
//
// This is the declaration of the BranchingRatioReweighter class.
//
#include "ThePEG/Handlers/StepHandler.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Decay
* The BranchingRatioReweighter class is designed to reweight events
* where some decay modes of a particle, or many particles, have been
* switched off in order to improve the statistics.
*
* @see \ref BranchingRatioReweighterInterfaces "The interfaces"
* defined for BranchingRatioReweighter.
*/
class BranchingRatioReweighter: public StepHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
BranchingRatioReweighter();
/**
* The destructor.
*/
virtual ~BranchingRatioReweighter();
//@}
public:
/** @name Virtual functions required by the StepHandler class. */
//@{
/**
* The main function called by the EventHandler class to
* perform a step. Given the current state of an Event, this function
* performs the event generation step and includes the result in a new
* Step object int the Event record.
* @param eh the EventHandler in charge of the Event generation.
* @param tagged if not empty these are the only particles which should
* be considered by the StepHandler.
* @param hint a Hint object with possible information from previously
* performed steps.
* @throws Veto if the StepHandler requires the current step to be discarded.
* @throws Stop if the generation of the current Event should be stopped
* after this call.
* @throws Exception if something goes wrong.
*/
virtual void handle(EventHandler & eh, const tPVector & tagged,
const Hint & hint);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BranchingRatioReweighter & operator=(const BranchingRatioReweighter &);
+ BranchingRatioReweighter & operator=(const BranchingRatioReweighter &) = delete;
};
}
#endif /* Herwig_BranchingRatioReweighter_H */
diff --git a/Decay/DecayIntegrator.h b/Decay/DecayIntegrator.h
--- a/Decay/DecayIntegrator.h
+++ b/Decay/DecayIntegrator.h
@@ -1,490 +1,490 @@
// -*- C++ -*-
//
// DecayIntegrator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DecayIntegrator_H
#define HERWIG_DecayIntegrator_H
//
// This is the declaration of the DecayIntegrator class.
//
#include <ThePEG/PDT/Decayer.h>
#include "DecayPhaseSpaceChannel.h"
#include <ThePEG/PDT/EnumParticles.h>
#include <Herwig/Decay/DecayVertex.h>
#include "DecayPhaseSpaceMode.fh"
#include "Herwig/PDT/WidthCalculatorBase.fh"
#include "Radiation/DecayRadiationGenerator.h"
#include "HwDecayerBase.h"
#include "DecayIntegrator.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
* \class DecayIntegrator
* \brief Main class for Decayers implementing multi-channel phase space integration.
* \author Peter Richardson
*
* This class is designed to be the base class for Herwig decays including
* the implementation of a multichannel decayer or n-body phase space decays.
*
* The <code>DecayIntegrator</code> class inherits from ThePEG's Decayer class
* and makes use of the <code>DecayPhaseSpaceMode</code> class to specify a number
* of decay modes.
*
* Additional modes can be added using the addMode method. In practice the
* phase space channels for a particular mode are usually constructed in the
* doinit member of a Decayer and then the modes added to the Decayer.
*
* For the majority of the decays currently implemented the
* phase-space integration has been optimised and the maximum weight set.
* If the parameters of the decay model are changed the Initialize interface
* can be used to optimise the integration and calculate the maximum weight.
*
* In classes inheriting from this the me2() member which gives the matrix element
* squared must be implemented. This should be combined with the setting of the
* phase space channels, and the setting of which channels to use and their
* initial weights in the doinit() member. The different decay modes should then
* be initialized in the initrun() member if needed. The generate member can then
* be called from the decay() member to generate a phase-space configuration for a
* decay.
*
* @see DecayPhaseSpaceMode
* @see DecayPhaseSpaceChannel
* @see \ref DecayIntegratorInterfaces "The interfaces"
* defined for DecayIntegrator.
*/
class DecayIntegrator: public HwDecayerBase {
public:
/**
* The output operator is a friend, this is mainly for debugging
*/
friend ostream & operator<<(ostream &, const DecayIntegrator &);
/**
* and DecayPhaseMode
*/
friend class DecayPhaseSpaceMode;
/**
* Enum for the matrix element option
*/
enum MEOption {Initialize,Calculate,Terminate};
public:
/**
* Default constructor.
*/
DecayIntegrator() : _niter(10), _npoint(10000), _ntry(500),
_generateinter(false), _imode(-1),
_realME(false), _virtualME(false), _eps(ZERO) {}
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const {
bool cc;
return modeNumber(cc,parent,children)>=0;
}
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const = 0;
/**
* The mode being used for this decay
*/
int imode() const {return _imode;}
/**
* Add a phase-space mode to the list
* @param mode The mode being added.
* @param maxwgt The maximum weight for the phase space integration.
* @param wgts The weights of the different channels in the multichannel approach.
*/
void addMode(DecayPhaseSpaceModePtr mode,double maxwgt,
const vector<double> wgts) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* This function is purely virtual and must be implemented in classes inheriting
* from DecayIntegrator.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param opt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay,MEOption opt) const=0;
/**
* The helicity amplitude matrix element for spin correlations.
*/
DecayMEPtr ME() const {return _matrixelement;}
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
virtual bool twoBodyMEcode(const DecayMode &, int & mecode,
double & coupling) const {
coupling = 1.;
mecode = -1;
return false;
}
/**
* Method to return an object to calculate the 3 (or higher body) partial width
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* The differential three body decay rate with one integral performed.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s The invariant mass which still needs to be integrate over.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The differential rate \f$\frac{d\Gamma}{ds}\f$
*/
virtual InvEnergy threeBodydGammads(const int imode, const Energy2 q2,
const Energy2 s,
const Energy m1, const Energy m2,
const Energy m3) const;
/**
* Set the code for the partial width. Finds the partial width in the
* GenericWidthGenerator class which corresponds to the decay mode.
* @param dm The DecayMode
* @param imode The mode.
*/
void setPartialWidth(const DecayMode & dm, int imode);
/**
* Finds the phase-space mode corresponding to a given decay mode
* @param dm The DecayMode
*/
int findMode(const DecayMode & dm);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
/**
* Access to the epsilon parameter
*/
Energy epsilonPS() const {return _eps;}
public:
/**
* Members for the generation of QED radiation in the decays
*/
//@{
/**
* Use the DecayRadiationGenerator to generate photons in the decay.
* @param p The Particle instance being decayed
* @param children The decay products
* @return A particle vector containing the decay products after the generation
* of photons.
*/
ParticleVector generatePhotons(const Particle & p,ParticleVector children) {
return _photongen->generatePhotons(p,children,this);
}
/**
* check if photons can be generated in the decay
*/
bool canGeneratePhotons() {return _photongen;}
/**
* The one-loop virtual correction.
* @param imode The mode required.
* @param part The decaying particle.
* @param products The decay products including the radiated photon.
* @return Whether the correction is implemented
*/
virtual double oneLoopVirtualME(unsigned int imode,
const Particle & part,
const ParticleVector & products);
/**
* Whether or not the one loop matrix element is implemented
*/
bool hasOneLoopME() {return _virtualME;}
/**
* The real emission matrix element
* @param imode The mode required
* @param part The decaying particle
* @param products The decay products including the radiated photon
* @param iemitter The particle which emitted the photon
* @param ctheta The cosine of the polar angle between the photon and the
* emitter
* @param stheta The sine of the polar angle between the photon and the
* emitter
* @param rot1 Rotation from rest frame to frame for real emission
* @param rot2 Rotation to place emitting particle along z
*/
virtual InvEnergy2 realEmissionME(unsigned int imode,
const Particle & part,
ParticleVector & products,
unsigned int iemitter,
double ctheta, double stheta,
const LorentzRotation & rot1,
const LorentzRotation & rot2);
/**
* Whether or not the real emission matrix element is implemented
*/
bool hasRealEmissionME() {return _realME;}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Generate the momenta for the decay
* @param inter Generate the intermediates produced in the decay as well as the
* final particles.
* @param cc Is this the mode defined or its charge conjugate.
* @param imode The mode being generated.
* @param inpart The decaying particle.
* @return The particles produced inthe decay.
*/
ParticleVector generate(bool inter,bool cc, const unsigned int & imode,
const Particle & inpart) const;
/**
* Set the mode being use for this decay.
*/
void imode(int in) {_imode=in;}
/**
* Set the helicity matrix element for the decay.
*/
void ME(DecayMEPtr in) const { _matrixelement = in;}
/**
* Reset the properities of all intermediates.
* @param part The intermediate particle being reset.
* @param mass The mass of the particle.
* @param width The width of the particle.
*/
void resetIntermediate(tcPDPtr part, Energy mass, Energy width);
/**
* Number of decay modes
*/
unsigned int numberModes() const {return _modes.size();}
/**
* Pointer to a mode
*/
tDecayPhaseSpaceModePtr mode(unsigned int);
/**
* Pointer to a mode
*/
tcDecayPhaseSpaceModePtr mode(unsigned int) const;
/**
* Get whether or not the intermediates are included
*/
bool generateIntermediates() const {return _generateinter;}
/**
* Set whether or not the intermediates are included
*/
void generateIntermediates(bool in) {_generateinter=in;}
/**
* Initialize the phase-space mode
* @param imode The mode
* @param init Whether or not to perform the initialization
*/
Energy initializePhaseSpaceMode(unsigned int imode,bool init, bool onShell=false) const;
/**
* Whether or not the one loop matrix element is implemented
*/
void hasOneLoopME(bool in) {_virtualME=in;}
/**
* Whether or not the real emission matrix element is implemented
*/
void hasRealEmissionME(bool in) {_realME=in;}
/**
* Set the epsilon parameter
*/
void epsilonPS(Energy in) {_eps=in;}
/**
* Clear the models
*/
void clearModes() {_modes.clear();}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- DecayIntegrator & operator=(const DecayIntegrator &);
+ DecayIntegrator & operator=(const DecayIntegrator &) = delete;
private:
/**
* Number of iterations for th initialization.
*/
int _niter;
/**
* Number of points for initialisation
*/
int _npoint;
/**
* number of attempts to generate the decay
*/
int _ntry;
/**
* List of the decay modes
*/
mutable vector<DecayPhaseSpaceModePtr> _modes;
/**
* Whether to include the intermediates whne outputing the results.
*/
bool _generateinter;
/**
* Pointer to the object generating the QED radiation in the decay
*/
DecayRadiationGeneratorPtr _photongen;
/**
* mode currently being generated
*/
mutable int _imode;
/**
* The helicity matrix element for the current decay
*/
mutable DecayMEPtr _matrixelement;
/**
* Whether or not the real photon emission matrix element exists
*/
bool _realME;
/**
* Whether or not the one-loop matrix element exists
*/
bool _virtualME;
/**
* Epsilon parameter for phase-space integration
*/
Energy _eps;
};
/**
* Output information on the DecayIntegrator for debugging purposes
*/
ostream & operator<<(ostream &, const DecayIntegrator &);
/**
* Exception for this class and those inheriting from it
*/
class DecayIntegratorError: public Exception {};
}
#endif /* HERWIG_DecayIntegrator_H */
diff --git a/Decay/DecayMatrixElement.h b/Decay/DecayMatrixElement.h
--- a/Decay/DecayMatrixElement.h
+++ b/Decay/DecayMatrixElement.h
@@ -1,275 +1,275 @@
// -*- C++ -*-
#ifndef Herwig_DecayMatrixElement_H
#define Herwig_DecayMatrixElement_H
//
// This is the declaration of the DecayMatrixElement class.
//
#include "ThePEG/Pointer/ReferenceCounted.h"
#include <ThePEG/Config/ThePEG.h>
#include <ThePEG/Helicity/HelicityDefinitions.h>
#include <ThePEG/EventRecord/RhoDMatrix.h>
#include "DecayMatrixElement.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the DecayMatrixElement class.
*/
class DecayMatrixElement: public Pointer::ReferenceCounted {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DecayMatrixElement(unsigned int ntemp=999, PDT::Spin spin = PDT::SpinUndefined)
: nOut_(ntemp), inSpin_(spin) {}
/**
* The destructor.
*/
virtual ~DecayMatrixElement();
//@}
public:
/**
* Access to the spins of the particles
*/
//@{
/**
* Get the spin of the incoming particle.
*/
PDT::Spin inspin() const {return inSpin_;}
/**
* Get the spins of the outgoing particles.
*/
const vector<PDT::Spin> & outspin() const {return outSpin_;}
//@}
/**
* Get the number of outgoing particles
*/
unsigned int nOut() const {return nOut_;}
/**
* Spin Density matrices
*/
//@{
/**
* Calculate the decay matrix for this decay.
* @param rhoout The \f$D\f$ matrix for this decay.
*/
virtual RhoDMatrix calculateDMatrix(const vector<RhoDMatrix> & rhoout) const = 0;
/**
* Calculate the \f$\rho\f$ matrix for a given outgoing particle.
* @param ipart The outgoing particle the \f$\rho\f$ matrix is needed for
* @param rhoin The \f$\rho\f$ matrix for the decaying particle.
* @param rhoout he \f$D\f$ matrices for the other decay products.
*/
virtual RhoDMatrix calculateRhoMatrix(int ipart,const RhoDMatrix & rhoin,
const vector<RhoDMatrix> & rhoout) const = 0;
/**
* Contract the matrix element with the \f$\rho\f$ matrix of the
* incoming particle. The spins of the decay products are summed over.
* @param rhoin The \f$\rho\f$ matrix for the decaying particle.
*/
virtual Complex contract(const RhoDMatrix & rhoin) const = 0;
// /**
// * Contract the matrix element with the \f$\rho\f$ matrix of the
// * incoming particle. The spins of the decay products are summed over.
// * @param con The conjugate matrix elemetn for the contraction
// * @param rhoin The \f$\rho\f$ matrix for the decaying particle.
// */
// Complex contract(const DecayMatrixElement & con,
// const RhoDMatrix & rhoin);
//@}
public:
/**
* Access to the individual helicity components.
*/
//@{
/**
* Get the helicity components for a two body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
*/
virtual Complex operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2) const = 0;
/**
* Set the helicity components for a two body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
*/
virtual Complex & operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2) = 0;
/**
* Get the helicity components for a three body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
*/
virtual Complex operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3) const = 0;
/**
* Set the helicity components for a three body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
*/
virtual Complex & operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3) = 0;
/**
* Get the helicity components for a four body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
* @param outhel4 The helicity of the fourth decay product.
*/
virtual Complex operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3,
unsigned int outhel4) const = 0;
/**
* Set the helicity components for a four body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
* @param outhel4 The helicity of the fourth decay product.
*/
virtual Complex & operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3,
unsigned int outhel4) = 0;
/**
* Get the helicity components for a five body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
* @param outhel4 The helicity of the fourth decay product.
* @param outhel5 The helicity of the fifth decay product.
*/
virtual Complex operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3,
unsigned int outhel4,unsigned int outhel5) const = 0;
/**
* Set the helicity components for a five body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
* @param outhel4 The helicity of the fourth decay product.
* @param outhel5 The helicity of the fifth decay product.
*/
virtual Complex & operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3,
unsigned int outhel4,unsigned int outhel5) = 0;
/**
* Get the helicity components for a six body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
* @param outhel4 The helicity of the fourth decay product.
* @param outhel5 The helicity of the fifth decay product.
* @param outhel6 The helicity of the sixth decay product.
*/
virtual Complex operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3,
unsigned int outhel4,unsigned int outhel5,
unsigned int outhel6) const = 0;
/**
* Set the helicity components for a six body decay
* @param inhel The helicity of the decaying particle.
* @param outhel1 The helicity of the first decay product.
* @param outhel2 The helicity of the second decay product.
* @param outhel3 The helicity of the third decay product.
* @param outhel4 The helicity of the fourth decay product.
* @param outhel5 The helicity of the fifth decay product.
* @param outhel6 The helicity of the sixth decay product.
*/
virtual Complex & operator () (unsigned int inhel,unsigned int outhel1,
unsigned int outhel2,unsigned int outhel3,
unsigned int outhel4,unsigned int outhel5,
unsigned int outhel6) = 0;
/**
* Get the helicity components for an \f$n\f$-body decay.
* @param in The helicities of the external particles.
*/
virtual Complex operator () (const vector<unsigned int> & in) const = 0;
/**
* Set the helicity components for an \f$n\f$-body decay.
* @param in The helicities of the external particles.
*/
virtual Complex & operator () (const vector<unsigned int> & in) = 0;
//@}
/**
* Member to zero all the elements for the matrix element
*/
virtual void zero() = 0;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DecayMatrixElement & operator=(const DecayMatrixElement &);
+ DecayMatrixElement & operator=(const DecayMatrixElement &) = delete;
protected:
/**
* Get the spins of the outgoing particles.
*/
vector<PDT::Spin> & outspin() {return outSpin_;}
private:
/**
* Number of outgoing particles.
*/
unsigned int nOut_;
/**
* Spin of the incoming particle as 2s+1.
*/
PDT::Spin inSpin_;
/**
* Spins of the outgoing particles.
*/
vector<PDT::Spin> outSpin_;
};
}
#endif /* Herwig_DecayMatrixElement_H */
diff --git a/Decay/DecayPhaseSpaceChannel.h b/Decay/DecayPhaseSpaceChannel.h
--- a/Decay/DecayPhaseSpaceChannel.h
+++ b/Decay/DecayPhaseSpaceChannel.h
@@ -1,349 +1,349 @@
// -*- C++ -*-
//
// DecayPhaseSpaceChannel.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DecayPhaseSpaceChannel_H
#define HERWIG_DecayPhaseSpaceChannel_H
//
// This is the declaration of the DecayPhaseSpaceChannel class.
//
#include <ThePEG/Interface/Interfaced.h>
#include <ThePEG/PDT/ParticleData.h>
#include <ThePEG/EventRecord/Particle.h>
#include "DecayPhaseSpaceChannel.fh"
#include "DecayIntegrator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/Repository/UseRandom.h"
#include "DecayPhaseSpaceMode.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class is designed to store the information needed for a given
* phase-space channel for use by the multi-channel phase space decayer
* and perform the generation of the phase space for that channel.
*
* The decay channel is specified as a series of \f$1\to2\f$ decays to either
* external particles or other intermediates. For each intermediate
* the Jacobian to be used can be either a Breit-Wigner(0) or a power-law
* (1).
*
* The class is then capable of generating a phase-space point using this
* channel and computing the weight of a given point for use in a multi-channel
* phase space integration using the <code>DecayPhaseSpaceMode</code> class.
*
* The class is designed so that the phase-space channels can either by specified
* using the addIntermediate method directly or via the repository.
* (In practice at the moment all the channels are constructed by the relevant decayers
* using the former method at the moment.)
*
* @see DecayPhaseSpaceMode
* @see DecayIntegrator
*
* @author Peter Richardson
*/
class DecayPhaseSpaceChannel: public Base {
/**
* A friend output operator to allow the channel to be outputted for
* debugging purposes
*/
friend ostream & operator<<(ostream &, const DecayPhaseSpaceChannel &);
/**
* DecayPhaseSpaceMode is a friend to avoid making many of the phase space
* generation members public.
*/
friend class DecayPhaseSpaceMode;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
DecayPhaseSpaceChannel() {}
/**
* Constructor with a pointer to a <code>DecayPhaseSpaceMode</code>. This
* is the constructor which should normally be used in decayers.
*/
DecayPhaseSpaceChannel(tcDecayPhaseSpaceModePtr);
//@}
public:
/** @name Set-up Members */
//@{
/**
* Add a new intermediate particle
* @param part A pointer to the particle data object for the intermediate.
* @param jac The jacobian to be used for the generation of the particle's mass
* 0 is a Breit-Wigner and 1 is a power-law
* @param power The power to beb used for the mass generation if a power law
* mass distribution is chosen.
* @param dau1 The first daughter. If this is postive it is the \f$dau1\f$ th
* outgoing particle (0 is the incoming particle), if it is negative it is the
* \f$|dau1|\f$ intermediate. The intermediates are specified in the order they
* are added with 0 being the incoming particle.
* @param dau2 The first daughter. If this is postive it is the \f$dau2\f$ th
* outgoing particle (0 is the incoming particle), if it is negative it is the
* \f$|dau2|\f$ intermediate. The intermediates are specified in the order they
* are added with 0 being the incoming particle.
*/
void addIntermediate(PDPtr part,int jac,double power,int dau1,int dau2) {
_intpart.push_back(part);
_jactype.push_back(jac);
_intpower.push_back(power);
_intdau1.push_back(dau1);
_intdau2.push_back(dau2);
}
/**
* Reset the properties of an intermediate particle. This member is used
* when a Decayer is used a different value for either the mass or width
* of a resonace to that in the ParticleData object. This improves the
* efficiency of the integration.
* @param part A pointer to the particle data object for the intermediate.
* @param mass The new mass of the intermediate
* @param width The new width of the intermediate.
*/
void resetIntermediate(tcPDPtr part,Energy mass,Energy width) {
if(!part) return;
int idin=part->id();
for(unsigned int ix=0;ix<_intpart.size();++ix) {
if(_intpart[ix] && _intpart[ix]->id()==idin) {
_intmass[ix] =mass;_intwidth[ix]=width;
_intmass2[ix]=mass*mass;_intmwidth[ix]=mass*width;
}
}
}
/*
* Reset the one of the daughters
* @param oldp The id of the particle being reset
* @param newp The id of the particle replacing it
*/
void resetDaughter(int oldp, int newp) {
for(unsigned int ix=0;ix<_intdau1.size();++ix) {
if(_intdau1[ix]==oldp) _intdau1[ix]=newp;
}
for(unsigned int ix=0;ix<_intdau2.size();++ix) {
if(_intdau2[ix]==oldp) _intdau2[ix]=newp;
}
}
/**
* Check the kinematics
*/
bool checkKinematics();
//@}
protected:
/** @name Phase-Space Generation Members */
//@{
/**
* Generate the momenta of the external particles. This member uses the masses
* of the external particles generated by the DecayPhaseMode class and the
* intermediates for the channel to generate the momenta of the decay products.
* @param pin The momenta of the decay products. This is outputed by the member.
* @param massext The masses of the particles. This is to allow inclusion of
* off-shell effects for the external particles.
*/
vector<Lorentz5Momentum> generateMomenta(const Lorentz5Momentum & pin,
const vector<Energy> & massext);
/**
* Generate the weight for this channel given a phase space configuration.
* This member generates the weight for a given phase space configuration
* and is used by the DecayPhaseSpaceMode class to compute the denominator
* of the weight in the multi-channel integration.
* @param output The momenta of the outgoing particles.
*/
double generateWeight(const vector<Lorentz5Momentum> & output);
/**
* Generate the final-state particles including the intermediate resonances.
* This method takes the outgoing particles and adds the intermediate particles
* specified by this phase-space channel. This is to allow a given set of
* intermediates to be specified even when there is interference between different
* intermediate states.
* @param cc Whether the particles are the mode specified or its charge conjugate.
* @param in The incoming particles.
* @param out The outgoing particles.
*
*/
void generateIntermediates(bool cc,const Particle & in, ParticleVector & out);
/**
* Calculate the momenta for a two body decay
* The return value indicates success or failure.
* @param p The momentum of the decaying particle
* @param m1 The mass of the first decay product
* @param m2 The mass of the second decay product
* @param p1 The momentum of the first decay product
* @param p2 The momentum of the second decay product
*/
void twoBodyDecay(const Lorentz5Momentum & p,
const Energy m1, const Energy m2,
Lorentz5Momentum & p1, Lorentz5Momentum & p2);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void init();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void initrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- DecayPhaseSpaceChannel & operator=(const DecayPhaseSpaceChannel &);
+ DecayPhaseSpaceChannel & operator=(const DecayPhaseSpaceChannel &) = delete;
private:
/** @name Mass Generation Members */
//@{
/**
* Generate the mass of a resonance.
* @param ires The resonance to be generated.
* @param lower The lower limit on the particle's mass.
* @param upper The upper limit on the particle's mass.
*/
Energy generateMass(int ires,Energy lower,Energy upper);
/**
* Return the weight for a given resonance.
* @param ires The resonance to be generated.
* @param moff The mass of the resonance.
* @param lower The lower limit on the particle's mass.
* @param upper The upper limit on the particle's mass.
*/
InvEnergy2 massWeight(int ires, Energy moff,Energy lower,Energy upper);
//@}
private:
/**
* pointer to the mode
*/
tcDecayPhaseSpaceModePtr _mode;
/**
* Pointers to the particle data objects of the intermediate particles
*/
vector <PDPtr> _intpart;
/**
* The type of jacobian to be used for the intermediates.
*/
vector <int> _jactype;
/**
* The mass of the intermediates.
*/
vector<Energy> _intmass;
/**
* The width of the intermediates.
*/
vector<Energy> _intwidth;
/**
* The mass squared of the intermediate particles.
*/
vector<Energy2> _intmass2;
/**
* The mass times the width for the intermediate particles.
*/
vector<Energy2>_intmwidth;
/**
* The power for the intermediate resonance.
*/
vector<double> _intpower;
/**
* The first daughter of the intermediate resonance.
*/
vector<int> _intdau1;
/**
* The second daughter of the intermediate resonance.
*/
vector<int> _intdau2;
/**
* The external particles that an intermediate particle final decays to.
*/
vector< vector<int> > _intext;
/**
* Helper function for the weight calculation.
* @param ires The resonance to be generated.
* @param limit The limit on the particle's mass.
*/
double atanhelper_(int ires, Energy limit);
};
/**
* write the phase space channel to a stream
*/
ostream & operator<<(ostream &, const DecayPhaseSpaceChannel &);
/**
* exception for this class and those inheriting from it
*/
class DecayPhaseSpaceError: public Exception {};
}
#endif /* HERWIG_DecayPhaseSpaceChannel_H */
diff --git a/Decay/DecayPhaseSpaceMode.h b/Decay/DecayPhaseSpaceMode.h
--- a/Decay/DecayPhaseSpaceMode.h
+++ b/Decay/DecayPhaseSpaceMode.h
@@ -1,454 +1,454 @@
// -*- C++ -*-
//
// DecayPhaseSpaceMode.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DecayPhaseSpaceMode_H
#define HERWIG_DecayPhaseSpaceMode_H
//
// This is the declaration of the DecayPhaseSpaceMode class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "DecayPhaseSpaceMode.fh"
#include "DecayPhaseSpaceChannel.h"
#include "Herwig/PDT/GenericWidthGenerator.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include <Herwig/Decay/DecayVertex.h>
#include "DecayIntegrator.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>DecayPhaseSpaceMode</code> class is designed to store a group
* of phase-space channels for use by the DecayIntegrator class to
* generate the phase-space for a given decay mode.
*
* Additional phase-space channels can be added using the addChannel member.
*
* In practice the modes are usually constructed together with the a number of
* <code>DecayPhaseSpaceChannel</code> objects. In classes inheriting from the
* DecayIntegrator class.
*
* @see DecayIntegrator
* @see DecayPhaseSpaceChannel
*
* @author Peter Richardson
*
*/
class DecayPhaseSpaceMode: public Base {
/**
* A friend operator to allow the mode to be outputted for debugging purposes.
*/
friend ostream & operator<<(ostream &, const DecayPhaseSpaceMode &);
/**
* DecayIntegrator is a friend to avoid making many of the phase space
* generation members public.
*/
friend class DecayIntegrator;
/**
* DecayPhaseSpaceChannel is a friend to avoid making many of the phase space
* generation members public
*/
friend class DecayPhaseSpaceChannel;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
DecayPhaseSpaceMode() : _maxweight(0.),_niter(10), _npoint(10000), _ntry(500),
_partial(-1), _testOnShell(false), _ichannel(999) {}
/**
* Constructor with a pointer to a <code>DecayPhaseIntegrator</code> and a vector
* of particle data objects for the external particles. This
* is the constructor which should normally be used in decayers.
* @param in The particle data objects for the external particles
* @param intin A pointer to the DecayIntegrator class using this mode.
* @param onShell Whether or not to perform tests for zero width on-shell particles
*/
DecayPhaseSpaceMode(tPDVector in, tcDecayIntegratorPtr intin,bool onShell=false)
: _integrator(intin), _maxweight(0.),
_niter(10), _npoint(10000), _ntry(500),
_extpart(in), _partial(-1), _testOnShell(onShell), _ichannel(999) {}
//@}
/**
* Access to the external particles.
* @param ix The external particle required.
* @return A pointer to the ParticleData object.
*/
tcPDPtr externalParticles(int ix) const {return _extpart[ix];}
/**
* Number of external particles.
* @return The number of external particles.
*/
unsigned int numberofParticles() const {return _extpart.size();}
/**
* Number of channels
* @return The number of channels.
*/
unsigned int numberChannels() const {return _channels.size();}
/**
* Add a new channel.
* @param channel A pointer to the new DecayPhaseChannel
*/
void addChannel(DecayPhaseSpaceChannelPtr channel) {
channel->init();
_channels.push_back(channel);
}
/**
* Reset the properties of one of the intermediate particles. Only a specific channel
* is reset.
* @param ichan The channel to reset.
* @param part The ParticleData object of the particle to reset
* @param mass The mass of the intermediate.
* @param width The width of gthe intermediate.
*/
void resetIntermediate(int ichan, tcPDPtr part, Energy mass, Energy width) {
if(!part) return;
_channels[ichan]->resetIntermediate(part,mass,width);
}
/**
* Reset the properties of one of the intermediate particles. All the channels
* are reset.
* @param part The ParticleData object of the particle to reset
* @param mass The mass of the intermediate.
* @param width The width of gthe intermediate.
*/
void resetIntermediate(tcPDPtr part, Energy mass, Energy width) {
for(unsigned int ix=0,N=_channels.size();ix<N;++ix)
_channels[ix]->resetIntermediate(part,mass,width);
}
/**
* Get the maximum weight for the decay.
* @return The maximum weight.
*/
double maxWeight() const {return _maxweight;}
/**
* Set the maximum weight for the decay.
* @param wgt The maximum weight.
*/
void setMaxWeight(double wgt) const {_maxweight=wgt;}
/**
* Get the weight for a channel. This is the weight for the multi-channel approach.
* @param ichan The channel.
* @return The weight for the channel.
*/
double channelWeight(unsigned int ichan) const {return _channelwgts[ichan];}
/**
* Set the weights for the different channels.
* @param in The weights for the different channels in the multi-channel approach.
*/
void setWeights(const vector<double> & in) const {_channelwgts=in;}
/**
* Access to the selected channel
*/
unsigned int selectedChannel() const {return _ichannel;}
/**
* test on/off-shell kinematics
*/
bool testOnShell() const { return _testOnShell; }
/**
* Access to the epsilon parameter
*/
Energy epsilonPS() const {return _eps;}
protected:
/** @name Set-up, Initialization and Access Members */
//@{
/**
* Initialise the phase space.
* @param init Perform the initialization.
*/
Energy initializePhaseSpace(bool init, bool onShell=false);
/**
* Set the integration parameters
* @param iter The number of iterations to use for initialization.
* @param points The number of points to use for each iteration during initialization.
* @param ntry The number of tries to generate a decay.
*/
void setIntegrate(int iter,int points,int ntry) {
_niter=iter;
_npoint=points;
_ntry=ntry;
}
/**
* Set the partial width to use for normalization. This is the partial width
* in the WidthGenerator object.
* @param in The partial width to use.
*/
void setPartialWidth(int in) {_partial=in;}
//@}
/** @name Phase-Space Generation Members */
//@{
/**
* Access to the matrix element from the decayer.
* @param ichan The channel, this is to allow the matrix element to be used to
* select the intermediates
* @param inpart The incoming particle.
* @param opt The option for what to calculate
* @param outpart The outgoing particles.
*/
double me2(const int ichan ,const Particle & inpart,
const ParticleVector &outpart,DecayIntegrator::MEOption opt) const {
return _integrator->me2(ichan,inpart,outpart,opt);
}
/**
* Generate the decay.
* @param intermediates Whether or not to generate the intermediate particle
* in the decay channel.
* @param cc Whether we are generating the mode specified or the charge
* conjugate mode.
* @param inpart The incoming particle.
* @return The outgoing particles.
*/
ParticleVector generate(bool intermediates,bool cc,const Particle & inpart) const;
/**
* Select which channel to use to output the particles.
* @param inpart The incoming particles.
* @param outpart The outgoing particles.
*/
int selectChannel(const Particle & inpart, ParticleVector & outpart) const {
// if using flat phase-space don't need to do this
if(_channelwgts.empty()) return 0;
vector<double> mewgts(_channels.size(),0.0);
double total=0.;
for(unsigned int ix=0,N=_channels.size();ix<N;++ix) {
mewgts[ix]=me2(ix,inpart,outpart,DecayIntegrator::Calculate);
total+=mewgts[ix];
}
// randomly pick a channel
total*=UseRandom::rnd();
int ichan=-1;
do {
++ichan;
total-=mewgts[ichan];
}
while(ichan<int(_channels.size())&&total>0.);
return ichan;
}
/**
* Return the weight for a given phase-space point.
* @param cc Whether we are generating the mode specified or the charge
* conjugate mode.
* @param ichan The channel to generate the weight for.
* @param in The incoming particle.
* @param particles The outgoing particles.
* @param first Whether or not this is the first call for initialisation
* @return The weight.
*/
Energy weight(bool cc,int & ichan, const Particle & in,
ParticleVector & particles,bool first,
bool onShell=false) const {
ichan=0;
Energy phwgt = (_channels.size()==0) ?
flatPhaseSpace(cc,in,particles,onShell) : channelPhaseSpace(cc,ichan,in,particles,onShell);
// generate the matrix element
return me2(-1,in,particles,
first ? DecayIntegrator::Initialize : DecayIntegrator::Calculate)*phwgt;
}
/**
* Return the weight and momenta for a flat phase-space decay.
* @param cc Whether we are generating the mode specified or the charge
* conjugate mode.
* @param inpart The incoming particle.
* @param outpart The outgoing particles.
* @return The weight.
*/
Energy flatPhaseSpace(bool cc,const Particle & inpart, ParticleVector & outpart,
bool onShell=false) const;
/**
* Generate a phase-space point using multichannel phase space.
* @param cc Whether we are generating the mode specified or the charge
* conjugate mode.
* @param ichan The channel to generate the weight for.
* @param in The incoming particle.
* @param particles The outgoing particles.
* @return The weight.
*/
Energy channelPhaseSpace(bool cc,int & ichan, const Particle & in,
ParticleVector & particles,
bool onShell=false) const;
/**
* Construct the vertex for spin corrections
* @param in The incoming particle.
* @param out The outgoing particles.
*/
void constructVertex(const Particle & in, const ParticleVector & out) const;
/**
* Generate the masses of the external particles.
* @param inmass The mass of the decaying particle.
* @param wgt The weight for the masses.
* @return The masses.
*/
vector<Energy> externalMasses(Energy inmass,double & wgt, bool onShell) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void init();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void initrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- DecayPhaseSpaceMode & operator=(const DecayPhaseSpaceMode &);
+ DecayPhaseSpaceMode & operator=(const DecayPhaseSpaceMode &) = delete;
private:
/**
* pointer to the decayer
*/
tcDecayIntegratorPtr _integrator;
/**
* pointers to the phase-space channels
*/
vector<DecayPhaseSpaceChannelPtr> _channels;
/**
* the weights for the different channels
*/
mutable vector<double> _channelwgts;
/**
* the maximum weight for the decay
*/
mutable double _maxweight;
/**
* Number of iterations for the initialization.
*/
int _niter;
/**
* Number of weights for each iteration of the initialization.
*/
int _npoint;
/**
* Number of attempts to generate the decay
*/
int _ntry;
/**
* External particles
*/
tPDVector _extpart;
/**
* Which of the partial widths of the incoming particle to use
*/
int _partial;
/**
* The width generator for the incoming particle.
*/
cGenericWidthGeneratorPtr _widthgen;
/**
* The mass generators for the outgoing particles.
*/
vector<cGenericMassGeneratorPtr> _massgen;
/**
* Whether to check on-shell or off-shell kinematics
* in doinit, if on-shell off-shell is tested in initrun
*/
bool _testOnShell;
/**
* The selected channel
*/
mutable unsigned int _ichannel;
/**
* Epsilon parameter for phase-space integration
*/
Energy _eps;
};
/**
* The output operator which is used for debugging.
*/
ostream & operator<<(ostream &, const DecayPhaseSpaceMode &);
}
#endif /* HERWIG_DecayPhaseSpaceMode_H */
diff --git a/Decay/DecayVertex.h b/Decay/DecayVertex.h
--- a/Decay/DecayVertex.h
+++ b/Decay/DecayVertex.h
@@ -1,96 +1,96 @@
// -*- C++ -*-
//
// DecayVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DecayVertex_H
#define HERWIG_DecayVertex_H
//
// This is the declaration of the DecayVertex class.
//
#include <ThePEG/EventRecord/HelicityVertex.h>
#include "DecayMatrixElement.h"
#include "DecayVertex.fh"
namespace Herwig {
/** \ingroup Helicity
* \author Peter Richardson
*
* The DecayVertex class is designed to implement the vertex
* for a decay for use with the spin correlation algorithm.
* It inherits from HelicityVertex class of ThePEG and implements
* the methods to calculate the \f$\rho\f$ and \f$D\f$ matrices.
*
* It uses the DecayMatrixElement class to store the matrix element and
* it is this class which performs the calculations of the matrices.
*
* @see HelicityVertex
* @see DecayMatrixElement
*/
class DecayVertex: public HelicityVertex {
public:
/**
* Access to the matrix element
*/
//@{
/**
* Get the matrix element
*/
const DecayMEPtr ME() const {
return matrixElement_;
}
/**
* Set the matrix element
*/
void ME(DecayMEPtr in) const {
matrixElement_ = in;
}
//@}
public:
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/**
* Method to calculate the \f$\rho\f$ matrix for one of the decay products
* @param iprod The product we are calculating the \f$\rho\f$ matrix for.
* @param recursive Whether or not to recursive calculate the matrix
*/
virtual RhoDMatrix getRhoMatrix(int iprod,bool recursive) const;
/**
* Method to calculate the \f$D\f$ matrix for the decaying particle. It this
* case the argument is a dummy.
*/
virtual RhoDMatrix getDMatrix(int) const;
/**
* Private and non-existent assignment operator.
*/
- DecayVertex & operator=(const DecayVertex &);
+ DecayVertex & operator=(const DecayVertex &) = delete;
private:
/**
* Storage of the decay matrix element.
*/
mutable DecayMEPtr matrixElement_;
};
}
#endif /* HERWIG_DecayVertex_H */
diff --git a/Decay/EvtGen/EvtGenDecayer.h b/Decay/EvtGen/EvtGenDecayer.h
--- a/Decay/EvtGen/EvtGenDecayer.h
+++ b/Decay/EvtGen/EvtGenDecayer.h
@@ -1,145 +1,145 @@
// -*- C++ -*-
#ifndef Herwig_EvtGenDecayer_H
#define Herwig_EvtGenDecayer_H
//
// This is the declaration of the EvtGenDecayer class.
//
#include "ThePEG/PDT/Decayer.h"
#include "EvtGenInterface.h"
namespace Herwig {
using namespace ThePEG;
/**
* The EvtGenDecayer class is designed to allow the EvtGen decay package to be used
* as a Decayer in the Herwig structure.
*
* It is a simple wrapper which uses members of the Herwig EvtGen class to perform
* the decay
*
* @see EvtGenInterface
* @see \ref EvtGenDecayerInterfaces "The interfaces"
* defined for EvtGenDecayer.
*/
class EvtGenDecayer: public Decayer {
public:
/**
* Standard constructors
*/
EvtGenDecayer() : check_(0) , evtOpt_(0)
{}
public:
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Check if this decayer can perfom the decay specified by the
* given decay mode.
* @param dm the DecayMode describing the decay.
* @return true if this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(const DecayMode & dm) const;
/**
* Perform a decay for a given DecayMode and a given Particle instance.
* @param dm the DecayMode describing the decay.
* @param p the Particle instance to be decayed.
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Method to check conservation of charge and momentum in the decay
* for testing only
* @param parent The decaying particle
*/
void checkDecay(PPtr parent) const;
/**
* Method to rescale the momenta of the decay products if required to
* conserve 4-momentum
*/
bool rescale(const Particle & parent,
const ParticleVector & children) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- EvtGenDecayer & operator=(const EvtGenDecayer &);
+ EvtGenDecayer & operator=(const EvtGenDecayer &) = delete;
private:
/**
* Pointer to the EvtGen interface object
*/
EvtGenInterfacePtr evtgen_;
/**
* Perform checks ?
*/
unsigned int check_;
/**
* Option for how EvtGen is used
*/
unsigned int evtOpt_;
};
}
#endif /* Herwig_EvtGenDecayer_H */
diff --git a/Decay/EvtGen/EvtGenInterface.h b/Decay/EvtGen/EvtGenInterface.h
--- a/Decay/EvtGen/EvtGenInterface.h
+++ b/Decay/EvtGen/EvtGenInterface.h
@@ -1,486 +1,486 @@
// -*- C++ -*-
#ifndef Herwig_EvtGenInterface_H
#define Herwig_EvtGenInterface_H
//
// This is the declaration of the EvtGenInterface class.
//
#include "EvtGenInterface.fh"
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/Vectors/Lorentz5Vector.h"
#include "ThePEG/Helicity/ScalarSpinInfo.h"
#include "ThePEG/Helicity/FermionSpinInfo.h"
#include "ThePEG/Helicity/VectorSpinInfo.h"
#include "ThePEG/Helicity/RSFermionSpinInfo.h"
#include "ThePEG/Helicity/TensorSpinInfo.h"
#include "ThePEG/EventRecord/Particle.h"
#include "EvtGenRandom.h"
#include "EvtGen/EvtGen.hh"
#include "EvtGenBase/EvtParticle.hh"
#include "EvtGenBase/EvtSpinDensity.hh"
#include "EvtGenBase/EvtVector4R.hh"
#include "EvtGenBase/EvtVector4C.hh"
#include "EvtGenBase/EvtTensor4C.hh"
#include "EvtGenBase/EvtDiracSpinor.hh"
#include "EvtGenBase/EvtRaritaSchwinger.hh"
#include "EvtGenBase/EvtDecayAmp.hh"
namespace Herwig {
using namespace ThePEG;
/**
* The EvtGenInterface class is the main class for the use of the EvtGen decay
* package with Herwig.
*
* @see \ref EvtGenInterfaceInterfaces "The interfaces"
* defined for EvtGenInterface.
*/
class EvtGenInterface: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
EvtGenInterface();
/**
* The copy constructor (explicit as cannot copy streams)
*/
EvtGenInterface(const EvtGenInterface &);
/**
* The destructor.
*/
virtual ~EvtGenInterface();
//@}
public:
/**
* Use EvtGen to perform a decay
* @param parent The decaying particle
* @param dm The decaymode
* @return The decay products
*/
ParticleVector decay(const Particle &parent,
bool recursive, const DecayMode & dm) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Functions to convert between EvtGen and Herwig classes */
//@{
/**
* Convert a particle to an EvtGen particle.
* @param part The particle to be converted.
*/
EvtParticle *EvtGenParticle(const Particle & part) const;
/**
* Return the decay products of an EvtGen particle in as ThePEG particles
* @param evtpart The EvtGen particle
*/
ParticleVector decayProducts(EvtParticle* evtpart, bool boost=true) const;
/**
* Convert a Lorentz5Momentum to a real EvtGen 4-vector
* @param mom The momentum to be converted
*/
EvtVector4R EvtGenMomentum(const Lorentz5Momentum & mom) const {
return EvtVector4R(mom.t()/GeV,mom.x()/GeV,mom.y()/GeV,mom.z()/GeV);
}
/**
* Convert a PDG code from ThePEG into an EvtGen particle id
* @param id The PDG code
* @param exception Whether or not to throw an Exception if fails
*/
EvtId EvtGenID(int id,bool exception=true) const;
/**
* Convert a LorentzSpinor to an EvtGen one. The spinor is converted to the
* EvtGen Dirac representation/
* @param sp The LorentzSpinor
*/
EvtDiracSpinor EvtGenSpinor(const LorentzSpinor<SqrtEnergy> & sp) const {
InvSqrtEnergy norm(sqrt(0.5)/sqrt(GeV));
EvtDiracSpinor output;
output.set(EvtGenComplex(-norm*( sp.s1()+sp.s3())),
EvtGenComplex(-norm*( sp.s2()+sp.s4())),
EvtGenComplex(-norm*(-sp.s1()+sp.s3())),
EvtGenComplex(-norm*(-sp.s2()+sp.s4())));
return output;
}
/**
* Convert a LorentzPolarizationVector to a complex EvtGen 4-vector
* @param eps The polarization vector to be converted
*/
EvtVector4C EvtGenPolarization(const LorentzPolarizationVector & eps) const {
return EvtVector4C(EvtGenComplex(eps.t()),EvtGenComplex(eps.x()),
EvtGenComplex(eps.y()),EvtGenComplex(eps.z()));
}
/**
* Convert our Rarita-Schwinger spinor to the EvtGen one
* @param sp Our RS Spinor
*/
EvtRaritaSchwinger EvtGenRSSpinor(const LorentzRSSpinor<SqrtEnergy> & sp) const {
InvSqrtEnergy norm(sqrt(0.5)/sqrt(GeV));
complex<double> out[4][4];
for(unsigned int ix=0;ix<4;++ix) {
- out[ix][0] =-norm*( sp(ix,0)+sp(ix,2));
- out[ix][1] =-norm*( sp(ix,1)+sp(ix,3));
- out[ix][2] =-norm*(-sp(ix,0)+sp(ix,2));
- out[ix][3] =-norm*(-sp(ix,1)+sp(ix,3));
+ out[ix][0] = -Complex(norm*( sp(ix,0)+sp(ix,2)));
+ out[ix][1] = -Complex(norm*( sp(ix,1)+sp(ix,3)));
+ out[ix][2] = -Complex(norm*(-sp(ix,0)+sp(ix,2)));
+ out[ix][3] = -Complex(norm*(-sp(ix,1)+sp(ix,3)));
}
EvtRaritaSchwinger output;
unsigned int ix,iy;
// remember we have vec,spin and evtgen spin,vec
for(ix=0;ix<4;++ix) {
for(iy=0;iy<4;++iy) output.set(ix,iy,EvtGenComplex(out[iy][ix]));
}
return output;
}
/**
* Convert our tensor to the EvtGen one.
* @param ten Our tensor
*/
EvtTensor4C EvtGenTensor(const LorentzTensor<double> & ten) const {
EvtTensor4C output;
unsigned int ix,iy;
for(ix=0;ix<4;++ix){
for(iy=0;iy<4;++iy) output.set(ix,iy,EvtGenComplex(ten(ix,iy)));
}
return output;
}
/**
* Convert a spin density matrix to an EvtGen spin density matrix.
* @param rho The spin density matrix to be converted.
*/
EvtSpinDensity EvtGenSpinDensity(const RhoDMatrix & rho) const {
EvtSpinDensity rhoout;
unsigned int ix,iy,ispin(rho.iSpin());
rhoout.setDim(ispin);
for(ix=0;ix<ispin;++ix) {
for(iy=0;iy<ispin;++iy)
rhoout.set(ix,iy,EvtGenComplex(rho(ix,iy)));
}
return rhoout;
}
/**
* Convert from our complex to the EvtGen one
*/
EvtComplex EvtGenComplex(Complex c) const {
return EvtComplex(c.real(),c.imag());
}
//@}
/**
* Functions to convert between EvtGen and Herwig classes
*/
//@{
/**
* Convert a particle from an EvtGen one to ThePEG one.
* @param part The EvtGen particle.
* @param pd Pointer to the particle data object of ThePEG for the particle.
* @param spin Convert the spin information as well
*/
PPtr ThePEGParticle(EvtParticle *part, tcPDPtr pd,bool spin=true) const {
PPtr output(new_ptr(Particle(pd)));
output->set5Momentum(ThePEGMomentum(part->getP4(),part->mass()));
if(spin) ThePEGSpin(output,part);
// make the daughters
ParticleVector daug(decayProducts(part,spin));
for(unsigned int ix=0;ix<daug.size();++ix) output->addChild(daug[ix]);
return output;
}
/**
* Set the SpinInfo for a ThePEG particle using an EvtGen particle
* @param pegpart ThePEG particle.
* @param evtpart The EvtGen particle.
*/
void ThePEGSpin(PPtr pegpart,EvtParticle *evtpart) const;
/**
* Convert an EvtGen EvtId to a PDG code in our conventions
* @param id The EvtGen ID.
* @param exception Whether or not to throw an Exception if fails
*/
int ThePEGID(EvtId id,bool exception=true) const;
/**
* Convert from EvtGen momentum to Lorentz5Momentum
* @param mom The EvtGen 4-momentum
* @param mass The mass
*/
Lorentz5Momentum ThePEGMomentum(const EvtVector4R & mom,double mass) const {
return Lorentz5Momentum(mom.get(1)*GeV,mom.get(2)*GeV,
mom.get(3)*GeV,mom.get(0)*GeV,mass*GeV);
}
/**
* Convert from EvtGen complex to ours
*/
Complex ThePEGComplex(EvtComplex c) const {
return Complex(real(c),imag(c));
}
/**
* Convert a spin density to a ThePEG one from an EvtGen one
* @param rho The spin density matrix to be converted
* @param id The PDG code of the particle to get special cases right.
*/
RhoDMatrix ThePEGSpinDensity(const EvtSpinDensity & rho, int id) const;
/**
* Convert an EvtDiracSpinor a LorentzSpinor. This spinor is converted to
* the default Dirac matrix representation used by ThePEG.
* @param sp The EvtDiracSpinor
*/
LorentzSpinor<SqrtEnergy> ThePEGSpinor(const EvtDiracSpinor & sp) const {
SqrtEnergy norm(sqrt(0.5)*sqrt(GeV));
vector<complex<SqrtEnergy> > evtSpin(4);
for(unsigned int ix=0;ix<4;++ix) evtSpin[ix] = -norm*ThePEGComplex(sp.get_spinor(ix));
return LorentzSpinor<SqrtEnergy>(evtSpin[0]-evtSpin[2],evtSpin[1]-evtSpin[3],
evtSpin[0]+evtSpin[2],evtSpin[1]+evtSpin[3]);
}
/**
* Convert an EvtGen complex 4-vector to a LorentzPolarizationVector
* @param eps The complex 4-vector to be converted.
*/
LorentzPolarizationVector ThePEGPolarization(const EvtVector4C & eps) const {
return LorentzPolarizationVector(conj(ThePEGComplex(eps.get(1))),
conj(ThePEGComplex(eps.get(2))),
conj(ThePEGComplex(eps.get(3))),
conj(ThePEGComplex(eps.get(0))));
}
/**
* Convert an EvtGen Rarita-Schwinger spinor to ours
* @param sp The EvtGen RS spinor.
*/
LorentzRSSpinor<SqrtEnergy> ThePEGRSSpinor(const EvtRaritaSchwinger & sp) const {
complex<SqrtEnergy> evtSpin[4][4];
SqrtEnergy norm(sqrt(0.5)*sqrt(GeV));
// normalisation and swap vec,spin order
for(unsigned int ix=0;ix<4;++ix) {
for(unsigned int iy=0;iy<4;++iy) evtSpin[ix][iy]=-norm*ThePEGComplex(sp.get(iy,ix));
}
LorentzRSSpinor<SqrtEnergy> output;
for(unsigned int ix=0;ix<4;++ix) {
output(ix,0) = evtSpin[ix][0] - evtSpin[ix][2];
output(ix,1) = evtSpin[ix][1] - evtSpin[ix][3];
output(ix,2) = evtSpin[ix][0] + evtSpin[ix][2];
output(ix,3) = evtSpin[ix][1] + evtSpin[ix][3];
}
// output.changeRep(Helicity::defaultDRep);
return output;
}
/**
* Convert an EvtGen tensor to ThePEG
* @param ten The EvtGen tensor
*/
LorentzTensor<double> ThePEGTensor(const EvtTensor4C & ten) const {
LorentzTensor<double> output;
unsigned int ix,iy;
for(ix=0;ix<4;++ix) {
for(iy=0;iy<4;++iy)output(ix,iy)=conj(ThePEGComplex(ten.get(ix,iy)));
}
return output;
}
//@}
/**
* Check the conversion of particles between Herwig and EvtGen
*/
void checkConversion() const;
/**
* Output the EvtGen decay modes for a given particle
* @param id The PDG code of the particle to output
*/
void outputEvtGenDecays(long id) const;
/**
* Find the location in the EvtGen list of decay channels for
* a given decay mode.
*/
int EvtGenChannel(const DecayMode &dm) const;
/**
* Check the particle has SpinInfo and if not create it
* @param part The particle
*/
tSpinPtr getSpinInfo(const Particle &part) const {
// return spin info if exists
if(part.spinInfo()) {
return dynamic_ptr_cast<tSpinPtr>(const_ptr_cast<tPPtr>(&part)->spinInfo());
}
// otherwise make it
tPPtr ptemp(const_ptr_cast<tPPtr>(&part));
PDT::Spin spin(part.dataPtr()->iSpin());
SpinPtr pspin;
if(spin==PDT::Spin0) pspin=new_ptr(ScalarSpinInfo(part.momentum(),true));
else if(spin==PDT::Spin1Half) pspin=new_ptr(FermionSpinInfo(part.momentum(),true));
else if(spin==PDT::Spin1) pspin=new_ptr(VectorSpinInfo(part.momentum(),true));
else if(spin==PDT::Spin3Half) pspin=new_ptr(RSFermionSpinInfo(part.momentum(),true));
else if(spin==PDT::Spin2) pspin=new_ptr(TensorSpinInfo(part.momentum(),true));
else throw Exception() << "Can't create spinInfo for decaying particle in "
<< "EvtGen::checkSpinInfo for spin " << spin << "particle "
<< Exception::eventerror;
ptemp->spinInfo(pspin);
return pspin;
}
/**
* Construct the DecayVertex for Herwig using the information from
* EvtGen
* @param parent The decaying particle
* @param products The outgoing particles
* @param damp Pointer to the EvtGen decayer
*/
void constructVertex(const Particle & parent,ParticleVector products,
EvtDecayAmp* damp) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- EvtGenInterface & operator=(const EvtGenInterface &);
+ EvtGenInterface & operator=(const EvtGenInterface &) = delete;
private:
/**
* Names of the various EvtGen parameter files
*/
//@{
/**
* The name of the file containing the decays
*/
string decayName_;
/**
* The name of the file containing the particle data
*/
string pdtName_;
/**
* Names of addition user specified decays
*/
vector<string> userDecays_;
//@}
/**
* Whether or not to redirect cout and cerr when EvtGen is running
*/
bool reDirect_;
/**
* Check the conversion of the particles
*/
bool checkConv_;
/**
* Particles for which to output the EvtGen decays
*/
vector<long> convID_;
/**
* Location of the PYTHIA8 data directory
*/
string p8Data_;
private:
/**
* Pointer to the random number generator for EvtGen
*/
EvtRandomEngine * evtrnd_;
/**
* Main EvtGen object
*/
EvtGen * evtgen_;
/**
* File to output the log info to
*/
mutable ofstream logFile_;
};
}
#endif /* Herwig_EvtGenInterface_H */
diff --git a/Decay/EvtGen/Makefile.am b/Decay/EvtGen/Makefile.am
--- a/Decay/EvtGen/Makefile.am
+++ b/Decay/EvtGen/Makefile.am
@@ -1,12 +1,12 @@
pkglib_LTLIBRARIES = HwEvtGenInterface.la
HwEvtGenInterface_la_SOURCES = \
EvtGenInterface.cc EvtGenInterface.h EvtGenInterface.fh \
EvtGenRandom.h \
EvtGenDecayer.cc EvtGenDecayer.h
-HwEvtGenInterface_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0
+HwEvtGenInterface_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0
HwEvtGenInterface_la_LIBADD = $(EVTGENLIBS)
HwEvtGenInterface_la_CPPFLAGS = $(AM_CPPFLAGS) $(EVTGENINCLUDE) \
-DEVTGEN_PREFIX="\"$(EVTGENPREFIX)\"" \
-DPYTHIA8DATA="\"$(PYTHIA8DATA)\""
diff --git a/Decay/FormFactors/BallZwickyScalarFormFactor.h b/Decay/FormFactors/BallZwickyScalarFormFactor.h
--- a/Decay/FormFactors/BallZwickyScalarFormFactor.h
+++ b/Decay/FormFactors/BallZwickyScalarFormFactor.h
@@ -1,216 +1,216 @@
// -*- C++ -*-
//
// BallZwickyScalarFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_BallZwickyScalarFormFactor_H
#define HERWIG_BallZwickyScalarFormFactor_H
//
// This is the declaration of the BallZwickyScalarFormFactor class.
//
#include "ScalarFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class is the implementation of the form-factors of PRD71 014015 (2005) for
* the form-factor for the decay of a B-meson to a light pseudoscalar meson.
*
* This class is one of the few which includes the penguin form factors in addition
* to the standard weak decay form factors.
*
* @see ScalarFormFactor
* @see BallZwickyVectorFormFactor
*/
class BallZwickyScalarFormFactor: public ScalarFormFactor {
public:
/**
* Default constructor
*/
BallZwickyScalarFormFactor();
/** @name Form-Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form-factor \f$f_0\f$.
* @param fp The form-factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,
int id1, Energy m0, Energy m1,
Complex & f0,Complex & fp) const;
/**
* The form factor for the weak penguin decay of a scalar meson to a scalar meson.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param fT The form factor \f$f_T\f$.
*/
void ScalarScalarSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0, Energy m1,Complex & fT) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- BallZwickyScalarFormFactor & operator=(const BallZwickyScalarFormFactor &);
+ BallZwickyScalarFormFactor & operator=(const BallZwickyScalarFormFactor &) = delete;
private:
/** @name Coefficients for the form factors.*/
//@{
/**
* The coefficient \f$r_1\f$ for the \f$f_0(q^2)\f$ form factor.
*/
vector<double> _r10;
/**
* The coefficient \f$r_2\f$ for the \f$f_0(q^2)\f$ form factor.
*/
vector<double> _r20;
/**
* The coefficient \f$r_1\f$ for the \f$f_+(q^2)\f$ form factor.
*/
vector<double> _r1plus;
/**
* The coefficient \f$r_2\f$ for the \f$f_+(q^2)\f$ form factor.
*/
vector<double> _r2plus;
/**
* The coefficient \f$r_1\f$ for the \f$f_T(q^2)\f$ form factor.
*/
vector<double> _r1T;
/**
* The coefficient \f$r_2\f$ for the \f$f_T(q^2)\f$ form factor.
*/
vector<double> _r2T;
//@}
/** @name Masses for the form factors.*/
//@{
/**
* The mass \f$(m_1)^2\f$ \f$f_0(q^2)\f$ form factor.
*/
vector<Energy2> _m120;
/**
* The mass \f$m_{\rm fit}^2\f$ \f$f_0(q^2)\f$ form factor.
*/
vector<Energy2> _mfit20;
/**
* The mass \f$(m_1)^2\f$ \f$f_+(q^2)\f$ form factor.
*/
vector<Energy2> _m12plus;
/**
* The mass \f$m_{\rm fit}^2\f$ \f$f_+(q^2)\f$ form factor.
*/
vector<Energy2> _mfit2plus;
/**
* The mass \f$(m_1)^2\f$ \f$f_T(q^2)\f$ form factor.
*/
vector<Energy2> _m12T;
/**
* The mass \f$m_{\rm fit}^2\f$ \f$f_T(q^2)\f$ form factor.
*/
vector<Energy2> _mfit2T;
//@}
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _thetaeta;
};
}
#endif /* HERWIG_BallZwickyScalarFormFactor_H */
diff --git a/Decay/FormFactors/BallZwickyVectorFormFactor.cc b/Decay/FormFactors/BallZwickyVectorFormFactor.cc
--- a/Decay/FormFactors/BallZwickyVectorFormFactor.cc
+++ b/Decay/FormFactors/BallZwickyVectorFormFactor.cc
@@ -1,675 +1,675 @@
// -*- C++ -*-
//
// BallZwickyVectorFormFactor.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the BallZwickyVectorFormFactor class.
//
#include "BallZwickyVectorFormFactor.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/ParticleData.h"
using namespace Herwig;
BallZwickyVectorFormFactor::BallZwickyVectorFormFactor()
: _Vr1(9), _Vr2(9), _A0r1(9), _A0r2(9), _A1r1(9), _A1r2(9),
_A2r1(9), _A2r2(9), _T1r1(9), _T1r2(9), _T2r1(9), _T2r2(9),
_T3r1(9), _T3r2(9), _VmR2(9), _Vmfit2(9), _A0mR2(9), _A0mfit2(9),
_A1mR2(9), _A1mfit2(9), _A2mR2(9), _A2mfit2(9), _T1mR2(9), _T1mfit2(9),
_T2mR2(9), _T2mfit2(9), _T3mR2(9), _T3mfit2(9) {
double ort(1./sqrt(2.));
// parameters for the different form-factors
// B to rho
addFormFactor(-521, 113,1,-2,5,2);
addFormFactor(-511, 113,1,-2,5,1);
addFormFactor(-511, 213,1,-2,5,2);
addFormFactor(-521, 213,1,-2,5,1);
for(unsigned int ix=0;ix<4;++ix) {
_Vr1[ix] = 1.045 ; _Vr2[ix] = -0.721;
_VmR2[ix] = sqr(5.32)*GeV2; _Vmfit2[ix] = 38.34*GeV2;
_A0r1[ix] = 1.527 ; _A0r2[ix] = -1.220;
_A0mR2[ix] = sqr(5.28)*GeV2; _A0mfit2[ix] = 33.36*GeV2;
_A1r1[ix] = 0.240 ; _A1r2[ix] = 0.;
_A1mR2[ix] = -1.0*GeV2 ; _A1mfit2[ix] = 37.51*GeV2;
_A2r1[ix] = 0.009 ; _A2r2[ix] = 0.212;
_A2mR2[ix] = -1.0*GeV2 ; _A2mfit2[ix] = 40.82*GeV2;
_T1r1[ix] = 0.897 ; _T1r2[ix] = -0.629;
_T1mR2[ix] = sqr(5.32)*GeV2; _T1mfit2[ix] = 38.04*GeV2;
_T2r1[ix] = 0.267 ; _T2r2[ix] = 0.;
_T2mR2[ix] = -1.0*GeV2 ; _T2mfit2[ix] = 38.59*GeV2;
_T3r1[ix] = 0.022 ; _T3r2[ix] = 0.245;
_T3mR2[ix] = -1.0*GeV2 ; _T3mfit2[ix] = 40.88*GeV2;
}
for(unsigned int ix=0;ix<2;++ix) {
double fact = ix==0 ? ort : -ort;
_Vr1[ix] *= fact; _Vr2[ix] *= fact;
_A0r1[ix] *= fact; _A0r2[ix] *= fact;
_A1r1[ix] *= fact; _A1r2[ix] *= fact;
_A2r1[ix] *= fact; _A2r2[ix] *= fact;
_T1r1[ix] *= fact; _T1r2[ix] *= fact;
_T2r1[ix] *= fact; _T2r2[ix] *= fact;
_T3r1[ix] *= fact; _T3r2[ix] *= fact;
}
// parameters for the B to K form-factors
addFormFactor(-521,-323,1,-2,5,3);
addFormFactor(-511,-313,1,-2,5,3);
for(unsigned int ix=4;ix<6;++ix) {
_Vr1[ix] = 0.923 ; _Vr2[ix] = -0.511;
_VmR2[ix] = sqr(5.32)*GeV2; _Vmfit2[ix] = 49.40*GeV2;
_A0r1[ix] = 1.364 ; _A0r2[ix] = -0.990;
_A0mR2[ix] = sqr(5.28)*GeV2; _A0mfit2[ix] = 36.78*GeV2;
_A1r1[ix] = 0.290 ; _A1r2[ix] = 0.0;
_A1mR2[ix] = -1.0*GeV2 ; _A1mfit2[ix] = 40.38*GeV2;
_A2r1[ix] = -0.084 ; _A2r2[ix] = 0.342;
_A2mR2[ix] = -1.0*GeV2 ; _A2mfit2[ix] = 52.00*GeV2;
_T1r1[ix] = 0.823 ; _T1r2[ix] = -0.491;
_T1mR2[ix] = sqr(5.32)*GeV2; _T1mfit2[ix] = 46.31*GeV2;
_T2r1[ix] = 0.333 ; _T2r2[ix] = 0.;
_T2mR2[ix] = -1.0*GeV2 ; _T2mfit2[ix] = 41.41*GeV2;
_T3r1[ix] = -0.036 ; _T3r2[ix] = 0.369;
_T3mR2[ix] = -1.0*GeV2 ; _T3mfit2[ix] = 48.10*GeV2;
}
// B to omega
addFormFactor(-521,223,1,-2,5,2);
_Vr1[6] = 1.006*ort ; _Vr2[6] = -0.713*ort;
_VmR2[6] = 5.32*5.32*GeV2; _Vmfit2[6] = 37.45*GeV2;
_A0r1[6] = 1.321*ort ; _A0r2[6] = -1.040*ort;
_A0mR2[6] = 5.28*5.28*GeV2; _A0mfit2[6] = 34.47*GeV2;
_A1r1[6] = 0.217*ort ; _A1r2[6] = 0.;
_A1mR2[6] = -1.0*GeV2 ; _A1mfit2[6] = 37.01*GeV2;
_A2r1[6] = 0.006*ort ; _A2r2[6] = 0.192*ort;
_A2mR2[6] = -1.0*GeV2 ; _A2mfit2[6] = 41.24*GeV2;
_T1r1[6] = 0.865*ort ; _T1r2[6] = -0.622*ort;
_T1mR2[6] = 5.32*5.32*GeV2; _T1mfit2[6] = 37.19*GeV2;
_T2r1[6] = 0.242*ort ; _T2r2[6] = 0.;
_T2mR2[6] = -1.0*GeV2 ; _T2mfit2[6] = 37.95*GeV2;
_T3r1[6] = 0.023*ort ; _T3r2[6] = 0.219*ort;
_T3mR2[6] = -1.0*GeV2 ; _T3mfit2[6] = 40.87*GeV2;
// B_s to K*
addFormFactor(-531,323,1,-3,5,2);
_Vr1[7] = 2.351 ; _Vr2[7] = -2.039;
_VmR2[7] = sqr(5.42)*GeV2; _Vmfit2[7] = 33.10*GeV2;
_A0r1[7] = 2.813 ; _A0r2[7] = -2.450;
_A0mR2[7] = sqr(5.37)*GeV2; _A0mfit2[7] = 31.58*GeV2;
_A1r1[7] = 0.231 ; _A1r2[7] = 0.;
_A1mR2[7] = -1.0*GeV2 ; _A1mfit2[7] = 32.94*GeV2;
_A2r1[7] = -0.011 ; _A2r2[7] = 0.192;
_A2mR2[7] = -1.0*GeV2 ; _A2mfit2[7] = 40.14*GeV2;
_T1r1[7] = 2.047 ; _T1r2[7] = -1.787;
_T1mR2[7] = sqr(5.42)*GeV2; _T1mfit2[7] = 32.83*GeV2;
_T2r1[7] = 0.260 ; _T2r2[7] = 0.;
_T2mR2[7] = -1.0*GeV2 ; _T2mfit2[7] = 33.01*GeV2;
_T3r1[7] = 0.043 ; _T3r2[7] = 0.217;
_T3mR2[7] = -1.0*GeV2 ; _T3mfit2[7] = 39.38*GeV2;
// B_s to phi
addFormFactor(-531,333,1,-3,5,3);
_Vr1[8] = 1.484 ; _Vr2[8] = -1.049;
_VmR2[8] = sqr(5.42)*GeV2; _Vmfit2[8] = 39.52*GeV2;
_A0r1[8] = 3.310 ; _A0r2[8] = -2.835;
_A0mR2[8] = sqr(5.37)*GeV2; _A0mfit2[8] = 31.57*GeV2;
_A1r1[8] = 0.308 ; _A1r2[8] = 0.;
_A1mR2[8] = -1.0*GeV2 ; _A1mfit2[8] = 36.54*GeV2;
_A2r1[8] = -0.054 ; _A2r2[8] = 0.288;
_A2mR2[8] = -1.0*GeV2 ; _A2mfit2[8] = 48.94*GeV2;
_T1r1[8] = 1.303 ; _T1r2[8] = -0.954;
_T1mR2[8] = sqr(5.42)*GeV2; _T1mfit2[8] = 38.28*GeV2;
_T2r1[8] = 0.349 ; _T2r2[8] = 0.;
_T2mR2[8] = -1.0*GeV2 ; _T2mfit2[8] = 37.21*GeV2;
_T3r1[8] = 0.027 ; _T3r2[8] = 0.322;
_T3mR2[8] = -1.0*GeV2 ; _T3mfit2[8] = 45.56*GeV2;
initialModes(numberOfFactors());
// cut-off parameter
_cutoff=0.01*GeV2;
}
void BallZwickyVectorFormFactor::doinit() {
ScalarFormFactor::doinit();
unsigned int isize(numberOfFactors());
if(isize!=_Vr1.size()||isize!=_Vr2.size()||isize!=_A0r1.size()||isize!=_A0r2.size()||
isize!=_A1r1.size()||isize!=_A1r2.size()||isize!=_A2r1.size()||isize!=_A2r2.size()||
isize!=_T1r1.size()||isize!=_T1r2.size()||isize!=_T2r1.size()||isize!=_T2r2.size()||
isize!=_T3r1.size()||isize!=_T3r2.size()||isize!=_VmR2.size()||
isize!=_Vmfit2.size()||isize!=_A0mR2.size()||isize!=_A0mfit2.size()||
isize!=_A1mR2.size()||isize!=_A1mfit2.size()||isize!=_A2mR2.size()||
isize!=_A2mfit2.size()||isize!=_T1mR2.size()||isize!=_T1mfit2.size()||
isize!=_T2mR2.size()||isize!=_T2mfit2.size()||isize!=_T3mR2.size()||
isize!=_T3mfit2.size())
throw InitException() << "Inconsistent parameters in "
<< "BallZwickyScalarFormFactor::doinit()"
<< Exception::abortnow;
// output some graphs to check the answers
// int id0,id1;
// unsigned int iz;
// Energy m0,m1;
// Energy2 q2,step(14./100.*GeV2);
// tcPDPtr in,out;
// Complex A0,A1,A2,V;
// ofstream output("Ball.top");
// for(unsigned int ix=0;ix<numberOfFactors();++ix) {
// particleID(ix,id0,id1);
// in = getParticleData(id0);
// m0=in->mass();
// out= getParticleData(id1);
// m1=out->mass();
// output << "new frame " << endl;
// output << "newdef font duplex" << endl;
// output << "title top \"" << in->PDGName() << " to " << out->PDGName()
// << " vector form factors \"" << endl;
// output << "newdef limits x 0 14. y 0 1" << endl;
// double rt(sqrt(2.));
// for(iz=0;iz<4;++iz) {
// q2=ZERO;
// for( ;q2<14.*GeV2+step;q2+=step) {
// ScalarVectorFormFactor(q2,ix,id0,id1,m0,m1,A0,A1,A2,V);
// if(id1==113||id1==223) {
// if((abs(id0)%100)/10==1) {
// A0*=-rt;
// A1*=-rt;
// A2*=-rt;
// V *=-rt;
// }
// else {
// A0*=rt;
// A1*=rt;
// A2*=rt;
// V*=rt;
// }
// }
// if(iz==0) output << q2/GeV2 << " " << A0.real() << endl;
// else if(iz==1) output << q2/GeV2 << " " << A1.real() << endl;
// else if(iz==2) output << q2/GeV2 << " " << A2.real() << endl;
// else if(iz==3) output << q2/GeV2 << " " << V.real() << endl;
// }
// if(iz==0) output << "join red" << endl;
// else if(iz==1) output << "join blue" << endl;
// else if(iz==2) output << "join green" << endl;
// else if(iz==3) output << "join yellow" << endl;
// }
// output << "new frame " << endl;
// output << "newdef font duplex" << endl;
// output << "title top \"" << in->PDGName() << " to " << out->PDGName()
// << " penguin form factors\" " << endl;
// output << "newdef limits x 0 14. y 0 1" << endl;
// for(iz=0;iz<3;++iz) {
// q2=ZERO;
// for( ;q2<14.*GeV2+step;q2+=step) {
// ScalarVectorSigmaFormFactor(q2,ix,id0,id1,m0,m1,A0,A1,A2);
// if(id1==113||id1==223) {
// if((abs(id0)%100)/10==1) {
// A0*=-rt;
// A1*=-rt;
// A2*=-rt;
// }
// else {
// A0*=rt;
// A1*=rt;
// A2*=rt;
// }
// }
// if(iz==0) output << q2/GeV2 << " " << A0.real() << endl;
// else if(iz==1) output << q2/GeV2 << " " << A1.real() << endl;
// else if(iz==2) output << q2/GeV2 << " " << A2.real() << endl;
// }
// if(iz==0){output << "join red" << endl;}
// else if(iz==1){output << "join blue" << endl;}
// else if(iz==2){output << "join green" << endl;}
// }
// }
}
void BallZwickyVectorFormFactor::persistentOutput(PersistentOStream & os) const {
os << _Vr1 << _Vr2 << _A0r1 << _A0r2 << _A1r1 << _A1r2 << _A2r1 << _A2r2 << _T1r1
<< _T1r2 << _T2r1 << _T2r2 << _T3r1 << _T3r2
<< ounit(_VmR2,GeV2) << ounit(_Vmfit2,GeV2) << ounit(_A0mR2,GeV2)
<< ounit(_A0mfit2,GeV2) << ounit(_A1mR2,GeV2) << ounit(_A1mfit2,GeV2)
<< ounit(_A2mR2,GeV2) << ounit(_A2mfit2,GeV2) << ounit(_T1mR2,GeV2)
<< ounit(_T1mfit2,GeV2) << ounit(_T2mR2,GeV2) << ounit(_T2mfit2,GeV2)
<< ounit(_T3mR2,GeV2) << ounit(_T3mfit2,GeV2) << ounit(_cutoff,GeV2);
}
void BallZwickyVectorFormFactor::persistentInput(PersistentIStream & is, int) {
is >> _Vr1 >> _Vr2 >> _A0r1 >> _A0r2 >> _A1r1 >> _A1r2 >> _A2r1 >> _A2r2 >> _T1r1
>> _T1r2 >> _T2r1 >> _T2r2 >> _T3r1 >> _T3r2
>> iunit(_VmR2,GeV2) >> iunit(_Vmfit2,GeV2) >> iunit(_A0mR2 ,GeV2)
>> iunit(_A0mfit2,GeV2) >> iunit(_A1mR2,GeV2) >> iunit(_A1mfit2,GeV2)
>> iunit(_A2mR2,GeV2) >> iunit(_A2mfit2,GeV2) >> iunit(_T1mR2,GeV2)
>> iunit(_T1mfit2,GeV2) >> iunit(_T2mR2,GeV2) >> iunit(_T2mfit2,GeV2)
>> iunit(_T3mR2,GeV2) >> iunit(_T3mfit2,GeV2) >> iunit(_cutoff,GeV2);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<BallZwickyVectorFormFactor,ScalarFormFactor>
describeHerwigBallZwickyVectorFormFactor("Herwig::BallZwickyVectorFormFactor", "HwFormFactors.so");
void BallZwickyVectorFormFactor::Init() {
static ClassDocumentation<BallZwickyVectorFormFactor> documentation
("The BallZwickyVectorFormFactor class implements the vector form"
" factors of hep-ph/0412079 for the form-factor for the decay of a B-meson to a"
" light pseudoscalar meson",
"The form factors of \\cite{Ball:2004rg} for $B_{d,s}\\to\\rho,\\omega,K^*,\\phi$"
" were used.",
"\\bibitem{Ball:2004rg} P.~Ball and R.~Zwicky, \n"
"Phys.\\ Rev.\\ D {\\bf 71} (2005) 014029 [arXiv:hep-ph/0412079].\n"
"%%CITATION = PHRVA,D71,014029;%%\n");
static ParVector<BallZwickyVectorFormFactor,double> interfaceVr_1
("Vr_1",
"The r_1 coefficient for the V form-factor",
&BallZwickyVectorFormFactor::_Vr1,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceVr_2
("Vr_2",
"The r_2 coefficient for the V form-factor",
&BallZwickyVectorFormFactor::_Vr2,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceA0r_1
("A0r_1",
"The r_1 coefficient for the A_0 form-factor",
&BallZwickyVectorFormFactor::_A0r1,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceA0r_2
("A0r_2",
"The r_2 coefficient for the A_0 form-factor",
&BallZwickyVectorFormFactor::_A0r2,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceA1r_1
("A1r_1",
"The r_1 coefficient for the A_1 form-factor",
&BallZwickyVectorFormFactor::_A1r1,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceA1r_2
("A1r_2",
"The r_2 coefficient for the A_1 form-factor",
&BallZwickyVectorFormFactor::_A1r2,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceA2r_1
("A2r_1",
"The r_1 coefficient for the A_2 form-factor",
&BallZwickyVectorFormFactor::_A2r1,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceA2r_2
("A2r_2",
"The r_2 coefficient for the A_2 form-factor",
&BallZwickyVectorFormFactor::_A2r2,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceT1r_1
("T1r_1",
"The r_1 coefficient for the T_1 form-factor",
&BallZwickyVectorFormFactor::_T1r1,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceT1r_2
("T1r_2",
"The r_2 coefficient for the T_1 form-factor",
&BallZwickyVectorFormFactor::_T1r2,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceT2r_1
("T2r_1",
"The r_1 coefficient for the T_2 form-factor",
&BallZwickyVectorFormFactor::_T2r1,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceT2r_2
("T2r_2",
"The r_2 coefficient for the T_2 form-factor",
&BallZwickyVectorFormFactor::_T2r2,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceT3r_1
("T3r_1",
"The r_1 coefficient for the T_3 form-factor",
&BallZwickyVectorFormFactor::_T3r1,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,double> interfaceT3r_2
("T3r_2",
"The r_2 coefficient for the T_3 form-factor",
&BallZwickyVectorFormFactor::_T3r2,
0, 0, 0, -10., 10., false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceVmR2
("VmR2",
"The value of m_R^2 for the V form-factor",
&BallZwickyVectorFormFactor::_VmR2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceVmfit2
("Vmfit2",
"The value of m_fit^2 for the V form-factor",
&BallZwickyVectorFormFactor::_Vmfit2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceA0mR2
("A0mR2",
"The value of m_R^2 for the A_0 form-factor",
&BallZwickyVectorFormFactor::_A0mR2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceA0mfit2
("A0mfit2",
"The value of m_fit^2 for the A_0 form-factor",
&BallZwickyVectorFormFactor::_A0mfit2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceA1mR2
("A1mR2",
"The value of m_R^2 for the A_1 form-factor",
&BallZwickyVectorFormFactor::_A1mR2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceA1mfit2
("A1mfit2",
"The value of m_fit^2 for the A_1 form-factor",
&BallZwickyVectorFormFactor::_A1mfit2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceA2mR2
("A2mR2",
"The value of m_R^2 for the A_2 form-factor",
&BallZwickyVectorFormFactor::_A2mR2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceA2mfit2
("A2mfit2",
"The value of m_fit^2 for the A_2 form-factor",
&BallZwickyVectorFormFactor::_A2mfit2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceT1mR2
("T1mR2",
"The value of m_R^2 for the T_1 form-factor",
&BallZwickyVectorFormFactor::_T1mR2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceT1mfit2
("T1mfit2",
"The value of m_fit^2 for the T_1 form-factor",
&BallZwickyVectorFormFactor::_T1mfit2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceT2mR2
("T2mR2",
"The value of m_R^2 for the T_2 form-factor",
&BallZwickyVectorFormFactor::_T2mR2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceT2mfit2
("T2mfit2",
"The value of m_fit^2 for the T_2 form-factor",
&BallZwickyVectorFormFactor::_T2mfit2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceT3mR2
("T3mR2",
"The value of m_R^2 for the T_3 form-factor",
&BallZwickyVectorFormFactor::_T3mR2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static ParVector<BallZwickyVectorFormFactor,Energy2> interfaceT3mfit2
("T3mfit2",
"The value of m_fit^2 for the T_3 form-factor",
&BallZwickyVectorFormFactor::_T3mfit2,
GeV2, -1, 25.*GeV2, -2.*GeV2, 100.*GeV2, false, false, true);
static Parameter<BallZwickyVectorFormFactor,Energy2> interfaceCutOff
("CutOff",
"Parameter controlling the value of q^2 where we switch from the fit "
"to a small q^2 expansion for numerical stability.",
&BallZwickyVectorFormFactor::_cutoff, GeV2, 2.0*GeV2, ZERO, 10.0*GeV2,
false, false, true);
}
// form-factor for scalar to vector
void BallZwickyVectorFormFactor::ScalarVectorFormFactor(Energy2 q2,unsigned int mode,
int,int,Energy,
Energy,
Complex & A0,Complex & A1,
Complex & A2,Complex & V) const {
useMe();
// the form-factors
// A_0
if(_A0mR2[mode]<ZERO) {
A0 = (_A0r1[mode]+_A0r2[mode]/(1.-q2/_A0mfit2[mode]))/(1.-q2/_A0mfit2[mode]);
}
else {
A0 = _A0r1[mode]/(1.-q2/_A0mR2[mode])+_A0r2[mode]/(1.-q2/_A0mfit2[mode]);
}
// A_1
if(_A1mR2[mode]<ZERO) {
A1 = (_A1r1[mode]+_A1r2[mode]/(1.-q2/_A1mfit2[mode]))/(1.-q2/_A1mfit2[mode]);
}
else {
A1 = _A1r1[mode]/(1.-q2/_A1mR2[mode])+_A1r2[mode]/(1.-q2/_A1mfit2[mode]);
}
// A_2
if(_A2mR2[mode]<ZERO) {
A2 = (_A2r1[mode]+_A2r2[mode]/(1.-q2/_A2mfit2[mode]))/(1.-q2/_A2mfit2[mode]);
}
else {
A2 = _A2r1[mode]/(1.-q2/_A2mR2[mode])+_A2r2[mode]/(1.-q2/_A2mfit2[mode]);
}
// V
if(_VmR2[mode]<ZERO) {
V = (_Vr1[mode]+_Vr2[mode]/(1.-q2/_Vmfit2[mode]))/(1.-q2/_Vmfit2[mode]);
}
else {
V = _Vr1[mode]/(1.-q2/_VmR2[mode])+_Vr2[mode]/(1.-q2/_Vmfit2[mode]);
}
}
void BallZwickyVectorFormFactor::ScalarVectorSigmaFormFactor(Energy2 q2,
unsigned int mode,int,
int,Energy m0,Energy m1,
Complex & T1,Complex & T2,
Complex & T3) const {
useMe();
// T_1
if(_T1mR2[mode]<ZERO) {
T1 = (_T1r1[mode]+_T1r2[mode]/(1.-q2/_T1mfit2[mode]))/(1.-q2/_T1mfit2[mode]);
}
else {
T1 = _T1r1[mode]/(1.-q2/_T1mR2[mode])+_T1r2[mode]/(1.-q2/_T1mfit2[mode]);
}
// T_2
if(_T2mR2[mode]<ZERO) {
T2 = (_T2r1[mode]+_T2r2[mode]/(1.-q2/_T2mfit2[mode]))/(1.-q2/_T2mfit2[mode]);
}
else {
T2 = _T2r1[mode]/(1.-q2/_T2mR2[mode])+_T2r2[mode]/(1.-q2/_T2mfit2[mode]);
}
// T_3
if(q2>_cutoff) {
if(_T3mR2[mode]<ZERO) {
T3 = (_T3r1[mode]+_T3r2[mode]/(1.-q2/_T3mfit2[mode]))/(1.-q2/_T3mfit2[mode]);
}
else {
T3 = _T3r1[mode]/(1.-q2/_T3mR2[mode])+_T3r2[mode]/(1.-q2/_T3mfit2[mode]);
}
// convert for T_3tilde to T_3
- T3 = (m0*m0-m1*m1)/q2*(T3-T2);
+ T3 = Complex((m0*m0-m1*m1)/q2*(T3-T2));
}
else {
InvEnergy2 smallT2,smallT3;
if(_T2mR2[mode]<ZERO) {
double a(q2/_T2mfit2[mode]);
smallT2=1./_T2mfit2[mode]*
(_T2r1[mode]+2.*_T2r2[mode]+a*(_T2r1[mode]+3.*_T2r2[mode]+
a*(_T2r1[mode]+4.*_T2r2[mode]+
a*(_T2r1[mode]+5.*_T2r2[mode]))));
}
else {
smallT2=(_T2r1[mode]/_T2mR2[mode]+_T2r2[mode]/_T2mfit2[mode])
+q2*(+_T2r1[mode]/_T2mR2[mode]/_T2mR2[mode]
+_T2r2[mode]/_T2mfit2[mode]/_T2mfit2[mode])
+q2*q2*(+_T2r1[mode]/_T2mR2[mode]/_T2mR2[mode]/_T2mR2[mode]
+_T2r2[mode]/_T2mfit2[mode]/_T2mfit2[mode]/_T2mfit2[mode]);
}
if(_T3mR2[mode]<ZERO) {
double a(q2/_T3mfit2[mode]);
smallT3=1./_T3mfit2[mode]*
(_T3r1[mode]+2.*_T3r2[mode]+a*(_T3r1[mode]+3.*_T3r2[mode]+
a*(_T3r1[mode]+4.*_T3r2[mode]+
a*(_T3r1[mode]+5.*_T3r2[mode]))));
}
else {
smallT3=(_T3r1[mode]/_T3mR2[mode]+_T3r2[mode]/_T3mfit2[mode])
+q2*(+_T3r1[mode]/_T3mR2[mode]/_T3mR2[mode]
+_T3r2[mode]/_T3mfit2[mode]/_T3mfit2[mode])
+q2*q2*(+_T3r1[mode]/_T3mR2[mode]/_T3mR2[mode]/_T3mR2[mode]
+_T3r2[mode]/_T3mfit2[mode]/_T3mfit2[mode]/_T3mfit2[mode]);
}
T3 = (m0+m1)*(m0-m1)*(smallT3-smallT2);
}
}
void BallZwickyVectorFormFactor::dataBaseOutput(ofstream & output,bool header,
bool create) const {
if(header) output << "update decayers set parameters=\"";
if(create) output << "create Herwig::BallZwickyVectorFormFactor "
<< name() << " \n";
output << "newdef " << name() << ":CutOff " << _cutoff/GeV2 << "\n";
for(unsigned int ix=0;ix<_Vr1.size();++ix) {
if(ix<initialModes()) {
output << "newdef " << name() << ":Vr_1 " << ix << " "
<< _Vr1[ix] << "\n";
output << "newdef " << name() << ":Vr_2 " << ix << " "
<< _Vr2[ix] << "\n";
output << "newdef " << name() << ":A0r_1 " << ix << " "
<< _A0r1[ix] << "\n";
output << "newdef " << name() << ":A0r_2 " << ix << " "
<< _A0r2[ix] << "\n";
output << "newdef " << name() << ":A1r_1 " << ix << " "
<< _A1r1[ix] << "\n";
output << "newdef " << name() << ":A1r_2 " << ix << " "
<< _A1r2[ix] << "\n";
output << "newdef " << name() << ":A2r_1 " << ix << " "
<< _A2r1[ix] << "\n";
output << "newdef " << name() << ":A2r_2 " << ix << " "
<< _A2r2[ix] << "\n";
output << "newdef " << name() << ":T1r_1 " << ix << " "
<< _T1r1[ix] << "\n";
output << "newdef " << name() << ":T1r_2 " << ix << " "
<< _T1r2[ix] << "\n";
output << "newdef " << name() << ":T2r_1 " << ix << " "
<< _T2r1[ix] << "\n";
output << "newdef " << name() << ":T2r_2 " << ix << " "
<< _T2r2[ix] << "\n";
output << "newdef " << name() << ":T3r_1 " << ix << " "
<< _T3r1[ix] << "\n";
output << "newdef " << name() << ":T3r_2 " << ix << " "
<< _T3r2[ix] << "\n";
output << "newdef " << name() << ":VmR2 " << ix
<< " " << _VmR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":Vmfit2 " << ix
<< " " << _Vmfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A0mR2 " << ix
<< " " << _A0mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A0mfit2 " << ix
<< " " << _A0mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A1mR2 " << ix
<< " " << _A1mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A1mfit2 " << ix
<< " " << _A1mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A2mR2 " << ix
<< " " << _A2mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A2mfit2 " << ix
<< " " << _A2mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T1mR2 " << ix
<< " " << _T1mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T1mfit2 " << ix
<< " " << _T1mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T2mR2 " << ix
<< " " << _T2mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T2mfit2 " << ix
<< " " << _T2mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T3mR2 " << ix
<< " " << _T3mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T3mfit2 " << ix
<< " " << _T3mfit2[ix]/GeV2 << "\n";
}
else {
output << "newdef " << name() << ":Vr_1 " << ix << " "
<< _Vr1[ix] << "\n";
output << "newdef " << name() << ":Vr_2 " << ix << " "
<< _Vr2[ix] << "\n";
output << "newdef " << name() << ":A0r_1 " << ix << " "
<< _A0r1[ix] << "\n";
output << "newdef " << name() << ":A0r_2 " << ix << " "
<< _A0r2[ix] << "\n";
output << "newdef " << name() << ":A1r_1 " << ix << " "
<< _A1r1[ix] << "\n";
output << "newdef " << name() << ":A1r_2 " << ix << " "
<< _A1r2[ix] << "\n";
output << "newdef " << name() << ":A2r_1 " << ix << " "
<< _A2r1[ix] << "\n";
output << "newdef " << name() << ":A2r_2 " << ix << " "
<< _A2r2[ix] << "\n";
output << "newdef " << name() << ":T1r_1 " << ix << " "
<< _T1r1[ix] << "\n";
output << "newdef " << name() << ":T1r_2 " << ix << " "
<< _T1r2[ix] << "\n";
output << "newdef " << name() << ":T2r_1 " << ix << " "
<< _T2r1[ix] << "\n";
output << "newdef " << name() << ":T2r_2 " << ix << " "
<< _T2r2[ix] << "\n";
output << "newdef " << name() << ":T3r_1 " << ix << " "
<< _T3r1[ix] << "\n";
output << "newdef " << name() << ":T3r_2 " << ix << " "
<< _T3r2[ix] << "\n";
output << "newdef " << name() << ":VmR2 " << ix
<< " " << _VmR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":Vmfit2 " << ix
<< " " << _Vmfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A0mR2 " << ix
<< " " << _A0mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A0mfit2 " << ix
<< " " << _A0mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A1mR2 " << ix
<< " " << _A1mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A1mfit2 " << ix
<< " " << _A1mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A2mR2 " << ix
<< " " << _A2mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":A2mfit2 " << ix
<< " " << _A2mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T1mR2 " << ix
<< " " << _T1mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T1mfit2 " << ix
<< " " << _T1mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T2mR2 " << ix
<< " " << _T2mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T2mfit2 " << ix
<< " " << _T2mfit2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T3mR2 " << ix
<< " " << _T3mR2[ix]/GeV2 << "\n";
output << "newdef " << name() << ":T3mfit2 " << ix
<< " " << _T3mfit2[ix]/GeV2 << "\n";
}
}
ScalarFormFactor::dataBaseOutput(output,false,false);
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/FormFactors/BallZwickyVectorFormFactor.h b/Decay/FormFactors/BallZwickyVectorFormFactor.h
--- a/Decay/FormFactors/BallZwickyVectorFormFactor.h
+++ b/Decay/FormFactors/BallZwickyVectorFormFactor.h
@@ -1,303 +1,303 @@
// -*- C++ -*-
//
// BallZwickyVectorFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_BallZwickyVectorFormFactor_H
#define HERWIG_BallZwickyVectorFormFactor_H
//
// This is the declaration of the BallZwickyVectorFormFactor class.
//
#include "ScalarFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The BallZwickyVectorFormFactor class implements the form-factors
* of hep-ph/0412079 for the B meson to light vector mesons.
*
* This class is one of the few which includes the penguin form factors in addition
* to the standard weak decay form factors.
*
* @see ScalarFormFactor
* @see BallZwickyScalarFormFactor
*/
class BallZwickyVectorFormFactor: public ScalarFormFactor {
public:
/**
* Default constructor
*/
BallZwickyVectorFormFactor();
/** @name Form-Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a vector.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param A0 The form factor \f$A_0\f$
* @param A1 The form factor \f$A_1\f$
* @param A2 The form factor \f$A_2\f$
* @param V The form factor \f$V\f$
*/
void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1,Complex & A0,
Complex & A1,Complex & A2, Complex & V) const;
/**
* The form factor for the weak penguin decay of a scalar meson to a vector meson.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param T1 The form factor \f$T_1\f$.
* @param T2 The form factor \f$T_2\f$.
* @param T3 The form factor \f$T_3\f$.
*/
void ScalarVectorSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0, Energy m1, Complex & T1,
Complex & T2, Complex & T3) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- BallZwickyVectorFormFactor & operator=(const BallZwickyVectorFormFactor &);
+ BallZwickyVectorFormFactor & operator=(const BallZwickyVectorFormFactor &) = delete;
private:
/** @name Coefficients for the form factors.*/
//@{
/**
* The coefficient \f$r_1\f$ for the \f$V(q^2)\f$ form factor.
*/
vector<double> _Vr1;
/**
* The coefficient \f$r_2\f$ for the \f$V(q^2)\f$ form factor.
*/
vector<double> _Vr2;
/**
* The coefficient \f$r_1\f$ for the \f$A_0(q^2)\f$ form factor.
*/
vector<double> _A0r1;
/**
* The coefficient \f$r_2\f$ for the \f$A_0(q^2)\f$ form factor.
*/
vector<double> _A0r2;
/**
* The coefficient \f$r_1\f$ for the \f$A_1(q^2)\f$ form factor.
*/
vector<double> _A1r1;
/**
* The coefficient \f$r_2\f$ for the \f$A_1(q^2)\f$ form factor.
*/
vector<double> _A1r2;
/**
* The coefficient \f$r_1\f$ for the \f$A_2(q^2)\f$ form factor.
*/
vector<double> _A2r1;
/**
* The coefficient \f$r_2\f$ for the \f$A_2(q^2)\f$ form factor.
*/
vector<double> _A2r2;
/**
* The coefficient \f$r_1\f$ for the \f$T_1(q^2)\f$ form factor.
*/
vector<double> _T1r1;
/**
* The coefficient \f$r_2\f$ for the \f$T_1(q^2)\f$ form factor.
*/
vector<double> _T1r2;
/**
* The coefficient \f$r_1\f$ for the \f$T_2(q^2)\f$ form factor.
*/
vector<double> _T2r1;
/**
* The coefficient \f$r_2\f$ for the \f$T_2(q^2)\f$ form factor.
*/
vector<double> _T2r2;
/**
* The coefficient \f$r_1\f$ for the \f$\tilde{T}_3(q^2)\f$ form factor.
*/
vector<double> _T3r1;
/**
* The coefficient \f$r_2\f$ for the \f$\tilde{T}_3(q^2)\f$ form factor.
*/
vector<double> _T3r2;
// the constants for the form-factors
//@}
/** @name Masses for the form factors.*/
//@{
/**
* The mass \f$m_R^2\f$ for the \f$V(q^2)\f$ form factor.
*/
vector<Energy2> _VmR2;
/**
* The mass \f$m_{\rm fit}^2\f$ for the \f$V(q^2)\f$ form factor.
*/
vector<Energy2> _Vmfit2;
/**
* The mass \f$m_R^2\f$ for the \f$A_0(q^2)\f$ form factor.
*/
vector<Energy2> _A0mR2;
/**
* The mass \f$m_{\rm fit}^2\f$ for the \f$A_0(q^2)\f$ form factor.
*/
vector<Energy2> _A0mfit2;
/**
* The mass \f$m_R^2\f$ for the \f$A_1(q^2)\f$ form factor.
*/
vector<Energy2> _A1mR2;
/**
* The mass \f$m_{\rm fit}^2\f$ for the \f$A_1(q^2)\f$ form factor.
*/
vector<Energy2> _A1mfit2;
/**
* The mass \f$m_R^2\f$ for the \f$A_2(q^2)\f$ form factor.
*/
vector<Energy2> _A2mR2;
/**
* The mass \f$m_{\rm fit}^2\f$ for the \f$A_2(q^2)\f$ form factor.
*/
vector<Energy2> _A2mfit2;
/**
* The mass \f$m_R^2\f$ for the \f$T_1(q^2)\f$ form factor.
*/
vector<Energy2> _T1mR2;
/**
* The mass \f$m_{\rm fit}^2\f$ for the \f$T_1(q^2)\f$ form factor.
*/
vector<Energy2> _T1mfit2;
/**
* The mass \f$m_R^2\f$ for the \f$T_2(q^2)\f$ form factor.
*/
vector<Energy2> _T2mR2;
/**
* The mass \f$m_{\rm fit}^2\f$ for the \f$T_2(q^2)\f$ form factor.
*/
vector<Energy2> _T2mfit2;
/**
* The mass \f$m_R^2\f$ for the \f$\tilde{T}_3(q^2)\f$ form factor.
*/
vector<Energy2> _T3mR2;
/**
* The mass \f$m_{\rm fit}^2\f$ for the \f$\tilde{T}_3(q^2)\f$ form factor.
*/
vector<Energy2> _T3mfit2;
// the masses for the form-factors
//@}
/**
* Cut-off parameter for the switch to a small \f$q^2\f$ expansion for the \f$T_3\f$
* form factor.
*/
Energy2 _cutoff;
};
}
#endif /* HERWIG_BallZwickyVectorFormFactor_H */
diff --git a/Decay/FormFactors/BaryonFormFactor.h b/Decay/FormFactors/BaryonFormFactor.h
--- a/Decay/FormFactors/BaryonFormFactor.h
+++ b/Decay/FormFactors/BaryonFormFactor.h
@@ -1,393 +1,393 @@
// -*- C++ -*-
#ifndef HERWIG_BaryonFormFactor_H
#define HERWIG_BaryonFormFactor_H
//
// This is the declaration of the BaryonFormFactor class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "BaryonFormFactor.fh"
#include "ThePEG/Config/Complex.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
* The BaryonFormFactor class is the base class for the implementation
* of the form-factors for the weak decay of a baryon.
*
* This is designed so that the form factors can be used for both the semi-leptonic
* decays and using factorization for hadronic weak decays.
*
* The form factors are given below for the decay \f$X(p_0)\to Y(p_1)\f$ with
* \f$q_\mu=(p_0-p_1)_\mu\f$.
*
*
* The form-factors are defined to be
*
* \f[\bar{u}(p_1) \left[ \gamma^\mu \left(F^V_1+F^A_1 \gamma_5\right)
* +\frac{i}{(m_0+m_1)}\sigma_{\mu\nu}q^\nu\left(F^V_2+F^A_2\gamma_5\right)
* +\frac1{(m_0+m_1)}q^\mu\left(F^V_3+F^A_3\gamma_5\right)\right] u(p_0) \f]
*
* for the \f$\frac12\to\frac12\f$ transition and
*
* \f[\bar{u}^\alpha(p_1) \left[ g_{\alpha\mu}\left(G^V_1+G^A_1 \gamma_5\right)
* +\frac1{(m_0+m_1)}p_{0\alpha}\gamma_\mu\left(G^V_2+G^A_2\gamma_5\right)
* +\frac1{(m_0+m_1)^2}p_{0\alpha}p_{1\mu}\left(G^V_3+G^A_3\gamma_5\right)\right.\f]
* \f[ \left.
* +\frac1{(m_0+m_1)^2}p_{0\alpha}q_\mu\left(G^V_4+G^A_4\gamma_5\right)\right]
* \gamma_5 u(p_0)
* \f]
* for the \f$\frac12\to\frac32\f$ transition.
*
* These definitions differ from those in the liturature because we have divided some
* terms by the sum of the baryon masses to ensure that the form-factors are all
* dimensionless.
*
* In many applications, particularly for the decay of baryons containing a heavy
* quark, an alternative version of the form factors in terms of the velocities
* of the baryons is used. This form is
*
* \f[\bar{u}(v') \left[ \gamma^\mu \left(F_1-G_1 \gamma_5\right)
* v^\mu \left(F_2-G_2 \gamma_5\right)
* {v'}^\mu \left(F_3-G_3\gamma_5\right)\right] u(v) \f]
*
* for the \f$\frac12\to\frac12\f$ transition and
*
* \f[\bar{u}^\alpha(v') \left[ v_\alpha\gamma_\mu\left(N_1-K_1 \gamma_5\right)
* +v_\alpha v^\mu \left(N_2-K_2 \gamma_5\right)
* +v_\alpha {v'}^\mu \left(N_3-K_3 \gamma_5\right)
* +g_\alpha^\mu \left(N_4-K_4 \gamma_5\right)\right]
* \gamma_5 u(v)
* \f]
* for the \f$\frac12\to\frac32\f$ transition.
*
* In terms of these form factors the form factors we use are
*
* \f[F^V_1= F_1+\frac12(m_0+m_1)\left(\frac{F_2}{m_0}+\frac{F_3}{m_1}\right)\f]
* \f[F^V_2=\frac12(m_0+m_1)\left(\frac{F_2}{m_0}+\frac{F_3}{m_1}\right)\f]
* \f[F^V_3=\frac12(m_0+m_1)\left(\frac{F_2}{m_0}-\frac{F_3}{m_1}\right)\f]
* \f[F^A_1=-G_1+\frac12(m_0-m_1)\left(\frac{G_2}{m_0}+\frac{G_3}{m_1}\right)\f]
* \f[F^A_2=-\frac12(m_0+m_1)\left(\frac{G_2}{m_0}+\frac{G_3}{m_1}\right)\f]
* \f[F^A_3=\frac12(m_0+m_1)\left(-\frac{G_2}{m_0}+\frac{G_3}{m_1}\right)\f]
*
* for the \f$\frac12\to\frac12\f$ transition and
*
* \f[G_1^V = N_4\f]
* \f[G_2^V = N_1\frac{(m_0+m_1)}{m_0}\f]
* \f[G_3^V = \frac{(m_0+m_1)^2}{m_0}\left(\frac{N_2}{m_0}+\frac{N_3}{m_1}\right)\f]
* \f[G_4^V = N_2\frac{(m_0+m_1)^2}{m^2_0}\f]
* \f[G_1^A =-K_4\f]
* \f[G_2^A =-K_1\frac{(m_0+m_1)}{m_0}\f]
* \f[G_3^A =-\frac{(m_0+m_1)^2}{m_0}\left(\frac{K_2}{m_0}+\frac{K_3}{m_1}\right)\f]
* \f[G_4^A =-K_2\frac{(m_0+m_1)^2}{m^2_0}\f]
*
* for the \f$\frac12\to\frac32\f$ transition.
*
*
* @see ScalarFormFactor
*
*/
class BaryonFormFactor: public Interfaced {
public:
/**
* Default constructor
*/
BaryonFormFactor() : _numbermodes() {}
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
public:
/** @name Functions to give information about the form factors available. */
//@{
/**
* Find the location for a given pair of particle.
* \param in PDG code for the incoming baryon.
* \param out PDG code for the outgoing baryon.
* \param cc particles or charge conjugates stored in form factor.
* @return The location in the vectors storing the data.
*/
int formFactorNumber(int in,int out,bool & cc) const {
int output(-1);
unsigned int ix(0);
if(_incomingid.size()==0){return output;}
do {
if(_incomingid[ix]== in && _outgoingid[ix]== out) {
cc=false;
output=ix;
}
else if (_incomingid[ix]==-in && _outgoingid[ix]==-out) {
cc=true;
output=ix;
}
++ix;
}
while(ix<_incomingid.size()&&output<0);
return output;
}
/**
* Get the particle ids for an entry.
* @param iloc The location in the list.
* @param id0 The PDG code for the incoming baryon.
* @param id1 The PDG code for the outgoing baryon.
*/
void particleID(int iloc,int& id0,int& id1) {
id0=_incomingid[iloc];
id1=_outgoingid[iloc];
}
/**
* Information on the form factor.
* @param iloc The location in the list.
* @param ispin The spin of the incoming baryon.
* @param ospin The spin of the outgoing baryon.
* @param spect1 The PDG code of the first spectator quark.
* @param spect2 The PDG code of the second spectator quark.
* @param inquark The PDG code for decaying incoming quark.
* @param outquark The PDG code for the outgoing quark produced in the decay.
*/
void formFactorInfo(int iloc,int & ispin,int & ospin,int & spect1,
int & spect2, int & inquark,int & outquark) {
ispin = _incomingJ[iloc];
ospin = _outgoingJ[iloc];
spect1 = _spectator1[iloc];
spect2 = _spectator2[iloc];
inquark = _inquark[iloc];
outquark = _outquark[iloc];
}
/**
* Information on the form factor.
* @param in The PDG code of the incoming baryon.
* @param out The PDG code of the outgoing baryon.
* @param ispin The spin of the incoming baryon.
* @param ospin The spin of the outgoing baryon.
* @param spect1 The PDG code of the first spectator quark.
* @param spect2 The PDG code of the second spectator quark.
* @param inquark The PDG code for decaying incoming quark.
* @param outquark The PDG code for the outgoing quark produced in the decay.
*/
void formFactorInfo(int in,int out,int & ispin,int & ospin,int & spect1,
int & spect2, int & inquark,int & outquark) {
bool dummy;
unsigned int ix=formFactorNumber(in,out,dummy);
formFactorInfo(ix,ispin,ospin,spect1,spect2,inquark,outquark);
}
/**
* number of form factors
*/
unsigned int numberOfFactors() const {return _incomingid.size();}
//@}
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac12\f$ baryon.
* This method is virtual and must be implementented in classes
* inheriting from this which include spin\f$\frac12\f$ to spin \f$\frac12\f$
* form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param f1v The form factor \f$F^V_1\f$.
* @param f2v The form factor \f$F^V_2\f$.
* @param f3v The form factor \f$F^V_3\f$.
* @param f1a The form factor \f$F^A_1\f$.
* @param f2a The form factor \f$F^A_2\f$.
* @param f3a The form factor \f$F^A_3\f$.
*/
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a);
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac32\f$ baryon.
* This method is virtual and must be implementented in classes
* inheriting from this which include spin\f$\frac12\f$ to spin \f$\frac32\f$
* form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param g1v The form factor \f$G^V_1\f$.
* @param g2v The form factor \f$G^V_2\f$.
* @param g3v The form factor \f$G^V_3\f$.
* @param g4v The form factor \f$G^V_4\f$.
* @param g1a The form factor \f$G^A_1\f$.
* @param g2a The form factor \f$G^A_2\f$.
* @param g3a The form factor \f$G^A_3\f$.
* @param g4a The form factor \f$G^A_4\f$.
*/
virtual void SpinHalfSpinThreeHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & g1v,Complex & g2v,Complex & g3v,
Complex & g4v,Complex & g1a,Complex & g2a,
Complex & g3a,Complex & g4a);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/**
* Add a form factor to the list.
* @param in The PDG code of the incoming baryon.
* @param out The PDG code of the outgoing baryon.
* @param inspin The spin of the incoming baryon.
* @param outspin The spin of the outgoing baryon.
* @param spect1 The PDG code of the first spectator quark.
* @param spect2 The PDG code of the second spectator quark.
* @param inquark The PDG code for decaying incoming quark.
* @param outquark The PDG code for the outgoing quark produced in the decay.
*/
void addFormFactor(int in,int out,int inspin, int outspin, int spect1,
int spect2, int inquark,int outquark) {
_incomingid.push_back(in);
_outgoingid.push_back(out);
_incomingJ.push_back(inspin);
_outgoingJ.push_back(outspin);
_spectator1.push_back(spect1);
_spectator2.push_back(spect2);
_inquark.push_back(inquark);
_outquark.push_back(outquark);
}
/**
* Set initial number of modes
* @param nmodes The number of modes.
*/
void initialModes(unsigned int nmodes) {_numbermodes=nmodes;}
/**
* Get the initial number of modes
*/
unsigned int initialModes() const {return _numbermodes;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- BaryonFormFactor & operator=(const BaryonFormFactor &);
+ BaryonFormFactor & operator=(const BaryonFormFactor &) = delete;
private:
/**
* the id's of the incoming particles
*/
vector<int> _incomingid;
/**
* the id's of the outgoing particles
*/
vector<int> _outgoingid;
/**
* spin of the incoming particle
*/
vector<int> _incomingJ;
/**
* spin of the outgoing particle
*/
vector<int> _outgoingJ;
/**
* the id of the first spectator quark
*/
vector<int> _spectator1;
/**
* the id of the second spectator quark
*/
vector<int> _spectator2;
/**
* the id of the decaying quark
*/
vector<int> _inquark;
/**
* the id of the outgoing quark
*/
vector<int> _outquark;
/**
* The initial number of modes
*/
unsigned int _numbermodes;
};
}
#endif /* HERWIG_BaryonFormFactor_H */
diff --git a/Decay/FormFactors/BaryonSimpleFormFactor.h b/Decay/FormFactors/BaryonSimpleFormFactor.h
--- a/Decay/FormFactors/BaryonSimpleFormFactor.h
+++ b/Decay/FormFactors/BaryonSimpleFormFactor.h
@@ -1,178 +1,178 @@
// -*- C++ -*-
#ifndef HERWIG_BaryonSimpleFormFactor_H
#define HERWIG_BaryonSimpleFormFactor_H
//
// This is the declaration of the BaryonSimpleFormFactor class.
//
#include "BaryonFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The BaryonSimpleFormFactor class is a simple model for the form-factors
* for the semi-leptonic decay of the light (i.e. uds) baryons. The form-factors
* are assumed to be constant and are taken from the quark model results
* of PRD25, 206 (1982).
*
* @ see BaryonFormFactor
*/
class BaryonSimpleFormFactor: public BaryonFormFactor {
public:
/**
* Default constructor
*/
BaryonSimpleFormFactor();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac12\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param f1v The form factor \f$F^V_1\f$.
* @param f2v The form factor \f$F^V_2\f$.
* @param f3v The form factor \f$F^V_3\f$.
* @param f1a The form factor \f$F^A_1\f$.
* @param f2a The form factor \f$F^A_2\f$.
* @param f3a The form factor \f$F^A_3\f$.
*/
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- BaryonSimpleFormFactor & operator=(const BaryonSimpleFormFactor &);
+ BaryonSimpleFormFactor & operator=(const BaryonSimpleFormFactor &) = delete;
private:
/**
* The axial vector coupling in \f$\beta\f$ decay.
*/
double _gA;
/**
* The \f$\frac{D}{D+F}\f$ ratio.
*/
double _alphaD;
/**
* The \f$\eta_V\f$ \f$SU(3)\f$ breaking parameter.
*/
double _etaV;
/**
* The \f$\eta_V\f$ \f$SU(3)\f$ breaking parameter.
*/
double _etaA;
/**
* The \f$\rho_E\f$ \f$SU(3)\f$ breaking parameter for the electic dipole moment.
*/
double _rhoE;
/**
* The \f$\rho_M\f$ \f$SU(3)\f$ breaking parameter for the electic dipole moment.
*/
double _rhoM;
/**
* The calculated constants for the \f$f_1\f$ form factor.
*/
vector<double> _f1;
/**
* The calculated constants for the \f$f_2\f$ form factor.
*/
vector<double> _f2;
/**
* The calculated constants for the \f$g_1\f$ form factor.
*/
vector<double> _g1;
/**
* The calculated constants for the \f$g_2\f$ form factor.
*/
vector<double> _g2;
};
}
#endif /* HERWIG_BaryonSimpleFormFactor_H */
diff --git a/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.cc b/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.cc
--- a/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.cc
+++ b/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.cc
@@ -1,648 +1,648 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the BaryonThreeQuarkModelFormFactor class.
//
#include "BaryonThreeQuarkModelFormFactor.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Utilities/GaussianIntegrator.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
using namespace Herwig;
// function for the integral of the partial width
namespace {
using namespace Herwig;
struct BaryonCMatrixElement {
typedef ThePEG::Ptr<BaryonThreeQuarkModelFormFactor>::pointer
BaryonThreeQuarkModelFormFactorPtr;
BaryonCMatrixElement(BaryonThreeQuarkModelFormFactorPtr in,
Energy m0, Energy m1, int type, int mass,
int id0,int id1) {
_formFactor=in;
_m0=m0;
_m1=m1;
_type=type;
_mass=mass;
_id0=id0;
_id1=id1;
}
// calculate the integrand
Energy operator() (double x) const {
return _formFactor->widthIntegrand(x,_m0,_m1,_type,_mass,_id0,_id1);
}
/** Argument type for GaussianIntegrator */
typedef double ArgType;
/** Return type for GaussianIntegrator */
typedef Energy ValType;
private:
// private variables
BaryonThreeQuarkModelFormFactorPtr _formFactor;
Energy _m0,_m1;
int _type,_mass;
int _id0,_id1;
};
}
BaryonThreeQuarkModelFormFactor::BaryonThreeQuarkModelFormFactor()
: _initialize(false), _order(50),_mlight(420*MeV),_mstrange(570*MeV),
_LambdaQ(2.5*GeV),_Lambdaqq(0.71*GeV),_Lambdasq(850*MeV),_Lambdass(1.0*GeV) {
// modes handled by this form factor
// lambda_b
addFormFactor(5122,4122,2,2,1,2,5,4);
// xi_b
addFormFactor(5232,4232,2,2,2,3,5,4);
addFormFactor(5132,4132,2,2,1,3,5,4);
// sigma_b
addFormFactor(5112,4112,2,2,1,1,5,4);
addFormFactor(5212,4212,2,2,2,1,5,4);
addFormFactor(5222,4222,2,2,2,2,5,4);
// omega_b
addFormFactor(5332,4332,2,2,3,3,5,4);
// sigma_b-> sigma_c*
addFormFactor(5112,4114,2,4,1,1,5,4);
addFormFactor(5212,4214,2,4,2,1,5,4);
addFormFactor(5222,4224,2,4,2,2,5,4);
// omega_b -> omega_c*
addFormFactor(5332,4334,2,4,3,3,5,4);
// set the inital number of form factors
initialModes(numberOfFactors());
}
void BaryonThreeQuarkModelFormFactor::doinit() {
BaryonFormFactor::doinit();
// initialization in needed
if(_initialize) {
GaussianIntegrator integrator;
_C0.clear();_C1.clear();_C2.clear();
double pre(0.),root(2.*sqrt(6.));
double gamma1(1),gamma2(1),gamma3(sqrt(acos(-1.)));
unsigned int ix,iy;
for(iy=0;iy<2;++iy) {
_mu2 = iy==0 ? sqr(_mlight /_LambdaQ) : sqr(_mstrange/_LambdaQ);
for(ix=0;ix<=_order;++ix) {
if(ix>0) gamma1*=ix;
if(ix%2==1) { gamma2*=(ix+1)/2.0; gamma3*=ix/2.0; }
if(ix%2==0) pre=pow(root,double(ix))/12.*gamma2/gamma1;
else pre=pow(root,double(ix))/12.*gamma3/gamma1;
// for the xi_0 function
_a=_mu2;_b=2.;_N=ix;
_C0.push_back(pre*integrator.value(*this,0.,1.));
// for the xi_1 function
_a=_mu2;_b=1.;
_C1.push_back(pre*integrator.value(*this,0.,1.));
// for the xi_2 function
_a=0.;
_b=0.;
_C2.push_back(pre*integrator.value(*this,0.,1.));
}
}
generator()->log() << "Checking results of BaryonThreeQuarkModelFormFactor"
<< "vs results from the original paper\n";
// first matrix element
Energy m0=getParticleData(5122)->mass();
Energy m1=getParticleData(4122)->mass();
double omegamax=0.5*(m0*m0+m1*m1)/m0/m1;
BaryonCMatrixElement int1(this,m0,m1,1,0,5122,4122);
Energy width = integrator.value(int1,1.,omegamax);
generator()->log() << "Lambda_b0->Lambda_c+ decay"
<< width/6.582119E-22/MeV << "\n";
// second matrix element
m0=getParticleData(5222)->mass();
m1=getParticleData(4222)->mass();
omegamax=0.5*(m0*m0+m1*m1)/m0/m1;
int1 = BaryonCMatrixElement(this,m0,m1,2,0,5222,4222);
width = integrator.value(int1,1.,omegamax);
generator()->log() << "Sigma_b+->Sigma_c++ decay"
<< width/6.582119E-22/MeV << "\n";
// third matrix element
m0=getParticleData(5232)->mass();
m1=getParticleData(4232)->mass();
omegamax=0.5*(m0*m0+m1*m1)/m0/m1;
int1 = BaryonCMatrixElement(this,m0,m1,1,1,5232,4232);
width = integrator.value(int1,1.,omegamax);
generator()->log() << "Xi_b0->Xi_c+ decay"
<< width/6.582119E-22/MeV << "\n";
// fourth matrix element
m0=getParticleData(5332)->mass();
m1=getParticleData(4332)->mass();
omegamax=0.5*(m0*m0+m1*m1)/m0/m1;
int1 = BaryonCMatrixElement(this,m0,m1,2,2,5332,4332);
width = integrator.value(int1,1.,omegamax);
generator()->log() << "Omega_b-->Omega_c0 decay"
<< width/6.582119E-22/MeV << "\n";
// fifth matrix element
m0=getParticleData(5222)->mass();
m1=getParticleData(4224)->mass();
omegamax=0.5*(m0*m0+m1*m1)/m0/m1;
int1 = BaryonCMatrixElement(this,m0,m1,3,0,5222,4224);
width = integrator.value(int1,1.,omegamax);
generator()->log() << "Sigma_vb+->Sigma_c*++ decay"
<< width/6.582119E-22/MeV << "\n";
// fourth matrix element
m0=getParticleData(5332)->mass();
m1=getParticleData(4334)->mass();
omegamax=0.5*(m0*m0+m1*m1)/m0/m1;
int1 = BaryonCMatrixElement(this,m0,m1,3,2,5332,4334);
width = integrator.value(int1,1.,omegamax);
generator()->log() << "Omega_b-->Omega_c*0 decay"
<< width/6.582119E-22/MeV << "\n";
// output some plots for testing
double lambdabar = -999.999;
ofstream output("ThreeQuark.top");
output << "newdef font duplex" << endl;
output << "title top \"Figure 3 from paper \"" << endl;
output << "newdef limits x 1 1.44 y 0.5 1" << endl;
for(unsigned int ix=0;ix<5;++ix) {
double omegamin(1.),omegamax(1.44),
step((omegamax-omegamin)/100.),omega(1.),xi;
unsigned int ioff(0);
if(ix==0){lambdabar=600*MeV/_LambdaQ;}
else if(ix==1){lambdabar=650*MeV/_LambdaQ;}
else if(ix==2){lambdabar=710*MeV/_LambdaQ;}
else if(ix==3){lambdabar=750*MeV/_LambdaQ;}
else if(ix==4){lambdabar=800*MeV/_LambdaQ;}
for(;omega<omegamax;omega+=step) {
vector<double> phi(phiFunction(omega));
double power(1.),numer(0.),denom(0.);
for(unsigned int iy=0;iy<=_order;++iy) {
numer+=phi[iy]*power*_C0[iy+ioff];
denom+=power*_C0[iy+ioff];
power*=lambdabar;
}
xi=numer/denom;
output << omega << " " << xi << endl;
}
if(ix==0){output << "join red" << endl;}
else if(ix==1){output << "join green" << endl;}
else if(ix==2){output << "join blue" << endl;}
else if(ix==3){output << "join cyan" << endl;}
else if(ix==4){output << "join magenta" << endl;}
}
output << "new frame " << endl;
output << "newdef font duplex" << endl;
output << "title top \"Figure 6 from paper \"" << endl;
output << "newdef limits x 1 1.4 y 0.5 1" << endl;
for(unsigned int ix=0;ix<5;++ix) {
double omegamin(1.),omegamax(1.45),step((omegamax-omegamin)/100.),omega(1.);
unsigned int ioff(0);
if(ix==0){lambdabar=600*MeV/_LambdaQ;}
else if(ix==1){lambdabar=650*MeV/_LambdaQ;}
else if(ix==2){lambdabar=710*MeV/_LambdaQ;}
else if(ix==3){lambdabar=750*MeV/_LambdaQ;}
else if(ix==4){lambdabar=800*MeV/_LambdaQ;}
for(;omega<omegamax;omega+=step) {
vector<double> phi(phiFunction(omega));
double power(1.),numer[2]={0.,0.},denom(0.);
for(unsigned int iy=0;iy<=_order;++iy) {
numer[0]+=phi[iy]*power*_C1[iy+ioff];
denom+=power*_C1[iy+ioff];
numer[1]+=power*_C2[iy+ioff]*(phi[iy]-phi[iy+2]);
power*=lambdabar;
}
numer[1]/=(omega-1.);
double xi1(numer[0]/denom);
output << omega << " " << xi1 << endl;
}
if(ix==0){output << "join red" << endl;}
else if(ix==1){output << "join green" << endl;}
else if(ix==2){output << "join blue" << endl;}
else if(ix==3){output << "join cyan" << endl;}
else if(ix==4){output << "join magenta" << endl;}
}
output << "new frame " << endl;
output << "newdef font duplex" << endl;
output << "title top \"Figure 7 from paper \"" << endl;
output << "newdef limits x 1 1.33 y 0.4 1" << endl;
for(unsigned int ix=0;ix<5;++ix) {
double omegamin(1.),omegamax(1.45),step((omegamax-omegamin)/100.),omega(1.);
unsigned int ioff(_order+1);
if(ix==0){lambdabar=800*MeV/_LambdaQ;}
else if(ix==1){lambdabar=900*MeV/_LambdaQ;}
else if(ix==2){lambdabar=1000*MeV/_LambdaQ;}
else if(ix==3){lambdabar=1050*MeV/_LambdaQ;}
else if(ix==4){lambdabar=1100*MeV/_LambdaQ;}
for(;omega<omegamax;omega+=step) {
vector<double> phi(phiFunction(omega));
double power(1.),numer[2]={0.,0.},denom(0.);
for(unsigned int iy=0;iy<=_order;++iy) {
numer[0]+=phi[iy]*power*_C1[iy+ioff];
denom+=power*_C1[iy+ioff];
numer[1]+=power*_C2[iy+ioff]*(phi[iy]-phi[iy+2]);
power*=lambdabar;
}
numer[1]/=(omega-1.);
double xi1(numer[0]/denom);
output << omega << " " << xi1 << endl;
}
if(ix==0){output << "join red" << endl;}
else if(ix==1){output << "join green" << endl;}
else if(ix==2){output << "join blue" << endl;}
else if(ix==3){output << "join cyan" << endl;}
else if(ix==4){output << "join magenta" << endl;}
}
}
}
void BaryonThreeQuarkModelFormFactor::persistentOutput(PersistentOStream & os) const {
os << _initialize << _order << ounit(_mlight,MeV) << ounit(_mstrange,MeV)
<< ounit(_LambdaQ,MeV) << ounit(_Lambdaqq,MeV)
<< ounit(_Lambdasq,MeV) << ounit(_Lambdass,MeV) << _C0 << _C1 << _C2;}
void BaryonThreeQuarkModelFormFactor::persistentInput(PersistentIStream & is, int) {
is >> _initialize >> _order >> iunit(_mlight,MeV) >> iunit(_mstrange,MeV)
>> iunit(_LambdaQ,MeV) >> iunit(_Lambdaqq,MeV)
>> iunit(_Lambdasq,MeV) >> iunit(_Lambdass,MeV) >> _C0 >> _C1 >> _C2;}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<BaryonThreeQuarkModelFormFactor,BaryonFormFactor>
describeHerwigBaryonThreeQuarkModelFormFactor("Herwig::BaryonThreeQuarkModelFormFactor", "HwFormFactors.so");
void BaryonThreeQuarkModelFormFactor::Init() {
static ClassDocumentation<BaryonThreeQuarkModelFormFactor> documentation
("The BaryonThreeQuarkModelFormFactor class implements"
" the form-factors for semi-leptonic decay of baryon containing a"
" heavy quark from PRD56, 348.",
"The form factors from \\cite{Ivanov:1996fj} were used.",
"%\\cite{Ivanov:1996fj}\n"
"\\bibitem{Ivanov:1996fj}\n"
" M.~A.~Ivanov, V.~E.~Lyubovitskij, J.~G.~Korner and P.~Kroll,\n"
" ``Heavy baryon transitions in a relativistic three-quark model,''\n"
" Phys.\\ Rev.\\ D {\\bf 56} (1997) 348\n"
" [arXiv:hep-ph/9612463].\n"
" %%CITATION = PHRVA,D56,348;%%\n"
);
static Parameter<BaryonThreeQuarkModelFormFactor,unsigned int> interfaceOrder
("Order",
"The order of terms to include in the series expansion of the form-factor.",
&BaryonThreeQuarkModelFormFactor::_order, 10, 0, 1000,
false, false, true);
static Parameter<BaryonThreeQuarkModelFormFactor,Energy> interfaceLightMass
("LightMass",
"The mass of the light quark",
&BaryonThreeQuarkModelFormFactor::_mlight, GeV, .42*GeV, ZERO, 2.0*GeV,
false, false, true);
static Parameter<BaryonThreeQuarkModelFormFactor,Energy> interfaceStrangeMass
("StrangeMass",
"The mass of the strange quark",
&BaryonThreeQuarkModelFormFactor::_mstrange, GeV, .57*GeV, ZERO, 2.0*GeV,
false, false, true);
static Parameter<BaryonThreeQuarkModelFormFactor,Energy> interfaceLambdaQ
("LambdaQ",
"Heavy Baryon Size Parameter",
&BaryonThreeQuarkModelFormFactor::_LambdaQ, GeV, 2.5*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<BaryonThreeQuarkModelFormFactor,Energy> interfaceLambdaqq
("Lambdaqq",
"The size parameter for light quarks",
&BaryonThreeQuarkModelFormFactor::_Lambdaqq, GeV, 0.71*GeV, ZERO, 2.0*GeV,
false, false, true);
static Parameter<BaryonThreeQuarkModelFormFactor,Energy> interfaceLambdasq
("Lambdasq",
"The size parameter for one strange quark",
&BaryonThreeQuarkModelFormFactor::_Lambdasq, GeV, 0.85*GeV, ZERO, 2.0*GeV,
false, false, true);
static Parameter<BaryonThreeQuarkModelFormFactor,Energy> interfaceLambdass
("Lambdass",
"The size parameter with two strange quarks.",
&BaryonThreeQuarkModelFormFactor::_Lambdass, GeV, 1.0*GeV, ZERO, 2.0*GeV,
false, false, true);
static ParVector<BaryonThreeQuarkModelFormFactor,double> interfaceC0
("C0",
"The coefficient of the expansion for xi_0.",
&BaryonThreeQuarkModelFormFactor::_C0,
0, 0, 0, -1E20, 1E20, false, false, true);
static ParVector<BaryonThreeQuarkModelFormFactor,double> interfaceC1
("C1",
"The coefficient of the expansion for xi_1.",
&BaryonThreeQuarkModelFormFactor::_C1,
0, 0, 0, -1E20, 1E20, false, false, true);
static ParVector<BaryonThreeQuarkModelFormFactor,double> interfaceC2
("C2",
"The coefficient of the expansion for xi_2.",
&BaryonThreeQuarkModelFormFactor::_C2,
0, 0, 0, -1E20, 1E20, false, false, true);
static Switch<BaryonThreeQuarkModelFormFactor,bool> interfaceInitialize
("Initialize",
"Initialize the coefficient for the expansion of the form-factor",
&BaryonThreeQuarkModelFormFactor::_initialize, false, false, false);
static SwitchOption interfaceInitializeInitialize
(interfaceInitialize,
"Yes",
"Perform the initialize",
true);
static SwitchOption interfaceInitializeNoInitialize
(interfaceInitialize,
"No",
"No initialization",
false);
}
void BaryonThreeQuarkModelFormFactor::
SpinHalfSpinHalfFormFactor(Energy2 q2,int,int id0,int id1,Energy m0,Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a) {
useMe();
// this model is based on heavy quark theory
// therefore most of the factors are zero
Complex g1v(0.),g1a(0.),g2v(0.),g2a(0.),g3a(0.),g3v(0.);
// work out which light quark constant to use
double lambdabar;unsigned int ioff(0);
if(abs(id1)==4332) {
lambdabar=_Lambdass/_LambdaQ;
ioff=_order+1;
}
else if(abs(id1)==4232||abs(id1)==4132) {
lambdabar=_Lambdasq/_LambdaQ;
ioff=_order+1;
}
else {
lambdabar=_Lambdaqq/_LambdaQ;
}
// the omega value
double omega = 0.5/m0/m1*(m0*m0+m1*m1-q2);
// calculate the form factor
// the phi functions
vector<double> phi(phiFunction(omega));
// use the xi0 functions
if(abs(id0)==5122||abs(id0)==5232||abs(id0)==5132) {
double power(1.),numer(0.),denom(0.);
for(unsigned int ix=0;ix<=_order;++ix) {
numer+=phi[ix]*power*_C0[ix+ioff];
denom+=power*_C0[ix+ioff];
power*=lambdabar;
}
g1v=numer/denom;
g1a=g1v;
}
else {
double power(1.),numer[2]={0.,0.},denom(0.);
for(unsigned int ix=0;ix<=_order;++ix) {
numer[0]+=phi[ix]*power*_C1[ix+ioff];
denom+=power*_C1[ix+ioff];
numer[1]+=power*_C2[ix+ioff]*(phi[ix]-phi[ix+2]);
power*=lambdabar;
}
numer[1]/=(omega-1.);
double xi1(numer[0]/denom),xi2(numer[1]/denom);
// the couplings in the velocity form
g1v = -(omega*xi1-(sqr(omega)-1.)*xi2)/3.;
g1a = g1v;
g2v = 2./3.*(xi1-(omega-1.)*xi2);
g3v = g2v;
g2a = 2./3.*(xi1-(omega+1.)*xi2);
g3a =-g2a;
}
// convert to our form
f1v = g1v+Complex(0.5*(m0+m1)*(g2v/m0+g3v/m1));
f1a =-g1a+Complex(0.5*(m0-m1)*(g2a/m0+g3a/m1));
- f2v = 0.5*(m0+m1)*( g2v/m0+g3v/m1);
- f3v = 0.5*(m0+m1)*( g2v/m0-g3v/m1);
- f2a =-0.5*(m0+m1)*( g2a/m0+g3a/m1);
- f3a = 0.5*(m0+m1)*(-g2a/m0+g3a/m1);
+ f2v = Complex(0.5*(m0+m1)*( g2v/m0+g3v/m1));
+ f3v = Complex(0.5*(m0+m1)*( g2v/m0-g3v/m1));
+ f2a =-Complex(0.5*(m0+m1)*( g2a/m0+g3a/m1));
+ f3a = Complex(0.5*(m0+m1)*(-g2a/m0+g3a/m1));
}
void BaryonThreeQuarkModelFormFactor::
SpinHalfSpinThreeHalfFormFactor(Energy2 q2,int,int,int id1,Energy m0,
Energy m1, Complex & f1v,Complex & f2v,
Complex & f3v,Complex & f4v,Complex & f1a,
Complex & f2a,Complex & f3a,Complex & f4a ) {
useMe();
// work out which light quark constant to use
double lambdabar;unsigned int ioff(0);
if(abs(id1)==4334) {
lambdabar=_Lambdass/_LambdaQ;
ioff=_order+1;
}
else if(abs(id1)==4234||abs(id1)==4134||abs(id1)==3324) {
lambdabar=_Lambdasq/_LambdaQ;
ioff=_order+1;
}
else {
lambdabar=_Lambdaqq/_LambdaQ;
}
// the omega value
double omega=0.5/m0/m1*(m0*m0+m1*m1-q2);
// calculate the form factor
// the phi functions
vector<double> phi=phiFunction(omega);
double power(1.),numer[2]={0.,0.},denom(0.);
for(unsigned int ix=0;ix<=_order;++ix) {
numer[0]+=phi[ix]*power*_C1[ix+ioff];
denom+=power*_C1[ix+ioff];
numer[1]+=power*_C2[ix+ioff]*(phi[ix]-phi[ix+2]);
power*=lambdabar;
}
numer[1]/=(omega-1.);
double xi1=numer[0]/denom;
double xi2=numer[1]/denom;
// couplings in the velocity form
Complex g1v,g2v,g3v,g4v,g1a,g2a,g3a,g4a;
double orr(1./sqrt(3.));
Energy msum(m0+m1);
Energy2 msum2(msum*msum);
g1v = 2.*orr*xi1;
g1a = -g1v;
g2v = orr*(xi1-(omega-1)*xi2);
g2a = orr*(xi1-(omega+1)*xi2);
g3v = 0.;
g3a = 0.;
g4v = -2.*orr*xi2;
g4a = -g4v;
// convert to our form
f1v = g1v;
f1a =-g1a;
f2v = g2v*msum/m0;
f2a =-g2a*msum/m0;
- f3v = msum2/m0*(g3v/m0+g4v/m1);
- f3a =-msum2/m0*(g3a/m0+g4a/m1);
- f4v = msum2/m0/m0*g3v;
- f4a =-msum2/m0/m0*g3a;
+ f3v = Complex(msum2/m0*(g3v/m0+g4v/m1));
+ f3a =-Complex(msum2/m0*(g3a/m0+g4a/m1));
+ f4v = Complex(msum2/m0/m0*g3v);
+ f4a =-Complex(msum2/m0/m0*g3a);
}
void BaryonThreeQuarkModelFormFactor::dataBaseOutput(ofstream & output,bool header,
bool create) const {
if(header) output << "update decayers set parameters=\"";
if(create) output << "create Herwig::BaryonThreeQuarkModelFormFactor "
<< name() << " \n";
output << "newdef " << name() << ":Order " << _order << " \n";
output << "newdef " << name() << ":LightMass " << _mlight/GeV << " \n";
output << "newdef " << name() << ":StrangeMass " << _mstrange/GeV << " \n";
output << "newdef " << name() << ":LambdaQ " << _LambdaQ/GeV << " \n";
output << "newdef " << name() << ":Lambdaqq " << _Lambdaqq/GeV << " \n";
output << "newdef " << name() << ":Lambdasq " << _Lambdasq/GeV << " \n";
output << "newdef " << name() << ":Lambdass " << _Lambdass/GeV << " \n";
// the number of terms to include in the sum for the form-factors
for(unsigned int ix=0;ix<_C0.size();++ix)
output << "insert " << name() << ":C0 " << ix << " " << _C0[ix] << " \n";
for(unsigned int ix=0;ix<_C1.size();++ix)
output << "insert " << name() << ":C1 " << ix << " " << _C1[ix] << " \n";
for(unsigned int ix=0;ix<_C2.size();++ix)
output << "insert " << name() << ":C2 " << ix << " " << _C2[ix] << " \n";
BaryonFormFactor::dataBaseOutput(output,false,false);
if(header) output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
double BaryonThreeQuarkModelFormFactor::operator ()(double x) const {
// convert the integration variable
double y=(1.-x)/x;
double output =exp(-24.*_mu2*y)*y;
// the integrals
double I,Im2;
SN(y,_N,Im2,I);
double Nfact=0.5*_N+1.0;
output *= (_a+Nfact/24./(1.+y))*I+1./12./(1.+y)*(_b-Nfact)*Im2;
return output;
}
void BaryonThreeQuarkModelFormFactor::SN(double y, int N, double & SNm2,
double & SN) const {
// special cases for the low lying values
if(N==0) {
double root=sqrt((1.+y)*(3.+y));
SN = 0.5/y*sqrt((1.+y)/(3.+y))*log((root+y)/(root-y));
SNm2 = 0.5/(y+3.)*(SN+(1.+y)/(3.+4.*y));
}
else if(N==1) {
SN = sqrt(1.+y)/y*asin(y/sqrt(1.+y)/sqrt(3.+y));
SNm2 = 1./(3.+y)*sqrt((1.+y)/(3.+4.*y));
}
else if(N==2) {
double root=sqrt((1.+y)*(3.+y));
SN = 1.;
SNm2 = 0.5/y*sqrt((1.+y)/(3.+y))*log((root+y)/(root-y));
}
// the general case
else {
int ix; double root;
if(N%2==0) {
SN=1.;
ix=2;
root=1.;
}
else {
SN = sqrt(1.+y)/y*asin(y/sqrt(1.+y)/sqrt(3.+y));
ix=1;
root=sqrt((1.+y)/(3.+4.*y));
}
do {
SNm2=SN;
ix+=2;
root*=(3.+4.*y)/(1.+y);
SN=1.0/(ix-1.0)*(root+(ix-2.0)*(y+3.)*SNm2);
}
while(ix<N);
}
}
// return the phi_N functions calculated using recursion
vector<double> BaryonThreeQuarkModelFormFactor::phiFunction(double omega) {
vector<double> output;
double root(sqrt(omega*omega-1.));
output.push_back(1./root*log(omega+root));
if(omega<1.00001) output.back()=1.;
if(_order>0) output.push_back(2./(omega+1.));
if(_order<2) return output;
for(unsigned int ix=2;ix<=_order+2;++ix) {
output.push_back(2./ix/(omega+1.)*(1.+(ix-1)*output[ix-2]));
}
return output;
}
Energy BaryonThreeQuarkModelFormFactor::widthIntegrand(double omega,Energy m0,
Energy m1, int type,
int ,int id0,
int id1) {
// prefactors
double omegamax=0.5*(m0*m0+m1*m1)/m0/m1;
double pi=acos(-1.);
InvEnergy kw=sqr(generator()->standardModel()->fermiConstant())
/8./pi/pi/pi*m1*m1*m1/6.*(omegamax-omega)*sqrt(omega*omega-1.);
Energy2 q2 = sqr(m0)+sqr(m1)-2.*m0*m1*omega;
if(type<=2) {
Complex f1v,f2v,f3v,f1a,f2a,f3a;
SpinHalfSpinHalfFormFactor(q2,0,id0,id1,m0,m1,f1v,f2v,f3v,f1a,f2a,f3a);
Complex left =f1v-f1a-f2v-double((m0-m1)/(m0+m1))*f2a;
Complex right =f1v+f1a-f2v+double((m0-m1)/(m0+m1))*f2a;
double g1v = 0.5*( left+right).real();
double g2v = m0*(f2v+f3v).real()/(m0+m1);
double g3v = m1*(f2v-f3v).real()/(m0+m1);
double g1a = -0.5*(+right-left).real();
double g2a = -m0*(f2a+f3a).real()/(m0+m1);
double g3a = -m1*(f2a-f3a).real()/(m0+m1);
Energy Hpp = -2.*sqrt(m0*m1*(omega-1.))*g1v+2.*sqrt(m0*m1*(omega+1))*g1a;
Energy Hmm = -2.*sqrt(m0*m1*(omega-1.))*g1v-2.*sqrt(m0*m1*(omega+1))*g1a;
Energy Hp0 =
(sqrt(2.*m0*m1*(omega-1))*((m0+m1)*g1v+m1*(omega+1)*g2v+m0*(omega+1)*g3v)-
sqrt(2.*m0*m1*(omega+1))*((m0-m1)*g1a-m1*(omega-1)*g2a-m0*(omega-1)*g3a))/sqrt(q2);
Energy Hm0 =
(sqrt(2.*m0*m1*(omega-1))*((m0+m1)*g1v+m1*(omega+1)*g2v+m0*(omega+1)*g3v)+
sqrt(2.*m0*m1*(omega+1))*((m0-m1)*g1a-m1*(omega-1)*g2a-m0*(omega-1)*g3a))/sqrt(q2);
return kw*sqr(0.04)*(sqr(Hpp)+sqr(Hmm)+sqr(Hp0)+sqr(Hm0));
}
else {
Complex f1v,f2v,f3v,f4v,f1a,f2a,f3a,f4a;
double g1v,g2v,g3v,g4v,g1a,g2a,g3a,g4a;
SpinHalfSpinThreeHalfFormFactor(q2,0,id0,id1,m0,m1,
f1v,f2v,f3v,f4v,
f1a,f2a,f3a,f4a);
g1v = f1v.real();
g1a = -f1a.real();
g2v = m0/(m0+m1)*f2v.real();
g2a =-m0/(m0+m1)*f2a.real();
g3v = sqr(m0/(m0+m1))*f4v.real();
g3a =-sqr(m0/(m0+m1))*f4a.real();
g4v = m0*m1/sqr(m0+m1)*(f3v.real()-f4v.real());
g4a =-m0*m1/sqr(m0+m1)*(f3a.real()-f4a.real());
Energy HppC =
+sqrt(2./3.)*sqrt(m0*m1*(omega-1))*(g1v-2.*(omega+1)*g2v)
-sqrt(2./3.)*sqrt(m0*m1*(omega+1))*(g1a-2.*(omega-1)*g2a);
Energy HmmC =
-sqrt(2./3.)*sqrt(m0*m1*(omega-1))*(g1v-2.*(omega+1)*g2v)
-sqrt(2./3.)*sqrt(m0*m1*(omega+1))*(g1a-2.*(omega-1)*g2a);
Energy HppbC =
-sqrt(2.*m0*m1*(omega-1))*g1v
-sqrt(2.*m0*m1*(omega+1))*g1a;
Energy HmmbC =
sqrt(2.*m0*m1*(omega-1))*g1v
-sqrt(2.*m0*m1*(omega+1))*g1a;
Energy Hp0C = (
-2./sqrt(3.)*sqrt(m0*m1*(omega-1))*
((m0*omega-m1)*g1v-(m0-m1)*(omega+1)*g2v+m1*(sqr(omega)-1)*g3v+m0*(sqr(omega)-1)*g4v)
-2./sqrt(3.)*sqrt(m0*m1*(omega+1))*
((m0*omega-m1)*g1a+(m0+m1)*(omega-1)*g2a+m1*(sqr(omega)-1)*g3a+m0*(sqr(omega)-1)*g4a))/sqrt(q2);
Energy Hm0C = (
+2./sqrt(3.)*sqrt(m0*m1*(omega-1))*
((m0*omega-m1)*g1v-(m0-m1)*(omega+1)*g2v+m1*(sqr(omega)-1)*g3v+m0*(sqr(omega)-1)*g4v)
-2./sqrt(3.)*sqrt(m0*m1*(omega+1))*
((m0*omega-m1)*g1a+(m0+m1)*(omega-1)*g2a+m1*(sqr(omega)-1)*g3a+m0*(sqr(omega)-1)*g4a))/sqrt(q2);
return kw*sqr(0.04)*(sqr(HppC)+sqr(HmmC)+sqr(HppbC)+sqr(HmmbC)+sqr(Hp0C)+sqr(Hm0C));
}
}
diff --git a/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.h b/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.h
--- a/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.h
+++ b/Decay/FormFactors/BaryonThreeQuarkModelFormFactor.h
@@ -1,288 +1,288 @@
// -*- C++ -*-
#ifndef HERWIG_BaryonThreeQuarkModelFormFactor_H
#define HERWIG_BaryonThreeQuarkModelFormFactor_H
//
// This is the declaration of the BaryonThreeQuarkModelFormFactor class.
//
#include "BaryonFormFactor.h"
#include "ThePEG/PDT/ParticleData.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The BaryonThreeQuarkModelFormFactor class implements the
* form factors for the semi-leptonic decay of baryons containing a heavy quark
* from the relativistic three-quark model calculation of PRD56, 348.
*
* As the only formulae in the paper are for the heavy-to-heavy i.e. bottom
* to charm decay this there are the only modes included, although the paper
* also includes charm decays and bottom decays to light quarks.
*
* The form factors are calculated by numerical computing the integrals from
* PRD56, 348 to obtain the coefficients for the expansion of the form factors.
*
* @see BaryonFormFactor
*/
class BaryonThreeQuarkModelFormFactor: public BaryonFormFactor {
public:
/**
* Default constructor
*/
BaryonThreeQuarkModelFormFactor();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac12\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param f1v The form factor \f$F^V_1\f$.
* @param f2v The form factor \f$F^V_2\f$.
* @param f3v The form factor \f$F^V_3\f$.
* @param f1a The form factor \f$F^A_1\f$.
* @param f2a The form factor \f$F^A_2\f$.
* @param f3a The form factor \f$F^A_3\f$.
*/
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a);
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac32\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param g1v The form factor \f$G^V_1\f$.
* @param g2v The form factor \f$G^V_2\f$.
* @param g3v The form factor \f$G^V_3\f$.
* @param g4v The form factor \f$G^V_4\f$.
* @param g1a The form factor \f$G^A_1\f$.
* @param g2a The form factor \f$G^A_2\f$.
* @param g3a The form factor \f$G^A_3\f$.
* @param g4a The form factor \f$G^A_4\f$.
*/
virtual void SpinHalfSpinThreeHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & g1v,Complex & g2v,Complex & g3v,
Complex & g4v,Complex & g1a,Complex & g2a,
Complex & g3a,Complex & g4a);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
/**
* The integrand for the coefficients of the expansion. This is a function of the
* integration variable \f$x\f$ which is chosen to transform the integrand over \f$y\f$
* which is from \f$0\f$ to \f$\infty\f$ to an integral between 0 and 1. This means
* that \f$y=\frac{1-x}{x}\f$.
* @param x The integration variable.
*/
double operator ()(double x) const;
/** Argument type for GaussianIntegrator */
typedef double ArgType;
/** Return type for GaussianIntegrator */
typedef double ValType;
/**
* The integrand for the semi-analytic calculation of the semi-leptonic width.
* This is included for testing purposes.
* @param omega The \f$\omega\f$ parameter of the heavy quark form-factors.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param type The type of the decay
* @param imass The baryonic mass parameter to use.
* @param id0 PDG code for the decaying particle
* @param id1 PDG code for the decay product
*/
Energy widthIntegrand(double omega,Energy m0, Energy m1, int type, int imass,
int id0,int id1);
protected:
/** @name Function needed to calculate the form factors */
//@{
/**
* Returns the function \f$\Phi_N\f$ function of PRD56, 348 as a function
* of \f$\omega\f$.
*/
vector<double> phiFunction(double);
/**
* The integral of a power of the the \f$S\f$ function of PRD56, 348 with respect
* to \f$\theta\f$. This is used to
* calculate the coefficients of the expansion to compute the form factors.
* The integral is calculated by computing a low power of the integrand and then
* using recursion relations to calculate the pwoer requested.
* @param y The \f$y\f$ variable of the function which is integrate over numerically.
* @param N The power to which the integrand is raised.
* @param SNm2 The integral with the function raised to the power \f$N/2-1\f$.
* @param SN The integral with the function raised to the power \f$N\f$.
*/
void SN(double y,int N,double & SNm2,double & SN) const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- BaryonThreeQuarkModelFormFactor & operator=(const BaryonThreeQuarkModelFormFactor &);
+ BaryonThreeQuarkModelFormFactor & operator=(const BaryonThreeQuarkModelFormFactor &) = delete;
private:
/** @name Parameters for the form factors */
//@{
/**
* Initialization of the expansion coefficients
*/
bool _initialize;
/**
* Order of the expansion for the form factors.
*/
unsigned int _order;
/**
* Mass of the light quarks used in the calculation of the form factors.
*/
Energy _mlight;
/**
* Mass of the strange quark used in the calculation of the form factors.
*/
Energy _mstrange;
/**
* The heavy quark \f$\Lambda_Q\f$ parameter for the calculation of the form factors.
*/
Energy _LambdaQ;
/**
* The \f$\Lambda_{qq}\f$ parameter for the calculation of the form factors.
*/
Energy _Lambdaqq;
/**
* The \f$\Lambda_{sq}\f$ parameter for the calculation of the form factors.
*/
Energy _Lambdasq;
/**
* The \f$\Lambda_{ss}\f$ parameter for the calculation of the form factors.
*/
Energy _Lambdass;
/**
* Coefficients for the expansion of the \f$\xi(\omega)\f$ form factor.
*/
vector<double> _C0;
/**
* Coefficients for the expansion of the \f$\xi_1(\omega)\f$ form factor.
*/
vector<double> _C1;
/**
* Coefficients for the expansion of the \f$\xi_2(\omega)\f$ form factor.
*/
vector<double> _C2;
/**
* Coefficient of the first term in the integrand for the coefficient calculation.
*/
double _a;
/**
* Coefficient of the second term in the integrand for the coefficient calculation.
*/
double _b;
/**
* The \f$\mu^2\f$ parameter for the coefficient calculation.
*/
double _mu2;
/**
* the order of the coefficient being calculated.
*/
int _N;
//@}
};
}
#endif /* HERWIG_BaryonThreeQuarkModelFormFactor_H */
diff --git a/Decay/FormFactors/BtoSGammaFlatEnergy.h b/Decay/FormFactors/BtoSGammaFlatEnergy.h
--- a/Decay/FormFactors/BtoSGammaFlatEnergy.h
+++ b/Decay/FormFactors/BtoSGammaFlatEnergy.h
@@ -1,90 +1,90 @@
// -*- C++ -*-
//
// BtoSGammaFlatEnergy.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_BtoSGammaFlatEnergy_H
#define HERWIG_BtoSGammaFlatEnergy_H
//
// This is the declaration of the BtoSGammaFlatEnergy class.
//
#include "BtoSGammaHadronicMass.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The BtoSGammaFlatEnergy class is a model of the hadronic mass
* is \f$B\to s\gamma\f$ decays
* which produces a flat photon energy spectrum and as such is only intended for
* testing purposes.
*
* @see BtoSGammaHadronicMass
*/
class BtoSGammaFlatEnergy: public BtoSGammaHadronicMass {
public:
/**
* Return the hadronic mass.
* @param mb The mass of the decaying B meson.
* @param mquark The minimum mass of the hadronic system based on the consistuent quark
* masses.
* @return The hadronic mass
*/
virtual Energy hadronicMass(Energy mb, Energy mquark);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BtoSGammaFlatEnergy & operator=(const BtoSGammaFlatEnergy &);
+ BtoSGammaFlatEnergy & operator=(const BtoSGammaFlatEnergy &) = delete;
};
}
#endif /* HERWIG_BtoSGammaFlatEnergy_H */
diff --git a/Decay/FormFactors/BtoSGammaHadronicMass.h b/Decay/FormFactors/BtoSGammaHadronicMass.h
--- a/Decay/FormFactors/BtoSGammaHadronicMass.h
+++ b/Decay/FormFactors/BtoSGammaHadronicMass.h
@@ -1,145 +1,145 @@
// -*- C++ -*-
//
// BtoSGammaHadronicMass.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_BtoSGammaHadronicMass_H
#define HERWIG_BtoSGammaHadronicMass_H
//
// This is the declaration of the BtoSGammaHadronicMass class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "BtoSGammaHadronicMass.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The BtoSGammaHadronicMass class is the base class for the implementation
* of models of the hadronic mass spectrum in \f$B\to s\gamma\f$ decays.
* Classes inheriting from this class should implement the hadronicMass()
* member which should return a value of the hadronic mass selected from
* the distribution.
*
* The parameters relating to the minimum and maximum values of the mass are stored
* in this class.
*
*/
class BtoSGammaHadronicMass: public Interfaced {
public:
/**
* The default constructor.
*/
BtoSGammaHadronicMass() : _minMass(825*MeV),_maxMass(5300*MeV) {}
/**
* Virtual member which must be implemented in classes inheriting from this
* class to return the hadronic mass.
* @param mb The mass of the decaying B meson
* @param mquark The minimum mass of the hadronic system based on the consistuent quark
* masses.
* @return The hadronic mass
*/
virtual Energy hadronicMass(Energy mb,Energy mquark) =0;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Access to the limits on the mass. */
//@{
/**
* Minimum mass
*/
Energy minMass() const {return _minMass;}
/**
* Maximum mass
*/
Energy maxMass() const {return _maxMass;}
//@}
/** @name Functions for the fermi motion needed in classes inheriting from this */
//@{
/**
* Exponential function of the form, \f$N(1-x)^ae^{-3\bar{\Lambda}^2x/\lambda_1}\f$,
* where
* \f$x=k_+/\bar{\Lambda}\f$ taken from hep-ph/9805303
* @param scale The energy scale, \f$k_+\f$, at which to evaluate the function.
* @param lambda The hadronic scale, \f$\bar{\Lambda}\f$
* @param a The shape parameter, \f$a\f$.
* @param norm The normalisation, \f$N\f$.
* @param lambda1 Scale related to kinetic energy of b quark, \f$\lambda_1\f$.
*/
InvEnergy exponentialFermiFunction(Energy scale,Energy lambda, double a,
InvEnergy norm,Energy2 lambda1 ) const {
double x(scale/lambda);
return norm*pow(1.-x,a)*exp(-3.*sqr(lambda)/lambda1*x);
}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BtoSGammaHadronicMass & operator=(const BtoSGammaHadronicMass &);
+ BtoSGammaHadronicMass & operator=(const BtoSGammaHadronicMass &) = delete;
private:
/**
* The minimum value of the hadronic mass
*/
Energy _minMass;
/**
* The maximum value of the hadronic mass
*/
Energy _maxMass;
};
}
#endif /* HERWIG_BtoSGammaHadronicMass_H */
diff --git a/Decay/FormFactors/BtoSGammaKagan.h b/Decay/FormFactors/BtoSGammaKagan.h
--- a/Decay/FormFactors/BtoSGammaKagan.h
+++ b/Decay/FormFactors/BtoSGammaKagan.h
@@ -1,531 +1,531 @@
// -*- C++ -*-
//
// BtoSGammaKagan.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_BtoSGammaKagan_H
#define HERWIG_BtoSGammaKagan_H
//
// This is the declaration of the BtoSGammaKagan class.
//
#include "Herwig/Utilities/Interpolator.h"
#include "BtoSGammaHadronicMass.h"
#include "ThePEG/Config/Complex.h"
#include "ThePEG/Config/Constants.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Constants;
/** \ingroup Decay
*
* The BtoSGammaKagan class implements the model of hep-ph/9805303 for the
* hadronic mass spectrum in \f$b\to s \gamma\f$ decays.
*/
class BtoSGammaKagan: public BtoSGammaHadronicMass {
/**
* Class for the integration is a friend to access private members
*/
friend struct KaganIntegrand;
public:
/**
* The default constructor.
*/
BtoSGammaKagan();
/**
* Returns the hadronic mass.
* @param mb The mass of the decaying B meson
* @param mquark The minimum mass of the hadronic system based on the consistuent quark
* masses.
* @return The hadronic mass
*/
virtual Energy hadronicMass(Energy mb,Energy mquark);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Members which return integrands
*/
//@{
/**
* Operator to return the integrand for the \f$s_{22}(y)\f$ function
* or \f$s_{27}(y)\f$ functions of hep-ph/9805303
* depending on the value of _iopt to be integrated
*/
double operator ()(double x) const {
if(_iopt==0) {
double reg(realG(x/_zratio)),img(imagG(x/_zratio));
return 16./27.*(1.-x)*(_zratio*_zratio/x/x*(sqr(reg)+sqr(img))+_zratio/x*reg+0.25);
}
else {
return -8./9.*_zratio*(realG(x/_zratio)+0.5*x/_zratio);
}
}
typedef double ValType;
typedef double ArgType;
/**
* Operator to return the integrand of the smeared function or
* Fermi function depending on the value of _iopt to be integrated
*/
InvEnergy smeared(Energy kp) const {
InvEnergy fermi = exponentialFermiFunction(kp,_fermilambda,_fermia,
_ferminorm,_fermilambda1);
if(_iopt==1) fermi *=KNLO(_MB*_y/(_mb+kp))*_MB/(_mb+kp);
return fermi;
}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BtoSGammaKagan & operator=(const BtoSGammaKagan &);
+ BtoSGammaKagan & operator=(const BtoSGammaKagan &) = delete;
private:
/** @name Functions to calculate the mass spectrum */
//@{
/**
* The derivative of the Sudakov form-factor from hep-ph/9805303
* @param y Ratio \f$E_\gamma/E^{\rm max}_\gamma\f$.
* @param alphaS The strong coupling, \f$\alpha_S\f$.
*/
double Delta(double y, double alphaS) const {
if(y>_ycut) return 0.;
double ln(log(1.-y));
return -4./3./pi/(1.-y)*alphaS*(ln+1.75)*exp(-2.*alphaS/3./pi*ln*(ln+3.5));
}
/**
* Kinematic function from semi-leptonic decay for normaalisation
*/
double semiLeptonicf() const {
double z2=sqr(_zratio);
return 1.-8.*_zratio*(1.-z2)-sqr(z2)-12.*z2*log(_zratio);
}
/**
* \f$s_{22}(y)\f$ function from hep-ph/9805303. Due to the integration
* required this function is computed by interpolation.
* @param y Ratio \f$E_\gamma/E^{\rm max}_\gamma\f$.
*/
double s22(double y) const {return (*_s22inter)(y);}
/**
* \f$s_{27}(y)\f$ function from hep-ph/9805303. Due to the integration
* required this function is computed by interpolation.
* @param y Ratio \f$E_\gamma/E^{\rm max}_\gamma\f$.
*/
double s27(double y) const {return (*_s27inter)(y);}
/**
* \f$s_{77}(y)\f$ function from hep-ph/9805303
* @param y Ratio \f$E_\gamma/E^{\rm max}_\gamma\f$.
*/
double s77(double y) const {
if(y>_ycut) y=_ycut;
return 1./3.*(7.+y*(1.-2.*y)-2.*(1.+y)*log(1.-y));
}
/**
* \f$s_{78}(y)\f$ function from hep-ph/9805303
* @param y Ratio \f$E_\gamma/E^{\rm max}_\gamma\f$.
*/
double s78(double y) const {
if(y>_ycut) y=_ycut;
return 8./9.*((1.-y)/y*log(1.-y)+1.+0.25*y*y);
}
/**
* \f$s_{88}(y)\f$ function from hep-ph/9805303
* @param y Ratio \f$E_\gamma/E^{\rm max}_\gamma\f$.
*/
double s88(double y) const {
double ratio(_mb/_ms),y2(sqr(y));
if(y>_ycut) y=_ycut;
return 1./27.*(2.*(2.-2.*y+y2)/y*(log(1.-y)+2.*log(ratio))-2.*y2-y-8.*(1.-y)/y);
}
/**
* The real part of the \f$G(t)\f$ function from hep-ph/9805303
*/
double realG(double t) const {
if(t<4.) {
double at(atan(sqrt(t/(4.-t))));
return -2.*sqr(at);
}
else {
double ln(log(0.5*(sqrt(t)+sqrt(t-4.))));
return 2.*(sqr(ln)-0.25*sqr(pi));
}
}
/**
* The imaginary part of the \f$G(t)\f$ function from hep-ph/9805303
*/
double imagG(double t) const {
if(t<4.) return 0.;
else return -2.*pi*log(0.5*(sqrt(t)+sqrt(t-4.)));
}
/**
* Strong coupling \f$\alpha_S\f$ at the scale \f$Q\f$
* @param Q The scale.
*/
double alphaS(Energy Q) {
double lo(1.-0.5*_beta0*_alphaSZ/pi*log(_mz/Q));
return _alphaSZ/lo*(1.-0.25*_beta1/_beta0*_alphaSZ/pi*log(lo)/lo);
}
/**
* Calculate the wilson coefficients we need
*/
void calculateWilsonCoefficients();
/**
* The \f$K'_{NLO}(1-y)\f$ function at parton level from hep-ph/9805303
*/
double KNLO(double y) const {
return _delta*Delta(y,_alphaSM)
+_alphaSM/pi*(s22(y)*sqr(_c20)+s77(y)*sqr(_c70)
+s88(y)*sqr(_c80)+s78(y)*_c70*_c80
+s27(y)*_c20*(_c70-_c80/3.));
}
//@}
private:
/**
* Initialisation of mass spectrum
*/
bool _initialize;
/**
* Quark masses and related parameters
*/
//@{
/**
* The top quark mass
*/
Energy _mt;
/**
* bottom quark mass
*/
Energy _mb;
/**
* charm quark mass
*/
Energy _mc;
/**
* strange quark mass
*/
Energy _ms;
/**
* Ratio of the strange quark mass to the bottom quark mass
*/
double _msovermb;
/**
* The ratio of the charm to bottom quark masses squared, \f$(m_c/m_b)^2\f$
*/
double _zratio;
//@}
/**
* The hadronic \f$\lambda_2\f$ parameter from hep-ph/9805303.
*/
Energy2 _lambda2;
/**
* Masses of other particles
*/
//@{
/**
* The W mass
*/
Energy _mw;
/**
* the Z mass
*/
Energy _mz;
/**
* Mass of the decaying B meson.
*/
Energy _MB;
//@}
/** @name Wilson coefficients, couplings and \f$\beta\f$-function coefficients*/
//@{
/**
* The leading order \f$c_2\f$ coefficient.
*/
double _c20;
/**
* The leading order \f$c_7\f$ coefficient.
*/
double _c70;
/**
* The leading order \f$c_8\f$ coefficient.
*/
double _c80;
/**
* First \f$\beta\f$-function coefficient
*/
double _beta0;
/**
* Second \f$\beta\f$-function coefficient
*/
double _beta1;
/**
* The electromagentic coupling
*/
double _alpha;
/**
* The strong coupling at the Z mass
*/
double _alphaSZ;
/**
* The renormalisation scale
*/
Energy _mub;
/**
* the strong coupling at the renormalisation scale \f$\mu_b\f$.
*/
double _alphaSM;
/**
* The CKM perfactor for the decay
*/
double _ckm;
/**
* Pre-factor for the correction term involving \f$\Delta(y)\f$.
*/
double _delta;
//@}
/**
* Interpolators for the integrate functions and related parameters
*/
//@{
/**
* Interpolator for the \f$s_{22}\f$ function
*/
Interpolator<double,double>::Ptr _s22inter;
/**
* Interpolator for the \f$s_{27}\f$ function
*/
Interpolator<double,double>::Ptr _s27inter;
/**
* Interpolator for the spectrum
*/
Interpolator<InvEnergy,Energy>::Ptr _pmHinter;
/**
* Values of \f$m_H\f$ for the interpolation of the spectrum
*/
vector<Energy> _mHinter;
/**
* Values of the differential rate for the interpolation of the spectrum
*/
vector<InvEnergy> _spectrum;
/**
* Maximum value of the spectrum for unweighting
*/
InvEnergy _spectmax;
/**
* Maximum number of tries for unweighting
*/
unsigned int _maxtry;
//@}
/**
* Parameters for the Fermi function
*/
//@{
/**
* The \f$\bar{\Lambda}\f$ parameter from hep-ph/9805303.
*/
Energy _fermilambda;
/**
* The power from from hep-ph/9805303.
*/
double _fermia;
/**
* The normalisation from hep-ph/9805303.
*/
InvEnergy _ferminorm;
/**
* \f$\lambda_1\f$ scale related to the kinetic energy of the b quark.
*/
Energy2 _fermilambda1;
//@}
/**
* Techincal parameters for the integration of the spectrum
*/
//@{
/**
* Cut-off parameter to avoid the singularity at y=1
*/
double _ycut;
/**
* Value of the energy fraction for which the integral is being performed
*/
double _y;
/**
* Cut-off on the photon energies
*/
double _deltacut;
/**
* Number of points for the interpolation of the s functions
*/
unsigned int _nsfunct;
/**
* Number of points for the interpolation of the spectrum
*/
unsigned int _nspect;
/**
* The function currently being integrated
*/
unsigned int _iopt;
//@}
};
/**
* A struct for the integrand which can access the dimensional value
* member of the BtoSGammaKagan class
*/
struct KaganIntegrand {
/**
* The constructor
*/
KaganIntegrand(Ptr<BtoSGammaKagan>::pointer in) : _kagan(in) {};
/**
* Get the function value
*/
InvEnergy operator ()(Energy arg) const {return _kagan->smeared(arg);}
/** Return type for GaussianIntegrator */
typedef InvEnergy ValType;
/** Argument type for GaussianIntegrator */
typedef Energy ArgType;
/**
* A pointer to the form factor to supply the integrand.
*/
Ptr<BtoSGammaKagan>::pointer _kagan;
};
}
#endif /* HERWIG_BtoSGammaKagan_H */
diff --git a/Decay/FormFactors/ChengHeavyBaryonFormFactor.h b/Decay/FormFactors/ChengHeavyBaryonFormFactor.h
--- a/Decay/FormFactors/ChengHeavyBaryonFormFactor.h
+++ b/Decay/FormFactors/ChengHeavyBaryonFormFactor.h
@@ -1,276 +1,276 @@
// -*- C++ -*-
#ifndef HERWIG_ChengHeavyBaryonFormFactor_H
#define HERWIG_ChengHeavyBaryonFormFactor_H
//
// This is the declaration of the ChengHeavyBaryonFormFactor class.
//
#include "BaryonFormFactor.h"
#include "ThePEG/PDT/ParticleData.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The ChengHeavyBaryonFormFactor class implements the form-factors
* from PRD53, 1457 and PRD56, 2799 for the semi-leptonic decay of bottom
* and charm hadrons. It is also intended for use with the results in PRD56, 2799
* for non-leptonic decays using the factorization approximation.
*
* @see BaryonFormFactor
*/
class ChengHeavyBaryonFormFactor: public BaryonFormFactor {
public:
/**
* Default constructor
*/
ChengHeavyBaryonFormFactor();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac12\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param f1v The form factor \f$F^V_1\f$.
* @param f2v The form factor \f$F^V_2\f$.
* @param f3v The form factor \f$F^V_3\f$.
* @param f1a The form factor \f$F^A_1\f$.
* @param f2a The form factor \f$F^A_2\f$.
* @param f3a The form factor \f$F^A_3\f$.
*/
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a);
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac32\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param g1v The form factor \f$G^V_1\f$.
* @param g2v The form factor \f$G^V_2\f$.
* @param g3v The form factor \f$G^V_3\f$.
* @param g4v The form factor \f$G^V_4\f$.
* @param g1a The form factor \f$G^A_1\f$.
* @param g2a The form factor \f$G^A_2\f$.
* @param g3a The form factor \f$G^A_3\f$.
* @param g4a The form factor \f$G^A_4\f$.
*/
virtual void SpinHalfSpinThreeHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & g1v,Complex & g2v,Complex & g3v,
Complex & g4v,Complex & g1a,Complex & g2a,
Complex & g3a,Complex & g4a);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ChengHeavyBaryonFormFactor & operator=(const ChengHeavyBaryonFormFactor &);
+ ChengHeavyBaryonFormFactor & operator=(const ChengHeavyBaryonFormFactor &) = delete;
private:
/** @name The quark masses. */
//@{
/**
* The mass of the up quark.
*/
Energy _mu;
/**
* The mass of the down quark.
*/
Energy _md;
/**
* The mass of the strange quark.
*/
Energy _ms;
/**
* The mass of the charm quark.
*/
Energy _mc;
/**
* The mass of the bottom quark.
*/
Energy _mb;
//@}
/**
* The normalization parameter \f$N_{fi}\f$ is the flavour and spin overlap
* from PRD56, 2799.
*/
vector<double> _Nfi;
/**
* The ratio of the flavour and spin overlap for the outgoing over incoming
* baryon, \f$\eta\f$ from PRD56, 2799.
*/
vector<double> _eta;
/**
* the form factor \f$f_1\f$ evaluated at the maximum value of \f$q^2\f$.
*/
vector<double> _f1;
/**
* the form factor \f$f_2\f$ evaluated at the maximum value of \f$q^2\f$.
*/
vector<double> _f2;
/**
* the form factor \f$f_3\f$ evaluated at the maximum value of \f$q^2\f$.
*/
vector<double> _f3;
/**
* the form factor \f$g_1\f$ evaluated at the maximum value of \f$q^2\f$.
*/
vector<double> _g1;
/**
* the form factor \f$g_2\f$ evaluated at the maximum value of \f$q^2\f$.
*/
vector<double> _g2;
/**
* the form factor \f$g_3\f$ evaluated at the maximum value of \f$q^2\f$.
*/
vector<double> _g3;
/**
* The pole mass for the vector form factors for the \f$b\to c\f$ transitiion.
*/
Energy _mVbc;
/**
* The pole mass for the vector form factors for the \f$b\to s\f$ transitiion.
*/
Energy _mVbs;
/**
* The pole mass for the vector form factors for the \f$c\to s\f$ transitiion.
*/
Energy _mVcs;
/**
* The pole mass for the vector form factors for the \f$b\to d\f$ transitiion.
*/
Energy _mVbd;
/**
* The pole mass for the vector form factors for the \f$c\to u\f$ transitiion.
*/
Energy _mVcu;
/**
* The pole mass for the axial-vector form factors for the \f$b\to c\f$ transitiion.
*/
Energy _mAbc;
/**
* The pole mass for the axial-vector form factors for the \f$b\to s\f$ transitiion.
*/
Energy _mAbs;
/**
* The pole mass for the axial-vector form factors for the \f$c\to s\f$ transitiion.
*/
Energy _mAcs;
/**
* The pole mass for the axial-vector form factors for the \f$b\to d\f$ transitiion.
*/
Energy _mAbd;
/**
* The pole mass for the axial-vector form factors for the \f$c\to u\f$ transitiion.
*/
Energy _mAcu;
};
}
#endif /* HERWIG_ChengHeavyBaryonFormFactor_H */
diff --git a/Decay/FormFactors/HQETFormFactor.h b/Decay/FormFactors/HQETFormFactor.h
--- a/Decay/FormFactors/HQETFormFactor.h
+++ b/Decay/FormFactors/HQETFormFactor.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// HQETFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HQETFormFactor_H
#define HERWIG_HQETFormFactor_H
//
// This is the declaration of the HQETFormFactor class.
//
#include "ScalarFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/**
* The HQETFormFactor class implements the form factors for the decay of
* B mesons into D and \f$D^*\f$ mesons using form factors based on Heavy Quark
* Effective theory of the parameterisation of hep-ph/9712417 away from the
* heavy quark limit.
*
* @see \ref HQETFormFactorInterfaces "The interfaces"
* defined for HQETFormFactor.
*/
class HQETFormFactor: public ScalarFormFactor {
public:
/**
* The default constructor.
*/
HQETFormFactor();
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form factor \f$f_0\f$.
* @param fp The form factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1,Complex & f0,
Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param A0 The form factor \f$A_0\f$
* @param A1 The form factor \f$A_1\f$
* @param A2 The form factor \f$A_2\f$
* @param V The form factor \f$V\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1,Complex & A0,
Complex & A1,Complex & A2, Complex & V) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HQETFormFactor & operator=(const HQETFormFactor &);
+ HQETFormFactor & operator=(const HQETFormFactor &) = delete;
private:
/**
* The normalisation parameter for the scalar form factors
*/
double _f1scalar;
/**
* The normalisation parameter for the vector form factors
*/
double _f1vector;
/**
* The form factor \f$R_1(\omega)\f$ at \f$\omega=1\f$.
*/
double _r1;
/**
* The form factor \f$R_2(\omega)\f$ at \f$\omega=1\f$.
*/
double _r2;
/**
* The slope parameter \f$\rho^2\f$ for the scalar form factors
*/
double _rho2scalar;
/**
* The slope parameter \f$\rho^2\f$ for the vector form factors
*/
double _rho2vector;
};
}
#endif /* HERWIG_HQETFormFactor_H */
diff --git a/Decay/FormFactors/ISGW2FormFactor.cc b/Decay/FormFactors/ISGW2FormFactor.cc
--- a/Decay/FormFactors/ISGW2FormFactor.cc
+++ b/Decay/FormFactors/ISGW2FormFactor.cc
@@ -1,1215 +1,1215 @@
// -*- C++ -*-
//
// ISGW2FormFactor.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ISGW2FormFactor class.
//
#include "ISGW2FormFactor.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
ISGW2FormFactor::ISGW2FormFactor() {
// include the a(omega) piece (off by default)
_includeaW = false;
// values of a_S at matching scale
_alphamuQM=0.6;
// the quark masses
_mdown = 0.33*GeV;
_mup = 0.33*GeV;
_mstrange = 0.55*GeV;
_mcharm = 1.82*GeV;
_mbottom = 5.20*GeV;
// 1 1S0 parameters
// the wavefunction parameters
_beta1S0ud = 0.41*GeV;
_beta1S0us = 0.44*GeV;
_beta1S0ss = 0.53*GeV;
_beta1S0cu = 0.45*GeV;
_beta1S0cs = 0.56*GeV;
_beta1S0ub = 0.43*GeV;
_beta1S0sb = 0.54*GeV;
_beta1S0cc = 0.88*GeV;
_beta1S0bc = 0.92*GeV;
// 1 3S1 parameters
// the wavefunction parameters
_beta3S1ud = 0.30*GeV;
_beta3S1us = 0.33*GeV;
_beta3S1ss = 0.37*GeV;
_beta3S1cu = 0.38*GeV;
_beta3S1cs = 0.44*GeV;
_beta3S1ub = 0.40*GeV;
_beta3S1sb = 0.49*GeV;
_beta3S1cc = 0.62*GeV;
_beta3S1bc = 0.75*GeV;
// 1P parameters
// the wavefunction parameters
_beta1Pud = 0.28*GeV;
_beta1Pus = 0.30*GeV;
_beta1Pss = 0.33*GeV;
_beta1Pcu = 0.33*GeV;
_beta1Pcs = 0.38*GeV;
_beta1Pub = 0.35*GeV;
_beta1Psb = 0.41*GeV;
_beta1Pcc = 0.52*GeV;
_beta1Pbc = 0.60*GeV;
// relativistic correction factors
_CfDrho = 0.889;
_CfDKstar = 0.928;
_CfDsKstar = 0.873;
_CfDsphi = 0.911;
_CfBrho = 0.905;
_CfBDstar = 0.989;
_CfBsKstar = 0.892;
_CfBsDstar = 0.984;
_CfBcDstar = 0.868;
_CfBcpsi = 0.967;
_CfBcBsstar = 1.0;
_CfBcBstar = 1.0;
// eta-eta' mixing angle
_thetaeta = -Constants::pi/9.;
// B_c to d cbar
addFormFactor(-541,-411 ,0,-4, 5, 1);
addFormFactor(-541,-413 ,1,-4, 5, 1);
addFormFactor(-541,-415 ,2,-4, 5, 1);
addFormFactor(-541, 10413,1,-2, 5, 1);
addFormFactor(-541,-20413,1,-4, 5, 1);
addFormFactor(-541, 10411,0, 4, 5, 1);
// B_c to u cbar
addFormFactor(-541,-421 ,0,-4, 5, 2);
addFormFactor(-541,-423 ,1,-4, 5, 2);
addFormFactor(-541,-425 ,2,-4, 5, 2);
addFormFactor(-541,-10423,1,-4, 5, 2);
addFormFactor(-541,-20423,1,-4, 5, 2);
addFormFactor(-541,-10421,0,-4, 5, 2);
// B_c to s cbar
addFormFactor(-541,-431 ,0,-4, 5, 3);
addFormFactor(-541,-433 ,1,-4, 5, 3);
addFormFactor(-541,-435 ,2,-4, 5, 3);
addFormFactor(-541,-10433,1,-4, 5, 3);
addFormFactor(-541,-20433,1,-4, 5, 3);
addFormFactor(-541,-10431,0, 4, 5, 3);
// B_c decays to c cbar
addFormFactor(-541, 441 ,0,-4, 5, 4);
addFormFactor(-541, 443 ,1,-4, 5, 4);
addFormFactor(-541, 445 ,2,-4, 5, 4);
addFormFactor(-541, 10443,1,-4, 5, 4);
addFormFactor(-541, 20443,1,-4, 5, 4);
addFormFactor(-541, 10441,0, 4, 5, 4);
// B_c to b dbar
addFormFactor( 541, 511 ,0, 5,-4,-1);
addFormFactor( 541, 513 ,1, 5,-4,-1);
addFormFactor( 541, 515 ,2, 5,-4,-1);
addFormFactor( 541, 10513,1, 5,-4,-1);
addFormFactor( 541, 20513,1, 5,-4,-1);
addFormFactor( 541, 10511,0, 5,-4,-1);
// B_c to b ubar
addFormFactor( 541, 521 ,0, 5,-4,-2);
addFormFactor( 541, 523 ,1, 5,-4,-2);
addFormFactor( 541, 525 ,2, 5,-4,-2);
addFormFactor( 541, 10523,1, 5,-4,-2);
addFormFactor( 541, 20523,1, 5,-4,-2);
addFormFactor( 541, 10521,0, 5,-4,-2);
// B_c decays to s bbar
addFormFactor( 541, 531 ,0, 5,-4,-3);
addFormFactor( 541, 533 ,1, 5,-4,-3);
addFormFactor( 541, 535 ,2, 5,-4,-3);
addFormFactor( 541, 10533,1, 5,-4,-3);
addFormFactor( 541, 20533,1, 5,-4,-3);
addFormFactor( 541, 10531,0, 5,-4,-3);
// B_s to d sbar
addFormFactor(-531, 311 ,0, 3,-5,-1);
addFormFactor(-531, 313 ,1, 3,-5,-1);
addFormFactor(-531, 315 ,2, 3,-5,-1);
addFormFactor(-531, 10313,1, 3,-5,-1);
addFormFactor(-531, 20313,1, 3,-5,-1);
addFormFactor(-531, 10311,0, 3,-5,-1);
// B_s to u sbar
addFormFactor(-531, 321 ,0, 3,-5,-2);
addFormFactor(-531, 323 ,1, 3,-5,-2);
addFormFactor(-531, 325 ,2, 3,-5,-2);
addFormFactor(-531, 10323,1, 3,-5,-2);
addFormFactor(-531, 20323,1, 3,-5,-2);
addFormFactor(-531, 10321,0, 3,-5,-2);
// B_s to s sbar
addFormFactor(-531, 221 ,0, 3,-5,-3);
addFormFactor(-531, 331 ,0, 3,-5,-3);
addFormFactor(-531, 333 ,1, 3,-5,-3);
addFormFactor(-531, 335 ,2, 3,-5,-3);
addFormFactor(-531, 10333,1, 3,-5,-3);
addFormFactor(-531, 20333,1, 3,-5,-3);
addFormFactor(-531, 10331,0, 3,-5,-3);
// B_s decays to c sbar
addFormFactor(-531, 431 ,0, 3,-5,-4);
addFormFactor(-531, 433 ,1, 3,-5,-4);
addFormFactor(-531, 435 ,2, 3,-5,-4);
addFormFactor(-531, 10433,1, 3,-5,-4);
addFormFactor(-531, 20433,1, 3,-5,-4);
addFormFactor(-531, 10431,0, 3,-5,-4);
// B_u decays to d ubar
addFormFactor(-521,-211 ,0,-2, 5, 1);
addFormFactor(-521,-213 ,1,-2, 5, 1);
addFormFactor(-521,-215 ,2,-2, 5, 1);
addFormFactor(-521,-10213,1,-2, 5, 1);
addFormFactor(-521,-20213,1,-2, 5, 1);
addFormFactor(-521,-10211,0,-2, 5, 1);
// B_u to uu (I=0)
addFormFactor(-521, 221 ,0,-2, 5, 2);
addFormFactor(-521, 331 ,0,-2, 5, 2);
addFormFactor(-521, 223 ,1,-2, 5, 2);
addFormFactor(-521, 225 ,2,-2, 5, 2);
addFormFactor(-521, 10223,1,-2, 5, 2);
addFormFactor(-521, 20223,1,-2, 5, 2);
addFormFactor(-521, 10221,0,-2, 5, 2);
// B_u to uu (I=1)
addFormFactor(-521, 111 ,0,-2, 5, 2);
addFormFactor(-521, 113 ,1,-2, 5, 2);
addFormFactor(-521, 115 ,2,-2, 5, 2);
addFormFactor(-521, 10113,1,-2, 5, 2);
addFormFactor(-521, 20113,1,-2, 5, 2);
addFormFactor(-521, 10111,0,-2, 5, 2);
// B_u decays to s ubar
addFormFactor(-521,-321 ,0,-2, 5, 3);
addFormFactor(-521,-323 ,1,-2, 5, 3);
addFormFactor(-521,-325 ,2,-2, 5, 3);
addFormFactor(-521,-10323,1,-2, 5, 3);
addFormFactor(-521,-20323,1,-2, 5, 3);
addFormFactor(-521,-10321,0,-2, 5, 3);
// B_u decays to c ubar
addFormFactor(-521, 421 ,0,-2, 5, 4);
addFormFactor(-521, 423 ,1,-2, 5, 4);
addFormFactor(-521, 425 ,2,-2, 5, 4);
addFormFactor(-521, 10423,1,-2, 5, 4);
addFormFactor(-521, 20423,1,-2, 5, 4);
addFormFactor(-521, 10421,0,-2, 5, 4);
// B_d decays to d dbar (I=0)
addFormFactor(-511, 221 ,0, 1,-5,-1);
addFormFactor(-511, 331 ,0, 1,-5,-1);
addFormFactor(-511, 223 ,1, 1,-5,-1);
addFormFactor(-511, 225 ,2, 1,-5,-1);
addFormFactor(-511, 10223,1, 1,-5,-1);
addFormFactor(-511, 20223,1, 1,-5,-1);
addFormFactor(-511, 10221,0, 1,-5,-1);
// B_d decays to d dbar (I=1)
addFormFactor(-511, 111 ,0, 1,-5,-1);
addFormFactor(-511, 113 ,1, 1,-5,-1);
addFormFactor(-511, 115 ,2, 1,-5,-1);
addFormFactor(-511, 10113,1, 1,-5,-1);
addFormFactor(-511, 20113,1, 1,-5,-1);
addFormFactor(-511, 10111,0, 1,-5,-1);
// B_d decays to u dbar
addFormFactor(-511, 211 ,0, 1,-5,-2);
addFormFactor(-511, 213 ,1, 1,-5,-2);
addFormFactor(-511, 215 ,2, 1,-5,-2);
addFormFactor(-511, 10213,1, 1,-5,-2);
addFormFactor(-511, 20213,1, 1,-5,-2);
addFormFactor(-511, 10211,0, 1,-5,-2);
// B_d decays to s dbar
addFormFactor(-511, 311 ,0, 1,-5,-3);
addFormFactor(-511, 313 ,1, 1,-5,-3);
addFormFactor(-511, 315 ,2, 1,-5,-3);
addFormFactor(-511, 10313,1, 1,-5,-3);
addFormFactor(-511, 20313,1, 1,-5,-3);
addFormFactor(-511, 10311,0, 1,-5,-3);
// B_d decays to c dbar
addFormFactor(-511, 411 ,0, 1,-5,-4);
addFormFactor(-511, 413 ,1, 1,-5,-4);
addFormFactor(-511, 415 ,2, 1,-5,-4);
addFormFactor(-511, 10413,1, 1,-5,-4);
addFormFactor(-511, 20413,1, 1,-5,-4);
addFormFactor(-511, 10411,0, 1,-5,-4);
// D_s to d sbar
addFormFactor( 431, 311,0,-3, 4, 1);
addFormFactor( 431, 313,1,-3, 4, 1);
addFormFactor( 431, 315,2,-3, 4, 1);
addFormFactor( 431, 10313,1,-3, 4, 1);
addFormFactor( 431, 20313,1,-3, 4, 1);
addFormFactor( 431, 10311,0,-3, 4, 1);
// D_s to u sbar
addFormFactor( 431, 321,0,-3, 4, 2);
addFormFactor( 431, 323,1,-3, 4, 2);
addFormFactor( 431, 325,2,-3, 4, 2);
addFormFactor( 431, 10323,1,-3, 4, 2);
addFormFactor( 431, 20323,1,-3, 4, 2);
addFormFactor( 431, 10321,0,-3, 4, 2);
// D_s to s sbar
addFormFactor( 431, 221 ,0,-3, 4, 3);
addFormFactor( 431, 331 ,0,-3, 4, 3);
addFormFactor( 431, 333 ,1,-3, 4, 3);
addFormFactor( 431, 335 ,2,-3, 4, 3);
addFormFactor( 431, 10333,1,-3, 4, 3);
addFormFactor( 431, 20333,1,-3, 4, 3);
addFormFactor( 431, 10331,0,-3, 4, 3);
// D0 to d ubar
addFormFactor( 421,-211 ,0,-2, 4, 1);
addFormFactor( 421,-213 ,1,-2, 4, 1);
addFormFactor( 421,-215 ,2,-2, 4, 1);
addFormFactor( 421,-10213,1,-2, 4, 1);
addFormFactor( 421,-20213,1,-2, 4, 1);
addFormFactor( 421,-10211,0,-2, 4, 1);
// D0 to u ubar (I=1)
addFormFactor( 421, 111 ,0,-2, 4, 2);
addFormFactor( 421, 113 ,1,-2, 4, 2);
addFormFactor( 421, 115 ,2,-2, 4, 2);
addFormFactor( 421, 10113,1,-2, 4, 2);
addFormFactor( 421, 20113,1,-2, 4, 2);
addFormFactor( 421, 10111,0,-2, 4, 2);
// D0 to u ubar (I=0)
addFormFactor( 421, 221 ,0,-2, 4, 2);
addFormFactor( 421, 331 ,0,-2, 4, 2);
addFormFactor( 421, 223 ,1,-2, 4, 2);
addFormFactor( 421, 225 ,2,-2, 4, 2);
addFormFactor( 421, 10223,1,-2, 4, 2);
addFormFactor( 421, 20223,1,-2, 4, 2);
addFormFactor( 421, 10221,0,-2, 4, 2);
// D0 to s ubar
addFormFactor( 421,-321 ,0,-2, 4, 3);
addFormFactor( 421,-323 ,1,-2, 4, 3);
addFormFactor( 421,-325 ,2,-2, 4, 3);
addFormFactor( 421,-10323,1,-2, 4, 3);
addFormFactor( 421,-20323,1,-2, 4, 3);
addFormFactor( 421,-10321,0,-2, 4, 3);
// D+ to d dbar I=0
addFormFactor( 411, 221 ,0,-1, 4, 1);
addFormFactor( 411, 331 ,0,-1, 4, 1);
addFormFactor( 411, 223 ,1,-1, 4, 1);
addFormFactor( 411, 225 ,2,-1, 4, 1);
addFormFactor( 411, 10223,1,-1, 4, 1);
addFormFactor( 411, 20223,1,-1, 4, 1);
addFormFactor( 411, 10221,0,-1, 4, 1);
// D+ to d dbar I=1
addFormFactor( 411, 111 ,0,-1, 4, 1);
addFormFactor( 411, 113 ,1,-1, 4, 1);
addFormFactor( 411, 115 ,2,-1, 4, 1);
addFormFactor( 411, 10113,1,-1, 4, 1);
addFormFactor( 411, 20113,1,-1, 4, 1);
addFormFactor( 411, 10111,0,-1, 4, 1);
// D+ to u dbar
addFormFactor( 411, 211 ,0,-1, 4, 2);
addFormFactor( 411, 213 ,1,-1, 4, 2);
addFormFactor( 411, 215 ,2,-1, 4, 2);
addFormFactor( 411, 10213,1,-1, 4, 2);
addFormFactor( 411, 20213,1,-1, 4, 2);
addFormFactor( 411, 10211,0,-1, 4, 2);
// D+ to s dbar
addFormFactor( 411,-311 ,0,-1, 4, 3);
addFormFactor( 411,-313 ,1,-1, 4, 3);
addFormFactor( 411,-315 ,2,-1, 4, 3);
addFormFactor( 411,-10313,1,-1, 4, 3);
addFormFactor( 411,-20313,1,-1, 4, 3);
addFormFactor( 411,-10311,0,-1, 4, 3);
// set the initial number of modes
initialModes(numberOfFactors());
}
void ISGW2FormFactor::doinit() {
ScalarFormFactor::doinit();
// set up the quark masses
_mquark.resize(5);
_mquark[0]=_mdown;
_mquark[1]=_mup;
_mquark[2]=_mstrange;
_mquark[3]=_mcharm;
_mquark[4]=_mbottom;
// value of alpha_S at the quark masses
_alphaQ.resize(5);
for(unsigned int ix=0;ix<5;++ix) {
_alphaQ[ix]=alphaS(_mquark[ix],sqr(_mquark[ix]));
}
_beta1S0.resize(5,vector<Energy>(5));
_mass1S0.resize(5,vector<Energy>(5));
_beta3S1.resize(5,vector<Energy>(5));
_beta1P .resize(5,vector<Energy>(5));
_massPoh.resize(5,vector<Energy>(5));
_massPth.resize(5,vector<Energy>(5));
// set up the beta values
_beta1S0[0][0] = _beta1S0ud;_beta3S1[0][0] = _beta3S1ud;_beta1P[0][0] = _beta1Pud;
_beta1S0[1][0] = _beta1S0ud;_beta3S1[1][0] = _beta3S1ud;_beta1P[1][0] = _beta1Pud;
_beta1S0[2][0] = _beta1S0us;_beta3S1[2][0] = _beta3S1us;_beta1P[2][0] = _beta1Pus;
_beta1S0[3][0] = _beta1S0cu;_beta3S1[3][0] = _beta3S1cu;_beta1P[3][0] = _beta1Pcu;
_beta1S0[4][0] = _beta1S0ub;_beta3S1[4][0] = _beta3S1ub;_beta1P[4][0] = _beta1Pub;
_beta1S0[0][1] = _beta1S0ud;_beta3S1[0][1] = _beta3S1ud;_beta1P[0][1] = _beta1Pud;
_beta1S0[1][1] = _beta1S0ud;_beta3S1[1][1] = _beta3S1ud;_beta1P[1][1] = _beta1Pud;
_beta1S0[2][1] = _beta1S0us;_beta3S1[2][1] = _beta3S1us;_beta1P[2][1] = _beta1Pus;
_beta1S0[3][1] = _beta1S0cu;_beta3S1[3][1] = _beta3S1cu;_beta1P[3][1] = _beta1Pcu;
_beta1S0[4][1] = _beta1S0ub;_beta3S1[4][1] = _beta3S1ub;_beta1P[4][1] = _beta1Pub;
_beta1S0[0][2] = _beta1S0us;_beta3S1[0][2] = _beta3S1us;_beta1P[0][2] = _beta1Pus;
_beta1S0[1][2] = _beta1S0us;_beta3S1[1][2] = _beta3S1us;_beta1P[1][2] = _beta1Pus;
_beta1S0[2][2] = _beta1S0ss;_beta3S1[2][2] = _beta3S1ss;_beta1P[2][2] = _beta1Pss;
_beta1S0[3][2] = _beta1S0cs;_beta3S1[3][2] = _beta3S1cs;_beta1P[3][2] = _beta1Pcs;
_beta1S0[4][2] = _beta1S0sb;_beta3S1[4][2] = _beta3S1sb;_beta1P[4][2] = _beta1Psb;
_beta1S0[0][3] = _beta1S0cu;_beta3S1[0][3] = _beta3S1cu;_beta1P[0][3] = _beta1Pcu;
_beta1S0[1][3] = _beta1S0cu;_beta3S1[1][3] = _beta3S1cu;_beta1P[1][3] = _beta1Pcu;
_beta1S0[2][3] = _beta1S0cs;_beta3S1[2][3] = _beta3S1cs;_beta1P[2][3] = _beta1Pcs;
_beta1S0[3][3] = _beta1S0cc;_beta3S1[3][3] = _beta3S1cc;_beta1P[3][3] = _beta1Pcc;
_beta1S0[4][3] = _beta1S0bc;_beta3S1[4][3] = _beta3S1bc;_beta1P[4][3] = _beta1Pbc;
_beta1S0[0][4] = _beta1S0ub;_beta3S1[0][4] = _beta3S1ub;_beta1P[0][4] = _beta1Pub;
_beta1S0[1][4] = _beta1S0ub;_beta3S1[1][4] = _beta3S1ub;_beta1P[1][4] = _beta1Pub;
_beta1S0[2][4] = _beta1S0sb;_beta3S1[2][4] = _beta3S1sb;_beta1P[2][4] = _beta1Psb;
_beta1S0[3][4] = _beta1S0bc;_beta3S1[3][4] = _beta3S1bc;_beta1P[3][4] = _beta1Pbc;
_beta1S0[4][4] = ZERO ;_beta3S1[4][4] = ZERO ;_beta1P[4][4] = ZERO ;
// set up the values of mbar
// get the particle data objects
tcPDPtr p1S0[5][5],p3S1[5][5];
p1S0[0][0] = getParticleData(111); p3S1[0][0] = getParticleData(113);
p1S0[1][0] = getParticleData(211); p3S1[1][0] = getParticleData(213);
p1S0[2][0] = getParticleData(311); p3S1[2][0] = getParticleData(313);
p1S0[3][0] = getParticleData(411); p3S1[3][0] = getParticleData(413);
p1S0[4][0] = getParticleData(511); p3S1[4][0] = getParticleData(513);
p1S0[0][1] = getParticleData(211); p3S1[0][1] = getParticleData(213);
p1S0[1][1] = getParticleData(111); p3S1[1][1] = getParticleData(113);
p1S0[2][1] = getParticleData(321); p3S1[2][1] = getParticleData(323);
p1S0[3][1] = getParticleData(421); p3S1[3][1] = getParticleData(423);
p1S0[4][1] = getParticleData(521); p3S1[4][1] = getParticleData(523);
p1S0[0][2] = getParticleData(311); p3S1[0][2] = getParticleData(313);
p1S0[1][2] = getParticleData(321); p3S1[1][2] = getParticleData(323);
p1S0[2][2] = getParticleData(331); p3S1[2][2] = getParticleData(333);
p1S0[3][2] = getParticleData(431); p3S1[3][2] = getParticleData(433);
p1S0[4][2] = getParticleData(531); p3S1[4][2] = getParticleData(533);
p1S0[0][3] = getParticleData(411); p3S1[0][3] = getParticleData(413);
p1S0[1][3] = getParticleData(421); p3S1[1][3] = getParticleData(423);
p1S0[2][3] = getParticleData(431); p3S1[2][3] = getParticleData(433);
p1S0[3][3] = getParticleData(441); p3S1[3][3] = getParticleData(443);
p1S0[4][3] = getParticleData(541); p3S1[4][3] = getParticleData(543);
p1S0[0][4] = getParticleData(511); p3S1[0][4] = getParticleData(513);
p1S0[1][4] = getParticleData(521); p3S1[1][4] = getParticleData(523);
p1S0[2][4] = getParticleData(531); p3S1[2][4] = getParticleData(533);
p1S0[3][4] = getParticleData(541); p3S1[3][4] = getParticleData(543);
p1S0[4][4] = getParticleData(551); p3S1[4][4] = getParticleData(553);
tcPDPtr p3P0[5][5],p3P1[5][5],p3P2[5][5],p1P1[5][5];
p3P0[0][0] = getParticleData(10111); p3P1[0][0] = getParticleData(20113);
p3P0[1][0] = getParticleData(10211); p3P1[1][0] = getParticleData(20213);
p3P0[2][0] = getParticleData(10311); p3P1[2][0] = getParticleData(20313);
p3P0[3][0] = getParticleData(10411); p3P1[3][0] = getParticleData(20413);
p3P0[4][0] = getParticleData(10511); p3P1[4][0] = getParticleData(20513);
p3P0[0][1] = getParticleData(10211); p3P1[0][1] = getParticleData(20213);
p3P0[1][1] = getParticleData(10111); p3P1[1][1] = getParticleData(20113);
p3P0[2][1] = getParticleData(10321); p3P1[2][1] = getParticleData(20323);
p3P0[3][1] = getParticleData(10421); p3P1[3][1] = getParticleData(20423);
p3P0[4][1] = getParticleData(10521); p3P1[4][1] = getParticleData(20523);
p3P0[0][2] = getParticleData(10311); p3P1[0][2] = getParticleData(20313);
p3P0[1][2] = getParticleData(10321); p3P1[1][2] = getParticleData(20323);
p3P0[2][2] = getParticleData(10331); p3P1[2][2] = getParticleData(20333);
p3P0[3][2] = getParticleData(10431); p3P1[3][2] = getParticleData(20433);
p3P0[4][2] = getParticleData(10531); p3P1[4][2] = getParticleData(20533);
p3P0[0][3] = getParticleData(10411); p3P1[0][3] = getParticleData(20413);
p3P0[1][3] = getParticleData(10421); p3P1[1][3] = getParticleData(20423);
p3P0[2][3] = getParticleData(10431); p3P1[2][3] = getParticleData(20433);
p3P0[3][3] = getParticleData(10441); p3P1[3][3] = getParticleData(20443);
p3P0[4][3] = getParticleData(10541); p3P1[4][3] = getParticleData(20543);
p3P0[0][4] = getParticleData(10511); p3P1[0][4] = getParticleData(20513);
p3P0[1][4] = getParticleData(10521); p3P1[1][4] = getParticleData(20523);
p3P0[2][4] = getParticleData(10531); p3P1[2][4] = getParticleData(20533);
p3P0[3][4] = getParticleData(10541); p3P1[3][4] = getParticleData(20543);
p3P0[4][4] = getParticleData(10551); p3P1[4][4] = getParticleData(20553);
p1P1[0][0]=getParticleData(10113); p3P2[0][0]=getParticleData(115);
p1P1[1][0]=getParticleData(10213); p3P2[1][0]=getParticleData(215);
p1P1[2][0]=getParticleData(10313); p3P2[2][0]=getParticleData(315);
p1P1[3][0]=getParticleData(10413); p3P2[3][0]=getParticleData(415);
p1P1[4][0]=getParticleData(10513); p3P2[4][0]=getParticleData(515);
p1P1[0][1]=getParticleData(10213); p3P2[0][1]=getParticleData(215);
p1P1[1][1]=getParticleData(10113); p3P2[1][1]=getParticleData(115);
p1P1[2][1]=getParticleData(10323); p3P2[2][1]=getParticleData(325);
p1P1[3][1]=getParticleData(10423); p3P2[3][1]=getParticleData(425);
p1P1[4][1]=getParticleData(10523); p3P2[4][1]=getParticleData(525);
p1P1[0][2]=getParticleData(10313); p3P2[0][2]=getParticleData(315);
p1P1[1][2]=getParticleData(10323); p3P2[1][2]=getParticleData(325);
p1P1[2][2]=getParticleData(10333); p3P2[2][2]=getParticleData(335);
p1P1[3][2]=getParticleData(10433); p3P2[3][2]=getParticleData(435);
p1P1[4][2]=getParticleData(10533); p3P2[4][2]=getParticleData(535);
p1P1[0][3]=getParticleData(10413); p3P2[0][3]=getParticleData(415);
p1P1[1][3]=getParticleData(10423); p3P2[1][3]=getParticleData(425);
p1P1[2][3]=getParticleData(10433); p3P2[2][3]=getParticleData(435);
p1P1[3][3]=getParticleData(10443); p3P2[3][3]=getParticleData(445);
p1P1[4][3]=getParticleData(10543); p3P2[4][3]=getParticleData(545);
p1P1[0][4]=getParticleData(10513); p3P2[0][4]=getParticleData(515);
p1P1[1][4]=getParticleData(10523); p3P2[1][4]=getParticleData(525);
p1P1[2][4]=getParticleData(10533); p3P2[2][4]=getParticleData(535);
p1P1[3][4]=getParticleData(10543); p3P2[3][4]=getParticleData(545);
p1P1[4][4]=getParticleData(10553); p3P2[4][4]=getParticleData(555);
// calculate the masses
for(unsigned int ix=0;ix<5;++ix) {
for(unsigned int iy=0;iy<5;++iy) {
Energy m1S0,m3S1,m3P0,m3P1,m3P2,m1P1;
if(!p1S0[ix][iy]) {
generator()->log() << "Error in ISGW2FormFactor::doinit don't have "
<< "ParticleData object for 1S0 " << ix << " " << iy
<< " setting mass to zero\n";
m1S0 = ZERO;
}
else {
m1S0 = p1S0[ix][iy]->mass();
}
if(!p3S1[ix][iy]) {
generator()->log() << "Error in ISGW2FormFactor::doinit don't have "
<< "ParticleData object for 3S1 " << ix << " " << iy
<< " setting mass to zero\n";
m3S1 = ZERO;
}
else {
m3S1 = p3S1[ix][iy]->mass();
}
if(!p3P0[ix][iy]) {
generator()->log() << "Error in ISGW2FormFactor::doinit don't have "
<< "ParticleData object for 3P0 " << ix << " " << iy
<< " setting mass to zero\n";
m3P0 = ZERO;
}
else {
m3P0 = p3P0[ix][iy]->mass();
}
if(!p3P1[ix][iy]) {
generator()->log() << "Error in ISGW2FormFactor::doinit don't have "
<< "ParticleData object for 3P1 " << ix << " " << iy
<< " setting mass to zero\n";
m3P1 = ZERO;
}
else {
m3P1 = p3P1[ix][iy]->mass();
}
if(!p3P2[ix][iy]) {
generator()->log() << "Error in ISGW2FormFactor::doinit don't have "
<< "ParticleData object for 3P2 " << ix << " " << iy
<< " setting mass to zero\n";
m3P2 = ZERO;
}
else {
m3P2 = p3P2[ix][iy]->mass();
}
if(!p1P1[ix][iy]) {
generator()->log() << "Error in ISGW2FormFactor::doinit don't have "
<< "ParticleData object for 1P1 " << ix << " " << iy
<< " setting mass to zero\n";
m1P1 = ZERO;
}
else {
m1P1 = p1P1[ix][iy]->mass();
}
// 1S0
_mass1S0[ix][iy] = 0.75 *m3S1+0.25 *m1S0;
// 1p 1/2
_massPoh[ix][iy] = 0.75 *m3P1+0.25 *m3P0;
// 1p 3/2
_massPth[ix][iy] = 0.625*m3P2+0.375*m1P1;
}
}
for(unsigned int ix=0;ix<3;++ix) {
for(unsigned int iy=0;iy<3;++iy) {
Energy mtemp = (4.*_massPoh[ix][iy]+8.*_massPth[ix][iy])/12.;
_massPoh[ix][iy]=mtemp;
_massPth[ix][iy]=mtemp;
}
}
}
void ISGW2FormFactor::persistentOutput(PersistentOStream & os) const {
os << ounit(_mdown,GeV) << ounit(_mup,GeV) << ounit(_mstrange,GeV)
<< ounit(_mcharm,GeV) << ounit(_mbottom,GeV) << ounit(_beta1S0ud,GeV)
<< ounit(_beta1S0us,GeV) << ounit(_beta1S0ss,GeV) << ounit(_beta1S0cu,GeV)
<< ounit(_beta1S0cs,GeV) << ounit(_beta1S0ub,GeV) << ounit(_beta1S0sb,GeV)
<< ounit(_beta1S0cc,GeV) << ounit(_beta1S0bc,GeV) << ounit(_beta3S1ud,GeV)
<< ounit(_beta3S1us,GeV) << ounit(_beta3S1ss,GeV) << ounit(_beta3S1cu,GeV)
<< ounit(_beta3S1cs,GeV) << ounit(_beta3S1ub,GeV) << ounit(_beta3S1sb,GeV)
<< ounit(_beta3S1cc,GeV) << ounit(_beta3S1bc,GeV) << ounit(_beta1Pud ,GeV)
<< ounit(_beta1Pus ,GeV) << ounit(_beta1Pss ,GeV) << ounit(_beta1Pcu ,GeV)
<< ounit(_beta1Pcs ,GeV) << ounit(_beta1Pub ,GeV) << ounit(_beta1Psb ,GeV)
<< ounit(_beta1Pcc ,GeV) << ounit(_beta1Pbc ,GeV)
<< _alphamuQM << _CfDrho << _CfDKstar << _CfDsKstar << _CfDsphi
<< _CfBrho << _CfBDstar << _CfBsKstar << _CfBsDstar << _CfBcDstar << _CfBcpsi
<< _CfBcBsstar << _CfBcBstar << _thetaeta << ounit(_mquark,GeV) << _alphaQ
<< ounit(_beta1S0,GeV) << ounit(_mass1S0,GeV) << ounit(_beta3S1,GeV)
<< ounit(_beta1P,GeV) << ounit(_massPoh,GeV) << ounit(_massPth,GeV) << _includeaW;
}
void ISGW2FormFactor::persistentInput(PersistentIStream & is, int) {
is >> iunit(_mdown,GeV) >> iunit(_mup,GeV) >> iunit(_mstrange,GeV)
>> iunit(_mcharm,GeV) >> iunit(_mbottom,GeV) >> iunit(_beta1S0ud,GeV)
>> iunit(_beta1S0us,GeV) >> iunit(_beta1S0ss,GeV) >> iunit(_beta1S0cu,GeV)
>> iunit(_beta1S0cs,GeV) >> iunit(_beta1S0ub,GeV) >> iunit(_beta1S0sb,GeV)
>> iunit(_beta1S0cc,GeV) >> iunit(_beta1S0bc,GeV) >> iunit(_beta3S1ud,GeV)
>> iunit(_beta3S1us,GeV) >> iunit(_beta3S1ss,GeV) >> iunit(_beta3S1cu,GeV)
>> iunit(_beta3S1cs,GeV) >> iunit(_beta3S1ub,GeV) >> iunit(_beta3S1sb,GeV)
>> iunit(_beta3S1cc,GeV) >> iunit(_beta3S1bc,GeV) >> iunit(_beta1Pud ,GeV)
>> iunit(_beta1Pus ,GeV) >> iunit(_beta1Pss ,GeV) >> iunit(_beta1Pcu ,GeV)
>> iunit(_beta1Pcs ,GeV) >> iunit(_beta1Pub ,GeV) >> iunit(_beta1Psb ,GeV)
>> iunit(_beta1Pcc ,GeV) >> iunit(_beta1Pbc ,GeV)
>> _alphamuQM >> _CfDrho >> _CfDKstar >> _CfDsKstar >> _CfDsphi
>> _CfBrho >> _CfBDstar >> _CfBsKstar >> _CfBsDstar >> _CfBcDstar >> _CfBcpsi
>> _CfBcBsstar >> _CfBcBstar >> _thetaeta >> iunit(_mquark,GeV) >> _alphaQ
>> iunit(_beta1S0,GeV) >> iunit(_mass1S0,GeV) >> iunit(_beta3S1,GeV)
>> iunit(_beta1P,GeV) >> iunit(_massPoh,GeV) >> iunit(_massPth,GeV) >> _includeaW;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<ISGW2FormFactor,ScalarFormFactor>
describeHerwigISGW2FormFactor("Herwig::ISGW2FormFactor", "HwFormFactors.so");
void ISGW2FormFactor::Init() {
static ClassDocumentation<ISGW2FormFactor> documentation
("The ISGW2FormFactor class implements the ISGW2 model of "
"PRD52, 2783.",
"The ISGW2 form factor model \\cite{Scora:1995ty} was used.",
"\\bibitem{Scora:1995ty} D.~Scora and N.~Isgur,"
"Phys.\\ Rev.\\ D {\\bf 52} (1995) 2783 [arXiv:hep-ph/9503486].\n"
"%%CITATION = PHRVA,D52,2783;%%\n");
static Parameter<ISGW2FormFactor,Energy> interfaceDownMass
("DownMass",
"The mass of the down quark in the ISGW model (this is a consituent mass)",
&ISGW2FormFactor::_mdown, GeV, 0.33*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceUpMass
("UpMass",
"The mass of the up quark in the ISGW model (this is a consituent mass)",
&ISGW2FormFactor::_mup, GeV, 0.33*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceStrangeMass
("StrangeMass",
"The mass of the strange quark in the ISGW model (this is a consituent mass)",
&ISGW2FormFactor::_mstrange, GeV, 0.55*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceCharmMass
("CharmMass",
"The mass of the charm quark in the ISGW model (this is a consituent mass)",
&ISGW2FormFactor::_mcharm, GeV, 1.82*GeV, ZERO, 3.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBottomMass
("BottomMass",
"The mass of the bottom quark in the ISGW model (this is a consituent mass)",
&ISGW2FormFactor::_mbottom, GeV, 5.20*GeV, 3.0*GeV, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0ud
("Beta1S0ud",
"The beta wavefunction parameter for the ud meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0ud, GeV, 0.41*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0us
("Beta1S0us",
"The beta wavefunction parameter for the us meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0us, GeV, 0.44*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0ss
("Beta1S0ss",
"The beta wavefunction parameter for the ss meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0ss, GeV, 0.53*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0cu
("Beta1S0cu",
"The beta wavefunction parameter for the cu meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0cu, GeV, 0.45*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0cs
("Beta1S0cs",
"The beta wavefunction parameter for the cs meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0cs, GeV, 0.56*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0ub
("Beta1S0ub",
"The beta wavefunction parameter for the ub meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0ub, GeV, 0.43*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0sb
("Beta1S0sb",
"The beta wavefunction parameter for the sb meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0sb, GeV, 0.54*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0cc
("Beta1S0cc",
"The beta wavefunction parameter for the cc meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0cc, GeV, 0.88*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1S0bc
("Beta1S0bc",
"The beta wavefunction parameter for the bc meson in the 1 1S0 level",
&ISGW2FormFactor::_beta1S0bc, GeV, 0.92*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pud
("Beta1Pud",
"The beta wavefunction parameter for the ud meson in the 1P level",
&ISGW2FormFactor::_beta1Pud, GeV, 0.28*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pus
("Beta1Pus",
"The beta wavefunction parameter for the us meson in the 1P level",
&ISGW2FormFactor::_beta1Pus, GeV, 0.30*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pss
("Beta1Pss",
"The beta wavefunction parameter for the ss meson in the 1P level",
&ISGW2FormFactor::_beta1Pss, GeV, 0.33*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pcu
("Beta1Pcu",
"The beta wavefunction parameter for the cu meson in the 1P level",
&ISGW2FormFactor::_beta1Pcu, GeV, 0.33*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pcs
("Beta1Pcs",
"The beta wavefunction parameter for the cs meson in the 1P level",
&ISGW2FormFactor::_beta1Pcs, GeV, 0.38*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pub
("Beta1Pub",
"The beta wavefunction parameter for the ub meson in the 1P level",
&ISGW2FormFactor::_beta1Pub, GeV, 0.35*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Psb
("Beta1Psb",
"The beta wavefunction parameter for the sb meson in the 1P level",
&ISGW2FormFactor::_beta1Psb, GeV, 0.41*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pcc
("Beta1Pcc",
"The beta wavefunction parameter for the cc meson in the 1P level",
&ISGW2FormFactor::_beta1Pcc, GeV, 0.52*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta1Pbc
("Beta1Pbc",
"The beta wavefunction parameter for the bc meson in the 1P level",
&ISGW2FormFactor::_beta1Pbc, GeV, 0.60*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1ud
("Beta3S1ud",
"The beta wavefunction parameter for the ud meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1ud, GeV, 0.30*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1us
("Beta3S1us",
"The beta wavefunction parameter for the us meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1us, GeV, 0.33*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1ss
("Beta3S1ss",
"The beta wavefunction parameter for the ss meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1ss, GeV, 0.37*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1cu
("Beta3S1cu",
"The beta wavefunction parameter for the cu meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1cu, GeV, 0.38*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1cs
("Beta3S1cs",
"The beta wavefunction parameter for the cs meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1cs, GeV, 0.44*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1ub
("Beta3S1ub",
"The beta wavefunction parameter for the ub meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1ub, GeV, 0.40*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1sb
("Beta3S1sb",
"The beta wavefunction parameter for the sb meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1sb, GeV, 0.49*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1cc
("Beta3S1cc",
"The beta wavefunction parameter for the cc meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1cc, GeV, 0.62*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,Energy> interfaceBeta3S1bc
("Beta3S1bc",
"The beta wavefunction parameter for the bc meson in the 3S1 level",
&ISGW2FormFactor::_beta3S1bc, GeV, 0.75*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceAlphaCutOff
("AlphaCutOff",
"The value of the strong coupling constnat at the cut-off",
&ISGW2FormFactor::_alphamuQM, 0.6, 0.0, 10.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfDrho
("CfDrho",
"The relativistic correction factor for D -> rho",
&ISGW2FormFactor::_CfDrho, 0.889, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfDKstar
("CfDKstar",
"The relativistic correction factor for D -> Kstar",
&ISGW2FormFactor::_CfDKstar, 0.928, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfDsKstar
("CfDsKstar",
"The relativistic correction factor for Ds -> Kstar",
&ISGW2FormFactor::_CfDsKstar, 0.873, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfDsphi
("CfDsphi",
"The relativistic correction factor for Ds -> phi",
&ISGW2FormFactor::_CfDsphi, 0.911, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBrho
("CfBrho",
"The relativistic correction factor for B -> rho",
&ISGW2FormFactor::_CfBrho, 0.905, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBDstar
("CfBDstar",
"The relativistic correction factor for B -> Dstar",
&ISGW2FormFactor::_CfBDstar, 0.989, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBsKstar
("CfBsKstar",
"The relativistic correction factor for Bs -> Kstar",
&ISGW2FormFactor::_CfBsKstar, 0.892, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBsDstar
("CfBsDstar",
"The relativistic correction factor for Bs -> Dstar",
&ISGW2FormFactor::_CfBsDstar, 0.984, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBcDstar
("CfBcDstar",
"The relativistic correction factor for Bc -> Dstar",
&ISGW2FormFactor::_CfBcDstar, 0.868, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBcpsi
("CfBcpsi",
"The relativistic correction factor for Bc -> psi",
&ISGW2FormFactor::_CfBcpsi, 0.967, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBcBsstar
("CfBcBsstar",
"The relativistic correction factor for Bc -> Bsstar",
&ISGW2FormFactor::_CfBcBsstar, 1.000, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceCfBcBstar
("CfBcBstar",
"The relativistic correction factor for Bc -> Bstar",
&ISGW2FormFactor::_CfBcBstar, 1.000, 0.0, 1.0,
false, false, true);
static Parameter<ISGW2FormFactor,double> interfaceThetaEtaEtaPrime
("ThetaEtaEtaPrime",
"The eta-eta' mixing angle",
&ISGW2FormFactor::_thetaeta, -Constants::pi/9., -Constants::pi, Constants::pi,
false, false, true);
static Switch<ISGW2FormFactor,bool> interfaceIncludeaW
("IncludeaW",
"Include the a(omega) piece of the Cji factor",
&ISGW2FormFactor::_includeaW, true, false, false);
static SwitchOption interfaceIncludeaWInclude
(interfaceIncludeaW,
"Yes",
"Include the factor",
true);
static SwitchOption interfaceIncludeaWDoNot
(interfaceIncludeaW,
"No",
"Do not include the factor",
false);
}
// member which does the work
void ISGW2FormFactor::formFactor(Energy2 q2, unsigned int iloc, int, int id1,
Energy mY,
Energy mX, Complex & f1,Complex & f2,Complex & f3,
Complex & f4) const {
useMe();
// get the flavours of the quarks etc
int jspin,spect,inquark,outquark;
formFactorInfo(iloc,jspin,spect,inquark,outquark);
int ifl0(abs(inquark)),ifl1(abs(outquark)),ifls(abs(spect));
// determine the multiplet
int ispin(abs(id1)/1000);
// masses of the quarks
Energy mQ(_mquark[ifl0-1]),mq(_mquark[ifl1-1]),ms(_mquark[ifls-1]);
// of the mesons
Energy mtildeX(mq+ms),mtildeY(mQ+ms),mup(mq*mQ/(mQ+mq)),mum(mq*mQ/(mQ-mq));
// wavefunction parameters for the mesons
Energy betaX(ZERO),mbarX(ZERO),
betaY(_beta1S0[ifl0-1][ifls-1]),mbarY(_mass1S0[ifl0-1][ifls-1]);
double Cf(1.);
// the wavefunction parameter for the outgoing meson
// 1S0
if(ispin==0&&jspin==0) {
betaX=_beta1S0[ifl1-1][ifls-1];
mbarX=_mass1S0[ifl1-1][ifls-1];
}
// 3S1
else if(ispin==0&&jspin==1) {
betaX = _beta3S1[ifl1-1][ifls-1];
mbarX = _mass1S0[ifl1-1][ifls-1];
// set the relativistic correction parameter
// decaying b
if(ifl0==5) {
if(ifls<3) Cf = ifl1<3 ? _CfBrho : _CfBDstar;
else if(ifls==3) Cf = ifl1==4 ? _CfBsDstar : _CfBsKstar;
else if(ifls==4) Cf = ifl1==4 ? _CfBcpsi : _CfBcDstar;
}
// decaying D
else if(ifl0==4) {
if(ifls<3) Cf = ifl1<3 ? _CfDrho : _CfDKstar;
else if(ifls==3) Cf = ifl1<3 ? _CfDsKstar : _CfDsphi;
else if(ifls==5) Cf = ifl1<3 ? _CfBcBstar : _CfBcBsstar;
}
}
else if(ispin==10&&jspin==0) {
betaX=_beta1P[ifl1-1][ifls-1];
mbarX=_massPoh[ifl1-1][ifls-1];
}
// 1 3/2 P 1 (1 P1)
else if((ispin==0&&jspin==2)||(ispin==10&&jspin==1)) {
betaX = _beta1P[ifl1-1][ifls-1];
mbarX=_massPth[ifl1-1][ifls-1];
}
// 1 1/2 P1 ( 3 P1)
else if(ispin==20&&jspin==1) {
betaX = _beta1P[ifl1-1][ifls-1];
mbarX=_massPoh[ifl1-1][ifls-1];
}
else {
throw Exception() << "ISGWS2FormFactor::formFactor"
<< " unknown multiplet" << Exception::abortnow;
}
Energy2 beta2XY(0.5*(betaX*betaX+betaY*betaY));
// number of active flavours
int Nf = ifl0-1;
int Nfp = ifl1==2 ? 0 : ifl1-1;
// first piece of the f_n function
double betar(betaX*betaY/beta2XY),fn(sqrt(mtildeX/mtildeY)*betar*sqrt(betar));
// q dependent piece
Energy2 tm((mY-mX)*(mY-mX)),tmmt(tm-q2);
// radius parameter
InvEnergy2 r2(0.75/mQ/mq+1.5*ms*ms/mbarX/mbarY/beta2XY
+16./mbarX/mbarY/(33.-2.*Nfp)*log(_alphamuQM/_alphaQ[ifl1-1]));
// the parameters for the form-factor depenedent piece
double rmbmtY(sqrt(mbarY/mtildeY)),rmbmtX(sqrt(mbarX/mtildeX));
// work out wtilde
double wt(1.+0.5*tmmt/mbarX/mbarY);
// storage of the form factors
Energy f(ZERO);
InvEnergy g(ZERO),appam(ZERO),apmam(ZERO);
InvEnergy2 h(ZERO),bp(ZERO),bm(ZERO);
double fpmfm(0.),fppfm(0.),k(0.);
// scalar and vector from 1S levels
if(ispin==0) {
// parameters for the beta functions
double asopi(alphaS(mq,mq*mQ)/Constants::pi),w(1.+0.5*tmmt/mX/mY);
double aI(-6./(33.-2.*Nf)),rw(1./sqrt(w*w-1)*log(w+sqrt(w*w-1.)));
double aLw(8./(33.-2.*Nfp)*(w*rw-1.));
double cji(pow(_alphaQ[ifl0-1]/_alphaQ[ifl1-1],aI));
if(_includeaW) cji*=pow(_alphaQ[ifl1-1]/_alphamuQM,aLw);
double zji(mq/mQ);
double gamji(-2.*zji/(1.-zji)*log(zji)-2.),chiji(-1.-gamji/(1.-zji));
// scalar
if(jspin==0) {
double fact((1.+1./12.*r2*tmmt));
fn/=(fact*fact);
fact = (1.-0.5*ms*mq/mup/mtildeX*betaY*betaY/beta2XY);
fppfm = fn*rmbmtX/rmbmtY*cji*(1.+asopi*(gamji-2./3.*chiji))*
(2.-mtildeX/mq*fact);
fpmfm = fn*rmbmtY/rmbmtX*cji*(1.+asopi*(gamji+2./3.*chiji))*mtildeY/mq*fact;
}
else if(jspin==1) {
// factors for the F and R functions
double fact((1.+1./12.*r2*tmmt));
fn/=(fact*fact);
double betaapmam=1./3.-4./3./(1-zji)-chiji
+gamji*(1.-2./3.*(1.+zji)/(1.-zji)/(1.-zji));
double ftemp = Cf*fn*rmbmtX*rmbmtY*cji*(1.+asopi*(-2./3.+gamji));
double gtemp = fn/rmbmtX/rmbmtY*cji*(1.+asopi*( 2./3.+gamji));
double aptemp = fn*rmbmtX/(rmbmtY*rmbmtY*rmbmtY)*cji;
double amtemp = fn/rmbmtX/rmbmtY*cji*(1.+asopi*betaapmam);
// rest of the calculation
f = ftemp*mtildeY*(1.+wt+0.5*ms*(wt-1.)/mup);
g =0.5*gtemp*(1./mq-0.5*ms*betaY*betaY/mum/mtildeX/beta2XY);
appam = aptemp*(ms*betaX*betaX/(1.+wt)/mq/mQ/beta2XY*
(1.-0.5*ms*betaX*betaX/mtildeY/beta2XY)
+asopi/mtildeY*(-1.-chiji+4./3./(1.-zji)
+2./3.*(1.+zji)/sqr(1.-zji)*gamji));
apmam =-amtemp/mtildeX*(mtildeY/mQ
-0.5*ms*betaX*betaX/mup/beta2XY
+wt*ms*mtildeY*betaX*betaX/(wt+1.)/mq/mQ/beta2XY*
(1.-0.5*ms/mtildeY*betaX*betaX/beta2XY));
}
else if(jspin==2) {
// factors for the F function
double fact((1.+1./18.*r2*tmmt));
fn*=betar/(fact*fact*fact);
double htemp = fn/rmbmtX/(rmbmtY*rmbmtY*rmbmtY);
double ktemp = fn*rmbmtX/rmbmtY;
double bptemp(fn*rmbmtX/(rmbmtY*rmbmtY*rmbmtY*rmbmtY*rmbmtY));
double bmtemp(fn/rmbmtX/(rmbmtY*rmbmtY*rmbmtY));
// functions themselves
double or2(sqrt(0.5));
h = 0.5*htemp*ms*or2/mtildeY/betaY*(1./mq-0.5*ms*betaY*betaY/mum/mtildeX/beta2XY);
k = or2*ktemp*ms/betaY*(1.+wt);
InvEnergy2 bppbm = 0.25*bptemp*or2*ms*ms/mq/mQ/mtildeY/betaY*betaX*betaX/beta2XY*
(1.-0.5*ms/mtildeY*betaX*betaX/beta2XY);
InvEnergy2 bpmbm = -or2*bmtemp*ms/mQ/mtildeX/betaY*
(1.-0.5*ms*mQ/mup/mtildeY*betaX*betaX/beta2XY
+0.25*ms/mq*betaX*betaX/beta2XY*(1.-0.5*ms/mtildeY*betaX*betaX/beta2XY));
// conversion
bp = 0.5*(bppbm+bpmbm);
bm = 0.5*(bppbm-bpmbm);
}
}
// 1 3P0
else if(ispin==10&&jspin==0) {
fn*=betar;
double fact=(1.+1./18.*r2*tmmt);
fn/=(fact*fact*fact);
fn *= sqrt(2./3.)*ms/betaY;
fppfm =-fn*rmbmtX/rmbmtY;
fpmfm = fn*rmbmtY/rmbmtX*mtildeY/mtildeX;
}
// 1 3/2 P1 ( 1 P1)
else if(ispin==10&&jspin==1) {
// factors for the F and R functions
double fact=(1.+1./18.*r2*tmmt);
fn*=betar/(fact*fact*fact);
double ftemp = fn*rmbmtX*rmbmtY;
double gtemp = fn/rmbmtX/rmbmtY;
double aptemp = fn*rmbmtX/(rmbmtY*rmbmtY*rmbmtY);
double amtemp = fn/rmbmtX/rmbmtY;
// light meson or onium
if((ifls<3&&ifl1<3)||(ifls==ifl1)) {
double oor2(sqrt(0.5));
f = oor2*ftemp*mtildeY*betaY*(1./mup
+ms*mtildeX/3./mq/betaY/betaY*(wt-1.)*(wt-1.));
g = oor2*gtemp *(0.25*mtildeY*betaY/mQ/mq/mtildeX+(wt-1.)*ms/6./mtildeX/betaY);
appam = oor2*aptemp*ms/mtildeY/betaY*(1.-ms/mq+0.5*ms/mup*betaY*betaY/beta2XY);
apmam = oor2*amtemp*ms/mq/betaY*((4.-wt)/3.
-0.5*ms*mq/mtildeX/mup*betaY*betaY/beta2XY);
}
// heavy meson
else {
double oor3(1./sqrt(3.));
f =-2.*ftemp*oor3*mtildeY*betaY*
(1./mq+0.5*mtildeX*ms*(wt-1.)/betaY/betaY*
(0.5*(wt+1.)/mq-0.5*ms*betaY*betaY/mum/mtildeX/beta2XY));
g =-0.5*gtemp*oor3*(0.5*(1.+wt)+0.5*betaY*betaY*mtildeY/ms/mq/mQ)*ms
/betaY/mtildeX;
appam =-0.5*aptemp/oor3*ms/betaY/mtildeY*
(1.-ms/3./mq-ms/3.*betaY*betaY/beta2XY*
(0.5/mum-1./mup));
apmam =-0.5*amtemp*oor3*ms/betaY/mtildeX*
((2.-wt)*mtildeX/mq+ms*betaY*betaY/beta2XY*(0.5/mum-1./mup));
}
}
// 1 1/2 P 1 (3 P1)
else if(ispin==20&&jspin==1) {
// factors for the F and R functions
double fact=(1.+1./18.*r2*tmmt);
fn*=betar/(fact*fact*fact);
double ftemp = fn*rmbmtX*rmbmtY;
double gtemp = fn/rmbmtX/rmbmtY;
double aptemp = fn*rmbmtX/(rmbmtY*rmbmtY*rmbmtY);
double amtemp = fn/rmbmtX/rmbmtY;
// light meson
if( ( ifls<3 && ifl1<3 ) || ( ifl1==ifls ) ) {
f =-ftemp *mtildeY*betaY*(1./mum
+ms*mtildeX*(wt-1.)/betaY/betaY*
((5.+wt)/6./mq-0.5/mum*ms/mtildeX*
betaY*betaY/beta2XY));
g =-gtemp *0.5*ms/mtildeX/betaY*(5.+wt)/6.;
appam =-aptemp*0.5*ms*mtildeX/mq/mtildeY/betaY*
(1.-0.5*ms*mq/mtildeX/mum*betaY*betaY/beta2XY);
apmam = amtemp*0.5*ms/mq/betaY*((wt+2.)/3.
-0.5*ms*mq/mtildeX/mum*betaY*betaY/beta2XY);
}
// heavy meson
else {
double r2o3(sqrt(2./3.));
f = ftemp*r2o3*mtildeY*betaY*(0.5/mq-1.5/mQ+ms*mtildeX*(wt-1.)/betaY/betaY*
(1./mq-0.5*ms*betaY*betaY/mum/mtildeX/beta2XY));
g = gtemp *0.5*r2o3*ms/betaY/mtildeX*(1.-0.25*betaY*betaY*mtildeY/ms/mq/mQ);
appam = aptemp*0.5*r2o3*ms*ms*betaX*betaX/mtildeY/mq/betaY/beta2XY;
apmam = -amtemp*r2o3*ms/mtildeX/betaY*(1.+0.5*ms*betaX*betaX/mq/beta2XY);
}
}
else {
throw Exception() << "ISGWS2FormFactor::formFactor"
<< " unknown multiplet" << Exception::abortnow;
}
// the final manipulations
if(jspin==0) {
double fp,fm;
fp = 0.5*(fppfm+fpmfm);
fm = 0.5*(fppfm-fpmfm);
// convert to the standard form
f1 = q2/(mY*mY-mX*mX)*fm+fp;
f2 = fp;
}
else if(jspin==1) {
InvEnergy ap(0.5*(appam+apmam)),am(0.5*(appam-apmam));
// convert to the standard notation
Energy msum(mX+mY),mdiff(mY-mX);
Complex ii(0.,1.);
f2 = -ii*f/msum;
- f3 = +ii*ap*msum;
- f1 = -ii*0.5/mX*(am*q2+ii*msum*f2-ii*mdiff*f3);
- f4 = ii*g*msum;
+ f3 = +Complex(ii*ap*msum);
+ f1 = -Complex(ii*0.5/mX*(am*q2+ii*msum*f2-ii*mdiff*f3));
+ f4 = Complex(ii*g*msum);
}
else if(jspin==2) {
Energy msum(mX+mY);
f1 = h*sqr(msum);
f2 = k;
f3 = bp*sqr(msum);
f4 = bm*sqr(msum);
}
// special for mixing
double fact;
if(id1==ParticleID::eta) {
if(ifl1==3&&ifls==3){fact=-2.*cos(_thetaeta)/sqrt(6.)-sin(_thetaeta)/sqrt(3.);}
else{fact=cos(_thetaeta)/sqrt(6.)-sin(_thetaeta)/sqrt(3.);}
f1*=fact;f2*=fact;f3*=fact;f4*=fact;
}
else if(id1==ParticleID::etaprime) {
if(ifl1==3&&ifls==3){fact=-2.*sin(_thetaeta)/sqrt(6.)+cos(_thetaeta)/sqrt(3.);}
else{fact=sin(_thetaeta)/sqrt(6.)+cos(_thetaeta)/sqrt(3.);}
f1*=fact;f2*=fact;f3*=fact;f4*=fact;
}
else if(ifl1==ifls&&ifl1<3) {
if(abs(ifl1)==1&&int(id1/10)%100==1){fact=-sqrt(0.5);}
else{fact=sqrt(0.5);}
f1*=fact;f2*=fact;f3*=fact;f4*=fact;
}
}
// form-factor for scalar to scalar
void ISGW2FormFactor::ScalarScalarFormFactor(Energy2 q2, unsigned int iloc,int id0,
int id1, Energy mY, Energy mX,
Complex & f0,Complex & fp) const {
Complex d1(0.),d2(0.);
formFactor(q2,iloc,id0,id1,mY,mX,f0,fp,d1,d2);
}
// form-factor for scalar to vector
void ISGW2FormFactor::ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0,
int id1, Energy mY, Energy mX,
Complex & A0,Complex & A1,
Complex & A2,Complex & V) const {
formFactor(q2,iloc,id0,id1,mY,mX,A0,A1,A2,V);
}
// form-factor for scalar to tensor
void ISGW2FormFactor::
ScalarTensorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy mY, Energy mX, complex<InvEnergy2> & h,
Complex & k,complex<InvEnergy2> & bp,
complex<InvEnergy2> & bm) const {
Complex f1,f2,f3,f4;
formFactor(q2,iloc,id0,id1,mY,mX,f1,f2,f3,f4);
Energy msum(mX+mY);
h = f1/sqr(msum);
k = f2;
bp = f3/sqr(msum);
bm = f4/sqr(msum);
}
void ISGW2FormFactor::dataBaseOutput(ofstream & output,bool header,bool create) const {
if(header) output << "update decayers set parameters=\"";
if(create) output << "create Herwig::ISGW2FormFactor " << name() << "\n";
output << "newdef " << name() << ":DownMass " << _mdown/GeV << "\n";
output << "newdef " << name() << ":UpMass " << _mup/GeV << "\n";
output << "newdef " << name() << ":StrangeMass " << _mstrange/GeV << "\n";
output << "newdef " << name() << ":CharmMass " << _mcharm/GeV << "\n";
output << "newdef " << name() << ":BottomMass " << _mbottom/GeV << "\n";
output << "newdef " << name() << ":Beta1S0ud " << _beta1S0ud/GeV << "\n";
output << "newdef " << name() << ":Beta1S0us " << _beta1S0us/GeV << "\n";
output << "newdef " << name() << ":Beta1S0ss " << _beta1S0ss/GeV << "\n";
output << "newdef " << name() << ":Beta1S0cu " << _beta1S0cu/GeV << "\n";
output << "newdef " << name() << ":Beta1S0cs " << _beta1S0cs/GeV << "\n";
output << "newdef " << name() << ":Beta1S0ub " << _beta1S0ub/GeV << "\n";
output << "newdef " << name() << ":Beta1S0sb " << _beta1S0sb/GeV << "\n";
output << "newdef " << name() << ":Beta1S0cc " << _beta1S0cc/GeV << "\n";
output << "newdef " << name() << ":Beta1S0bc " << _beta1S0bc/GeV << "\n";
output << "newdef " << name() << ":Beta1Pud " << _beta1Pud/GeV << "\n";
output << "newdef " << name() << ":Beta1Pus " << _beta1Pus/GeV << "\n";
output << "newdef " << name() << ":Beta1Pss " << _beta1Pss/GeV << "\n";
output << "newdef " << name() << ":Beta1Pcu " << _beta1Pcu/GeV << "\n";
output << "newdef " << name() << ":Beta1Pcs " << _beta1Pcs/GeV << "\n";
output << "newdef " << name() << ":Beta1Pub " << _beta1Pub/GeV << "\n";
output << "newdef " << name() << ":Beta1Psb " << _beta1Psb/GeV << "\n";
output << "newdef " << name() << ":Beta1Pcc " << _beta1Pcc/GeV << "\n";
output << "newdef " << name() << ":Beta1Pbc " << _beta1Pbc/GeV << "\n";
output << "newdef " << name() << ":Beta3S1ud " << _beta3S1ud/GeV << "\n";
output << "newdef " << name() << ":Beta3S1us " << _beta3S1us/GeV << "\n";
output << "newdef " << name() << ":Beta3S1ss " << _beta3S1ss/GeV << "\n";
output << "newdef " << name() << ":Beta3S1cu " << _beta3S1cu/GeV << "\n";
output << "newdef " << name() << ":Beta3S1cs " << _beta3S1cs/GeV << "\n";
output << "newdef " << name() << ":Beta3S1ub " << _beta3S1ub/GeV << "\n";
output << "newdef " << name() << ":Beta3S1sb " << _beta3S1sb/GeV << "\n";
output << "newdef " << name() << ":Beta3S1cc " << _beta3S1cc/GeV << "\n";
output << "newdef " << name() << ":Beta3S1bc " << _beta3S1bc/GeV << "\n";
output << "newdef " << name() << ":AlphaCutOff " << _alphamuQM << "\n";
output << "newdef " << name() << ":CfDrho " << _CfDrho << "\n";
output << "newdef " << name() << ":CfDKstar " << _CfDKstar << "\n";
output << "newdef " << name() << ":CfDsKstar " << _CfDsKstar << "\n";
output << "newdef " << name() << ":CfDsphi " << _CfDsphi << "\n";
output << "newdef " << name() << ":CfBrho " << _CfBrho << "\n";
output << "newdef " << name() << ":CfBDstar " << _CfBDstar << "\n";
output << "newdef " << name() << ":CfBsKstar " << _CfBsKstar << "\n";
output << "newdef " << name() << ":CfBsDstar " << _CfBsDstar << "\n";
output << "newdef " << name() << ":CfBcDstar " << _CfBcDstar << "\n";
output << "newdef " << name() << ":CfBcpsi " << _CfBcpsi << "\n";
output << "newdef " << name() << ":CfBcBsstar " << _CfBcBsstar << "\n";
output << "newdef " << name() << ":CfBcBstar " << _CfBcBstar << "\n";
output << "newdef " << name() << ":ThetaEtaEtaPrime " << _thetaeta << "\n";
ScalarFormFactor::dataBaseOutput(output,false,false);
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/FormFactors/ISGW2FormFactor.h b/Decay/FormFactors/ISGW2FormFactor.h
--- a/Decay/FormFactors/ISGW2FormFactor.h
+++ b/Decay/FormFactors/ISGW2FormFactor.h
@@ -1,504 +1,504 @@
// -*- C++ -*-
//
// ISGW2FormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ISGW2FormFactor_H
#define HERWIG_ISGW2FormFactor_H
//
// This is the declaration of the ISGW2FormFactor class.
//
#include "ScalarFormFactor.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/Repository/EventGenerator.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The ISGW2FormFactor class is the implementation of
* the ISGW2 model of Phys. Rev. D52, 2783 (1995) for the scalar meson form
* factors.
*
* It inherits from the ScalarFormFactor class and implements
* the calculation of the relevant form factors.
*
* @see ScalarFormFactor
* @see ISGWFormFactor
*/
class ISGW2FormFactor: public ScalarFormFactor {
public:
/**
* Default constructor
*/
ISGW2FormFactor();
/** @name Form-Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form-factor \f$f_0\f$.
* @param fp The form-factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1,Complex & f0,
Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param V The form-factor \f$V\f$
* @param A0 The form-factor \f$A_0\f$
* @param A1 The form-factor \f$A_1\f$
* @param A2 The form-factor \f$A_2\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1, Complex & V,
Complex & A0,Complex & A1,Complex & A2) const;
/**
* The form factor for the weak decay of a scalar to a tensor.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param h The form-factor \f$h\f$.
* @param k The form-factor \f$k\f$.
* @param bp The form-factor \f$b_+\f$.
* @param bm The form-factor \f$b_-\f$.
*/
virtual void ScalarTensorFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1, complex<InvEnergy2> & h,
Complex & k, complex<InvEnergy2> & bp,
complex<InvEnergy2> & bm) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** The member which implements all the different form-factors
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f1 The first form-factor.
* @param f2 The second form-factor.
* @param f3 The third form-factor.
* @param f4 The fourth form-factor.
*/
void formFactor(Energy2 q2,unsigned int iloc,int id0,int id1,Energy m0,
Energy m1,Complex & f1,Complex & f2,
Complex & f3,Complex & f4) const;
// general member to calculate all the form-factors
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ISGW2FormFactor & operator=(const ISGW2FormFactor &);
+ ISGW2FormFactor & operator=(const ISGW2FormFactor &) = delete;
protected:
/**
* The saturated \f$\alpha_S\f$ used to calculate the form-factors.
* @param mass Mass scale to work out the number of flavours.
* @param q2 \f$q^2\f$ the scale.
* @return the value of \f$\alpha_S\f$.
*/
double alphaS(Energy mass, Energy2 q2) const {
Energy2 lqcd2(0.04*GeV2);
double nflav(4.);
double output(_alphamuQM);
if (q2>0.36*GeV2) {
if(mass<_mcharm+0.03*GeV) nflav=3.0;
output = 12.*Constants::pi/(33.-2.*nflav)/log(q2/lqcd2);
}
return output;
}
private:
/** @name Quark masses */
//@{
/**
* The down quark mass
*/
Energy _mdown;
/**
* The up quark mass
*/
Energy _mup;
/**
* The strange quark mass
*/
Energy _mstrange;
/**
* The charm quark mass
*/
Energy _mcharm;
/**
* The bottom quark mass
*/
Energy _mbottom;
/**
* The masses of the quarks as a vector
*/
vector<Energy> _mquark;
//@}
/** @name Wave function parameters for the \f$1^1S_0\f$ level.*/
//@{
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$u\bar{d}\f$
*/
Energy _beta1S0ud;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$u\bar{s}\f$
*/
Energy _beta1S0us;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$s\bar{s}\f$
*/
Energy _beta1S0ss;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$c\bar{u}\f$
*/
Energy _beta1S0cu;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$c\bar{s}\f$
*/
Energy _beta1S0cs;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$u\bar{b}\f$
*/
Energy _beta1S0ub;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$s\bar{b}\f$
*/
Energy _beta1S0sb;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$c\bar{c}\f$
*/
Energy _beta1S0cc;
/**
* The wavefunction \f$1^1S_0\f$ \f$\beta\f$ variational parameter for \f$b\bar{c}\f$
*/
Energy _beta1S0bc;
/**
* The wavefunction parameters as an array
*/
vector<vector<Energy> > _beta1S0;
/**
* The masses as a array
*/
vector<vector<Energy> > _mass1S0;
//@}
/** @name Wave function parameters for the \f$1^3S_1\f$ level.*/
//@{
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$u\bar{d}\f$
*/
Energy _beta3S1ud;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$u\bar{s}\f$
*/
Energy _beta3S1us;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$s\bar{s}\f$
*/
Energy _beta3S1ss;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$c\bar{u}\f$
*/
Energy _beta3S1cu;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$c\bar{s}\f$
*/
Energy _beta3S1cs;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$u\bar{b}\f$
*/
Energy _beta3S1ub;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$s\bar{b}\f$
*/
Energy _beta3S1sb;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$c\bar{c}\f$
*/
Energy _beta3S1cc;
/**
* The wavefunction \f$1^3S_1\f$ \f$\beta\f$ variational parameter for \f$b\bar{c}\f$
*/
Energy _beta3S1bc;
/**
* The wavefunction paramaeters as an array.
*/
vector<vector<Energy> > _beta3S1;
//@}
/** @name Wave function parameters for the \f$1P\f$ levels.*/
//@{
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$u\bar{d}\f$
*/
Energy _beta1Pud;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$u\bar{s}\f$
*/
Energy _beta1Pus;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$s\bar{s}\f$
*/
Energy _beta1Pss;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$c\bar{u}\f$
*/
Energy _beta1Pcu;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$c\bar{s}\f$
*/
Energy _beta1Pcs;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$u\bar{b}\f$
*/
Energy _beta1Pub;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$s\bar{b}\f$
*/
Energy _beta1Psb;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$c\bar{c}\f$
*/
Energy _beta1Pcc;
/**
* The wavefunction \f$1P\f$ \f$\beta\f$ variational parameter for \f$b\bar{c}\f$
*/
Energy _beta1Pbc;
/**
* The wavefunction paramaeters as an array.
*/
vector<vector<Energy> > _beta1P;
/**
* The spin-1/2 masses
*/
// the 1/2 spin masses
vector<vector<Energy> > _massPoh;
/**
* The spin-3/2 masses
*/
vector<vector<Energy> > _massPth;
//@}
/**@name Parameters for the strong coupling*/
//@{
/**
* The cut-off value of \f$\alpha_S\f$.
*/
double _alphamuQM;
/**
* The values of \f$\alpha_S\f$ at the quark masses.
*/
vector<double> _alphaQ;
//@}
/**@name Relativistic correction factors */
//@{
/**
* The correction factor for \f$D\to\rho\f$.
*/
double _CfDrho;
/**
* The correction factor for \f$D\to K^*\f$.
*/
double _CfDKstar;
/**
* The correction factor for \f$D_s\to K^*\f$.
*/
double _CfDsKstar;
/**
* The correction factor for \f$D_s\to\phi\f$.
*/
double _CfDsphi;
/**
* The correction factor for \f$B\to\rho\f$.
*/
double _CfBrho;
/**
* The correction factor for \f$B\to D^*\f$.
*/
double _CfBDstar;
/**
* The correction factor for \f$B_s\to K^*\f$.
*/
double _CfBsKstar;
/**
* The correction factor for \f$B_s\to D^*\f$.
*/
double _CfBsDstar;
/**
* The correction factor for \f$B_c\to D^*\f$.
*/
double _CfBcDstar;
/**
* The correction factor for \f$B_c\to\psi\f$.
*/
double _CfBcpsi;
/**
* The correction factor for \f$B_c\to B_s^*\f$.
*/
double _CfBcBsstar;
/**
* The correction factor for \f$B_c\to B^*\f$.
*/
double _CfBcBstar;
//@}
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _thetaeta;
/**
* Include the \f$a_L(\omega)\f$ piece of the \f$C_{ji}\f$ factor
*/
bool _includeaW;
};
}
#endif /* HERWIG_ISGW2FormFactor_H */
diff --git a/Decay/FormFactors/ISGWFormFactor.cc b/Decay/FormFactors/ISGWFormFactor.cc
--- a/Decay/FormFactors/ISGWFormFactor.cc
+++ b/Decay/FormFactors/ISGWFormFactor.cc
@@ -1,545 +1,545 @@
// -*- C++ -*-
//
// ISGWFormFactor.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ISGWFormFactor class.
//
#include "ISGWFormFactor.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
using namespace ThePEG;
ISGWFormFactor::ISGWFormFactor() {
// default values of the parameters
// fudge factor
_kappa=0.7;
// quark masses
_mdown =0.33*GeV;
_mup =0.33*GeV;
_mstrange=0.55*GeV;
_mcharm =1.82*GeV;
_mbottom =5.12*GeV;
// beta values
_betaSud = 0.31*GeV;
_betaSus = 0.34*GeV;
_betaSuc = 0.39*GeV;
_betaSub = 0.41*GeV;
_betaPud = 0.27*GeV;
_betaPus = 0.30*GeV;
_betaPuc = 0.34*GeV;
// the mixing for eta/eta'
_thetaeta=-Constants::pi/18.;
// B_u decays to d ubar
addFormFactor(-521,-211 ,0,-2, 5, 1);
addFormFactor(-521,-213 ,1,-2, 5, 1);
addFormFactor(-521,-215 ,2,-2, 5, 1);
addFormFactor(-521,-10213,1,-2, 5, 1);
addFormFactor(-521,-20213,1,-2, 5, 1);
addFormFactor(-521,-10211,0,-2, 5, 1);
// B_u to uu (I=0)
addFormFactor(-521, 221 ,0,-2, 5, 2);
addFormFactor(-521, 331 ,0,-2, 5, 2);
addFormFactor(-521, 223 ,1,-2, 5, 2);
addFormFactor(-521, 225 ,2,-2, 5, 2);
addFormFactor(-521, 10223,1,-2, 5, 2);
addFormFactor(-521, 20223,1,-2, 5, 2);
addFormFactor(-521, 10221,0,-2, 5, 2);
// B_u to uu (I=1)
addFormFactor(-521, 111 ,0,-2, 5, 2);
addFormFactor(-521, 113 ,1,-2, 5, 2);
addFormFactor(-521, 115 ,2,-2, 5, 2);
addFormFactor(-521, 10113,1,-2, 5, 2);
addFormFactor(-521, 20113,1,-2, 5, 2);
addFormFactor(-521, 10111,0,-2, 5, 2);
// B_u decays to d ubar
addFormFactor(-521,-321 ,0,-2, 5, 3);
addFormFactor(-521,-323 ,1,-2, 5, 3);
addFormFactor(-521,-325 ,2,-2, 5, 3);
addFormFactor(-521,-10323,1,-2, 5, 3);
addFormFactor(-521,-20323,1,-2, 5, 3);
addFormFactor(-521,-10321,0,-2, 5, 3);
// B_u decays to c ubar
addFormFactor(-521, 421 ,0,-2, 5, 4);
addFormFactor(-521, 423 ,1,-2, 5, 4);
addFormFactor(-521, 425 ,2,-2, 5, 4);
addFormFactor(-521, 10423,1,-2, 5, 4);
addFormFactor(-521, 20423,1,-2, 5, 4);
addFormFactor(-521, 10421,0,-2, 5, 4);
// B_d to d dbar (I=0)
addFormFactor(-511, 221 ,0, 1,-5,-1);
addFormFactor(-511, 331 ,0, 1,-5,-1);
addFormFactor(-511, 223 ,1, 1,-5,-1);
addFormFactor(-511, 225 ,2, 1,-5,-1);
addFormFactor(-511, 10223,1, 1,-5,-1);
addFormFactor(-511, 20223,1, 1,-5,-1);
addFormFactor(-511, 10221,0, 1,-5,-1);
// B_d to d dbar (I=1)
addFormFactor(-511, 111 ,0, 1,-5,-1);
addFormFactor(-511, 113 ,1, 1,-5,-1);
addFormFactor(-511, 115 ,2, 1,-5,-1);
addFormFactor(-511, 10113,1, 1,-5,-1);
addFormFactor(-511, 20113,1, 1,-5,-1);
addFormFactor(-511, 10111,0, 1,-5,-1);
// B_d to u dbar
addFormFactor(-511, 211 ,0, 1,-5,-2);
addFormFactor(-511, 213 ,1, 1,-5,-2);
addFormFactor(-511, 215 ,2, 1,-5,-2);
addFormFactor(-511, 10213,1, 1,-5,-2);
addFormFactor(-511, 20213,1, 1,-5,-2);
addFormFactor(-511, 10211,0, 1,-5,-2);
// B_d to s dbar
addFormFactor(-511, 311 ,0, 1,-5,-3);
addFormFactor(-511, 313 ,1, 1,-5,-3);
addFormFactor(-511, 315 ,2, 1,-5,-3);
addFormFactor(-511, 10313,1, 1,-5,-3);
addFormFactor(-511, 20313,1, 1,-5,-3);
addFormFactor(-511, 10311,0, 1,-5,-3);
// B_d decays to c dbar
addFormFactor(-511, 411 ,0, 1,-5,-4);
addFormFactor(-511, 413 ,1, 1,-5,-4);
addFormFactor(-511, 415 ,2, 1,-5,-4);
addFormFactor(-511, 10413,1, 1,-5,-4);
addFormFactor(-511, 20413,1, 1,-5,-4);
addFormFactor(-511, 10411,0, 1,-5,-4);
// D0 to d ubar
addFormFactor( 421,-211 ,0,-2, 4, 1);
addFormFactor( 421,-213 ,1,-2, 4, 1);
addFormFactor( 421,-215 ,2,-2, 4, 1);
addFormFactor( 421,-10213,1,-2, 4, 1);
addFormFactor( 421,-20213,1,-2, 4, 1);
addFormFactor( 421,-10211,0,-2, 4, 1);
// D0 to d ubar (I=1)
addFormFactor( 421, 111 ,0,-2, 4, 2);
addFormFactor( 421, 113 ,1,-2, 4, 2);
addFormFactor( 421, 115 ,2,-2, 4, 2);
addFormFactor( 421, 10113,1,-2, 4, 2);
addFormFactor( 421, 20113,1,-2, 4, 2);
addFormFactor( 421, 10111,0,-2, 4, 2);
// D0 to d ubar (I=0)
addFormFactor( 421, 221 ,0,-2, 4, 2);
addFormFactor( 421, 331 ,0,-2, 4, 2);
addFormFactor( 421, 223 ,1,-2, 4, 2);
addFormFactor( 421, 225 ,2,-2, 4, 2);
addFormFactor( 421, 10223,1,-2, 4, 2);
addFormFactor( 421, 20223,1,-2, 4, 2);
addFormFactor( 421, 10221,0,-2, 4, 2);
// D0 to s ubar
addFormFactor( 421,-321 ,0,-2, 4, 3);
addFormFactor( 421,-323 ,1,-2, 4, 3);
addFormFactor( 421,-325 ,2,-2, 4, 3);
addFormFactor( 421,-10323,1,-2, 4, 3);
addFormFactor( 421,-20323,1,-2, 4, 3);
addFormFactor( 421,-10321,0,-2, 4, 3);
// D+ to d dbar I=0
addFormFactor( 411, 221 ,0,-1, 4, 1);
addFormFactor( 411, 331 ,0,-1, 4, 1);
addFormFactor( 411, 223 ,1,-1, 4, 1);
addFormFactor( 411, 225 ,2,-1, 4, 1);
addFormFactor( 411, 10223,1,-1, 4, 1);
addFormFactor( 411, 20223,1,-1, 4, 1);
addFormFactor( 411, 10221,0,-1, 4, 1);
// D+ to d dbar I=1
addFormFactor( 411, 111 ,0,-1, 4, 1);
addFormFactor( 411, 113 ,1,-1, 4, 1);
addFormFactor( 411, 115 ,2,-1, 4, 1);
addFormFactor( 411, 10113,1,-1, 4, 1);
addFormFactor( 411, 20113,1,-1, 4, 1);
addFormFactor( 411, 10111,0,-1, 4, 1);
// D+ to u dbar
addFormFactor( 411, 211 ,0,-1, 4, 2);
addFormFactor( 411, 213 ,1,-1, 4, 2);
addFormFactor( 411, 215 ,2,-1, 4, 2);
addFormFactor( 411, 10213,1,-1, 4, 2);
addFormFactor( 411, 20213,1,-1, 4, 2);
addFormFactor( 411, 10211,0,-1, 4, 2);
// D+ to s dbar
addFormFactor( 411,-311 ,0,-1, 4, 3);
addFormFactor( 411,-313 ,1,-1, 4, 3);
addFormFactor( 411,-315 ,2,-1, 4, 3);
addFormFactor( 411,-10313,1,-1, 4, 3);
addFormFactor( 411,-20313,1,-1, 4, 3);
addFormFactor( 411,-10311,0,-1, 4, 3);
// set the initial number of modes
initialModes(numberOfFactors());
}
void ISGWFormFactor::doinit() {
ScalarFormFactor::doinit();
// set up the quark masses
_mquark.resize(5);
_mquark[0]=_mdown;
_mquark[1]=_mup;
_mquark[2]=_mstrange;
_mquark[3]=_mcharm;
_mquark[4]=_mbottom;
// and the beta values
_betaS.resize(5,vector<Energy>(5));
_betaP.resize(5,vector<Energy>(5));
_betaS[0][0] = _betaSud;_betaP[0][0] = _betaPud;
_betaS[1][0] = _betaSud;_betaP[1][0] = _betaPud;
_betaS[2][0] = _betaSus;_betaP[2][0] = _betaPus;
_betaS[3][0] = _betaSuc;_betaP[3][0] = _betaPuc;
_betaS[4][0] = _betaSub;_betaP[4][0] = ZERO ;
_betaS[0][1] = _betaSud;_betaP[0][1] = _betaPud;
_betaS[1][1] = _betaSud;_betaP[1][1] = _betaPud;
_betaS[2][1] = _betaSus;_betaP[2][1] = _betaPus;
_betaS[3][1] = _betaSuc;_betaP[3][1] = _betaPuc;
_betaS[4][1] = _betaSub;_betaP[4][1] = ZERO ;
_betaS[0][2] = _betaSus;_betaP[0][2] = _betaPus;
_betaS[1][2] = _betaSus;_betaP[1][2] = _betaPus;
_betaS[2][2] = ZERO ;_betaP[2][2] = ZERO ;
_betaS[3][2] = ZERO ;_betaP[3][2] = ZERO ;
_betaS[4][2] = ZERO ;_betaP[4][2] = ZERO ;
_betaS[0][3] = _betaSuc;_betaP[0][3] = _betaPuc;
_betaS[1][3] = _betaSuc;_betaP[1][3] = _betaPuc;
_betaS[2][3] = ZERO ;_betaP[2][3] = ZERO ;
_betaS[3][3] = ZERO ;_betaP[3][3] = ZERO ;
_betaS[4][3] = ZERO ;_betaP[4][3] = ZERO ;
_betaS[0][4] = ZERO ;_betaP[0][4] = ZERO ;
_betaS[1][4] = ZERO ;_betaP[1][4] = ZERO ;
_betaS[2][4] = ZERO ;_betaP[2][4] = ZERO ;
_betaS[3][4] = ZERO ;_betaP[3][4] = ZERO ;
_betaS[4][4] = ZERO ;_betaP[4][4] = ZERO ;
}
void ISGWFormFactor::persistentOutput(PersistentOStream & os) const {
os << _kappa << ounit(_mdown,GeV) << ounit(_mup,GeV) << ounit(_mstrange,GeV)
<< ounit(_mcharm,GeV) << ounit(_mbottom,GeV) << ounit(_betaSud,GeV)
<< ounit(_betaSus,GeV) << ounit(_betaSuc,GeV) << ounit(_betaSub,GeV)
<< ounit(_betaPud,GeV) << ounit(_betaPus,GeV) << ounit(_betaPuc,GeV)
<< _thetaeta << ounit(_mquark,GeV) << ounit(_betaS,GeV) << ounit(_betaP,GeV);
}
void ISGWFormFactor::persistentInput(PersistentIStream & is, int) {
is >> _kappa >> iunit(_mdown,GeV) >> iunit(_mup,GeV) >> iunit(_mstrange,GeV)
>> iunit(_mcharm,GeV) >> iunit(_mbottom,GeV) >> iunit(_betaSud,GeV)
>> iunit(_betaSus,GeV) >> iunit(_betaSuc,GeV) >> iunit(_betaSub,GeV)
>> iunit(_betaPud,GeV) >> iunit(_betaPus,GeV) >> iunit(_betaPuc,GeV)
>> _thetaeta >> iunit(_mquark,GeV) >> iunit(_betaS,GeV) >> iunit(_betaP,GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<ISGWFormFactor,ScalarFormFactor>
describeHerwigISGWFormFactor("Herwig::ISGWFormFactor", "HwFormFactors.so");
void ISGWFormFactor::Init() {
static ClassDocumentation<ISGWFormFactor> documentation
("The ISGWFormFactor class implements the ISGW model of"
"Phys. Rev. D39, 799 (1989) for the scalar meson form-factors.",
"The form factor model of ISGW \\cite{Isgur:1988gb} together with the"
"form factors for the term which are supressed by the lepton mass from"
"\\cite{Scora:1989ys,Isgur:1990jf}",
"\\bibitem{Isgur:1988gb} N.~Isgur, D.~Scora, B.~Grinstein and M.~B.~Wise,\n"
"Phys.\\ Rev.\\ D {\\bf 39} (1989) 799.\n"
"%%CITATION = PHRVA,D39,799;%%\n"
"\\bibitem{Scora:1989ys} D.~Scora and N.~Isgur, \n"
"Phys.\\ Rev.\\ D {\\bf 40} (1989) 1491.\n"
"%%CITATION = PHRVA,D40,1491;%%\n"
"\\bibitem{Isgur:1990jf} N.~Isgur and M.~B.~Wise,\n"
"Phys.\\ Rev.\\ D {\\bf 43} (1991) 819.\n"
"%%CITATION = PHRVA,D43,819;%%\n");
static Parameter<ISGWFormFactor,double> interfaceKappa
("Kappa",
"The relavistic compensation factor of the ISGW model",
&ISGWFormFactor::_kappa, 0.7, 0.0, 1.0,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceDownMass
("DownMass",
"The mass of the down quark in the ISGW model (this is a consituent mass)",
&ISGWFormFactor::_mdown, GeV, 0.33*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceUpMass
("UpMass",
"The mass of the up quark in the ISGW model (this is a consituent mass)",
&ISGWFormFactor::_mup, GeV, 0.33*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceStrangeMass
("StrangeMass",
"The mass of the strange quark in the ISGW model (this is a consituent mass)",
&ISGWFormFactor::_mstrange, GeV, 0.55*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceCharmMass
("CharmMass",
"The mass of the charm quark in the ISGW model (this is a consituent mass)",
&ISGWFormFactor::_mcharm, GeV, 1.82*GeV, ZERO, 3.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBottomMass
("BottomMass",
"The mass of the bottom quark in the ISGW model (this is a consituent mass)",
&ISGWFormFactor::_mbottom, GeV, 5.12*GeV, 3.0*GeV, 10.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBetaSud
("BetaSud",
"The variational parameter for s-wave ud mesons",
&ISGWFormFactor::_betaSud, GeV, 0.31*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBetaSus
("BetaSus",
"The variational parameter for s-wave us mesons",
&ISGWFormFactor::_betaSus, GeV, 0.34*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBetaSuc
("BetaSuc",
"The variational parameter for s-wave uc mesons",
&ISGWFormFactor::_betaSuc, GeV, 0.39*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBetaSub
("BetaSub",
"The variational parameter for s-wave ub mesons",
&ISGWFormFactor::_betaSub, GeV, 0.41*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBetaPud
("BetaPud",
"The variational parameter for p-wave ud mesons",
&ISGWFormFactor::_betaPud, GeV, 0.27*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBetaPus
("BetaPus",
"The variational parameter for p-wave us mesons",
&ISGWFormFactor::_betaPus, GeV, 0.30*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,Energy> interfaceBetaPuc
("BetaPuc",
"The variational parameter for p-wave uc mesons",
&ISGWFormFactor::_betaPuc, GeV, 0.34*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ISGWFormFactor,double> interfaceThetaEtaEtaPrime
("ThetaEtaEtaPrime",
"The eta-eta' mixing angle",
&ISGWFormFactor::_thetaeta, -Constants::pi/18., -Constants::pi, Constants::pi,
false, false, true);
}
// form-factor for scalar to scalar
void ISGWFormFactor::ScalarScalarFormFactor(Energy2 q2, unsigned int iloc,int id0,
int id1,Energy mY,Energy mX,
Complex & f0,Complex & fp) const {
Complex d1(0.),d2(0.);
formFactor(q2,iloc,id0,id1,mY,mX,f0,fp,d1,d2);
}
// form-factor for scalar to vector
void ISGWFormFactor::ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0,
int id1,Energy mY, Energy mX,
Complex & A0,Complex & A1,
Complex & A2,Complex & V) const {
formFactor(q2,iloc,id0,id1,mY,mX,A0,A1,A2,V);
}
// form-factor for scalar to tensor
void ISGWFormFactor::ScalarTensorFormFactor(Energy2 q2, unsigned int iloc, int id0,
int id1, Energy mY, Energy mX,
complex<InvEnergy2> & h,Complex & k,
complex<InvEnergy2> & bp,
complex<InvEnergy2> & bm) const {
Complex f1,f2,f3,f4;
formFactor(q2,iloc,id0,id1,mY,mX,f1,f2,f3,f4);
Energy msum(mX+mY);
h = f1/sqr(msum);
k = f2;
bp = f3/sqr(msum);
bm = f4/sqr(msum);
}
// member which does the work
void ISGWFormFactor::formFactor(Energy2 q2, unsigned int iloc, int, int id1,
Energy mY,Energy mX, Complex & f1,Complex & f2,
Complex & f3, Complex & f4) const {
useMe();
// work out the flavour of the heavy quarks etc
int jspin,spect,inquark,outquark;
formFactorInfo(iloc,jspin,spect,inquark,outquark);
int ifl0(abs(inquark)),ifl1(abs(outquark)),ifls(abs(spect));
// determine the multiplet
int ispin(abs(id1)/1000);
// masses of the quarks
Energy mQ(_mquark[ifl0-1]),mq(_mquark[ifl1-1]),ms(_mquark[ifls-1]);
Energy mtildeX(mq+ms),mtildeY(mQ+ms);
// wavefunction parameters for the mesons
Energy betaX(ZERO),betaY(_betaS[ifl0-1][ifls-1]);
// spin-0 outgoing mesons
if(ispin==0&&jspin<2) {
betaX=_betaS[ifl1-1][ifls-1];
}
else {
betaX=_betaP[ifl1-1][ifls-1];
}
// compute the F_n function we will need
Energy2 beta2XY(0.5*(betaX*betaX+betaY*betaY)),tm((mY-mX)*(mY-mX));
double betar(betaX*betaY/beta2XY),kappa2(_kappa*_kappa),
slope((tm-q2)/(kappa2*beta2XY));
Energy mup(mq*mQ/(mQ+mq)),mum(mq*mQ/(mQ-mq));
double fn(sqrt(mtildeX/mtildeY)*betar*sqrt(betar)*
exp(-0.25*ms*ms/(mtildeX*mtildeY)*slope));
// now we can compute the form-factors
// for scalars
if(jspin==0) {
Complex fp,fm;
// 1 1S0
if(ispin==0) {
double yratio(ms/mtildeX*betaY*betaY/beta2XY);
fp = fn*(1.+0.5*mQ/mum-0.25*mQ*mq/mup/mum*yratio);
fm = fn*(1.-(mtildeX+mtildeY)*(0.5/mq-0.25/mup*yratio));
}
// 1 3P0
else if(ispin<100) {
// extra power of beta factors
fn*=betar;
fp = fn*ms*mQ*mq/sqrt(6.)/betaY/mtildeX/mum;
fm =-fn*ms/betaY/sqrt(6.)*(mtildeX+mtildeY)/mtildeX;
}
// 2 1S0
else {
throw Exception() << "ISGWFormFactor::formFactor"
<< " 2S not implemented" << Exception::abortnow;
}
// convert to the standard form
f1 = Complex(q2/(mY*mY-mX*mX)*fm)+fp;
f2 = fp;
}
// for vectors
else if(jspin==1) {
complex<Energy> f;
complex<InvEnergy> g,ap,am;
Energy2 betaX2(betaX*betaX),betaY2(betaY*betaY);
// 1 3S1
if(ispin==0) {
f = 2.*mtildeY*fn;
g = 0.5*fn*(1./mq-0.5/mum*ms/mtildeX*betaY2/beta2XY);
ap =-0.5*fn/mtildeX*(1.+ms/mQ*(betaY2-betaX2)/(betaX2+betaY2)
-0.25*ms*ms/mum/mtildeY*betaX2*betaX2/beta2XY/beta2XY);
am = 0.5*fn/mtildeX*(1.+ms/mQ+ms*ms/mq/mQ*betaX2/beta2XY*
(1.-0.25*(mtildeX+mtildeY)/mtildeY*betaX2/beta2XY));
}
// 1 3P1
else if(ispin==20) {
fn*=betar;
f =-fn*mtildeY*betaY*(1./mum+0.5*ms/mtildeY*beta2XY*slope/betaY2*
(1./mq-0.5/mum*ms/mtildeX*betaY2/beta2XY));
g = 0.5*fn*ms/mtildeX/betaY;
ap = 0.25*fn*ms*mQ/mtildeY/betaY/mum*(1.-0.5*ms*mq/mtildeX/mum*betaY2/beta2XY);
am = -0.25*fn*ms*(mtildeX+mtildeY)/mq/betaY/mtildeY*
(1.-0.5*ms*mq/mtildeX/mum*betaY2/beta2XY);
}
// 1 1P1
else if(ispin==10) {
fn*=betar;
double ort(1./sqrt(2.));
f = fn*ort*mtildeY*betaY/mup;
g = 0.25*fn*mtildeY*betaY*ort/mq/mQ/mtildeX;
Energy msum(mtildeX+mtildeY);
ap = fn*ms*ort/betaY/mtildeY*(1.+0.5*mQ/mum
-0.25*mq*mQ*ms/mum/mup/mtildeX*betaY2/beta2XY);
am = fn*ms*ort/betaY/mtildeY*(1.-0.5/mq*msum
+0.25*ms*betaY2/mup/beta2XY*msum/mtildeX);
}
// 2 1S0
else {
throw Exception() << "ISGWFormFactor::formFactor"
<< " 2S not implemented" << Exception::abortnow;
}
// convert to the standard notation
Energy msum(mX+mY),mdiff(mY-mX);
Complex ii(0.,1.);
f2 = -ii*f/msum;
- f3 = +ii*ap*msum;
- f1 = -ii*0.5/mX*(am*q2+ii*msum*f2-ii*mdiff*f3);
- f4 = ii*g*msum;
+ f3 = +Complex(ii*ap*msum);
+ f1 = -Complex(ii*0.5/mX*(am*q2+ii*msum*f2-ii*mdiff*f3));
+ f4 = Complex(ii*g*msum);
}
// for tensors
else if(jspin==2) {
Energy msum(mX+mY);
fn *=betar/sqrt(2.);
double betaXb2(betaX*betaX/beta2XY);
// 1 3P2
if(ispin==0) {
f1 = 0.5*fn*ms/mtildeY/betaY*(1./mq
-0.5*ms/mtildeX/mum*betaY*betaY/beta2XY)*sqr(msum);
f2 = 2.*fn*ms/betaY;
f3 =-0.5*fn*ms/mtildeX/mQ/betaY*
(1.-0.5*ms*mQ/mup/mtildeY*betaXb2
+0.25*ms*mQ/mtildeY/mum*betaXb2*(1.-0.5*ms*betaXb2/mtildeY))*
sqr(msum);
f4 = 0.5*fn*ms/mtildeX/mQ/betaY*
(1.-0.5*ms*mQ/mup/mtildeY*betaXb2+
0.25*ms*betaXb2/mq*(mtildeX+mtildeY)/mtildeY*(1.-0.5*ms*betaXb2/mtildeY))*
sqr(msum);
}
}
else {
throw Exception() << "ISGWFormFactor::FormFactor spin = " << jspin
<< " but spins higher than 2 not implemented"
<< Exception::runerror;
}
// special for mixing
double fact(1.);
if(id1==ParticleID::eta) {
if(ifl1==3&&ifls==3) fact = -2.*cos(_thetaeta)/sqrt(6.) - sin(_thetaeta)/sqrt(3.);
else fact = cos(_thetaeta)/sqrt(6.) - sin(_thetaeta)/sqrt(3.);
}
else if(id1==ParticleID::etaprime) {
if(ifl1==3&&ifls==3) fact = -2.*sin(_thetaeta)/sqrt(6.) + cos(_thetaeta)/sqrt(3.);
else fact = sin(_thetaeta)/sqrt(6.) + cos(_thetaeta)/sqrt(3.);
}
else if(ifl1==ifls&&ifl1<3) {
if(abs(ifl1)==1&&int(id1/10)%100==1) fact = -sqrt(0.5);
else fact = sqrt(0.5);
}
f1*=fact;
f2*=fact;
f3*=fact;
f4*=fact;
}
void ISGWFormFactor::dataBaseOutput(ofstream & output,bool header,bool create) const {
if(header) output << "update decayers set parameters=\"";
if(create) output << "create Herwig::ISGWFormFactor " << name() << "\n";
output << "newdef " << name() << ":Kappa " << _kappa << "\n";
output << "newdef " << name() << ":DownMass " << _mdown/GeV << "\n";
output << "newdef " << name() << ":UpMass " << _mup/GeV << "\n";
output << "newdef " << name() << ":StrangeMass " << _mstrange/GeV << "\n";
output << "newdef " << name() << ":CharmMass " << _mcharm/GeV << "\n";
output << "newdef " << name() << ":BottomMass " << _mbottom/GeV << "\n";
output << "newdef " << name() << ":BetaSud " << _betaSud/GeV << "\n";
output << "newdef " << name() << ":BetaSus " << _betaSus/GeV << "\n";
output << "newdef " << name() << ":BetaSuc " << _betaSuc/GeV << "\n";
output << "newdef " << name() << ":BetaSub " << _betaSub/GeV << "\n";
output << "newdef " << name() << ":BetaPud " << _betaPud/GeV << "\n";
output << "newdef " << name() << ":BetaPus " << _betaPus/GeV << "\n";
output << "newdef " << name() << ":BetaPuc " << _betaPuc/GeV << "\n";
output << "newdef " << name() << ":ThetaEtaEtaPrime " << _thetaeta << "\n";
ScalarFormFactor::dataBaseOutput(output,false,false);
if(header) output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
diff --git a/Decay/FormFactors/ISGWFormFactor.h b/Decay/FormFactors/ISGWFormFactor.h
--- a/Decay/FormFactors/ISGWFormFactor.h
+++ b/Decay/FormFactors/ISGWFormFactor.h
@@ -1,279 +1,280 @@
// -*- C++ -*-
//
// ISGWFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ISGWFormFactor_H
#define HERWIG_ISGWFormFactor_H
//
// This is the declaration of the <ISGWFormFactor class.
//
#include "ScalarFormFactor.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/Repository/EventGenerator.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The ISGWFormFactor class is the implementation of the ISGW model of
* Phys. Rev. D39, 799 (1989) for the form-factors. It inherits from the
* ScalarFormFactor class and members
* for the calculation of the relevant form factors.
*
* @see ScalarFormFactor
* @see ISGW2FormFactor
*/
class ISGWFormFactor: public ScalarFormFactor {
public:
/**
* Default constructor
*/
ISGWFormFactor();
/** @name Form-Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form-factor \f$f_0\f$.
* @param fp The form-factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,Energy m0,
Energy m1,Complex & f0,Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param V The form-factor \f$V\f$
* @param A0 The form-factor \f$A_0\f$
* @param A1 The form-factor \f$A_1\f$
* @param A2 The form-factor \f$A_2\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1, Complex & V,
Complex & A0,Complex & A1,Complex & A2) const;
/**
* The form factor for the weak decay of a scalar to a tensor.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param h The form-factor \f$h\f$.
* @param k The form-factor \f$k\f$.
* @param bp The form-factor \f$b_+\f$.
* @param bm The form-factor \f$b_-\f$.
*/
virtual void ScalarTensorFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,
Energy m1, complex<InvEnergy2> & h,
Complex & k, complex<InvEnergy2> & bp,
complex<InvEnergy2> & bm) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** The member which implements all the different form-factors
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f1 The first form-factor.
* @param f2 The second form-factor.
* @param f3 The third form-factor.
* @param f4 The fourth form-factor.
*/
void formFactor(Energy2 q2,unsigned int iloc,int id0,int id1,Energy m0,
Energy m1,Complex & f1,Complex & f2,
Complex & f3,Complex & f4) const;
// general member to calculate all the form-factors
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
+ * Private and non-existent assignment operator.
*/
- ISGWFormFactor & operator=(const ISGWFormFactor &);
+ ISGWFormFactor & operator=(const ISGWFormFactor &) = delete;
private:
/**
* The relativistic compensation factor
*/
double _kappa;
/** @name Quark masses */
//@{
/**
* The down quark mass
*/
Energy _mdown;
/**
* The up quark mass
*/
Energy _mup;
/**
* The strange quark mass
*/
Energy _mstrange;
/**
* The charm quark mass
*/
Energy _mcharm;
/**
* The bottom quark mass
*/
Energy _mbottom;
/**
* The masses of the quarks as a vector
*/
vector<Energy> _mquark;
//@}
/** @name Wave function parameters */
//@{
/**
* The wavefunction s-wave \f$\beta\f$ variational parameters for \f$u\bar{d}\f$
*/
Energy _betaSud;
/**
* The wavefunction s-wave \f$\beta\f$ variational parameters for \f$u\bar{s}\f$
*/
Energy _betaSus;
/**
* The wavefunction s-wave \f$\beta\f$ variational parameters for \f$u\bar{c}\f$
*/
Energy _betaSuc;
/**
* The wavefunction s-wave \f$\beta\f$ variational parameters for \f$u\bar{b}\f$
*/
Energy _betaSub;
/**
* The s-wave variational parameters as a vector.
*/
vector<vector<Energy> > _betaS;
/**
* The wavefunction p-wave \f$\beta\f$ variational parameters for \f$u\bar{d}\f$
*/
Energy _betaPud;
/**
* The wavefunction s-wave \f$\beta\f$ variational parameters for \f$u\bar{s}\f$
*/
Energy _betaPus;
/**
* The wavefunction s-wave \f$\beta\f$ variational parameters for \f$u\bar{c}\f$
*/
Energy _betaPuc;
/**
* The p-wave variational parameters as a vector
*/
vector<vector<Energy> > _betaP;
//@}
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _thetaeta;
};
}
#endif /* HERWIG_ISGWFormFactor_H */
diff --git a/Decay/FormFactors/KiselevBcFormFactor.h b/Decay/FormFactors/KiselevBcFormFactor.h
--- a/Decay/FormFactors/KiselevBcFormFactor.h
+++ b/Decay/FormFactors/KiselevBcFormFactor.h
@@ -1,214 +1,214 @@
// -*- C++ -*-
//
// KiselevBcFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_KiselevBcFormFactor_H
#define HERWIG_KiselevBcFormFactor_H
//
// This is the declaration of the KiselevBcFormFactor class.
//
#include "ScalarFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The KiselevBcFormFactor class implements the form factors from hep-ph/0211021
* for the decays of \f$B_c\f$ mesons.
*
* @see ScalarFormFactor
*/
class KiselevBcFormFactor: public ScalarFormFactor {
public:
/**
* The default constructor.
*/
KiselevBcFormFactor();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* This method is virtual and must be implementented in classes
* inheriting from this which include scalar to scalar form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form factor \f$f_0\f$.
* @param fp The form factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1,Complex & f0,
Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector. This method is virtual
* and must be implemented in classes inheriting from this which include scalar to
* vector form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param A0 The form factor \f$A_0\f$
* @param A1 The form factor \f$A_1\f$
* @param A2 The form factor \f$A_2\f$
* @param V The form factor \f$V\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1,Complex & A0,
Complex & A1,Complex & A2, Complex & V) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- KiselevBcFormFactor & operator=(const KiselevBcFormFactor &);
+ KiselevBcFormFactor & operator=(const KiselevBcFormFactor &) = delete;
private:
/**
* The value of the \f$f_+\f$ form factor evaluated at \f$q^2=0\f$.
*/
vector<double> _fp;
/**
* The value of the \f$f_-\f$ form factor evaluated at \f$q^2=0\f$.
*/
vector<double> _fm;
/**
* The value of the \f$F_V\f$ form factor evaluated at \f$q^2=0\f$.
*/
vector<InvEnergy> _FV;
/**
* The value of the \f$F_0^A\f$ form factor evaluated at \f$q^2=0\f$.
*/
vector<Energy> _F0A;
/**
* The value of the \f$F_+^A\f$ form factor evaluated at \f$q^2=0\f$.
*/
vector<InvEnergy> _FpA;
/**
* The value of the \f$F_-^A\f$ form factor evaluated at \f$q^2=0\f$.
*/
vector<InvEnergy> _FmA;
/**
* The pole mass for the \f$f_+\f$ form factor
*/
vector<Energy> _Mfp;
/**
* The pole mass for the \f$f_-\f$ form factor
*/
vector<Energy> _Mfm;
/**
* The pole mass for the \f$F_V\f$ form factor
*/
vector<Energy> _MFV;
/**
* The pole mass for the \f$F_0^A\f$ form factor
*/
vector<Energy> _MF0A;
/**
* The pole mass for the \f$F_+^A\f$ form factor
*/
vector<Energy> _MFpA;
/**
* The pole mass for the \f$F_-^A\f$ form factor
*/
vector<Energy> _MFmA;
};
}
#endif /* HERWIG_KiselevBcFormFactor_H */
diff --git a/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.cc b/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.cc
--- a/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.cc
+++ b/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.cc
@@ -1,143 +1,143 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the LambdabExcitedLambdacSumRuleFormFactor class.
//
#include "LambdabExcitedLambdacSumRuleFormFactor.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
using namespace ThePEG;
LambdabExcitedLambdacSumRuleFormFactor::LambdabExcitedLambdacSumRuleFormFactor() {
_xi1=0.29;
_rho2=2.01;
// modes handled by this form-factor
// lambda_b to lambda_c1
addFormFactor(5122,14122,2,2,1,2,5,4);
// lambda_b to lambda_c1*
addFormFactor(5122,4124 ,2,4,1,2,5,4);
}
void LambdabExcitedLambdacSumRuleFormFactor::
persistentOutput(PersistentOStream & os) const {
os << _xi1 << _rho2;
}
void LambdabExcitedLambdacSumRuleFormFactor::
persistentInput(PersistentIStream & is, int) {
is >> _xi1 >> _rho2;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<LambdabExcitedLambdacSumRuleFormFactor,BaryonFormFactor>
describeHerwigLambdabExcitedLambdacSumRuleFormFactor("Herwig::LambdabExcitedLambdacSumRuleFormFactor", "HwFormFactors.so");
void LambdabExcitedLambdacSumRuleFormFactor::Init() {
static ClassDocumentation<LambdabExcitedLambdacSumRuleFormFactor> documentation
("The LambdabExcitedLambdacSumRuleFormFactor class implements the"
" form-factors for Lambda_b to Lambda_c1(*) from hep-ph/0012114.",
"Lambda_b to Lambda_c1(*) used the formfactors from \\cite{Huang:2000xw}.",
"%\\cite{Huang:2000xw}\n"
"\\bibitem{Huang:2000xw}\n"
" M.~Q.~Huang, J.~P.~Lee, C.~Liu and H.~S.~Song,\n"
" %``Leading Isgur-Wise form factor of Lambda/b to Lambda/c1 transition using\n"
" %QCD sum rules,''\n"
" Phys.\\ Lett.\\ B {\\bf 502}, 133 (2001)\n"
" [arXiv:hep-ph/0012114].\n"
" %%CITATION = PHLTA,B502,133;%%\n"
);
static Parameter<LambdabExcitedLambdacSumRuleFormFactor,double> interfaceXi
("Xi",
"The intercept for the Isgur-Wise form-factor",
&LambdabExcitedLambdacSumRuleFormFactor::_xi1, 0.29, 0.0, 10.0,
false, false, true);
static Parameter<LambdabExcitedLambdacSumRuleFormFactor,double> interfaceRho2
("Rho2",
"The slope parameter for the form-factor.",
&LambdabExcitedLambdacSumRuleFormFactor::_rho2, 2.01, -10.0, 10.0,
false, false, true);
}
void LambdabExcitedLambdacSumRuleFormFactor::
SpinHalfSpinHalfFormFactor(Energy2 q2,int,int,int,Energy m0,Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a) {
useMe();
double omega(.5/m0/m1*(m0*m0+m1*m1-q2)),orr(1./sqrt(3.));
// the universal form-factor
double xi=_xi1*(1.-_rho2*(omega-1.));
// the couplings in the velocity form
Complex g1v,g1a,g2v,g2a,g3a,g3v;
g1v = orr*(omega-1.)*xi;
g1a = orr*(omega+1.)*xi;
g2v =-2.*orr*xi;
g3v = 0.;
g2a =-2.*orr*xi;
g3a = 0.;
// convert to our form
f1a = g1v-0.5*(m0-m1)*(g2v/m0+g3v/m1);
f1v =-g1a-0.5*(m0+m1)*(g2a/m0+g3a/m1);
- f2a = 0.5*(m0+m1)*( g2v/m0+g3v/m1);
- f2v =-0.5*(m0+m1)*( g2a/m0+g3a/m1);
- f3a = 0.5*(m0+m1)*( g2v/m0-g3v/m1);
- f3v = 0.5*(m0+m1)*(-g2a/m0+g3a/m1);
+ f2a = Complex(0.5*(m0+m1)*( g2v/m0+g3v/m1));
+ f2v =-Complex(0.5*(m0+m1)*( g2a/m0+g3a/m1));
+ f3a = Complex(0.5*(m0+m1)*( g2v/m0-g3v/m1));
+ f3v = Complex(0.5*(m0+m1)*(-g2a/m0+g3a/m1));
}
void LambdabExcitedLambdacSumRuleFormFactor::
SpinHalfSpinThreeHalfFormFactor(Energy2 q2,int,int,int,Energy m0,Energy m1,
Complex & f1v,Complex & f2v,
Complex & f3v,Complex & f4v,
Complex & f1a,Complex & f2a,
Complex & f3a,Complex & f4a )
{
useMe();
// the omega value
double omega(.5/m0/m1*(m0*m0+m1*m1-q2));
// the universal form-factor
double xi(_xi1*(1.-_rho2*(omega-1.)));
// calculate the form factor
// the couplings in the velocity form
Complex N1,N2,N3,N4,K1,K2,K3,K4;
Energy msum(m0+m1);Energy2 msum2(msum*msum);
// in the form of the heavy quark papers
N1 = xi;
K1 = xi;
N2 = 0.;
K2 = 0.;
N3 = 0.;
K3 = 0.;
N4 = 0.;
K4 = 0.;
// convert to our form
f1v =-N4;
f1a = K4;
f2v =-N1*msum/m0;
f2a = K1*msum/m0;
- f3v =-msum2/m0*(N2/m0+N3/m1);
- f3a = msum2/m0*(K2/m0+K3/m1);
- f4v =-msum2/m0/m0*N2;
- f4a = msum2/m0/m0*K2;
+ f3v =-Complex(msum2/m0*(N2/m0+N3/m1));
+ f3a = Complex(msum2/m0*(K2/m0+K3/m1));
+ f4v =-Complex(msum2/m0/m0*N2);
+ f4a = Complex(msum2/m0/m0*K2);
}
void LambdabExcitedLambdacSumRuleFormFactor::dataBaseOutput(ofstream & output,
bool header,
bool create) const {
if(header) output << "update decayers set parameters=\"";
if(create) output << "create Herwig::LambdabExcitedLambdacSumRuleFormFactor "
<< name() << " \n";
output << "newdef " << name() << ":Xi " << _xi1 << " \n";
output << "newdef " << name() << ":Rho2 " << _rho2 << " \n";
BaryonFormFactor::dataBaseOutput(output,false,false);
if(header) output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
diff --git a/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.h b/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.h
--- a/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.h
+++ b/Decay/FormFactors/LambdabExcitedLambdacSumRuleFormFactor.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
#ifndef HERWIG_LambdabExcitedLambdacSumRuleFormFactor_H
#define HERWIG_LambdabExcitedLambdacSumRuleFormFactor_H
// This is the declaration of the LambdabExcitedLambdacSumRuleFormFactor class.
#include "BaryonFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>LambdabExcitedLambdacSumRuleFormFactor</code> class implements the
* form-factors of hep-ph/0012114 for the decay of the \f$Lambda_b^0\f$
* to excited \f$\Lambda^+_c\f$ states.
*
* @see BaryonFormFactor.
*
*/
class LambdabExcitedLambdacSumRuleFormFactor: public BaryonFormFactor {
public:
/**
* Default constructor
*/
LambdabExcitedLambdacSumRuleFormFactor();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac12\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param f1v The form factor \f$F^V_1\f$.
* @param f2v The form factor \f$F^V_2\f$.
* @param f3v The form factor \f$F^V_3\f$.
* @param f1a The form factor \f$F^A_1\f$.
* @param f2a The form factor \f$F^A_2\f$.
* @param f3a The form factor \f$F^A_3\f$.
*/
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a);
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac32\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param g1v The form factor \f$G^V_1\f$.
* @param g2v The form factor \f$G^V_2\f$.
* @param g3v The form factor \f$G^V_3\f$.
* @param g4v The form factor \f$G^V_4\f$.
* @param g1a The form factor \f$G^A_1\f$.
* @param g2a The form factor \f$G^A_2\f$.
* @param g3a The form factor \f$G^A_3\f$.
* @param g4a The form factor \f$G^A_4\f$.
*/
virtual void SpinHalfSpinThreeHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & g1v,Complex & g2v,Complex & g3v,
Complex & g4v,Complex & g1a,Complex & g2a,
Complex & g3a,Complex & g4a);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
private:
/**
* Private and non-existent assignment operator.
*/
- LambdabExcitedLambdacSumRuleFormFactor & operator=(const LambdabExcitedLambdacSumRuleFormFactor &);
+ LambdabExcitedLambdacSumRuleFormFactor & operator=(const LambdabExcitedLambdacSumRuleFormFactor &) = delete;
private:
/**
* The intercept for the form factor.
*/
double _xi1;
/**
* The slope for the form factor.
*/
double _rho2;
};
}
#endif /* HERWIG_LambdabExcitedLambdacSumRuleFormFactor_H */
diff --git a/Decay/FormFactors/LightBaryonQuarkModelFormFactor.h b/Decay/FormFactors/LightBaryonQuarkModelFormFactor.h
--- a/Decay/FormFactors/LightBaryonQuarkModelFormFactor.h
+++ b/Decay/FormFactors/LightBaryonQuarkModelFormFactor.h
@@ -1,169 +1,169 @@
// -*- C++ -*-
#ifndef HERWIG_LightBaryonQuarkModelFormFactor_H
#define HERWIG_LightBaryonQuarkModelFormFactor_H
// This is the declaration of the LightBaryonQuarkModelFormFactor class.
#include "BaryonFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>LightBaryonQuarkModelFormFactor</code> class implements the
* quark model calculation of hep-ph/9409272 for the form-factors for
* the decay of baryons containing the light quarks. This can be adapted for
* other models.
*
* @see BaryonFormFactor
*
*/
class LightBaryonQuarkModelFormFactor: public BaryonFormFactor {
public:
/**
* Default constructor
*/
LightBaryonQuarkModelFormFactor();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac12\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param f1v The form factor \f$F^V_1\f$.
* @param f2v The form factor \f$F^V_2\f$.
* @param f3v The form factor \f$F^V_3\f$.
* @param f1a The form factor \f$F^A_1\f$.
* @param f2a The form factor \f$F^A_2\f$.
* @param f3a The form factor \f$F^A_3\f$.
*/
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- LightBaryonQuarkModelFormFactor & operator=(const LightBaryonQuarkModelFormFactor &);
+ LightBaryonQuarkModelFormFactor & operator=(const LightBaryonQuarkModelFormFactor &) = delete;
private:
/**
* The form-factor \f$f_1\f$ at \f$q^2=0\f$.
*/
vector<double> _f1;
/**
* The form-factor \f$f_2\f$ at \f$q^2=0\f$.
*/
vector<InvEnergy> _f2;
/**
* The form-factor \f$g_1\f$ at \f$q^2=0\f$.
*/
vector<double> _g1;
/**
* The form-factor \f$g_2\f$ at \f$q^2=0\f$.
*/
vector<InvEnergy> _g2;
/**
* The mass for the energy dependence of the \f$f_1\f$ form factor.
*/
vector<Energy> _Lambdaf1;
/**
* The mass for the energy dependence of the \f$f_2\f$ form factor.
*/
vector<Energy> _Lambdaf2;
/**
* The mass for the energy dependence of the \f$g_1\f$ form factor.
*/
vector<Energy> _Lambdag1;
/**
* The mass for the energy dependence of the \f$g_2\f$ form factor.
*/
vector<Energy> _Lambdag2;
};
}
#endif /* HERWIG_LightBaryonQuarkModelFormFactor_H */
diff --git a/Decay/FormFactors/MelikhovFormFactor.h b/Decay/FormFactors/MelikhovFormFactor.h
--- a/Decay/FormFactors/MelikhovFormFactor.h
+++ b/Decay/FormFactors/MelikhovFormFactor.h
@@ -1,216 +1,216 @@
// -*- C++ -*-
//
// MelikhovFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MelikhovFormFactor_H
#define HERWIG_MelikhovFormFactor_H
//
// This is the declaration of the MelikhovFormFactor class.
//
#include "ScalarFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The MelikhovFormFactor class implements the model of Phys. Lett. B 380 (1996) 363
* for the form factors for \f$B\to\pi,\rho\f$.
*
* @see ScalarFormFactor
*
*/
class MelikhovFormFactor: public ScalarFormFactor {
public:
/**
* The default constructor.
*/
MelikhovFormFactor();
/** @name Form-Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form-factor \f$f_0\f$.
* @param fp The form-factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1,
Complex & f0,Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param V The form-factor \f$V\f$
* @param A0 The form-factor \f$A_0\f$
* @param A1 The form-factor \f$A_1\f$
* @param A2 The form-factor \f$A_2\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1, Complex & V,
Complex & A0,Complex & A1,Complex & A2) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MelikhovFormFactor & operator=(const MelikhovFormFactor &);
+ MelikhovFormFactor & operator=(const MelikhovFormFactor &) = delete;
private:
/** @name Parameters for the form factors */
//@{
/**
* The set of fit parameters to use
*/
unsigned int _ifit;
/**
* The value of \f$R_+(0)\f$ for the \f$B\to\pi\f$ form factor.
*/
double _Rplus0;
/**
* The value of \f$M_+\f$ for the \f$B\to\pi\f$ form factor.
*/
Energy _Mplus;
/**
* The value of \f$n_+\f$ for the \f$B\to\pi\f$ form factor.
*/
double _nplus;
/**
* The value of \f$R_V(0)\f$ for the \f$B\to\rho\f$ form factor.
*/
double _RV0;
/**
* The value of \f$M_V\f$ for the \f$B\to\rho\f$ form factor.
*/
Energy _MV;
/**
* The value of \f$n_V\f$ for the \f$B\to\rho\f$ form factor.
*/
double _nV;
/**
* The value of \f$R_1(0)\f$ for the \f$B\to\rho\f$ form factor.
*/
double _R10;
/**
* The value of \f$M_1\f$ for the \f$B\to\rho\f$ form factor.
*/
Energy _M1;
/**
* The value of \f$n_1\f$ for the \f$B\to\rho\f$ form factor.
*/
double _n1;
/**
* The value of \f$R_2(0)\f$ for the \f$B\to\rho\f$ form factor.
*/
double _R20;
/**
* The value of \f$M_2\f$ for the \f$B\to\rho\f$ form factor.
*/
Energy _M2;
/**
* The value of \f$n_2\f$ for the \f$B\to\rho\f$ form factor.
*/
double _n2;
//@}
};
}
#endif /* HERWIG_MelikhovFormFactor_H */
diff --git a/Decay/FormFactors/MelikhovStechFormFactor.h b/Decay/FormFactors/MelikhovStechFormFactor.h
--- a/Decay/FormFactors/MelikhovStechFormFactor.h
+++ b/Decay/FormFactors/MelikhovStechFormFactor.h
@@ -1,356 +1,356 @@
// -*- C++ -*-
//
// MelikhovStechFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MelikhovStechFormFactor_H
#define HERWIG_MelikhovStechFormFactor_H
//
// This is the declaration of the MelikhovStechFormFactor class.
//
#include "ScalarFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The MelikhovStechFormFactor class is the implementation of the form factors
* from Phys. Rev. D62 014006 (2000).
*
* @see ScalarFormFactor
*/
class MelikhovStechFormFactor: public ScalarFormFactor {
public:
/**
* The default constructor.
*/
MelikhovStechFormFactor();
/** @name Form-Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form-factor \f$f_0\f$.
* @param fp The form-factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1,
Complex & f0,Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param V The form-factor \f$V\f$
* @param A0 The form-factor \f$A_0\f$
* @param A1 The form-factor \f$A_1\f$
* @param A2 The form-factor \f$A_2\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1, Complex & V,
Complex & A0,Complex & A1,Complex & A2) const;
/**
* The form factor for the weak penguin decay of a scalar meson to a scalar meson.
* This method is virtual
* and must be implemented in classes inheriting from this which include scalar to
* scalar penguin form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param fT The form factor \f$f_T\f$.
*/
virtual void ScalarScalarSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0, Energy m1,Complex & fT) const;
/**
* The form factor for the weak penguin decay of a scalar meson to a vector meson.
* This method is virtual
* and must be implemented in classes inheriting from this which include scalar to
* vector penguin form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param T1 The form factor \f$T_1\f$.
* @param T2 The form factor \f$T_2\f$.
* @param T3 The form factor \f$T_3\f$.
*/
virtual void ScalarVectorSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0, Energy m1, Complex & T1,
Complex & T2, Complex & T3) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MelikhovStechFormFactor & operator=(const MelikhovStechFormFactor &);
+ MelikhovStechFormFactor & operator=(const MelikhovStechFormFactor &) = delete;
private:
/** @name Parameters for the scalar to scalar form factors */
//@{
/**
* The value of \f$F_+(0)\f$ for the form factors.
*/
vector<double> _fplus0;
/**
* The \f$\sigma_1\f$ parameter for the \f$F_+\f$ form factor.
*/
vector<double> _sigma1fp;
/**
* The \f$\sigma_2\f$ parameter for the \f$F_+\f$ form factor.
*/
vector<double> _sigma2fp;
/**
* The value of \f$F_0(0)\f$ for the form factors.
*/
vector<double> _f00;
/**
* The \f$\sigma_1\f$ parameter for the \f$F_0\f$ form factor.
*/
vector<double> _sigma1f0;
/**
* The \f$\sigma_2\f$ parameter for the \f$F_0\f$ form factor.
*/
vector<double> _sigma2f0;
/**
* The value of \f$F_T(0)\f$ for the form factors.
*/
vector<double> _fT0;
/**
* The \f$\sigma_1\f$ parameter for the \f$F_T\f$ form factor.
*/
vector<double> _sigma1fT;
/**
* The \f$\sigma_2\f$ parameter for the \f$F_T\f$ form factor.
*/
vector<double> _sigma2fT;
//@}
/** @name Parameters for the scalar to vector form factors */
//@{
/**
* The value of \f$V(0)\f$ for the form factors
*/
vector<double> _V0;
/**
* The \f$\sigma_1\f$ parameter for the \f$V_0\f$ form factor.
*/
vector<double> _sigma1V0;
/**
* The \f$\sigma_2\f$ parameter for the \f$V_0\f$ form factor.
*/
vector<double> _sigma2V0;
/**
* The value of \f$A_0(0)\f$ for the form factors
*/
vector<double> _A00;
/**
* The \f$\sigma_1\f$ parameter for the \f$A_0\f$ form factor.
*/
vector<double> _sigma1A0;
/**
* The \f$\sigma_2\f$ parameter for the \f$A_0\f$ form factor.
*/
vector<double> _sigma2A0;
/**
* The value of \f$A_1(0)\f$ for the form factors
*/
vector<double> _A10;
/**
* The \f$\sigma_1\f$ parameter for the \f$A_1\f$ form factor.
*/
vector<double> _sigma1A1;
/**
* The \f$\sigma_2\f$ parameter for the \f$A_1\f$ form factor.
*/
vector<double> _sigma2A1;
/**
* The value of \f$A_2(0)\f$ for the form factors
*/
vector<double> _A20;
/**
* The \f$\sigma_1\f$ parameter for the \f$A_2\f$ form factor.
*/
vector<double> _sigma1A2;
/**
* The \f$\sigma_2\f$ parameter for the \f$A_2\f$ form factor.
*/
vector<double> _sigma2A2;
/**
* The value of \f$T_1(0)\f$ for the form factors
*/
vector<double> _T10;
/**
* The \f$\sigma_1\f$ parameter for the \f$T_1\f$ form factor.
*/
vector<double> _sigma1T1;
/**
* The \f$\sigma_2\f$ parameter for the \f$T_1\f$ form factor.
*/
vector<double> _sigma2T1;
/**
* The value of \f$T_2(0)\f$ for the form factors
*/
vector<double> _T20;
/**
* The \f$\sigma_1\f$ parameter for the \f$T_2\f$ form factor.
*/
vector<double> _sigma1T2;
/**
* The \f$\sigma_2\f$ parameter for the \f$T_2\f$ form factor.
*/
vector<double> _sigma2T2;
/**
* The value of \f$T_3(0)\f$ for the form factors
*/
vector<double> _T30;
/**
* The \f$\sigma_1\f$ parameter for the \f$T_2\f$ form factor.
*/
vector<double> _sigma1T3;
/**
* The \f$\sigma_2\f$ parameter for the \f$T_2\f$ form factor.
*/
vector<double> _sigma2T3;
//@}
/**
* The scalar mass for the \f$q^2\f$ dependence of the form factor.
*/
vector<Energy> _massP;
/**
* The vector mass for the \f$q^2\f$ dependence of the form factor.
*/
vector<Energy> _massV;
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _thetaeta;
};
}
#endif /* HERWIG_MelikhovStechFormFactor_H */
diff --git a/Decay/FormFactors/ScalarFormFactor.h b/Decay/FormFactors/ScalarFormFactor.h
--- a/Decay/FormFactors/ScalarFormFactor.h
+++ b/Decay/FormFactors/ScalarFormFactor.h
@@ -1,427 +1,427 @@
// -*- C++ -*-
//
// ScalarFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ScalarFormFactor_H
#define HERWIG_ScalarFormFactor_H
//
// This is the declaration of the ScalarFormFactor class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ScalarFormFactor.fh"
#include "ThePEG/Config/Complex.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The ScalarFormFactor class is the base class for the form factors
* for the weak decay of scalar to scalar, vector and tensor mesons.
*
* This is designed so that the form factors can be used for both the semi-leptonic
* decays and using factorization for hadronic weak decays. It also includes the
* necessary form factors for the weak-radiative decays \f$B\to K\gamma\f$
* and \f$B\to K \ell^+\ell^-\f$.
*
* The form factors are given below for the decay \f$X(p_X)\to Y(p_Y)\f$ with
* \f$q_\mu=(p_X-p_Y)_\mu\f$.
*
* The scalar-scalar form factor is defined by
*
* \f[ \langle Y(p_Y)|(V-A)_\mu|X(p_X)\rangle =
* \left\{(p_X+p_Y)_\mu-\frac{m_X^2-m_Y^2}{q^2}q_\mu\right\}f_+(q^2)
* +\left\{\frac{m_X^2-m_Y^2}{q^2}q_\mu\right\}f_0(q^2). \f]
*
* This is the form factor for the standard weak current. For the weak radiative
* decays we also need the penguin current.
*
* \f[ \langle Y(p_Y)|J^\sigma_\mu|X(p_X)\rangle = \frac{i}{m_X+m_Y}
* \left\{q^2(p_X+p_Y)_\mu-(m_X^2-m_Y^2)q_\mu\right\}f_T(q^2)\f]
*
*
* The scalar-vector form factors are defined so that
*
* \f[ \langle Y(p_Y)|(V-A)_\mu|X(p_X)\rangle = -i\epsilon^*_\mu(m_X+m_Y)A_1(q^2)
* +i(p_X+p_Y)_\mu\epsilon^*\cdot q \frac{A_2(q^2)}{m_X+m_Y}\f]
*\f[\phantom{\langle Y(p_Y)|(V-A)_\mu|X(p_X)\rangle =}
* +iq_\mu\epsilon^*\cdot q \frac{2m_Y}{q^2}\left(A_3(q^2)-A_0(q^2)\right)
* +\epsilon_{\mu\nu\rho\sigma}\epsilon^{*\nu}p_X^\rho p_Y^\sigma \frac{2V(q^2)}{m_X+m_Y},
* \f]
*
* where the form factor \f$A_3(q^2)\f$ can be defined in terms of \f$A_1\f$
* and \f$A_2\f$ using
*
* \f[ A_3(q^2) = \frac{m_X+m_Y}{2m_Y}A_1(q^2)-\frac{m_X-m_Y}{2m_Y}A_2(q^2)\f]
*
* and \f$A_0(0)=A_3(0)\f$.
*
* As with the scalar to scalar currents this is the form factor for the standard
* weak current. We also need the penguin current
*
* \f[ \langle Y(p_Y)|J^\sigma_\mu|X(p_X)\rangle =
* i\epsilon_{\mu\nu\rho\sigma}\epsilon^{*\nu}p_X^\rho p_Y^\sigma2T_1(q^2)
* +T_2(q^2)\left\{\epsilon^*_\mu(m_X^2-m^2_Y)-\epsilon^*\cdot q (p_X+p_Y)_\mu\right\}
* \f]\f[\phantom{\langle Y(p_Y)|J^\sigma_\mu|X(p_X)\rangle = }
* +T_3(q^2)\epsilon^*\cdot q\left\{q_\mu-\frac{q^2}{m^2_X-m^2_Y}(p_X+p_Y)_\mu\right\},
* \f]
*
* with \f$T_1(0)=T_2(0)\f$.
*
* The scalar-tensor form factors are defined as
*
* \f[ \langle Y(p_Y)|(V-A)_\mu|X(p_x)\rangle =
* i h(q^2) \epsilon_{\mu\nu\lambda\rho} \epsilon^{*\nu\alpha} p_{Y\alpha}
* (p_X+p_Y)^\lambda(p_X-p_Y)^\rho
* -k(q^2)\epsilon^*_{\mu\nu}p_Y^\nu
* \f]\f[\phantom{\langle Y(p_Y)|(V-A)_mu|X(p_x)\rangle =}
* -b_+(q^2)\epsilon^*_{\alpha\beta}p_X^\alpha p_X^\beta(p_X+p_Y)_\mu
* -b_-(q^2)\epsilon^*_{\alpha\beta}p_X^\alpha p_X^\beta(p_X-p_Y)_\mu.
* \f]
*
* This is the base class and contains virtual methods which should return
* the form factors described above. This class stores information on the
* incoming and outgoing particles for a given form factor, the spin of the
* outgoing particle and the id's of the quarks.
*
* Classes inheriting from this class should specify which combinations of
* particles etc are allowed using the addFormFactor member.
*
* @see BaryonFormFactor
*/
class ScalarFormFactor: public Interfaced {
public:
/**
* Default constructor
*/
ScalarFormFactor() : _numbermodes(0) {}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
public:
/** @name Functions to give information about the form factors available. */
//@{
/**
* Find the location for a given pair of particle.
* \param in PDG code for the incoming meson.
* \param out PDG code for the outgoing meson.
* \param cc particles or charge conjugates stored in form factor.
* @return The location in the vectors storing the data.
*/
int formFactorNumber(int in,int out,bool & cc) const {
if(_incomingid.size()==0) return -1;
int output(-1);unsigned int ix(0);
do {
if(_incomingid[ix]== in && _outgoingid[ix]== out) {
cc=false;
output=ix;
}
else if (_incomingid[ix]==-in && _outgoingid[ix]==-out) {
cc=true;
output=ix;
}
else if(_incomingid[ix]==-in && _outgoingid[ix]==out &&
(abs(_outgoingid[ix])/100)%10==(abs(_outgoingid[ix])/10)%10) {
cc=true;
output=ix;
}
++ix;
}
while(ix<_incomingid.size()&&output<0);
return output;
}
/**
* Get the particle ids for an entry.
* @param iloc The location in the list.
* @param id0 The PDG code for the incoming meson.
* @param id1 The PDG code for the outgoing meson.
*/
void particleID(unsigned int iloc,int& id0,int& id1) const {
id0=_incomingid[iloc];
id1=_outgoingid[iloc];
}
/**
* Information on the form factor.
* @param iloc The location in the list.
* @param ispin The spin of the outgoing meson.
* @param spect The PDG code of the spectator quark.
* @param inquark The PDG code for decaying incoming quark.
* @param outquark The PDG code for the outgoing quark produced in the decay.
*/
void formFactorInfo(unsigned int & iloc,int & ispin,int & spect,
int & inquark, int & outquark) const {
ispin = _outgoingJ[iloc];
spect = _spectator[iloc];
inquark = _inquark[iloc];
outquark = _outquark[iloc];
}
/**
* Information on the form factor.
* @param in The PDG code of the incoming meson.
* @param out The PDG code of the outgoing meson.
* @param ispin The spin of the outgoing meson.
* @param spect The PDG code of the spectator quark.
* @param inquark The PDG code for decaying incoming quark.
* @param outquark The PDG code for the outgoing quark produced in the decay.
*/
void formFactorInfo(int in,int out,int & ispin,
int & spect,int & inquark, int & outquark) const {
bool dummy;
unsigned int ix(formFactorNumber(in,out,dummy));
formFactorInfo(ix,ispin,spect,inquark,outquark);
}
/**
* number of form factors
*/
unsigned int numberOfFactors() const {return _incomingid.size();}
//@}
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* This method is virtual and must be implementented in classes
* inheriting from this which include scalar to scalar form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form factor \f$f_0\f$.
* @param fp The form factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1,Complex & f0,
Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector. This method is virtual
* and must be implemented in classes inheriting from this which include scalar to
* vector form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param A0 The form factor \f$A_0\f$
* @param A1 The form factor \f$A_1\f$
* @param A2 The form factor \f$A_2\f$
* @param V The form factor \f$V\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1,Complex & A0,
Complex & A1,Complex & A2, Complex & V) const;
/**
* The form factor for the weak decay of a scalar to a tensor. This method is virtual
* and must be implemented in classes inheriting from this which include scalar to
* tensor form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param h The form factor \f$h\f$.
* @param k The form factor \f$k\f$.
* @param bp The form factor \f$b_+\f$.
* @param bm The form factor \f$b_-\f$.
*/
virtual void ScalarTensorFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0, Energy m1, complex<InvEnergy2> & h,
Complex & k, complex<InvEnergy2> & bp,
complex<InvEnergy2> & bm) const;
/**
* The form factor for the weak penguin decay of a scalar meson to a scalar meson.
* This method is virtual
* and must be implemented in classes inheriting from this which include scalar to
* scalar penguin form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param fT The form factor \f$f_T\f$.
*/
virtual void ScalarScalarSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0, Energy m1,Complex & fT) const;
/**
* The form factor for the weak penguin decay of a scalar meson to a vector meson.
* This method is virtual
* and must be implemented in classes inheriting from this which include scalar to
* vector penguin form factors.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param T1 The form factor \f$T_1\f$.
* @param T2 The form factor \f$T_2\f$.
* @param T3 The form factor \f$T_3\f$.
*/
virtual void ScalarVectorSigmaFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0, Energy m1, Complex & T1,
Complex & T2, Complex & T3) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/**
* Add a form factor to the list.
* @param in The PDG code of the incoming meson.
* @param out The PDG code of the outgoing meson.
* @param spin The spin of the outgoing meson.
* @param spect The PDG code of the spectator quark.
* @param inquark The PDG code for decaying incoming quark.
* @param outquark The PDG code for the outgoing quark produced in the decay.
*/
void addFormFactor(int in,int out,int spin, int spect,
int inquark, int outquark) {
_incomingid.push_back(in);
_outgoingid.push_back(out);
_outgoingJ.push_back(spin);
_spectator.push_back(spect);
_inquark.push_back(inquark);
_outquark.push_back(outquark);
}
/**
* Set initial number of modes
* @param nmodes The number of modes.
*/
void initialModes(unsigned int nmodes) {_numbermodes=nmodes;}
/**
* Get the initial number of modes
*/
unsigned int initialModes() const {return _numbermodes;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ScalarFormFactor & operator=(const ScalarFormFactor &);
+ ScalarFormFactor & operator=(const ScalarFormFactor &) = delete;
private:
/**
* the id's of the incoming particles
*/
vector<int> _incomingid;
/**
* the id's of the outgoing particles
*/
vector<int> _outgoingid;
/**
* spin of the outgoing particle
*/
vector<int> _outgoingJ;
/**
* the id of the spectator quark
*/
vector<int> _spectator;
/**
* the id of the decaying quark
*/
vector<int> _inquark;
/**
* the id of the outgoing quark
*/
vector<int> _outquark;
/**
* The initial number of modes
*/
unsigned int _numbermodes;
};
}
#endif /* HERWIG_ScalarFormFactor_H */
diff --git a/Decay/FormFactors/SingletonFormFactor.h b/Decay/FormFactors/SingletonFormFactor.h
--- a/Decay/FormFactors/SingletonFormFactor.h
+++ b/Decay/FormFactors/SingletonFormFactor.h
@@ -1,183 +1,183 @@
// -*- C++ -*-
#ifndef HERWIG_SingletonFormFactor_H
#define HERWIG_SingletonFormFactor_H
//
// This is the declaration of the SingletonFormFactor class.
//
#include "BaryonFormFactor.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/PDT/ParticleData.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The SingletonFormFactor class implements the form-factors from
* PRD43, 2939 for the decay of spin-1/2 baryons containing bottom and charm
* quarks.
*
* @see BaryonFormFactor
*
*/
class SingletonFormFactor: public BaryonFormFactor {
public:
/**
* Default constructor
*/
SingletonFormFactor();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Form Factors */
//@{
/**
* The form factor for the weak decay of a spin \f$\frac12\f$ baryon to a
* spin \f$\frac12\f$ baryon.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form factor list.
* @param id0 The PDG code of the incoming baryon.
* @param id1 The PDG code of the outgoing baryon.
* @param m0 The mass of the incoming baryon.
* @param m1 The mass of the outgoing baryon.
* @param f1v The form factor \f$F^V_1\f$.
* @param f2v The form factor \f$F^V_2\f$.
* @param f3v The form factor \f$F^V_3\f$.
* @param f1a The form factor \f$F^A_1\f$.
* @param f2a The form factor \f$F^A_2\f$.
* @param f3a The form factor \f$F^A_3\f$.
*/
virtual void SpinHalfSpinHalfFormFactor(Energy2 q2,int iloc, int id0, int id1,
Energy m0, Energy m1,
Complex & f1v,Complex & f2v,Complex & f3v,
Complex & f1a,Complex & f2a,Complex & f3a);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SingletonFormFactor & operator=(const SingletonFormFactor &);
+ SingletonFormFactor & operator=(const SingletonFormFactor &) = delete;
private:
/**
* The charm quark mass.
*/
Energy _mcharm;
/**
* The strange quark mass.
*/
Energy _mstrange;
/**
* The mixing angle for the \f$\Lambda\f$.
*/
double _thetalambda;
/**
* The mixing angle for the \f$\Sigma\f$.
*/
double _thetasigma;
/**
* The mixing angle for the \f$\Xi\f$.
*/
double _thetaxi;
/**
* The mixing angle for the \f$\Xi'\f$.
*/
double _thetaxip;
/**
* The pole masses for the \f$q^2\f$ dependence of the form factors.
*/
vector<Energy> _polemass;
/**
* The \f$\xi\f$ parameter for the form factors.
*/
vector<double> _xi;
/**
* The normalisation factor, \f$N_{mM}\f$, for the form factors.
*/
vector<double> _nmM;
/**
* The mass of the quark for the form factor.
*/
vector<Energy> _mquark;
};
}
#endif /* HERWIG_SingletonFormFactor_H */
diff --git a/Decay/FormFactors/WSBFormFactor.h b/Decay/FormFactors/WSBFormFactor.h
--- a/Decay/FormFactors/WSBFormFactor.h
+++ b/Decay/FormFactors/WSBFormFactor.h
@@ -1,208 +1,208 @@
// -*- C++ -*-
//
// WSBFormFactor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_WSBFormFactor_H
#define HERWIG_WSBFormFactor_H
//
// This is the declaration of the WSBFormFactor class.
//
#include "ScalarFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The WSBFormFactor class is the implementation of the form factor
* model of Z.Phys. C29, 637 for the semi-leptonic form factors. It includes
* form factors for a number of \f$D\f$, \f$B\f$ and \f$D_s\f$ decays.
* In practice the parameters
* of the model were taken from Z.Phys. C34, 103 which includes a number of
* decay modes which were not considered in the original paper.
*
* This form factor model is included both to give an alternative for many modes
* to the ISGW models and for use in the factorisation approxmation for hadronic
* decays.
*
* @see ScalarFormFactor
* @see ISGWFormFactor
* @see ISGW2FormFactor
*
*/
class WSBFormFactor: public ScalarFormFactor {
public:
/**
* Default constructor
*/
WSBFormFactor();
/** @name Form-Factors */
//@{
/**
* The form factor for the weak decay of a scalar to a scalar.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param f0 The form-factor \f$f_0\f$.
* @param fp The form-factor \f$f_+\f$.
*/
virtual void ScalarScalarFormFactor(Energy2 q2,unsigned int iloc,int id0,int id1,
Energy m0,Energy m1,
Complex & f0,Complex & fp) const;
/**
* The form factor for the weak decay of a scalar to a vector.
* @param q2 The scale \f$q^2\f$.
* @param iloc The location in the form-factor list.
* @param id0 The PDG code of the incoming meson.
* @param id1 The PDG code of the outgoing meson.
* @param m0 The mass of the incoming meson.
* @param m1 The mass of the outgoing meson.
* @param V The form-factor \f$V\f$
* @param A0 The form-factor \f$A_0\f$
* @param A1 The form-factor \f$A_1\f$
* @param A2 The form-factor \f$A_2\f$
*/
virtual void ScalarVectorFormFactor(Energy2 q2, unsigned int iloc, int id0, int id1,
Energy m0, Energy m1, Complex & V,
Complex & A0,Complex & A1,Complex & A2) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- WSBFormFactor & operator=(const WSBFormFactor &);
+ WSBFormFactor & operator=(const WSBFormFactor &) = delete;
private:
/** @name Parameters for the form factors */
//@{
/**
* The form factor at \f$q^2=0\f$ for scalar decays.
*/
vector<double> _F0;
/**
* the form factor \f$V\f$ at \f$q^2=0\f$ for vector decays.
*/
vector<double> _V;
/**
* the form factor \f$A_0\f$ at \f$q^2=0\f$ for vector decays.
*/
vector<double> _A0;
/**
* the form factor \f$A_1\f$ at \f$q^2=0\f$ for vector decays.
*/
vector<double> _A1;
/**
* the form factor \f$A_2\f$ at \f$q^2=0\f$ for vector decays.
*/
vector<double> _A2;
/**
* Spin-0 mass for the scalar form factors
*/
vector<Energy> _mS0;
/**
* Spin-1 mass for the scalar form factors
*/
vector<Energy> _mS1;
/**
* Spin-0 mass for the vector form factors
*/
vector<Energy> _mV0;
/**
* Spin-1 mass for the vector form factors
*/
vector<Energy> _mV1;
//@}
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _thetaeta;
};
}
#endif /* HERWIG_WSBFormFactor_H */
diff --git a/Decay/General/FFSDecayer.h b/Decay/General/FFSDecayer.h
--- a/Decay/General/FFSDecayer.h
+++ b/Decay/General/FFSDecayer.h
@@ -1,218 +1,218 @@
// -*- C++ -*-
//
// FFSDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFSDecayer_H
#define HERWIG_FFSDecayer_H
//
// This is the declaration of the FFSDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::FFSVertexPtr;
/** \ingroup Decay
* The FFSDecayer class implements the decay of a fermion
* to a fermion and a vector in a general model. It holds an FFVVertex
* pointer that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class FFSDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
FFSDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFSDecayer & operator=(const FFSDecayer &);
+ FFSDecayer & operator=(const FFSDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFFSVertex
*/
vector<AbstractFFSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<FFSVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from incoming (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertexF_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from outgoing scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> outgoingVertexS_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Spinor wavefunctions
*/
mutable vector<SpinorWaveFunction> wave_ ;
/**
* Barred spinor wavefunctions
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Scalar wavefunction for 3 body decay
*/
mutable ScalarWaveFunction swave3_;
/**
* Spinor wavefunction for 3 body decay
*/
mutable vector<SpinorWaveFunction> wave3_;
/**
* Barred spinor wavefunction for 3 body decay
*/
mutable vector<SpinorBarWaveFunction> wavebar3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_FFSDecayer_H */
diff --git a/Decay/General/FFVCurrentDecayer.h b/Decay/General/FFVCurrentDecayer.h
--- a/Decay/General/FFVCurrentDecayer.h
+++ b/Decay/General/FFVCurrentDecayer.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
//
// FFVCurrentDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFVCurrentDecayer_H
#define HERWIG_FFVCurrentDecayer_H
//
// This is the declaration of the FFVCurrentDecayer class.
//
#include "GeneralCurrentDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::FFVVertexPtr;
/**
* Here is the documentation of the FFVCurrentDecayer class.
*
* @see \ref FFVCurrentDecayerInterfaces "The interfaces"
* defined for FFVCurrentDecayer.
*/
class FFVCurrentDecayer: public GeneralCurrentDecayer {
public:
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart Pointer to incoming particle data object
* @param outa Pointer to first outgoing particle data object
* @param currout The outgoing particles from the current
*/
virtual Energy partialWidth(tPDPtr inpart, tPDPtr outa,
vector<tPDPtr> currout);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFVCurrentDecayer & operator=(const FFVCurrentDecayer &);
+ FFVCurrentDecayer & operator=(const FFVCurrentDecayer &) = delete;
private:
/**
* Pointer to FFVVertex
*/
FFVVertexPtr FFVPtr_;
/**
* Spinr density matrix
*/
mutable RhoDMatrix rho_;
/**
* Spinor wavefunction
*/
mutable vector<SpinorWaveFunction> wave_ ;
/**
* Barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
};
}
#endif /* HERWIG_FFVCurrentDecayer_H */
diff --git a/Decay/General/FFVDecayer.h b/Decay/General/FFVDecayer.h
--- a/Decay/General/FFVDecayer.h
+++ b/Decay/General/FFVDecayer.h
@@ -1,223 +1,223 @@
// -*- C++ -*-
//
// FFVDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFVDecayer_H
#define HERWIG_FFVDecayer_H
//
// This is the declaration of the FFVDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::FFVVertexPtr;
/** \ingroup Decay
* The FFVDecayer class implements the decay of a fermion
* to a fermion and a vector in a general model. It holds an FFVVertex
* pointer that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class FFVDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
FFVDecayer() {}
public:
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing, vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFVDecayer & operator=(const FFVDecayer &);
+ FFVDecayer & operator=(const FFVDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFFVVertex
*/
vector<AbstractFFVVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<FFVVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from incoming (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertexF_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertexV_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Spinor wavefunction
*/
mutable vector<SpinorWaveFunction> wave_ ;
/**
* Barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* Polarization vectors
*/
mutable vector<VectorWaveFunction> vector_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* vector wavefunction for 3 body decay
*/
mutable vector<VectorWaveFunction> vector3_;
/**
* Spinor wavefunction for 3 body decay
*/
mutable vector<SpinorWaveFunction> wave3_;
/**
* Barred spinor wavefunction for 3 body decay
*/
mutable vector<SpinorBarWaveFunction> wavebar3_;
/**
* Vector wavefunction for gluon in 3 body decay
*/
mutable vector<VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_FFVDecayer_H */
diff --git a/Decay/General/FRSDecayer.h b/Decay/General/FRSDecayer.h
--- a/Decay/General/FRSDecayer.h
+++ b/Decay/General/FRSDecayer.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
//
// FRSDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FRSDecayer_H
#define HERWIG_FRSDecayer_H
//
// This is the declaration of the FRSDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Scalar/RFSVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::RFSVertexPtr;
/** \ingroup Decay
* The FRSDecayer class implements the decay of a fermion
* to a spin-3/2 fermion and a vector in a general model. It holds an RFVVertex
* pointer that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class FRSDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
FRSDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FRSDecayer & operator=(const FRSDecayer &);
+ FRSDecayer & operator=(const FRSDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFRSVertex
*/
vector<AbstractRFSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<RFSVertexPtr> perturbativeVertex_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Spinor wavefunctions
*/
mutable vector<SpinorWaveFunction> wave_ ;
/**
* Barred spinor wavefunctions
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* RS Spinor wavefunctions
*/
mutable vector<RSSpinorWaveFunction> RSwave_ ;
/**
* Barred RS spinor wavefunctions
*/
mutable vector<RSSpinorBarWaveFunction> RSwavebar_;
};
}
#endif /* HERWIG_FRSDecayer_H */
diff --git a/Decay/General/FRVDecayer.h b/Decay/General/FRVDecayer.h
--- a/Decay/General/FRVDecayer.h
+++ b/Decay/General/FRVDecayer.h
@@ -1,171 +1,171 @@
// -*- C++ -*-
//
// FRVDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FRVDecayer_H
#define HERWIG_FRVDecayer_H
//
// This is the declaration of the FRVDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Vector/RFVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::RFVVertexPtr;
/** \ingroup Decay
* The FRVDecayer class implements the decay of a fermion
* to a spin-3/2 fermion and a vector in a general model. It holds an RFVVertex
* pointer that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class FRVDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
FRVDecayer() {}
public:
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FRVDecayer & operator=(const FRVDecayer &);
+ FRVDecayer & operator=(const FRVDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFRVVertex
*/
vector<AbstractRFVVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<RFVVertexPtr> perturbativeVertex_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Spinor wavefunction
*/
mutable vector<SpinorWaveFunction> wave_ ;
/**
* Barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* RS Spinor wavefunction
*/
mutable vector<RSSpinorWaveFunction> RSwave_ ;
/**
* Barred RS spinor wavefunction
*/
mutable vector<RSSpinorBarWaveFunction> RSwavebar_;
/**
* Polarization vectors
*/
mutable vector<VectorWaveFunction> vector_;
};
}
#endif /* HERWIG_FRVDecayer_H */
diff --git a/Decay/General/FtoFFFDecayer.h b/Decay/General/FtoFFFDecayer.h
--- a/Decay/General/FtoFFFDecayer.h
+++ b/Decay/General/FtoFFFDecayer.h
@@ -1,137 +1,137 @@
// -*- C++ -*-
#ifndef HERWIG_FtoFFFDecayer_H
#define HERWIG_FtoFFFDecayer_H
//
// This is the declaration of the FtoFFFDecayer class.
//
#include "GeneralThreeBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The FtoFFFDecayer class provides the general matrix elements for the
* decay of a (anti)fermion to three (anti)fermions.
*
* @see \ref FtoFFFDecayerInterfaces "The interfaces"
* defined for FtoFFFDecayer.
*/
class FtoFFFDecayer: public GeneralThreeBodyDecayer {
public:
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 (or higher body) partial width
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/ void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Set up the diagrams etc
*/
virtual void setupDiagrams(bool checkKinematics);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FtoFFFDecayer & operator=(const FtoFFFDecayer &);
+ FtoFFFDecayer & operator=(const FtoFFFDecayer &) = delete;
private:
/**
* Store the vector of FFSVertex pairs
*/
vector<pair<AbstractFFSVertexPtr, AbstractFFSVertexPtr> > sca_;
/**
* Store the vector of FFVVertex pairs
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > vec_;
/**
* Store the vector of FFTVertex pairs
*/
vector<pair<AbstractFFTVertexPtr, AbstractFFTVertexPtr> > ten_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Spinors for incoming particle
*/
mutable pair<vector<SpinorWaveFunction>,vector<SpinorBarWaveFunction> > inwave_;
/**
* Spinors for outgoing particles
*/
mutable pair<vector<SpinorWaveFunction>,vector<SpinorBarWaveFunction> > outwave_[3];
};
}
#endif /* HERWIG_FtoFFFDecayer_H */
diff --git a/Decay/General/FtoFVVDecayer.h b/Decay/General/FtoFVVDecayer.h
--- a/Decay/General/FtoFVVDecayer.h
+++ b/Decay/General/FtoFVVDecayer.h
@@ -1,151 +1,151 @@
// -*- C++ -*-
#ifndef HERWIG_FtoFVVDecayer_H
#define HERWIG_FtoFVVDecayer_H
//
// This is the declaration of the FtoFVVDecayer class.
//
#include "GeneralThreeBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The FtoFVVDecayer class provides the general matrix elements for the
* decay of a fermion to a fermion and two vector bosons.
*
* @see \ref FtoFVVDecayerInterfaces "The interfaces"
* defined for FtoFVVDecayer.
*/
class FtoFVVDecayer: public GeneralThreeBodyDecayer {
public:
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 (or higher body) partial width
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Set up the diagrams etc
*/
virtual void setupDiagrams(bool checkKinematics);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FtoFVVDecayer & operator=(const FtoFVVDecayer &);
+ FtoFVVDecayer & operator=(const FtoFVVDecayer &) = delete;
private:
/**
* Store the vector of scalar intermediates
*/
vector<pair<AbstractFFSVertexPtr, AbstractVVSVertexPtr> > sca_;
/**
* Store the vector for fermion intermediates
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > fer_;
/**
* Store the vector for gauge boson intermediates
*/
vector<pair<AbstractFFVVertexPtr, AbstractVVVVertexPtr> > vec_;
/**
* Store the vector of tensor intermediates
*/
vector<pair<AbstractFFTVertexPtr, AbstractVVTVertexPtr> > ten_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Spinor wavefunctions
*/
mutable vector<SpinorWaveFunction> fwave_;
/**
* Barred spinor wavefunctions
*/
mutable vector<SpinorBarWaveFunction> fbwave_;
/**
* Vector wavefunctions
*/
mutable pair<vector<VectorWaveFunction>, vector<VectorWaveFunction> > vwave_;
};
}
#endif /* HERWIG_FtoFVVDecayer_H */
diff --git a/Decay/General/GeneralCurrentDecayer.h b/Decay/General/GeneralCurrentDecayer.h
--- a/Decay/General/GeneralCurrentDecayer.h
+++ b/Decay/General/GeneralCurrentDecayer.h
@@ -1,212 +1,212 @@
// -*- C++ -*-
//
// GeneralCurrentDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GeneralCurrentDecayer_H
#define HERWIG_GeneralCurrentDecayer_H
//
// This is the declaration of the GeneralCurrentDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/WeakCurrents/WeakDecayCurrent.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "GeneralCurrentDecayer.fh"
namespace Herwig {
using namespace ThePEG;
using Helicity::VertexBasePtr;
/**
* Here is the documentation of the GeneralCurrentDecayer class.
*
* @see \ref GeneralCurrentDecayerInterfaces "The interfaces"
* defined for GeneralCurrentDecayer.
*/
class GeneralCurrentDecayer: public DecayIntegrator {
public:
/**
* The default constructor.
*/
GeneralCurrentDecayer() :
maxmass_(5.*GeV), wgtmax_(0.) {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const = 0;
/**
* Function to return partial Width
* @param inpart Pointer to incoming particle data object
* @param outa Pointer to first outgoing particle data object
* @param currout Pointer to particles in the current
*/
virtual Energy partialWidth(tPDPtr inpart, tPDPtr outa,
vector<tPDPtr> currout) = 0;
//@}
/**
* set up the decay
*/
void setDecayInfo(PDPtr in, PDPtr out, const vector<tPDPtr> & outCurrent,
VertexBasePtr vertex, WeakDecayCurrentPtr current,
Energy maxmass);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/**
* The number of the mode
* @param cc Whether of not this is the charge conjugate of the defined mode
* @param id The PDG codes of the particles
*/
int modeNumber(bool & cc, vector<long> id) const;
/**
* Access to the map between the number of the mode and the modes in
* the current
*/
unsigned int mode() const { return mode_; }
/**
* Access to the weak current
*/
WeakDecayCurrentPtr weakCurrent() const { return current_; }
/**
* Get vertex pointer
* @return a pointer to the vertex
*/
VertexBasePtr vertex() const { return theVertex_; }
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralCurrentDecayer & operator=(const GeneralCurrentDecayer &);
+ GeneralCurrentDecayer & operator=(const GeneralCurrentDecayer &) = delete;
private:
/**
* Pointer to vertex set in inheriting class
*/
VertexBasePtr theVertex_;
/**
* Incoming particle
**/
PDPtr inpart_;
/**
* First outgoing particle
*/
PDPtr outpart_;
/**
* Outgoing particles from the current
*/
vector<tPDPtr> currentOut_;
/**
* Pointer to the current
*/
WeakDecayCurrentPtr current_;
/**
* Maximum mass difference
*/
Energy maxmass_;
/**
* mapping of the modes to the currents
*/
unsigned int mode_;
/**
* location of the weights
*/
int wgtloc_;
/**
* the maximum weight
*/
double wgtmax_;
/**
* The weights for the different channels
*/
vector<double> weights_;
};
}
#endif /* HERWIG_GeneralCurrentDecayer_H */
diff --git a/Decay/General/GeneralFourBodyDecayer.h b/Decay/General/GeneralFourBodyDecayer.h
--- a/Decay/General/GeneralFourBodyDecayer.h
+++ b/Decay/General/GeneralFourBodyDecayer.h
@@ -1,252 +1,252 @@
// -*- C++ -*-
#ifndef HERWIG_GeneralFourBodyDecayer_H
#define HERWIG_GeneralFourBodyDecayer_H
//
// This is the declaration of the GeneralFourBodyDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Models/General/PrototypeVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the GeneralFourBodyDecayer class.
*
* @see \ref GeneralFourBodyDecayerInterfaces "The interfaces"
* defined for GeneralFourBodyDecayer.
*/
class GeneralFourBodyDecayer: public DecayIntegrator {
public:
/**
* The default constructor.
*/
GeneralFourBodyDecayer(): nflow_(999), widthOpt_(1),
refTag_(), refTagCC_(), iflow_(999)
{}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Set the diagrams
*/
bool setDecayInfo(PDPtr incoming,vector<PDPtr> outgoing,
const vector<NBDiagram> & process,
double symfac);
//@}
/**
* Function to return partial Width
* @param inpart Pointer to incoming particle data object
* @param outgoing the decay products
*/
virtual Energy partialWidth(tPDPtr inpart,
OrderedParticles outgoing) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Incoming particle
*/
PDPtr incoming() const { return incoming_; }
/**
* Outgoing particles
*/
const vector<PDPtr> & outgoing() const { return outgoing_; }
/**
* Number of colour flows
*/
unsigned int numberOfFlows() const { return nflow_; }
/**
* Set up the colour factors
*/
bool setColourFactors(double symfac);
/**
* Return the matrix of colour factors
*/
const vector<DVector> & getColourFactors() const { return colour_; }
/**
* Return the matrix of colour factors
*/
const vector<DVector> & getLargeNcColourFactors() const {
return colourLargeNC_;
}
/**
* Option for the handling of the widths of the intermediate particles
*/
unsigned int widthOption() const { return widthOpt_; }
/**
* Set colour connections
* @param parent Parent particle
* @param out Particle vector containing particles to
* connect colour lines
*/
void colourConnections(const Particle & parent,
const ParticleVector & out) const;
/**
* Set the colour flow
* @param flow The value for the colour flow
*/
void colourFlow(unsigned int flow) const { iflow_ = flow; }
/**
* Set the colour flow
*/
unsigned int const & colourFlow() const { return iflow_; }
/**
* Access the TBDiagrams that store the required information
* to create the diagrams
*/
const vector<NBDiagram> & getProcessInfo() const {
return diagrams_;
}
/**
* Get the mapping between the phase-space channel and the diagram
*/
const vector<unsigned int> & diagramMap() const {
return diagmap_;
}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralFourBodyDecayer & operator=(const GeneralFourBodyDecayer &);
+ GeneralFourBodyDecayer & operator=(const GeneralFourBodyDecayer &) = delete;
private:
/**
* Store the incoming particle
*/
PDPtr incoming_;
/**
* Outgoing particles
*/
vector<PDPtr> outgoing_;
/**
* Store the diagrams for the decay
*/
vector<NBDiagram> diagrams_;
/**
* Map between the diagrams and the phase-space channels
*/
vector<unsigned int> diagmap_;
/**
* Store colour factors for ME calc.
*/
vector<DVector> colour_;
/**
* Store cololur factors for ME calc at large N_c
*/
vector<DVector> colourLargeNC_;
/**
* The number of colourflows.
*/
unsigned int nflow_;
/**
* Option for the treatment of the widths
*/
unsigned int widthOpt_;
/**
* Store a decay tag for this mode that can be tested when
* trying to determine whether it can be generated by
* this Decayer
*/
string refTag_;
/**
* Store a decay tag for the cc-mode that can be tested when
* trying to determine whether it can be generated by
* this Decayer
*/
string refTagCC_;
/**
* The colour flow
*/
mutable unsigned int iflow_;
};
}
#endif /* HERWIG_GeneralFourBodyDecayer_H */
diff --git a/Decay/General/GeneralThreeBodyDecayer.h b/Decay/General/GeneralThreeBodyDecayer.h
--- a/Decay/General/GeneralThreeBodyDecayer.h
+++ b/Decay/General/GeneralThreeBodyDecayer.h
@@ -1,332 +1,332 @@
// -*- C++ -*-
#ifndef HERWIG_GeneralThreeBodyDecayer_H
#define HERWIG_GeneralThreeBodyDecayer_H
//
// This is the declaration of the GeneralThreeBodyDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Models/General/TBDiagram.h"
#include "GeneralThreeBodyDecayer.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the GeneralThreeBodyDecayer class.
*
* @see \ref GeneralThreeBodyDecayerInterfaces "The interfaces"
* defined for GeneralThreeBodyDecayer.
*/
class GeneralThreeBodyDecayer: public DecayIntegrator {
public:
/** A ParticleData ptr and (possible) mass pair.*/
typedef pair<tcPDPtr, Energy> PMPair;
public:
/**
* The default constructor.
*/
GeneralThreeBodyDecayer() : nflow_(999), widthOpt_(1),
refTag_(), refTagCC_(), iflow_(999),
intOpt_(0), relerr_(1e-2)
{}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,const tPDVector & children) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa First decay product.
* @param outb Second decay product.
* @param outc Third decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb, PMPair outc) const;
/**
* An overidden member to calculate a branching ratio for a certain
* particle instance.
* @param dm The DecayMode of the particle
* @param p The particle object
* @param oldbrat The branching fraction given in the DecayMode object
*/
virtual double brat(const DecayMode & dm, const Particle & p,
double oldbrat) const;
//@}
/**
* Set the diagrams
*/
bool setDecayInfo(PDPtr incoming,vector<PDPtr> outgoing,
const vector<TBDiagram> & process,
double symfac);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
/**
* Set up the diagrams etc
*/
virtual void setupDiagrams(bool checkKinematics);
protected:
/**
* Access the TBDiagrams that store the required information
* to create the diagrams
*/
const vector<TBDiagram> & getProcessInfo() const {
return diagrams_;
}
/**
* Incoming particle
*/
PDPtr incoming() const { return incoming_; }
/**
* Outgoing particles
*/
const vector<PDPtr> & outgoing() const { return outgoing_; }
/**
* Number of colour flows
*/
unsigned int numberOfFlows() const { return nflow_; }
/**
* Set up the colour factors
*/
bool setColourFactors(double symfac);
/**
* Return the matrix of colour factors
*/
const vector<DVector> & getColourFactors() const { return colour_; }
/**
* Return the matrix of colour factors
*/
const vector<DVector> & getLargeNcColourFactors() const {
return colourLargeNC_;
}
/**
* Get the mapping between the phase-space channel and the diagram
*/
const vector<unsigned int> & diagramMap() const {
return diagmap_;
}
/**
* Option for the handling of the widths of the intermediate particles
*/
unsigned int widthOption() const { return widthOpt_; }
/**
* Set colour connections
* @param parent Parent particle
* @param out Particle vector containing particles to
* connect colour lines
*/
void colourConnections(const Particle & parent,
const ParticleVector & out) const;
/**
* Method to construct the channels for the integrator to give the partial width
* @param intype Types of the channels
* @param inmass Mass for the channels
* @param inwidth Width for the channels
* @param inpow Power for the channels
* @param inweights Weights for the channels
*/
void constructIntegratorChannels(vector<int> & intype, vector<Energy> & inmass,
vector<Energy> & inwidth, vector<double> & inpow,
vector<double> & inweights) const;
/**
* Set the colour flow
* @param flow The value for the colour flow
*/
void colourFlow(unsigned int flow) const { iflow_ = flow; }
/**
* Set the colour flow
*/
unsigned int const & colourFlow() const { return iflow_; }
/**
* Relative error for GQ integration
*/
double relativeError() const {return relerr_;}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralThreeBodyDecayer & operator=(const GeneralThreeBodyDecayer &);
+ GeneralThreeBodyDecayer & operator=(const GeneralThreeBodyDecayer &) = delete;
private:
/**
* Store the incoming particle
*/
PDPtr incoming_;
/**
* Outgoing particles
*/
vector<PDPtr> outgoing_;
/**
* Store the diagrams for the decay
*/
vector<TBDiagram> diagrams_;
/**
* Map between the diagrams and the phase-space channels
*/
vector<unsigned int> diagmap_;
/**
* Store colour factors for ME calc.
*/
vector<DVector> colour_;
/**
* Store cololur factors for ME calc at large N_c
*/
vector<DVector> colourLargeNC_;
/**
* The number of colourflows.
*/
unsigned int nflow_;
/**
* Reference to object to calculate the partial width
*/
mutable WidthCalculatorBasePtr widthCalc_;
/**
* Option for the treatment of the widths
*/
unsigned int widthOpt_;
/**
* Store a decay tag for this mode that can be tested when
* trying to determine whether it can be generated by
* this Decayer
*/
string refTag_;
/**
* Store a decay tag for the cc-mode that can be tested when
* trying to determine whether it can be generated by
* this Decayer
*/
string refTagCC_;
/**
* The colour flow
*/
mutable unsigned int iflow_;
/**
* Option for the construction of the gaussian integrator
*/
unsigned int intOpt_;
/**
* Relative error for GQ integration of partial width
*/
double relerr_;
};
}
#endif /* HERWIG_GeneralThreeBodyDecayer_H */
diff --git a/Decay/General/GeneralTwoBodyDecayer.h b/Decay/General/GeneralTwoBodyDecayer.h
--- a/Decay/General/GeneralTwoBodyDecayer.h
+++ b/Decay/General/GeneralTwoBodyDecayer.h
@@ -1,306 +1,306 @@
// -*- C++ -*-
//
// GeneralTwoBodyDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GeneralTwoBodyDecayer_H
#define HERWIG_GeneralTwoBodyDecayer_H
//
// This is the declaration of the GeneralTwoBodyDecayer class.
//
#include "Herwig/Decay/PerturbativeDecayer.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "GeneralTwoBodyDecayer.fh"
namespace Herwig {
using namespace ThePEG;
using Helicity::VertexBasePtr;
/** \ingroup Decay
* The GeneralTwoBodyDecayer class is designed to be the base class
* for 2 body decays for some general model. It inherits from
* PerturbativeDecayer and implements the modeNumber() virtual function
* that is the same for all of the decays. A decayer for
* a specific spin configuration should inherit from this and implement
* the me2() and partialWidth() member functions. The colourConnections()
* member should be called from inside me2() in the inheriting decayer
* to set up the colour lines.
*
* @see \ref GeneralTwoBodyDecayerInterfaces "The interfaces"
* defined for GeneralTwoBodyDecayer.
* @see PerturbativeDecayer
*/
class GeneralTwoBodyDecayer: public PerturbativeDecayer {
public:
/** A ParticleData ptr and (possible) mass pair.*/
typedef pair<tcPDPtr, Energy> PMPair;
public:
/**
* The default constructor.
*/
GeneralTwoBodyDecayer() : maxWeight_(1.), colour_(1,DVector(1,1.))
{}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int , const Particle & part,
const ParticleVector & decay, MEOption meopt) const = 0;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width
* calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class.
* @param coupling The coupling for the matrix element.
* @return True if the the order of the particles in the
* decayer is the same as the DecayMode tag.
*/
virtual bool twoBodyMEcode(const DecayMode & dm, int & mecode,
double & coupling) const;
/**
* An overidden member to calculate a branching ratio for a certain
* particle instance.
* @param dm The DecayMode of the particle
* @param p The particle object
* @param oldbrat The branching fraction given in the DecayMode object
*/
virtual double brat(const DecayMode & dm, const Particle & p,
double oldbrat) const;
//@}
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>) =0;
protected:
/** @name Functions used by inheriting decayers. */
//@{
/**
* Set integration weight
* @param wgt Maximum integration weight
*/
void setWeight(double wgt) { maxWeight_ = wgt; }
/**
* Set colour connections
* @param parent Parent particle
* @param out Particle vector containing particles to
* connect colour lines
*/
void colourConnections(const Particle & parent,
const ParticleVector & out) const;
/**
* Compute the spin and colour factor
*/
double colourFactor(tcPDPtr in, tcPDPtr out1, tcPDPtr out2) const;
/**
* Calculate matrix element ratio R/B
*/
double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
const ParticleVector & decay3, MEOption meopt,
ShowerInteraction inter);
/**
* Set the information on the decay
*/
void decayInfo(PDPtr incoming, PDPair outgoing);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/**
* Member for the generation of additional hard radiation
*/
//@{
/**
* Return the matrix of colour factors
*/
typedef vector<pair<int,double > > CFlowPairVec;
typedef vector<CFlowPairVec> CFlow;
const vector<DVector> & getColourFactors(const Particle & inpart,
const ParticleVector & decay,
unsigned int & nflow);
const CFlow & colourFlows(const Particle & inpart,
const ParticleVector & decay);
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralTwoBodyDecayer & operator=(const GeneralTwoBodyDecayer &);
+ GeneralTwoBodyDecayer & operator=(const GeneralTwoBodyDecayer &) = delete;
private:
/**
* Store the incoming particle
*/
PDPtr incoming_;
/**
* Outgoing particles
*/
vector<PDPtr> outgoing_;
/**
* Maximum weight for integration
*/
double maxWeight_;
/**
* Store colour factors for ME calc.
*/
vector<DVector> colour_;
};
/**
* Write a map with ShowerInteraction as the key
*/
template<typename T, typename Cmp, typename A>
inline PersistentOStream & operator<<(PersistentOStream & os,
const map<ShowerInteraction,T,Cmp,A> & m) {
os << m.size();
if(m.find(ShowerInteraction::QCD)!=m.end()) {
os << 0 << m.at(ShowerInteraction::QCD);
}
if(m.find(ShowerInteraction::QED)!=m.end()) {
os << 1 << m.at(ShowerInteraction::QED);
}
return os;
}
/**
* Read a map with ShowerInteraction as the key
*/
template <typename T, typename Cmp, typename A>
inline PersistentIStream & operator>>(PersistentIStream & is, map<ShowerInteraction,T,Cmp,A> & m) {
m.clear();
long size;
int k;
is >> size;
while ( size-- && is ) {
is >> k;
if(k==0)
is >> m[ShowerInteraction::QCD];
else if(k==1)
is >> m[ShowerInteraction::QED];
else
assert(false);
}
return is;
}
}
#endif /* HERWIG_GeneralTwoBodyDecayer_H */
diff --git a/Decay/General/SFFDecayer.h b/Decay/General/SFFDecayer.h
--- a/Decay/General/SFFDecayer.h
+++ b/Decay/General/SFFDecayer.h
@@ -1,234 +1,234 @@
// -*- C++ -*-
//
// SFFDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SFFDecayer_H
#define HERWIG_SFFDecayer_H
//
// This is the declaration of the SFFDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::FFSVertexPtr;
/** \ingroup Decay
* The SFFDecayer class implements the decay of a scalar to 2
* fermions in a general model. It holds an FFSVertex pointer that
* must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class SFFDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
SFFDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter,
MEOption meopt);
/**
* Indentify outgoing vertices for the fermion and antifermion
*/
void identifyVertices(const int iferm, const int ianti,
const Particle & inpart, const ParticleVector & decay,
AbstractFFVVertexPtr & outgoingVertexF,
AbstractFFVVertexPtr & outgoingVertexA,
ShowerInteraction inter);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SFFDecayer & operator=(const SFFDecayer &);
+ SFFDecayer & operator=(const SFFDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFFSVertex
*/
vector<AbstractFFSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<FFSVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from incoming scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex2_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction swave_;
/**
* Spinor wavefunction
*/
mutable vector<SpinorWaveFunction> wave_;
/**
* Barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Scalar wavefunction for 3 body decay
*/
mutable ScalarWaveFunction swave3_;
/**
* Spinor wavefunction for 3 body decay
*/
mutable vector<SpinorWaveFunction> wave3_;
/**
* Barred spinor wavefunction for 3 body decay
*/
mutable vector<SpinorBarWaveFunction> wavebar3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_SFFDecayer_H */
diff --git a/Decay/General/SRFDecayer.h b/Decay/General/SRFDecayer.h
--- a/Decay/General/SRFDecayer.h
+++ b/Decay/General/SRFDecayer.h
@@ -1,171 +1,171 @@
// -*- C++ -*-
//
// SRFDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SRFDecayer_H
#define HERWIG_SRFDecayer_H
//
// This is the declaration of the SRFDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Scalar/RFSVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::RFSVertexPtr;
/** \ingroup Decay
* The SRFDecayer class implements the decay of a scalar to spin-3/2
* and spin-1/2 fermion in a general model. It holds an RFSVertex pointer that
* must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class SRFDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
SRFDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SRFDecayer & operator=(const SRFDecayer &);
+ SRFDecayer & operator=(const SRFDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFFSVertex
*/
vector<AbstractRFSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<RFSVertexPtr> perturbativeVertex_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction swave_;
/**
* Spinor wavefunction
*/
mutable vector<SpinorWaveFunction> wave_;
/**
* Barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* RS Spinor wavefunction
*/
mutable vector<RSSpinorWaveFunction> RSwave_;
/**
* Barred RS spinor wavefunction
*/
mutable vector<RSSpinorBarWaveFunction> RSwavebar_;
};
}
#endif /* HERWIG_SRFDecayer_H */
diff --git a/Decay/General/SSSDecayer.h b/Decay/General/SSSDecayer.h
--- a/Decay/General/SSSDecayer.h
+++ b/Decay/General/SSSDecayer.h
@@ -1,211 +1,211 @@
// -*- C++ -*-
//
// SSSDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSSDecayer_H
#define HERWIG_SSSDecayer_H
//
// This is the declaration of the SSSDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SSSVertexPtr;
/** \ingroup Decay
* The SSDecayer class implements the decay of a scalar
* to 2 scalars in a general model. It holds a SSSVertex
* pointer that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class SSSDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
SSSDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
/**
* Indentify outgoing vertices for the scalar and anti scalar
*/
void identifyVertices(const int iscal, const int ianti,
const Particle & inpart, const ParticleVector & decay,
AbstractVSSVertexPtr & abstractOutgoingVertexS,
AbstractVSSVertexPtr & abstractOutgoingVertexA,
ShowerInteraction inter);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSSDecayer & operator=(const SSSDecayer &);
+ SSSDecayer & operator=(const SSSDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractSSSVertex
*/
vector<AbstractSSSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<SSSVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from incoming scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from outgoing scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from outgoing scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> outgoingVertex2_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunctions
*/
mutable Helicity::ScalarWaveFunction swave_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Scalar wavefunction for 3 body decay
*/
mutable Helicity::ScalarWaveFunction swave3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_SSSDecayer_H */
diff --git a/Decay/General/SSVDecayer.h b/Decay/General/SSVDecayer.h
--- a/Decay/General/SSVDecayer.h
+++ b/Decay/General/SSVDecayer.h
@@ -1,224 +1,224 @@
// -*- C++ -*-
//
// SSVDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSVDecayer_H
#define HERWIG_SSVDecayer_H
//
// This is the declaration of the SSVDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
#include "ThePEG/Repository/EventGenerator.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VSSVertexPtr;
/** \ingroup Decay
* The SSVDecayer class implements the decay of a scalar to a vector
* and a scalar in a general model. It holds an VSSVertex pointer
* that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class SSVDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
SSVDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter,
MEOption meopt);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSVDecayer & operator=(const SSVDecayer &);
+ SSVDecayer & operator=(const SSVDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFFVVertex
*/
vector<AbstractVSSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<VSSVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from incoming scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from outgoing scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> outgoingVertexS_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertexV_;
/**
* Abstract pointer to AbstractVVSSVertex for QCD radiation from 4 point vertex
*/
map<ShowerInteraction,AbstractVVSSVertexPtr> fourPointVertex_;
/**
* Spinor density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunction
*/
mutable Helicity::ScalarWaveFunction swave_;
/**
* Vector wavefunction
*/
mutable vector<Helicity::VectorWaveFunction> vector_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Scalar wavefunction for 3 body decay
*/
mutable Helicity::ScalarWaveFunction swave3_;
/**
* Scalar wavefunction for 3 body decay
*/
mutable Helicity::ScalarWaveFunction scal_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> vector3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_SSVDecayer_H */
diff --git a/Decay/General/SVVDecayer.h b/Decay/General/SVVDecayer.h
--- a/Decay/General/SVVDecayer.h
+++ b/Decay/General/SVVDecayer.h
@@ -1,230 +1,230 @@
// -*- C++ -*-
//
// SVVDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SVVDecayer_H
#define HERWIG_SVVDecayer_H
//
// This is the declaration of the SVVDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VVSVertexPtr;
/** \ingroup Decay
* This SVVDecayer class implements the decay of a scalar to
* 2 vector bosons using either the tree level VVSVertex or the loop vertex.
* It inherits from
* GeneralTwoBodyDecayer and implements the virtual member functions me2()
* and partialWidth(). It also stores a pointer to the VVSVertex.
*
* @see GeneralTwoBodyDecayer
*
*/
class SVVDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
SVVDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Find the vertices for the decay
*/
void identifyVertices(const Particle & inpart, const ParticleVector & decay,
AbstractVVVVertexPtr & outgoingVertex1,
AbstractVVVVertexPtr & outgoingVertex2,
ShowerInteraction inter);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SVVDecayer & operator=(const SVVDecayer &);
+ SVVDecayer & operator=(const SVVDecayer &) = delete;
private:
/**
* Abstract pointer to general VVS vertex
*/
vector<AbstractVVSVertexPtr> vertex_;
/**
* Pointer to the perturbative form
*/
vector<VVSVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVSSVertex for QCD radiation from incoming scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from the 1st outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from the 2nd outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertex2_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunction
*/
mutable Helicity::ScalarWaveFunction swave_;
/**
* Vector wavefunctions
*/
mutable vector<Helicity::VectorWaveFunction> vectors_[2];
private:
/**
* Member for the POWHEG correction
*/
//@{
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Scalar wavefunction for 3 body decay
*/
mutable ScalarWaveFunction swave3_;
/**
* Vector wavefunctions
*/
mutable vector<Helicity::VectorWaveFunction> vectors3_[2];
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> gluon_;
//@}
};
}
#endif /* HERWIG_SVVDecayer_H */
diff --git a/Decay/General/StoFFFFDecayer.h b/Decay/General/StoFFFFDecayer.h
--- a/Decay/General/StoFFFFDecayer.h
+++ b/Decay/General/StoFFFFDecayer.h
@@ -1,184 +1,184 @@
// -*- C++ -*-
#ifndef HERWIG_StoFFFFDecayer_H
#define HERWIG_StoFFFFDecayer_H
//
// This is the declaration of the StoFFFFDecayer class.
//
#include "GeneralFourBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractSSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the StoFFFFDecayer class.
*
* @see \ref StoFFFFDecayerInterfaces "The interfaces"
* defined for StoFFFFDecayer.
*/
class StoFFFFDecayer: public GeneralFourBodyDecayer {
public:
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- StoFFFFDecayer & operator=(const StoFFFFDecayer &);
+ StoFFFFDecayer & operator=(const StoFFFFDecayer &) = delete;
private:
/**
* Signs for NO
*/
vector<double> sign_;
/**
* Potential vertices for the first step
*/
//@{
/**
* VVS Vertex
*/
vector<AbstractVVSVertexPtr> firstVVS_;
/**
* VSS Vertex
*/
vector<AbstractVSSVertexPtr> firstVSS_;
/**
* SSS Vertex
*/
vector<AbstractSSSVertexPtr> firstSSS_;
/**
* FFS Vertex
*/
vector<AbstractFFSVertexPtr> firstFFS_;
//@}
/**
* Potential vertices for the second step
*/
//@{
/**
* FFV Vertex
*/
vector<AbstractFFVVertexPtr> secondFFV_;
/**
* FFS Vertex
*/
vector<AbstractFFSVertexPtr> secondFFS_;
//@}
/**
* Potential vertices for the third step
*/
//@{
/**
* FFV Vertex
*/
vector<AbstractFFVVertexPtr> thirdFFV_;
/**
* FFS Vertex
*/
vector<AbstractFFSVertexPtr> thirdFFS_;
//@}
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction swave_;
/**
* Spinors for outgoing particles
*/
mutable pair<vector<SpinorWaveFunction>,vector<SpinorBarWaveFunction> > outwave_[4];
};
}
#endif /* HERWIG_StoFFFFDecayer_H */
diff --git a/Decay/General/StoFFVDecayer.h b/Decay/General/StoFFVDecayer.h
--- a/Decay/General/StoFFVDecayer.h
+++ b/Decay/General/StoFFVDecayer.h
@@ -1,157 +1,157 @@
// -*- C++ -*-
#ifndef THEPEG_StoFFVDecayer_H
#define THEPEG_StoFFVDecayer_H
//
// This is the declaration of the StoFFVDecayer class.
//
#include "GeneralThreeBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the StoFFVDecayer class.
*
* @see \ref StoFFVDecayerInterfaces "The interfaces"
* defined for StoFFVDecayer.
*/
class StoFFVDecayer: public GeneralThreeBodyDecayer {
public:
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 (or higher body) partial width
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of
* calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Set up the diagrams etc
*/
virtual void setupDiagrams(bool checkKinematics);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- StoFFVDecayer & operator=(const StoFFVDecayer &);
+ StoFFVDecayer & operator=(const StoFFVDecayer &) = delete;
private:
/**
* Store the vertices for fermion intrermediate
*/
vector<pair<AbstractFFSVertexPtr, AbstractFFVVertexPtr> > fer_;
/**
* Store the vertices for fermion intrermediate
*/
vector<pair<AbstractRFSVertexPtr, AbstractRFVVertexPtr> > RSfer_;
/**
* Store the vertices for scalar intrermediate
*/
vector<pair<AbstractVSSVertexPtr, AbstractFFSVertexPtr> > sca_;
/**
* Store the vertices for vector intrermediate
*/
vector<pair<AbstractVVSVertexPtr, AbstractFFVVertexPtr> > vec_;
/**
* Store the vertices for 4-point diagrams
*/
vector<AbstractFFVSVertexPtr> four_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction swave_;
/**
* Vector wavefunction
*/
mutable vector<VectorWaveFunction> outVector_;
/**
* Spinor wavefunctions
*/
mutable pair<vector<SpinorWaveFunction>,vector<SpinorBarWaveFunction> > outspin_[3];
};
}
#endif /* THEPEG_StoFFVDecayer_H */
diff --git a/Decay/General/StoSFFDecayer.h b/Decay/General/StoSFFDecayer.h
--- a/Decay/General/StoSFFDecayer.h
+++ b/Decay/General/StoSFFDecayer.h
@@ -1,158 +1,158 @@
// -*- C++ -*-
#ifndef THEPEG_StoSFFDecayer_H
#define THEPEG_StoSFFDecayer_H
//
// This is the declaration of the StoSFFDecayer class.
//
#include "GeneralThreeBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractSSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The StoSFFDecayer class provides the general matrix element for
* scalar decays into another scalar and a fermion-antifermion pair.
*
* @see \ref StoSFFDecayerInterfaces "The interfaces"
* defined for StoSFFDecayer.
*/
class StoSFFDecayer: public GeneralThreeBodyDecayer {
public:
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 (or higher body) partial width
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Set up the diagrams etc
*/
virtual void setupDiagrams(bool checkKinematics);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- StoSFFDecayer & operator=(const StoSFFDecayer &);
+ StoSFFDecayer & operator=(const StoSFFDecayer &) = delete;
private:
/**
* Store the vertices for scalar intermediate
*/
vector<pair<AbstractSSSVertexPtr, AbstractFFSVertexPtr> > sca_;
/**
* Store the vertices for spin-\f$\frac12\f$ fermion intermediate
*/
vector<pair<AbstractFFSVertexPtr, AbstractFFSVertexPtr> > fer_;
/**
* Store the vertices for spin-\f$\frac32\f$ fermion intermediate
*/
vector<pair<AbstractRFSVertexPtr, AbstractRFSVertexPtr> > RSfer_;
/**
* Store the vertices for vector intermediate
*/
vector<pair<AbstractVSSVertexPtr, AbstractFFVVertexPtr> > vec_;
/**
* Store the vertices for tensor intermediate
*/
vector<pair<AbstractSSTVertexPtr, AbstractFFTVertexPtr> > ten_;
/**
* Store the vertices for four point diagrams
*/
vector<AbstractFFSSVertexPtr> four_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction swave_;
/**
* Spinor wavefunctions
*/
mutable pair<vector<SpinorWaveFunction>,vector<SpinorBarWaveFunction> > outspin_[3];
};
}
#endif /* THEPEG_StoSFFDecayer_H */
diff --git a/Decay/General/TFFDecayer.h b/Decay/General/TFFDecayer.h
--- a/Decay/General/TFFDecayer.h
+++ b/Decay/General/TFFDecayer.h
@@ -1,223 +1,223 @@
// -*- C++ -*-
//
// TFFDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TFFDecayer_H
#define HERWIG_TFFDecayer_H
//
// This is the declaration of the TFFDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Tensor/FFTVertex.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/Helicity/Vertex/Tensor/FFVTVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::FFTVertexPtr;
/** \ingroup Decay
* The TFFDecayer class implements the decay of a tensor
* to 2 fermions in a general model. It holds an FFTVertex pointer
* that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class TFFDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
TFFDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TFFDecayer & operator=(const TFFDecayer &);
+ TFFDecayer & operator=(const TFFDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFFTVertex
*/
vector<AbstractFFTVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<FFTVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex2_;
/**
* Abstract pointer to AbstractFFVTVertex for QCD radiation from 4 point vertex
*/
map<ShowerInteraction,AbstractFFVTVertexPtr> fourPointVertex_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Polarization tensors for the decaying particle
*/
mutable vector<TensorWaveFunction> tensors_;
/**
* Spinors for the decay products
*/
mutable vector<SpinorWaveFunction> wave_;
/**
* Barred spinors for the decay products
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Tensor wavefunction for 3 body decay
*/
mutable vector<TensorWaveFunction> tensors3_;
/**
* Spinor wavefunction for 3 body decay
*/
mutable vector<SpinorWaveFunction> wave3_;
/**
* Barred spinor wavefunction for 3 body decay
*/
mutable vector<SpinorBarWaveFunction> wavebar3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_TFFDecayer_H */
diff --git a/Decay/General/TSSDecayer.h b/Decay/General/TSSDecayer.h
--- a/Decay/General/TSSDecayer.h
+++ b/Decay/General/TSSDecayer.h
@@ -1,151 +1,151 @@
// -*- C++ -*-
//
// TSSDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TSSDecayer_H
#define HERWIG_TSSDecayer_H
//
// This is the declaration of the TSSDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Tensor/SSTVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SSTVertexPtr;
/** \ingroup Decay
* The TSSDecayer class implements the decay of a tensor
* to 2 scalars in a general model. It holds an SSTVertex pointer
* that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class TSSDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
TSSDecayer() {}
public:
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TSSDecayer & operator=(const TSSDecayer &);
+ TSSDecayer & operator=(const TSSDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractSSTVertex
*/
vector<AbstractSSTVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<SSTVertexPtr> perturbativeVertex_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Polarization tensors of the decaying particle
*/
mutable vector<Helicity::TensorWaveFunction> tensors_;
};
}
#endif /* HERWIG_TSSDecayer_H */
diff --git a/Decay/General/TVVDecayer.h b/Decay/General/TVVDecayer.h
--- a/Decay/General/TVVDecayer.h
+++ b/Decay/General/TVVDecayer.h
@@ -1,213 +1,213 @@
// -*- C++ -*-
//
// TVVDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TVVDecayer_H
#define HERWIG_TVVDecayer_H
//
// This is the declaration of the TVVDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "ThePEG/Helicity/Vertex/Tensor/VVTVertex.h"
#include "ThePEG/Helicity/Vertex/Tensor/VVVTVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VVTVertexPtr;
/** \ingroup Decay
* The TVVDecayer class implements the decay of a tensor
* to 2 vector bosons in a general model. It holds a VVTVertex pointer
* that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class TVVDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
TVVDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TVVDecayer & operator=(const TVVDecayer &);
+ TVVDecayer & operator=(const TVVDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractVVTVertex
*/
vector<AbstractVVTVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<VVTVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertex2_;
/**
* Abstract pointer to AbstractVVVTVertex for QCD radiation from 4 point vertex
*/
map<ShowerInteraction,AbstractVVVTVertexPtr> fourPointVertex_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Polarization tensors of decaying particle
*/
mutable vector<Helicity::TensorWaveFunction> tensors_;
/**
* Polarization vectors of outgoing vector bosons
*/
mutable vector<Helicity::VectorWaveFunction> vectors_[2];
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Tensor wavefunction for 3 body decay
*/
mutable vector<Helicity::TensorWaveFunction> tensors3_;
/**
* Polarization vectors of outgoing vector bosons
*/
mutable vector<Helicity::VectorWaveFunction> vectors3_[2];
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_TVVDecayer_H */
diff --git a/Decay/General/VFFDecayer.h b/Decay/General/VFFDecayer.h
--- a/Decay/General/VFFDecayer.h
+++ b/Decay/General/VFFDecayer.h
@@ -1,232 +1,232 @@
// -*- C++ -*-
//
// VFFDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VFFDecayer_H
#define HERWIG_VFFDecayer_H
//
// This is the declaration of the VFFDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::FFVVertexPtr;
/** \ingroup Decay
* The VFFDecayer class implements the decay of a vector
* to 2 fermions in a general model. It holds an FFVVertex pointer
* that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class VFFDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
VFFDecayer() {}
public:
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
/**
* Indentify outgoing vertices for the fermion and antifermion
*/
void identifyVertices(const int iferm, const int ianti,
const Particle & inpart, const ParticleVector & decay,
AbstractFFVVertexPtr & abstractOutgoingVertexF,
AbstractFFVVertexPtr & abstractOutgoingVertexA,
ShowerInteraction inter);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VFFDecayer & operator=(const VFFDecayer &);
+ VFFDecayer & operator=(const VFFDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractFFVVertex
*/
vector<AbstractFFVVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<FFVVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from incoming vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing (anti)fermion
*/
map<ShowerInteraction,AbstractFFVVertexPtr> outgoingVertex2_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Polarization vectors for the decaying particle
*/
mutable vector<VectorWaveFunction> vectors_;
/**
* Spinors for the decay products
*/
mutable vector<SpinorWaveFunction> wave_;
/**
* Barred spinors for the decay products
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Scalar wavefunction for 3 body decay
*/
mutable vector<VectorWaveFunction> vector3_;
/**
* Spinor wavefunction for 3 body decay
*/
mutable vector<SpinorWaveFunction> wave3_;
/**
* Barred spinor wavefunction for 3 body decay
*/
mutable vector<SpinorBarWaveFunction> wavebar3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_VFFDecayer_H */
diff --git a/Decay/General/VSSDecayer.cc b/Decay/General/VSSDecayer.cc
--- a/Decay/General/VSSDecayer.cc
+++ b/Decay/General/VSSDecayer.cc
@@ -1,418 +1,416 @@
// -*- C++ -*-
//
// VSSDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
// This is the implementation of the non-inlined, non-templated member
// functions of the VSSDecayer class.
//
#include "VSSDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
IBPtr VSSDecayer::clone() const {
return new_ptr(*this);
}
IBPtr VSSDecayer::fullclone() const {
return new_ptr(*this);
}
void VSSDecayer::setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr> vertex,
map<ShowerInteraction,VertexBasePtr> & inV,
const vector<map<ShowerInteraction,VertexBasePtr> > & outV,
map<ShowerInteraction,VertexBasePtr> ) {
decayInfo(incoming,outgoing);
for(auto vert : vertex) {
vertex_ .push_back(dynamic_ptr_cast<AbstractVSSVertexPtr>(vert));
perturbativeVertex_.push_back(dynamic_ptr_cast<VSSVertexPtr> (vert));
}
vector<ShowerInteraction> itemp={ShowerInteraction::QCD,ShowerInteraction::QED};
for(auto & inter : itemp) {
incomingVertex_[inter] = dynamic_ptr_cast<AbstractVVVVertexPtr>(inV.at(inter));
outgoingVertex1_[inter] = dynamic_ptr_cast<AbstractVSSVertexPtr>(outV[0].at(inter));
outgoingVertex2_[inter] = dynamic_ptr_cast<AbstractVSSVertexPtr>(outV[1].at(inter));
}
}
void VSSDecayer::persistentOutput(PersistentOStream & os) const {
os << vertex_ << perturbativeVertex_
<< incomingVertex_ << outgoingVertex1_
<< outgoingVertex2_;
}
void VSSDecayer::persistentInput(PersistentIStream & is, int) {
is >> vertex_ >> perturbativeVertex_
>> incomingVertex_ >> outgoingVertex1_
>> outgoingVertex2_;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<VSSDecayer,GeneralTwoBodyDecayer>
describeHerwigVSSDecayer("Herwig::VSSDecayer", "Herwig.so");
void VSSDecayer::Init() {
static ClassDocumentation<VSSDecayer> documentation
("This implements the decay of a vector to 2 scalars");
}
double VSSDecayer::me2(const int , const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1,PDT::Spin0,PDT::Spin0)));
if(meopt==Initialize) {
VectorWaveFunction::calculateWaveFunctions(vectors_,rho_,
const_ptr_cast<tPPtr>(&inpart),
incoming,false);
// fix rho if no correlations
fixRho(rho_);
}
if(meopt==Terminate) {
VectorWaveFunction::constructSpinInfo(vectors_,const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
for(unsigned int ix=0;ix<2;++ix)
ScalarWaveFunction::
constructSpinInfo(decay[ix],outgoing,true);
return 0.;
}
ScalarWaveFunction sca1(decay[0]->momentum(),decay[0]->dataPtr(),outgoing);
ScalarWaveFunction sca2(decay[1]->momentum(),decay[1]->dataPtr(),outgoing);
Energy2 scale(sqr(inpart.mass()));
for(unsigned int ix=0;ix<3;++ix) {
(*ME())(ix,0,0) = 0.;
for(auto vert : vertex_)
(*ME())(ix,0,0) += vert->evaluate(scale,vectors_[ix],sca1,sca2);
}
double output=(ME()->contract(rho_)).real()/scale*UnitRemoval::E2;
// colour and identical particle factors
output *= colourFactor(inpart.dataPtr(),decay[0]->dataPtr(),
decay[1]->dataPtr());
// return the answer
return output;
}
Energy VSSDecayer::partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const {
if( inpart.second < outa.second + outb.second ) return ZERO;
if(perturbativeVertex_.size()==1 &&
perturbativeVertex_[0]) {
tcPDPtr in = inpart.first->CC() ? tcPDPtr(inpart.first->CC()) : inpart.first;
perturbativeVertex_[0]->setCoupling(sqr(inpart.second), in, outa.first,
outb.first);
- double mu1sq = sqr(outa.second/inpart.second);
- double mu2sq = sqr(outb.second/inpart.second);
- double me2 = sqr(mu1sq - mu2sq) - 2.*(mu1sq + mu2sq);
Energy pcm = Kinematics::pstarTwoBodyDecay(inpart.second,outa.second,
outb.second);
- Energy output = -norm(perturbativeVertex_[0]->norm())*me2*pcm /
+ double me2 = 4.*sqr(pcm/inpart.second);
+ Energy output = norm(perturbativeVertex_[0]->norm())*me2*pcm /
(24.*Constants::pi);
// colour factor
output *= colourFactor(inpart.first,outa.first,outb.first);
// return the answer
return output;
}
else {
return GeneralTwoBodyDecayer::partialWidth(inpart,outa,outb);
}
}
double VSSDecayer::threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt) {
// work out which is the scalar and anti-scalar
int ianti(0), iscal(1), iglu(2);
int itype[2];
for(unsigned int ix=0;ix<2;++ix) {
if(decay[ix]->dataPtr()->CC()) itype[ix] = decay[ix]->id()>0 ? 0:1;
else itype[ix] = 2;
}
if(itype[0]==0 && itype[1]!=0) swap(ianti, iscal);
if(itype[0]==2 && itype[1]==1) swap(ianti, iscal);
if(itype[0]==0 && itype[1]==0 && abs(decay[0]->dataPtr()->id())>abs(decay[1]->dataPtr()->id()))
swap(iscal, ianti);
if(itype[0]==1 && itype[1]==1 && abs(decay[0]->dataPtr()->id())<abs(decay[1]->dataPtr()->id()))
swap(iscal, ianti);
if(meopt==Initialize) {
// create vector wavefunction for decaying particle
VectorWaveFunction::calculateWaveFunctions(vector3_, rho3_, const_ptr_cast<tPPtr>(&inpart),
incoming, false);
}
// setup spin information when needed
if(meopt==Terminate) {
VectorWaveFunction::
constructSpinInfo(vector3_ ,const_ptr_cast<tPPtr>(&inpart),outgoing,true,false);
ScalarWaveFunction::constructSpinInfo( decay[iscal],outgoing,true);
ScalarWaveFunction::constructSpinInfo( decay[ianti],outgoing,true);
VectorWaveFunction::constructSpinInfo(gluon_,decay[iglu ],outgoing,true,false);
return 0.;
}
// calculate colour factors and number of colour flows
unsigned int nflow;
vector<DVector> cfactors = getColourFactors(inpart, decay, nflow);
vector<GeneralDecayMEPtr> ME(nflow,new_ptr(GeneralDecayMatrixElement(PDT::Spin1, PDT::Spin0,
PDT::Spin0, PDT::Spin1)));
// create wavefunctions
ScalarWaveFunction scal(decay[iscal]->momentum(), decay[iscal]->dataPtr(),outgoing);
ScalarWaveFunction anti(decay[ianti]->momentum(), decay[ianti]->dataPtr(),outgoing);
VectorWaveFunction::calculateWaveFunctions(gluon_,decay[iglu ],outgoing,true);
// gauge test
#ifdef GAUGE_CHECK
gluon_.clear();
for(unsigned int ix=0;ix<3;++ix) {
if(ix==1) gluon_.push_back(VectorWaveFunction());
else {
gluon_.push_back(VectorWaveFunction(decay[iglu ]->momentum(),
decay[iglu ]->dataPtr(),10,
outgoing));
}
}
#endif
// identify scalar and/or anti-scalar vertex
AbstractVSSVertexPtr outgoingVertexS;
AbstractVSSVertexPtr outgoingVertexA;
identifyVertices(iscal, ianti, inpart, decay, outgoingVertexS, outgoingVertexA,inter);
Energy2 scale(sqr(inpart.mass()));
const GeneralTwoBodyDecayer::CFlow & colourFlow
= colourFlows(inpart, decay);
double gs(0.);
bool couplingSet(false);
#ifdef GAUGE_CHECK
double total=0.;
#endif
for(unsigned int iv = 0; iv < 3; ++iv) {
for(unsigned int ig = 0; ig < 2; ++ig) {
// radiation from the incoming vector
if((inpart.dataPtr()->coloured() && inter==ShowerInteraction::QCD) ||
(inpart.dataPtr()->charged() && inter==ShowerInteraction::QED) ) {
assert(incomingVertex_[inter]);
VectorWaveFunction vectorInter =
incomingVertex_[inter]->evaluate(scale,3,inpart.dataPtr(),vector3_[iv],
gluon_[2*ig],inpart.mass());
assert(vector3_[iv].particle()->id()==vectorInter.particle()->id());
Complex diag = 0.;
for(auto vertex : vertex_)
diag += vertex->evaluate(scale,vectorInter,scal,anti);
if(!couplingSet) {
gs = abs(incomingVertex_[inter]->norm());
couplingSet = true;
}
for(unsigned int ix=0;ix<colourFlow[0].size();++ix) {
(*ME[colourFlow[0][ix].first])(iv, 0, 0, ig) +=
colourFlow[0][ix].second*diag;
}
#ifdef GAUGE_CHECK
total+=norm(diag);
#endif
}
// radiation from the outgoing scalar
if((decay[iscal]->dataPtr()->coloured() && inter==ShowerInteraction::QCD) ||
(decay[iscal]->dataPtr()->charged() && inter==ShowerInteraction::QED) ) {
assert(outgoingVertexS);
// ensure you get correct outgoing particle from first vertex
tcPDPtr off = decay[iscal]->dataPtr();
if(off->CC()) off = off->CC();
ScalarWaveFunction scalarInter =
outgoingVertexS->evaluate(scale,3,off,gluon_[2*ig],scal,decay[iscal]->mass());
assert(scal.particle()->id()==scalarInter.particle()->id());
Complex diag = 0.;
for(auto vertex : vertex_)
diag += vertex->evaluate(scale,vector3_[iv],anti,scalarInter);
if(!couplingSet) {
gs = abs(outgoingVertexS->norm());
couplingSet = true;
}
for(unsigned int ix=0;ix<colourFlow[1].size();++ix) {
(*ME[colourFlow[1][ix].first])(iv, 0, 0, ig) +=
colourFlow[1][ix].second*diag;
}
#ifdef GAUGE_CHECK
total+=norm(diag);
#endif
}
if((decay[ianti]->dataPtr()->coloured() && inter==ShowerInteraction::QCD) ||
(decay[ianti]->dataPtr()->charged() && inter==ShowerInteraction::QED) ) {
assert(outgoingVertexA);
// ensure you get correct outgoing particle from first vertex
tcPDPtr off = decay[ianti]->dataPtr();
if(off->CC()) off = off->CC();
ScalarWaveFunction scalarInter =
outgoingVertexA->evaluate(scale,3,off, gluon_[2*ig],anti,decay[ianti]->mass());
assert(anti.particle()->id()==scalarInter.particle()->id());
Complex diag = 0.;
for(auto vertex : vertex_)
diag += vertex->evaluate(scale,vector3_[iv],scal,scalarInter);
if(!couplingSet) {
gs = abs(outgoingVertexA->norm());
couplingSet = true;
}
for(unsigned int ix=0;ix<colourFlow[2].size();++ix) {
(*ME[colourFlow[2][ix].first])(iv, 0, 0, ig) +=
colourFlow[2][ix].second*diag;
}
#ifdef GAUGE_CHECK
total+=norm(diag);
#endif
}
}
}
// contract matrices
double output=0.;
for(unsigned int ix=0; ix<nflow; ++ix){
for(unsigned int iy=0; iy<nflow; ++iy){
output+=cfactors[ix][iy]*(ME[ix]->contract(*ME[iy],rho3_)).real();
}
}
// divide by alpha_(S,EM)
output*=(4.*Constants::pi)/sqr(gs);
#ifdef GAUGE_CHECK
double ratio = output/total;
if(abs(ratio)>1e-20) {
generator()->log() << "Test of gauge invariance in decay\n" << inpart << "\n";
for(unsigned int ix=0;ix<decay.size();++ix)
generator()->log() << *decay[ix] << "\n";
generator()->log() << "Test of gauge invariance " << ratio << "\n";
}
#endif
// return the answer
return output;
}
void VSSDecayer::identifyVertices(const int iscal, const int ianti,
const Particle & inpart, const ParticleVector & decay,
AbstractVSSVertexPtr & outgoingVertexS,
AbstractVSSVertexPtr & outgoingVertexA,
ShowerInteraction inter){
if(inter==ShowerInteraction::QCD) {
// work out which scalar each outgoing vertex corresponds to
// two outgoing vertices
if( inpart.dataPtr() ->iColour()==PDT::Colour0 &&
((decay[iscal]->dataPtr()->iColour()==PDT::Colour3 &&
decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar) ||
(decay[iscal]->dataPtr()->iColour()==PDT::Colour8 &&
decay[ianti]->dataPtr()->iColour()==PDT::Colour8))){
if(outgoingVertex1_[inter]==outgoingVertex2_[inter]){
outgoingVertexS = outgoingVertex1_[inter];
outgoingVertexA = outgoingVertex2_[inter];
}
else if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){
outgoingVertexS = outgoingVertex1_[inter];
outgoingVertexA = outgoingVertex2_[inter];
}
else if (outgoingVertex2_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){
outgoingVertexS = outgoingVertex2_[inter];
outgoingVertexA = outgoingVertex1_[inter];
}
}
else if(inpart.dataPtr() ->iColour()==PDT::Colour8 &&
decay[iscal]->dataPtr()->iColour()==PDT::Colour3 &&
decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar){
if(outgoingVertex1_[inter]==outgoingVertex2_[inter]){
outgoingVertexS = outgoingVertex1_[inter];
outgoingVertexA = outgoingVertex2_[inter];
}
else if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){
outgoingVertexS = outgoingVertex1_[inter];
outgoingVertexA = outgoingVertex2_[inter];
}
else if (outgoingVertex2_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){
outgoingVertexS = outgoingVertex2_[inter];
outgoingVertexA = outgoingVertex1_[inter];
}
}
// one outgoing vertex
else if(inpart.dataPtr()->iColour()==PDT::Colour3){
if(decay[iscal]->dataPtr()->iColour()==PDT::Colour3 &&
decay[ianti]->dataPtr()->iColour()==PDT::Colour0){
if (outgoingVertex1_[inter]) outgoingVertexS = outgoingVertex1_[inter];
else if(outgoingVertex2_[inter]) outgoingVertexS = outgoingVertex2_[inter];
}
else if (decay[iscal]->dataPtr()->iColour()==PDT::Colour3 &&
decay[ianti]->dataPtr()->iColour()==PDT::Colour8){
if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[ianti]->dataPtr()->id()))){
outgoingVertexS = outgoingVertex2_[inter];
outgoingVertexA = outgoingVertex1_[inter];
}
else {
outgoingVertexS = outgoingVertex1_[inter];
outgoingVertexA = outgoingVertex2_[inter];
}
}
}
else if(inpart.dataPtr()->iColour()==PDT::Colour3bar){
if(decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar &&
decay[iscal]->dataPtr()->iColour()==PDT::Colour0){
if (outgoingVertex1_[inter]) outgoingVertexA = outgoingVertex1_[inter];
else if(outgoingVertex2_[inter]) outgoingVertexA = outgoingVertex2_[inter];
}
else if (decay[iscal]->dataPtr()->iColour()==PDT::Colour8 &&
decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar){
if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[iscal]->dataPtr()->id()))){
outgoingVertexS = outgoingVertex1_[inter];
outgoingVertexA = outgoingVertex2_[inter];
}
else {
outgoingVertexS = outgoingVertex2_[inter];
outgoingVertexA = outgoingVertex1_[inter];
}
}
}
if (! ((incomingVertex_[inter] && (outgoingVertexS || outgoingVertexA)) ||
( outgoingVertexS && outgoingVertexA)))
throw Exception()
<< "Invalid vertices for QCD radiation in VSS decay in VSSDecayer::identifyVertices"
<< Exception::runerror;
}
else {
if(decay[iscal]->dataPtr()->charged()) {
if (outgoingVertex1_[inter] &&
outgoingVertex1_[inter]->isIncoming(const_ptr_cast<tPDPtr>(decay[iscal]->dataPtr())))
outgoingVertexS = outgoingVertex1_[inter];
else
outgoingVertexS = outgoingVertex2_[inter];
}
if(decay[ianti]->dataPtr()->charged()) {
if (outgoingVertex1_[inter] &&
outgoingVertex1_[inter]->isIncoming(const_ptr_cast<tPDPtr>(decay[ianti]->dataPtr())))
outgoingVertexA = outgoingVertex1_[inter];
else
outgoingVertexA = outgoingVertex2_[inter];
}
}
}
diff --git a/Decay/General/VSSDecayer.h b/Decay/General/VSSDecayer.h
--- a/Decay/General/VSSDecayer.h
+++ b/Decay/General/VSSDecayer.h
@@ -1,211 +1,211 @@
// -*- C++ -*-
//
// VSSDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VSSDecayer_H
#define HERWIG_VSSDecayer_H
//
// This is the declaration of the VSSDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "ThePEG/Repository/EventGenerator.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VSSVertexPtr;
/** \ingroup Decay
* The VSSDecayer class implements the decay of a vector
* to 2 scalars in a general model. It holds an VSSVertex pointer
* that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class VSSDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
VSSDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
/**
* Indentify outgoing vertices for the scalar and antiscalar
*/
void identifyVertices(const int iscal, const int ianti,
const Particle & inpart, const ParticleVector & decay,
AbstractVSSVertexPtr & abstractOutgoingVertexS,
AbstractVSSVertexPtr & abstractOutgoingVertexA,
ShowerInteraction inter);
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VSSDecayer & operator=(const VSSDecayer &);
+ VSSDecayer & operator=(const VSSDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractVSSVertex
*/
vector<AbstractVSSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<VSSVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from incoming vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractFFVVertex for QCD radiation from outgoing scalar
*/
map<ShowerInteraction,AbstractVSSVertexPtr> outgoingVertex2_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Polarization vectors for the decaying particle
*/
mutable vector<Helicity::VectorWaveFunction> vectors_;
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> vector3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> gluon_;
};
}
#endif /* HERWIG_VSSDecayer_H */
diff --git a/Decay/General/VVSDecayer.h b/Decay/General/VVSDecayer.h
--- a/Decay/General/VVSDecayer.h
+++ b/Decay/General/VVSDecayer.h
@@ -1,201 +1,201 @@
// -*- C++ -*-
#ifndef THEPEG_VVSDecayer_H
#define THEPEG_VVSDecayer_H
//
// This is the declaration of the VVSDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
#include "ThePEG/Repository/EventGenerator.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VVSVertexPtr;
/** \ingroup Decay
* The VVSDecayer class implements the decay of a vector to a
* vector and a scalar in a general model. It holds an VVSVertex pointer
* that must be typecast from the VertexBase pointer helid in the
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see \ref VVSDecayerInterfaces "The interfaces"
* defined for VVSDecayer.
*/
class VVSDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
VVSDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VVSDecayer & operator=(const VVSDecayer &);
+ VVSDecayer & operator=(const VVSDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractVVSVertex
*/
vector<AbstractVVSVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<VVSVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from incoming vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from the first outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertexV_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from the second outgoing vector
*/
map<ShowerInteraction,AbstractVSSVertexPtr> outgoingVertexS_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Vector wavefunctions
*/
mutable vector<Helicity::VectorWaveFunction> vectors_[2];
private:
/**
* Members for the POWHEG correction
*/
//@{
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Vector wavefunctions
*/
mutable vector<Helicity::VectorWaveFunction> vectors3_[2];
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> gluon_;
//@}
};
}
#endif /* THEPEG_VVSDecayer_H */
diff --git a/Decay/General/VVVDecayer.h b/Decay/General/VVVDecayer.h
--- a/Decay/General/VVVDecayer.h
+++ b/Decay/General/VVVDecayer.h
@@ -1,228 +1,228 @@
// -*- C++ -*-
//
// VVVDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VVVDecayer_H
#define HERWIG_VVVDecayer_H
//
// This is the declaration of the VVVDecayer class.
//
#include "GeneralTwoBodyDecayer.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VVVVertexPtr;
/** \ingroup Decay
* The VVVDecayer class implements the decay of a vector
* to 2 vectors in a general model. It holds an VVVVertex pointer
* that must be typecast from the VertexBase pointer held in
* GeneralTwoBodyDecayer. It implents the virtual functions me2() and
* partialWidth().
*
* @see GeneralTwoBodyDecayer
*/
class VVVDecayer: public GeneralTwoBodyDecayer {
public:
/**
* The default constructor.
*/
VVVDecayer() {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Function to return partial Width
* @param inpart The decaying particle.
* @param outa One of the decay products.
* @param outb The other decay product.
*/
virtual Energy partialWidth(PMPair inpart, PMPair outa,
PMPair outb) const;
/**
* Set the information on the decay
*/
virtual void setDecayInfo(PDPtr incoming, PDPair outgoing,
vector<VertexBasePtr>,
map<ShowerInteraction,VertexBasePtr> &,
const vector<map<ShowerInteraction,VertexBasePtr> > &,
map<ShowerInteraction,VertexBasePtr>);
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {
POWHEGType output = FSR;
for(auto vertex : vertex_) {
if(vertex->orderInAllCouplings()!=1) {
output = No;
break;
}
}
return output;
}
/**
* Three-body matrix element including additional QCD radiation
*/
virtual double threeBodyME(const int , const Particle & inpart,
const ParticleVector & decay,
ShowerInteraction inter, MEOption meopt);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Find the vertices for the decay
*/
void identifyVertices(const Particle & inpart, const ParticleVector & decay,
AbstractVVVVertexPtr & outgoingVertex1,
AbstractVVVVertexPtr & outgoingVertex2,
ShowerInteraction inter);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VVVDecayer & operator=(const VVVDecayer &);
+ VVVDecayer & operator=(const VVVDecayer &) = delete;
private:
/**
* Abstract pointer to AbstractVVVVertex
*/
vector<AbstractVVVVertexPtr> vertex_;
/**
* Pointer to the perturbative vertex
*/
vector<VVVVertexPtr> perturbativeVertex_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from incoming vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> incomingVertex_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from the first outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertex1_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from the second outgoing vector
*/
map<ShowerInteraction,AbstractVVVVertexPtr> outgoingVertex2_;
/**
* Abstract pointer to AbstractVVVVertex for QCD radiation from the 4-point vertex
*/
map<ShowerInteraction,AbstractVVVVVertexPtr> fourPointVertex_;
/**
* Spin density matrix
*/
mutable RhoDMatrix rho_;
/**
* Vector wavefunctions
*/
mutable vector<Helicity::VectorWaveFunction> vectors_[3];
private:
/**
* Members for the POWHEG correction
*/
//@{
/**
* Spin density matrix for 3 body decay
*/
mutable RhoDMatrix rho3_;
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> vector3_;
/**
* Vector wavefunctions
*/
mutable vector<Helicity::VectorWaveFunction> vectors3_[2];
/**
* Vector wavefunction for 3 body decay
*/
mutable vector<Helicity::VectorWaveFunction> gluon_;
//@}
};
}
#endif /* HERWIG_VVVDecayer_H */
diff --git a/Decay/General/VtoFFVDecayer.h b/Decay/General/VtoFFVDecayer.h
--- a/Decay/General/VtoFFVDecayer.h
+++ b/Decay/General/VtoFFVDecayer.h
@@ -1,156 +1,156 @@
// -*- C++ -*-
#ifndef THEPEG_VtoFFVDecayer_H
#define THEPEG_VtoFFVDecayer_H
//
// This is the declaration of the VtoFFVDecayer class.
//
#include "GeneralThreeBodyDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VtoFFVDecayer class.
*
* @see \ref VtoFFVDecayerInterfaces "The interfaces"
* defined for VtoFFVDecayer.
*/
class VtoFFVDecayer: public GeneralThreeBodyDecayer {
public:
/**
* Return the matrix element squared for a given mode and phase-space channel
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 (or higher body) partial width
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of
* calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Set up the diagrams etc
*/
virtual void setupDiagrams(bool checkKinematics);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VtoFFVDecayer & operator=(const VtoFFVDecayer &);
+ VtoFFVDecayer & operator=(const VtoFFVDecayer &) = delete;
private:
/**
* Store the vertices for scalar intrermediate
*/
vector<pair<AbstractVVSVertexPtr, AbstractFFSVertexPtr> > sca_;
/**
* Store the vertices for fermion intrermediate
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > fer_;
/**
* Store the vertices for vector intrermediate
*/
vector<pair<AbstractVVVVertexPtr, AbstractFFVVertexPtr> > vec_;
/**
* Store the vertices for vector intrermediate
*/
vector<pair<AbstractVVTVertexPtr, AbstractFFTVertexPtr> > ten_;
/**
* Spinr density matrix
*/
mutable RhoDMatrix rho_;
/**
* Polarization vectors for the decaying particle
*/
mutable vector<VectorWaveFunction> inVector_;
/**
* Scalar wavefunction for the decay products
*/
mutable ScalarWaveFunction swave_;
/**
* Polarization vectors for the decay products
*/
mutable vector<VectorWaveFunction> outVector_;
/**
* Spinors for the decay products
*/
mutable pair<vector<SpinorWaveFunction>,vector<SpinorBarWaveFunction> > outspin_[3];
};
}
#endif /* THEPEG_VtoFFVDecayer_H */
diff --git a/Decay/Hw64Decayer.h b/Decay/Hw64Decayer.h
--- a/Decay/Hw64Decayer.h
+++ b/Decay/Hw64Decayer.h
@@ -1,155 +1,155 @@
// -*- C++ -*-
//
// Hw64Decayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_Hw64Decayer_H
#define HERWIG_Hw64Decayer_H
//
// This is the declaration of the Hw64Decayer class.
//
#include <ThePEG/Config/ThePEG.h>
#include <HwDecayerBase.h>
#include <ThePEG/Interface/Interfaced.h>
#include <ThePEG/PDT/DecayMode.h>
#include <ThePEG/Repository/Strategy.fh>
#include <fstream>
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* <code>Hw64Decayer</code> is a class that defines all the general routines
* used in HERWIG++ to imitate the HERWIG 6.4 decays. The goal is to have an exact
* copy of HERWIG 6.4 decay routines. This will allow for easy 'callibration'
* of the new C++ code with the old Fortran code.
*
* This class handles the non-partonic decays. In general it is used for
* exclusive meson and baryon decays. Three different matrix elements are supported
*
* - MECode=0 flat-phase space.
* - MECode=100 free V-A matrix element
* - MECode=101 bound V-A matrix element
*
* @see HeavyDecayer
* @see QuarkoniumDecayer
* @see Decayer
*
*/
class Hw64Decayer: public HwDecayerBase {
public:
/**
* Default constructor
*/
Hw64Decayer() : MECode(0),_masstry(50) {}
/**
* return true if this decayer can perfom the decay specified by the
* given decay mode.
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* for a given decay mode and a given particle instance, perform the
* decay and return the decay products.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/**
* Standard Init function used to initialize the interface.
*/
static void Init();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* Weighting of phase space for V-A matrix elements
*/
static double VAWt(Energy2 t0, Energy2 t1, Energy2 t2, InvEnergy4 t3);
/**
* Take an array of momenta and set the momentum member of the particles.
* @param moms The input momenta to be assigned to the particles.
* @param particles The particles whose momenta is to be set.
* @param out The particles outputted with their momenta set.
*/
void setParticleMomentum(ParticleVector & out, const cPDVector & particles,
const vector<Lorentz5Momentum> & moms) const {
unsigned int numProds = particles.size();
for(unsigned int ix=0;ix<numProds;++ix)
out.push_back(particles[ix]->produceParticle(moms[ix]));
}
private:
/**
* Private and non-existent assignment operator.
*/
- const Hw64Decayer & operator=(const Hw64Decayer &);
+ const Hw64Decayer & operator=(const Hw64Decayer &) = delete;
private:
/**
* The code for the matrix element being used.
*/
int MECode;
/**
* Maximum number of attempts to generate the off-shell masses
*/
unsigned int _masstry;
};
}
#endif /* HERWIG_Hw64Decayer_H */
diff --git a/Decay/HwDecayHandler.h b/Decay/HwDecayHandler.h
--- a/Decay/HwDecayHandler.h
+++ b/Decay/HwDecayHandler.h
@@ -1,172 +1,172 @@
// -*- C++ -*-
//
// HwDecayHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HwDecayHandler_H
#define HERWIG_HwDecayHandler_H
//
// This is the declaration of the HwDecayHandler class.
//
#include "ThePEG/Handlers/DecayHandler.h"
#include "ThePEG/EventRecord/Particle.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
* The <code>HwDecayHandler</code> is the Herwig decay handler which
* administers the decays of unstable particles in Herwig. It
* is derived from ThePEG::DecayHandler and includes a different handle
* method in order to simulate decays including spin correlations.
*
* The handle method decays all particles in the current step, including
* spin correlations. Another feature of the DecayHandler is that it correctly
* handles mutlistep decays where a Decayer supplys intermediate decay products
* in addition to the outgoing particles.
*
* @see ThePEG::StepHandler
* @see ThePEG::CollisionHandler
* @see ThePEG::SubProcessHandler
* @see ThePEG::DecayHandler
*
*/
class HwDecayHandler: public DecayHandler {
public:
/**
* Default constructor
*/
HwDecayHandler() : DecayHandler(), _newstep(true)
{}
public:
/**
* Look through all \a tagged particled and decay all unstable ones.
* @param eh the EventHandler in charge of the generation.
* @param tagged the vector of particles to consider. If empty, all
* final state particles in the current Step is considered.
* @param hint a possible Hint which is ignored in this implementation.
*/
virtual void handle(EventHandler & eh, const tPVector & tagged,
const Hint & hint)
;
/**
* Perform the decay of one unstable particle.
* @param parent the particle to be decayed.
* @param s the Step where decay products are inserted.
* @throws Veto if the Handler requires the current step to be discarded.
* @throws Exception if something goes wrong.
*/
virtual void performDecay(tPPtr parent, Step & s) const
;
/**
* add the decay products of in intermediate particle produced in a decay
* @param parent the particle which has been decayed.
* @param s the Step where decay products are inserted.
* @throws Veto if the Handler requires the current step to be discarded.
* @throws Exception if something goes wrong.
*/
void addDecayedParticle(tPPtr parent, Step & s) const
;
/**
* Standard Init function
*/
static void Init();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Develop a stable particle
*/
void develop(tPPtr particle) const {
tcSpinPtr hwspin = particle->spinInfo();
if ( hwspin )
hwspin->develop();
}
private:
/**
* Private and non-existent assignment operator.
*/
- HwDecayHandler & operator=(const HwDecayHandler &);
+ HwDecayHandler & operator=(const HwDecayHandler &) = delete;
private:
/**
* Option for adding particles in a new Step
*/
bool _newstep;
/**
* Particles which should not be decayed
*/
set<tcPDPtr> _excluded;
/**
* Vector to fill the set as an interface
*/
vector<PDPtr> _excludedVector;
};
}
#endif /* HERWIG_HwDecayHandler_H */
diff --git a/Decay/HwDecayerBase.h b/Decay/HwDecayerBase.h
--- a/Decay/HwDecayerBase.h
+++ b/Decay/HwDecayerBase.h
@@ -1,244 +1,244 @@
// -*- C++ -*-
//
// HwDecayerBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HwDecayerBase_H
#define HERWIG_HwDecayerBase_H
//
// This is the declaration of the HwDecayerBase class.
//
#include "ThePEG/PDT/Decayer.h"
#include "Herwig/Shower/RealEmissionProcess.fh"
#include "HwDecayerBase.fh"
namespace Herwig {
struct Branching;
using namespace ThePEG;
/**
* The HwDecayerBase class is the base class for Decayers in Herwig. It inherits
* from the Decayer class of ThePEG and implements additional functionality for the
* output of the results to the particle database and initialization of the datbase.
*
* It also provide the option of specifying a class based on the DecayRadiationGenerator
* which should be used to generate QED radiation in the decay
*
* @see \ref HwDecayerBaseInterfaces "The interfaces"
* defined for HwDecayerBase.
*/
class HwDecayerBase: public Decayer {
public:
/**
* The default constructor.
*/
HwDecayerBase() : _initialize(false), _dbOutput(false) {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Check if this decayer can perfom the decay specified by the
* given decay mode.
* @param dm the DecayMode describing the decay.
* @return true if this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(const DecayMode & dm) const;
/**
* Perform a decay for a given DecayMode and a given Particle instance.
* @param dm the DecayMode describing the decay.
* @param p the Particle instance to be decayed.
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
//@}
public:
/**
* Virtual members to be overridden by inheriting classes
* which implement hard corrections
*/
//@{
/**
* Type of POWHEG correction
*/
enum POWHEGType {No, ISR, FSR, Both};
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return No;}
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return false;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr , double & ,
double & );
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr);
//@}
protected:
/** @name Virtual functions to replaced those from the Decayer class.
* This is so that the decay and accept members of this class can handle all
* the more complicated features of the DecayMode class
*/
//@{
/**
* Check if this decayer can perfom the decay for a particular mode
* @param parent The decaying particle
* @param children The decay products
* @return true If this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const = 0;
/**
* Perform the decay of the particle to the specified decay products
* @param parent The decaying particle
* @param children The decay products
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const = 0;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Functions for the Herwig decayer
*/
//@{
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const = 0;
/**
* Access to the initialize variable
*/
bool initialize() const {return _initialize;}
/**
* Access the database output variable
*/
bool databaseOutput() const {return _dbOutput;}
//@}
protected:
/**
* Set rho to be diagonal if no correlations
*/
void fixRho(RhoDMatrix &) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HwDecayerBase & operator=(const HwDecayerBase &);
+ HwDecayerBase & operator=(const HwDecayerBase &) = delete;
private:
/**
* perform initialisation
*/
bool _initialize;
/**
* Print out database
*/
bool _dbOutput;
};
}
#endif /* HERWIG_HwDecayerBase_H */
diff --git a/Decay/Makefile.am b/Decay/Makefile.am
--- a/Decay/Makefile.am
+++ b/Decay/Makefile.am
@@ -1,236 +1,236 @@
SUBDIRS = FormFactors Tau Baryon VectorMeson Perturbative \
WeakCurrents ScalarMeson TensorMeson Partonic General Radiation
if HAVE_EVTGEN
SUBDIRS += EvtGen
endif
noinst_LTLIBRARIES = libHwDecay.la
libHwDecay_la_LIBADD = \
$(top_builddir)/PDT/libHwPDT.la
nodist_libHwDecay_la_SOURCES = \
hwdecay__all.cc
BUILT_SOURCES = hwdecay__all.cc
CLEANFILES = hwdecay__all.cc
hwdecay__all.cc : $(DIR_H_FILES) $(DIR_CC_FILES) Makefile
@echo "Concatenating .cc files into $@"
@$(top_srcdir)/cat_with_cpplines $(DIR_CC_FILES) > $@
EXTRA_DIST = $(ALL_H_FILES) $(ALL_CC_FILES)
DIR_H_FILES = $(addprefix $(srcdir)/,$(ALL_H_FILES))
ALL_H_FILES = \
DecayIntegrator.fh DecayIntegrator.h \
DecayPhaseSpaceChannel.fh DecayPhaseSpaceChannel.h \
DecayPhaseSpaceMode.fh DecayPhaseSpaceMode.h \
HwDecayerBase.fh HwDecayerBase.h \
HwDecayHandler.h \
DecayVertex.fh DecayVertex.h \
DecayMatrixElement.fh DecayMatrixElement.h \
TwoBodyDecayMatrixElement.h \
GeneralDecayMatrixElement.fh GeneralDecayMatrixElement.h \
BranchingRatioReweighter.h\
PerturbativeDecayer.h
DIR_CC_FILES = $(addprefix $(srcdir)/,$(ALL_CC_FILES))
ALL_CC_FILES = \
DecayIntegrator.cc \
DecayPhaseSpaceChannel.cc \
DecayPhaseSpaceMode.cc \
HwDecayerBase.cc \
HwDecayHandler.cc \
DecayVertex.cc \
DecayMatrixElement.cc \
TwoBodyDecayMatrixElement.cc \
GeneralDecayMatrixElement.cc \
BranchingRatioReweighter.cc\
PerturbativeDecayer.cc
##################
pkglib_LTLIBRARIES = Hw64Decay.la
Hw64Decay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 9:0:0
+$(AM_LDFLAGS) -module -version-info 10:0:0
Hw64Decay_la_SOURCES = \
Hw64Decayer.h Hw64Decayer.cc
##################
pkglib_LTLIBRARIES += HwMamboDecay.la
HwMamboDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:0:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwMamboDecay_la_SOURCES = \
MamboDecayer.h MamboDecayer.cc
##################
noinst_LTLIBRARIES += libHwFormFactor.la
libHwFormFactor_la_SOURCES = \
FormFactors/BaryonFormFactor.cc \
FormFactors/ScalarFormFactor.cc \
FormFactors/BtoSGammaHadronicMass.cc \
FormFactors/BaryonFormFactor.fh \
FormFactors/BaryonFormFactor.h \
FormFactors/ScalarFormFactor.fh \
FormFactors/ScalarFormFactor.h \
FormFactors/BtoSGammaHadronicMass.h \
FormFactors/BtoSGammaHadronicMass.fh
pkglib_LTLIBRARIES += HwFormFactors.la
HwFormFactors_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:0:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwFormFactors_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/FormFactors
nodist_HwFormFactors_la_SOURCES = \
FormFactors/Formfactor__all.cc
##################
pkglib_LTLIBRARIES += HwTauDecay.la
HwTauDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:0:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwTauDecay_la_SOURCES = \
Tau/TauDecayer.cc
##################
pkglib_LTLIBRARIES += HwBaryonDecay.la
HwBaryonDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 9:0:0
+$(AM_LDFLAGS) -module -version-info 10:0:0
HwBaryonDecay_la_LIBADD = \
$(top_builddir)/PDT/libHwBaryonWidth.la
HwBaryonDecay_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Baryon
nodist_HwBaryonDecay_la_SOURCES = \
Baryon/BaryonDecayer__all.cc
##################
pkglib_LTLIBRARIES += HwVMDecay.la
HwVMDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 9:0:0
+$(AM_LDFLAGS) -module -version-info 10:0:0
HwVMDecay_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/VectorMeson
nodist_HwVMDecay_la_SOURCES = \
VectorMeson/VMDecayer__all.cc
##################
pkglib_LTLIBRARIES += HwPerturbativeDecay.la
HwPerturbativeDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:0:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwPerturbativeDecay_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Perturbative
nodist_HwPerturbativeDecay_la_SOURCES = \
Perturbative/Perturbative__all.cc
##################
noinst_LTLIBRARIES += libHwWeakCurrent.la
libHwWeakCurrent_la_SOURCES = \
WeakCurrents/WeakDecayCurrent.cc \
WeakCurrents/LeptonNeutrinoCurrent.cc \
WeakCurrents/WeakDecayCurrent.fh \
WeakCurrents/WeakDecayCurrent.h \
WeakCurrents/LeptonNeutrinoCurrent.fh \
WeakCurrents/LeptonNeutrinoCurrent.h
pkglib_LTLIBRARIES += HwWeakCurrents.la
HwWeakCurrents_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:0:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwWeakCurrents_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/WeakCurrents
nodist_HwWeakCurrents_la_SOURCES = \
WeakCurrents/WeakCurrents__all.cc
##################
pkglib_LTLIBRARIES += HwSMDecay.la
HwSMDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 11:0:0
+$(AM_LDFLAGS) -module -version-info 12:0:0
HwSMDecay_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/ScalarMeson
nodist_HwSMDecay_la_SOURCES = \
ScalarMeson/SMDecayer__all.cc
##################
pkglib_LTLIBRARIES += HwTMDecay.la
HwTMDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 9:0:0
+$(AM_LDFLAGS) -module -version-info 10:0:0
HwTMDecay_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/TensorMeson
nodist_HwTMDecay_la_SOURCES = \
TensorMeson/TMDecayer__all.cc
##################
pkglib_LTLIBRARIES += HwPartonicDecay.la
HwPartonicDecay_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:0:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwPartonicDecay_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Partonic
nodist_HwPartonicDecay_la_SOURCES = \
Partonic/Partonic__all.cc
##################
noinst_LTLIBRARIES += libHwDecRad.la
libHwDecRad_la_SOURCES = \
Radiation/DecayRadiationGenerator.cc \
Radiation/QEDRadiationHandler.cc \
Radiation/DecayRadiationGenerator.h \
Radiation/DecayRadiationGenerator.fh \
Radiation/QEDRadiationHandler.fh \
Radiation/QEDRadiationHandler.h
pkglib_LTLIBRARIES += HwSOPHTY.la
HwSOPHTY_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 4:0:0
+$(AM_LDFLAGS) -module -version-info 5:0:0
HwSOPHTY_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Radiation
nodist_HwSOPHTY_la_SOURCES = \
Radiation/Sophty__all.cc
##################
diff --git a/Decay/MamboDecayer.h b/Decay/MamboDecayer.h
--- a/Decay/MamboDecayer.h
+++ b/Decay/MamboDecayer.h
@@ -1,284 +1,284 @@
// -*- C++ -*-
//
// MamboDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MamboDecayer_H
#define HERWIG_MamboDecayer_H
//
// This is the declaration of the MamboDecayer class.
//
#include "HwDecayerBase.h"
#include "ThePEG/PDT/DecayMode.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MamboDecayer class inherits from the Decayer class in
* ThePEG and implements the algorithm of R.Kleiss and
* W.J.Stirling NPB 385 (1992) 413-432 for massive multi-particle phase-space
* decays
*/
class MamboDecayer: public HwDecayerBase {
public:
/**
* The default constructor.
*/
MamboDecayer() : _maxweight(10.), _a0(10,0.), _a1(10,0.) {}
/**
* Check if this decayer can perfom the decay for a particular mode
* @param parent The decaying particle
* @param children The decay products
* @return true If this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Perform the decay of the particle to the specified decay products
* @param parent The decaying particle
* @param children The decay products
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MamboDecayer & operator=(const MamboDecayer &);
+ MamboDecayer & operator=(const MamboDecayer &) = delete;
private:
/**
*Set array of mometum to particles
*@param mom Momentum set to be distributed over phase-space
*@param comEn The mass of the decaying particle
*@return The weight of the configuration
**/
double calculateMomentum(vector<Lorentz5Momentum> & mom,
Energy comEn) const;
/**
* Set up the colour connections for the decay
* @param parent The incoming particle
* @param out The decay products
*/
void colourConnections(const Particle & parent,
ParticleVector & out) const;
/** @name Bessel Functions.*/
//@{
/**
* Compute the values \f$K_0(x)/K_1(x)\f$ and it's derivative using
* asymptotic expansion for large x values.
* @param x The argument
* @param f The value of the ratio
* @param fp The value of the derivative ratio
*/
void BesselFns(const long double x,
long double & f, long double & fp) const {
assert(x>=0.);
if( x < 10. ) {
f = BesselK0(x)/BesselK1(x);
fp = ( sqr(f)*x + f - x )/x;
}
else
BesselIExpand(-x, f, fp);
}
/**
* Compute the values \f$I_0(x)/I_1(x)\f$ and it's derivative using
* asymptotic expansion.
* @param x The argument
* @param f The value of the ratio
* @param fp The value of the derivative ratio
*/
void BesselIExpand(const long double x,
long double & f, long double & fp) const {
long double y = 1./x;
f = 1.+ y*(_a0[0] + y*(_a0[1] + y*(_a0[2] + y*(_a0[3]
+ y*(_a0[4] + y*(_a0[5] + y*(_a0[6] + y*(_a0[7]
+ y*(_a0[8] + y*_a0[9] )))))))));
fp = -y*y*(_a1[0] + y*(_a1[1] + y*(_a1[2] + y*(_a1[3]
+ y*(_a1[4] + y*(_a1[5] + y*(_a1[6] + y*(_a1[7]
+ y*(_a1[8] + y*_a1[9] )))))))));
}
/**
* Modified Bessel function of first kind \f$I_0(x)\f$.
*@param x Argument of Bessel Function
**/
long double BesselI0(const long double x) const {
long double y,ans;
if(x < 3.75) {
y = sqr(x/3.75);
ans = 1. + y*(3.5156229 + y*(3.0899424 + y*(1.2067492
+ y*(0.2659732 + y*(0.0360768+y*0.0045813)))));
}
else {
y = (3.75/x);
ans = (exp(x)/sqrt(x))*(0.39894228 + y*(0.01328592
+ y*(0.00225319 + y*(-0.00157565 + y*(0.00916281
+ y*(-0.02057706+y*(0.02635537+y*(-0.01647633+y*0.00392377))))))));
}
return ans;
}
/**
* Modified Bessel function of first kind \f$I_1(x)\f$.
*@param x Argument of Bessel Function
**/
long double BesselI1(const long double x) const {
long double y,ans;
if(x < 3.75) {
y = sqr(x/3.75);
ans = x*(0.5 + y*(0.87890594 + y*(0.51498869 + y*(0.15084934
+ y*(0.02658733 + y*(0.00301532 + y*0.00032411))))));
}
else {
y = 3.75/x;
ans = (0.39894228 + y*(-0.03988024 + y*(-0.00362018
+ y*(0.00163801 + y*(-0.01031555 + y*(0.02282967
+ y*(-0.02895312 + y*(0.01787654-y*0.00420059))))))))*(exp(x)/sqrt(x));
}
return ans;
}
/**
* Modified Bessel function of second kind \f$K_0(x)\f$.
* @param x Argument of Bessel Function
**/
long double BesselK0(const long double x) const {
long double y,ans;
if(x <= 2.0) {
y = x*x/4.0;
ans = -log(x/2.0)*BesselI0(x) - 0.57721566
+ y*(0.42278420 + y*(0.23069756
+ y*(0.03488590 + y*(0.00262698 + y*(0.00010750+y*0.00000740)))));
}
else {
y = 2.0/x;
ans = (1.25331414 + y*(-0.07832358 + y*(+0.02189568
+ y*(-0.01062446 + y*(0.00587872
+ y*(-0.00251540 + y*0.00053208))))))*(exp(-x)/sqrt(x));
}
return ans;
}
/**
* Modified Bessel function of second kind \f$K_1(x)\f$.
* @param x Argument of Bessel Function
**/
long double BesselK1(const long double x) const {
long double y,ans;
if(x <= 2.0) {
y = x*x/4.;
ans = log(x/2.)*BesselI1(x) + (1./x)*(1. + y*(0.15443144
+ y*(-0.67278579 + y*(-0.18156897
+ y*(-0.01919402+y*(-0.00110404-(y*0.00004686)))))));
}
else {
y = 2./x;
ans = (exp(-x)/sqrt(x))*(1.25331414 + y*(0.23498619
+ y*(-0.03655620 + y*(0.01504268 + y*(-0.00780353
+ y*(0.00325614+y*(-0.00068245)))))));
}
return ans;
}
//@}
private:
/**
* Maximum weight
*/
double _maxweight;
/**
* Store coefficents for aysymptotic expansion of \f$\frac{I_0}{I_1}\f$
*/
vector<double> _a0;
/**
* Store data for aysymptotic expansion of the first derivative
* \f$\frac{I_0}{I_1}\f$.
*/
vector<double> _a1;
};
}
#endif /* HERWIG_MamboDecayer_H */
diff --git a/Decay/Partonic/BtoSGammaDecayer.h b/Decay/Partonic/BtoSGammaDecayer.h
--- a/Decay/Partonic/BtoSGammaDecayer.h
+++ b/Decay/Partonic/BtoSGammaDecayer.h
@@ -1,118 +1,118 @@
// -*- C++ -*-
//
// BtoSGammaDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_BtoSGammaDecayer_H
#define HERWIG_BtoSGammaDecayer_H
//
// This is the declaration of the BtoSGammaDecayer class.
//
#include "PartonicDecayerBase.h"
#include "Herwig/Decay/FormFactors/BtoSGammaHadronicMass.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the BtoSGammaDecayer class.
*
*/
class BtoSGammaDecayer: public PartonicDecayerBase {
public:
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BtoSGammaDecayer & operator=(const BtoSGammaDecayer &);
+ BtoSGammaDecayer & operator=(const BtoSGammaDecayer &) = delete;
private:
/**
* Pointer to the object which generates the hadronic mass spectrum
*/
BtoSGammaHadronicMassPtr _hadronicmass;
};
}
#endif /* HERWIG_BtoSGammaDecayer_H */
diff --git a/Decay/Partonic/HeavyDecayer.h b/Decay/Partonic/HeavyDecayer.h
--- a/Decay/Partonic/HeavyDecayer.h
+++ b/Decay/Partonic/HeavyDecayer.h
@@ -1,141 +1,141 @@
// -*- C++ -*-
//
// HeavyDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HeavyDecayer_H
#define HERWIG_HeavyDecayer_H
// This is the declaration of the HeavyDecayer class.
#include "PartonicDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class is designed for the partonic decay of a bottom or charm mesons
* and baryons and is intended to be the same as that in HERWIG6.4.
* Only four body partonic decays are supported.
*
* Two types of matrix element are supported for this decay
*
* - MECode=0 flat phase space
* - MECode=100 V-A matrix element for the heavy quark decay in the spectator model.
*
* The class decays a particle based on the DecayMode given.
* The basic idea is that the heavy parton in the heavy meson will decay
* weakly while the other parton will be more or less unchanged. This produces
* 4 partons, the spectator plus the result of the weak decay. The W then
* decays again into two more partons,
* e.g. a decay of \f$B^0\to d,\bar{c},\bar{d}, u \f$.
*
* \f$\bar{b}\to\bar{c}\f$ (colour connected to spectator)
* and \f$W^+\to\bar{d}u\f$ (the W decay products are colour connected)
*
* The resulting partons then need to be hadronized and decayed again.
*
* @see QuarkoniumDecayer
* @see Hw64Decayer
* @see Decayer
*
*/
class HeavyDecayer: public PartonicDecayerBase {
public:
/**
* Default constructor
*/
HeavyDecayer();
/**
* Check if this decayer can perfom the decay for a particular mode
* @param parent The decaying particle
* @param children The decay products
* @return true If this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Perform the decay of the particle to the specified decay products
* @param parent The decaying particle
* @param children The decay products
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/**
* Standard Init function used to initialize the interface.
*/
static void Init();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/** * Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Weighting of phase space for V-A matrix elements
*/
static double VAWt(Energy2, Energy2, Energy2, InvEnergy4);
private:
/**
* Private and non-existent assignment operator.
*/
- const HeavyDecayer & operator=(const HeavyDecayer &);
+ const HeavyDecayer & operator=(const HeavyDecayer &) = delete;
private:
/**
* The code for the matrix element being used.
*/
int MECode;
};
}
#endif /* HERWIG_HeavyDecayer_H */
diff --git a/Decay/Partonic/PartonicDecayerBase.h b/Decay/Partonic/PartonicDecayerBase.h
--- a/Decay/Partonic/PartonicDecayerBase.h
+++ b/Decay/Partonic/PartonicDecayerBase.h
@@ -1,174 +1,174 @@
// -*- C++ -*-
//
// PartonicDecayerBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PartonicDecayerBase_H
#define HERWIG_PartonicDecayerBase_H
//
// This is the declaration of the PartonicDecayerBase class.
//
#include "Herwig/Decay/HwDecayerBase.h"
#include "Herwig/Hadronization/PartonSplitter.h"
#include "Herwig/Hadronization/ClusterFinder.h"
#include "Herwig/Hadronization/ClusterFissioner.h"
#include "Herwig/Hadronization/LightClusterDecayer.h"
#include "Herwig/Hadronization/ClusterDecayer.h"
#include "Herwig/Hadronization/Cluster.h"
namespace Herwig {
using namespace ThePEG;
/**
* Define some sets
*/
ThePEG_DECLARE_MULTISET(tcPDPtr,cParticleMSet);
/**
* Here is the documentation of the PartonicDecayerBase class.
*
* @see \ref PartonicDecayerBaseInterfaces "The interfaces"
* defined for PartonicDecayerBase.
*/
class PartonicDecayerBase: public HwDecayerBase {
public:
/**
* The default constructor.
*/
PartonicDecayerBase();
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Check if this decayer can perfom the decay for a particular mode
* @param parent The decaying particle
* @param children The decay products
* @return true If this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const = 0;
/**
* Perform the decay of the particle to the specified decay products
* @param parent The decaying particle
* @param children The decay products
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const = 0;
/**
* Perform a decay for a given DecayMode and a given Particle instance.
* @param dm the DecayMode describing the decay.
* @param p the Particle instance to be decayed.
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const DecayMode & dm, const Particle & p) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Check hadrons produced in a partonic hadron decay do not reproduce an inclusive
* mode.
* @param parent The decaying particles.
* @param hadrons The hadrons produced in the partonic decay.
* @return Whether or not there are duplicate modes.
*/
bool duplicateMode(const Particle & parent,
const vector<tPPtr> & hadrons) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PartonicDecayerBase & operator=(const PartonicDecayerBase &);
+ PartonicDecayerBase & operator=(const PartonicDecayerBase &) = delete;
private:
/**
* This is a pointer to a Herwig::PartonSplitter object.
*/
PartonSplitterPtr _partonSplitter;
/**
* This is a pointer to a Herwig::ClusterFinder object.
*/
ClusterFinderPtr _clusterFinder;
/**
* This is a pointer to a Herwig::ClusterFissioner object.
*/
ClusterFissionerPtr _clusterFissioner;
/**
* This is a pointer to a Herwig::LightClusterDecayer object.
*/
LightClusterDecayerPtr _lightClusterDecayer;
/**
* This is a pointer to a Herwig::ClusterDecayer object.
*/
ClusterDecayerPtr _clusterDecayer;
/**
* Switch to control hadrons produced in partonic b and c decays
*/
bool _exclusive;
/**
* Number of tries for partonic modes
*/
unsigned int _partontries;
/**
* Whether or not to include the intermediates
*/
bool _inter;
};
}
#endif /* HERWIG_PartonicDecayerBase_H */
diff --git a/Decay/Partonic/QuarkoniumDecayer.h b/Decay/Partonic/QuarkoniumDecayer.h
--- a/Decay/Partonic/QuarkoniumDecayer.h
+++ b/Decay/Partonic/QuarkoniumDecayer.h
@@ -1,133 +1,133 @@
// -*- C++ -*-
//
// QuarkoniumDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_QuarkoniumDecayer_H
#define HERWIG_QuarkoniumDecayer_H
//
// This is the declaration of the QuarkoniumDecayer class.
//
#include "PartonicDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The QuarkoniumDecayer class is designed for the partonic decay of bottom and charmonium
* resonances. In general it is used for decays of the type:
* - \f$q,\bar{q}\f$ decay to a quark-antiquark pair generally using phase space,
* \e i.e. MECode=0.
*
* - \f$g,g\f$ decay to two gluons normally using phase space,
* \e i.e. MECode=0.
*
* - \f$g,g,g\f$ decay to three gluons, this will normally use the Ore-Powell
* matrix element, \e i.e. MECode=130.
*
* - \f$g,g,\gamma\f$ decay to two gluons and a photon, this will normally use
* the Ore-Powell matrix element, \e i.e. MECode=130.
*
*
* This class supports two values of the MECode variable which can be set using
* the interface
*
* - MECode=0 flat-phase space
* - MECode=130 The Ore-Powell onium matrix element.
*
* This is designed to be the same as the FORTRAN HERWIG routine.
*
* @see HeavyDecayer
* @see Hw64Decayer
* @see Decayer
*
*/
class QuarkoniumDecayer: public PartonicDecayerBase {
public:
/**
* Standard ctors and dtor
*/
QuarkoniumDecayer();
/**
* Check if this decayer can perfom the decay for a particular mode
* @param parent The decaying particle
* @param children The decay products
* @return true If this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Perform the decay of the particle to the specified decay products
* @param parent The decaying particle
* @param children The decay products
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/**
* Standard Init function used to initialize the interface.
*/
static void Init();
/**
* Standard Persistent stream methods
*/
void persistentOutput(PersistentOStream &) const;
/**
* Standard Persistent stream methods
*/
void persistentInput(PersistentIStream &, int);
/**
* Standard clone methods
*/
protected:
/**
* Standard clone methods
*/
virtual IBPtr clone() const;
/**
* Standard clone methods
*/
virtual IBPtr fullclone() const;
private:
/**
* Private and non-existent assignment operator.
*/
- const QuarkoniumDecayer & operator=(const QuarkoniumDecayer &);
+ const QuarkoniumDecayer & operator=(const QuarkoniumDecayer &) = delete;
private:
/**
* The code for the type of matrix element being used.
*/
int MECode;
};
}
#endif /* HERWIG_QuarkoniumDecayer_H */
diff --git a/Decay/Partonic/WeakPartonicDecayer.h b/Decay/Partonic/WeakPartonicDecayer.h
--- a/Decay/Partonic/WeakPartonicDecayer.h
+++ b/Decay/Partonic/WeakPartonicDecayer.h
@@ -1,198 +1,198 @@
// -*- C++ -*-
//
// WeakPartonicDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_WeakPartonicDecayer_H
#define HERWIG_WeakPartonicDecayer_H
//
// This is the declaration of the WeakPartonicDecayer class.
//
#include "PartonicDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The WeakPartonicDecayer class is designed to replace the HeavyDecayer
* class which implements the partonic decays of hadrons containing a
* heavy quark in the same way as in FORTRAN Herwig.
*
* There are a number of major changes
*
* - The helicity formalism is used for the decays so that the \f$\tau\f$ lepton
* gets the correct correlations.
*
* - The particles produced directly by the hadronisation, i.e. the primary hadrons
* produced in cluster decay are checked to ensure that none of the exclusive
* modes are reproduced.
*
* - Two body modes are allowed to try and force baryon production etc. In this case
* the colours of the partons are connected.
*
* - Three body modes of the form \f$q g \bar{q}\f$ are supported for penguin mediated
* weak decays.
*
* Two types of matrix element are supported for this decay
*
* - MECode=0 flat-phase space.
* - MECode=100 V-A matrix element for the heavy quark decay in the spectator model.
*
* In addition for the two-body decays and the three-bopdy spectator decays
* using the weka V-A matrix element the option of adding an extra gluon to increase
* the multiplicity of hadrons is included
*
* @see HeavyDecayer
*/
class WeakPartonicDecayer: public PartonicDecayerBase {
public:
/**
* The default constructor.
*/
WeakPartonicDecayer();
/**
* Check if this decayer can perfom the decay for a particular mode
* @param parent The decaying particle
* @param children The decay products
* @return true If this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Perform the decay of the particle to the specified decay products
* @param parent The decaying particle
* @param children The decay products
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Weighting of phase space for V-A matrix elements
*/
static double VAWt(Energy2, Energy2, Energy2, InvEnergy4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
/**
* Compute \f$\rho\f$ matrix for tau decay in three body case
* @param dec ParticleData object of decaying quark
* @param pdec The momentum of the decaying particle
* @param partons The partons produced
*/
void threeBodyMatrixElement(tcPDPtr dec,Lorentz5Momentum & pdec,
ParticleVector& partons) const;
/**
* Four body matrix element for weak decay including an extra gluon
* @param p0 Momentum of decaying quark
* @param p1 Momentum of connected decay product
* @param p2 Momentum of first parton from W decay
* @param p3 Momentum of second parton from W decay
* @param pg Momentum of gluon from W decay
* @param Wcol Whether or not W products are coloured
* @param initial Whether the radiation is from the decaying quark/first decay product
* or W decay products
*/
double fourBodyMatrixElement(Lorentz5Momentum & p0,Lorentz5Momentum & p1,
Lorentz5Momentum & p2,Lorentz5Momentum & p3,
Lorentz5Momentum & pg,bool Wcol, bool & initial) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- WeakPartonicDecayer & operator=(const WeakPartonicDecayer &);
+ WeakPartonicDecayer & operator=(const WeakPartonicDecayer &) = delete;
private:
/**
* The code for the matrix element being used.
*/
int MECode;
/**
* Probablilty of radiation giving an extra quark-antiquark pair
*/
double _radprob;
/**
* Maximum number of tries to generate the kinematics
*/
unsigned int _maxtry;
/**
* Maximum weight for three-body decays
*/
double _threemax;
/**
* Maximum weight for four-body decays
*/
double _fourmax;
};
}
#endif /* HERWIG_WeakPartonicDecayer_H */
diff --git a/Decay/Perturbative/SMHiggsFermionsDecayer.h b/Decay/Perturbative/SMHiggsFermionsDecayer.h
--- a/Decay/Perturbative/SMHiggsFermionsDecayer.h
+++ b/Decay/Perturbative/SMHiggsFermionsDecayer.h
@@ -1,279 +1,279 @@
// -*- C++ -*-
//
// SMHiggsFermionsDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMHiggsFermionsDecayer_H
#define HERWIG_SMHiggsFermionsDecayer_H
//
// This is the declaration of the SMHiggsFermionsDecayer class.
//
#include "Herwig/Decay/PerturbativeDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SMHiggsFermionsDecayer class is designed to decay the Standard Model Higgs
* to the Standard Model fermions.
*
* @see PerturbativeDecayer
*/
class SMHiggsFermionsDecayer: public PerturbativeDecayer {
public:
/**
* The default constructor.
*/
SMHiggsFermionsDecayer();
/**
* Which of the possible decays is required
*/
virtual int modeNumber(bool & , tcPDPtr , const tPDVector & ) const {return -1;}
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
/**
* Calculate matrix element ratio R/B
*/
virtual double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
const ParticleVector & decay3, MEOption meopt,
ShowerInteraction inter);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Calcluate the Kallen function
*/
double calculateLambda(double x, double y, double z) const;
/**
* Dipole subtraction term
*/
InvEnergy2 dipoleSubtractionTerm(double x1, double x2) const;
/**
* Real emission term
*/
InvEnergy2 calculateRealEmission(double x1, double x2) const;
/**
* Virtual term
*/
double calculateVirtualTerm() const;
/**
* Non-singlet term
*/
double calculateNonSingletTerm(double beta, double L) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHiggsFermionsDecayer & operator=(const SMHiggsFermionsDecayer &);
+ SMHiggsFermionsDecayer & operator=(const SMHiggsFermionsDecayer &) = delete;
private:
/**
* Pointer to the Higgs vertex
*/
AbstractFFSVertexPtr _hvertex;
/**
* maximum weights for the different decay modes
*/
vector<double> _maxwgt;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction _swave;
/**
* Spinor wavefunction
*/
mutable vector<SpinorWaveFunction> _wave;
/**
* Barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> _wavebar;
private:
/**
* The colour factor
*/
double CF_;
/**
* The Higgs mass
*/
mutable Energy mHiggs_;
/**
* The reduced mass
*/
mutable double mu_;
/**
* The square of the reduced mass
*/
mutable double mu2_;
/**
* The strong coupling
*/
mutable double aS_;
/**
* Stuff for the POWHEG correction
*/
//@{
/**
* The ParticleData objects for the fermions
*/
vector<tcPDPtr> partons_;
/**
* The fermion momenta
*/
vector<Lorentz5Momentum> quark_;
/**
* The momentum of the radiated gauge boson
*/
Lorentz5Momentum gauge_;
/**
* The Higgs boson
*/
PPtr higgs_;
/**
* Higgs mass squared
*/
Energy2 mh2_;
//@}
/**
* LO or NLO ?
*/
bool NLO_;
};
}
#endif /* HERWIG_SMHiggsFermionsDecayer_H */
diff --git a/Decay/Perturbative/SMHiggsGGHiggsPPDecayer.h b/Decay/Perturbative/SMHiggsGGHiggsPPDecayer.h
--- a/Decay/Perturbative/SMHiggsGGHiggsPPDecayer.h
+++ b/Decay/Perturbative/SMHiggsGGHiggsPPDecayer.h
@@ -1,237 +1,237 @@
// -*- C++ -*-
//
// SMHiggsGGHiggsPPDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMHiggsGGHiggsPPDecayer_H
#define HERWIG_SMHiggsGGHiggsPPDecayer_H
//
// This is the declaration of the SMHiggsGGHiggsPPDecayer class.
//
#include "Herwig/Decay/PerturbativeDecayer.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The <code>SMHiggsGGHiggsPPDecayer</code> class performs the
* of a Standard Model Higgs boson to: a pair
* of photons or a pair of gluons, or a \f$Z^0\f$ boson and a photon.
*
* @see PerturbativeDecayer
*/
class SMHiggsGGHiggsPPDecayer: public PerturbativeDecayer {
public:
/**
* The default constructor.
*/
SMHiggsGGHiggsPPDecayer() : _h0wgt(3,1.), _minloop(6), _maxloop(6), _massopt(0)
{}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Which of the possible decays is required
*/
virtual int modeNumber(bool &, tcPDPtr, const tPDVector & ) const {return -1;}
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,const tPDVector & children) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
/**
* Calculate matrix element ratio R/B
*/
virtual double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
const ParticleVector & decay3, MEOption meopt,
ShowerInteraction inter);
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/**
* Calculate the NLO real emission piece of ME
*/
double realME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta) const;
/**
* Calculate the LO ME
*/
Energy2 loME(Energy mh) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHiggsGGHiggsPPDecayer & operator=(const SMHiggsGGHiggsPPDecayer &);
+ SMHiggsGGHiggsPPDecayer & operator=(const SMHiggsGGHiggsPPDecayer &) = delete;
/**
* Pointer to h->gluon,gluon vertex
*/
AbstractVVSVertexPtr _hggvertex;
/**
* Pointer to h->gamma,gamma vertex
*/
AbstractVVSVertexPtr _hppvertex;
/**
* Pointer to h->gamma,gamma vertex
*/
AbstractVVSVertexPtr _hzpvertex;
/**
* Maximum weight for integration
*/
vector<double> _h0wgt;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction _swave;
/**
* Vector wavefunctions
*/
mutable vector<VectorWaveFunction> _vwave[2];
private:
/**
* Parameters for the real POWHEG correction
*/
//@{
/**
* Minimum flavour of quarks to include in the loops
*/
int _minloop;
/**
* Maximum flavour of quarks to include in the loops
*/
int _maxloop;
/**
* Option for treatment of the fermion loops
*/
unsigned int _massopt;
//@}
};
}
#endif /* HERWIG_SMHiggsGGHiggsPPDecayer_H */
diff --git a/Decay/Perturbative/SMHiggsWWDecayer.h b/Decay/Perturbative/SMHiggsWWDecayer.h
--- a/Decay/Perturbative/SMHiggsWWDecayer.h
+++ b/Decay/Perturbative/SMHiggsWWDecayer.h
@@ -1,251 +1,251 @@
// -*- C++ -*-
//
// SMHiggsWWDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMHiggsWWDecayer_H
#define HERWIG_SMHiggsWWDecayer_H
//
// This is the declaration of the SMHiggsWWDecayer class.
//
#include "Herwig/Decay/PerturbativeDecayer.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.fh"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The SMHiggsWWDecayer class performs the decay of the Standard Model
* Higgs boson to \f$W^+W^-\f$ and \f$Z^0Z^0\f$ including the decays
* of the gauge bosons.
*
* @see \ref SMHiggsWWDecayerInterfaces "The interfaces"
* defined for SMHiggsWWDecayer.
*/
class SMHiggsWWDecayer: public PerturbativeDecayer {
public:
/**
* A typedef to select the boson decay modes
*/
typedef Selector<unsigned int> ModeSelector;
public:
/**
* The default constructor.
*/
SMHiggsWWDecayer();
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Which of the possible decays is required
*/
virtual int modeNumber(bool &, tcPDPtr, const tPDVector & ) const {return -1;}
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHiggsWWDecayer & operator=(const SMHiggsWWDecayer &);
+ SMHiggsWWDecayer & operator=(const SMHiggsWWDecayer &) = delete;
private:
/**
* Pointers to the vertices for the helicity calculations
*/
//@{
/**
* Pointer to the fermion-femion-W vertex
*/
AbstractFFVVertexPtr _theFFWVertex;
/**
* Pointer to the fermion-femion-Z vertex
*/
AbstractFFVVertexPtr _theFFZVertex;
/**
* Pointer to the higgs-WW/ZZ vertex
*/
AbstractVVSVertexPtr _theHVVVertex;
//@}
/**
* Selectors for the gauge boson decay modes
*/
//@{
/**
* Selector for the W decays
*/
ModeSelector _wdecays;
/**
* Selector for the Z decays
*/
ModeSelector _zdecays;
//@}
/**
* Product of gauge boson branching ratios for normalisation
*/
vector<double> _ratio;
/**
* Maximum weights for the decays
*/
//@{
/**
* Maximum weight for \f$H\to W^+W^-\f$ decays
*/
vector<double> _wmax;
/**
* Maximum weight for \f$H\to Z^0Z^0\f$ decays
*/
vector<double> _zmax;
//@}
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Scalar wavefunction
*/
mutable ScalarWaveFunction _swave;
/**
* 1st spinor wavefunction
*/
mutable vector<SpinorWaveFunction > _awave1;
/**
* 2nd spinor wavefunction
*/
mutable vector<SpinorWaveFunction > _awave2;
/**
* 1st barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> _fwave1;
/**
* 2nd barred spinor wavefunction
*/
mutable vector<SpinorBarWaveFunction> _fwave2;
};
}
#endif /* HERWIG_SMHiggsWWDecayer_H */
diff --git a/Decay/Perturbative/SMTopDecayer.h b/Decay/Perturbative/SMTopDecayer.h
--- a/Decay/Perturbative/SMTopDecayer.h
+++ b/Decay/Perturbative/SMTopDecayer.h
@@ -1,408 +1,408 @@
// -*- C++ -*-
//
// SMTopDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMTopDecayer_H
#define HERWIG_SMTopDecayer_H
//
// This is the declaration of the SMTopDecayer class.
//
#include "Herwig/Decay/PerturbativeDecayer.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "Herwig/Shower/ShowerAlpha.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* \ingroup Decay
*
* The SMTopDecayer performs decays of the top quark into
* the bottom quark and qqbar pairs or to the bottom quark and lepton
* neutrino pairs via W boson exchange.
*/
class SMTopDecayer: public PerturbativeDecayer {
public:
/**
* The default constructor.
*/
SMTopDecayer();
public:
/**
* Virtual members to be overridden by inheriting classes
* which implement hard corrections
*/
//@{
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return true;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr , double & ,
double & );
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
//@}
public:
/**
* Which of the possible decays is required
*/
virtual int modeNumber(bool & , tcPDPtr , const tPDVector & ) const {return -1;}
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* For a given decay mode and a given particle instance, perform the
* decay and return the decay products. As this is the base class this
* is not implemented.
* @return The vector of particles produced in the decay.
*/
virtual ParticleVector decay(const Particle & parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 (or higher body) partial width
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The differential three body decay rate with one integral performed.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s The invariant mass which still needs to be integrate over.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The differential rate \f$\frac{d\Gamma}{ds}\f$
*/
virtual InvEnergy threeBodydGammads(const int imode, const Energy2 q2,
const Energy2 s, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* The integrand for the integrate partial width
*/
Energy6 dGammaIntegrand(Energy2 mffb2, Energy2 mbf2, Energy mt, Energy mb,
Energy mf, Energy mfb, Energy mw) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/**
* This function determines the point (\f$x_{g}\f$) where the condition that
* \f$x_{a}\f$ be real supersedes that due to the external input
* \f$\tilde{\kappa}\f$ where, again, \f$\kappa\f$ pertains to emissions from the
* b.
*/
double xgbcut(double);
/**
* Full matrix element with a factor of \f$\frac{\alpha_SC_F}{x_g^2\pi}\f$ removed.
* @param xw The momentum fraction of the W boson
* @param xg The momentum fraction of the gluon.
*/
double me(double xw, double xg);
protected:
/**
* Calculate matrix element ratio R/B
*/
virtual double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
const ParticleVector & decay3, MEOption meopt,
ShowerInteraction inter);
/**
* LO matrix element for \f$t\to b W^\pm\f$
*/
double loME(const Particle & inpart, const ParticleVector & decay);
/**
* LO matrix element for \f$t\to b W^\pm\f$
*/
double realME(const Particle & inpart, const ParticleVector & decay,
ShowerInteraction inter);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMTopDecayer & operator=(const SMTopDecayer &);
+ SMTopDecayer & operator=(const SMTopDecayer &) = delete;
/**
* Pointer to the W vertex
*/
AbstractFFVVertexPtr FFWVertex_;
/**
* Pointer to the gluon vertex
*/
AbstractFFVVertexPtr FFGVertex_;
/**
* Pointer to the photon vertex
*/
AbstractFFVVertexPtr FFPVertex_;
/**
* Pointer to the photon vertex
*/
AbstractVVVVertexPtr WWWVertex_;
/**
* Max weight for integration
*/
//@{
/**
* Weight \f$W\to q\bar{q}'\f$
*/
vector<double> _wquarkwgt;
/**
* Weight \f$W\to \ell \nu\f$
*/
vector<double> _wleptonwgt;
//@}
/**
* Pointer to the \f$W^\pm\f$
*/
PDPtr _wplus;
/**
* Spin density matrix for the decay
*/
mutable RhoDMatrix _rho;
/**
* 1st spinor for the decay
*/
mutable vector<SpinorWaveFunction > _inHalf;
/**
* 2nd spinor for the decay
*/
mutable vector<SpinorWaveFunction > _outHalf;
/**
* 1st barred spinor for the decay
*/
mutable vector<SpinorBarWaveFunction> _inHalfBar;
/**
* 2nd barred spinor for the decay
*/
mutable vector<SpinorBarWaveFunction> _outHalfBar;
/**
* The mass of the W boson
*/
Energy _ma;
/**
* The mass of the bottom quark
*/
Energy _mc;
/**
* The top mass
*/
Energy _mt;
/**
* The gluon mass.
*/
Energy _mg;
/**
* The mass ratio for the W.
*/
double _a;
/**
* The mass ratio for the bottom.
*/
double _c;
/**
* The mass ratio for the gluon.
*/
double _g;
/**
* Two times the energy fraction of a.
*/
double _ktb;
/**
* Two times the energy fraction of the gluon.
*/
double _ktc;
/**
* Two times the energy fraction of the gluon.
*/
double _xg;
/**
* Two times the energy fraction of a.
*/
double _xa;
/**
* Two times the energy fraction of c.
*/
double _xc;
/**
* This determines the hard matrix element importance
* sampling in _xg. _xg_sampling=2.0 samples as 1/xg^2.
*/
double _xg_sampling;
/**
* The enhancement factor for initial-state radiation
*/
double _initialenhance;
/**
* The enhancement factor for final-state radiation
*/
double _finalenhance;
};
}
#endif /* HERWIG_SMTopDecayer_H */
diff --git a/Decay/Perturbative/SMWDecayer.h b/Decay/Perturbative/SMWDecayer.h
--- a/Decay/Perturbative/SMWDecayer.h
+++ b/Decay/Perturbative/SMWDecayer.h
@@ -1,502 +1,502 @@
// -*- C++ -*-
//
// SMWDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMWDecayer_H
#define HERWIG_SMWDecayer_H
//
// This is the declaration of the SMWDecayer class.
//
#include "Herwig/Decay/PerturbativeDecayer.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup Decay
*
* The <code>SMWDecayer</code> is designed to perform the decay of the
* W boson to the Standard Model fermions, including the first order
* electroweak corrections.
*
* @see PerturbativeDecayer
*
*/
class SMWDecayer: public PerturbativeDecayer {
public:
/**
* Default constructor.
*/
SMWDecayer();
public:
/**
* Virtual members to be overridden by inheriting classes
* which implement hard corrections
*/
//@{
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return true;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr , double & ,
double & );
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
public:
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay,MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/**
* Set the \f$\rho\f$ parameter
*/
void setRho(double);
/**
* Set the \f$\tilde{\kappa}\f$ parameters symmetrically
*/
void setKtildeSymm();
/**
* Set second \f$\tilde{\kappa}\f$, given the first.
*/
void setKtilde2();
/**
* Translate the variables from \f$x_q,x_{\bar{q}}\f$ to \f$\tilde{\kappa},z\f$
*/
//@{
/**
* Calculate \f$z\f$.
*/
double getZfromX(double, double);
/**
* Calculate \f$\tilde{\kappa}\f$.
*/
double getKfromX(double, double);
//@}
/**
* Calculate \f$x_{q},x_{\bar{q}}\f$ from \f$\tilde{\kappa},z\f$.
* @param kt \f$\tilde{\kappa}\f$
* @param z \f$z\f$
* @param x \f$x_{q}\f$
* @param xbar \f$x_{\bar{q}}\f$
*/
void getXXbar(double kt, double z, double & x, double & xbar);
/**
* Soft weight
*/
//@{
/**
* Soft quark weight calculated from \f$x_{q},x_{\bar{q}}\f$
* @param x \f$x_{q}\f$
* @param xbar \f$x_{\bar{q}}\f$
*/
double qWeight(double x, double xbar);
/**
* Soft antiquark weight calculated from \f$x_{q},x_{\bar{q}}\f$
* @param x \f$x_{q}\f$
* @param xbar \f$x_{\bar{q}}\f$
*/
double qbarWeight(double x, double xbar);
/**
* Soft quark weight calculated from \f$\tilde{q},z\f$
* @param qtilde \f$\tilde{q}\f$
* @param z \f$z\f$
*/
double qWeightX(Energy qtilde, double z);
/**
* Soft antiquark weight calculated from \f$\tilde{q},z\f$
* @param qtilde \f$\tilde{q}\f$
* @param z \f$z\f$
*/
double qbarWeightX(Energy qtilde, double z);
//@}
/**
* ????
*/
double u(double);
/**
* Vector and axial vector parts of the matrix element
*/
//@{
/**
* Vector part of the matrix element
*/
double MEV(double, double);
/**
* Axial vector part of the matrix element
*/
double MEA(double, double);
/**
* The matrix element, given \f$x_1\f$, \f$x_2\f$.
* @param x1 \f$x_1\f$
* @param x2 \f$x_2\f$
*/
double PS(double x1, double x2);
//@}
protected:
/**
* Real emission term, for use in generating the hardest emission
*/
double calculateRealEmission(double x1, double x2,
vector<PPtr> hardProcess,
double phi, double muj, double muk,
int iemit, bool subtract) const;
/**
* Calculate the ratio between NLO & LO ME
*/
double meRatio(vector<cPDPtr> partons,
vector<Lorentz5Momentum> momenta,
unsigned int iemitter,bool subtract) const;
/**
* Calculate matrix element ratio R/B
*/
virtual double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
const ParticleVector & decay3, MEOption meopt,
ShowerInteraction inter);
/**
* Calculate the LO ME
*/
double loME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta) const;
/**
* Calculate the NLO real emission piece of ME
*/
InvEnergy2 realME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta,
ShowerInteraction inter) const;
private:
/**
* Private and non-existent assignment operator.
*/
- SMWDecayer & operator=(const SMWDecayer &);
+ SMWDecayer & operator=(const SMWDecayer &) = delete;
private:
/**
* Pointer to the fermion-antifermion W vertex
*/
AbstractFFVVertexPtr FFWVertex_;
/**
* Pointer to the fermion-antifermion G vertex
*/
AbstractFFVVertexPtr FFGVertex_;
/**
* Pointer to the fermion-antifermion G vertex
*/
AbstractFFVVertexPtr FFPVertex_;
/**
* Pointer to the fermion-antifermion G vertex
*/
AbstractVVVVertexPtr WWWVertex_;
/**
* maximum weights for the different integrations
*/
//@{
/**
* Weights for the W to quarks decays.
*/
vector<double> quarkWeight_;
/**
* Weights for the W to leptons decays.
*/
vector<double> leptonWeight_;
//@}
/**
* Spin density matrix for the decay
*/
mutable RhoDMatrix rho_;
/**
* Polarization vectors for the decay
*/
mutable vector<VectorWaveFunction> vectors_;
/**
* Spinors for the decay
*/
mutable vector<SpinorWaveFunction> wave_;
/**
* Barred spinors for the decay
*/
mutable vector<SpinorBarWaveFunction> wavebar_;
private:
/**
* CM energy
*/
Energy d_Q_;
/**
* Quark mass
*/
Energy d_m_;
/**
* The rho parameter
*/
double d_rho_;
/**
* The v parameter
*/
double d_v_;
/**
* The initial kappa-tilde values for radiation from the quark
*/
double d_kt1_;
/**
* The initial kappa-tilde values for radiation from the antiquark
*/
double d_kt2_;
/**
* Cut-off parameter
*/
static const double EPS_;
private:
/**
* The colour factor
*/
double CF_;
/**
* The W mass
*/
mutable Energy mW_;
// TODO: delete this
mutable double mu_;
/**
* The reduced mass of particle 1
*/
mutable double mu1_;
/**
* The reduced mass of particle 1 squared
*/
mutable double mu12_;
/**
* The reduceed mass of particle 2
*/
mutable double mu2_;
/**
* The reduceed mass of particle 2 squared
*/
mutable double mu22_;
/**
* The strong coupling
*/
mutable double aS_;
/**
* The scale
*/
mutable Energy2 scale_;
/**
* Stuff for the POWHEG correction
*/
//@{
/**
* ParticleData object for the gluon
*/
tcPDPtr gluon_;
/**
* The ParticleData objects for the fermions
*/
vector<tcPDPtr> partons_;
/**
* The fermion momenta
*/
vector<Lorentz5Momentum> quark_;
/**
* The momentum of the radiated gauge boson
*/
Lorentz5Momentum gauge_;
/**
* The W boson
*/
PPtr wboson_;
/**
* W mass squared
*/
Energy2 mw2_;
//@}
/**
* Whether ro return the LO or NLO result
*/
bool NLO_;
};
}
#endif /* HERWIG_SMWDecayer_H */
diff --git a/Decay/Perturbative/SMZDecayer.h b/Decay/Perturbative/SMZDecayer.h
--- a/Decay/Perturbative/SMZDecayer.h
+++ b/Decay/Perturbative/SMZDecayer.h
@@ -1,542 +1,542 @@
// -*- C++ -*-
//
// SMZDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMZDecayer_H
#define HERWIG_SMZDecayer_H
//
// This is the declaration of the SMZDecayer class.
//
#include "Herwig/Decay/PerturbativeDecayer.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup Decay
*
* The <code>SMZDecayer</code> is designed to perform the decay of the
* Z boson to the Standard Model fermions. In principle it can also
* be used for these decays in any model.
*
* @see PerturbativeDecayer
*
*/
class SMZDecayer: public PerturbativeDecayer {
public:
/**
* Default constructor.
*/
SMZDecayer();
/**
* Virtual members to be overridden by inheriting classes
* which implement hard corrections
*/
//@{
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return true;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr , double & ,
double & );
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
//@}
public:
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay,MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
/**
* Members for the generation of QED radiation in the decays
*/
//@{
/**
* The one-loop virtual correction.
* @param imode The mode required.
* @param part The decaying particle.
* @param products The decay products including the radiated photon.
* @return Whether the correction is implemented
*/
virtual double oneLoopVirtualME(unsigned int imode,
const Particle & part,
const ParticleVector & products);
/**
* The real emission matrix element
* @param imode The mode required
* @param part The decaying particle
* @param products The decay products including the radiated photon
* @param iemitter The particle which emitted the photon
* @param ctheta The cosine of the polar angle between the photon and the
* emitter
* @param stheta The sine of the polar angle between the photon and the
* emitter
* @param rot1 Rotation from rest frame to frame for real emission
* @param rot2 Rotation to place emitting particle along z
*/
virtual InvEnergy2 realEmissionME(unsigned int imode,
const Particle & part,
ParticleVector & products,
unsigned int iemitter,
double ctheta, double stheta,
const LorentzRotation & rot1,
const LorentzRotation & rot2);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/**
* Set the \f$\rho\f$ parameter
*/
void setRho(double);
/**
* Set the \f$\tilde{\kappa}\f$ parameters symmetrically
*/
void setKtildeSymm();
/**
* Set second \f$\tilde{\kappa}\f$, given the first.
*/
void setKtilde2();
/**
* Translate the variables from \f$x_q,x_{\bar{q}}\f$ to \f$\tilde{\kappa},z\f$
*/
//@{
/**
* Calculate \f$z\f$.
*/
double getZfromX(double, double);
/**
* Calculate \f$\tilde{\kappa}\f$.
*/
double getKfromX(double, double);
//@}
/**
* Calculate \f$x_{q},x_{\bar{q}}\f$ from \f$\tilde{\kappa},z\f$.
* @param kt \f$\tilde{\kappa}\f$
* @param z \f$z\f$
* @param x \f$x_{q}\f$
* @param xbar \f$x_{\bar{q}}\f$
*/
void getXXbar(double kt, double z, double & x, double & xbar);
/**
* Soft weight
*/
//@{
/**
* Soft quark weight calculated from \f$x_{q},x_{\bar{q}}\f$
* @param x \f$x_{q}\f$
* @param xbar \f$x_{\bar{q}}\f$
*/
double qWeight(double x, double xbar);
/**
* Soft antiquark weight calculated from \f$x_{q},x_{\bar{q}}\f$
* @param x \f$x_{q}\f$
* @param xbar \f$x_{\bar{q}}\f$
*/
double qbarWeight(double x, double xbar);
/**
* Soft quark weight calculated from \f$\tilde{q},z\f$
* @param qtilde \f$\tilde{q}\f$
* @param z \f$z\f$
*/
double qWeightX(Energy qtilde, double z);
/**
* Soft antiquark weight calculated from \f$\tilde{q},z\f$
* @param qtilde \f$\tilde{q}\f$
* @param z \f$z\f$
*/
double qbarWeightX(Energy qtilde, double z);
//@}
/**
* ????
*/
double u(double);
/**
* Vector and axial vector parts of the matrix element
*/
//@{
/**
* Vector part of the matrix element
*/
double MEV(double, double);
/**
* Axial vector part of the matrix element
*/
double MEA(double, double);
/**
* The matrix element, given \f$x_1\f$, \f$x_2\f$.
* @param x1 \f$x_1\f$
* @param x2 \f$x_2\f$
*/
double PS(double x1, double x2);
//@}
protected:
/**
* Real emission term, for use in generating the hardest emission
*/
double calculateRealEmission(double x1, double x2,
vector<PPtr> hardProcess,
double phi,
bool subtract,
int emitter) const;
/**
* Real emission term, for use in generating the hardest emission
*/
double calculateRealEmission(double x1, double x2,
vector<PPtr> hardProcess,
double phi,
bool subtract) const;
/**
* Check the sign of the momentum in the \f$z\f$-direction is correct.
*/
bool checkZMomenta(double x1, double x2, double x3, double y, Energy pT) const;
/**
* Calculate the Jacobian
*/
InvEnergy calculateJacobian(double x1, double x2, Energy pT) const;
/**
* Calculate the ratio between NLO & LO ME
*/
double meRatio(vector<cPDPtr> partons,
vector<Lorentz5Momentum> momenta,
unsigned int iemitter,bool subtract) const;
/**
* Calculate matrix element ratio R/B
*/
virtual double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
const ParticleVector & decay3, MEOption meopt,
ShowerInteraction inter);
/**
* Calculate the LO ME
*/
double loME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta) const;
/**
* Calculate the NLO real emission piece of ME
*/
InvEnergy2 realME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta,
ShowerInteraction inter) const;
/**
* Generate a real emission event
*/
bool getEvent(vector<PPtr> hardProcess);
private:
/**
* Private and non-existent assignment operator.
*/
- SMZDecayer & operator=(const SMZDecayer &);
+ SMZDecayer & operator=(const SMZDecayer &) = delete;
private:
/**
* Pointer to the fermion-antifermion Z vertex
*/
FFVVertexPtr FFZVertex_;
/**
* Pointer to the photon vertex
*/
AbstractFFVVertexPtr FFPVertex_;
/**
* Pointer to the fermion-antifermion G vertex
*/
AbstractFFVVertexPtr FFGVertex_;
/**
* maximum weights for the different integrations
*/
//@{
/**
* Weights for the Z to quarks decays.
*/
vector<double> quarkWeight_;
/**
* Weights for the Z to leptons decays.
*/
vector<double> leptonWeight_;
//@}
/**
* Spin density matrix for the decay
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decay
*/
mutable vector<VectorWaveFunction> _vectors;
/**
* Spinors for the decay
*/
mutable vector<SpinorWaveFunction> _wave;
/**
* Barred spinors for the decay
*/
mutable vector<SpinorBarWaveFunction> _wavebar;
private:
/**
* CM energy
*/
Energy d_Q_;
/**
* Quark mass
*/
Energy d_m_;
/**
* The rho parameter
*/
double d_rho_;
/**
* The v parameter
*/
double d_v_;
/**
* The initial kappa-tilde values for radiation from the quark
*/
double d_kt1_;
/**
* The initial kappa-tilde values for radiation from the antiquark
*/
double d_kt2_;
/**
* Cut-off parameter
*/
static const double EPS_;
private:
/**
* The colour factor
*/
double CF_;
/**
* The Z mass
*/
mutable Energy mZ_;
/**
* The reduced mass
*/
mutable double mu_;
/**
* The square of the reduced mass
*/
mutable double mu2_;
/**
* The strong coupling
*/
mutable double aS_;
/**
* The scale
*/
mutable Energy2 scale_;
/**
* Stuff for the POWHEG correction
*/
//@{
/**
* ParticleData object for the gluon
*/
tcPDPtr gluon_;
/**
* The ParticleData objects for the fermions
*/
vector<tcPDPtr> partons_;
/**
* The fermion momenta
*/
vector<Lorentz5Momentum> quark_;
/**
* The momentum of the radiated gauge boson
*/
Lorentz5Momentum gauge_;
/**
* The Z boson
*/
PPtr zboson_;
/**
* Higgs mass squared
*/
Energy2 mz2_;
//@}
/**
* Whether or not to give an LO or NLO normalisation
*/
bool NLO_;
};
}
#endif /* HERWIG_SMZDecayer_H */
diff --git a/Decay/PerturbativeDecayer.h b/Decay/PerturbativeDecayer.h
--- a/Decay/PerturbativeDecayer.h
+++ b/Decay/PerturbativeDecayer.h
@@ -1,345 +1,345 @@
// -*- C++ -*-
#ifndef Herwig_PerturbativeDecayer_H
#define Herwig_PerturbativeDecayer_H
//
// This is the declaration of the PerturbativeDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Shower/ShowerAlpha.h"
#include "Herwig/Shower/ShowerInteraction.h"
namespace Herwig {
using namespace ThePEG;
/**
* The PerturbativeDecayer class is the base class for perturbative decays in
* Herwig and implements the functuality for the POWHEG corrections
*
* @see \ref PerturbativeDecayerInterfaces "The interfaces"
* defined for PerturbativeDecayer.
*/
class PerturbativeDecayer: public DecayIntegrator {
protected:
/**
* Type of dipole
*/
enum dipoleType {FFa, FFc, IFa, IFc, IFba, IFbc, FFg};
/**
* Phase-space region for an emission (assumes \f$a\to b,c\f$
*/
enum phaseSpaceRegion {emissionFromB,emissionFromC,emissionFromA1,emissionFromA2,deadZone};
/**
* Type of dipole
*/
struct DipoleType {
DipoleType() {}
DipoleType(dipoleType a, ShowerInteraction b)
: type(a), interaction(b)
{}
dipoleType type;
ShowerInteraction interaction;
};
public:
/**
* The default constructor.
*/
PerturbativeDecayer() : inter_(ShowerInteraction::QCD),
pTmin_(GeV), useMEforT2_(true),
C_(5.), ymax_(10.), phaseOpt_(1),
pT_(ZERO),mb_(ZERO), e_(0.),
s_(0.), e2_(0.), s2_(0.), enhance_(1.)
{}
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return No;}
/**
* Member to generate the hardest emission in the POWHEG scheme
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr);
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate matrix element ratio \f$\frac{M^2}{\alpha_S}\frac{|\overline{\rm{ME}}_3|}{|\overline{\rm{ME}}_2|}\f$
*/
virtual double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
const ParticleVector & decay3, MEOption meopt,
ShowerInteraction inter);
/**
* Work out the type of process
*/
bool identifyDipoles(vector<DipoleType> & dipoles,
PPtr & aProgenitor,
PPtr & bProgenitor,
PPtr & cProgenitor,
ShowerInteraction inter) const;
/**
* Coupling for the generation of hard QCD radiation
*/
ShowerAlphaPtr alphaS() {return alphaS_;}
/**
* Coupling for the generation of hard QED radiation
*/
ShowerAlphaPtr alphaEM() {return alphaEM_;}
/**
* Return the momenta including the hard emission
*/
vector<Lorentz5Momentum> hardMomenta(PPtr in, PPtr emitter,
PPtr spectator,
const vector<DipoleType> & dipoles,
int i, bool inDeadZone);
/**
* Calculate momenta of all the particles
*/
bool calcMomenta(int j, Energy pT, double y, double phi, double& xg,
double& xs, double& xe, double& xe_z,
vector<Lorentz5Momentum>& particleMomenta);
/**
* Check the calculated momenta are physical
*/
bool psCheck(const double xg, const double xs);
/**
* Return dipole corresponding to the DipoleType dipoleId
*/
pair<double,double> calculateDipole(const DipoleType & dipoleId,
const Particle & inpart,
const ParticleVector & decay3);
/**
* Return contribution to dipole that depends on the spin of the emitter
*/
double dipoleSpinFactor(tcPDPtr emitter, double z);
/**
* Return the colour coefficient of the dipole
*/
double colourCoeff(tcPDPtr emitter, tcPDPtr spectator,
tcPDPtr other, DipoleType dipole);
/**
* Set up the colour lines
*/
void getColourLines(RealEmissionProcessPtr real);
/**
* Generate a hard emission
*/
RealEmissionProcessPtr getHardEvent(RealEmissionProcessPtr born,
bool inDeadZone,
ShowerInteraction inter);
/**
* Is the \f$x_g,x_s\f$ point in the dead-zone for all the dipoles
*/
bool inTotalDeadZone(double xg, double xs,
const vector<DipoleType> & dipoles,
int i);
/**
* Is the \f$x_g,x_a\f$ point in the dead-zone for an initial-final colour connection
*/
phaseSpaceRegion inInitialFinalDeadZone(double xg, double xa, double a, double c) const;
/**
* Is the \f$x_b,x_c\f$ point in the dead-zone for a final-final colour connection
*/
phaseSpaceRegion inFinalFinalDeadZone(double xb, double xc, double b, double c) const;
/**
* For me corrections use the shower or me for the T2 region
*/
bool useMEforT2() const {return useMEforT2_;}
protected:
/**
* Access to the kinematics for inheriting classes
*/
//@{
/**
* Transverse momentum of the emission
*/
const Energy & pT() const { return pT_;}
/**
* Mass of decaying particle
*/
const Energy & mb() const {return mb_;}
/**
* Reduced mass of emitter child particle
*/
const double & e() const {return e_;}
/**
* Reduced mass of spectator child particle
*/
const double & s() const {return s_;}
/**
* Reduced mass of emitter child particle squared
*/
const double & e2() const {return e2_;}
/**
* Reduced mass of spectator child particle squared
*/
const double & s2() const {return s2_;}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PerturbativeDecayer & operator=(const PerturbativeDecayer &);
+ PerturbativeDecayer & operator=(const PerturbativeDecayer &) = delete;
private:
/**
* Members for the generation of the hard radiation
*/
//@{
/**
* Which types of radiation to generate
*/
ShowerInteraction inter_;
/**
* Coupling for the generation of hard QCD radiation
*/
ShowerAlphaPtr alphaS_;
/**
* Coupling for the generation of hard QED radiation
*/
ShowerAlphaPtr alphaEM_;
/**
* Minimum \f$p_T\f$
*/
Energy pTmin_;
/**
* This flag determines whether the T2 region in the decay shower
* (JHEP12(2003)_045) is populated by the ME correction (true) or
* the shower from the decaying particle.
*/
bool useMEforT2_;
/**
* Prefactor for the sampling
*/
double C_;
/**
* Maximum value for y
*/
double ymax_;
/**
* Option for phase-space sampling
*/
unsigned int phaseOpt_;
//@}
private:
/**
* Mmeber variables for the kinematics of the hard emission
*/
//@{
/**
* Transverse momentum of the emission
*/
Energy pT_;
/**
* Mass of decaying particle
*/
Energy mb_;
/**
* Reduced mass of emitter child particle
*/
double e_;
/**
* Reduced mass of spectator child particle
*/
double s_;
/**
* Reduced mass of emitter child particle squared
*/
double e2_;
/**
* Reduced mass of spectator child particle squared
*/
double s2_;
/**
* Enhancement prefactor for special cases
*/
mutable double enhance_;
//@}
};
}
#endif /* Herwig_PerturbativeDecayer_H */
diff --git a/Decay/Radiation/DecayRadiationGenerator.h b/Decay/Radiation/DecayRadiationGenerator.h
--- a/Decay/Radiation/DecayRadiationGenerator.h
+++ b/Decay/Radiation/DecayRadiationGenerator.h
@@ -1,70 +1,70 @@
// -*- C++ -*-
//
// DecayRadiationGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DecayRadiationGenerator_H
#define HERWIG_DecayRadiationGenerator_H
//
// This is the declaration of the DecayRadiationGenerator class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "Herwig/Decay/DecayIntegrator.fh"
#include "DecayRadiationGenerator.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The DecayRadiationGenerator class is the base class for classes generating
* QED radiation in particle decays in Herwig. Classes implementing specific
* algorithms must inherit from this class and implement the virtual generatePhotons
* member.
*
* @see \ref DecayRadiationGeneratorInterfaces "The interfaces"
* defined for DecayRadiationGenerator.
*/
class DecayRadiationGenerator: public Interfaced {
public:
/**
* Member to generate the photons in the decay. This must be implemented
* in classes inheriting from this one to produce the radiation.
* @param p The decaying particle
* @param children The decay products
* @param decayer The decayer which would normally generate this decay
* @return The decay products with additional radiation
*/
virtual ParticleVector generatePhotons(const Particle & p,
ParticleVector children,
tDecayIntegratorPtr decayer)=0;
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DecayRadiationGenerator & operator=(const DecayRadiationGenerator &);
+ DecayRadiationGenerator & operator=(const DecayRadiationGenerator &) = delete;
};
}
#endif /* HERWIG_DecayRadiationGenerator_H */
diff --git a/Decay/Radiation/FFDipole.h b/Decay/Radiation/FFDipole.h
--- a/Decay/Radiation/FFDipole.h
+++ b/Decay/Radiation/FFDipole.h
@@ -1,466 +1,466 @@
// -*- C++ -*-
//
// FFDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFDipole_H
#define HERWIG_FFDipole_H
//
// This is the declaration of the FFDipole class.
//
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/Decay/DecayIntegrator.fh"
#include "Herwig/Utilities/Kinematics.h"
#include "Herwig/Utilities/Maths.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Vectors/Lorentz5Vector.h"
#include "ThePEG/Interface/Interfaced.h"
#include "FFDipole.fh"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Constants::pi;
/** \ingroup Decay
*
* The FFDipole class generates radiation from a final-final dipole for
* the generation of photons in decay by the SOPTHY algorithm.
*
* @see SOPTHY
* @see \ref FFDipoleInterfaces "The interfaces"
* defined for FFDipole.
*/
class FFDipole: public Interfaced {
public:
/**
* The default constructor.
*/
FFDipole() :
_emin(1.e-6*MeV), _eminrest(100*MeV), _eminlab(100*MeV), _emax(),
_multiplicity(), _m(3), _charge(), _qdrf(2),
_qnewdrf(2), _qprf(2), _qnewprf(2), _qlab(2), _qnewlab(2), _dipolewgt(),
_yfswgt(), _jacobianwgt(), _mewgt(), _maxwgt(7.0), _mode(1), _maxtry(500),
_energyopt(1), _betaopt(4), _dipoleopt(), _nweight(0), _wgtsum(0.), _wgtsq(0.),
_weightOutput(false) {}
/**
* Destructor
*/
virtual ~FFDipole();
public:
/**
* Member to generate the photons from the dipole
* @param p The decaying particle
* @param children The decay products
* @param decayer The decayer for this mode
* @return The decay products with additional radiation
*/
virtual ParticleVector generatePhotons(const Particle & p,
ParticleVector children,
tDecayIntegratorPtr decayer);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Generate the momentum of a photon
* @param beta1 The velocity, \f$\beta_1\f$, of the first charged particle
* @param ombeta1 One minus the velocity, \f$1-\beta_1\f$, of the first
* charged particle which is supplied for numerical stability
* @param beta2 The velocity, \f$\beta_2\f$, of the second charged particle
* @param ombeta2 One minus the velocity, \f$1-\beta_2\f$, of the
* second charged particle which is supplied for numerical stability
* @return The contribution to the dipole weight
*/
double photon(double beta1,double ombeta1, double beta2, double ombeta2);
/**
* Calculate the exact weight for the dipole.
* @param beta1 Velocity of the first charged particle, \f$\beta_1\f$
* @param beta2 Velocity of the second charged particle, \f$\beta_2\f$.
* @param ombeta1 One minus the velocity of the first particle, \f$1-\beta_1\f$
* @param ombeta2 One minus the velocity of the second particle, \f$1-\beta_2\f$
* @param iphot The number of the photon for which the weight is required
* @return The weight
*/
double exactDipoleWeight(double beta1,double ombeta1,
double beta2,double ombeta2,unsigned int iphot) {
double opbc,ombc;
// if cos is greater than zero use result accurate as cos->1
if(_cosphot[iphot]>0) {
opbc=1.+beta2*_cosphot[iphot];
ombc=ombeta1+beta1*sqr(_sinphot[iphot])/(1.+_cosphot[iphot]);
}
// if cos is less than zero use result accurate as cos->-1
else {
opbc=ombeta2+beta2*sqr(_sinphot[iphot])/(1.-_cosphot[iphot]);
ombc=1.-beta1*_cosphot[iphot];
}
return 0.5/(opbc*ombc)*(1.+beta1*beta2
-0.5*ombeta1*(1.+beta1)*opbc/ombc
-0.5*ombeta2*(1.+beta2)*ombc/opbc);
}
/**
* Jacobian factor for the weight
*/
double jacobianWeight() {
Energy pcm1=Kinematics::pstarTwoBodyDecay(_m[0],_m[1],_m[2]);
Energy m12 =sqrt((_qnewdrf[0]+_qnewdrf[1]).m2()) ;
Energy pcm2=Kinematics::pstarTwoBodyDecay(m12,_m[1],_m[2]) ;
double betaprobeta = pcm2*_m[0]/pcm1/m12 ;
double spros = sqr(m12/_m[0]) ;
double deltafn = m12/(m12+_bigLdrf.e());
return betaprobeta*spros*deltafn ;
}
/**
* Matrix element weight
*/
double meWeight(const ParticleVector & children);
/**
* Member which generates the photons
* @param boost Boost vector to take the particles produced back from
* the decaying particle's rest frame to the lab
* @param children The decay products
*/
double makePhotons(const Boost & boost,
const ParticleVector & children);
/**
* Boost all the momenta from the dipole rest frame via the parent rest frame
* to the lab
* @param boost The boost vector from the rest frame to the lab
* @return Whether or not it suceeded
*/
bool boostMomenta(const Boost & boost);
/**
* Remove any photons which fail the energy cuts
* @return Number of photons removed
*/
unsigned int removePhotons();
/**
* The real emission weight in the collinear limit
*/
double collinearWeight(const ParticleVector & children);
/**
* The vrtiual correction weight
*/
double virtualWeight(const ParticleVector & children);
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFDipole & operator=(const FFDipole &);
+ FFDipole & operator=(const FFDipole &) = delete;
private:
/**
* Debug output
**/
void printDebugInfo(const Particle & p,
const ParticleVector & children,
double wgt) const;
private:
/**
* The minimum photon energy in the boosted frame
*/
Energy _emin;
/**
* The minimum photon energy in the rest frame
*/
Energy _eminrest;
/**
* The minimum photon energy in the lab frame
*/
Energy _eminlab;
/**
* The maximum photon energy
*/
Energy _emax;
/**
* Photon multiplicity being generated
*/
unsigned int _multiplicity;
/**
* Masses of the particles involved
*/
vector<Energy> _m;
/**
* Produce of the particles charges
*/
double _charge;
/**
* Momenta of the particles in the dipole rest frame
*/
//@{
/**
* Momenta of the charged particles in the dipole rest frame before radiation
*/
vector<Lorentz5Momentum> _qdrf;
/** * Momenta of the charged particles in the dipole rest frame after radiation
*/
vector<Lorentz5Momentum> _qnewdrf;
/**
* Momenta of the photons in the dipole rest frame
*/
vector<Lorentz5Momentum> _ldrf;
/**
* Total momentum of the photons in the dipole rest frame
*/
Lorentz5Momentum _bigLdrf;
//@}
/**
* Momentum of the particles in the parent's rest frame
*/
//@{
/**
* Momenta of the charged particles in the parent's rest frame before radiation
*/
vector<Lorentz5Momentum> _qprf;
/**
* Momenta of the charged particles in the parent's rest frame after radiation
*/
vector<Lorentz5Momentum> _qnewprf;
/**
* Momenta of the photons in the parent rest frame
*/
vector<Lorentz5Momentum> _lprf;
/**
* Total momentum of the photons in the parent rest frame
*/
Lorentz5Momentum _bigLprf;
//@}
/**
* Momentum of the particles in the lab frame
*/
//@{
/**
* Momenta of the charged particles in the lab frame before radiation
*/
vector<Lorentz5Momentum> _qlab;
/**
* Momenta of the charged particles in the lab frame after radiation
*/
vector<Lorentz5Momentum> _qnewlab;
/**
* Momenta of the photons in the lab frame
*/
vector<Lorentz5Momentum> _llab;
/**
* Total momentum of the photons in the lab frame
*/
Lorentz5Momentum _bigLlab;
//@}
/**
* Reweighting factors due to differences between the true and crude
* distributions
*/
//@{
/**
* Reweighting factor for the real emission
*/
double _dipolewgt;
/**
* Reweighting factor for the YFS form-factor
*/
double _yfswgt;
/**
* Reweighting factor due to phase space
*/
double _jacobianwgt;
/**
* Reweighting factor due to matrix element corrections
*/
double _mewgt;
/**
* Maximum weight
*/
double _maxwgt;
//@}
/**
* Angles of the photons with respect to the first charged particle
* which are stored for numerical accuracy
*/
//@{
/**
* Cosine of the photon angles
*/
vector<double> _cosphot;
/**
* Sine of the photon angles
*/
vector<double> _sinphot;
//@}
/**
* Weights for the individual photons
*/
vector<double> _photonwgt;
/**
* Whether a given photon passes the energy cut
*/
vector<bool> _photcut;
/**
* Type of unweighting to perform
*/
unsigned int _mode;
/**
* Maximum number of attempts to generate a result
*/
unsigned int _maxtry;
/**
* Option for the energy cut-off
*/
unsigned int _energyopt;
/**
* Option for the inclusion of higher order corrections
*/
unsigned int _betaopt;
/**
* Option for the form of the primary distribution
*/
unsigned int _dipoleopt;
/**
* The decayer
*/
tDecayIntegratorPtr _decayer;
/**
* The decaying particle
*/
tPPtr _parent;
/**
* Storage of averages etc for testing
*/
//@{
/**
* Number of attempts
*/
unsigned int _nweight;
/**
* Sum of weights
*/
double _wgtsum;
/**
* Sum of squares of weights
*/
double _wgtsq;
/**
* Whether or not to output the averages
*/
bool _weightOutput;
//@}
};
}
#endif /* HERWIG_FFDipole_H */
diff --git a/Decay/Radiation/IFDipole.h b/Decay/Radiation/IFDipole.h
--- a/Decay/Radiation/IFDipole.h
+++ b/Decay/Radiation/IFDipole.h
@@ -1,385 +1,385 @@
// -*- C++ -*-
//
// IFDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFDipole_H
#define HERWIG_IFDipole_H
//
// This is the declaration of the IFDipole class.
//
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "Herwig/Utilities/Maths.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Vectors/Lorentz5Vector.h"
#include "ThePEG/Interface/Interfaced.h"
#include "IFDipole.fh"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Constants::pi;
/** \ingroup Decay
*
* The IFDipole class generates radiation from a final-final dipole for
* the generation of photons in decay by the SOPTHY algorithm.
*
* @see SOPTHY
* @see \ref IFDipoleInterfaces "The interfaces"
* defined for IFDipole.
*/
class IFDipole: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFDipole() :
_alpha(), _emin(1.0*MeV), _emax(), _multiplicity(),
_map(2,0), _m(3), _chrg1(), _chrg2(), _qprf(2), _qnewprf(2),
_lprf(), _bigLprf(), _qlab(2), _qnewlab(2), _llab(), _bigLlab(),
_dipolewgt(), _yfswgt(), _jacobianwgt(), _mewgt(), _maxwgt(2.0),
_mode(1), _maxtry(500), _energyopt(1), _betaopt(1), _dipoleopt()
{}
//@}
public:
/**
* Member to generate the photons from the dipole
* @param p The decaying particle
* @param children The decay products
* @return The decay products with additional radiation
*/
virtual ParticleVector generatePhotons(const Particle & p,ParticleVector children);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Average crude photon multiplicity
* @param beta1 Velocity of the first charged particle, \f$\beta_1\f$.
* @param ombeta1 One minus the velocity of the first particle, \f$1-\beta_1\f$.
* @return The average photon multiplicity
*/
double nbar(double beta1,double ombeta1) {
return _alpha/pi*_chrg1*_chrg2/beta1*
log((1.+beta1)/ombeta1)*log(_emax/_emin);
}
/**
* Generate the momentum of a photon
* @param beta1 The velocity, \f$\beta_1\f$, of the first charged particle
* @param ombeta1 One minus the velocity, \f$1-\beta_1\f$, of the first
* charged particle which is supplied for numerical stability
* @return The contribution to the dipole weight
*/
double photon(double beta1,double ombeta1);
/**
* Calculate the exact weight for the dipole.
* @param beta1 Velocity of the first charged particle, \f$\beta_1\f$
* @param ombeta1 One minus the velocity of the first particle, \f$1-\beta_1\f$
* @param iphot The number of the photon for which the weight is required
* @return The weight
*/
double exactDipoleWeight(double beta1,double ombeta1,
unsigned int iphot) {
double ombc;
// if cos is greater than zero use result accurate as cos->1
if(_cosphot[iphot]>0.0)
ombc=ombeta1+beta1*sqr(_sinphot[iphot])/(1.+_cosphot[iphot]);
// if cos is less than zero use result accurate as cos->-1
else
ombc=1.-beta1*_cosphot[iphot];
return 1.0*sqr(beta1*_sinphot[iphot]/ombc);
}
/**
* The crude YFS form factor for calculating the weight
* @param b Velocity of the first charged particle, \f$\beta_1\f$
* @param omb One minus the velocity of the first particle, \f$1-\beta_1\f$
* @return The YFS form factor
*/
double crudeYFSFormFactor(double b,double omb) {
double Y =-_alpha/pi*_chrg1*_chrg2 / b * log((1.+b)/omb) * log(_m[0]/(2.*_emin));
return exp(Y);
}
/**
* The exact YFS form factor for calculating the weight
* @param beta1 Velocity of the first charged particle, \f$\beta_1\f$
* @param beta2 Velocity of the second charged particle, \f$\beta_2\f$.
* @param ombeta1 One minus the velocity of the first particle, \f$1-\beta_1\f$
* @param ombeta2 One minus the velocity of the second particle, \f$1-\beta_2\f$
* @return The YFS form factor
*/
double exactYFSFormFactor(double beta1,double ombeta1,
double beta2,double ombeta2);
/**
* Jacobian factor for the weight
*/
double jacobianWeight();
/**
* Matrix element weight
*/
double meWeight(ParticleVector children);
/**
* Member which generates the photons
* @param boost Boost vector to take the particles produced back from
* the decaying particle's rest frame to the lab
* @param children The decay products
*/
double makePhotons(Boost boost,ParticleVector children);
/**
* Compute a Lorentz transform from p to q
* @param p Original momentum
* @param q Final momentum
*/
LorentzRotation solveBoost(const Lorentz5Momentum & q,
const Lorentz5Momentum & p ) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFDipole & operator=(const IFDipole &);
+ IFDipole & operator=(const IFDipole &) = delete;
private:
/**
* the fine structure constant at $q^2=0$
*/
double _alpha;
/**
* The minimum photon energy
*/
Energy _emin;
/**
* The maximum photon energy
*/
Energy _emax;
/**
* Photon multiplicity being generated
*/
unsigned int _multiplicity;
/**
* Map from arguments of lists such that
* _q???[_map[0]] is the charged child and
* _q???[_map[1]] is the neutral child.
*/
vector<int> _map;
/**
* Masses of the particles involved
*/
vector<Energy> _m;
/**
* charge of the parent particle
*/
double _chrg1;
/**
* charge of the (charged) child particle
*/
double _chrg2;
/**
* Momentum of the particles in the parent's rest frame
*/
//@{
/**
* Momenta of the charged particles in the parent's rest frame before radiation
*/
vector<Lorentz5Momentum> _qprf;
/**
* Momenta of the charged particles in the parent's rest frame after radiation
*/
vector<Lorentz5Momentum> _qnewprf;
/**
* Momenta of the photons in the parent rest frame
*/
vector<Lorentz5Momentum> _lprf;
/**
* Total momentum of the photons in the parent rest frame
*/
Lorentz5Momentum _bigLprf;
//@}
/**
* Momentum of the particles in the lab frame
*/
//@{
/**
* Momenta of the charged particles in the lab frame before radiation
*/
vector<Lorentz5Momentum> _qlab;
/**
* Momenta of the charged particles in the lab frame after radiation
*/
vector<Lorentz5Momentum> _qnewlab;
/**
* Momenta of the photons in the lab frame
*/
vector<Lorentz5Momentum> _llab;
/**
* Total momentum of the photons in the lab frame
*/
Lorentz5Momentum _bigLlab;
//@}
/**
* Reweighting factors due to differences between the true and crude
* distributions
*/
//@{
/**
* Reweighting factor for the real emission
*/
double _dipolewgt;
/**
* Reweighting factor for the YFS form-factor
*/
double _yfswgt;
/**
* Reweighting factor due to phase space
*/
double _jacobianwgt;
/**
* Reweighting factor due to matrix element corrections
*/
double _mewgt;
/**
* Maximum weight
*/
double _maxwgt;
//@}
/**
* Angles of the photons with respect to the first charged particle
* which are stored for numerical accuracy
*/
//@{
/**
* Cosine of the photon angles
*/
vector<double> _cosphot;
/**
* Sine of the photon angles
*/
vector<double> _sinphot;
//@}
/**
* Type of unweighting to perform
*/
unsigned int _mode;
/**
* Maximum number of attempts to generate a result
*/
unsigned int _maxtry;
/**
* Option for the energy cut-off
*/
unsigned int _energyopt;
/**
* Option for the inclusion of higher order corrections
*/
unsigned int _betaopt;
/**
* Option for the form of the primary distribution
*/
unsigned int _dipoleopt;
};
}
#endif /* HERWIG_IFDipole_H */
diff --git a/Decay/Radiation/QEDRadiationHandler.cc b/Decay/Radiation/QEDRadiationHandler.cc
--- a/Decay/Radiation/QEDRadiationHandler.cc
+++ b/Decay/Radiation/QEDRadiationHandler.cc
@@ -1,174 +1,174 @@
// -*- C++ -*-
//
// QEDRadiationHandler.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the QEDRadiationHandler class.
//
#include "QEDRadiationHandler.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "DecayRadiationGenerator.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Handlers/EventHandler.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/PDT/DecayMode.h"
using namespace Herwig;
namespace {
/**
* A struct to order the particles in the same way as in the DecayMode's
*/
struct ParticleOrdering {
/**
* Operator for the ordering
* @param p1 The first ParticleData object
* @param p2 The second ParticleData object
*/
- bool operator()(cPDPtr p1, cPDPtr p2) {
+ bool operator()(cPDPtr p1, cPDPtr p2) const {
return abs(p1->id()) > abs(p2->id()) ||
( abs(p1->id()) == abs(p2->id()) && p1->id() > p2->id() ) ||
( p1->id() == p2->id() && p1->fullName() > p2->fullName() );
}
};
/**
* A set of ParticleData objects ordered as for the DecayMode's
*/
typedef multiset<cPDPtr,ParticleOrdering> OrderedParticles;
}
QEDRadiationHandler::QEDRadiationHandler() {
// only include electroweak gauge bosons
_decayingParticles.push_back( 22);
_decayingParticles.push_back( 23);
_decayingParticles.push_back( 24);
_decayingParticles.push_back(-24);
// only include the charged leptons
_decayProducts.push_back( 11);
_decayProducts.push_back( 13);
_decayProducts.push_back( 15);
_decayProducts.push_back(-11);
_decayProducts.push_back(-13);
_decayProducts.push_back(-15);
}
void QEDRadiationHandler::
handle(EventHandler & eh, const tPVector & tagged,
const Hint &) {
// find the potential decaying particles to be considered
set<tPPtr> parents;
for(unsigned int ix=0;ix<tagged.size();++ix) {
long id=tagged[ix]->id();
if(find(_decayProducts.begin(),_decayProducts.end(),id)!=_decayProducts.end()) {
PPtr par=tagged[ix]->parents()[0];
id=par->id();
if(tagged[ix]->parents()[0]->mass()>ZERO&&
find(_decayingParticles.begin(),_decayingParticles.end(),id)!=
_decayingParticles.end()) parents.insert(par);
}
}
set<tPPtr>::const_iterator sit;
StepPtr step=eh.currentStep();
// loop over parents
for(sit=parents.begin();sit!=parents.end();++sit) {
// extract children
ParticleVector children=(**sit).children();
// store number of children
unsigned int initsize = children.size();
// boost the decay to the parent rest frame
Boost boost = - (**sit).momentum().boostVector();
(**sit).deepBoost(boost);
// construct the tag for the decay mode to find the decayer
OrderedParticles products;
for(unsigned int ix=0;ix<children.size();++ix)
products.insert(children[ix]->dataPtr());
string tag = (**sit).dataPtr()->name() + "->";
unsigned int iprod=0;
for(OrderedParticles::const_iterator it = products.begin();
it != products.end(); ++it) {
++iprod;
tag += (**it).name();
if(iprod != initsize) tag += ",";
}
tag += ";";
tDMPtr dm = generator()->findDecayMode(tag);
tDecayIntegratorPtr decayer;
if(dm) {
tDecayerPtr dtemp = dm->decayer();
decayer = dynamic_ptr_cast<tDecayIntegratorPtr>(dtemp);
bool cc;
tPDVector ctemp;
for(unsigned int ix=0;ix<children.size();++ix)
ctemp.push_back(const_ptr_cast<tPDPtr>(children[ix]->dataPtr()));
unsigned int imode = decayer->modeNumber(cc,(**sit).dataPtr(),ctemp);
decayer->me2(imode,**sit,children,DecayIntegrator::Initialize);
}
// generate photons
ParticleVector newchildren =
_generator->generatePhotons(**sit,children,decayer);
// if photons produced add as children and to step
for(unsigned int ix=initsize;ix<newchildren.size();++ix) {
(**sit).addChild(newchildren[ix]);
step->addDecayProduct(newchildren[ix]);
}
(**sit).deepBoost(-boost);
}
}
void QEDRadiationHandler::persistentOutput(PersistentOStream & os) const {
os << _generator << _decayingParticles << _decayProducts;
}
void QEDRadiationHandler::persistentInput(PersistentIStream & is, int) {
is >> _generator >> _decayingParticles >> _decayProducts;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<QEDRadiationHandler,StepHandler>
describeHerwigQEDRadiationHandler("Herwig::QEDRadiationHandler", "Herwig.so");
void QEDRadiationHandler::Init() {
static ClassDocumentation<QEDRadiationHandler> documentation
("The QEDRadiationHandler class is designed to be used as a PostSubProcessHandler"
"so that the same approach as for radiation in decays can be used for resonances"
"produced as part of the hard process");
static Reference<QEDRadiationHandler,DecayRadiationGenerator>
interfaceRadiationGenerator
("RadiationGenerator",
"Reference to the DecayRadiationGenerator",
&QEDRadiationHandler::_generator, false, false, true, false, false);
static ParVector<QEDRadiationHandler,long> interfaceDecayingParticles
("DecayingParticles",
"List of PDF codes of the particles which should have radiation"
" generated for them.",
&QEDRadiationHandler::_decayingParticles, -1, long(24), 0, 0,
false, false, Interface::nolimits);
static ParVector<QEDRadiationHandler,long> interfaceDecayProducts
("DecayProducts",
"List of PDG codes of the particles which should be present"
" as decay products for the radiation to be generated.",
&QEDRadiationHandler::_decayProducts, -1, long(11), 0, 0,
false, false, Interface::nolimits);
}
diff --git a/Decay/Radiation/QEDRadiationHandler.h b/Decay/Radiation/QEDRadiationHandler.h
--- a/Decay/Radiation/QEDRadiationHandler.h
+++ b/Decay/Radiation/QEDRadiationHandler.h
@@ -1,143 +1,143 @@
// -*- C++ -*-
//
// QEDRadiationHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_QEDRadiationHandler_H
#define HERWIG_QEDRadiationHandler_H
//
// This is the declaration of the QEDRadiationHandler class.
//
#include "ThePEG/Handlers/StepHandler.h"
#include "DecayRadiationGenerator.fh"
#include "QEDRadiationHandler.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The QEDRadiationHandler class is designed so that the approach
* for the generation of QED radiation in decays can be used to generate
* QED radiation from the decay products of \f$s\f$-channel resonances
* produced in the hard process where the decay products of the resonance
* have been generated as part of the hard process.
*
* It is designed to be used as a PostSubProcessHandler.
*
* @see \ref QEDRadiationHandlerInterfaces "The interfaces"
* defined for QEDRadiationHandler.
*/
class QEDRadiationHandler: public StepHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
QEDRadiationHandler();
//@}
public:
/** @name Virtual functions required by the StepHandler class. */
//@{
/**
* The main function called by the EventHandler class to
* perform a step. Given the current state of an Event, this function
* performs the event generation step and includes the result in a new
* Step object int the Event record.
* @param eh the EventHandler in charge of the Event generation.
* @param tagged if not empty these are the only particles which should
* be considered by the StepHandler.
* @param hint a Hint object with possible information from previously
* performed steps.
* @throws Veto if the StepHandler requires the current step to be discarded.
* @throws Stop if the generation of the current Event should be stopped
* after this call.
* @throws Exception if something goes wrong.
*/
virtual void handle(EventHandler & eh, const tPVector & tagged,
const Hint & hint);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- QEDRadiationHandler & operator=(const QEDRadiationHandler &);
+ QEDRadiationHandler & operator=(const QEDRadiationHandler &) = delete;
private:
/**
* Pointer to the object responsible for generating the radiation in
* the decays
*/
DecayRadiationGeneratorPtr _generator;
/**
* List of the PDG codes of the decaying particles which should be considered
*/
vector<long> _decayingParticles;
/**
* List of the PDG codes of the decay products which should be considered
*/
vector<long> _decayProducts;
};
}
#endif /* HERWIG_QEDRadiationHandler_H */
diff --git a/Decay/Radiation/SOPHTY.h b/Decay/Radiation/SOPHTY.h
--- a/Decay/Radiation/SOPHTY.h
+++ b/Decay/Radiation/SOPHTY.h
@@ -1,121 +1,121 @@
// -*- C++ -*-
//
// SOPHTY.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SOPHTY_H
#define HERWIG_SOPHTY_H
//
// This is the declaration of the SOPHTY class.
//
#include "DecayRadiationGenerator.h"
#include "FFDipole.fh"
#include "IFDipole.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* Here is the documentation of the SOPHTY class.
*
* @see \ref SOPHTYInterfaces "The interfaces"
* defined for SOPHTY.
*/
class SOPHTY: public DecayRadiationGenerator {
public:
/**
* Default constructor
*/
SOPHTY() : colouredOption_(0) {}
/**
* Member to generate the photons in the decay. This must be implemented
* in classes inheriting from this one to produce the radiation.
* @param p The decaying particle
* @param children The decay products
* @param decayer The decayer for with decay mode
* @return The decay products with additional radiation
*/
virtual ParticleVector generatePhotons(const Particle & p,ParticleVector children,
tDecayIntegratorPtr decayer);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SOPHTY & operator=(const SOPHTY &);
+ SOPHTY & operator=(const SOPHTY &) = delete;
private:
/**
* The final-final dipole
*/
FFDipolePtr FFDipole_;
/**
* The initial-final dipole
*/
IFDipolePtr IFDipole_;
/**
* Option for the treatment of radiation from coloured particles
*/
unsigned int colouredOption_;
};
}
#endif /* HERWIG_SOPHTY_H */
diff --git a/Decay/ScalarMeson/DtoKPiPiCLEO.cc b/Decay/ScalarMeson/DtoKPiPiCLEO.cc
--- a/Decay/ScalarMeson/DtoKPiPiCLEO.cc
+++ b/Decay/ScalarMeson/DtoKPiPiCLEO.cc
@@ -1,1150 +1,1150 @@
// -*- C++ -*-
//
// DtoKPiPiCLEO.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the DtoKPiPiCLEO class.
//
#include "DtoKPiPiCLEO.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using ThePEG::Helicity::ScalarWaveFunction;
using ThePEG::Helicity::incoming;
using ThePEG::Helicity::outgoing;
DtoKPiPiCLEO::DtoKPiPiCLEO() : _c1NR(), _c1rho(), _c1Kstarm(), _c1Kstar0(),
_c1K1430m(), _c1K14300(), _c1rho1700(), _c1K1680(),
_c2Kstarp(), _c2rho(), _c2omega(), _c2Kstarm(),
_c2f980(), _c2f2(), _c2f1370(), _c2K14300(),
_c2K14302(), _c2K1680(), _c2NR(), _rD0(), _rres() {
// use local values for masses and widths
_localparameters=true;
// masses and widths
_momega = 782.57*MeV; _womega = 8.44*MeV;
_mf2 = 1275.4 *MeV; _wf2 = 185.1 *MeV;
_mf1370 = 1310 *MeV; _wf1370 = 272.0 *MeV;
_mK14300 = 1412 *MeV; _wK14300 = 294 *MeV;
_mK14302 = 1425.6 *MeV; _wK14302 = 98.5 *MeV;
_mK1680 = 1717 *MeV; _wK1680 = 322 *MeV;
_mrho1700 = 1700 *MeV; _wrho1700 = 240 *MeV;
_mK8920 = 896.1 *MeV; _wK8920 = 50.5 *MeV;
_mK892A = 891.5 *MeV; _wK892A = 50 *MeV;
_mK892B = 891.66*MeV; _wK892B = 50.8 *MeV;
_mrhoA = 770 *MeV; _wrhoA = 150.7 *MeV;
_mrhoB = 769.3 *MeV; _wrhoB = 150.2 *MeV;
_mf980 = 977.00*MeV; _wf980 = 50. *MeV;
_f0opt=false; _gpi=0.09; _gK=0.02;
// amplitudes and phases for D0 -> K-pi+pi0
_a1NR = 1.75 ; _phi1NR = 31.2;
_a1rho = 1.00 ; _phi1rho = 0. ;
_a1Kstarm = 0.44 ; _phi1Kstarm = 163 ;
_a1Kstar0 = 0.39 ; _phi1Kstar0 = -0.2;
_a1K1430m = 0.77*GeV2; _phi1K1430m = 55.5;
_a1K14300 = 0.85*GeV2; _phi1K14300 = 166 ;
_a1rho1700 = 2.50 ; _phi1rho1700 = 171 ;
_a1K1680 = 2.50 ; _phi1K1680 = 103 ;
// amplitudes and phases for D0 -> K0pi+pi-
_a2Kstarp = 0.11 ; _phi2Kstarp = 321;
_a2rho = 1.00 ; _phi2rho = 0;
_a2omega = 0.037 ; _phi2omega = 114;
_a2Kstarm = 1.56 ; _phi2Kstarm = 150;
_a2f980 = 0.34*GeV2; _phi2f980 = 188;
_a2f2 = 0.7/GeV2 ; _phi2f2 = 308;
_a2f1370 = 1.8*GeV2 ; _phi2f1370 = 85;
_a2K14300 = 2.0*GeV2 ; _phi2K14300 = 3;
_a2K14302 = 1.0/GeV2 ; _phi2K14302 = 335;
_a2K1680 = 5.6 ; _phi2K1680 = 174;
_a2NR = 1.1 ; _phi2NR = 340;
// radial sizes
_rD0 = 5.0/GeV;
_rres = 1.5/GeV;
// zero masses
_mpi=ZERO;
_mkp=ZERO;
_mk0=ZERO;
// intermediates
generateIntermediates(true);
}
void DtoKPiPiCLEO::doinit() {
DecayIntegrator::doinit();
// complex amplitudes for K-pi+pi0
double fact = Constants::pi/180.;
_c1NR = _a1NR *Complex(cos(_phi1NR *fact),sin(_phi1NR *fact));
_c1rho = _a1rho *Complex(cos(_phi1rho *fact),sin(_phi1rho *fact));
_c1Kstarm = _a1Kstarm *Complex(cos(_phi1Kstarm *fact),sin(_phi1Kstarm *fact));
_c1Kstar0 = _a1Kstar0 *Complex(cos(_phi1Kstar0 *fact),sin(_phi1Kstar0 *fact));
_c1K1430m = _a1K1430m *Complex(cos(_phi1K1430m *fact),sin(_phi1K1430m *fact));
_c1K14300 = _a1K14300 *Complex(cos(_phi1K14300 *fact),sin(_phi1K14300 *fact));
_c1rho1700 = _a1rho1700*Complex(cos(_phi1rho1700*fact),sin(_phi1rho1700*fact));
_c1K1680 = _a1K1680 *Complex(cos(_phi1K1680 *fact),sin(_phi1K1680 *fact));
// complex amplitudes for D0 -> K0pi+pi-
_c2Kstarp = _a2Kstarp*Complex(cos(_phi2Kstarp*fact),sin(_phi2Kstarp*fact));
_c2rho = _a2rho *Complex(cos(_phi2rho *fact),sin(_phi2rho *fact));
_c2omega = _a2omega *Complex(cos(_phi2omega *fact),sin(_phi2omega *fact));
_c2Kstarm = _a2Kstarm*Complex(cos(_phi2Kstarm*fact),sin(_phi2Kstarm*fact));
_c2f980 = _a2f980 *Complex(cos(_phi2f980 *fact),sin(_phi2f980 *fact));
_c2f2 = _a2f2 *Complex(cos(_phi2f2 *fact),sin(_phi2f2 *fact));
_c2f1370 = _a2f1370 *Complex(cos(_phi2f1370 *fact),sin(_phi2f1370 *fact));
_c2K14300 = _a2K14300*Complex(cos(_phi2K14300*fact),sin(_phi2K14300*fact));
_c2K14302 = _a2K14302*Complex(cos(_phi2K14302*fact),sin(_phi2K14302*fact));
_c2K1680 = _a2K1680 *Complex(cos(_phi2K1680 *fact),sin(_phi2K1680 *fact));
_c2NR = _a2NR *Complex(cos(_phi2NR *fact),sin(_phi2NR *fact));
// pion and kaon masses
_mpi = getParticleData(ParticleID::piplus)->mass();
_mkp = getParticleData(ParticleID::Kplus )->mass();
_mk0 = getParticleData(ParticleID::K0 )->mass();
// resonances for the channels
tPDPtr k892m = getParticleData(ParticleID::Kstarminus);
tPDPtr k892p = getParticleData(ParticleID::Kstarplus);
tPDPtr k8920 = getParticleData(ParticleID::Kstarbar0);
tPDPtr rho770 = getParticleData(ParticleID::rhoplus);
tPDPtr rho0 = getParticleData(ParticleID::rho0);
tPDPtr rho1700 = getParticleData(30213);
tPDPtr k1680m = getParticleData(-30323);
tPDPtr k1430m0 = getParticleData(ParticleID::Kstar_0minus);
tPDPtr k1430m2 = getParticleData(ParticleID::Kstar_2minus);
tPDPtr k143000 = getParticleData(ParticleID::Kstar_0bar0 );
tPDPtr omega = getParticleData(ParticleID::omega);
tPDPtr f980 = getParticleData(9010221);
tPDPtr f1370 = getParticleData(10221);
tPDPtr f2 = getParticleData(ParticleID::f_2);
DecayPhaseSpaceChannelPtr newchannel;
// D0 -> K- pi+ pi0
tPDVector extpart(4);
extpart[0]=getParticleData(ParticleID::D0);
extpart[1]=getParticleData(ParticleID::Kminus);
extpart[2]=getParticleData(ParticleID::piplus);
extpart[3]=getParticleData(ParticleID::pi0);
DecayPhaseSpaceModePtr mode1 = new_ptr(DecayPhaseSpaceMode(extpart,this));
int ix=0;
if(rho770) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode1));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(rho770,0,0., 2,3);
mode1->addChannel(newchannel);
++ix;
}
if(k892m) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode1));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(k892m,0,0., 1,3);
mode1->addChannel(newchannel);
++ix;
}
if(k8920) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode1));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,3);
newchannel->addIntermediate(k8920,0,0., 1,2);
mode1->addChannel(newchannel);
++ix;
}
if(k1430m0) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode1));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(k1430m0,0,0., 1,3);
mode1->addChannel(newchannel);
++ix;
}
if(k143000) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode1));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,3);
newchannel->addIntermediate(k143000,0,0., 1,2);
mode1->addChannel(newchannel);
++ix;
}
if(rho1700) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode1));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(rho1700,0,0., 2,3);
mode1->addChannel(newchannel);
++ix;
}
if(k1680m) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode1));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(k1680m,0,0., 1,3);
mode1->addChannel(newchannel);
++ix;
}
// add the mode
vector<double> wtemp;
if(ix<=int(_weights.size())) {
vector<double>::const_iterator wit=_weights.begin();
wtemp=vector<double>(wit,wit+ix);
}
else {
wtemp=vector<double>(ix,1./double(ix));
}
if(_maxwgt.empty()) _maxwgt.push_back(1.);
addMode(mode1,_maxwgt[0],wtemp);
// D0 -> Kbar0 pi+ pi-
extpart[0]=getParticleData(ParticleID::D0);
extpart[1]=getParticleData(ParticleID::Kbar0);
extpart[2]=getParticleData(ParticleID::piplus);
extpart[3]=getParticleData(ParticleID::piminus);
DecayPhaseSpaceModePtr mode2 = new_ptr(DecayPhaseSpaceMode(extpart,this));
int iy=ix;
if(k892p) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,3);
newchannel->addIntermediate(k892p,0,0., 1,2);
mode2->addChannel(newchannel);
++iy;
}
if(rho0) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(rho0,0,0., 2,3);
mode2->addChannel(newchannel);
++iy;
}
if(omega) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(omega,0,0., 2,3);
mode2->addChannel(newchannel);
++iy;
}
if(k892m) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(k892m,0,0., 1,3);
mode2->addChannel(newchannel);
++iy;
}
if(f980) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(f980,0,0., 2,3);
mode2->addChannel(newchannel);
++iy;
}
if(f2) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(f2,0,0., 2,3);
mode2->addChannel(newchannel);
++iy;
}
if(f1370) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(f1370,0,0., 2,3);
mode2->addChannel(newchannel);
++iy;
}
if(k1430m0) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(k1430m0,0,0., 1,3);
mode2->addChannel(newchannel);
++iy;
}
if(k1430m2) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(k1430m2,0,0., 1,3);
mode2->addChannel(newchannel);
++iy;
}
if(k1680m) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode2));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(k1680m,0,0., 1,3);
mode2->addChannel(newchannel);
++iy;
}
// add the mode
if(iy<=int(_weights.size())) {
vector<double>::const_iterator wit=_weights.begin();
wtemp=vector<double>(wit+ix,wit+iy);
}
else {
wtemp=vector<double>(iy-ix,1./double(iy-ix));
}
if(_maxwgt.size()<2) _maxwgt.push_back(1.);
addMode(mode2,_maxwgt[1],wtemp);
if(!_localparameters) {
_momega = omega ->mass();
_mf980 = f980 ->mass();
_mf2 = f2 ->mass();
_mf1370 = f1370 ->mass();
_mK14300 = k1430m0->mass();
_mK14302 = k1430m2->mass();
_mK1680 = k1680m ->mass();
_mrho1700 = rho1700->mass();
_mK8920 = k8920 ->mass();
_mK892A = k892p ->mass();
_mK892B = k892p ->mass();
_mrhoA = rho770 ->mass();
_mrhoB = rho0 ->mass();
_womega = omega ->width();
_wf980 = f980 ->width();
_wf2 = f2 ->width();
_wf1370 = f1370 ->width();
_wK14300 = k1430m0->width();
_wK14302 = k1430m2->width();
_wK1680 = k1680m ->width();
_wrho1700 = rho1700->width();
_wK8920 = k8920 ->width();
_wK892A = k892p ->width();
_wK892B = k892p ->width();
_wrhoA = rho770 ->width();
_wrhoB = rho0 ->width();
}
else {
mode1->resetIntermediate(rho770 ,_mrhoA ,_wrhoA );
mode1->resetIntermediate(k892m ,_mK892A ,_wK892A );
mode1->resetIntermediate(k8920 ,_mK8920 ,_wK8920 );
mode1->resetIntermediate(k1430m0,_mK14300 ,_wK14300 );
mode1->resetIntermediate(k143000,_mK14300 ,_wK14300 );
mode1->resetIntermediate(rho1700,_mrho1700,_wrho1700);
mode1->resetIntermediate(k1680m ,_mK1680 ,_wK1680 );
mode2->resetIntermediate(k892p ,_mK892B ,_wK892B );
mode2->resetIntermediate(rho0 ,_mrhoB ,_wrhoB );
mode2->resetIntermediate(omega ,_momega ,_womega );
mode2->resetIntermediate(k892m ,_mK892B ,_wK892B );
mode2->resetIntermediate(f980 ,_mf980 ,_wf980 );
mode2->resetIntermediate(f2 ,_mf2 ,_wf2 );
mode2->resetIntermediate(f1370 ,_mf1370 ,_wf1370 );
mode2->resetIntermediate(k1430m0,_mK14300 ,_wK14300 );
mode2->resetIntermediate(k1430m2,_mK14302 ,_wK14302 );
mode2->resetIntermediate(k1680m ,_mK1680 ,_wK1680 );
}
}
void DtoKPiPiCLEO::persistentOutput(PersistentOStream & os) const {
os << ounit(_momega,GeV) << ounit(_womega,GeV) << ounit(_mf980,GeV)
<< _gpi << _gK << ounit(_mf2,GeV) << ounit(_wf2,GeV) << ounit(_mf1370,GeV)
<< ounit(_wf1370,GeV) << ounit(_mK14300,GeV) << ounit(_wK14300,GeV)
<< ounit(_mK14302,GeV) << ounit(_wK14302,GeV) << ounit(_mK1680,GeV)
<< ounit(_wK1680,GeV) << ounit(_mrho1700,GeV) << ounit(_wrho1700,GeV)
<< ounit(_mK8920,GeV) << ounit(_wK8920,GeV) << ounit(_mK892A,GeV)
<< ounit(_wK892A,GeV) << ounit(_mK892B,GeV) << ounit(_wK892B,GeV)
<< ounit(_mrhoA,GeV) << ounit(_wrhoA,GeV) << ounit(_mrhoB,GeV)
<< ounit(_wrhoB,GeV) << _a1NR << _phi1NR << _a1rho << _phi1rho
<< _a1Kstarm << _phi1Kstarm << _a1Kstar0 << _phi1Kstar0 << ounit(_a1K1430m,GeV2)
<< _phi1K1430m << ounit(_a1K14300,GeV2) << _phi1K14300 << _a1rho1700
<< _phi1rho1700 << _a1K1680 << _phi1K1680 << _c1NR << _c1rho << _c1Kstarm
<< _c1Kstar0 << ounit(_c1K1430m,GeV2) << ounit(_c1K14300,GeV2)
<< _c1rho1700 << _c1K1680 << _a2Kstarp << _phi2Kstarp << _a2rho
<< _phi2rho << _a2omega << _phi2omega << _a2Kstarm << _phi2Kstarm
<< ounit(_a2f980,GeV2) << _phi2f980 << ounit(_a2f2,1./GeV2) << _phi2f2
<< ounit(_a2f1370,GeV2) << _phi2f1370 << ounit(_a2K14300,GeV2) << _phi2K14300
<< ounit(_a2K14302,1./GeV2) << _phi2K14302 << _a2K1680 << _phi2K1680 << _a2NR
<< _phi2NR << _c2Kstarp << _c2rho << _c2omega << _c2Kstarm << ounit(_c2f980,GeV2)
<< ounit(_c2f2,1./GeV2) << ounit(_c2f1370,GeV2) << ounit(_c2K14300,GeV2)
<< ounit(_c2K14302,1./GeV2) << _c2K1680 << _c2NR << _maxwgt << _weights
<< ounit(_rD0,1./GeV) << ounit(_rres,1./GeV) << ounit(_mpi,GeV)
<< ounit(_mkp,GeV) << ounit(_mk0,GeV) << ounit(_wf980,GeV) << _f0opt
<< _localparameters;
}
void DtoKPiPiCLEO::persistentInput(PersistentIStream & is, int) {
is >> iunit(_momega,GeV) >> iunit(_womega,GeV) >> iunit(_mf980,GeV)
>> _gpi >> _gK >> iunit(_mf2,GeV) >> iunit(_wf2,GeV) >> iunit(_mf1370,GeV)
>> iunit(_wf1370,GeV) >> iunit(_mK14300,GeV) >> iunit(_wK14300,GeV)
>> iunit(_mK14302,GeV) >> iunit(_wK14302,GeV) >> iunit(_mK1680,GeV)
>> iunit(_wK1680,GeV) >> iunit(_mrho1700,GeV) >> iunit(_wrho1700,GeV)
>> iunit(_mK8920,GeV) >> iunit(_wK8920,GeV) >> iunit(_mK892A,GeV)
>> iunit(_wK892A,GeV) >> iunit(_mK892B,GeV) >> iunit(_wK892B,GeV)
>> iunit(_mrhoA,GeV) >> iunit(_wrhoA,GeV) >> iunit(_mrhoB,GeV)
>> iunit(_wrhoB,GeV) >> _a1NR >> _phi1NR >> _a1rho >> _phi1rho
>> _a1Kstarm >> _phi1Kstarm >> _a1Kstar0 >> _phi1Kstar0 >> iunit(_a1K1430m,GeV2)
>> _phi1K1430m >> iunit(_a1K14300,GeV2) >> _phi1K14300 >> _a1rho1700
>> _phi1rho1700 >> _a1K1680 >> _phi1K1680 >> _c1NR >> _c1rho >> _c1Kstarm
>> _c1Kstar0 >> iunit(_c1K1430m,GeV2) >> iunit(_c1K14300,GeV2)
>> _c1rho1700 >> _c1K1680 >> _a2Kstarp >> _phi2Kstarp >> _a2rho
>> _phi2rho >> _a2omega >> _phi2omega >> _a2Kstarm >> _phi2Kstarm
>> iunit(_a2f980,GeV2) >> _phi2f980 >> iunit(_a2f2,1./GeV2) >> _phi2f2
>> iunit(_a2f1370,GeV2) >> _phi2f1370 >> iunit(_a2K14300,GeV2) >> _phi2K14300
>> iunit(_a2K14302,1./GeV2) >> _phi2K14302 >> _a2K1680 >> _phi2K1680 >> _a2NR
>> _phi2NR >> _c2Kstarp >> _c2rho >> _c2omega >> _c2Kstarm >> iunit(_c2f980,GeV2)
>> iunit(_c2f2,1./GeV2) >> iunit(_c2f1370,GeV2) >> iunit(_c2K14300,GeV2)
>> iunit(_c2K14302,1./GeV2) >> _c2K1680 >> _c2NR >> _maxwgt >> _weights
>> iunit(_rD0,1./GeV) >> iunit(_rres,1./GeV) >> iunit(_mpi,GeV)
>> iunit(_mkp,GeV) >> iunit(_mk0,GeV) >> iunit(_wf980,GeV) >> _f0opt
>> _localparameters;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<DtoKPiPiCLEO,DecayIntegrator>
describeHerwigDtoKPiPiCLEO("Herwig::DtoKPiPiCLEO", "HwSMDecay.so");
void DtoKPiPiCLEO::Init() {
static ClassDocumentation<DtoKPiPiCLEO> documentation
("The DtoKPiPiCLEO class implements the models of CLEO for"
" D0 -> Kbar0 pi+pi- and D0 -> K- pi+ pi0",
"The CLEO fits of \\cite{Muramatsu:2002jp} and \\cite{Kopp:2000gv} were"
" used for the decays $D^0\\to\\bar{K}^0\\pi^+\\pi^-$ and"
" $D^0\\to K^-\\pi^+\\pi^0$.",
"\\bibitem{Muramatsu:2002jp} H.~Muramatsu {\\it et al.} "
"[CLEO Collaboration],Phys.\\ Rev.\\ Lett.\\ {\\bf 89} (2002) 251802"
"[Erratum-ibid.\\ {\\bf 90} (2003) 059901] [arXiv:hep-ex/0207067].\n"
"\\bibitem{Kopp:2000gv} S.~Kopp {\\it et al.} [CLEO Collaboration], "
"Phys.\\ Rev.\\ D {\\bf 63} (2001) 092001 [arXiv:hep-ex/0011065]."
);
static Switch<DtoKPiPiCLEO,bool> interfaceLocalParameters
("LocalParameters",
"Whether to use local values for the masses and widths or"
" those from the ParticleData objects",
&DtoKPiPiCLEO::_localparameters, true, false, false);
static SwitchOption interfaceLocalParametersLocal
(interfaceLocalParameters,
"Local",
"Use local values",
true);
static SwitchOption interfaceLocalParametersParticleData
(interfaceLocalParameters,
"ParticleData",
"Use the values from the ParticleData objects",
false);
static Parameter<DtoKPiPiCLEO,Energy> interfaceOmegaMass
("OmegaMass",
"The mass of the omega meson",
&DtoKPiPiCLEO::_momega, MeV, 782.57*MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacef980Mass
("f980Mass",
"The mass of the f_0(980) meson",
&DtoKPiPiCLEO::_mf980, MeV, 977.00*MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacef_2Mass
("f_2Mass",
"The mass of the f_2 meson",
&DtoKPiPiCLEO::_mf2, MeV, 1275.4 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacef1370Mass
("f1370Mass",
"The mass of the f_0(1370) meson",
&DtoKPiPiCLEO::_mf1370, MeV, 1310 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceK_01430Mass
("K_01430Mass",
"The mass of the K_0(1430) meson",
&DtoKPiPiCLEO::_mK14300, MeV, 1412 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceK_21430Mass
("K_21430Mass",
"The mass of the K_2(1430) meson",
&DtoKPiPiCLEO::_mK14302, MeV, 1425.6 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstar1680Mass
("Kstar1680Mass",
"The mass of the K*(1680) meson",
&DtoKPiPiCLEO::_mK1680, MeV, 1717 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacerho1700Mass
("rho1700Mass",
"The mass of the rho(1700) meson",
&DtoKPiPiCLEO::_mrho1700, MeV, 1700 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstar0892Mass
("Kstar0892Mass",
"The mass of the K*0(892) meson",
&DtoKPiPiCLEO::_mK8920, MeV, 896.1 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstarPlus892AMass
("KstarPlus892AMass",
"The mass of the K*+(892) meson in D0 -> K-pi+pi0",
&DtoKPiPiCLEO::_mK892A, MeV, 891.5 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstarPlus892BMass
("KstarPlus892BMass",
"The mass of the K*+(892) meson in D0 -> K0pi+pi-",
&DtoKPiPiCLEO::_mK892B, MeV, 891.66*MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacerhoPlusMass
("RhoPlusMass",
"The mass of the rho+ meson in D0 -> K-pi+pi0",
&DtoKPiPiCLEO::_mrhoA, MeV, 770 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacerho0Mass
("Rho0Mass",
"The mass of the rho+ meson in D0 -> K0pi+pi-",
&DtoKPiPiCLEO::_mrhoB, MeV, 769.3 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceOmegaWidth
("OmegaWidth",
"The width of the omega meson",
&DtoKPiPiCLEO::_womega, MeV, 8.44*MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacef980Width
("f980Width",
"The width of the f_0(980) meson",
&DtoKPiPiCLEO::_wf980, MeV, 50. *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacef_2Width
("f_2Width",
"The width of the f_2 meson",
&DtoKPiPiCLEO::_wf2, MeV, 185.1 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacef1370Width
("f1370Width",
"The width of the f_0(1370) meson",
&DtoKPiPiCLEO::_wf1370, MeV, 272.0 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceK_01430Width
("K_01430Width",
"The width of the K_0(1430) meson",
&DtoKPiPiCLEO::_wK14300, MeV, 294 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceK_21430Width
("K_21430Width",
"The width of the K_2(1430) meson",
&DtoKPiPiCLEO::_wK14302, MeV, 98.5 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstar1680Width
("Kstar1680Width",
"The width of the K*(1680) meson",
&DtoKPiPiCLEO::_wK1680, MeV, 322 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacerho1700Width
("rho1700Width",
"The width of the rho(1700) meson",
&DtoKPiPiCLEO::_wrho1700, MeV, 240 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstar0892Width
("Kstar0892Width",
"The width of the K*0(892) meson",
&DtoKPiPiCLEO::_wK8920, MeV, 50.5 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstarPlus892AWidth
("KstarPlus892AWidth",
"The width of the K*+(892) meson in D0 -> K-pi+pi0",
&DtoKPiPiCLEO::_wK892A, MeV, 50 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfaceKstarPlus892BWidth
("KstarPlus892BWidth",
"The width of the K*+(892) meson in D0 -> K0pi+pi-",
&DtoKPiPiCLEO::_wK892B, MeV, 50.8 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacerhoPlusWidth
("RhoPlusWidth",
"The width of the rho+ meson in D0 -> K-pi+pi0",
&DtoKPiPiCLEO::_wrhoA, MeV, 150.7 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy> interfacerho0Width
("Rho0Width",
"The width of the rho+ meson in D0 -> K0pi+pi-",
&DtoKPiPiCLEO::_wrhoB, MeV, 150.2 *MeV, ZERO, 10000.0*MeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfacegPi
("gPi",
"The g_pi coupling for the f_0(980) width",
&DtoKPiPiCLEO::_gpi, 0.09, 0.0, 1.,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfacegK
("gK",
"The g_K coupling for the f_0(980) width",
&DtoKPiPiCLEO::_gK, 0.02, 0.0, 1.,
false, false, Interface::limited);
static Switch<DtoKPiPiCLEO,bool> interfacef0Option
("f0Option",
"Option for the treatment of the f_0(980) width",
&DtoKPiPiCLEO::_f0opt, true, false, false);
static SwitchOption interfacef0OptionCoupled
(interfacef0Option,
"Coupled",
"Use the coupling pion and kaon channels",
true);
static SwitchOption interfacef0OptionSWave
(interfacef0Option,
"SWave",
"Use a simple s-wave running width",
false);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedNonResonantAmplitude
("ChargedNonResonantAmplitude",
"Amplitude for the non-resonant component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1NR, 1.75, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedNonResonantPhase
("ChargedNonResonantPhase",
"Phase for the non-resonant component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1NR, 31.2, -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedRhoAmplitude
("ChargedRhoAmplitude",
"Amplitude for the rho+ component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1rho, 1.0, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedRhoPhase
("ChargedRhoPhase",
"Phase for the rho+ component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1rho, 0.0, -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedKStarMinusAmplitude
("ChargedKStarMinusAmplitude",
"Amplitude for the K*(892)- component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1Kstarm, 0.44, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedKStarMinusPhase
("ChargedKStarMinusPhase",
"Phase for the K*(892)- component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1Kstarm, 163, -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedKStar0Amplitude
("ChargedKStar0Amplitude",
"Amplitude for the K*(892)0 component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1Kstar0, 0.39, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedKStar0Phase
("ChargedKStar0Phase",
"Phase for the K*(892)0 component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1Kstar0, -0.2, -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy2> interfaceChargedK_0MinusAmplitude
("ChargedK_0MinusAmplitude",
"Amplitude for the K_0(1430)- component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1K1430m, GeV2, 0.77*GeV2, ZERO, 10.0*GeV2,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedK_0MinusPhase
("ChargedK_0MinusPhase",
"Phase for the K_0(1430)- component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1K1430m, 55.5, -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy2> interfaceChargedK_00Amplitude
("ChargedK_00Amplitude",
"Amplitude for the K_0(1430)0 component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1K14300, GeV2, 0.85*GeV2, ZERO, 10.0*GeV2,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedK_00Phase
("ChargedK_00Phase",
"Phase for the K_0(1430)0 component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1K14300, 166, -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedRho1700Amplitude
("ChargedRho1700Amplitude",
"Amplitude for the rho1700+ component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1rho1700, 2.5, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedRho1700Phase
("ChargedRho1700Phase",
"Phase for the rho1700+ component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1rho1700, 171., -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedK1680MinusAmplitude
("ChargedK1680MinusAmplitude",
"Amplitude for the K*(1680)- component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_a1K1680, 2.5, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceChargedK1680MinusPhase
("ChargedK1680MinusPhase",
"Phase for the K*(1680)- component for D0 -> K- pi+ pi0",
&DtoKPiPiCLEO::_phi1K1680, 103, -180.0, 180.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralKStarPlusAmplitude
("NeutralKStarPlusAmplitude",
"Amplitude for the K*(892)+ component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2Kstarp, 0.11, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralKStarPlusPhase
("NeutralKStarPlusPhase",
"Phase for the K*(892)+ component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2Kstarp, 321., 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralRhoAmplitude
("NeutralRhoAmplitude",
"Amplitude for the rho0 component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2rho, 1.0, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralRhoPhase
("NeutralRhoPhase",
"Phase for the rho0 component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2rho, 0.0, 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralOmegaAmplitude
("NeutralOmegaAmplitude",
"Amplitude for the omega component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2omega, 0.037, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralOmegaPhase
("NeutralOmegaPhase",
"Phase for the omega component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2omega, 114., 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralKStarMinusAmplitude
("NeutralKStarMinusAmplitude",
"Amplitude for the K*(892)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2Kstarm, 1.56, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralKStarMinusPhase
("NeutralKStarMinusPhase",
"Phase for the K*(892)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2Kstarm, 150., 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy2> interfaceNeutralf980Amplitude
("Neutralf980Amplitude",
"Amplitude for the f_0(980) component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2f980, GeV2, 0.34*GeV2, ZERO, 10.0*GeV2,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralf980Phase
("Neutralf980Phase",
"Phase for the f_0(980) component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2f980, 188., 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,InvEnergy2> interfaceNeutralf2Amplitude
("Neutralf2Amplitude",
"Amplitude for the f_2 component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2f2, 1./GeV2, 0.7/GeV2, ZERO, 10.0/GeV2,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralf2Phase
("Neutralf2Phase",
"Phase for the f_0(2) component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2f2, 308., 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy2> interfaceNeutralf1370Amplitude
("Neutralf1370Amplitude",
"Amplitude for the f_0(1370) component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2f1370, GeV2, 1.8*GeV2, ZERO, 10.0*GeV2,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralf1370Phase
("Neutralf1370Phase",
"Phase for the f_0(1370) component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2f1370, 85., 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,Energy2> interfaceNeutralKK_0MinusAmplitude
("NeutralKK_0MinusAmplitude",
"Amplitude for the K_0(1430)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2K14300, GeV2, 2.0*GeV2, ZERO, 10.0*GeV2,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralKK_0MinusPhase
("NeutralKK_0MinusPhase",
"Phase for the K_0(1430)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2K14300, 3, 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,InvEnergy2> interfaceNeutralKK_2MinusAmplitude
("NeutralKK_2MinusAmplitude",
"Amplitude for the K_2(1430)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2K14302, 1./GeV2, 1.0/GeV2, ZERO, 10.0/GeV2,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralKK_2MinusPhase
("NeutralKK_2MinusPhase",
"Phase for the K_2(1430)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2K14302, 335, 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralK1680MinusAmplitude
("NeutralK1680MinusAmplitude",
"Amplitude for the K*(892)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2K1680, 5.6, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralK1680MinusPhase
("NeutralK1680MinusPhase",
"Phase for the K*(892)- component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2K1680, 174, 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralNonResonantAmplitude
("NeutralNonResonantAmplitude",
"Amplitude for the non-resonant component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_a2NR, 1.1, 0.0, 10.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,double> interfaceNeutralNonResonantPhase
("NeutralNonResonantPhase",
"Phase for the non-resonant component for D0 -> Kbar0 pi+ pi-",
&DtoKPiPiCLEO::_phi2NR, 340, 0.0, 360.0,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,InvEnergy> interfaceDRadius
("DRadius",
"The radius parameter for the Blatt-Weisskopf form-factor for the D",
&DtoKPiPiCLEO::_rD0, 1./GeV, 5./GeV, ZERO, 10./GeV,
false, false, Interface::limited);
static Parameter<DtoKPiPiCLEO,InvEnergy> interfaceResonanceRadius
("ResonanceRadius",
"The radius parameter for the Blatt-Weisskopf form-factor for the"
"intermediate resonances",
&DtoKPiPiCLEO::_rres, 1./GeV, 1.5/GeV, ZERO, 10./GeV,
false, false, Interface::limited);
static ParVector<DtoKPiPiCLEO,double> interfaceMaximumWeights
("MaximumWeights",
"The maximum weights for the unweighting of the decays",
&DtoKPiPiCLEO::_maxwgt, -1, 1.0, 0.0, 1.0e11,
false, false, Interface::limited);
static ParVector<DtoKPiPiCLEO,double> interfaceWeights
("Weights",
"The weights for the different channels for the phase-space integration",
&DtoKPiPiCLEO::_weights, -1, 1.0, 0.0, 1.0,
false, false, Interface::limited);
}
int DtoKPiPiCLEO::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
int id0(parent->id());
// incoming particle must be D0
if(abs(id0)!=ParticleID::D0) return -1;
cc = id0==ParticleID::Dbar0;
// must be three decay products
if(children.size()!=3) return -1;
tPDVector::const_iterator pit = children.begin();
unsigned int npip(0),npim(0),nkm(0),nk0(0),npi0(0);
for( ;pit!=children.end();++pit) {
id0=(**pit).id();
if(id0 ==ParticleID::piplus) ++npip;
else if(id0 ==ParticleID::pi0) ++npi0;
else if(id0 ==ParticleID::piminus) ++npim;
else if(abs(id0)==ParticleID::K0) ++nk0;
else if(id0 ==ParticleID::K_L0) ++nk0;
else if(id0 ==ParticleID::K_S0) ++nk0;
else if(abs(id0)==ParticleID::Kplus) ++nkm;
}
if(npim==1&&npip==1&&nk0==1) return 1;
else if(nkm==1&&(npip+npim)==1&&npi0==1) return 0;
else return -1;
}
double DtoKPiPiCLEO::me2(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,PDT::Spin0,PDT::Spin0,PDT::Spin0)));
useMe();
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
for(unsigned int ix=0;ix<3;++ix)
ScalarWaveFunction::constructSpinInfo(decay[ix],outgoing,true);
return 0.;
}
// compute the invariant masses needed to calulate the amplitudes
Energy mD = inpart.mass();
Energy mA = decay[0]->mass();
Energy mB = decay[1]->mass();
Energy mC = decay[2]->mass();
Energy mAB = (decay[0]->momentum()+decay[1]->momentum()).m();
Energy mAC = (decay[0]->momentum()+decay[2]->momentum()).m();
Energy mBC = (decay[1]->momentum()+decay[2]->momentum()).m();
// compute the amplitudes for the resonaces present in both models
Complex amp(0);
// calculate the matrix element
if(imode()==0) {
if(ichan<0) {
amp = _c1NR
+_c1rho *amplitude(1,false,mD,mB,mC,mA,mBC,mAB,mAC,_mrhoA ,_wrhoA )
+_c1rho1700 *amplitude(1,false,mD,mB,mC,mA,mBC,mAB,mAC,_mrho1700,_wrho1700)
+_c1Kstarm *amplitude(1,false,mD,mA,mC,mB,mAC,mAB,mBC,_mK892A ,_wK892A )
+_c1K1430m/GeV2*amplitude(0,false,mD,mA,mC,mB,mAC,mAB,mBC,_mK14300 ,_wK14300 )
+_c1K1680 *amplitude(1,false,mD,mA,mC,mB,mAC,mAB,mBC,_mK1680 ,_wK1680)
+_c1Kstar0 *amplitude(1,false,mD,mA,mB,mC,mAB,mAC,mBC,_mK8920 ,_wK8920 )
+_c1K14300/GeV2*amplitude(0,false,mD,mA,mB,mC,mAB,mAC,mBC,_mK14300 ,_wK14300 );
}
else if(ichan==0) {
amp= _c1rho *amplitude(1,false,mD,mB,mC,mA,mBC,mAB,mAC,_mrhoA ,_wrhoA );
}
else if(ichan==1) {
amp=_c1Kstarm *amplitude(1,false,mD,mA,mC,mB,mAC,mAB,mBC,_mK892A ,_wK892A ) ;
}
else if(ichan==2) {
amp=_c1Kstar0 *amplitude(1,false,mD,mA,mB,mC,mAB,mAC,mBC,_mK8920 ,_wK8920 ) ;
}
else if(ichan==3) {
amp=_c1K1430m/GeV2*amplitude(0,false,mD,mA,mC,mB,mAC,mAB,mBC,_mK14300 ,_wK14300 );
}
else if(ichan==4) {
amp=_c1K14300/GeV2*amplitude(0,false,mD,mA,mB,mC,mAB,mAC,mBC,_mK14300 ,_wK14300 );
}
else if(ichan==5) {
amp=_c1rho1700 *amplitude(1,false,mD,mB,mC,mA,mBC,mAB,mAC,_mrho1700,_wrho1700);
}
else if(ichan==6) {
amp=_c1K1680 *amplitude(1,false,mD,mA,mC,mB,mAC,mAB,mBC,_mK1680 ,_wK1680);
}
}
else {
if(ichan<0) {
amp = _c2NR
+_c2Kstarm *amplitude(1,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK892B ,_wK892B )
+Complex(_c2K14300/GeV2)*amplitude(0,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK14300,_wK14300)
+Complex(_c2K14302*GeV2)*amplitude(2,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK14302,_wK14302)
+_c2K1680 *amplitude(1,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK1680 ,_wK1680 )
+_c2Kstarp *amplitude(1,false ,mD,mA,mB,mC,mAB,mAC,mBC,_mK892B ,_wK892B )
+_c2rho *amplitude(1,false ,mD,mB,mC,mA,mBC,mAB,mAC,_mrhoB ,_wrhoB )
+_c2omega *amplitude(1,false ,mD,mB,mC,mA,mBC,mAB,mAC,_momega ,_womega )
+Complex(_c2f980/GeV2 )*amplitude(0,_f0opt,mD,mB,mC,mA,mBC,mAB,mAC,_mf980 ,_wf980 )
+Complex(_c2f1370/GeV2 )*amplitude(0,false ,mD,mB,mC,mA,mBC,mAB,mAC,_mf1370 ,_wf1370 )
+Complex(_c2f2*GeV2 )*amplitude(2,false ,mD,mB,mC,mA,mBC,mAB,mAC,_mf2 ,_wf2 );
}
else if(ichan==0) {
amp=_c2Kstarp *amplitude(1,false ,mD,mA,mB,mC,mAB,mAC,mBC,_mK892B ,_wK892B );
}
else if(ichan==1) {
amp=_c2rho *amplitude(1,false ,mD,mB,mC,mA,mBC,mAB,mAC,_mrhoB ,_wrhoB );
}
else if(ichan==2) {
amp=_c2omega *amplitude(1,false ,mD,mB,mC,mA,mBC,mAB,mAC,_momega ,_womega );
}
else if(ichan==3) {
amp=_c2Kstarm *amplitude(1,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK892B ,_wK892B );
}
else if(ichan==4) {
amp=_c2f980/GeV2 *amplitude(0,_f0opt,mD,mB,mC,mA,mBC,mAB,mAC,_mf980 ,_wf980 );
}
else if(ichan==5) {
- amp=_c2f2*GeV2 *amplitude(2,false ,mD,mB,mC,mA,mBC,mAB,mAC,_mf2 ,_wf2 );
+ amp=Complex(_c2f2*GeV2 *amplitude(2,false ,mD,mB,mC,mA,mBC,mAB,mAC,_mf2 ,_wf2 ));
}
else if(ichan==6) {
amp=_c2f1370/GeV2 *amplitude(0,false ,mD,mB,mC,mA,mBC,mAB,mAC,_mf1370 ,_wf1370 );
}
else if(ichan==7) {
amp=_c2K14300/GeV2*amplitude(0,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK14300,_wK14300);
}
else if(ichan==8) {
- amp=_c2K14302*GeV2*amplitude(2,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK14302,_wK14302);
+ amp=Complex(_c2K14302*GeV2*amplitude(2,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK14302,_wK14302));
}
else if(ichan==9) {
amp=_c2K1680 *amplitude(1,false ,mD,mA,mC,mB,mAC,mAB,mBC,_mK1680 ,_wK1680 );
}
}
// now compute the matrix element
(*ME())(0,0,0,0)=amp;
return norm(amp);
}
void DtoKPiPiCLEO::dataBaseOutput(ofstream & output, bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// parameters
output << "newdef " << name() << ":LocalParameters " << _localparameters << "\n";
output << "newdef " << name() << ":OmegaMass " << _momega/MeV << "\n";
output << "newdef " << name() << ":f980Mass " << _mf980/MeV << "\n";
output << "newdef " << name() << ":f_2Mass " << _mf2/MeV << "\n";
output << "newdef " << name() << ":f1370Mass " << _mf1370/MeV << "\n";
output << "newdef " << name() << ":K_01430Mass " << _mK14300/MeV << "\n";
output << "newdef " << name() << ":K_21430Mass " << _mK14302/MeV << "\n";
output << "newdef " << name() << ":Kstar1680Mass " << _mK1680/MeV << "\n";
output << "newdef " << name() << ":rho1700Mass " << _mrho1700/MeV << "\n";
output << "newdef " << name() << ":Kstar0892Mass " << _mK8920/MeV << "\n";
output << "newdef " << name() << ":KstarPlus892AMass " << _mK892A/MeV << "\n";
output << "newdef " << name() << ":KstarPlus892BMass " << _mK892B/MeV << "\n";
output << "newdef " << name() << ":RhoPlusMass " << _mrhoA/MeV << "\n";
output << "newdef " << name() << ":Rho0Mass " << _mrhoB/MeV << "\n";
output << "newdef " << name() << ":OmegaWidth " << _womega/MeV << "\n";
output << "newdef " << name() << ":f980Width " << _wf980/MeV << "\n";
output << "newdef " << name() << ":f_2Width " << _wf2/MeV << "\n";
output << "newdef " << name() << ":f1370Width " << _wf1370/MeV << "\n";
output << "newdef " << name() << ":K_01430Width " << _wK14300/MeV << "\n";
output << "newdef " << name() << ":K_21430Width " << _wK14302/MeV << "\n";
output << "newdef " << name() << ":Kstar1680Width " << _wK1680/MeV << "\n";
output << "newdef " << name() << ":rho1700Width " << _wrho1700/MeV << "\n";
output << "newdef " << name() << ":Kstar0892Width " << _wK8920/MeV << "\n";
output << "newdef " << name() << ":KstarPlus892AWidth " << _wK892A/MeV << "\n";
output << "newdef " << name() << ":KstarPlus892BWidth " << _wK892B/MeV << "\n";
output << "newdef " << name() << ":RhoPlusWidth " << _wrhoA/MeV << "\n";
output << "newdef " << name() << ":Rho0Width " << _wrhoB/MeV << "\n";
output << "newdef " << name() << ":gPi " << _gpi << "\n";
output << "newdef " << name() << ":gK " << _gK << "\n";
output << "newdef " << name() << ":f0Option " << _f0opt << "\n";
output << "newdef " << name() << ":ChargedNonResonantAmplitude " << _a1NR << "\n";
output << "newdef " << name() << ":ChargedNonResonantPhase " << _phi1NR<< "\n";
output << "newdef " << name() << ":ChargedRhoAmplitude " << _a1rho<< "\n";
output << "newdef " << name() << ":ChargedRhoPhase " << _phi1rho<< "\n";
output << "newdef " << name() << ":ChargedKStarMinusAmplitude " << _a1Kstarm<< "\n";
output << "newdef " << name() << ":ChargedKStarMinusPhase " << _phi1Kstarm<< "\n";
output << "newdef " << name() << ":ChargedKStar0Amplitude " << _a1Kstar0<< "\n";
output << "newdef " << name() << ":ChargedKStar0Phase " << _phi1Kstar0<< "\n";
output << "newdef " << name() << ":ChargedK_0MinusAmplitude "
<< _a1K1430m/GeV2 << "\n";
output << "newdef " << name() << ":ChargedK_0MinusPhase " << _phi1K1430m<< "\n";
output << "newdef " << name() << ":ChargedK_00Amplitude "
<< _a1K14300/GeV2 << "\n";
output << "newdef " << name() << ":ChargedK_00Phase " << _phi1K14300<< "\n";
output << "newdef " << name() << ":ChargedRho1700Amplitude " << _a1rho1700<< "\n";
output << "newdef " << name() << ":ChargedRho1700Phase " << _phi1rho1700<< "\n";
output << "newdef " << name() << ":ChargedK1680MinusAmplitude " << _a1K1680<< "\n";
output << "newdef " << name() << ":ChargedK1680MinusPhase " << _phi1K1680<< "\n";
output << "newdef " << name() << ":NeutralKStarPlusAmplitude " << _a2Kstarp<< "\n";
output << "newdef " << name() << ":NeutralKStarPlusPhase " << _phi2Kstarp<< "\n";
output << "newdef " << name() << ":NeutralRhoAmplitude " << _a2rho<< "\n";
output << "newdef " << name() << ":NeutralRhoPhase " << _phi2rho<< "\n";
output << "newdef " << name() << ":NeutralOmegaAmplitude " << _a2omega<< "\n";
output << "newdef " << name() << ":NeutralOmegaPhase " <<_phi2omega << "\n";
output << "newdef " << name() << ":NeutralKStarMinusAmplitude " << _a2Kstarm<< "\n";
output << "newdef " << name() << ":NeutralKStarMinusPhase " << _phi2Kstarm<< "\n";
output << "newdef " << name() << ":Neutralf980Amplitude " << _a2f980/GeV2<< "\n";
output << "newdef " << name() << ":Neutralf980Phase " << _phi2f980<< "\n";
output << "newdef " << name() << ":Neutralf2Amplitude " << _a2f2*GeV2<< "\n";
output << "newdef " << name() << ":Neutralf2Phase " << _phi2f2<< "\n";
output << "newdef " << name() << ":Neutralf1370Amplitude " << _a2f1370/GeV2<< "\n";
output << "newdef " << name() << ":Neutralf1370Phase " << _phi2f1370<< "\n";
output << "newdef " << name() << ":NeutralKK_0MinusAmplitude "
<< _a2K14300/GeV2 << "\n";
output << "newdef " << name() << ":NeutralKK_0MinusPhase " << _phi2K14300 << "\n";
output << "newdef " << name() << ":NeutralKK_2MinusAmplitude "
<< _a2K14302*GeV2<< "\n";
output << "newdef " << name() << ":NeutralKK_2MinusPhase " << _phi2K14302 << "\n";
output << "newdef " << name() << ":NeutralK1680MinusAmplitude " << _a2K1680<< "\n";
output << "newdef " << name() << ":NeutralK1680MinusPhase " << _phi2K1680<< "\n";
output << "newdef " << name() << ":NeutralNonResonantAmplitude " << _a2NR<< "\n";
output << "newdef " << name() << ":NeutralNonResonantPhase " << _phi2NR << "\n";
output << "newdef " << name() << ":DRadius " << _rD0*GeV << "\n";
output << "newdef " << name() << ":ResonanceRadius " << _rres*GeV << "\n";
for(unsigned int ix=0;ix<_maxwgt.size();++ix) {
output << "insert " << name() << ":MaximumWeights "
<< ix << " " << _maxwgt[ix] << "\n";
}
for(unsigned int ix=0;ix<_weights.size();++ix) {
output << "insert " << name() << ":Weights "
<< ix << " " << _weights[ix] << "\n";
}
if(header) {
output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
}
void DtoKPiPiCLEO::doinitrun() {
DecayIntegrator::doinitrun();
_weights.resize(mode(0)->numberChannels()+mode(1)->numberChannels());
_maxwgt.resize(2);
unsigned int iy=0;
for(unsigned int ix=0;ix<2;++ix) {
_maxwgt[ix]=mode(ix)->maxWeight();
for(unsigned int iz=0;iz<mode(ix)->numberChannels();++iz) {
_weights[iy]=mode(ix)->channelWeight(iz);
++iy;
}
}
}
Complex DtoKPiPiCLEO::amplitude(int ispin,bool f0, Energy mD,
Energy mA , Energy mB , Energy mC ,
Energy mAB, Energy mAC, Energy mBC,
Energy mres, Energy wres) const{
// compute the production momenta
Energy pDR = Kinematics::pstarTwoBodyDecay(mD,mres,mC);
Energy pDAB = Kinematics::pstarTwoBodyDecay(mD,mAB ,mC);
// and the decay momenta
Energy pAB = Kinematics::pstarTwoBodyDecay(mAB ,mA,mB);
Energy pR = Kinematics::pstarTwoBodyDecay(mres,mA,mB);
double Fd(1.),Fr(1.),s(1.);
switch(ispin) {
case 0:
// default values of parameters are correct
break;
case 1:
Fr = sqrt((1.+sqr(_rres*pR ))/(1.+sqr(_rres*pAB )));
Fd = sqrt((1.+sqr(_rD0 *pDR))/(1.+sqr(_rD0 *pDAB)));
s = ((mAC-mBC)*(mAC+mBC)+(mD-mC)*(mD+mC)*(mB-mA)*(mB+mA)/sqr(mres))/GeV2;
break;
case 2:
Fr = sqrt((9.+3.*sqr(_rres*pR )+Math::powi(_rres*pR ,4))/
(9.+3.*sqr(_rres*pAB )+Math::powi(_rres*pAB ,4)));
Fd = sqrt((9.+3.*sqr(_rD0 *pDR )+Math::powi(_rD0 *pDR ,4))/
(9.+3.*sqr(_rD0 *pDAB)+Math::powi(_rD0 *pDAB,4)));
s = sqr(((mBC-mAC)*(mBC+mAC)+(mD-mC)*(mD+mC)*(mA-mB)*(mA+mB)/sqr(mres))/GeV2)
-(mAB*mAB-2.*mD*mD-2.*mC*mC+sqr((mD-mC)*(mD+mC))/sqr(mres))*
(mAB*mAB-2.*mA*mA-2.*mB*mB+sqr((mA-mB)*(mA+mB))/sqr(mres))/3./GeV2/GeV2;
break;
default:
throw Exception() << "D0toKPiPiCLEO::amplitude spin is too high ispin = "
<< ispin << Exception::runerror;
}
// calculate the width term
complex<Energy2> bw;
if(!f0) {
Energy2 mwid=wres*Math::powi(pAB/pR,2*ispin+1)*sqr(Fr*mres)/mAB;
bw = sqr(mres)-sqr(mAB)-complex<Energy2>(ZERO,mwid);
}
else {
Energy Gamma_pi = _gpi*sqrt(0.25*sqr(mAB)-sqr(_mpi));
Energy Gamma_K = 0.5*_gK *(sqrt(0.25*sqr(mAB)-sqr(_mkp))+
sqrt(0.25*sqr(mAB)-sqr(_mk0)));
bw = sqr(mres)-sqr(mAB)-complex<Energy2>(ZERO,mres*(Gamma_pi+Gamma_K));
}
return s*Fr*Fd*GeV2/bw;
}
diff --git a/Decay/ScalarMeson/DtoKPiPiCLEO.h b/Decay/ScalarMeson/DtoKPiPiCLEO.h
--- a/Decay/ScalarMeson/DtoKPiPiCLEO.h
+++ b/Decay/ScalarMeson/DtoKPiPiCLEO.h
@@ -1,668 +1,668 @@
// -*- C++ -*-
//
// DtoKPiPiCLEO.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DtoKPiPiCLEO_H
#define HERWIG_DtoKPiPiCLEO_H
//
// This is the declaration of the DtoKPiPiCLEO class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/**
* The documentation of the DtoKPiPiCLEO class implements the Dalitz plot fits
* of the CLEO collaboration for \f$D^0\to\bar{K}^0\pi^+\pi^-\f$,
* Phys. Rev. Lett. 89 (2002) 251802,
* and \f$D^0\to K^-\pi^+\pi^0\f$, Phys. Rev. D63 (2001) 092001.
*
* @see \ref DtoKPiPiCLEOInterfaces "The interfaces"
* defined for DtoKPiPiCLEO.
*/
class DtoKPiPiCLEO: public DecayIntegrator {
public:
/**
* The default constructor.
*/
DtoKPiPiCLEO();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate the amplitude for a resonance
* @param ispin The spin of the intermediate resonance
* @param f0 Whether to use the special form of the propagator for the \f$f_0(980)\f$.
* @param mD The mass of the decaying particle
* @param mA The mass of the first decay product
* @param mB The mass of the second decay product
* @param mC The mass of the third decay product
* @param mAB The mass of the pair AB
* @param mAC The mass of the pair AC
* @param mBC The mass of the pair BC
* @param mres The on-shell mass of the intermediate resonance
* @param wres The width of the intermediate resonance
*/
Complex amplitude(int ispin, bool f0, Energy mD,
Energy mA , Energy mB , Energy mC ,
Energy mAB, Energy mAC, Energy mBC,
Energy mres, Energy wres) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DtoKPiPiCLEO & operator=(const DtoKPiPiCLEO &);
+ DtoKPiPiCLEO & operator=(const DtoKPiPiCLEO &) = delete;
private:
/**
* Mass, Widths and related parameters
*/
//@{
/**
* Whether to use local values for the masses and widths or
* those from the ParticleData objects
*/
bool _localparameters;
/**
* Mass of the \f$\omega\f$
*/
Energy _momega;
/**
* Width of the \f$\omega\f$
*/
Energy _womega;
/**
* Mass of the \f$f_0(980)\f$
*/
Energy _mf980;
/**
* Width of the \f$f_0(980)\f$
*/
Energy _wf980;
/**
* \f$g_\pi\f$ coupling for the \f$f_0(980)\f$ width
*/
double _gpi;
/**
*\f$g_K\f$ coupling for the \f$f_0(980)\f$ width
*/
double _gK;
/**
* Option for handling the width of the \f$f_0(980)\f$
*/
bool _f0opt;
/**
* Mass of the \f$f_2(1270)\f$
*/
Energy _mf2;
/**
* Width of the \f$f_2(1270)\f$
*/
Energy _wf2;
/**
* Mass of the \f$f_0(1370)\f$
*/
Energy _mf1370;
/**
* Width of the \f$f_0(1370)\f$
*/
Energy _wf1370;
/**
* Mass of the \f$K_0^*(1430)\f$
*/
Energy _mK14300;
/**
* Width of the \f$K_0^*(1430)\f$
*/
Energy _wK14300;
/**
* Mass of the \f$K_2^*(1430)\f$
*/
Energy _mK14302;
/**
* Width of the \f$K_2^*(1430)\f$
*/
Energy _wK14302;
/**
* Mass of the \f$K^*(1680)\f$
*/
Energy _mK1680;
/**
* Width of the \f$K^*(1680)\f$
*/
Energy _wK1680;
/**
* Mass of the \f$\rho(1700)\f$
*/
Energy _mrho1700;
/**
* Width of the \f$\rho(1700)\f$
*/
Energy _wrho1700;
/**
* Mass of the \f$K^{*0}(892)\f$
*/
Energy _mK8920;
/**
* Width of the \f$K^{*0}(892)\f$
*/
Energy _wK8920;
/**
* Mass of the \f$K^{*+}(892)\f$ for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Energy _mK892A;
/**
* Width of the \f$K^{*+}(892)\f$ for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Energy _wK892A;
/**
* Mass of the \f$K^{*+}(892)\f$ for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
Energy _mK892B;
/**
* Width of the \f$K^{*+}(892)\f$ for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
Energy _wK892B;
/**
* Mass of the \f$\rho(770)\f$ for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Energy _mrhoA;
/**
* Width of the \f$\rho(770)\f$ for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Energy _wrhoA;
/**
* Mass of the \f$\rho(770)\f$ for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
Energy _mrhoB;
/**
* Width of the \f$\rho(770)\f$ for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
Energy _wrhoB;
//@}
/**
* Magnitudes and phases of the amplitudes for \f$D^0\to K^-\pi^+\pi^0\f$
*/
//@{
/**
* Amplitude of the non-resonant component
*/
double _a1NR;
/**
* Phase of the non=resonant component
*/
double _phi1NR;
/**
* Amplitude of the \f$\rho^+\f$ component
*/
double _a1rho;
/**
* Phase of the \f$\rho^+\f$ component
*/
double _phi1rho;
/**
* Amplitude of the \f$K^{*-}\f$ component
*/
double _a1Kstarm;
/**
* Phase of the \f$K^{*-}\f$ component
*/
double _phi1Kstarm;
/**
* Amplitude of the \f$\bar{K}^{*0}\f$ component
*/
double _a1Kstar0;
/**
* Phase of the \f$\bar{K}^{*0}\f$ component
*/
double _phi1Kstar0;
/**
* Amplitude for the \f$K_0(1430)^-\f$ component
*/
Energy2 _a1K1430m;
/**
* Phase for the \f$K_0(1430)^-\f$ component
*/
double _phi1K1430m;
/**
* Amplitude for the \f$\bar{K}_0(1430)^0\f$ component
*/
Energy2 _a1K14300;
/**
* Phase for the \f$\bar{K}_0(1430)^0\f$ component
*/
double _phi1K14300;
/**
* Amplitude for the \f$\rho(1700)^+\f$ component
*/
double _a1rho1700;
/**
* Phase for the \f$\rho(1700)^+\f$ component
*/
double _phi1rho1700;
/**
* Amplitude of the \f$K^*(1680)^-\f$ component
*/
double _a1K1680;
/**
* Phase of the \f$K^*(1680)^-\f$ component
*/
double _phi1K1680;
/**
* Complex amplitude of the non-resonant component
*/
Complex _c1NR;
/**
* Complex amplitude of the \f$\rho^+\f$ component
*/
Complex _c1rho;
/**
* Complex amplitude of the \f$K^{*-}\f$ component
*/
Complex _c1Kstarm;
/**
* Complex amplitude of the \f$\bar{K}^{*0}\f$ component
*/
Complex _c1Kstar0;
/**
* Complex amplitude for the \f$K_0(1430)^-\f$ component
*/
complex<Energy2> _c1K1430m;
/**
* Complex amplitude for the \f$\bar{K}_0(1430)^0\f$ component
*/
complex<Energy2> _c1K14300;
/**
* Complex amplitude for the \f$\rho(1700)^+\f$ component
*/
Complex _c1rho1700;
/**
* Complex amplitude of the \f$K^*(1680)^-\f$ component
*/
Complex _c1K1680;
//@}
/**
* Magnitudes and phases of the amplitudes for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
//@{
/**
* Amplitude for the \f$K^{*+}\f$
*/
double _a2Kstarp;
/**
* Phase for the \f$K^{*+}\f$
*/
double _phi2Kstarp;
/**
* Amplitude for the \f$\rho^0(770)\f$
*/
double _a2rho;
/**
* Phase for the \f$\rho^0(770)\f$
*/
double _phi2rho;
/**
* Amplitude for the \f$\omega\f$
*/
double _a2omega;
/**
* Phase for the \f$\omega\f$
*/
double _phi2omega;
/**
* Amplitude for the \f$K^{*-}\f$
*/
double _a2Kstarm;
/**
* Phase for the \f$K^{*-}\f$
*/
double _phi2Kstarm;
/**
* Amplitude for the \f$f_0(980)\f$
*/
Energy2 _a2f980;
/**
* Phase for the \f$f_0(980)\f$
*/
double _phi2f980;
/**
* Amplitude for the \f$f_2(1270)\f$
*/
InvEnergy2 _a2f2;
/**
* Phase for the \f$f_2(1270)\f$
*/
double _phi2f2;
/**
* Amplitude for the \f$f_0(1370)\f$
*/
Energy2 _a2f1370;
/**
* Phase for the \f$f_0(1370)\f$
*/
double _phi2f1370;
/**
* Amplitude for the \f$K^*_0(1430)^-\f$
*/
Energy2 _a2K14300;
/**
* Phase for the \f$K^*_0(1430)^-\f$
*/
double _phi2K14300;
/**
* Amplitude for the \f$K^*_2(1430)^-\f$
*/
InvEnergy2 _a2K14302;
/**
* Phase for the \f$K^*_2(1430)^-\f$
*/
double _phi2K14302;
/**
* Amplitude for the \f$K^*(1680)^-\f$
*/
double _a2K1680;
/**
* Phase for the \f$K^*(1680)^-\f$
*/
double _phi2K1680;
/**
* Amplitude of the non-resonant component
*/
double _a2NR;
/**
* Phase of the non=resonant component
*/
double _phi2NR;
/**
* Complex amplitude for the \f$K^{*+}\f$
*/
Complex _c2Kstarp;
/**
* Complex amplitude for the \f$\rho^0(770)\f$
*/
Complex _c2rho;
/**
* Complex amplitude for the \f$\omega\f$
*/
Complex _c2omega;
/**
* Complex amplitude for the \f$K^{*-}\f$
*/
Complex _c2Kstarm;
/**
* Complex amplitude for the \f$f_0(980)\f$
*/
complex<Energy2> _c2f980;
/**
* Complex amplitude for the \f$f_2(1270)\f$
*/
complex<InvEnergy2> _c2f2;
/**
* Complex amplitude for the \f$f_0(1370)\f$
*/
complex<Energy2> _c2f1370;
/**
* Complex amplitude for the \f$K^*_0(1430)^-\f$
*/
complex<Energy2> _c2K14300;
/**
* Complex amplitude for the \f$K^*_2(1430)^-\f$
*/
complex<InvEnergy2> _c2K14302;
/**
* Complex amplitude for the \f$K^*(1680)^-\f$
*/
Complex _c2K1680;
/**
* Complex amplitude of the non-resonant component
*/
Complex _c2NR;
//@}
/**
* Parameters for the Blatt-Weisskopf form-factors
*/
//@{
/**
* Radial size for the \f$D^0\f$
*/
InvEnergy _rD0;
/**
* Radial size for the light resonances
*/
InvEnergy _rres;
//@}
/**
* Parameters for the phase-space integration
*/
//@{
/**
* Maximum weights for the modes
*/
vector<double> _maxwgt;
/**
* Weights for the channels
*/
vector<double> _weights;
//@}
/**
* Masses for the \f$f_0(980)\f$ Breit-Wigner
*/
//@{
/**
* The pion mass
*/
Energy _mpi;
/**
* The charged kaon mass
*/
Energy _mkp;
/**
* The neutral kaon mass
*/
Energy _mk0;
//@}
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_DtoKPiPiCLEO_H */
diff --git a/Decay/ScalarMeson/DtoKPiPiE691.h b/Decay/ScalarMeson/DtoKPiPiE691.h
--- a/Decay/ScalarMeson/DtoKPiPiE691.h
+++ b/Decay/ScalarMeson/DtoKPiPiE691.h
@@ -1,449 +1,449 @@
// -*- C++ -*-
//
// DtoKPiPiE691.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DtoKPiPiE691_H
#define HERWIG_DtoKPiPiE691_H
//
// This is the declaration of the DtoKPiPiE691 class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the DtoKPiPiE691 class.
*
* @see \ref DtoKPiPiE691Interfaces "The interfaces"
* defined for DtoKPiPiE691.
*/
class DtoKPiPiE691: public DecayIntegrator {
public:
/**
* The default constructor.
*/
DtoKPiPiE691();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Methods to calculate the amplitudes for a given channel
*/
//@{
/**
* Calculate the decay angle for the amplitude, the angle is the
* angle between the 2 and 3 for the decay \f$D\to(12)3\f$ in the rest frame of
* the resonance which decays to 1 and 2.
* @param pparent The momentum of the parent
* @param pres The momentum of the resonance
* @param p1 The momentum of the first decay product of the resonance
*/
double decayAngle(const Lorentz5Momentum & pparent,
const Lorentz5Momentum & pres,
const Lorentz5Momentum & p1) const {
Energy2 dot = pparent*p1, mREp = pres*pparent;
Energy2 mRE1 = pres*p1, mp2 = pparent.mass2();
Energy2 mres2 = pres.mass2(), m12 = p1.mass2();
return (dot*mres2-mREp*mRE1)/
sqrt((mREp*mREp-mres2*mp2)*(mRE1*mRE1-mres2*m12));
}
/**
* Calculate the amplitude
* @param ispin The spin of the resonance
* @param costheta The decay angle
* @param mAB The off-shell mass of the resonance
* @param wres The width of the resonance
* @param mres The on-shell mass of the resonance
*/
Complex amplitude(int ispin, double costheta,Energy mAB,
Energy wres, Energy mres) const {
double s = 0.;
switch(ispin) {
case 0: s = 1.; break;
case 1: s = costheta; break;
case 2: s = 1.5*sqr(costheta)-0.5; break;
default: assert(false);
}
Complex bw = sqrt(0.5*wres/GeV/Constants::pi)*GeV/
(mAB-mres-complex<Energy>(ZERO,0.5*wres));
return s*bw;
}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DtoKPiPiE691 & operator=(const DtoKPiPiE691 &);
+ DtoKPiPiE691 & operator=(const DtoKPiPiE691 &) = delete;
private:
/**
* Amplitudes and phases for the different components
*/
//@{
/**
* Amplitude of the non-resonant component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _a1NR;
/**
* Phase of the non-resonant component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _phi1NR;
/**
* Amplitude of the \f$\bar{K}^*(892)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _a1K892;
/**
* Phase of the \f$\bar{K}^*(892)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _phi1K892;
/**
* Amplitude of the \f$\bar{K}^*_0(1430)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _a1K1430;
/**
* Phase of the \f$\bar{K}^*_0(1430)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _phi1K1430;
/**
* Amplitude of the \f$\bar{K}^*_0(1680)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _a1K1680;
/**
* Phase of the \f$\bar{K}^*_0(1680)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
double _phi1K1680;
/**
* Amplitude of the non-resonant component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _a2NR;
/**
* Phase of the non-resonant component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _phi2NR;
/**
* Amplitude of the \f$\bar{K}^*(892)^0\f$ component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _a2K8920;
/**
* Phase of the \f$\bar{K}^*(892)^0\f$ component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _phi2K8920;
/**
* Amplitude of the \f$K^*(892)^-\f$ component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _a2K892m;
/**
* Phase of the \f$K^*(892)^-\f$ component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _phi2K892m;
/**
* Amplitude of the \f$\rho^+\f$ component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _a2rho;
/**
* Phase of the \f$\rho^+\f$ component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
double _phi2rho;
/**
* Amplitude of the non-resonant component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
double _a3NR;
/**
* Phase of the non-resonant component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
double _phi3NR;
/**
* Amplitude of the \f$K^*(892)^-\f$ component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
double _a3K892;
/**
* Phase of the \f$K^*(892)^-\f$ component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
double _phi3K892;
/**
* Amplitude of the \f$\rho^0\f$ component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
double _a3rho;
/**
* Phase of the \f$\rho^0\f$ component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
double _phi3rho;
//@}
/**
* Complex amplitudes for use in the matrix element
*/
//@{
/**
* Amplitude of the non-resonant component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
Complex _c1NR;
/**
* Amplitude of the \f$\bar{K}^*(892)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
Complex _c1K892;
/**
* Amplitude of the \f$\bar{K}^*_0(1430)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
Complex _c1K1430;
/**
* Amplitude of the \f$\bar{K}^*_0(1680)^0\f$ component for \f$D^+\to K^-\pi^+\pi^+\f$
*/
Complex _c1K1680;
/**
* Amplitude of the non-resonant component for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Complex _c2NR;
/**
* Amplitude of the \f$\bar{K}^*(892)^0\f$ for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Complex _c2K8920;
/**
* Amplitude of the \f$K^*(892)^-\f$ for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Complex _c2K892m;
/**
* Amplitude of the \f$\rho^+\f$ for \f$D^0\to K^-\pi^+\pi^0\f$
*/
Complex _c2rho;
/**
* Amplitude of the non-resonant component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
Complex _c3NR;
/**
* Amplitude of the \f$K^*(892)^-\f$ component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
Complex _c3K892;
/**
* Amplitude of the \f$\rho^0\f$ component for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
Complex _c3rho;
//@}
/**
* Masses and widths of the various resonances
*/
//@{
/**
* Use local values for the masses and widths
*/
bool _localparameters;
/**
* Mass of the \f$K^*(892)^0\f$
*/
Energy _mK8920;
/**
* Width of the \f$K^*(892)^0\f$
*/
Energy _wK8920;
/**
* Mass of the \f$K^*(892)^-\f$
*/
Energy _mK892m;
/**
* Width of the \f$K^*(892)^-\f$
*/
Energy _wK892m;
/**
* Mass of the \f$K^*(1680)^0\f$
*/
Energy _mK1680;
/**
* Width of the \f$K^*(1680)^0\f$
*/
Energy _wK1680;
/**
* Mass of the \f$K^*_0(1430)^0\f$
*/
Energy _mK1430;
/**
* Width of the \f$K^*_0(1430)^0\f$
*/
Energy _wK1430;
/**
* Mass of the \f$\rho^0\f$
*/
Energy _mrho0;
/**
* Width of the \f$\rho^0\f$
*/
Energy _wrho0;
/**
* Mass of the \f$\rho^+\f$
*/
Energy _mrhop;
/**
* Width of the \f$\rho^+\f$
*/
Energy _wrhop;
//@}
/**
* Parameters for the phase-space integration
*/
//@{
/**
* Maximum weights for the various modes
*/
vector<double> _maxwgt;
/**
* Weights for the different integration channels
*/
vector<double> _weights;
//@}
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_DtoKPiPiE691_H */
diff --git a/Decay/ScalarMeson/DtoKPiPiMarkIII.h b/Decay/ScalarMeson/DtoKPiPiMarkIII.h
--- a/Decay/ScalarMeson/DtoKPiPiMarkIII.h
+++ b/Decay/ScalarMeson/DtoKPiPiMarkIII.h
@@ -1,443 +1,443 @@
// -*- C++ -*-
//
// DtoKPiPiMarkIII.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DtoKPiPiMarkIII_H
#define HERWIG_DtoKPiPiMarkIII_H
//
// This is the declaration of the DtoKPiPiMarkIII class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the DtoKPiPiMarkIII class.
*
* @see \ref DtoKPiPiMarkIIIInterfaces "The interfaces"
* defined for DtoKPiPiMarkIII.
*/
class DtoKPiPiMarkIII: public DecayIntegrator {
public:
/**
* The default constructor.
*/
DtoKPiPiMarkIII();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate the amplitude for a resonance
* @param rho True for rho resonances and false for \f$K^*\f$
* @param mD The mass of the decaying particle
* @param mA The mass of the first decay product
* @param mB The mass of the second decay product
* @param mC The mass of the third decay product
* @param mAB The mass of the pair AB
* @param mAC The mass of the pair AC
* @param mBC The mass of the pair BC
* @param mres The on-shell mass of the intermediate resonance
* @param wres The width of the intermediate resonance
*/
Complex amplitude(bool rho, Energy mD,
Energy mA , Energy mB , Energy mC ,
Energy mAB, Energy mAC, Energy mBC,
Energy mres, Energy wres) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DtoKPiPiMarkIII & operator=(const DtoKPiPiMarkIII &);
+ DtoKPiPiMarkIII & operator=(const DtoKPiPiMarkIII &) = delete;
private:
/**
* Amplitudes and phases for \f$D^0\to K^-\pi^+\pi^0\f$
*/
//@{
/**
* Magnitude of the \f$\rho\f$ component
*/
double _a1rho;
/**
* Phase of the \f$\rho\f$ component
*/
double _phi1rho;
/**
* Magnitude of the \f$K^{*-}\f$ component
*/
double _a1Kstarm;
/**
* Phase of the \f$K^{*-}\f$ component
*/
double _phi1Kstarm;
/**
* Magnitude of the \f$\bar{K}^{*0}\f$ component
*/
double _a1Kstar0;
/**
* Phase of the \f$\bar{K}^{*0}\f$ component
*/
double _phi1Kstar0;
/**
* Magnitude of the non-resonant component
*/
double _a1NR;
/**
* Phase of the non-resonant component
*/
double _phi1NR;
/**
* Magnitude of the \f$\rho\f$ component
*/
Complex _c1rho;
/**
* Magnitude of the \f$K^{*-}\f$ component
*/
Complex _c1Kstarm;
/**
* Magnitude of the \f$\bar{K}^{*0}\f$ component
*/
Complex _c1Kstar0;
/**
* Magnitude of the non-resonant component
*/
Complex _c1NR;
//@}
/**
* Amplitudes and phases for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$
*/
//@{
/**
* Magnitude of the \f$\rho^0\f$ component
*/
double _a2rho;
/**
* Phase of the \f$\rho^0\f$ component
*/
double _phi2rho;
/**
* Magnitude of the \f$K^{*-}\f$ component
*/
double _a2Kstar;
/**
* Phase of the \f$K^{*-}\f$ component
*/
double _phi2Kstar;
/**
* Magnitude of the non-resonant component
*/
double _a2NR;
/**
* Phase of the non-resonant component
*/
double _phi2NR;
/**
* Amplitude of the \f$\rho^0\f$ component
*/
Complex _c2rho;
/**
* Amplitude of the \f$K^{*-}\f$ component
*/
Complex _c2Kstar;
/**
* Amplitude of the non-resonant component
*/
Complex _c2NR;
//@}
/**
* Amplitudes and phases for \f$D^+\to \bar{K}^0\pi^+\pi^0\f$
*/
//@{
/**
* Magnitude of the \f$\rho\f$ component
*/
double _a3rho;
/**
* Phase of the \f$\rho\f$ component
*/
double _phi3rho;
/**
* Magnitude of the \f$\bar{K}^{*0}\f$ component
*/
double _a3Kstar;
/**
* Phase of the \f$\bar{K}^{*0}\f$ component
*/
double _phi3Kstar;
/**
* Magnitude of the non-resonant component
*/
double _a3NR;
/**
* Phase of the non-resonant component
*/
double _phi3NR;
/**
* Amplitude of the \f$\rho\f$ component
*/
Complex _c3rho;
/**
* Amplitude of the \f$\bar{K}^{*0}\f$ component
*/
Complex _c3Kstar;
/**
* Amplitude of the non-resonant component
*/
Complex _c3NR;
//@}
/**
* Amplitudes and phases for \f$D^+\to K^-\pi^+\pi^+\f$
*/
//@{
/**
* Magnitude of the \f$\bar{K}^{*0}\f$ component
*/
double _a4Kstar;
/**
* Phase of the \f$\bar{K}^{*0}\f$ component
*/
double _phi4Kstar;
/**
* Magnitude of the non-resonant component
*/
double _a4NR;
/**
* Phase of the non-resonant component
*/
double _phi4NR;
/**
* Amplitude of the \f$\bar{K}^{*0}\f$ component
*/
Complex _c4Kstar;
/**
* Amplitude of the non-resonant component
*/
Complex _c4NR;
//@}
/**
* Masses and Widths of the resonances
*/
//@{
/**
* Use local values of the masses and widths
*/
bool _localparameters;
/**
* Mass of the \f$\rho^+\f$
*/
Energy _mrhop;
/**
* Width of the \f$\rho^+\f$
*/
Energy _wrhop;
/**
* Mass of the \f$\rho^0\f$
*/
Energy _mrho0;
/**
* Width of the \f$\rho^0\f$
*/
Energy _wrho0;
/**
* Mass of the \f$K^{*-}\f$
*/
Energy _mKstarm;
/**
* Width of the \f$K^{*-}\f$
*/
Energy _wKstarm;
/**
* Mass of the \f$\bar{K}^{*0}\f$
*/
Energy _mKstar0;
/**
* Width of the \f$\bar{K}^{*0}\f$
*/
Energy _wKstar0;
//@}
/**
* The radii of the mesons for the form-factors
*/
//@{
/**
* \f$\rho\f$ radius
*/
InvEnergy _rrho;
/**
* \f$K^*\f$ radius
*/
InvEnergy _rKstar;
//@}
/**
* Parameters for the phase-space integration
*/
//@{
/**
* Maximum weights for the different modes
*/
vector<double> _maxwgt;
/**
* Weights for the different phase-space channels
*/
vector<double> _weights;
//@}
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_DtoKPiPiMarkIII_H */
diff --git a/Decay/ScalarMeson/EtaPiGammaGammaDecayer.cc b/Decay/ScalarMeson/EtaPiGammaGammaDecayer.cc
--- a/Decay/ScalarMeson/EtaPiGammaGammaDecayer.cc
+++ b/Decay/ScalarMeson/EtaPiGammaGammaDecayer.cc
@@ -1,374 +1,374 @@
// -*- C++ -*-
//
// EtaPiGammaGammaDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the EtaPiGammaGammaDecayer class.
//
#include "EtaPiGammaGammaDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "Herwig/PDT/ThreeBodyAllOnCalculator.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void EtaPiGammaGammaDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
_etamax = mode(0)->maxWeight();
_etapmax = mode(1)->maxWeight();
}
}
EtaPiGammaGammaDecayer::EtaPiGammaGammaDecayer()
: _grhoomega(12.924/GeV), _fpi(130.7*MeV),_rhomass(771.1*MeV),
_rhowidth(149.2*MeV),_grho(_rhomass/_fpi),_mpi(ZERO),_rhoconst(0.),
_localparameters(true),_ratiofpif8(1./1.3),_ratiofpif0(1./1.04),
_theta(-Constants::pi/9.),_etamax(2.36858),_etapmax(0.006),
_dconst(2), _econst(2) {
// intermediates
generateIntermediates(false);
}
void EtaPiGammaGammaDecayer::doinit() {
DecayIntegrator::doinit();
// set rho parameters if needed
tPDPtr rho(getParticleData(ParticleID::rho0));
if(!_localparameters) {
_rhomass = rho->mass();
_rhowidth = rho->width();
}
// constant for the running rho width
_mpi=getParticleData(ParticleID::pi0)->mass();
Energy pcm =Kinematics::pstarTwoBodyDecay(_rhomass,_mpi,_mpi);
_rhoconst=_rhomass*_rhomass*_rhowidth/(pcm*pcm*pcm);
// set the prefactors
double conv(sqrt(4.*Constants::pi*SM().alphaEM()));
conv *=_fpi*_fpi*_grho/_rhomass/_rhomass;
InvEnergy2 pre(2.*sqrt(3.)/9.*sqr(_grhoomega*conv));
double fact[2];
// constants for eta
fact[0] = _ratiofpif8*cos(_theta)-sqrt(2.)*_ratiofpif0*sin(_theta);
// constants for eta'
fact[1] = _ratiofpif8*sin(_theta)+sqrt(2.)*_ratiofpif0*cos(_theta);
for(unsigned int ix=0;ix<2;++ix) {
_dconst[ix]=fact[ix]*pre;
_econst[ix]=fact[ix]*pre;
}
// set up the phsae space for the decays
tPDPtr eta[2]={getParticleData(ParticleID::eta),getParticleData(ParticleID::etaprime)};
tPDVector extpart;extpart.resize(4);
extpart[1] = getParticleData(ParticleID::pi0);
extpart[2] = getParticleData(ParticleID::gamma);
extpart[3] = getParticleData(ParticleID::gamma);
vector<double> dummyweights(2,0.5);
DecayPhaseSpaceChannelPtr newchannel;
DecayPhaseSpaceModePtr mode;
for(unsigned int ix=0;ix<2;++ix) {
extpart[0] = eta[ix];
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
newchannel=new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,2);
newchannel->addIntermediate(rho,0,0.0, 1,3);
mode->addChannel(newchannel);
newchannel=new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,3);
newchannel->addIntermediate(rho,0,0.0, 1,2);
mode->addChannel(newchannel);
addMode(mode, (ix==0 ? _etamax : _etapmax),dummyweights);
}
}
int EtaPiGammaGammaDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
cc=false;
int id;
if(children.size()!=3) return -1;
tPDVector::const_iterator pit = children.begin();
unsigned int npi0(0),ngamma(0);
for( ;pit!=children.end();++pit) {
id=(**pit).id();
if(id==ParticleID::pi0) ++npi0;
else if(id==ParticleID::gamma) ++ngamma;
}
if(!(npi0==1&&ngamma==2)) return -1;
// number of the mode
switch (parent->id()) {
case ParticleID::eta : return 0;
case ParticleID::etaprime: return 1;
default: return -1;
}
}
void EtaPiGammaGammaDecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_grhoomega,1/GeV)<< ounit(_fpi,GeV)<< _grho
<< ounit(_rhomass,GeV)<< ounit(_rhowidth,GeV)<< _localparameters
<< _ratiofpif8 << _ratiofpif0 << _theta << _etamax << _etapmax
<< _rhoconst << ounit(_mpi,GeV) << ounit(_dconst,1/GeV2)
<< ounit(_econst,1/GeV2);
}
void EtaPiGammaGammaDecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_grhoomega,1/GeV) >> iunit(_fpi,GeV)>> _grho
>> iunit(_rhomass,GeV)>> iunit(_rhowidth,GeV)>> _localparameters
>> _ratiofpif8 >> _ratiofpif0 >> _theta >> _etamax >> _etapmax
>> _rhoconst >> iunit(_mpi,GeV) >> iunit(_dconst,1/GeV2)
>> iunit(_econst,1/GeV2);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<EtaPiGammaGammaDecayer,DecayIntegrator>
describeHerwigEtaPiGammaGammaDecayer("Herwig::EtaPiGammaGammaDecayer", "HwSMDecay.so");
void EtaPiGammaGammaDecayer::Init() {
static ClassDocumentation<EtaPiGammaGammaDecayer> documentation
("The EtaPiGammaGammaDecayer class implements a VMD model for the"
" decay of the eta or etaprime to a pion and two photons.",
"The decays of $\\eta,\\eta'\\to\\pi^0\\gamma\\gamma$ were simulated using"
" the matrix elements of \\cite{Holstein:2001bt}",
"\\bibitem{Holstein:2001bt} B.~R.~Holstein,\n"
" Phys.\\ Scripta {\\bf T99} (2002) 55 [arXiv:hep-ph/0112150].\n"
"%%CITATION = PHSTB,T99,55;%%\n");
static Parameter<EtaPiGammaGammaDecayer,InvEnergy> interfacegrhoomega
("grhoomega",
"The couping of the rho, omega and a pion",
&EtaPiGammaGammaDecayer::_grhoomega, 1./GeV, 12.924/GeV, ZERO, 100./GeV,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,Energy> interfaceFpi
("Fpi",
"The pion decay constant",
&EtaPiGammaGammaDecayer::_fpi, MeV, 130.7*MeV, ZERO, 200.0*MeV,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,double> interfacegrho
("grho",
"Rho decay constant",
&EtaPiGammaGammaDecayer::_grho, 5.9, 0.0, 10.0,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,Energy> interfaceRhoMass
("RhoMass",
"The mass of the rho meson",
&EtaPiGammaGammaDecayer::_rhomass, MeV, 771.1*MeV, 500.0*MeV, 1000.0*MeV,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,Energy> interfaceRhoWidth
("RhoWidth",
"The width of the rho meson",
&EtaPiGammaGammaDecayer::_rhowidth, MeV, 149.2*MeV, 100.0*MeV, 200.0*MeV,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,double> interfaceRatioFpiF8
("RatioFpiF8",
"The ratio of the decay constant Fpi to F8",
&EtaPiGammaGammaDecayer::_ratiofpif8, 1./1.3, 0.0, 10.0,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,double> interfaceRatioFpiF0
("RatioFpiF0",
"The ratio of the decay constant Fpi to F0",
&EtaPiGammaGammaDecayer::_ratiofpif0, 1./1.04, 0.0, 10.0,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,double> interfaceTheta
("Theta",
"The eta etaprime mixing angle",
&EtaPiGammaGammaDecayer::_theta, -Constants::pi/9., -Constants::pi, Constants::pi,
false, false, true);
static Parameter<EtaPiGammaGammaDecayer,double> interfaceEtaMax
("EtaMax",
"THe maximum weight for the eta decay",
&EtaPiGammaGammaDecayer::_etamax, 1.35, -1.0e12, 1.0e12,
false, false, false);
static Parameter<EtaPiGammaGammaDecayer,double> interfaceEtaPrimeMax
("EtaPrimeMax",
"THe maximum weight for the eta prime decay",
&EtaPiGammaGammaDecayer::_etapmax, 0.006, -1.0e12, 1.0e12,
false, false, false);
static Switch<EtaPiGammaGammaDecayer,bool> interfaceLocalParameters
("LocalParameters",
"Use local values of the parameters",
&EtaPiGammaGammaDecayer::_localparameters, true, false, false);
static SwitchOption interfaceLocalParametersLocal
(interfaceLocalParameters,
"Local",
"Use local values",
true);
static SwitchOption interfaceLocalParametersParticleData
(interfaceLocalParameters,
"ParticleData",
"Use values from the particle data objects",
false);
}
double EtaPiGammaGammaDecayer::me2(const int,const Particle & inpart,
const ParticleVector& decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,PDT::Spin0,PDT::Spin1,PDT::Spin1)));
useMe();
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
ScalarWaveFunction::constructSpinInfo(decay[0],outgoing,true);
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::constructSpinInfo(_vectors[ix],decay[ix+1],
outgoing,true,true);
return 0.;
}
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::calculateWaveFunctions(_vectors[ix],decay[ix+1],
outgoing,true);
// dot products we need
Energy2 q1dotq2(decay[1]->momentum()*decay[2]->momentum()),
pdotq1(inpart.momentum()*decay[1]->momentum()),
pdotq2(inpart.momentum()*decay[2]->momentum());
complex<Energy> e1dotq2[3],e1dotp[3],e2dotq1[3],e2dotp[3];
for(unsigned int ix=0;ix<3;++ix) {
if(ix==1) {
e1dotq2[ix]=ZERO;
e1dotp[ix] =ZERO;
e2dotq1[ix]=ZERO;
e2dotp[ix] =ZERO;
}
else {
e1dotq2[ix] =_vectors[0][ix]*decay[2]->momentum();
e1dotp[ix] =_vectors[0][ix]*inpart.momentum();
e2dotq1[ix] =_vectors[1][ix]*decay[1]->momentum();
e2dotp[ix] =_vectors[1][ix]*inpart.momentum();
}
}
// the momentum dependent pieces of the matrix element
Complex ii(0.,1.);
Energy2 mpi2(sqr(decay[0]->mass())),meta2(sqr(inpart.mass())),
mrho2(sqr(_rhomass)),
t(mpi2+2.*((decay[0]->momentum())*(decay[1]->momentum()))),
u(mpi2+2.*((decay[0]->momentum())*(decay[2]->momentum())));
Energy q(sqrt(t)),pcm(Kinematics::pstarTwoBodyDecay(q,_mpi,_mpi));
complex<Energy2> tgamma(ii*pcm*pcm*pcm*_rhoconst/q);
q=sqrt(u);pcm = Kinematics::pstarTwoBodyDecay(q,_mpi,_mpi);
complex<Energy2> ugamma(ii*pcm*pcm*pcm*_rhoconst/q);
complex<InvEnergy2> prop1(1./(mrho2-t-tgamma)),prop2(1./(mrho2-u-ugamma));
complex<InvEnergy2> Dfact(_dconst[imode()]*(prop1*(pdotq2-meta2)
+prop2*(pdotq1-meta2)));
complex<InvEnergy4> Efact(_econst[imode()]*(prop1+prop2));
Complex e1dote2;
for(unsigned int ix=0;ix<3;++ix) {
for(unsigned int iy=0;iy<3;++iy) {
if(ix==1||iy==1) (*ME())(0,0,ix,iy)=0.;
else {
e1dote2=_vectors[0][ix].dot(_vectors[1][iy]);
(*ME())(0,0,ix,iy) =
- Dfact*complex<Energy2>(e1dote2*q1dotq2-
- e1dotq2[ix]*e2dotq1[iy])
- -Efact*complex<Energy4>(-e1dote2*pdotq1*pdotq2
- -e1dotp[ix]*e2dotp[iy]*q1dotq2
- +e1dotq2[ix]*e2dotp[iy]*pdotq1
- +e1dotp[ix]*e2dotq1[iy]*pdotq2);
+ Complex(Dfact*complex<Energy2>(e1dote2*q1dotq2-
+ e1dotq2[ix]*e2dotq1[iy])
+ -Efact*complex<Energy4>(-e1dote2*pdotq1*pdotq2
+ -e1dotp[ix]*e2dotp[iy]*q1dotq2
+ +e1dotq2[ix]*e2dotp[iy]*pdotq1
+ +e1dotp[ix]*e2dotq1[iy]*pdotq2));
}
}
}
/*
double me(ME()->contract(rhoin).real());
Energy M(inpart.mass()),M2(M*M);
Energy2 s1(2.*(decay[1]->momentum()*decay[2]->momentum()));
Energy2 s2(M2-2.*(inpart.momentum()*decay[1]->momentum()));
Energy2 s3(M2-2.*(inpart.momentum()*decay[2]->momentum()));
cout << "testing the matrix element " << (
2*(2*(Dfact*conj(Dfact)).real() + 2*(Dfact*conj(Efact)).real()*M2
+ (Efact*conj(Efact)).real()*M2*M2)*
s1*s1 - 2*(Efact*conj(Efact)).real()*M2*s1*(M2 - s2)*
(M2 - s3) +(Efact*conj(Efact)).real()*(M2 - s2)*(M2 - s2)*
(M2-s3)*(M2-s3))/8. - me << endl;
return me;
*/
return ME()->contract(_rho).real();
}
double EtaPiGammaGammaDecayer::
threeBodyMatrixElement(const int imodeb, const Energy2 q2,const Energy2 s3,
const Energy2 s2,const Energy2 s1,const Energy ,
const Energy ,const Energy ) const {
// compute the prefactors
Energy2 mrho2 = sqr(_rhomass);
Energy q = sqrt(s3);
Energy pcm = Kinematics::pstarTwoBodyDecay(q,_mpi,_mpi);
Complex ii(0.,1.);
complex<Energy2> tgamma(ii*pcm*pcm*pcm*_rhoconst/q);
q = sqrt(s2);
pcm = Kinematics::pstarTwoBodyDecay(q,_mpi,_mpi);
complex<Energy2> ugamma(ii*pcm*pcm*pcm*_rhoconst/q);
complex<InvEnergy2> prop1(1./(mrho2-s3-tgamma)), prop2(1./(mrho2-s2-ugamma));
Energy2 pdotq2(0.5*(q2-s3)), pdotq1(0.5*(q2-s2));
complex<InvEnergy2> Dfact(_dconst[imodeb]*(prop1*(pdotq2-q2)+prop2*(pdotq1-q2)));
complex<InvEnergy4> Efact(_econst[imodeb]*(prop1+prop2));
InvEnergy4 D2 = (Dfact*conj(Dfact)).real();
InvEnergy8 E2((Efact*conj(Efact)).real());
InvEnergy6 ED((Efact*conj(Dfact)).real());
return (2 * (2*D2 + 2*ED*q2 + E2*sqr(q2)) * sqr(s1)
- double(2*E2*q2*s1*(q2-s2)*(q2-s3))
+ double(E2*sqr(q2-s2)*sqr(q2-s3))
)/8.;
}
WidthCalculatorBasePtr
EtaPiGammaGammaDecayer::threeBodyMEIntegrator(const DecayMode & dm) const {
// workout which mode we are doing
int id(dm.parent()->id()),imode(1);
if(id==ParticleID::eta){imode=0;}
// construct the integrator
vector<double> inweights; inweights.push_back(0.5); inweights.push_back(0.5);
Energy mrho(getParticleData(ParticleID::rhoplus)->mass());
Energy wrho(getParticleData(ParticleID::rhoplus)->width());
vector<Energy> inmass; inmass.push_back(mrho); inmass.push_back(mrho);
vector<Energy> inwidth; inwidth.push_back(wrho); inwidth.push_back(wrho);
vector<int> intype; intype.push_back(1); intype.push_back(2);
vector<double> inpow(2,0.0);
return new_ptr(ThreeBodyAllOnCalculator<EtaPiGammaGammaDecayer>
(inweights,intype,inmass,inwidth,inpow,*this,
imode,_mpi,ZERO,ZERO));
}
void EtaPiGammaGammaDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
DecayIntegrator::dataBaseOutput(output,false);
output << "newdef " << name() << ":grhoomega " << _grhoomega*GeV << "\n";
output << "newdef " << name() << ":Fpi " << _fpi/MeV << "\n";
output << "newdef " << name() << ":grho " << _grho << "\n";
output << "newdef " << name() << ":RhoMass " << _rhomass/MeV << "\n";
output << "newdef " << name() << ":RhoWidth " << _rhowidth/MeV << "\n";
output << "newdef " << name() << ":RatioFpiF8 " << _ratiofpif8 << "\n";
output << "newdef " << name() << ":RatioFpiF0 " << _ratiofpif0 << "\n";
output << "newdef " << name() << ":Theta " << _theta << "\n";
output << "newdef " << name() << ":EtaMax " << _etamax << "\n";
output << "newdef " << name() << ":EtaPrimeMax " << _etapmax << "\n";
output << "newdef " << name() << ":LocalParameters " << _localparameters << "\n";
if(header) output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/EtaPiGammaGammaDecayer.h b/Decay/ScalarMeson/EtaPiGammaGammaDecayer.h
--- a/Decay/ScalarMeson/EtaPiGammaGammaDecayer.h
+++ b/Decay/ScalarMeson/EtaPiGammaGammaDecayer.h
@@ -1,280 +1,280 @@
// -*- C++ -*-
//
// EtaPiGammaGammaDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_EtaPiGammaGammaDecayer_H
#define HERWIG_EtaPiGammaGammaDecayer_H
// This is the declaration of the EtaPiGammaGammaDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>EtaPiGammaGammaDecayer</code> class implements a VMD model
* matrix element for \f$\eta,\eta'\to \pi^0 \gamma \gamma\f$ taken from
* hep-ph/0112150.
*
* The matrix element is given by
* \f[ \mathcal{M} =
* D(s,t,u)\left[ \epsilon_1\cdot\epsilon_2 q_1\cdot q_2
* -\epsilon_1\cdot q_2\epsilon_2\cdot q_1\right]
* -E(s,t,u)\left[-\epsilon_1\cdot\epsilon_2p\cdot q_1p\cdot q_2
* -\epsilon_1\cdot p\epsilon_2\cdot p q_1\cdot q_2
* +\epsilon_1\cdot q_2 \epsilon_2\cdot p p\cdot q_1
* +\epsilon_1\cdot p \epsilon_2\cdot q_1 p\cdot q_2
*\right],
* \f]
* where \f$q_{1,2}\f$ are the momenta of the photons, \f$\epsilon_{1,2}\f$ are
* the polarization vectors of the photons, \f$p\f$ is the momentum of the decaying
* meson and
* \f[D(s,t,u) = \frac{2\sqrt{3}}{9}g^2_{\omega\rho\pi}
* \left(\frac{2eF^2_{\pi}g}{m^2_V}\right)^2\times\left(\frac{F_\pi}{F_8}\cos\theta\mp\sqrt{2}\frac{F_\pi}{F_0}\sin\theta\right)\times\left[\frac{p\cdot q_2-m^2_\eta}{m^2_V-t}+\frac{p\cdot q_1-m^2_\eta}{m^2_V-u}\right]\f]
* \f[E(s,t,u) =-\frac{2\sqrt{3}}{9}g^2_{\omega\rho\pi}\left(\frac{2eF^2_{\pi}g}{m^2_V}\right)^2\times\left(\frac{F_\pi}{F_8}\cos\theta\mp\sqrt{2}\frac{F_\pi}{F_0}\sin\theta\right)\times\left[\frac1{m^2_V-t}+\frac1{m^2_V-u}\right].\f]
* the \f$-\f$ sign corresponds to the \f$\eta\f$ decay and the \f$+\f$ to the \f$\eta'\f$ decay.
* Here
* - \f$g_{\omega\rho\pi}\f$ is the coupling of the
* \f$\omega\f$ to the \f$\rho\f$ and a pion.
* - \f$e\f$ is the electric charge.
* - \f$F_{\pi}\f$ is the pion decay constant.
* - \f$g\f$ is the conversion factor for a \f$\rho\f$ into a photon.
* - \f$m_V\f$ is the mass of the vector meson, in this case we use the \f$\rho\f$.
* - \f$F_0\f$ is the singlet decay constant.
* - \f$F_8\f$ is the octet decay constant.
* - \f$\theta\f$ is the octet-singlet mixing angle
* - \f$m_\eta\f$ is the mass of the decay meson.
*
* In practice we use a slightly modified form by including a running width term to
* include the \f$\eta'\f$ decay as well as the \f$\eta\f$ decay.
*
* @see DecayIntegrator
*
*/
class EtaPiGammaGammaDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
EtaPiGammaGammaDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2,const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- EtaPiGammaGammaDecayer & operator=(const EtaPiGammaGammaDecayer &);
+ EtaPiGammaGammaDecayer & operator=(const EtaPiGammaGammaDecayer &) = delete;
private:
/**
* The coupling \f$g_{\omega\rho\pi}\f$ of the \f$\rho\f$ to \f$\omega\f$ and
* a \f$\pi\f$.
*/
InvEnergy _grhoomega;
/**
* The pion decay constant, \f$F_{\pi}\f$
*/
Energy _fpi;
/**
* The mass of the \f$\rho\f$.
*/
Energy _rhomass;
/**
* The width of the \f$\rho\f$.
*/
Energy _rhowidth;
/**
* The coupling for the conversion of a rho to a photon, \f$g\f$
*/
double _grho;
/**
* The mass of the pion
*/
Energy _mpi;
/**
* Constant for the running \f$\rho\f$ width calculation.
*/
double _rhoconst;
/**
* Use local values of the \f$\rho\f$ mass and width.
*/
bool _localparameters;
/**
* Ratios of the decay constants \f$F_8/F_\pi\f$.
*/
double _ratiofpif8;
/**
* Ratios of the decay constants \f$F_0/F_\pi\f$.
*/
double _ratiofpif0;
/**
* the mixing angle, \f$\theta\f$.
*/
double _theta;
/**
* the maximum weights for the \f$\eta\f$ decay.
*/
double _etamax;
/**
* the maximum weights for the \f$\eta'\f$ decay.
*/
double _etapmax;
/**
* The prefactor for the \f$D(s,t,u)\f$ function.
*/
vector<InvEnergy2> _dconst;
/**
* The prefactor for the \f$E(s,t,u)\f$ function.
*/
vector<InvEnergy2> _econst;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the photons
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_EtaPiGammaGammaDecayer_H */
diff --git a/Decay/ScalarMeson/EtaPiPiGammaDecayer.h b/Decay/ScalarMeson/EtaPiPiGammaDecayer.h
--- a/Decay/ScalarMeson/EtaPiPiGammaDecayer.h
+++ b/Decay/ScalarMeson/EtaPiPiGammaDecayer.h
@@ -1,415 +1,415 @@
// -*- C++ -*-
//
// EtaPiPiGammaDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_EtaPiPiGammaDecayer_H
#define HERWIG_EtaPiPiGammaDecayer_H
// This is the declaration of the EtaPiPiGammaDecayer class.
#include "Herwig/Utilities/Kinematics.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Utilities/Interpolator.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>EtaPiPiGammaDecayer</code> class implements the decay of
* the \f$\eta\f$ or \f$\eta'\f$ to \f$\pi^+\pi^-\gamma\f$ using either
* a VMD type model or a model using either the theoretical or experimental
* form of the Omnes function taken from hep-ph/0112150.
*
* The matrix element is given by
* \f[\mathcal{M} = B(s_{+-},s_{+\gamma},s_{-\gamma})\epsilon^{\mu\nu\alpha\beta}
* \epsilon^*_{\mu}p_{+\nu}p_{-\alpha}p_{\gamma\beta}\f]
* where \f$p_{+,-}\f$ are the momenta of the positively and negatively charged pions,
* \f$p_{\gamma}\f$ is the momentum of the photon and \f$s_{ij} = (p_i+p_j)^2\f$.
*
* The different models take
*
* \f[B(s_{+-},s_{+\gamma},s_{-\gamma}) =
* B_0\left(1+\frac32\frac{s_{+-}}{M^2_\rho-s_{+-}-iM_\rho\Gamma_\rho(s_{+-})}\right)\f]
* where \f$M_\rho\f$ and \f$\Gamma_\rho\f$ are the mass and running width
* of the \f$\rho\f$
* respectively for the VMD model.
*
* For the Omnes function case we take
*
* \f[B(s_{+-},s_{+\gamma},s_{-\gamma}) =
* B_0\left(1-c+c\frac{1+as_{+-}}{D_1(s_{+-})}\right)\f]
* either the experimental or analytic form of the Omnes function \f$D_1(s_{+-})\f$
* taken from hep-ph/0112150 can be used.
*
* The coefficient \f$B_0\f$ is given in hep-ph/0112150. We use the values from this
* paper and use their default choice \f$c=1\f$, \f$a=\frac1{2M_\rho}\f$.
*
* @see DecayIntegrator
*
*/
class EtaPiPiGammaDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
EtaPiPiGammaDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode,const Energy2 q2,
const Energy2 s3,const Energy2 s2,
const Energy2 s1,const Energy m1,
const Energy m2,const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- EtaPiPiGammaDecayer & operator=(const EtaPiPiGammaDecayer &);
+ EtaPiPiGammaDecayer & operator=(const EtaPiPiGammaDecayer &) = delete;
private:
/**
* The analytic Omnes function, \f$D_1^{\rm anal}(s)\f$.
* @param s The scale \f$s\f$.
* @return The analytic Omnes function.
*/
Complex analyticOmnes(Energy2 s) const {
Energy2 mpi2(_mpi*_mpi),mrho2(_mrho*_mrho);
double root, pi2 = sqr(Constants::pi);
Complex f,ii(0.,1.);
double pre(mpi2/12./pi2/_fpi/_fpi);
if(s>4.*mpi2) {
// real piece
root=sqrt(1.-4.*mpi2/s);
f=(1.-0.25*s/mpi2)*root*log((root+1.)/(-root+1.))-2.;
f *=pre;
// imaginary piece
f += ii*s/mrho2*_rhoconst/8.*pow(root,3);
}
else {
root=sqrt(4.*mpi2/s-1.);
f=2.*(1.-0.25*s/mpi2)*root*atan2(1.,root)-2.;
f *=pre;
}
return 1.-s/mrho2-s/48./pi2/_fpi/_fpi*log(mrho2/mpi2)-f;
}
/**
* The experimental Omnes function, \f$D_1^{\rm exp}(s)\f$.
* @param s The scale \f$s\f$.
* @return The experimental Omnes function.
*/
Complex experimentalOmnes(Energy2 s) const {
if(!_oreal) {
_oreal = make_InterpolatorPtr(_omnesfunctionreal,_omnesenergy,3);
_oimag = make_InterpolatorPtr(_omnesfunctionimag,_omnesenergy,3);
}
Energy q(sqrt(s)); Complex ii(0.,1.);
return (*_oreal)(q)+ii*(*_oimag)(q);
}
private:
/**
* the pion decay constant, \f$F_\pi\f$.
*/
Energy _fpi;
/**
* the PDG code for the incoming particle
*/
vector<int> _incoming;
/**
* Coupling for the decay, \f$B_0\f$.
*/
vector<double> _coupling;
/**
* The maximum weight
*/
vector<double> _maxweight;
/**
* The option for the energy dependence of the prefactor
*/
vector<int> _option;
/**
* The constants for the omnes function form.
*/
InvEnergy2 _aconst;
/**
* The constants for the Omnes function form.
*/
double _cconst;
/**
* The \f$\rho\f$ mass
*/
Energy _mrho;
/**
* The \f$\rho\f$ width
*/
Energy _rhowidth;
/**
* Constant for the running \f$rho\f$ width.
*/
double _rhoconst;
/**
* The \f$m_\pi\f$.
*/
Energy _mpi;
/**
* Use local values of the parameters.
*/
bool _localparameters;
/**
* Energy values for the experimental data on the phase shift
*/
vector<Energy> _energy;
/**
* Experimental values of the phase shift
*/
vector<double> _phase;
/**
* Energy values for the interpolation table for the Omnes function.
*/
vector<Energy> _omnesenergy;
/**
* Real part of the Omnes function for the interpolation table
*/
vector<double> _omnesfunctionreal;
/**
* Imaginary part of the Omnes function for the interpolation table
*/
vector<double> _omnesfunctionimag;
/**
* set up of the interpolation table
*/
bool _initialize;
/**
* Number of points for the intepolation of the experimental Omnes function
*/
unsigned int _npoints;
/**
* Interpolators for the experimental Omnes function.
*/
//@{
/**
* The interpolator for the real part
*/
mutable Interpolator<double,Energy>::Ptr _oreal;
/**
* The interpolator for the imaginary part
*/
mutable Interpolator<double,Energy>::Ptr _oimag;
//@}
/**
* Cut-off parameter for the integral of the experimental function
*/
Energy _epscut;
/**
* Size of the vectors for the experimental data
*/
unsigned int _nsizea;
/**
* Size of the vectors for the interpolation tables
*/
unsigned int _nsizeb;
/**
* Spin densit matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the photon
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
};
/**
* A simple struct to provide the integrand for the integral
* \f[\int^\infty_{4m^2_\pi}\frac{ds'\delta_1(s')}{s'(s'-s-i\epsilon)}\f]
*/
struct OmnesIntegrand {
/**
* constructor with the interpolator and precision
* @param inter The interpolator for the phase shift
* @param cut The cut-off
*/
OmnesIntegrand(Interpolator<double,Energy>::Ptr inter, Energy2 cut) {
_interpolator=inter;
_precision=cut;
}
/**
* Set the scale
*/
void setScale(Energy2 in) { _s=in;}
/**
* get the value
*/
InvEnergy4 operator ()(Energy2 xpoint) const {
InvEnergy4 output = InvEnergy4();
Energy q(sqrt(xpoint));
if(abs(xpoint-_s)>_precision)
output= (*_interpolator)(q)/xpoint/(xpoint-_s);
return output;
}
/** Return type for the GaussianIntegrator */
typedef InvEnergy4 ValType;
/** Argument type for the GaussianIntegrator */
typedef Energy2 ArgType;
/**
* The interpolator
*/
Interpolator<double,Energy>::Ptr _interpolator;
/**
* The scale
*/
Energy2 _s;
/**
* The precision.
*/
Energy2 _precision;
};
}
#endif /* HERWIG_EtaPiPiGammaDecayer_H */
diff --git a/Decay/ScalarMeson/EtaPiPiPiDecayer.h b/Decay/ScalarMeson/EtaPiPiPiDecayer.h
--- a/Decay/ScalarMeson/EtaPiPiPiDecayer.h
+++ b/Decay/ScalarMeson/EtaPiPiPiDecayer.h
@@ -1,226 +1,226 @@
// -*- C++ -*-
//
// EtaPiPiPiDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_EtaPiPiPiDecayer_H
#define HERWIG_EtaPiPiPiDecayer_H
// This is the declaration of the EtaPiPiPiDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>EtaPiPiPiDecayer</code> class is designed for the simulation of
* the decay of the \f$\eta\f$ or \f$\eta'\f$ to either \f$\pi^+\pi^-\pi^0\f$
* or \f$\pi^0\pi^0\pi^0\f$ and the decay of the \f$\eta'\f$ to
* \f$\pi^+\pi^-\eta\f$ or \f$\pi^0\pi^0\eta\f$
*
* The matrix element takes the form
* \f[ |\mathcal{M}|^2 = N\left[1+ay+by^2+cx^2\right],\f]
* where
* \f[x = \frac{\sqrt{3}(u-t)}{2M_0(M_0-m_1-m_2-m_3)},\f]
* \f[y = \frac{(m_1+m_2+m_3)((M_0-m_3)^2-s)}{2M_0(m_1+m_2)(M_0-m_1-m_2-m_3)}-1,\f]
* where
* - \f$m_{1,2,3}\f$ are the masses of the outgoing mesons
* - \f$u = (p_0-p_1)^2\f$,
* - \f$t = (p_0-p_2)^2\f$,
* - \f$s = (p_0-p_3)^2\f$.
*
* This form is taken from hep-ph/0301058 as are the experimental results for
* the constants which are used where available and the theory results which are
* used when there is no experimental data.
*
* @see DecayIntegrator
*
*/
class EtaPiPiPiDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
EtaPiPiPiDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The differential three body decay rate with one integral performed.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s The invariant mass which still needs to be integrate over.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The differential rate \f$\frac{d\Gamma}{ds}\f$
*/
virtual InvEnergy threeBodydGammads(const int imode, const Energy2 q2, const Energy2 s,
const Energy m1, const Energy m2,
const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- EtaPiPiPiDecayer & operator=(const EtaPiPiPiDecayer &);
+ EtaPiPiPiDecayer & operator=(const EtaPiPiPiDecayer &) = delete;
private:
/**
* the id of the incoming particle
*/
vector<int> _incoming;
/**
* the id of the last neutral meson
*/
vector<int> _outgoing;
/**
* whether the pions are charged or neutral
*/
vector<bool> _charged;
/**
* the prefactor for the decay
*/
vector<double> _prefactor;
/**
* The constants for the matrix elements
*/
//*{
/**
* The \f$a\f$ constant
*/
vector<double> _a;
/**
* The \f$a\f$ constant
*/
vector<double> _b;
/**
* The \f$a\f$ constant
*/
vector<double> _c;
//@}
/**
* maximum weights
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_EtaPiPiPiDecayer_H */
diff --git a/Decay/ScalarMeson/PScalar4FermionsDecayer.cc b/Decay/ScalarMeson/PScalar4FermionsDecayer.cc
--- a/Decay/ScalarMeson/PScalar4FermionsDecayer.cc
+++ b/Decay/ScalarMeson/PScalar4FermionsDecayer.cc
@@ -1,404 +1,404 @@
// -*- C++ -*-
//
// PScalar4FermionsDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the PScalar4FermionsDecayer class.
//
#include "PScalar4FermionsDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Helicity/ScalarSpinInfo.h"
#include "ThePEG/Helicity/FermionSpinInfo.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/epsilon.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void PScalar4FermionsDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
_maxweight[ix] = mode(ix)->maxWeight();
}
}
PScalar4FermionsDecayer::PScalar4FermionsDecayer()
: _coupling(1,0.025159062/GeV), _incoming(1,111), _outgoing1(1,11),
_outgoing2(1,11), _maxweight(1,0.000234211),
_includeVMD(1,2),_VMDid(1,113), _VMDmass(1,0.7758*GeV),
_VMDwidth(1,0.1503*GeV), _initsize(1) {
// intermediates
generateIntermediates(false);
}
void PScalar4FermionsDecayer::doinit() {
DecayIntegrator::doinit();
// check the parameters are consistent
unsigned int isize=_coupling.size();
if(isize!=_incoming.size() || isize!=_outgoing1.size() || isize!=_outgoing2.size()||
isize!=_maxweight.size() || isize!=_includeVMD.size()|| isize!=_VMDid.size() ||
isize!=_VMDmass.size() || isize!=_VMDwidth.size())
throw InitException() << "Inconsistent parameters in PScalar4FermionsDecayer"
<< Exception::abortnow;
// create the integration channels for each mode
tPDVector extpart(5);
tPDPtr gamma=getParticleData(ParticleID::gamma);
DecayPhaseSpaceChannelPtr newchannel;
DecayPhaseSpaceModePtr mode;
vector<double> wgt;
for(unsigned int ix=0;ix<_incoming.size();++ix) {
wgt.resize(1);wgt[0]=1.;
extpart[0] = getParticleData(_incoming[ix]);
extpart[1] = getParticleData( _outgoing1[ix]);
extpart[2] = getParticleData(-_outgoing1[ix]);
extpart[3] = getParticleData( _outgoing2[ix]);
extpart[4] = getParticleData(-_outgoing2[ix]);
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
// first channel always need this
newchannel=new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,-2);
newchannel->addIntermediate(gamma ,1,-1.1, 1,2);
newchannel->addIntermediate(gamma ,1,-1.1, 3,4);
mode->addChannel(newchannel);
if(_outgoing1[ix]==_outgoing2[ix]) {
newchannel=new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,-2);
newchannel->addIntermediate(gamma ,1,-1.1, 3,2);
newchannel->addIntermediate(gamma ,1,-1.1, 1,4);
mode->addChannel(newchannel);
wgt.resize(2);wgt[0]=0.5;wgt[1]=0.5;
}
else{wgt.resize(1);wgt[0]=1.;}
addMode(mode,_maxweight[ix],wgt);
}
// set up the values for the VMD factor if needed (copy the default mass and width
// into the array)
for(unsigned ix=0;ix<isize;++ix) {
if(_includeVMD[ix]==1) {
_VMDmass[ix]=getParticleData(_VMDid[ix])->mass();
_VMDwidth[ix]=getParticleData(_VMDid[ix])->width();
}
}
}
int PScalar4FermionsDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
// must be four outgoing particles
if(children.size()!=4) return -1;
// get the id's of the outgoing particles
int id[4]={0,0,0,0};
bool done[4]={false,false,false,false};
unsigned int ix(0),iy(0);
// ids of the particles
int id0(parent->id()),idtemp(-1),idl1(-1),idl2(-1),idt[2];
tPDVector::const_iterator pit = children.begin();
for ( ;pit!=children.end();++pit) {
id[ix]=(**pit).id();
done[ix]=false;
++ix;
}
// find the two lepton pairs
// find the first fermion
ix=0;
do {
if( id[ix]>0 && !done[ix] ) {
done[ix]=true;
idtemp=id[ix];
}
++ix;
}
while(ix<4&&idtemp<0);
if(idtemp<0) return -1;
// find its antiparticle
ix=0;
do {
if( id[ix]==-idtemp && !done[ix] ) {
done[ix]=true;
idl1=idtemp;
}
++ix;
} while( ix<4 && idl1<0 );
if(idl1<0) return -1;
// find the second particle antiparticle pair
for(ix=0;ix<4;++ix) {
if(!done[ix]) {
idt[iy]=id[ix];
++iy;
}
}
if(idt[0]==-idt[1]) idl2=abs(idt[0]);
if(idl2<0) return -1;
// loop over the modes and see if this is one of them
ix=0;
int imode(-1);
do {
if(_incoming[ix]==id0) {
if((idl1==_outgoing1[ix]&&idl2==_outgoing2[ix])||
(idl2==_outgoing1[ix]&&idl1==_outgoing2[ix])) imode=ix;
}
++ix;
}
while(imode<0&&ix<_incoming.size());
cc=false;
return imode;
}
void PScalar4FermionsDecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_coupling,1/MeV)
<< _incoming << _outgoing1 << _outgoing2 << _maxweight
<< _includeVMD << _VMDid
<< ounit(_VMDmass,MeV) << ounit(_VMDwidth,MeV);
}
void PScalar4FermionsDecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_coupling,1/MeV)
>> _incoming >> _outgoing1 >> _outgoing2 >> _maxweight
>> _includeVMD >> _VMDid
>> iunit(_VMDmass,MeV) >> iunit(_VMDwidth,MeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<PScalar4FermionsDecayer,DecayIntegrator>
describeHerwigPScalar4FermionsDecayer("Herwig::PScalar4FermionsDecayer", "HwSMDecay.so");
void PScalar4FermionsDecayer::Init() {
static ClassDocumentation<PScalar4FermionsDecayer> documentation
("The PScalar4FermionsDecayer class is designed for the decay"
" of a pseudosclar meson to four fermions. It is intended for the decay of"
"the pion to two electron-positron pairs.");
static ParVector<PScalar4FermionsDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&PScalar4FermionsDecayer::_incoming,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<PScalar4FermionsDecayer,int> interfaceOutcoming1
("Outgoing1",
"The PDG code for the first outgoing fermion",
&PScalar4FermionsDecayer::_outgoing1,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<PScalar4FermionsDecayer,int> interfaceOutcoming2
("Outgoing2",
"The PDG code for the second outgoing fermion",
&PScalar4FermionsDecayer::_outgoing2,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<PScalar4FermionsDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&PScalar4FermionsDecayer::_coupling,
1/MeV, 0, ZERO, -10000/MeV, 10000/MeV, false, false, true);
static ParVector<PScalar4FermionsDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&PScalar4FermionsDecayer::_maxweight,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<PScalar4FermionsDecayer,int> interfaceIncludeVMD
("IncludeVMD",
"There are three options for 0 the VMD factor is not included, for 1 the factor "
"is included using the default mass and width of the particle specified by"
" VMDID, and for 2 the factor is included using the mass and width specified"
" by VMDwidth and VMDmass.",
&PScalar4FermionsDecayer::_includeVMD,
0, 0, 0, 0, 2, false, false, true);
static ParVector<PScalar4FermionsDecayer,int> interfaceVMDID
("VMDID",
"The PDG code for the particle to be used for the VMD factor.",
&PScalar4FermionsDecayer::_VMDid,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<PScalar4FermionsDecayer,Energy> interfaceVMDmass
("VMDmass",
"The mass to use for the particle in the VMD factor",
&PScalar4FermionsDecayer::_VMDmass,
1.*MeV, -1, ZERO, -10000*MeV, 10000*MeV, false, false, true);
static ParVector<PScalar4FermionsDecayer,Energy> interfaceVMDwidth
("VMDwidth",
"The width to use for the particle in the VMD factor",
&PScalar4FermionsDecayer::_VMDwidth,
1.*MeV, -1, ZERO, -10000*MeV, 10000*MeV, false, false, true);
}
double PScalar4FermionsDecayer::me2(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,PDT::Spin1Half,PDT::Spin1Half,
PDT::Spin1Half,PDT::Spin1Half)));
bool identical((_outgoing1[imode()]==_outgoing2[imode()]));
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
// set up the spin information for the decay products
for(unsigned int ix=0;ix<2;++ix) {
SpinorBarWaveFunction::
constructSpinInfo(_wavebar[ix],decay[2*ix ],outgoing,true);
SpinorWaveFunction::
constructSpinInfo(_wave[ix] ,decay[2*ix+1],outgoing,true);
}
return 0.;
}
// calculate the spinors
for(unsigned int ix=0;ix<2;++ix) {
SpinorBarWaveFunction::
calculateWaveFunctions(_wavebar[ix],decay[2*ix ],outgoing);
SpinorWaveFunction::
calculateWaveFunctions(_wave[ix] ,decay[2*ix+1],outgoing);
}
// momenta of the outgoing photons
Lorentz5Momentum momentum[4];
momentum[0]=decay[0]->momentum()+decay[1]->momentum();momentum[0].rescaleMass();
momentum[1]=decay[2]->momentum()+decay[3]->momentum();momentum[1].rescaleMass();
if(identical) {
momentum[2]=decay[2]->momentum()+decay[1]->momentum();momentum[2].rescaleMass();
momentum[3]=decay[0]->momentum()+decay[3]->momentum();momentum[3].rescaleMass();
}
// compute the currents for the two leptonic decays
LorentzPolarizationVectorE current[4][2][2];
unsigned int it,ix,iy,iz;
for(iz=0;iz<2;++iz) {
it = iz==0 ? 1 : 0;
for(ix=0;ix<2;++ix) {
for(iy=0;iy<2;++iy) {
current[iz][iy][ix] = _wave[iz][ix].vectorCurrent(_wavebar[iz][iy]);
// the second two currents
if(identical)
current[iz+2][iy][ix] = _wave[it][ix].vectorCurrent(_wavebar[iz][iy]);
}
}
}
// invariants
Energy2 m12(sqr(momentum[0].mass()));
Energy2 m34(sqr(momentum[1].mass()));
Energy2 m14(ZERO), m23(ZERO);
complex<InvEnergy4> prop1(1./m12/m34),prop2(0./sqr(MeV2));
Complex ii(0.,1.);
if(identical) {
m14=momentum[2].mass()*momentum[2].mass();
m23=momentum[3].mass()*momentum[3].mass();
prop2=1./m14/m23;
}
// the VMD factor if needed
if(_includeVMD[imode()]>0) {
Energy2 mrho2(_VMDmass[imode()]*_VMDmass[imode()]);
Energy2 mwrho(_VMDmass[imode()]*_VMDwidth[imode()]);
prop1 = prop1*(-mrho2+ii*mwrho)/(m12-mrho2+ii*mwrho)*
(-mrho2+ii*mwrho)/(m34-mrho2+ii*mwrho);
if(identical) {
prop2 = prop2*(-mrho2+ii*mwrho)/(m14-mrho2+ii*mwrho)*
(-mrho2+ii*mwrho)/(m23-mrho2+ii*mwrho);
}
}
// prefactor
Complex pre(_coupling[imode()]*4.*Constants::pi
*SM().alphaEM()*inpart.mass());
Complex diag;
// now compute the matrix element
LorentzVector<complex<Energy3> > eps;
vector<unsigned int> ispin(5,0);
for(ispin[1]=0; ispin[1]<2;++ispin[1]) {
for(ispin[2]=0;ispin[2]<2;++ispin[2]) {
for(ispin[3]=0;ispin[3]<2;++ispin[3]) {
for(ispin[4]=0;ispin[4]<2;++ispin[4]) {
// the first diagram
eps = epsilon(current[0][ispin[1]][ispin[2]],momentum[1],
current[1][ispin[3]][ispin[4]]);
- diag = prop1*(eps*momentum[0]);
+ diag = Complex(prop1*(eps*momentum[0]));
// exchanged diagram if identical particles
// (sign due normal ordering)
if(identical) {
eps = epsilon(current[2][ispin[1]][ispin[4]],momentum[3],
current[3][ispin[3]][ispin[2]]);
- diag-= prop2*(eps*momentum[2]);
+ diag-= Complex(prop2*(eps*momentum[2]));
}
(*ME())(ispin)=pre*diag;
}
}
}
}
double me=ME()->contract(_rho).real();
if(identical) me *= 0.25;
return me;
}
// output the setup info for the particle database
void PScalar4FermionsDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":Outgoing1 " << ix << " "
<< _outgoing1[ix] << "\n";
output << "newdef " << name() << ":Outgoing2 " << ix << " "
<< _outgoing2[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*MeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
output << "newdef " << name() << ":IncludeVMD " << ix << " "
<< _includeVMD[ix] << "\n";
output << "newdef " << name() << ":VMDID " << ix << " "
<< _VMDid[ix] << "\n";
output << "newdef " << name() << ":VMDmass " << ix << " "
<< _VMDmass[ix]/MeV << "\n";
output << "newdef " << name() << ":VMDwidth " << ix << " "
<< _VMDwidth[ix]/MeV << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":Outgoing1 " << ix << " "
<< _outgoing1[ix] << "\n";
output << "insert " << name() << ":Outgoing2 " << ix << " "
<< _outgoing2[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*MeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
output << "insert " << name() << ":IncludeVMD " << ix << " "
<< _includeVMD[ix] << "\n";
output << "insert " << name() << ":VMDID " << ix << " "
<< _VMDid[ix] << "\n";
output << "insert " << name() << ":VMDmass " << ix << " "
<< _VMDmass[ix]/MeV << "\n";
output << "insert " << name() << ":VMDwidth " << ix << " "
<< _VMDwidth[ix]/MeV << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/PScalar4FermionsDecayer.h b/Decay/ScalarMeson/PScalar4FermionsDecayer.h
--- a/Decay/ScalarMeson/PScalar4FermionsDecayer.h
+++ b/Decay/ScalarMeson/PScalar4FermionsDecayer.h
@@ -1,216 +1,216 @@
// -*- C++ -*-
//
// PScalar4FermionsDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PScalar4FermionsDecayer_H
#define HERWIG_PScalar4FermionsDecayer_H
// This is the declaration of the PScalar4FermionsDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>PScalar4FermionsDecayer</code> class is designed for the
* decay of the neutral pion to four leptons, in this case electrons.
* The propagator for the off-shell boson is taken to be \f$\frac1{m^2}\f$. There
* is also the option of including a vector meson dominance form-factor.
*
* In this case the matrix element is
* \f[\mathcal{M} = \frac{g}{m^2_{f_1\bar{f_1}}m^2_{f_2\bar{f_2}}}
* \epsilon^{\mu\nu\alpha\beta}
* \bar{u}(p_{f_1})\gamma_\mu v(p_{\bar{f_1}})p_{f_1\bar{f_1}\nu}
* \bar{u}(p_{f_2})\gamma_\alpha v(p_{\bar{f_2}}) p_{f_2\bar{f_2}\beta}
* \f]
* It includes the option of a vector meson dominance (VMD) type form factor
* \f$\frac{-M^2+i\Gamma M}{(m^2_{f\bar{f}}-M^2+i\Gamma M)}\f$. In the case of identical
* fermions in also includes the exchange diagram.
*
* @see DecayIntegrator
* @see PScalarVectorVectorDecayer
* @see PScalarVectorFermionsDecayer
*
* \author Peter Richardson
*
*/
class PScalar4FermionsDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
PScalar4FermionsDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- PScalar4FermionsDecayer & operator=(const PScalar4FermionsDecayer &);
+ PScalar4FermionsDecayer & operator=(const PScalar4FermionsDecayer &) = delete;
private:
/**
* coupling for a decay
*/
vector<InvEnergy> _coupling;
/**
* the PDG codes for the incoming particle
*/
vector<int> _incoming;
/**
* the PDG codes for the first outgoing fermion
*/
vector<int> _outgoing1;
/**
* the PDG codes for the second outgoing
*/
vector<int> _outgoing2;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Include the VMD factor
*/
vector<int> _includeVMD;
/**
* PDG code of the particle for the VMD factor
*/
vector<int> _VMDid;
/**
* Mass of the particle for the VMD factor
*/
vector<Energy> _VMDmass;
/**
* Width of the particle for the VMD factor
*/
vector<Energy> _VMDwidth;
/**
* initial number of modes
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Spinors for the decay products
*/
mutable vector<Helicity::LorentzSpinor <SqrtEnergy> > _wave[2];
/**
* Barred spinors for the decay products
*/
mutable vector<Helicity::LorentzSpinorBar<SqrtEnergy> > _wavebar[2];
};
}
#endif /* HERWIG_PScalar4FermionsDecayer_H */
diff --git a/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.cc b/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.cc
--- a/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.cc
+++ b/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.cc
@@ -1,321 +1,321 @@
// -*- C++ -*-
//
// PScalarLeptonNeutrinoDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the PScalarLeptonNeutrinoDecayer class.
//
#include "PScalarLeptonNeutrinoDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void PScalarLeptonNeutrinoDecayer::doinitrun() {
DecayIntegrator::doinitrun();
unsigned int iz(0),ix,iy;
if(initialize()) {
for(ix=0;ix<_incoming.size();++ix) {
for(iy=0;iy<_leptons[ix];++iy) {
if(iy==0) _maxweighte [ix] = mode(iz)->maxWeight();
else if(iy==1) _maxweightmu [ix] = mode(iz)->maxWeight();
else if(iy==2) _maxweighttau[ix] = mode(iz)->maxWeight();
++iz;
}
}
}
}
PScalarLeptonNeutrinoDecayer::PScalarLeptonNeutrinoDecayer()
: _incoming(6), _decayconstant(6), _leptons(6), _maxweighte(6),
_maxweightmu(6), _maxweighttau(6) {
// pion decay
_incoming[0] = 211; _decayconstant[0] = 127.27*MeV; _leptons[0] = 2;
_maxweighte[0] = 0.00014; _maxweightmu[0] = 1.09;
_maxweighttau[0] = 0.0;
// kaon decay
_incoming[1] = 321; _decayconstant[1] = 36.06*MeV; _leptons[1] = 2;
_maxweighte[1] = 1.87e-05; _maxweightmu[1] = 0.74;
_maxweighttau[1] = 0.0;
// D_s decay
_incoming[2] = 431; _decayconstant[2] = 281.36*MeV; _leptons[2] = 3;
_maxweighte[2] = 1.83428e-07; _maxweightmu[2] = 0.00782778;
_maxweighttau[2] = 0.00782778;
// D decay
_incoming[3] = 411; _decayconstant[3] = 51.20*MeV; _leptons[3] = 3;
_maxweighte[3] = 1.19915e-08; _maxweightmu[3] = 0.000511418;
_maxweighttau[3] = 0.00135052;
// B_c decay
_incoming[4] = 541; _decayconstant[4] = 16.0*MeV; _leptons[4] = 3;
_maxweighte[4] = 1.7429e-09; _maxweightmu[4] = 7.47667e-05;
_maxweighttau[4] = 0.0179128;
// B_u decays
_incoming[5] = 521; _decayconstant[5] = 0.759*MeV; _leptons[5] = 3;
_maxweighte[5] = 1.19578e-11; _maxweightmu[5] = 5.12844e-07;
_maxweighttau[5] = 0.000114138;
// initial size of the vectors
_initsize=_incoming.size();
// intermediates
generateIntermediates(false);
}
void PScalarLeptonNeutrinoDecayer::doinit() {
DecayIntegrator::doinit();
// check the parameters are consistent
unsigned int isize(_incoming.size());
if(isize!=_decayconstant.size()||isize!=_leptons.size()||isize!=_maxweighte.size()||
isize!=_maxweightmu.size()||isize!=_maxweighttau.size())
throw InitException() << "Inconsistent parameters in PScalarLeptonNeutrinoDecayer"
<< Exception::abortnow;
// create the integration channels
tPDVector extpart(3);
tPDPtr nu[3]={getParticleData(ParticleID::nu_e),
getParticleData(ParticleID::nu_mu),
getParticleData(ParticleID::nu_tau)};
tPDPtr nubar[3]={getParticleData(ParticleID::nu_ebar),
getParticleData(ParticleID::nu_mubar),
getParticleData(ParticleID::nu_taubar)};
tPDPtr lep[3]={getParticleData(ParticleID::eminus),
getParticleData(ParticleID::muminus),
getParticleData(ParticleID::tauminus)};
tPDPtr lepbar[3]={getParticleData(ParticleID::eplus),
getParticleData(ParticleID::muplus),
getParticleData(ParticleID::tauplus)};
int charge;
vector<double> dummyweights;
double wgt;
DecayPhaseSpaceModePtr mode;
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0]=getParticleData(_incoming[ix]);
charge=extpart[0]->iCharge();
for(unsigned int iy=0;iy<_leptons[ix];++iy) {
if(charge>0) {
extpart[1]=lepbar[iy];
extpart[2]=nu[iy];
}
else {
extpart[1]=lep[iy];
extpart[2]=nubar[iy];
}
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
if(iy==0) wgt = _maxweighte[ix];
else if(iy==1) wgt = _maxweightmu[ix];
else wgt = _maxweighttau[ix];
addMode(mode,wgt,dummyweights);
}
}
}
int PScalarLeptonNeutrinoDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
int imode(-1);
if(children.size()!=2) return imode;
// ids of the particles
int id0(parent->id()),id0bar(id0);
if(parent->CC()){id0bar=-id0;}
tPDVector::const_iterator pit = children.begin();
int id;
unsigned ilep(4);
for(;pit!=children.end();++pit) {
id=abs((**pit).id());
if(id>=11&&id<=16&&id%2==0) ilep=(id-10)/2;
}
// find the channel we need
bool found(false);
int ichan(-1);
unsigned int ix(0);
do {
if(id0 ==_incoming[ix]||id0bar==_incoming[ix]) {
found=true;ichan+=ilep;
cc=id0bar==_incoming[ix];
}
else {
ichan+=_leptons[ix];
}
++ix;
}
while (!found&&ix<_incoming.size());
if(found) imode=ichan;
return imode;
}
void PScalarLeptonNeutrinoDecayer::persistentOutput(PersistentOStream & os) const {
os << _incoming << ounit(_decayconstant,GeV)
<< _leptons << _maxweighte << _maxweightmu
<< _maxweighttau;
}
void PScalarLeptonNeutrinoDecayer::persistentInput(PersistentIStream & is, int) {
is >> _incoming >> iunit(_decayconstant,GeV)
>> _leptons >> _maxweighte >> _maxweightmu
>> _maxweighttau;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<PScalarLeptonNeutrinoDecayer,DecayIntegrator>
describeHerwigPScalarLeptonNeutrinoDecayer("Herwig::PScalarLeptonNeutrinoDecayer", "HwSMDecay.so");
void PScalarLeptonNeutrinoDecayer::Init() {
static ClassDocumentation<PScalarLeptonNeutrinoDecayer> documentation
("The PScalarLeptonNeutrinoDecayer class is the base class for"
" the implementation of leptonic decay of a pseudoscalar meson to a lepton"
"and a neutrino.");
static ParVector<PScalarLeptonNeutrinoDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&PScalarLeptonNeutrinoDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarLeptonNeutrinoDecayer,unsigned int> interfaceLepton
("Leptons",
"The allowed outgoing leptons, 1 is only electrons, 2 is electrons and muons and "
"3 is all lepton flavours",
&PScalarLeptonNeutrinoDecayer::_leptons,
0, 0, 0, 1, 3, false, false, true);
static ParVector<PScalarLeptonNeutrinoDecayer,double> interfaceMaxWeighte
("MaxWeightElectron",
"The maximum weight for the electron decay mode",
&PScalarLeptonNeutrinoDecayer::_maxweighte,
0, 0, 0, 0., 100., false, false, true);
static ParVector<PScalarLeptonNeutrinoDecayer,double> interfaceMaxWeightmu
("MaxWeightMuon",
"The maximum weight for the muon decay mode",
&PScalarLeptonNeutrinoDecayer::_maxweightmu,
0, 0, 0, 0., 100., false, false, true);
static ParVector<PScalarLeptonNeutrinoDecayer,double> interfaceMaxWeighttau
("MaxWeightTau",
"The maximum weight for the tau decay mode",
&PScalarLeptonNeutrinoDecayer::_maxweighttau,
0, 0, 0, 0., 100., false, false, true);
static ParVector<PScalarLeptonNeutrinoDecayer,Energy> interfaceDecayConstant
("DecayConstant",
"The decay constant for the incoming pseudoscaalr meson.",
&PScalarLeptonNeutrinoDecayer::_decayconstant,
MeV, 0, ZERO, ZERO, 1000.*MeV, false, false, true);
}
double PScalarLeptonNeutrinoDecayer::me2(const int,const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin0,PDT::Spin1Half,PDT::Spin1Half)));
// work out which decay constant to use
int icoup(0),id(abs(inpart.id()));
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(id==abs(_incoming[ix])) icoup=ix;
}
// find the particles
unsigned int iferm(0),ianti(0);
for(unsigned ix=0;ix<decay.size();++ix) {
id=decay[ix]->id();
if(id<=-11&&id>=-16) ianti=ix;
else if(id>=11&&id<=16) iferm=ix;
}
int idferm = decay[iferm]->id();
// initialization
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
// set up the spin information for the decay products
SpinorBarWaveFunction::
constructSpinInfo(_wavebar,decay[iferm],outgoing,true);
SpinorWaveFunction::
constructSpinInfo(_wave ,decay[ianti],outgoing,true);
}
// calculate the spinors
SpinorBarWaveFunction::
calculateWaveFunctions(_wavebar,decay[iferm],outgoing);
SpinorWaveFunction::
calculateWaveFunctions(_wave ,decay[ianti],outgoing);
// the prefactor
Energy premass = idferm%2==0 ? decay[ianti]->mass() : decay[iferm]->mass();
InvEnergy pre = premass * 2.*_decayconstant[icoup]*SM().fermiConstant()/inpart.mass();
// compute the matrix element
vector<unsigned int> ispin(3,0);
for(ispin[ianti+1]=0;ispin[ianti+1]<2;++ispin[ianti+1]) {
for(ispin[iferm+1]=0;ispin[iferm+1]<2;++ispin[iferm+1]) {
(*ME())(ispin)= idferm%2==0 ?
- pre*_wave[ispin[ianti+1]].rightScalar(_wavebar[ispin[iferm+1]]) :
- pre*_wave[ispin[ianti+1]].leftScalar( _wavebar[ispin[iferm+1]]) ;
+ Complex(pre*_wave[ispin[ianti+1]].rightScalar(_wavebar[ispin[iferm+1]])) :
+ Complex(pre*_wave[ispin[ianti+1]].leftScalar( _wavebar[ispin[iferm+1]])) ;
}
}
// // test of the matrix element
// double me=newME.contract(rhoin).real();
// Energy mass = idferm%2==0 ? decay[ianti]->mass() : decay[iferm]->mass();
// double test = sqr(_decayconstant[icoup]*SM().fermiConstant()*2.*mass/inpart.mass())*
// (sqr(inpart.mass())-sqr(mass));
// cout << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << (me-test)/(me+test) << endl;
return 0.5*ME()->contract(_rho).real();
}
void PScalarLeptonNeutrinoDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":Leptons " << ix << " "
<< _leptons[ix] << "\n";
output << "newdef " << name() << ":MaxWeightElectron " << ix << " "
<< _maxweighte[ix] << "\n";
output << "newdef " << name() << ":MaxWeightMuon " << ix << " "
<< _maxweightmu[ix] << "\n";
output << "newdef " << name() << ":MaxWeightTau " << ix << " "
<< _maxweighttau[ix] << "\n";
output << "newdef " << name() << ":DecayConstant " << ix << " "
<< _decayconstant[ix]/MeV << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":Leptons " << ix << " "
<< _leptons[ix] << "\n";
output << "insert " << name() << ":MaxWeightElectron " << ix << " "
<< _maxweighte[ix] << "\n";
output << "insert " << name() << ":MaxWeightMuon " << ix << " "
<< _maxweightmu[ix] << "\n";
output << "insert " << name() << ":MaxWeightTau " << ix << " "
<< _maxweighttau[ix] << "\n";
output << "insert " << name() << ":DecayConstant " << ix << " "
<< _decayconstant[ix]/MeV << "\n";
}
}
if(header)
output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.h b/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.h
--- a/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.h
+++ b/Decay/ScalarMeson/PScalarLeptonNeutrinoDecayer.h
@@ -1,198 +1,198 @@
// -*- C++ -*-
//
// PScalarLeptonNeutrinoDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PScalarLeptonNeutrinoDecayer_H
#define HERWIG_PScalarLeptonNeutrinoDecayer_H
// This is the declaration of the PScalarLeptonNeutrinoDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The PScalarLeptonNeutrinoDecayer class is designed for the decay of
* pseudoscalar mesons to a lepton and a neutrino. Although it can be used
* for charged pion and kaon decays it is mainly intended for the leptonic
* decays of bottom and charm mesons.
*
* The matrix element is given by
* \f[\mathcal{M} = \frac1{\sqrt{2}}f_PG_FV_{CKM}m_l\bar{u}(p_{\ell})(1-\gamma_5)v(p_\nu),\f]
* where
* - \f$f_P\f$ is the pseudoscalar decay constant.
* - \f$G_F\f$ is the Fermi constant
* - \f$V_{CKM}\f$ is the relevant CKM matrix element
* - \f$p_\ell\f$ is the momentum of the charged lepton
* - \f$p_\nu\f$ is the momentum of the neutrino
*
* @see DecayIntegrator
*
*/
class PScalarLeptonNeutrinoDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
PScalarLeptonNeutrinoDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- PScalarLeptonNeutrinoDecayer & operator=(const PScalarLeptonNeutrinoDecayer &);
+ PScalarLeptonNeutrinoDecayer & operator=(const PScalarLeptonNeutrinoDecayer &) = delete;
private:
/**
* the PDG code for the incoming particle
*/
vector<int> _incoming;
/**
* the meson decay constant for a particular particle multiplied by the CKM matrix
* element, \e i.e. \f$f_pV_{CKM}\f$
*/
vector<Energy> _decayconstant;
/**
* which outgoing leptons are allowed for a particular decay
*/
vector<unsigned int> _leptons;
/**
* the maximum weight for the integration of a given decay to \f$e\nu_e\f$.
*/
vector<double> _maxweighte;
/**
* the maximum weight for the integration of a given decay to \f$\mu\nu_\mu\f$.
*/
vector<double> _maxweightmu;
/**
* the maximum weight for the integration of a given decay to \f$\tau\nu_\tau\f$.
*/
vector<double> _maxweighttau;
/**
* initial number of modes
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Spinors for the decay products
*/
mutable vector<Helicity::LorentzSpinor <SqrtEnergy> > _wave;
/**
* barred spinors for the decay products
*/
mutable vector<Helicity::LorentzSpinorBar<SqrtEnergy> > _wavebar;
};
}
#endif /* HERWIG_PScalarLeptonNeutrinoDecayer_H */
diff --git a/Decay/ScalarMeson/PScalarPScalarVectorDecayer.cc b/Decay/ScalarMeson/PScalarPScalarVectorDecayer.cc
--- a/Decay/ScalarMeson/PScalarPScalarVectorDecayer.cc
+++ b/Decay/ScalarMeson/PScalarPScalarVectorDecayer.cc
@@ -1,311 +1,311 @@
// -*- C++ -*-
//
// PScalarPScalarVectorDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the PScalarPScalarVectorDecayer class.
//
#include "PScalarPScalarVectorDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void PScalarPScalarVectorDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
PScalarPScalarVectorDecayer::PScalarPScalarVectorDecayer()
: _incoming(19), _outgoingP(19), _outgoingV(19),
_coupling(19), _maxweight(19) {
// decay pi' to rho pi
_incoming[0] = 100111; _outgoingV[0] = 213; _outgoingP[0] = -211;
_coupling[0] = 3.57; _maxweight[0] = 4.5;
_incoming[1] = 100211; _outgoingV[1] = 213; _outgoingP[1] = 111;
_coupling[1] = 3.57; _maxweight[1] = 4.5;
_incoming[2] = 100211; _outgoingV[2] = 113; _outgoingP[2] = 211;
_coupling[2] = 3.57; _maxweight[2] = 4.5;
// K' to K rho
_incoming[3] = 100311; _outgoingP[3] = 311; _outgoingV[3] = 113;
_coupling[3] = 1.; _maxweight[3] = 4.;
_incoming[4] = 100321; _outgoingP[4] = 321; _outgoingV[4] = 113;
_coupling[4] = 1.; _maxweight[4] = 4.;
_incoming[5] = 100311; _outgoingP[5] = 321; _outgoingV[5] = -213;
_coupling[5] = 1.41; _maxweight[5] = 4.;
_incoming[6] = 100321; _outgoingP[6] = 311; _outgoingV[6] = 213;
_coupling[6] = 1.41; _maxweight[6] = 4.;
// K' to K* pi
_incoming[7] = 100311; _outgoingV[7] = 313; _outgoingP[7] = 111;
_coupling[7] = 1.55; _maxweight[7] = 2.;
_incoming[8] = 100321; _outgoingV[8] = 323; _outgoingP[8] = 111;
_coupling[8] = 1.55; _maxweight[8] = 2.;
_incoming[9] = 100311; _outgoingV[9] = 323; _outgoingP[9] = -211;
_coupling[9] = 2.19; _maxweight[9] = 2.;
_incoming[10] = 100321; _outgoingV[10] = 313; _outgoingP[10] = 211;
_coupling[10] = 2.19; _maxweight[10] = 2.;
// eta (1475) to K* K
_incoming[11] = 100331; _outgoingV[11] = 323; _outgoingP[11] = -321;
_coupling[11] = 2.92; _maxweight[11] = 3.5;
_incoming[12] = 100331; _outgoingV[12] = 313; _outgoingP[12] = -311;
_coupling[12] = 2.92; _maxweight[12] = 3.5;
// eta (1475) to K* K
_incoming[13] = 9020221; _outgoingV[13] = 323; _outgoingP[13] = -321;
_coupling[13] = 0.956; _maxweight[13] = 4.;
_incoming[14] = 9020221; _outgoingV[14] = 313; _outgoingP[14] = -311;
_coupling[14] = 0.956; _maxweight[14] = 4.;
// decay f_0(1370) to a_1 pi
_incoming[15] = 10221; _outgoingV[15] = 20213; _outgoingP[15] = -211;
_coupling[15] = 2.68; _maxweight[15] = 4.5;
_incoming[16] = 10221; _outgoingV[16] = 20113; _outgoingP[16] = 111;
_coupling[16] = 2.68; _maxweight[16] = 4.5;
// decay f_0(1500) to a_1 pi
_incoming[17] = 9030221; _outgoingV[17] = 20213; _outgoingP[17] = -211;
_coupling[17] = 1.147; _maxweight[17] = 3.2;
_incoming[18] = 9030221; _outgoingV[18] = 20113; _outgoingP[18] = 111;
_coupling[18] = 1.147; _maxweight[18] = 3.2;
// initial size of the arrays
_initsize=_incoming.size();
// intermediates
generateIntermediates(false);
}
void PScalarPScalarVectorDecayer::doinit() {
DecayIntegrator::doinit();
// check the parameters arew consistent
unsigned int isize=_coupling.size();
if(isize!=_incoming.size() || isize!=_outgoingP.size()||
isize!=_outgoingV.size() || isize!=_maxweight.size())
throw InitException() << "Inconsistent parameters in PScalarPScalarVectorDecayer"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt;
DecayPhaseSpaceModePtr mode;
tPDVector extpart(3);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0] = getParticleData(_incoming[ix]);
extpart[1] = getParticleData(_outgoingP[ix]);
extpart[2] = getParticleData(_outgoingV[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
int PScalarPScalarVectorDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id(parent->id());
int idbar = parent->CC() ? parent->CC()->id() : id;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
int imode(-1);
unsigned int ix(0);
cc=false;
do {
if(id ==_incoming[ix]) {
if((id1 ==_outgoingP[ix]&&id2 ==_outgoingV[ix])||
(id2 ==_outgoingP[ix]&&id1 ==_outgoingV[ix])) imode=ix;
}
if(idbar==_incoming[ix]) {
if((id1bar==_outgoingP[ix]&&id2bar==_outgoingV[ix])||
(id2bar==_outgoingP[ix]&&id1bar==_outgoingV[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void PScalarPScalarVectorDecayer::persistentOutput(PersistentOStream & os) const {
os << _coupling << _incoming << _outgoingP << _outgoingV << _maxweight;
}
void PScalarPScalarVectorDecayer::persistentInput(PersistentIStream & is, int) {
is >> _coupling >> _incoming >> _outgoingP >> _outgoingV >> _maxweight;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<PScalarPScalarVectorDecayer,DecayIntegrator>
describeHerwigPScalarPScalarVectorDecayer("Herwig::PScalarPScalarVectorDecayer", "HwSMDecay.so");
void PScalarPScalarVectorDecayer::Init() {
static ClassDocumentation<PScalarPScalarVectorDecayer> documentation
("The PScalarPScalarVectorDecayer class is designed for"
" the decay of a pseduoscalar meson to two spin-1 particles.");
static ParVector<PScalarPScalarVectorDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&PScalarPScalarVectorDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarPScalarVectorDecayer,int> interfaceOutgoingScalar
("OutgoingPScalar",
"The PDG code for the outgoing pseudoscalar meson",
&PScalarPScalarVectorDecayer::_outgoingP,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarPScalarVectorDecayer,int> interfaceOutgoingVector
("OutgoingVector",
"The PDG code for the outgoing vector meson",
&PScalarPScalarVectorDecayer::_outgoingV,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarPScalarVectorDecayer,double> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&PScalarPScalarVectorDecayer::_coupling,
0, 0, 0, 0., 100., false, false, true);
static ParVector<PScalarPScalarVectorDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&PScalarPScalarVectorDecayer::_maxweight,
0, 0, 0, 0., 100., false, false, true);
}
double PScalarPScalarVectorDecayer::me2( const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin0,PDT::Spin0,PDT::Spin1)));
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
ScalarWaveFunction::constructSpinInfo(decay[0],outgoing,true);
VectorWaveFunction::constructSpinInfo(_vectors,decay[1],
outgoing,true,false);
return 0.;
}
VectorWaveFunction::calculateWaveFunctions(_vectors,decay[1],
outgoing,false);
// calculate the matrix element
Lorentz5Momentum psum(inpart.momentum()+decay[0]->momentum());
for(unsigned int ix=0;ix<3;++ix) {
- (*ME())(0,0,ix)=_coupling[imode()]/inpart.mass()*(_vectors[ix]*psum);
+ (*ME())(0,0,ix)=Complex(_coupling[imode()]/inpart.mass()*(_vectors[ix]*psum));
}
// test of the matrix element
// double me=newME.contract(rhoin).real();
// Energy pcm = Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = 4.*sqr(_coupling[imode()]*pcm/decay[1]->mass());
// cerr << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << (me-test)/(me+test) << "\n";
// output the answer
return ME()->contract(_rho).real();
}
// specify the 1-2 matrix element to be used in the running width calculation
bool PScalarPScalarVectorDecayer::twoBodyMEcode(const DecayMode & dm, int & mecode,
double & coupling) const {
int imode(-1);
int id(dm.parent()->id());
int idbar = dm.parent()->CC() ? dm.parent()->CC()->id() : id;
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());
int id1bar = (**pit).CC() ? (**pit).CC()->id() : id1;
++pit;
int id2((**pit).id());
int id2bar = (**pit).CC() ? (**pit).CC()->id() : id2;
unsigned int ix(0); bool order(true);
do {
if(id ==_incoming[ix]) {
if(id1==_outgoingP[ix]&&id2==_outgoingV[ix]) {
imode=ix;
order=true;
}
if(id2==_outgoingP[ix]&&id1==_outgoingV[ix]) {
imode=ix;
order=false;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoingP[ix]&&id2bar==_outgoingV[ix]) {
imode=ix;
order=true;
}
if(id2bar==_outgoingP[ix]&&id1bar==_outgoingV[ix]) {
imode=ix;
order=false;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling=_coupling[imode];
mecode=10;
return order;
}
// output the setup information for the particle database
void PScalarPScalarVectorDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":OutgoingPScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "newdef " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix] << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":OutgoingPScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "insert " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix] << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/PScalarPScalarVectorDecayer.h b/Decay/ScalarMeson/PScalarPScalarVectorDecayer.h
--- a/Decay/ScalarMeson/PScalarPScalarVectorDecayer.h
+++ b/Decay/ScalarMeson/PScalarPScalarVectorDecayer.h
@@ -1,196 +1,196 @@
// -*- C++ -*-
//
// PScalarPScalarVectorDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PScalarPScalarVectorDecayer_H
#define HERWIG_PScalarPScalarVectorDecayer_H
//
// This is the declaration of the PScalarPScalarVectorDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>PScalarPScalarVectorDecayer</code> class is designed to perform the decay
* of a pseudoscalar meson to another pseudoscalar meson and a vector meson.
* There are only a few of these decays. In this case the matrix element has the
* form
* \f[\mathcal{M} = g\epsilon_2^\mu(p_0+p_1)_\mu,\f]
* where
* - \f$p_0\f$ is the momentum of the incoming pseudoscalar meson.
* - \f$p_1\f$ is the momentum of the outgoing pseudoscalar meson.
* - \f$\epsilon_2\f$ is the polarization vector of the vector meson.
* - \f$g\f$ is the coupling for the decay.
*
* @see DecayIntegrator
*
* \author Peter Richardson
*
*/
class PScalarPScalarVectorDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
PScalarPScalarVectorDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 10.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- PScalarPScalarVectorDecayer & operator=(const PScalarPScalarVectorDecayer &);
+ PScalarPScalarVectorDecayer & operator=(const PScalarPScalarVectorDecayer &) = delete;
private:
/**
* the PDG code for the incoming particle
*/
vector<int> _incoming;
/**
* the PDG code for the outgoing pseudoscalar
*/
vector<int> _outgoingP;
/**
* the PDG code for the outgoing vector
*/
vector<int> _outgoingV;
/**
* the coupling for the decay
*/
vector<double> _coupling;
/**
* the maximum weight for the decay
*/
vector<double> _maxweight;
/**
* initial number of modes
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decay products
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
};
}
#endif /* HERWIG_PScalarPScalarVectorDecayer_H */
diff --git a/Decay/ScalarMeson/PScalarVectorFermionsDecayer.cc b/Decay/ScalarMeson/PScalarVectorFermionsDecayer.cc
--- a/Decay/ScalarMeson/PScalarVectorFermionsDecayer.cc
+++ b/Decay/ScalarMeson/PScalarVectorFermionsDecayer.cc
@@ -1,450 +1,450 @@
// -*- C++ -*-
//
// PScalarVectorFermionsDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the PScalarVectorFermionsDecayer class.
//
#include "PScalarVectorFermionsDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/epsilon.h"
#include "Herwig/PDT/ThreeBodyAllOn1IntegralCalculator.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void PScalarVectorFermionsDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
_maxweight[ix]=mode(ix)->maxWeight();
}
}
PScalarVectorFermionsDecayer::PScalarVectorFermionsDecayer()
: _coupling(5), _incoming(5), _outgoingV(5), _outgoingf(5),
_outgoinga(5),_maxweight(5), _includeVMD(5), _VMDid(5),
_VMDmass(5), _VMDwidth(5) {
// pi0 -> gamma e+e-
_incoming[0] = 111;_outgoingV[0] = 22;
_outgoingf[0] = 11;_outgoinga[0] = -11;
_coupling[0] = 0.00761872/GeV;_maxweight[0] = 0.027;
_includeVMD[0] = 2;_VMDid[0] = 113;
_VMDmass[0] = 0.7758*GeV;_VMDwidth[0] = 0.1503*GeV;
// eta -> gamma e+e-/mu+/mu-
_incoming[1] = 221;_outgoingV[1] = 22;
_outgoingf[1] = 11;_outgoinga[1] = -11;
_coupling[1] = 0.007554164/GeV;_maxweight[1] = 2.8;
_includeVMD[1] = 2;_VMDid[1] = 113;
_VMDmass[1] = 0.7758*GeV;_VMDwidth[1] = 0.1503*GeV;
_incoming[2] = 221;_outgoingV[2] = 22;
_outgoingf[2] = 13;_outgoinga[2] = -13;
_coupling[2] = 0.007554164/GeV;_maxweight[2] = 2.1;
_includeVMD[2] = 2;_VMDid[2] = 113;
_VMDmass[2] = 0.7758*GeV;_VMDwidth[2] = 0.1503*GeV;
// eta' -> gamma e+e-/mu+mu-
_incoming[3] = 331;_outgoingV[3] = 22;
_outgoingf[3] = 11;_outgoinga[3] = -11;
_coupling[3] = 0.0104/GeV;_maxweight[3] = 5.2;
_includeVMD[3] = 2;_VMDid[3] = 113;
_VMDmass[3] = 0.7758*GeV;_VMDwidth[3] = 0.1503*GeV;
_incoming[4] = 331;_outgoingV[4] = 22;
_outgoingf[4] = 13;_outgoinga[4] = -13;
_coupling[4] = 0.0104/GeV;_maxweight[4] = 3.0;
_includeVMD[4] = 2;_VMDid[4] = 113;
_VMDmass[4] = 0.7758*GeV;_VMDwidth[4] = 0.1503*GeV;
// initial size of the arrays
_initsize = _incoming.size();
// intermediates
generateIntermediates(false);
}
void PScalarVectorFermionsDecayer::doinit() {
DecayIntegrator::doinit();
// check the parameters are consistent
unsigned int isize=_coupling.size();
if(isize!=_incoming.size() || isize!=_outgoingV.size()|| isize!=_outgoingf.size()||
isize!=_outgoinga.size() || isize!=_maxweight.size()|| isize!=_includeVMD.size()||
isize!=_VMDid.size() || isize!=_VMDmass.size() || isize!=_VMDwidth.size())
throw InitException() << "Inconsistent parameters in PScalarVectorFermionsDecayer"
<< Exception::abortnow;
// create the integration channel for each mode
tPDVector extpart(4);
tPDPtr gamma(getParticleData(ParticleID::gamma));
DecayPhaseSpaceChannelPtr newchannel;
DecayPhaseSpaceModePtr mode;
vector<double> wgt(1,1.);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0] = getParticleData(_incoming[ix]);
extpart[1] = getParticleData(_outgoingV[ix]);
extpart[2] = getParticleData(_outgoingf[ix]);
extpart[3] = getParticleData(_outgoinga[ix]);
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
newchannel=new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(extpart[0],0, 0.0,-1,1);
newchannel->addIntermediate(gamma ,1,-1.1, 2,3);
mode->addChannel(newchannel);
addMode(mode,_maxweight[ix],wgt);
}
// set up the values for the VMD factor if needed (copy the default mass and width
// into the array)
for(unsigned ix=0;ix<isize;++ix) {
if(_includeVMD[ix]==1) {
_VMDmass[ix]=getParticleData(_VMDid[ix])->mass();
_VMDwidth[ix]=getParticleData(_VMDid[ix])->width();
}
}
}
int PScalarVectorFermionsDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
int imode(-1);
// must be three outgoing particles
if(children.size()!=3) return imode;
// ids of the particles
int id0(parent->id()),idf[2]={0,0},idv(0);
unsigned int nf(0);
tPDVector::const_iterator pit = children.begin();
for( ;pit!=children.end();++pit) {
if((**pit).iSpin()==PDT::Spin1) {
idv=(**pit).id();
}
else {
idf[nf]=(**pit).id();
++nf;
}
}
// loop over the modes and see if this is one of them
unsigned int ix=0;
do {
if(_incoming[ix]==id0&&_outgoingV[ix]==idv)
{if((idf[0]==_outgoingf[ix]&&idf[1]==_outgoinga[ix])||
(idf[1]==_outgoingf[ix]&&idf[0]==_outgoinga[ix])){imode=ix;}}
++ix;
}
while(imode<0&&ix<_incoming.size());
cc=false;
return imode;
}
void PScalarVectorFermionsDecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_coupling,1/MeV)
<< _incoming << _outgoingV << _outgoingf << _outgoinga << _maxweight
<< _includeVMD << _VMDid
<< ounit(_VMDmass,MeV) << ounit(_VMDwidth,MeV);
}
void PScalarVectorFermionsDecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_coupling,1/MeV)
>> _incoming >> _outgoingV >> _outgoingf >> _outgoinga >> _maxweight
>> _includeVMD >> _VMDid
>> iunit(_VMDmass,MeV) >> iunit(_VMDwidth,MeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<PScalarVectorFermionsDecayer,DecayIntegrator>
describeHerwigPScalarVectorFermionsDecayer("Herwig::PScalarVectorFermionsDecayer", "HwSMDecay.so");
void PScalarVectorFermionsDecayer::Init() {
static ClassDocumentation<PScalarVectorFermionsDecayer> documentation
("The PScalarVectorFermionsDecayer class is designed"
" for the decay of a pseudoscalar meson to a photon and a"
"fermion-antifermion pair");
static ParVector<PScalarVectorFermionsDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&PScalarVectorFermionsDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,int> interfaceOutcomingV
("OutgoingVector",
"The PDG code for the outgoing pseudoscalar",
&PScalarVectorFermionsDecayer::_outgoingV,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,int> interfaceOutcomingF
("OutgoingFermion",
"The PDG code for the outgoing fermion",
&PScalarVectorFermionsDecayer::_outgoingf,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,int> interfaceOutcomingA
("OutgoingAntiFermion",
"The PDG code for the outgoing antifermion",
&PScalarVectorFermionsDecayer::_outgoinga,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&PScalarVectorFermionsDecayer::_coupling,
1/MeV, 0, ZERO, -10000000/MeV, 10000000/MeV, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&PScalarVectorFermionsDecayer::_maxweight,
0, 0, 0, 0.0, 100., false, false, true);
static ParVector<PScalarVectorFermionsDecayer,int> interfaceIncludeVMD
("IncludeVMD",
"There are three options for 0 the VMD factor is not included, for 1 the factor "
"is included using the default mass and width of the particle specified by"
" VMDID, and for 2 the factor is included using the mass and width specified"
" by VMDwidth and VMDmass.",
&PScalarVectorFermionsDecayer::_includeVMD,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,int> interfaceVMDID
("VMDID",
"The PDG code for the particle to be used for the VMD factor.",
&PScalarVectorFermionsDecayer::_VMDid,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,Energy> interfaceVMDmass
("VMDmass",
"The mass to use for the particle in the VMD factor",
&PScalarVectorFermionsDecayer::_VMDmass,
MeV, 0, ZERO, ZERO, 10000.*MeV, false, false, true);
static ParVector<PScalarVectorFermionsDecayer,Energy> interfaceVMDwidth
("VMDwidth",
"The width to use for the particle in the VMD factor",
&PScalarVectorFermionsDecayer::_VMDwidth,
MeV, 0, ZERO, ZERO, 10000.*MeV, false, false, true);
}
double PScalarVectorFermionsDecayer::me2(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,PDT::Spin1,PDT::Spin1Half,
PDT::Spin1Half)));
// initialization
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
// set up the spin information for the decay products
VectorWaveFunction::
constructSpinInfo(_vectors,decay[0],outgoing,true,true);
SpinorBarWaveFunction::
constructSpinInfo(_wavebar,decay[1],outgoing,true);
SpinorWaveFunction::
constructSpinInfo(_wave ,decay[2],outgoing,true);
return 0.;
}
// calculate the spinors and polarization vectors
VectorWaveFunction::
calculateWaveFunctions(_vectors,decay[0],outgoing,true);
SpinorBarWaveFunction::
calculateWaveFunctions(_wavebar,decay[1],outgoing);
SpinorWaveFunction::
calculateWaveFunctions(_wave ,decay[2],outgoing);
// now compute the matrix element
Complex ii(0.,1.);
Lorentz5Momentum pff(decay[1]->momentum()+decay[2]->momentum());
pff.rescaleMass();
Energy2 mff2(pff.mass()*pff.mass());
// compute the prefactor
complex<InvEnergy3> pre(_coupling[imode()]/mff2);
// the VMD factor
if(_includeVMD[imode()]>0) {
Energy2 mrho2=_VMDmass[imode()]*_VMDmass[imode()];
Energy2 mwrho=_VMDmass[imode()]*_VMDwidth[imode()];
pre = pre*(-mrho2+ii*mwrho)/(mff2-mrho2+ii*mwrho);
}
LorentzVector<complex<Energy3> > eps;
LorentzVector<complex<Energy> > fcurrent;
// compute the matrix element
vector<unsigned int> ispin(4);ispin[0]=0;
for(ispin[3]=0;ispin[3]<2;++ispin[3]) {
for(ispin[2]=0;ispin[2]<2;++ispin[2]) {
fcurrent = _wave[ispin[3]].vectorCurrent(_wavebar[ispin[2]]);
// compute the current for this part
eps = epsilon(decay[0]->momentum(),pff,fcurrent);
for(ispin[1]=0;ispin[1]<3;++ispin[1]) {
- (*ME())(ispin)=pre *_vectors[ispin[1]].dot(eps);
+ (*ME())(ispin) = Complex(pre *_vectors[ispin[1]].dot(eps));
}
}
}
double me = ME()->contract(_rho).real();
// //code to test the matrix element against the analytic result
// Energy m[4]={inpart.mass(),decay[0]->mass(),decay[1]->mass(),decay[2]->mass()};
// Energy2 m2[4]={m[0]*m[0],m[1]*m[1],m[2]*m[2],m[3]*m[3]};
// Lorentz5Momentum p12=decay[0]->momentum()+decay[1]->momentum();p12.rescaleMass();
// Energy2 m122(p12.mass2());
// Complex output( ((pre*conj(pre)).real()*(
// -2*m122*m122*mff2 - mff2*mff2*mff2 +
// m2[1]*(2*m2[2]*m2[3] - 2*m2[3]*m2[3] +
// m2[1]*(m2[2] - 2*m[2]*m[3] - m2[3])) -
// 2*m[2]*(m[2]*m2[2] - 2*m2[1]*m[3] - m[2]*m2[3])*
// m2[0] - (m2[2] + 2*m[2]*m[3] - m2[3])*
// m2[0]*m2[0] +mff2*mff2*
// (2*m2[1] + (m[2] - m[3])*(m[2] - m[3]) + 2*m2[0]) -
// mff2*(m2[1]*m2[1] + 2*m2[1]*m[2]*(m[2] - 2*m[3]) +
// 2*m2[2]*m2[3] - 2*(2*m[2] - m[3])*m[3]*m2[0] +
// m2[0]*m2[0]) + 2*m122*
// (-mff2*mff2 - (m2[2] - m2[3])*
// (m2[1] - m2[0]) +
// mff2*(m2[1] + m2[2] + m2[3] +
// m2[0])))));
// cout << "testing the matrix element "
// << real(output) << " " << me << " " << test2 << endl;
return me;
}
// method to return an object to calculate the 3 or higher body partial width
WidthCalculatorBasePtr
PScalarVectorFermionsDecayer::threeBodyMEIntegrator(const DecayMode & dm) const {
// workout which mode we are doing
int imode(-1);
// ids of the particles
int id0(dm.parent()->id()),idf[2]={0,0},idv(0);
unsigned int nf(0);
ParticleMSet::const_iterator pit = dm.products().begin();
for( ;pit!=dm.products().end();++pit) {
if((**pit).iSpin()==PDT::Spin1){idv=(**pit).id();}
else{idf[nf]=(**pit).id();++nf;}
}
// loop over the modes and see if this is one of them
unsigned int ix=0;
do {
if(_incoming[ix]==id0&&_outgoingV[ix]==idv) {
if((idf[0]==_outgoingf[ix]&&idf[1]==_outgoinga[ix])||
(idf[1]==_outgoingf[ix]&&idf[0]==_outgoinga[ix])) imode=ix;
}
++ix;
}
while(imode<0&&ix<_incoming.size());
// get the masses we need
Energy m[3]={getParticleData(_outgoingV[imode])->mass(),
getParticleData(_outgoingf[imode])->mass(),
getParticleData(_outgoinga[imode])->mass()};
return
new_ptr(ThreeBodyAllOn1IntegralCalculator<PScalarVectorFermionsDecayer>
(3,-1000.*MeV,-0.9*MeV,-0.9,*this,imode,m[0],m[1],m[2]));
}
InvEnergy PScalarVectorFermionsDecayer::threeBodydGammads(const int imodeb,
const Energy2 q2,
const Energy2 mff2,
const Energy m1,
const Energy m2,
const Energy m3) const {
// the masses of the external particles
Energy q=sqrt(q2);
Energy2 m12=m1*m1;
Energy2 m22=m2*m2;
Energy2 m32=m3*m3;
// calculate the prefactor
Complex ii(0.,1.);
complex<InvEnergy3> pre = _coupling[imodeb] / mff2;
// the VMD factor
if(_includeVMD[imodeb]>0) {
Energy2 mrho2=_VMDmass[imodeb]*_VMDmass[imodeb];
Energy2 mwrho=_VMDmass[imodeb]*_VMDwidth[imodeb];
pre = pre*(-mrho2+ii*mwrho)/(mff2-mrho2+ii*mwrho);
}
InvEnergy6 factor=real(pre*conj(pre));
// compute the pieces from the integration limits
Energy mff=sqrt(mff2);
Energy e2star = 0.5*(mff2-m32+m22)/mff;
Energy e1star = 0.5*(q2-mff2-m12)/mff;
Energy e1sm = sqrt(e1star*e1star-m12);
Energy e2sm = sqrt(e2star*e2star-m22);
Energy2 a = 2*e1star*e2star+m12+m22;
Energy2 b = 2*e1sm*e2sm;
// term independent of s3
Energy8 me = 2*b*(2*(m12*(mff2*mff2 + 4*mff2*m2*m3 -(m22 - m32)*(m22 - m32)) +
2*m2*(m12 +m22)*m3*(-mff2 +m22 + q2))
+(m12 +m22)*(m12 +m22)*(-mff2 +m22 - 2*m2*m3 - m32)
-(mff2 +m22 + 2*m2*m3 - m32)*(-mff2 +m22 + q2)*(-mff2 +m22 + q2));
// linear term
me+= 2.*a*b*(2*(-mff2*mff2 - (m22 - m32)*(m12 - q2) +
mff2*(m12 + m22 + m32 + q2)));
// quadratic term
me+=-4.*mff2*b*(3.*a*a+b*b)/3.;
// phase space factors
using Constants::pi;
return -factor * me/256./pi/pi/pi/q2/q;
}
// output the setup information for the particle database
void PScalarVectorFermionsDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":OutgoingVector "
<< ix << " " << _outgoingV[ix] << "\n";
output << "newdef " << name() << ":OutgoingFermion "
<< ix << " " << _outgoingf[ix] << "\n";
output << "newdef " << name() << ":OutgoingAntiFermion "
<< ix << " " << _outgoinga[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*MeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
output << "newdef " << name() << ":IncludeVMD " << ix << " "
<< _includeVMD[ix] << "\n";
output << "newdef " << name() << ":VMDID " << ix << " "
<< _VMDid[ix] << "\n";
output << "newdef " << name() << ":VMDmass " << ix << " "
<< _VMDmass[ix]/MeV << "\n";
output << "newdef " << name() << ":VMDwidth " << ix << " "
<< _VMDwidth[ix]/MeV << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":OutgoingVector "
<< ix << " " << _outgoingV[ix] << "\n";
output << "insert " << name() << ":OutgoingFermion "
<< ix << " " << _outgoingf[ix] << "\n";
output << "insert " << name() << ":OutgoingAntiFermion "
<< ix << " " << _outgoinga[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*MeV << "\n";
output << "insert " << name() << ":IncludeVMD " << ix << " "
<< _includeVMD[ix] << "\n";
output << "insert " << name() << ":VMDID " << ix << " "
<< _VMDid[ix] << "\n";
output << "insert " << name() << ":VMDmass " << ix << " "
<< _VMDmass[ix]/MeV << "\n";
output << "insert " << name() << ":VMDwidth " << ix << " "
<< _VMDwidth[ix]/MeV << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/PScalarVectorFermionsDecayer.h b/Decay/ScalarMeson/PScalarVectorFermionsDecayer.h
--- a/Decay/ScalarMeson/PScalarVectorFermionsDecayer.h
+++ b/Decay/ScalarMeson/PScalarVectorFermionsDecayer.h
@@ -1,252 +1,252 @@
// -*- C++ -*-
//
// PScalarVectorFermionsDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_PScalarVectorFermionsDecayer_H
#define THEPEG_PScalarVectorFermionsDecayer_H
//
// This is the declaration of the PScalarVectorFermionsDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "ThePEG/Helicity/LorentzSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>PScalarVectorFermionsDecayer</code> class is designed for the decay of a
* pseudoscalar meson to a spin-1 particle and a fermion-antifermion pair. In practice
* these decays are of the form \f$\gamma\ell^+\ell^-\f$ and the propagator of
* the off-shell boson is taken to be \f$\frac1{m^2_{f\bar{f}}}\f$.
* There is also the option of including a vector meson dominance
* form-factor.
*
* In this case the matrix element is
* \f[\mathcal{M} = \frac{g}{m^2_{f\bar{f}}}
* \epsilon^{\mu\nu\alpha\beta}p_{V\mu}\epsilon_{V\nu}
* \bar{u}(p_f)\gamma_\alpha v(p_{\bar{f}}) p_{f\bar{f}\beta}
* \f]
* It includes the option of a vector meson dominance (VMD) type form factor
* \f$\frac{-M^2+i\Gamma M}{(m^2_{f\bar{f}}-M^2+i\Gamma M)}\f$.
*
* The incoming pseudoscalar meson, the outgoing vector, the fermion and antifermion
* and the coupling can be specified using the relevant interfaces.
*
* @see DecayIntegrator
* @see PScalarVectorVectorDecayer
* @see PScalar4FermionsDecayer
*
* \author Peter Richardson
*
*/
class PScalarVectorFermionsDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
PScalarVectorFermionsDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The differential three body decay rate with one integral performed.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s The invariant mass which still needs to be integrate over.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The differential rate \f$\frac{d\Gamma}{ds}\f$
*/
virtual InvEnergy threeBodydGammads(const int imode, const Energy2 q2,
const Energy2 s,
const Energy m1, const Energy m2,
const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- PScalarVectorFermionsDecayer & operator=(const PScalarVectorFermionsDecayer &);
+ PScalarVectorFermionsDecayer & operator=(const PScalarVectorFermionsDecayer &) = delete;
private:
/**
* coupling for a decay
*/
vector<InvEnergy> _coupling;
/**
* the PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* the PDG codes for the outgoing vector
*/
vector<int> _outgoingV;
/**
* the PDG codes for the outgoing fermion
*/
vector<int> _outgoingf;
/**
* the PDG codes for the outgoing antifermion
*/
vector<int> _outgoinga;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Include the VMD factor
*/
vector<int> _includeVMD;
/**
* PDG code for thte particle to use in the VMD factor.
*/
vector<int> _VMDid;
/**
* Mass to use in the VMD factor.
*/
vector<Energy> _VMDmass;
/**
* Width to use in the VMD factor.
*/
vector<Energy> _VMDwidth;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decay product
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
/**
* Spinors for the fermions
*/
mutable vector<Helicity::LorentzSpinor <SqrtEnergy> > _wave;
/**
* Barred spinors for the fermions
*/
mutable vector<Helicity::LorentzSpinorBar<SqrtEnergy> > _wavebar;
};
}
#endif /* THEPEG_PScalarVectorFermionsDecayer_H */
diff --git a/Decay/ScalarMeson/PScalarVectorVectorDecayer.cc b/Decay/ScalarMeson/PScalarVectorVectorDecayer.cc
--- a/Decay/ScalarMeson/PScalarVectorVectorDecayer.cc
+++ b/Decay/ScalarMeson/PScalarVectorVectorDecayer.cc
@@ -1,268 +1,268 @@
// -*- C++ -*-
//
// PScalarVectorVectorDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the PScalarVectorVectorDecayer class.
//
#include "PScalarVectorVectorDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/epsilon.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void PScalarVectorVectorDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
_maxweight[ix] = mode(ix)->maxWeight();
}
}
PScalarVectorVectorDecayer::PScalarVectorVectorDecayer()
: _incoming(10), _outgoing1(10), _outgoing2(10), _coupling(10), _maxweight(10) {
// decay eta -> omega gamma
_incoming[0] = 331; _outgoing1[0] = 223; _outgoing2[0] = 22;
_coupling[0] = 0.1412/GeV; _maxweight[0] = 1.2;
// decay pi -> gamma gamma
_incoming[1] = 111; _outgoing1[1] = 22; _outgoing2[1] = 22;
_coupling[1] = 0.0178/GeV; _maxweight[1] = 1.1;
// decay eta -> gamma gamma
_incoming[2] = 221; _outgoing1[2] = 22; _outgoing2[2] = 22;
_coupling[2] = 0.0176/GeV; _maxweight[2] = 1.1;
// decay eta' -> gamma gamma
_incoming[3] = 331; _outgoing1[3] = 22; _outgoing2[3] = 22;
_coupling[3] = 0.0221/GeV; _maxweight[3] = 1.1;
// decay eta_c -> rho rho
_incoming[4] = 441; _outgoing1[4] = 213; _outgoing2[4] = -213;
_coupling[4] = 0.0525/GeV; _maxweight[4] = 2.7;
_incoming[5] = 441; _outgoing1[5] = 113; _outgoing2[5] = 113;
_coupling[5] = 0.0371/GeV; _maxweight[5] = 2.7;
// decay eta-c -> phi phi
_incoming[6] = 441; _outgoing1[6] = 333; _outgoing2[6] = 333;
_coupling[6] = 0.0267/GeV; _maxweight[6] = 9.;
// decay eta-c -> gamma gamma
_incoming[7] = 441; _outgoing1[7] = 22; _outgoing2[7] = 22;
_coupling[7] = 0.00521/GeV; _maxweight[7] = 1.2;
// decay eta_c -> K* K*
_incoming[8] = 441; _outgoing1[8] = 323; _outgoing2[8] = -323;
_coupling[8] = 0.0308/GeV; _maxweight[8] = 5.3;
_incoming[9] = 441; _outgoing1[9] = 313; _outgoing2[9] = -313;
_coupling[9] = 0.0308/GeV; _maxweight[9] = 5.3;
// initial size of the vectors
_initsize = _incoming.size();
// intermediates
generateIntermediates(false);
}
void PScalarVectorVectorDecayer::doinit() {
DecayIntegrator::doinit();
// check the parameters arew consistent
unsigned int isize(_coupling.size());
if(isize!=_incoming.size() || isize!=_outgoing1.size()||
isize!=_outgoing2.size() || isize!=_maxweight.size())
throw InitException() << "Inconsistent parameters in PScalarVectorVectorDecayer"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt;
DecayPhaseSpaceModePtr mode;
tPDVector extpart(3);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0] = getParticleData(_incoming[ix]);
extpart[1] = getParticleData(_outgoing1[ix]);
extpart[2] = getParticleData(_outgoing2[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
int PScalarVectorVectorDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
cc = false;
if(children.size()!=2) return -1;
int id(parent->id());
int id1(children[0]->id());
int id2(children[1]->id());
unsigned int ix(0);
int imode(-1);
do {
if(_incoming[ix]==id) {
if((id1==_outgoing1[ix]&&id2==_outgoing2[ix])||
(id2==_outgoing1[ix]&&id1==_outgoing2[ix])) imode=ix;
}
++ix;
}
while(imode<0&&ix<_incoming.size());
return imode;
}
void PScalarVectorVectorDecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_coupling,1/GeV) << _incoming << _outgoing1 << _outgoing2 << _maxweight;
}
void PScalarVectorVectorDecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_coupling,1/GeV) >> _incoming >> _outgoing1 >> _outgoing2 >> _maxweight;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<PScalarVectorVectorDecayer,DecayIntegrator>
describeHerwigPScalarVectorVectorDecayer("Herwig::PScalarVectorVectorDecayer", "HwSMDecay.so");
void PScalarVectorVectorDecayer::Init() {
static ClassDocumentation<PScalarVectorVectorDecayer> documentation
("The PScalarVectorVectorDecayer class is designed for"
" the decay of a pseduoscalar meson to two spin-1 particles.");
static ParVector<PScalarVectorVectorDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&PScalarVectorVectorDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorVectorDecayer,int> interfaceOutcoming1
("FirstOutgoing",
"The PDG code for the first outgoing particle",
&PScalarVectorVectorDecayer::_outgoing1,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorVectorDecayer,int> interfaceOutcoming2
("SecondOutgoing",
"The PDG code for the second outgoing particle",
&PScalarVectorVectorDecayer::_outgoing2,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PScalarVectorVectorDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&PScalarVectorVectorDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 10000/GeV, false, false, true);
static ParVector<PScalarVectorVectorDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&PScalarVectorVectorDecayer::_maxweight,
0, 0, 0, 0., 200., false, false, true);
}
double PScalarVectorVectorDecayer::me2(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin0,PDT::Spin1,PDT::Spin1)));
bool photon[2]={false,false};
for(unsigned int ix=0;ix<2;++ix)
photon[ix] = decay[ix]->id()==ParticleID::gamma;
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::constructSpinInfo(_vectors[ix],decay[ix],
outgoing,true,photon[ix]);
return 0.;
}
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::
calculateWaveFunctions(_vectors[ix],decay[ix],outgoing,photon[ix]);
// now compute the matrix element
InvEnergy2 fact(_coupling[imode()]/inpart.mass());
unsigned int ix,iy;
for(ix=0;ix<3;++ix) {
for(iy=0;iy<3;++iy) {
- (*ME())(0,ix,iy)=fact*epsilon(_vectors[0][ix],decay[1]->momentum(),
- _vectors[1][iy])
- *decay[0]->momentum();
+ (*ME())(0,ix,iy)=Complex(fact*epsilon(_vectors[0][ix],decay[1]->momentum(),
+ _vectors[1][iy])
+ *decay[0]->momentum());
}
}
// test of the matrix element
// double test = 2.*sqr(fact*inpart.mass())*
// sqr(Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),decay[1]->mass()));
// double me = newME.contract(rhoin).real();
// cerr << "testing the matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << (me-test)/(me+test) << "\n";
return ME()->contract(_rho).real();
}
// specify the 1-2 matrix element to be used in the running width calculation
bool PScalarVectorVectorDecayer::twoBodyMEcode(const DecayMode & dm, int & itype,
double & coupling) const {
int imode(-1);
int id(dm.parent()->id());
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());++pit;
int id2((**pit).id());
unsigned int ix(0);
do {
if(_incoming[ix]==id) {
if((id1==_outgoing1[ix]&&id2==_outgoing2[ix])||
(id2==_outgoing1[ix]&&id1==_outgoing2[ix])) imode=ix;
}
++ix;
}
while(imode<0&&ix<_incoming.size());
coupling=_coupling[imode]*dm.parent()->mass();
itype = 3;
return id1==_outgoing1[imode]&&id2==_outgoing2[imode];
}
// output the setup info for the particle database
void PScalarVectorVectorDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "newdef " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "insert " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/PScalarVectorVectorDecayer.h b/Decay/ScalarMeson/PScalarVectorVectorDecayer.h
--- a/Decay/ScalarMeson/PScalarVectorVectorDecayer.h
+++ b/Decay/ScalarMeson/PScalarVectorVectorDecayer.h
@@ -1,203 +1,203 @@
// -*- C++ -*-
//
// PScalarVectorVectorDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PScalarVectorVectorDecayer_H
#define HERWIG_PScalarVectorVectorDecayer_H
// This is the declaration of the PScalarVectorVectorDecayer class.
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>PScalarVectorVectorDecayer</code> class is designed to perform the decay
* of a pseudoscalar meson to two spin-1 particles. The majority of these decays
* are of a light pseudoscalar meson to \f$\gamma\gamma\f$ where
* including the matrix-element is unnessecary. However there are a small number
* of decays,
* \e e.g. \f$\eta'\to\omega\gamma\f$
* where the use of this decayer is required to get the correct correlations.
*
* The matrix element is taken to be
* \f[\mathcal{M} = g\epsilon^{\mu\nu\alpha\beta}
* p_{1\mu} \epsilon_{1\nu}
* p_{2\alpha}\epsilon_{2\beta},
* \f]
* where \f$p_{1,2}\f$ and \f$\epsilon_{1,2}\f$ are the momenta and polarzation
* vectors of the outgoing vectors.
*
* The incoming pseudoscalar meson, the outgoing vectors and the coupling can
* be specified using the relevant interfaces.
*
* @see DecayIntegrator
* @see PScalarVectorFermionsDecayer
* @see PScalar4FermionsDecayer
*
* \author Peter Richardson
*
*/
class PScalarVectorVectorDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
PScalarVectorVectorDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 3.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- PScalarVectorVectorDecayer & operator=(const PScalarVectorVectorDecayer &);
+ PScalarVectorVectorDecayer & operator=(const PScalarVectorVectorDecayer &) = delete;
private:
/**
* the PDG code for the incoming particle
*/
vector<int> _incoming;
/**
* the PDG code for the first outgoing particle
*/
vector<int> _outgoing1;
/**
* the PDG code for the second outgoing particle
*/
vector<int> _outgoing2;
/**
* the coupling for the decay, \f$g\f$.
*/
vector<InvEnergy> _coupling;
/**
* the maximum weight for the decay
*/
vector<double> _maxweight;
/**
* initial number of modes
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decay products
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_PScalarVectorVectorDecayer_H */
diff --git a/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.cc b/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.cc
--- a/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.cc
+++ b/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.cc
@@ -1,753 +1,753 @@
// -*- C++ -*-
//
// ScalarMesonFactorizedDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ScalarMesonFactorizedDecayer class.
//
#include "ScalarMesonFactorizedDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/epsilon.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
ScalarMesonFactorizedDecayer::ScalarMesonFactorizedDecayer()
// default values of the couplings (taken from ZPC34, 103)
: _a1b(1.10), _a2b(-0.24), _a1c(1.30), _a2c(-0.55) {
// intermediates
generateIntermediates(true);
}
void ScalarMesonFactorizedDecayer::rebind(const TranslationMap & trans)
{
_ckm = trans.translate(_ckm);
DecayIntegrator::rebind(trans);
}
IVector ScalarMesonFactorizedDecayer::getReferences() {
IVector ret = DecayIntegrator::getReferences();
ret.push_back(_ckm);
return ret;
}
void ScalarMesonFactorizedDecayer::doinit() {
DecayIntegrator::doinit();
// get the ckm object
_ckm=dynamic_ptr_cast<Ptr<StandardCKM>::pointer>(SM().CKM());
if(!_ckm) throw InitException() << "ScalarMesonFactorizedDecayer::doinit() "
<< "the CKM object must be the Herwig one"
<< Exception::runerror;
unsigned int ix,iy,iz,icurr,iform;
// get the CKM matrix (unsquared for interference)
Complex ckmmat[3][3];
vector< vector<Complex > > CKM(_ckm->getUnsquaredMatrix(SM().families()));
for(ix=0;ix<3;++ix){for(iy=0;iy<3;++iy){ckmmat[ix][iy]=CKM[ix][iy];}}
int id0,id1,Wcharge,iq,ia,jspin,spect,inq,outq;
// make sure the currents and form factors got initialised
for(ix=0;ix<_current.size();++ix) _current[ix]->init();
for(ix=0;ix<_form.size();++ix) _form[ix]->init();
// find all the possible modes
vector<unsigned int> tformmap[2],tcurrmap[2];
vector<int> inquark,outquark,currq,curra;
vector<tPDVector> particles;
tPDVector extpart,ptemp;
Energy min,minb;
// loop over the modes in the form factors and currents
for(iform=0;iform<_form.size();++iform) {
for(ix=0;ix<_form[iform]->numberOfFactors();++ix) {
// particles from the form-factor
extpart.resize(2);
_form[iform]->particleID(ix,id0,id1);
_form[iform]->formFactorInfo(ix,jspin,spect,inq,outq);
// particles from the form factor
extpart[0]=getParticleData(id0);
extpart[1]=getParticleData(id1);
// charge of the decay products
Wcharge =extpart[0]->iCharge()-extpart[1]->iCharge();
// max mass for the particles in the current
min = extpart[0]->massMax()-extpart[1]->massMin();
for(icurr=0;icurr<_current.size();++icurr) {
for(iy=0;iy<_current[icurr]->numberOfModes();++iy) {
extpart.resize(2);
// get the particles from the current
_current[icurr]->decayModeInfo(iy,iq,ia);
ptemp=_current[icurr]->particles(Wcharge,iy,iq,ia);
minb=ZERO;
for(iz=0;iz<ptemp.size();++iz) {
extpart.push_back(ptemp[iz]);
minb+=ptemp[iz]->massMin();
}
// add this mode to the list
if(extpart.size()>2&&minb<min&&
(Wcharge!=0||(Wcharge==0&&((inq>0&&inq%2!=iq%2)||
(inq<0&&abs(inq)%2!=abs(ia)%2))))) {
tformmap[0].push_back(iform);tformmap[1].push_back(ix);
tcurrmap[0].push_back(icurr);tcurrmap[1].push_back(iy);
particles.push_back(extpart);
inquark.push_back(inq);outquark.push_back(outq);
currq.push_back(iq);curra.push_back(ia);
}
// if the meson in the current is neutral try the CC mode
if(Wcharge==0&&iq!=-ia&&((inq>0&&inq%2!=iq%2)||
(inq<0&&abs(inq)%2!=abs(ia)%2))) {
extpart.resize(2);
// get the particles from the current
ptemp=_current[icurr]->particles(Wcharge,iy,-ia,-iq);
minb=ZERO;
for(iz=0;iz<ptemp.size();++iz) {
extpart.push_back(ptemp[iz]);
minb+=ptemp[iz]->massMin();
}
if(extpart.size()>2&&minb<min) {
tformmap[0].push_back(iform);tformmap[1].push_back(ix);
tcurrmap[0].push_back(icurr);tcurrmap[1].push_back(iy);
particles.push_back(extpart);
inquark.push_back(inq);outquark.push_back(outq);
currq.push_back(-ia);curra.push_back(-iq);
}
}
}
}
}
}
// loop over the modes and find the dupliciates
vector<bool> modecc; vector<unsigned int> modeloc,tformpart,ttform[2],ttcurr[2];
vector<Complex> tCKM; Complex ckm;
DecayPhaseSpaceModePtr mode;
DecayPhaseSpaceChannelPtr channel;
bool done;
int id,idbar;
double maxweight;
vector<double> channelwgts;
unsigned int isize;double ort(sqrt(0.5));
vector<double>::iterator start,end;
for(ix=0;ix<particles.size();++ix) {
while (true) {
if(particles[ix].empty()) break;
findModes(ix,particles,modeloc,modecc);
// if more than three particles only allow one diagram
if ( particles[ix].size()>3 && !modeloc.empty() ) break;
// create the mode and set the particles as for the first instance
mode=new_ptr(DecayPhaseSpaceMode(particles[ix],this));
channel = new_ptr(DecayPhaseSpaceChannel(mode));
channel->addIntermediate(particles[ix][0],0,0.0,1,-1);
min = particles[ix][0]->massMax()-particles[ix][1]->massMin();
Wcharge = particles[ix][0]->iCharge()-particles[ix][1]->iCharge();
done=_current[tcurrmap[0][ix]]->createMode(Wcharge,tcurrmap[1][ix],
mode,2,1,channel,min);
if(!done) throw InitException() << "Failed to construct mode in "
<< "ScalarMesonFactorizedDecayer::doinit()."
<< Exception::abortnow;
// set the parameters for the additional modes
ttform[0].clear();ttform[1].clear();
ttcurr[0].clear();ttcurr[1].clear();
ttform[0].push_back(tformmap[0][ix]);ttform[1].push_back(tformmap[1][ix]);
ttcurr[0].push_back(tcurrmap[0][ix]);ttcurr[1].push_back(tcurrmap[1][ix]);
tformpart.clear();tformpart.push_back(0);
id=particles[ix][1]->id();
idbar = particles[ix][1]->CC() ? particles[ix][1]->CC()->id() : id;
for(iy=0;iy<modeloc.size();++iy) {
ttform[0].push_back(tformmap[0][modeloc[iy]]);
ttform[1].push_back(tformmap[1][modeloc[iy]]);
ttcurr[0].push_back(tcurrmap[0][modeloc[iy]]);
ttcurr[1].push_back(tcurrmap[1][modeloc[iy]]);
iz=1;
do {
if(( modecc[iy]&&particles[modeloc[iy]][iz]->id()==idbar)||
(!modecc[iy]&&particles[modeloc[iy]][iz]->id()==id))
tformpart.push_back(iz-1);
++iz;
}
while(tformpart.size()!=iy+2&&iz<3);
}
// calculate ckm factors
tCKM.clear();
for(iy=0;iy<ttcurr[0].size();++iy) {
// get the quarks involved in the process
if(iy==0) {
iq=currq[ix];ia=curra[ix];
inq=inquark[ix];outq=outquark[ix];
}
else {
if(!modecc[iy-1]) {
iq=currq[modeloc[iy-1]];ia=curra[modeloc[iy-1]];
inq=inquark[modeloc[iy-1]];outq=outquark[modeloc[iy-1]];
}
else {
ia=-currq[modeloc[iy-1]];iq=-curra[modeloc[iy-1]];
inq=-inquark[modeloc[iy-1]];outq=-outquark[modeloc[iy-1]];
}
}
_form[ttform[0][iy]]->particleID(ttform[1][iy],id0,id1);
Wcharge = getParticleData(id0)->iCharge()-getParticleData(id1)->iCharge();
ckm=1.;
if(Wcharge!=0) {
ckm=1.;
if(abs(iq)%2==0) ckm *= conj(ckmmat[abs(iq)/2-1][(abs(ia)-1)/2]);
else ckm *= conj(ckmmat[abs(ia)/2-1][(abs(iq)-1)/2]);
if(abs(inq)%2==0) ckm *= ckmmat[abs(inq)/2-1][(abs(outq)-1)/2];
else ckm *= ckmmat[abs(outq)/2-1][(abs(inq)-1)/2];
if(abs(inq)==5) ckm*=_a1b;
else ckm*=_a1c;
}
else {
ckm=1.;
if(inq>0) {
if(abs(inq)%2==0) ckm *= ckmmat[abs(inq)/2-1][(abs(iq)-1)/2];
else ckm *= ckmmat[abs(iq)/2-1][(abs(inq)-1)/2];
if(abs(outq)%2==0) ckm *= conj(ckmmat[abs(outq)/2-1][(abs(ia)-1)/2]);
else ckm *= conj(ckmmat[abs(ia)/2-1][(abs(outq)-1)/2]);
}
else {
if(abs(inq)%2==0) ckm *= ckmmat[abs(inq)/2-1][(abs(ia)-1)/2];
else ckm *= ckmmat[abs(ia)/2-1][(abs(inq)-1)/2];
if(abs(outq)%2==0) ckm *= conj(ckmmat[abs(outq)/2-1][(abs(iq)-1)/2]);
else ckm *= conj(ckmmat[abs(iq)/2-1][(abs(outq)-1)/2]);
}
if(abs(inq)==5) ckm*=_a2b;
else ckm*=_a2c;
}
if((abs(inq)%2==0&&inq<0)||(abs(inq)%2!=0&&inq>0)){ckm=conj(ckm);}
tCKM.push_back(ckm);
}
// special if the particles are idential add additional modes and
// identical particle factors
if(particles[ix][1]->id()==particles[ix][2]->id()&&particles[ix].size()==3) {
isize=ttcurr[0].size();
for(iy=0;iy<isize;++iy) {
ttcurr[0].push_back(ttcurr[0][iy]);ttcurr[1].push_back(ttcurr[1][iy]);
ttform[0].push_back(ttform[0][iy]);ttform[1].push_back(ttform[1][iy]);
if(tformpart[iy]==0){tformpart.push_back(1);}
else{tformpart.push_back(0);}
tCKM[iy]*=ort;tCKM.push_back(tCKM[iy]);
}
}
// add the parameters for the mode to the list
_currentmapA.push_back(ttcurr[0]);_currentmapB.push_back(ttcurr[1]);
_formmapA.push_back(ttform[0]);_formmapB.push_back(ttform[1]);
_formpart.push_back(tformpart);
_CKMfact.push_back(tCKM);
// add the mode to the list
if(_wgtmax.size()>numberModes()){maxweight=_wgtmax[numberModes()];}
else{maxweight=0.;}
// the weights for the channel
if(_wgtloc.size()>numberModes()&&
_wgtloc[numberModes()]+mode->numberChannels()<=_weights.size()) {
start=_weights.begin()+_wgtloc[numberModes()];
end = start+mode->numberChannels();
channelwgts=vector<double>(start,end);
}
else {
channelwgts.resize(mode->numberChannels(),1./(mode->numberChannels()));
}
// don't need channels for two body decays
if(particles[ix].size()==3) {
channelwgts.clear();
mode=new_ptr(DecayPhaseSpaceMode(particles[ix],this));
}
addMode(mode,maxweight,channelwgts);
// resize the duplicate modes to remove them
for(iy=0;iy<modeloc.size();++iy) particles[modeloc[iy]] = tPDVector();
break;
}
}
}
void ScalarMesonFactorizedDecayer::doinitrun() {
unsigned int ix,iy;
for(ix=0;ix<_current.size();++ix) _current[ix]->initrun();
for(ix=0;ix<_form.size();++ix) _form[ix]->initrun();
DecayIntegrator::doinitrun();
if(initialize()) {
_weights.clear();
_wgtloc.clear();
_wgtmax.clear();
for(ix=0;ix<numberModes();++ix) {
_wgtmax.push_back(mode(ix)->maxWeight());
_wgtloc.push_back(_weights.size());
for(iy=0;iy<mode(ix)->numberChannels();++iy) {
_weights.push_back(mode(ix)->channelWeight(iy));
}
}
}
}
bool ScalarMesonFactorizedDecayer::accept(tcPDPtr parent,
const tPDVector & children) const {
// N.B. this is a necessary but not sufficient test
bool allowed(false),dummy;
// find the ids of the particles
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
vector<int> ids,idcurr;
int id(parent->id());
for( ; pit!=pend;++pit) ids.push_back((**pit).id());
// loop over the possible particles in the formfactor
unsigned int ipart(0),iform,icurr,ix;
do {
idcurr.clear();
for(ix=0;ix<ids.size();++ix){if(ix!=ipart){idcurr.push_back(ids[ix]);}}
iform=0;
do {
// check if possible from the form factor
if(_form[iform]->formFactorNumber(id,ids[ipart],dummy)>=0) {
// check if possible from the current
icurr=0;
do {
allowed=_current[icurr]->accept(idcurr);
++icurr;
}
while(!allowed&&icurr<_current.size());
}
++iform;
}
while(!allowed&&iform<_form.size());
++ipart;
}
while(!allowed&&ipart<ids.size());
return allowed;
}
int ScalarMesonFactorizedDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
int imode(-1);
// id's of the particles and CC
// of the parent
int id0(parent->id()),id0bar(id0);
if(parent->CC()){id0bar=parent->CC()->id();}
// of the products
vector<int> ids,idbars;
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
for( ;pit!=pend;++pit) {
ids.push_back((**pit).id());
if((**pit).CC()) idbars.push_back((**pit).CC()->id());
else idbars.push_back(ids.back());
}
// loop over the modes
vector<bool> done(ids.size(),false);
unsigned int nfound,ix,iy,iz;
int idtemp;
bool found;
cc=false;
ix=0;
do {
// particle mode
if(id0==mode(ix)->externalParticles(0)->id()&&
ids.size()+1==mode(ix)->numberofParticles()) {
nfound=0;
for(iy=0;iy<ids.size();++iy){done[iy]=false;}
for(iy=0;iy<ids.size();++iy) {
idtemp=mode(ix)->externalParticles(iy+1)->id();
iz=0;found=false;
do{if(idtemp==ids[iz]&&!done[iz]){done[iz]=true;found=true;}++iz;}
while(iz<ids.size()&&!found);
if(found){++nfound;}
}
if(nfound==ids.size()){cc=false;imode=ix;}
}
// CC mode
if(id0bar==mode(ix)->externalParticles(0)->id()&&
ids.size()+1==mode(ix)->numberofParticles()) {
nfound=0;
for(iy=0;iy<idbars.size();++iy) done[iy]=false;
for(iy=0;iy<idbars.size();++iy) {
idtemp=mode(ix)->externalParticles(iy+1)->id();
iz=0;found=false;
do {
if(idtemp==idbars[iz]&&!done[iz]) {
done[iz]=true;
found=true;
}
++iz;
}
while(iz<idbars.size()&&!found);
if(found) ++nfound;
}
if(nfound==idbars.size()) {
cc=true;
imode=ix;
}
}
++ix;
}
while(imode<0&&ix<numberModes());
if(imode<0) {
string mode = parent->PDGName() + "->";
for(unsigned int ix=0;ix<children.size();++ix)
mode += children[ix]->PDGName() +",";
throw DecayIntegratorError() << "Unable to find the mode " << mode << " in "
<< name()
<< " ScalarMesonFactorizedDecayer::decay()"
<< Exception::abortnow;
}
return imode;
}
void ScalarMesonFactorizedDecayer::persistentOutput(PersistentOStream & os) const {
os << _current << _form << _ckm
<< _a1b << _a2b << _a1c << _a2c
<< _currentmapA << _currentmapB
<< _formmapA << _formmapB << _formpart << _wgtloc
<< _wgtmax << _weights << _CKMfact ;
}
void ScalarMesonFactorizedDecayer::persistentInput(PersistentIStream & is, int) {
is >> _current >> _form >> _ckm
>> _a1b >> _a2b >> _a1c >> _a2c
>> _currentmapA >> _currentmapB
>> _formmapA >> _formmapB >> _formpart >> _wgtloc
>> _wgtmax >> _weights >> _CKMfact;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<ScalarMesonFactorizedDecayer,DecayIntegrator>
describeHerwigScalarMesonFactorizedDecayer("Herwig::ScalarMesonFactorizedDecayer", "HwSMDecay.so");
void ScalarMesonFactorizedDecayer::Init() {
static ClassDocumentation<ScalarMesonFactorizedDecayer> documentation
("The ScalarMesonFactorizedDecayer class is designed for the weak decay of"
" scalar mesons using the factorization approximation.");
static RefVector<ScalarMesonFactorizedDecayer,WeakDecayCurrent> interfaceCurrents
("Currents",
"A vector of references to the currents",
&ScalarMesonFactorizedDecayer::_current, -1, false, false, true, false, false);
static RefVector<ScalarMesonFactorizedDecayer,ScalarFormFactor> interfaceFormFactors
("FormFactors",
"A vector of references to the form-factors",
&ScalarMesonFactorizedDecayer::_form, -1, false, false, true, false, false);
static Parameter<ScalarMesonFactorizedDecayer,double> interfacea1Bottom
("a1Bottom",
"The factorization paramter a_1 for decays of bottom baryons",
&ScalarMesonFactorizedDecayer::_a1b, 1.1, -10.0, 10.0,
false, false, true);
static Parameter<ScalarMesonFactorizedDecayer,double> interfacea2Bottom
("a2Bottom",
"The factorization paramter a_2 for decays of bottom baryons",
&ScalarMesonFactorizedDecayer::_a2b, -0.24, -10.0, 10.0,
false, false, true);
static Parameter<ScalarMesonFactorizedDecayer,double> interfacea1Charm
("a1Charm",
"The factorization paramter a_1 for decays of charm baryons",
&ScalarMesonFactorizedDecayer::_a1c, 1.3, -10.0, 10.0,
false, false, true);
static Parameter<ScalarMesonFactorizedDecayer,double> interfacea2Charm
("a2Charm",
"The factorization paramter a_2 for decays of charm baryons",
&ScalarMesonFactorizedDecayer::_a2c, -0.55, -10.0, 10.0,
false, false, true);
static ParVector<ScalarMesonFactorizedDecayer,int> interfaceWeightLocation
("WeightLocation",
"The locations of the weights for a given channel in the vector",
&ScalarMesonFactorizedDecayer::_wgtloc,
0, 0, 0, 0, 10000, false, false, true);
static ParVector<ScalarMesonFactorizedDecayer,double> interfaceWeightMax
("MaximumWeight",
"The maximum weight for a given channel.",
&ScalarMesonFactorizedDecayer::_wgtmax,
0, 0, 0, 0., 100., false, false, true);
static ParVector<ScalarMesonFactorizedDecayer,double> interfaceWeights
("Weights",
"The weights for the integration.",
&ScalarMesonFactorizedDecayer::_weights,
0, 0, 0, 0., 1., false, false, true);
}
double ScalarMesonFactorizedDecayer::me2(const int ichan,
const Particle & part,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME()) {
// create the matrix element
vector<PDT::Spin> spin;
for(unsigned int ix=0;ix<decay.size();++ix)
spin.push_back(decay[ix]->dataPtr()->iSpin());
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,spin)));
}
// initialisation
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&part),incoming);
_vectors.resize(decay.size());
_tensors.resize(decay.size());
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&part),
incoming,true);
// get the wavefunctions of the decay products
for(unsigned int ix=0;ix<decay.size();++ix) {
switch(decay[ix]->dataPtr()->iSpin()) {
case 1:
ScalarWaveFunction::constructSpinInfo(decay[ix],outgoing,true);
break;
case 3:
VectorWaveFunction::constructSpinInfo(_vectors[ix],decay[ix],outgoing,
true,false);
break;
case 5:
TensorWaveFunction::constructSpinInfo(_tensors[ix],decay[ix],outgoing,
true,false);
break;
default:
assert(false);
}
}
return 0.;
}
// get the wavefunctions of the decay products
for(unsigned int ix=0;ix<decay.size();++ix) {
switch(decay[ix]->dataPtr()->iSpin()) {
case 1:
break;
case 3:
VectorWaveFunction::
calculateWaveFunctions(_vectors[ix],decay[ix],outgoing,false);
break;
case 5:
TensorWaveFunction::
calculateWaveFunctions(_tensors[ix],decay[ix],outgoing,false);
break;
default:
assert(false);
}
}
ME()->zero();
// find the mode
unsigned int mode(imode()),chel,fhel;
int id0(part.id()),id1;
Complex ii(0.,1.);
vector<unsigned int> ihel(decay.size());
// loop over the different diagrams
vector<LorentzPolarizationVectorE> form;
Complex fp,f0,A0,A1,A2,A3,V,k;
complex<InvEnergy2> h,bp,bm;
// complex<Energy2> dot;
Lorentz5Momentum q,sum;
Energy2 q2;
Energy MP(part.mass()),MV,msum,mdiff,scale;
LorentzPolarizationVectorE dotv;
double pre;
ParticleVector cpart;
for(unsigned int iy=0;iy<_CKMfact[mode].size();++iy) {
MV=decay[_formpart[mode][iy]]->mass();
id1=decay[_formpart[mode][iy]]->id();
int id0t,id1t;
_form[_formmapA[mode][iy]]->particleID(_formmapB[mode][iy],id0t,id1t);
bool cc(id0t!=id0);
// calculate the form-factor part
form.clear();
q = part.momentum()-decay[_formpart[mode][iy]]->momentum(); q.rescaleMass();
sum = part.momentum()+decay[_formpart[mode][iy]]->momentum();sum.rescaleMass();
q2=q.mass2();
if(decay[_formpart[mode][iy]]->dataPtr()->iSpin()==1) {
_form[_formmapA[mode][iy]]->ScalarScalarFormFactor(q2,_formmapB[mode][iy],
id0,id1,MP,MV,f0,fp);
pre=(MP*MP-MV*MV)/q2;
form.push_back(fp*sum+pre*(f0-fp)*q);
}
else if(decay[_formpart[mode][iy]]->dataPtr()->iSpin()==3) {
msum=MP+MV;mdiff=MP-MV;
_form[_formmapA[mode][iy]]->ScalarVectorFormFactor(q2,_formmapB[mode][iy],id0,
id1,MP,MV,A0,A1,A2,V);
if(cc){V=-V;}
- A3 = 0.5/MV*(msum*A1-mdiff*A2);
+ A3 = Complex(0.5/MV*(msum*A1-mdiff*A2));
// compute the hadron currents
for(unsigned int ix=0;ix<3;++ix) {
// dot product
complex<Energy> dot = _vectors[_formpart[mode][iy]][ix]*part.momentum();
// current
form.push_back(-ii*msum*A1*_vectors[_formpart[mode][iy]][ix]
+ii*A2/msum*dot*sum
+2.*ii*MV/q2*(A3-A0)*dot*q
+2.*V/msum*epsilon(_vectors[_formpart[mode][iy]][ix],
part.momentum(),
decay[_formpart[mode][iy]]->momentum()));
}
}
else if(decay[_formpart[mode][iy]]->dataPtr()->iSpin()==5) {
_form[_formmapA[mode][iy]]->ScalarTensorFormFactor(q2,_formmapB[mode][iy],
id0,id1,MP,MV,h,k,bp,bm);
if(cc){h=-h;}
// compute the hadron currents
for(unsigned int ix=0;ix<5;++ix) {
dotv = _tensors[_formpart[mode][iy]][ix]*part.momentum();
complex<Energy2> dot = dotv*part.momentum();
form.push_back(ii*h*epsilon(dotv,sum,q)-k*dotv
-bp*dot*sum-bm*dot*q);
}
}
// find the particles for the current
cpart.clear();
for(unsigned int ix=0;ix<decay.size();++ix)
{if(ix!=_formpart[mode][iy]){cpart.push_back(decay[ix]);}}
unsigned int ix=decay.size();
vector<unsigned int> constants(decay.size()+1),ihel(decay.size()+1);
int itemp(1);
do {
--ix;
if(ix!=_formpart[mode][iy]) {
itemp*=decay[ix]->data().iSpin();
constants[ix]=itemp;
}
}
while(ix!=0);
constants[decay.size()]=1;
if(_formpart[mode][iy]!=decay.size())
constants[_formpart[mode][iy]]=constants[_formpart[mode][iy]+1];
// calculate the current
vector<LorentzPolarizationVectorE>
curr=_current[_currentmapA[mode][iy]]->
current(_currentmapB[mode][iy],ichan,scale,cpart,meopt);
pre = (pow(part.mass()/scale,int(cpart.size()-2)));
// loop over the helicities to calculate the matrix element
ihel[0]=0;
for(chel=0;chel<curr.size();++chel) {
for(ix=decay.size();ix>0;--ix) {
if(ix!=_formpart[mode][iy]+1)
ihel[ix]=(chel%constants[ix-1])/constants[ix];
}
for(fhel=0;fhel<form.size();++fhel) {
ihel[_formpart[mode][iy]+1]=fhel;
- (*ME())(ihel) +=pre*_CKMfact[mode][iy]*
- form[fhel].dot(curr[chel])*SM().fermiConstant();
+ (*ME())(ihel) += Complex(pre*_CKMfact[mode][iy]*
+ form[fhel].dot(curr[chel])*SM().fermiConstant());
}
}
}
// perform the contraction
return 0.5*(ME()->contract(_rho)).real();
}
void ScalarMesonFactorizedDecayer::findModes(unsigned int imode,
vector<tPDVector> & particles,
vector<unsigned int> & loc,
vector<bool> & cc) {
unsigned int ix,iy,nfound,iz;
// resize the vectors
loc.clear();cc.clear();
// get the id's for the mode
vector<int> id,idbar;
int idtemp; bool found;
for(ix=0;ix<particles[imode].size();++ix) {
id.push_back(particles[imode][ix]->id());
if(particles[imode][ix]->CC()) idbar.push_back(particles[imode][ix]->CC()->id());
else idbar.push_back(id[ix]);
}
vector<bool> done(id.size(),false);
// loop over the modes
for(ix=0;ix<particles.size();++ix) {
if(ix==imode||particles[ix].empty()) continue;
assert(!particles[ix].empty());
assert(particles[ix][0]);
// the particle mode
if(particles[ix][0]->id()==id[0]&&particles[ix].size()==id.size()) {
nfound=1;
for(iy=0;iy<id.size();++iy){done[iy]=false;}
for(iy=1;iy<id.size();++iy) {
idtemp=particles[ix][iy]->id();
iz=1;
found=false;
do {
if(idtemp==id[iz]&&!done[iz]) {
done[iz]=true;
found=true;
}
++iz;
}
while(iz<id.size()&&!found);
if(found) ++nfound;
}
if(nfound==id.size()) {
cc.push_back(false);
loc.push_back(ix);
}
}
// the charge conjugate mode
if(particles[ix][0]->id()==idbar[0]&&particles[ix].size()==idbar.size()) {
nfound=1;
for(iy=0;iy<idbar.size();++iy) done[iy]=false;
for(iy=1;iy<idbar.size();++iy) {
idtemp=particles[ix][iy]->id();
iz=1;
found=false;
do {
if(idtemp==idbar[iz]&&!done[iz]) {
done[iz]=true;
found=true;
}
++iz;
}
while(iz<idbar.size()&&!found);
if(found){++nfound;}
}
if(nfound==idbar.size()){cc.push_back(false);loc.push_back(ix);}
}
}
}
void ScalarMesonFactorizedDecayer::dataBaseOutput(ofstream & output,
bool header) const {
unsigned int ix;
if(header) output << "update decayers set parameters=\"";
DecayIntegrator::dataBaseOutput(output,false);
output << "newdef " << name() << ":a1Bottom " << _a1b << "\n";
output << "newdef " << name() << ":a2Bottom " << _a2b << "\n";
output << "newdef " << name() << ":a1Charm " << _a1c << "\n";
output << "newdef " << name() << ":a2Charm " << _a2c << "\n";
for(ix=0;ix<_current.size();++ix) {
_current[ix]->dataBaseOutput(output,false,true);
output << "insert " << name() << ":Currents " << ix << " "
<< _current[ix]->name() << " \n";
}
for(ix=0;ix<_form.size();++ix) {
_form[ix]->dataBaseOutput(output,false,true);
output << "insert " << name() << ":FormFactors " << ix << " "
<< _form[ix]->name() << " \n";
}
for(ix=0;ix<_wgtloc.size();++ix) {
output << "insert " << name() << ":WeightLocation " << ix << " "
<< _wgtloc[ix] << "\n";
}
for(ix=0;ix<_wgtmax.size();++ix) {
output << "insert " << name() << ":MaximumWeight " << ix << " "
<< _wgtmax[ix] << "\n";
}
for(ix=0;ix<_weights.size();++ix) {
output << "insert " << name() << ":Weights " << ix << " "
<< _weights[ix] << "\n";
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.h b/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.h
--- a/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.h
+++ b/Decay/ScalarMeson/ScalarMesonFactorizedDecayer.h
@@ -1,305 +1,305 @@
// -*- C++ -*-
//
// ScalarMesonFactorizedDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ScalarMesonFactorizedDecayer_H
#define HERWIG_ScalarMesonFactorizedDecayer_H
//
// This is the declaration of the ScalarMesonFactorizedDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/WeakCurrents/WeakDecayCurrent.h"
#include "Herwig/Decay/FormFactors/ScalarFormFactor.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Models/StandardModel/StandardCKM.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>ScalarMesonFactorizedDecayer</code> class is a class which combines a
* WeakDecayCurrent and a ScalarFormFactor in the naive factorization approximation
* to perform the non-leptonic weak decays of scalar mesons.
*
* @see DecayIntegrator
* @see WeakDecayCurrent
* @see ScalarFormFactor
*
*/
class ScalarMesonFactorizedDecayer: public DecayIntegrator {
public:
/**
* The default constructor.
*/
ScalarMesonFactorizedDecayer();
public:
/** @name Virtual functions required by the Decayer and DecayIntegrator classes. */
//@{
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* This function combines the current and the form factor to give the matrix
* element.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2( const int ichan, const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* Find duplicate modes in the list of particles
* @param imode The mode we are studying
* @param particles The external particles for the different modes
* @param loc The location of the duplicate mode
* @param cc If the duplicate is the charge conjugate
*/
void findModes(unsigned int imode,vector<tPDVector> & particles,
vector<unsigned int> & loc,vector<bool> & cc);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ScalarMesonFactorizedDecayer & operator=(const ScalarMesonFactorizedDecayer &);
+ ScalarMesonFactorizedDecayer & operator=(const ScalarMesonFactorizedDecayer &) = delete;
private:
/**
* The weak decay current
*/
vector<WeakDecayCurrentPtr> _current;
/**
* The baryon form factor
*/
vector<ScalarFormFactorPtr> _form;
/**
* The perturbative coefficients
*/
//@{
/**
* The perturbative \f$a_1\f$ coefficient for b decays.
*/
double _a1b;
/**
* The perturbative \f$a_2\f$ coefficient for b decays.
*/
double _a2b;
/**
* The perturbative \f$a_1\f$ coefficient for c decays.
*/
double _a1c;
/**
* The perturbative \f$a_2\f$ coefficient for c decays.
*/
double _a2c;
//@}
/**
* Mapping of the modes to the currents
*/
//@{
/**
* First map
*/
vector<vector<unsigned int> > _currentmapA;
/**
* Second map
*/
vector<vector<unsigned int> > _currentmapB;
//@}
/**
* Mapping of the modes to the form factors
*/
//@{
/**
* First map
*/
vector<vector<unsigned int> > _formmapA;
/**
* Second map
*/
vector<vector<unsigned int> > _formmapB;
//@}
/**
* Outgoing particle from the form factor
*/
vector<vector<unsigned int> > _formpart;
/**
* The CKM factors
*/
vector<vector<Complex> > _CKMfact;
/**
* location of the weights
*/
vector<int> _wgtloc;
/**
* the maximum weights
*/
vector<double> _wgtmax;
/**
* Weights for the different channels
*/
vector<double> _weights;
/**
* Pointer to the CKM object.
*/
Ptr<StandardCKM>::pointer _ckm;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decay products
*/
mutable vector<vector<Helicity::LorentzPolarizationVector> > _vectors;
/**
* Polarization tensors for the decay products
*/
mutable vector<vector<Helicity::LorentzTensor<double> > > _tensors;
};
}
#endif /* HERWIG_ScalarMesonFactorizedDecayer_H */
diff --git a/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.cc b/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.cc
--- a/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.cc
+++ b/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.cc
@@ -1,278 +1,278 @@
// -*- C++ -*-
//
// ScalarMesonTensorScalarDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ScalarMesonTensorScalarDecayer class.
//
#include "ScalarMesonTensorScalarDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void ScalarMesonTensorScalarDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
ScalarMesonTensorScalarDecayer::ScalarMesonTensorScalarDecayer()
: _incoming(3), _outgoingT(3), _outgoingS(3), _coupling(3), _maxweight(3) {
// D+ -> f_2 pi
_incoming[0] = 411; _outgoingT[0] = 225; _outgoingS[0] = 211;
_coupling[0] = 8.23E-7/GeV; _maxweight[0] = 5;
// chi_c0 -> K*_0 K*_2
_incoming[1] = 10441; _outgoingT[1] = 325; _outgoingS[1] = -10321;
_coupling[1] = 0.0217/GeV; _maxweight[1] = 5;
_incoming[2] = 10441; _outgoingT[2] = 315; _outgoingS[2] = -10311;
_coupling[2] = 0.0217/GeV; _maxweight[2] = 5;
// initial size of the arrays
_initsize=_incoming.size();
// intermediates
generateIntermediates(false);
}
void ScalarMesonTensorScalarDecayer::doinit() {
DecayIntegrator::doinit();
// check the parameters arew consistent
unsigned int isize=_coupling.size();
if(isize!=_incoming.size() || isize!=_outgoingT.size()||
isize!=_outgoingS.size() || isize!=_maxweight.size())
throw InitException() << "Inconsistent parameters in "
<< "ScalarMesonTensorScalarDecayer"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt;
DecayPhaseSpaceModePtr mode;
tPDVector extpart(3);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0] = getParticleData(_incoming[ix]);
extpart[1] = getParticleData(_outgoingT[ix]);
extpart[2] = getParticleData(_outgoingS[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
int ScalarMesonTensorScalarDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id0(parent->id());
int id0bar = parent->CC() ? parent->CC()->id() : id0;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
unsigned int ix(0);
int imode(-1);
do {
if(id0 ==_incoming[ix]) {
if((id1 ==_outgoingT[ix]&&id2 ==_outgoingS[ix])||
(id2 ==_outgoingT[ix]&&id1 ==_outgoingS[ix])) {
imode=ix;
cc=false;
}
}
if(id0bar==_incoming[ix]&&imode<0) {
if((id1bar==_outgoingT[ix]&&id2bar==_outgoingS[ix])||
(id2bar==_outgoingT[ix]&&id1bar==_outgoingS[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void ScalarMesonTensorScalarDecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_coupling,1/GeV) << _incoming << _outgoingT << _outgoingS << _maxweight;
}
void ScalarMesonTensorScalarDecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_coupling,1/GeV) >> _incoming >> _outgoingT >> _outgoingS >> _maxweight;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<ScalarMesonTensorScalarDecayer,DecayIntegrator>
describeHerwigScalarMesonTensorScalarDecayer("Herwig::ScalarMesonTensorScalarDecayer", "HwSMDecay.so");
void ScalarMesonTensorScalarDecayer::Init() {
static ClassDocumentation<ScalarMesonTensorScalarDecayer> documentation
("The ScalarMesonTensorScalarDecayer class is designed for"
" the decay of a pseduoscalar meson to two spin-1 particles.");
static ParVector<ScalarMesonTensorScalarDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&ScalarMesonTensorScalarDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<ScalarMesonTensorScalarDecayer,int> interfaceOutcomingT
("OutgoingTensor",
"The PDG code for the outgoing tensor",
&ScalarMesonTensorScalarDecayer::_outgoingT,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<ScalarMesonTensorScalarDecayer,int> interfaceOutcomingS
("OutgoingScalar",
"The PDG code for the outgoing scalar",
&ScalarMesonTensorScalarDecayer::_outgoingS,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<ScalarMesonTensorScalarDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&ScalarMesonTensorScalarDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 100./GeV, false, false, true);
static ParVector<ScalarMesonTensorScalarDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&ScalarMesonTensorScalarDecayer::_maxweight,
0, 0, 0, 0., 100., false, false, true);
}
double ScalarMesonTensorScalarDecayer::me2(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin0,PDT::Spin2,PDT::Spin0)));
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
TensorWaveFunction::constructSpinInfo(_tensors,decay[0],
outgoing,true,false);
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
TensorWaveFunction::
calculateWaveFunctions(_tensors,decay[0],outgoing,false);
// calculate the matrix element
InvEnergy2 fact(_coupling[imode()]/inpart.mass());
LorentzPolarizationVectorE vtemp;
for(unsigned int ix=0;ix<5;++ix) {
vtemp = _tensors[ix]*inpart.momentum();
- (*ME())(0,ix,0) = fact * decay[1]->momentum().dot(vtemp);
+ (*ME())(0,ix,0) = Complex(fact * decay[1]->momentum().dot(vtemp));
}
// test of the matrix element
// double me=newME.contract(rhoin).real();
// Energy pcm = Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = 2.*pow<4,1>(pcm)*sqr(_coupling[imode()]*inpart.mass())/
// 3./pow<4,1>(decay[0]->mass());
// cerr << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << (me-test)/(me+test) << "\n";
// output the answer
return ME()->contract(_rho).real();
}
// specify the 1-2 matrix element to be used in the running width calculation
bool ScalarMesonTensorScalarDecayer::twoBodyMEcode(const DecayMode & dm, int & itype,
double & coupling) const {
int id(dm.parent()->id());
int idbar = dm.parent()->CC() ? dm.parent()->CC()->id() : id;
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());
int id1bar = (**pit).CC() ? (**pit).CC()->id() : id1;
++pit;
int id2((**pit).id());
int id2bar = (**pit).CC() ? (**pit).CC()->id() : id2;
unsigned int ix(0);
bool order(false);
int imode(-1);
do {
if(id ==_incoming[ix]) {
if(id1==_outgoingT[ix]&&id2==_outgoingS[ix]) {
imode=ix;
order=true;
}
if(id2==_outgoingT[ix]&&id1==_outgoingS[ix]) {
imode=ix;
order=false;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoingT[ix]&&id2bar==_outgoingS[ix]) {
imode=ix;
order=true;
}
if(id2bar==_outgoingT[ix]&&id1bar==_outgoingS[ix]) {
imode=ix;
order=false;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling=_coupling[imode]*dm.parent()->mass();
itype = 11;
return order;
}
// output the setup information for the particle database
void ScalarMesonTensorScalarDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":OutgoingTensor " << ix << " "
<< _outgoingT[ix] << "\n";
output << "newdef " << name() << ":OutgoingScalar " << ix << " "
<< _outgoingS[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":OutgoingTensor " << ix << " "
<< _outgoingT[ix] << "\n";
output << "insert " << name() << ":OutgoingScalar " << ix << " "
<< _outgoingS[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.h b/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.h
--- a/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.h
+++ b/Decay/ScalarMeson/ScalarMesonTensorScalarDecayer.h
@@ -1,191 +1,191 @@
// -*- C++ -*-
//
// ScalarMesonTensorScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ScalarMesonTensorScalarDecayer_H
#define HERWIG_ScalarMesonTensorScalarDecayer_H
//
// This is the declaration of the ScalarMesonTensorScalarDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzTensor.h"
namespace Herwig {
using namespace Herwig;
/** \ingroup Decayer
*
* The <code>ScalarMesonTensorScalarDecayer</code> class is designed for the decay
* of a (pseudo)scalar meson to a tensor meson and another (pseudo)scalar meson.
* The matrix element takes the form
*
* \f[\mathcal{M} = \epsilon^{\alpha\beta} p_{0\alpha} p_{2\beta} \f]
*
* The incoming and outgoing mesons and the coupling can be specified using the
* interfaces.
*
* @see DecayIntegrator.
*
*/
class ScalarMesonTensorScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
ScalarMesonTensorScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 11.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ScalarMesonTensorScalarDecayer & operator=(const ScalarMesonTensorScalarDecayer &);
+ ScalarMesonTensorScalarDecayer & operator=(const ScalarMesonTensorScalarDecayer &) = delete;
private:
/**
* the PDG code for the incoming particle
*/
vector<int> _incoming;
/**
* the PDG code for the tensor meson
*/
vector<int> _outgoingT;
/**
* the PDG code for the scalar meson
*/
vector<int> _outgoingS;
/**
* the coupling for the decay
*/
vector<InvEnergy> _coupling;
/**
* the maximum weight for the decay
*/
vector<double> _maxweight;
/**
* initial number of modes
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization tensors for the decay product
*/
mutable vector<Helicity::LorentzTensor<double> > _tensors;
};
}
#endif /* HERWIG_ScalarMesonTensorScalarDecayer_H */
diff --git a/Decay/ScalarMeson/ScalarScalarScalarDecayer.h b/Decay/ScalarMeson/ScalarScalarScalarDecayer.h
--- a/Decay/ScalarMeson/ScalarScalarScalarDecayer.h
+++ b/Decay/ScalarMeson/ScalarScalarScalarDecayer.h
@@ -1,185 +1,185 @@
// -*- C++ -*-
//
// ScalarScalarScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ScalarScalarScalarDecayer_H
#define HERWIG_ScalarScalarScalarDecayer_H
// This is the declaration of the ScalarScalarScalarDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>ScalarScalarScalarDecayer</code> class is designed for the decay
* of a scalar meson to two scalar mesons. This decay is obviously trival,
* however this decayer allows us to include off-shell effects for the outgoing
* particles and the correct calculation of the running width for the incoming
* particle.
*
* The matrix element is taken to b
* \f[\mathcal{M} = g \f].
*
* @see DecayIntegrator
*
* \author Peter Richardson
*
*/
class ScalarScalarScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
ScalarScalarScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 6.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ScalarScalarScalarDecayer & operator=(const ScalarScalarScalarDecayer &);
+ ScalarScalarScalarDecayer & operator=(const ScalarScalarScalarDecayer &) = delete;
private:
/**
* the PDG code for the incoming particle
*/
vector<int> _incoming;
/**
* the PDG code for the first outgoing particle
*/
vector<int> _outgoing1;
/**
* the PDG code for the second incoming particle
*/
vector<int> _outgoing2;
/**
* the coupling for the decay
*/
vector<Energy> _coupling;
/**
* the maximum weight for the decay
*/
vector<double> _maxweight;
/**
* initial number of modes
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_ScalarScalarScalarDecayer_H */
diff --git a/Decay/ScalarMeson/ScalarVectorVectorDecayer.cc b/Decay/ScalarMeson/ScalarVectorVectorDecayer.cc
--- a/Decay/ScalarMeson/ScalarVectorVectorDecayer.cc
+++ b/Decay/ScalarMeson/ScalarVectorVectorDecayer.cc
@@ -1,281 +1,281 @@
// -*- C++ -*-
//
// ScalarVectorVectorDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ScalarVectorVectorDecayer class.
//
#include "ScalarVectorVectorDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void ScalarVectorVectorDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
ScalarVectorVectorDecayer::ScalarVectorVectorDecayer()
: _incoming(13), _outgoing1(13), _outgoing2(13), _coupling(13),
_maxweight(13) {
// f_0(1370) to rho rho
_incoming[0] = 10221; _outgoing1[0] = 113; _outgoing2[0] = 113;
_coupling[0] = 11.26/GeV; _maxweight[0] = 20.;
_incoming[1] = 10221; _outgoing1[1] = 213; _outgoing2[1] = -213;
_coupling[1] = 15.92/GeV; _maxweight[1] = 20.;
// f_0(1500) to rho rho
_incoming[2] = 9030221; _outgoing1[2] = 113; _outgoing2[2] = 113;
_coupling[2] = 1.691/GeV; _maxweight[2] = 20.;
_incoming[3] = 9030221; _outgoing1[3] = 213; _outgoing2[3] = -213;
_coupling[3] = 2.391/GeV; _maxweight[3] = 20.;
// chi_c0 decays
_incoming[4] = 10441; _outgoing1[4] = 443; _outgoing2[4] = 22;
_coupling[4] = 0.251/GeV; _maxweight[4] = 1.;
_incoming[5] = 10441; _outgoing1[5] = 323; _outgoing2[5] = -323;
_coupling[5] = 0.0088/GeV; _maxweight[5] = 1.;
_incoming[6] = 10441; _outgoing1[6] = 313; _outgoing2[6] = -313;
_coupling[6] = 0.0088/GeV; _maxweight[6] = 1.;
_incoming[7] = 10441; _outgoing1[7] = 333; _outgoing2[7] = 333;
_coupling[7] = 0.0067/GeV; _maxweight[7] = 1.;
_incoming[8] = 10441; _outgoing1[8] = 22; _outgoing2[8] = 22;
_coupling[8] = 0.0027/GeV; _maxweight[8] = 1.;
_incoming[12] = 10441; _outgoing1[12] = 223; _outgoing2[12] = 223;
_coupling[12] = 0.0093/GeV; _maxweight[12] = 1.;
// a'_0 -> omega rho
_incoming[9] = 10111; _outgoing1[9] = 113; _outgoing2[9] = 223;
_coupling[9] = 27.09/GeV; _maxweight[9] = 20.;
_incoming[10] = 10211; _outgoing1[10] = 213; _outgoing2[10] = 223;
_coupling[10] = 27.09/GeV; _maxweight[10] = 20.;
_incoming[11] =-10211; _outgoing1[11] =-213; _outgoing2[11] = 223;
_coupling[11] = 27.09/GeV; _maxweight[11] = 20.;
// size of arrays
_initsize = _incoming.size();
// intermediates
generateIntermediates(false);
}
void ScalarVectorVectorDecayer::doinit() {
DecayIntegrator::doinit();
// check the parameters arew consistent
unsigned int isize(_coupling.size());
if(isize!=_incoming.size() || isize!=_outgoing1.size()||
isize!=_outgoing2.size() || isize!=_maxweight.size())
throw InitException() << "Inconsistent parameters in "
<< "ScalarVectorVectorDecayerDecayer"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt;
DecayPhaseSpaceModePtr mode;
tPDVector extpart(3);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0] = getParticleData(_incoming[ix]);
extpart[1] = getParticleData(_outgoing1[ix]);
extpart[2] = getParticleData(_outgoing2[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
int ScalarVectorVectorDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
cc = false;
// check that at least some modes exist
// must be two outgoing particles
if(_incoming.size()==0||children.size()!=2) return -1;
// ids of the particles
int id0(parent->id());
int id1(children[0]->id());
int id2(children[1]->id());
// loop over the modes and see if this is one of them
unsigned int ix=0;
int imode(-1);
do {
if(_incoming[ix]==id0) {
if((_outgoing1[ix]==id1&&_outgoing2[ix]==id2)||
(_outgoing1[ix]==id2&&_outgoing2[ix]==id1)) imode=ix;
}
++ix;
}
while(imode<0&&ix<_incoming.size());
return imode;
}
void ScalarVectorVectorDecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_coupling,1/GeV) << _incoming << _outgoing1 << _outgoing2 << _maxweight;
}
void ScalarVectorVectorDecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_coupling,1/GeV) >> _incoming >> _outgoing1 >> _outgoing2 >> _maxweight;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<ScalarVectorVectorDecayer,DecayIntegrator>
describeHerwigScalarVectorVectorDecayer("Herwig::ScalarVectorVectorDecayer", "HwSMDecay.so");
void ScalarVectorVectorDecayer::Init() {
static ClassDocumentation<ScalarVectorVectorDecayer> documentation
("The ScalarVectorVectorDecayer class is designed for"
" the decay of a pseduoscalar meson to two spin-1 particles.");
static ParVector<ScalarVectorVectorDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&ScalarVectorVectorDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<ScalarVectorVectorDecayer,int> interfaceOutcoming1
("FirstOutgoing",
"The PDG code for the first outgoing particle",
&ScalarVectorVectorDecayer::_outgoing1,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<ScalarVectorVectorDecayer,int> interfaceOutcoming2
("SecondOutgoing",
"The PDG code for the second outgoing particle",
&ScalarVectorVectorDecayer::_outgoing2,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<ScalarVectorVectorDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&ScalarVectorVectorDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 10000/GeV, false, false, true);
static ParVector<ScalarVectorVectorDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&ScalarVectorVectorDecayer::_maxweight,
0, 0, 0, 0., 500000., false, false, true);
}
double ScalarVectorVectorDecayer::me2(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin0,PDT::Spin1,PDT::Spin1)));
bool photon[2]={false,false};
for(unsigned int ix=0;ix<2;++ix)
photon[ix] = decay[ix]->id()==ParticleID::gamma;
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::constructSpinInfo(_vectors[ix],decay[ix],
outgoing,true,photon[ix]);
return 0.;
}
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::
calculateWaveFunctions(_vectors[ix],decay[ix],outgoing,photon[ix]);
// now compute the matrix element
InvEnergy2 fact(_coupling[imode()]/inpart.mass());
Energy2 p1p2(decay[0]->momentum()*decay[1]->momentum());
unsigned int ix,iy;
for(ix=0;ix<3;++ix) {
for(iy=0;iy<3;++iy) {
- (*ME())(0,ix,iy)=fact*(p1p2*_vectors[0][ix].dot(_vectors[1][iy])-
- (_vectors[1][iy]*decay[0]->momentum())*
- (_vectors[0][ix]*decay[1]->momentum()));
+ (*ME())(0,ix,iy)=Complex(fact*(p1p2*_vectors[0][ix].dot(_vectors[1][iy])-
+ (_vectors[1][iy]*decay[0]->momentum())*
+ (_vectors[0][ix]*decay[1]->momentum())));
}
}
// test of the matrix element
// double me = newME.contract(rhoin).real();
// Energy pcm=Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = sqr(_coupling[imode()]/inpart.mass())*
// (2.*sqr(pcm*inpart.mass())+3.*sqr(decay[0]->mass()*decay[1]->mass()));
// cerr << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << test << " " << (me-test)/(me+test) << "\n";
return ME()->contract(_rho).real();
}
// output the setup info for the particle database
void ScalarVectorVectorDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "newdef " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "insert " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
// specify the 1-2 matrix element to be used in the running width calculation
bool ScalarVectorVectorDecayer::twoBodyMEcode(const DecayMode & dm, int & itype,
double & coupling) const {
int imode(-1);
int id(dm.parent()->id());
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());++pit;
int id2((**pit).id());
unsigned int ix(0);
do {
if(_incoming[ix]==id) {
if((id1==_outgoing1[ix]&&id2==_outgoing2[ix])||
(id2==_outgoing1[ix]&&id1==_outgoing2[ix])) imode=ix;
}
++ix;
}
while(imode<0&&ix<_incoming.size());
coupling=_coupling[imode]*dm.parent()->mass();
itype = 12;
return id1==_outgoing1[imode]&&id2==_outgoing2[imode];
}
diff --git a/Decay/ScalarMeson/ScalarVectorVectorDecayer.h b/Decay/ScalarMeson/ScalarVectorVectorDecayer.h
--- a/Decay/ScalarMeson/ScalarVectorVectorDecayer.h
+++ b/Decay/ScalarMeson/ScalarVectorVectorDecayer.h
@@ -1,197 +1,197 @@
// -*- C++ -*-
//
// ScalarVectorVectorDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ScalarVectorVectorDecayer_H
#define HERWIG_ScalarVectorVectorDecayer_H
//
// This is the declaration of the ScalarVectorVectorDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/**
* The ScalarVectorVectorDecayer class is designed to perform the decay of
* a scalar meson to two spin-1 particles. The matrix element is taken
* to have the form
* \f[\mathcal{M}=g\left[ p_1 \cdot p_2 \epsilon_1 \cdot \epsilon_2
* -p_1 \cdot \epsilon_2 p_2 \cdot\epsilon_1\right],\f]
* where \f$\epsilon_{1,2}\f$ are the polarzation
* vectors of the outgoing vector particles.
*
* The incoming scalar meson, the outgoing vectors and the coupling can
* be specified using the relevant interfaces.
*
* @see DecayIntegrator
*/
class ScalarVectorVectorDecayer: public DecayIntegrator {
public:
/**
* The default constructor.
*/
ScalarVectorVectorDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 3.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ScalarVectorVectorDecayer & operator=(const ScalarVectorVectorDecayer &);
+ ScalarVectorVectorDecayer & operator=(const ScalarVectorVectorDecayer &) = delete;
private:
/**
* the PDG code for the incoming particle
*/
vector<int> _incoming;
/**
* the PDG code for the first outgoing particle
*/
vector<int> _outgoing1;
/**
* the PDG code for the second outgoing particle
*/
vector<int> _outgoing2;
/**
* the coupling for the decay, \f$g\f$.
*/
vector<InvEnergy> _coupling;
/**
* the maximum weight for the decay
*/
vector<double> _maxweight;
/**
* initial number of modes
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the ecay products
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_ScalarVectorVectorDecayer_H */
diff --git a/Decay/ScalarMeson/SemiLeptonicScalarDecayer.cc b/Decay/ScalarMeson/SemiLeptonicScalarDecayer.cc
--- a/Decay/ScalarMeson/SemiLeptonicScalarDecayer.cc
+++ b/Decay/ScalarMeson/SemiLeptonicScalarDecayer.cc
@@ -1,345 +1,345 @@
// -*- C++ -*-
//
// SemiLeptonicScalarDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SemiLeptonicScalarDecayer class.
//
#include "SemiLeptonicScalarDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "ThePEG/Helicity/epsilon.h"
#include "ThePEG/Helicity/LorentzTensor.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
SemiLeptonicScalarDecayer::SemiLeptonicScalarDecayer() {
// intermediates
generateIntermediates(true);
}
void SemiLeptonicScalarDecayer::doinitrun() {
_current->initrun();
_form->initrun();
DecayIntegrator::doinitrun();
if(initialize()) {
_maxwgt.clear();
for(unsigned int ix=0;ix<numberModes();++ix) {
_maxwgt.push_back(mode(ix)->maxWeight());
}
}
}
void SemiLeptonicScalarDecayer::doinit() {
DecayIntegrator::doinit();
// make sure the current got initialised
_current->init();
// and the form factors
_form->init();
// the channels
tPDVector extpart,ptemp;
_modemap.clear();
double maxweight;
vector<double> channelwgts(1,1.);
int id0(0),id1(0),Wcharge(0);
Energy min;
DecayPhaseSpaceModePtr mode;
DecayPhaseSpaceChannelPtr channel;
int iq,ia; unsigned int ix,iy,iz;
bool done;
for(ix=0;ix<_form->numberOfFactors();++ix) {
// get the external particles for this mode
extpart.resize(2);
_form->particleID(ix,id0,id1);
extpart[0]=getParticleData(id0);
extpart[1]=getParticleData(id1);
_modemap.push_back(numberModes());
if(!extpart[0]||!extpart[1]) continue;
Wcharge =(extpart[0]->iCharge()-extpart[1]->iCharge());
min = extpart[0]->mass()+extpart[0]->widthUpCut()
-extpart[1]->mass()+extpart[1]->widthLoCut();
for(iy=0;iy<_current->numberOfModes();++iy) {
extpart.resize(2);
_current->decayModeInfo(iy,iq,ia);
ptemp=_current->particles(Wcharge,iy,iq,ia);
for(iz=0;iz<ptemp.size();++iz) {
extpart.push_back(ptemp[iz]);
}
// create the mode
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
// create the first piece of the channel
channel = new_ptr(DecayPhaseSpaceChannel(mode));
channel->addIntermediate(extpart[0],0,0.0,1,-1);
done=_current->createMode(Wcharge,iy,mode,2,1,channel,min);
if(done) {
// the maximum weight
if(_maxwgt.size()>numberModes()) maxweight=_maxwgt[numberModes()];
else maxweight=2.;
channelwgts.resize(mode->numberChannels(),
1./(mode->numberChannels()));
addMode(mode,maxweight,channelwgts);
}
}
}
}
bool SemiLeptonicScalarDecayer::accept(tcPDPtr parent,
const tPDVector & children) const {
// find the non-lepton
int imes(0),idtemp,idin(parent->id());
vector<int> idother; bool dummy;
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(abs(idtemp)>16) imes=idtemp;
else idother.push_back(idtemp);
}
// check that the form factor exists
if(_form->formFactorNumber(idin,imes,dummy)<0) return false;
// and the current
return _current->accept(idother);
}
int SemiLeptonicScalarDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
// find the ids of the particles for the decay current
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
int idtemp,imes(0),idin(parent->id());
vector<int> idother;
cc=false;
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(abs(idtemp)>16) imes=idtemp;
else idother.push_back(idtemp);
}
return _modemap[_form->formFactorNumber(idin,imes,cc)]
+_current->decayMode(idother);
}
void SemiLeptonicScalarDecayer::persistentOutput(PersistentOStream & os) const {
os << _current << _form << _maxwgt << _modemap;
}
void SemiLeptonicScalarDecayer::persistentInput(PersistentIStream & is, int) {
is >> _current >> _form >> _maxwgt >> _modemap;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<SemiLeptonicScalarDecayer,DecayIntegrator>
describeHerwigSemiLeptonicScalarDecayer("Herwig::SemiLeptonicScalarDecayer", "HwSMDecay.so");
void SemiLeptonicScalarDecayer::Init() {
static ClassDocumentation<SemiLeptonicScalarDecayer> documentation
("The SemiLeptonicScalarDecayer class is designed for the"
"semi-leptonic decay of a (pseudo)-scalar meson.");
static Reference<SemiLeptonicScalarDecayer,LeptonNeutrinoCurrent> interfaceCurrent
("Current",
"The current for the leptons produced in the decay.",
&SemiLeptonicScalarDecayer::_current, true, true, true, false, false);
static Reference<SemiLeptonicScalarDecayer,ScalarFormFactor> interfaceFormFactor
("FormFactor",
"The form factor",
&SemiLeptonicScalarDecayer::_form, true, true, true, false, false);
static ParVector<SemiLeptonicScalarDecayer,double> interfaceMaximumWeight
("MaximumWeight",
"The maximum weights for the decays",
&SemiLeptonicScalarDecayer::_maxwgt,
0, 0, 0, 0, 100., false, false, true);
}
// combine the currents and form-factors to give the matrix element
double SemiLeptonicScalarDecayer::me2(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
// get the information on the form-factor
int jspin(0),id0(inpart.id()),id1(decay[0]->id());
bool cc(false);
unsigned int iloc(_form->formFactorNumber(id0,id1,cc));
int spect,iq,ia;
_form->formFactorInfo(iloc,jspin,spect,iq,ia);
// extract leptons for the lepton current
Energy scale;
ParticleVector leptons;
leptons.push_back(decay[decay.size()-2]);
leptons.push_back(decay[decay.size()-1]);
int mode=(abs(decay[1]->id())-11)/2;
if(!ME()) {
if(jspin==0)
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,PDT::Spin0,PDT::Spin1Half,PDT::Spin1Half)));
else if(jspin==1)
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,PDT::Spin1,PDT::Spin1Half,PDT::Spin1Half)));
else if(jspin==2)
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin0,PDT::Spin2,PDT::Spin1Half,PDT::Spin1Half)));
}
// initialisation
if(meopt==Initialize) {
ScalarWaveFunction::
calculateWaveFunctions(_rho,const_ptr_cast<tPPtr>(&inpart),incoming);
// work out the mapping for the lepton vector
_constants.resize(decay.size()+1);
_ispin.resize(decay.size());
_imes=0;
unsigned int itemp(1);
for(int ix=int(decay.size()-1);ix>=0;--ix) {
_ispin[ix]=decay[ix]->data().iSpin();
if(abs(decay[ix]->id())<=16) {
itemp*=_ispin[ix];
_constants[ix]=itemp;
}
else _imes=ix;
}
_constants[decay.size()]=1;
_constants[_imes]=_constants[_imes+1];
}
if(meopt==Terminate) {
// set up the spin information for the decay products
ScalarWaveFunction::constructSpinInfo(const_ptr_cast<tPPtr>(&inpart),
incoming,true);
if(jspin==0)
ScalarWaveFunction::
constructSpinInfo(decay[0],outgoing,true);
else if(jspin==1)
VectorWaveFunction::
constructSpinInfo(_vectors,decay[0],outgoing,true,false);
else if(jspin==2)
TensorWaveFunction::
constructSpinInfo(_tensors,decay[0],outgoing,true,false);
_current->current(mode,ichan,scale,leptons,meopt);
return 0.;
}
// get the wavefunctions of the decay products
switch(decay[0]->dataPtr()->iSpin()) {
case 1:
break;
case 3:
VectorWaveFunction::
calculateWaveFunctions(_vectors,decay[0],outgoing,false);
break;
case 5:
TensorWaveFunction::
calculateWaveFunctions(_tensors,decay[0],outgoing,false);
break;
default:
assert(false);
}
// work out the value of q and calculate the form factors
Lorentz5Momentum q(inpart.momentum()-decay[0]->momentum());
q.rescaleMass();
Energy2 q2(q.mass2());
Lorentz5Momentum sum(inpart.momentum()+decay[0]->momentum());
// calculate the hadronic current for the decay
Complex ii(0.,1.);
vector<LorentzPolarizationVectorE> hadron;
if(jspin==0) {
Complex fp,f0;
_form->ScalarScalarFormFactor(q2,iloc,id0,id1,inpart.mass(),decay[0]->mass(),
f0,fp);
Complex pre((sqr(inpart.mass())-sqr(decay[0]->mass()))/q2*(f0-fp));
hadron.push_back(fp*sum+(pre*q));
}
else if(jspin==1) {
Complex A0,A1,A2,A3,V;
complex<Energy> dot;
Energy MP(inpart.mass()),MV(decay[0]->mass()),msum(MP+MV),mdiff(MP-MV);
_form->ScalarVectorFormFactor(q2,iloc,id0,id1,MP,MV,A0,A1,A2,V);
- A3 = 0.5/MV*(msum*A1-mdiff*A2);
+ A3 = Complex(0.5/MV*(msum*A1-mdiff*A2));
if(cc) V*=-1.;
// compute the hadron currents
for(unsigned int ix=0;ix<3;++ix) {
// dot product
dot = _vectors[ix]*inpart.momentum();
// current
hadron.push_back(-ii*msum*A1*_vectors[ix]
+ii*A2/msum*dot*sum
+2.*ii*MV/q2*(A3-A0)*dot*q
+2.*V/msum*Helicity::epsilon(_vectors[ix],inpart.momentum(),
decay[0]->momentum()));
}
}
else if(jspin==2) {
complex<InvEnergy2> h,bp,bm;
complex<double> k;
complex<Energy2> dot;
_form->ScalarTensorFormFactor(q2,iloc,id0,id1,inpart.mass(),decay[0]->mass(),
h,k,bp,bm);
if(!cc) h*=-1.;
LorentzPolarizationVectorE dotv;
// compute the hadron currents
for(unsigned int ix=0;ix<5;++ix) {
dotv = _tensors[ix]*inpart.momentum();
dot = dotv*inpart.momentum();
hadron.push_back(ii*h*Helicity::epsilon(dotv,sum,q)
-k*dotv-bp*dot*sum-bm*dot*q);
}
}
// construct the lepton current
vector<LorentzPolarizationVectorE>
lepton(_current->current(mode,ichan,scale,leptons,meopt));
// compute the matrix element
vector<unsigned int> ihel(decay.size()+1);
for(unsigned int mhel=0;mhel<hadron.size();++mhel) {
for(unsigned int lhel=0;lhel<lepton.size();++lhel) {
// map the index for the leptons to a helicity state
for(unsigned int ix=decay.size();ix>0;--ix) {
if(ix-1!=_imes) ihel[ix]=(lhel%_constants[ix-1])/_constants[ix];
}
// helicities of mesons
ihel[0]=0;
ihel[_imes+1]=mhel;
- (*ME())(ihel)= lepton[lhel].dot(hadron[mhel])*SM().fermiConstant();
+ (*ME())(ihel) = Complex(lepton[lhel].dot(hadron[mhel])*SM().fermiConstant());
}
}
// store the matrix element
double ckm(1.);
if(iq<=6) {
if(iq%2==0) ckm = SM().CKM(abs(iq)/2-1,(abs(ia)-1)/2);
else ckm = SM().CKM(abs(ia)/2-1,(abs(iq)-1)/2);
}
// return the answer
return 0.5*(ME()->contract(_rho)).real()*ckm;
}
// output the setup information for the particle database
void SemiLeptonicScalarDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
DecayIntegrator::dataBaseOutput(output,false);
for(unsigned int ix=0;ix<_maxwgt.size();++ix) {
output << "insert " << name() << ":MaximumWeight " << ix << " "
<< _maxwgt[ix] << "\n";
}
_current->dataBaseOutput(output,false,true);
output << "newdef " << name() << ":Current " << _current->name() << " \n";
_form->dataBaseOutput(output,false,true);
output << "newdef " << name() << ":FormFactor " << _form->name() << " \n";
if(header) output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";" << endl;
}
diff --git a/Decay/ScalarMeson/SemiLeptonicScalarDecayer.h b/Decay/ScalarMeson/SemiLeptonicScalarDecayer.h
--- a/Decay/ScalarMeson/SemiLeptonicScalarDecayer.h
+++ b/Decay/ScalarMeson/SemiLeptonicScalarDecayer.h
@@ -1,202 +1,202 @@
// -*- C++ -*-
//
// SemiLeptonicScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SemiLeptonicScalarDecayer_H
#define HERWIG_SemiLeptonicScalarDecayer_H
//
// This is the declaration of the SemiLeptonicScalarDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/FormFactors/ScalarFormFactor.h"
#include "Herwig/Decay/WeakCurrents/LeptonNeutrinoCurrent.h"
#include "ThePEG/Helicity/LorentzTensor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>SemiLeptonicScalarDecayer</code> class is designed for the
* semileptonic decay of a (pesudo)scalar meson to another meson and a
* lepton/neutino pair.
*
* This class implements the matrix element in a general form with form-factors
* for the hadronic current. These form-factor are specified using a ScalarFormFactor
* class and the leptonic part of the decay uses the LeptonNeutrinoCurrent.
*
* @see DecayIntegrator
* @see ScalarFormFactor
* @see LeptonNeutrinoCurrent
*
*/
class SemiLeptonicScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
SemiLeptonicScalarDecayer();
/**
* Check if this decayer can perfom the decay for a particular mode.
* Uses the modeNumber member but can be overridden
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const ;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2( const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SemiLeptonicScalarDecayer & operator=(const SemiLeptonicScalarDecayer &);
+ SemiLeptonicScalarDecayer & operator=(const SemiLeptonicScalarDecayer &) = delete;
private:
/**
* The leptonic current
*/
LeptonNeutrinoCurrentPtr _current;
/**
* The form factor
*/
ScalarFormFactorPtr _form;
/**
* the maximum weight for the integration of a given decay
*/
vector<double> _maxwgt;
/**
* mapping of the mode to the form factor
*/
vector<int> _modemap;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decay products
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
/**
* Polarization vectors for the decay products
*/
mutable vector<Helicity::LorentzTensor<double> > _tensors;
/**
* Constants for the mapping of the leptonic current
*/
mutable vector<unsigned int> _constants;
/**
* Spins of the particles
*/
mutable vector<PDT::Spin> _ispin;
/**
* Location of the outgoing meson
*/
mutable unsigned int _imes;
};
}
#endif /* HERWIG_SemiLeptonicScalarDecayer_H */
diff --git a/Decay/Tau/TauDecayer.cc b/Decay/Tau/TauDecayer.cc
--- a/Decay/Tau/TauDecayer.cc
+++ b/Decay/Tau/TauDecayer.cc
@@ -1,361 +1,360 @@
// -*- C++ -*-
//
// TauDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the TauDecayer class.
//
// Author: Peter Richardson
//
#include "TauDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Helicity/VectorSpinInfo.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/Decay/DecayVertex.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
#include "ThePEG/Helicity/FermionSpinInfo.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void TauDecayer::doinit() {
DecayIntegrator::doinit();
// make sure the current got initialised
_current->init();
// set up the phase-space channels
DecayPhaseSpaceModePtr mode;
DecayPhaseSpaceChannelPtr channel;
tPDVector extpart,ptemp;
extpart.push_back(getParticleData(ParticleID::tauminus));
extpart.push_back(getParticleData(ParticleID::nu_tau));
Energy mtau(extpart[0]->mass());
double maxweight;
vector<double> channelwgts;
int iq(0),ia(0);
_modemap.clear();
unsigned int ix,iy;
bool done;
vector<double>::iterator start,end;
for(ix=0;ix<_current->numberOfModes();++ix) {
// get the external particles for this mode
extpart.resize(2);
ptemp=_current->particles(-3,ix,iq,ia);
for(iy=0;iy<ptemp.size();++iy) extpart.push_back(ptemp[iy]);
// create the mode
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
// create the first piece of the channel
channel = new_ptr(DecayPhaseSpaceChannel(mode));
channel->addIntermediate(extpart[0],0,0.0,-1,1);
done=_current->createMode(-3,ix,mode,2,1,channel,mtau);
if(done) {
// the maximum weight and the channel weights
// the maximum
maxweight = _wgtmax.size()>numberModes() ? _wgtmax[numberModes()] : 0;
// the weights for the channel
if(_wgtloc.size()>numberModes()&&
_wgtloc[numberModes()]+mode->numberChannels()<=_weights.size()) {
start=_weights.begin()+_wgtloc[numberModes()];
end = start+mode->numberChannels();
channelwgts=vector<double>(start,end);
}
else {
channelwgts.resize(mode->numberChannels(),1./(mode->numberChannels()));
}
_modemap.push_back(ix);
// special for the two body modes
if(extpart.size()==3) {
channelwgts.clear();
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
}
addMode(mode,maxweight,channelwgts);
}
}
_current->reset();
_current->touch();
_current->update();
}
void TauDecayer::doinitrun() {
_current->initrun();
DecayIntegrator::doinitrun();
if(initialize()) {
_weights.clear();_wgtloc.clear();_wgtmax.clear();
unsigned int ix,iy;
for(ix=0;ix<numberModes();++ix) {
_wgtmax.push_back(mode(ix)->maxWeight());
_wgtloc.push_back(_weights.size());
for(iy=0;iy<mode(ix)->numberChannels();++iy) {
_weights.push_back(mode(ix)->channelWeight(iy));
}
}
}
}
bool TauDecayer::accept(tcPDPtr parent, const tPDVector & children) const {
bool allowed(false);
// find the neutrino
int idnu(0),idtemp,idin(parent->id());
vector<int> idother;
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(abs(idtemp)==16) idnu=idtemp;
else idother.push_back(idtemp);
}
if((idnu==ParticleID::nu_tau && idin==ParticleID::tauminus)||
(idnu==ParticleID::nu_taubar && idin==ParticleID::tauplus )) {
allowed=_current->accept(idother);
}
return allowed;
}
int TauDecayer::modeNumber(bool & cc,tcPDPtr parent, const tPDVector & children) const {
int imode(-1);
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
int idtemp;vector<int> idother;
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(abs(idtemp)!=16) idother.push_back(idtemp);
}
unsigned int itemp=_current->decayMode(idother);
for(unsigned int ix=0;ix<_modemap.size();++ix) {
if(_modemap[ix]==itemp) imode=ix;
}
// perform the decay
cc=parent->id()==ParticleID::tauplus;
return imode;
}
void TauDecayer::persistentOutput(PersistentOStream & os) const {
os << _modemap << _current << _wgtloc
<< _wgtmax << _weights << _polOpt << _tauMpol << _tauPpol;
}
void TauDecayer::persistentInput(PersistentIStream & is, int) {
is >> _modemap >> _current >> _wgtloc
>> _wgtmax >> _weights >> _polOpt >> _tauMpol >> _tauPpol;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<TauDecayer,DecayIntegrator>
describeHerwigTauDecayer("Herwig::TauDecayer", "HwTauDecay.so");
void TauDecayer::Init() {
static ClassDocumentation<TauDecayer> documentation
("The TauDecayer class is designed to use a weak current"
" to perform the decay of the tau.");
static Reference<TauDecayer,WeakDecayCurrent> interfaceWeakCurrent
("WeakCurrent",
"The reference for the decay current to be used.",
&TauDecayer::_current, false, false, true, false, false);
static ParVector<TauDecayer,int> interfaceWeightLocation
("WeightLocation",
"The locations of the weights for a given channel in the vector",
&TauDecayer::_wgtloc,
0, 0, 0, 0, 10000, false, false, true);
static ParVector<TauDecayer,double> interfaceWeightMax
("MaximumWeight",
"The maximum weight for a given channel.",
&TauDecayer::_wgtmax,
0, 0, 0, 0., 100., false, false, true);
static ParVector<TauDecayer,double> interfaceWeights
("Weights",
"The weights for the integration.",
&TauDecayer::_weights,
0, 0, 0, 0., 1., false, false, true);
static Switch<TauDecayer,bool> interfacePolarizationOption
("PolarizationOption",
"Option of forcing the polarization of the tau leptons, N.B. you"
" should only use this option for making distributions for"
" comparision if you really know what you are doing.",
&TauDecayer::_polOpt, false, false, false);
static SwitchOption interfacePolarizationOptionDefault
(interfacePolarizationOption,
"Default",
"Don't force the polarization use the full spin density matrices"
" to get the right answer",
false);
static SwitchOption interfacePolarizationOptionForce
(interfacePolarizationOption,
"Force",
"Force the polarizations",
true);
static Parameter<TauDecayer,double> interfaceTauMinusPolarization
("TauMinusPolarization",
"The polarization of the tau-, left=-1, right=+1 if this is forced.",
&TauDecayer::_tauMpol, 0.0, -1.0, 1.0,
false, false, Interface::limited);
static Parameter<TauDecayer,double> interfaceTauPlusPolarization
("TauPlusPolarization",
"The polarization of the tau+, left=-1, right=+1 if this is forced.",
&TauDecayer::_tauPpol, 0.0, -1.0, 1.0,
false, false, Interface::limited);
}
// combine the currents to give the matrix element
double TauDecayer::me2(const int ichan,const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
// map the mode to those in the current
int mode(_modemap[imode()]);
// get the particles for the hadronic current
ParticleVector hadpart(decay.begin()+1,decay.end());
Energy q;
// extract info on the decaying particle
if(meopt==Initialize) {
// spin density matrix for the decaying particle
_rho = RhoDMatrix(PDT::Spin1Half);
if(inpart.id()==ParticleID::tauminus)
SpinorWaveFunction ::calculateWaveFunctions(_inspin,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
else
SpinorBarWaveFunction::calculateWaveFunctions(_inbar ,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming);
// fix rho if no correlations
fixRho(_rho);
if(_polOpt) {
_rho(0,1) = _rho(1,0) = 0.;
if(inpart.id()==ParticleID::tauminus) {
_rho(0,0) = 0.5*(1.-_tauMpol);
_rho(1,1) = 0.5*(1.+_tauMpol);
}
else {
_rho(0,0) = 0.5*(1.+_tauPpol);
_rho(1,1) = 0.5*(1.-_tauPpol);
}
}
// work out the mapping for the hadron vector
_constants = vector<unsigned int>(decay.size()+1);
_ispin = vector<PDT::Spin >(decay.size());
int itemp(1);
unsigned int ix(decay.size());
do {
--ix;
_ispin[ix] = decay[ix]->data().iSpin();
itemp *= _ispin[ix];
_constants[ix] = itemp;
}
while(ix>0);
_constants[decay.size()] = 1;
_constants[0 ] = _constants[1];
}
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1Half,_ispin)));
// connect the spininfo up if needed
if(meopt==Terminate) {
if(inpart.id()==ParticleID::tauminus) {
SpinorWaveFunction ::
constructSpinInfo(_inspin,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorBarWaveFunction::
constructSpinInfo(_inbar,decay[0],outgoing,true);
}
else {
SpinorBarWaveFunction::
constructSpinInfo(_inbar ,const_ptr_cast<tPPtr>(&inpart),incoming,true);
SpinorWaveFunction::
constructSpinInfo(_inspin,decay[0],outgoing,true);
}
_current->current(mode,ichan,q,hadpart,meopt);
return 0.;
}
// calculate the spinors for the decay products
if(inpart.id()==ParticleID::tauminus)
SpinorBarWaveFunction::calculateWaveFunctions(_inbar ,decay[0],outgoing);
else
SpinorWaveFunction ::calculateWaveFunctions(_inspin,decay[0],outgoing);
// calculate the hadron current
vector<LorentzPolarizationVectorE>
hadron(_current->current(mode,ichan,q,hadpart,meopt));
// prefactor
double pre = sqr(pow(inpart.mass()/q,int(hadpart.size()-2)));
// calculate the lepton current
LorentzPolarizationVectorE lepton[2][2];
for(unsigned ix=0;ix<2;++ix) {
for(unsigned iy=0;iy<2;++iy) {
if(inpart.id()==15)
lepton[ix][iy]=2.*_inspin[ix].leftCurrent(_inbar[iy]);
else
lepton[iy][ix]=2.*_inspin[ix].leftCurrent(_inbar[iy]);
}
}
// compute the matrix element
vector<unsigned int> ihel(decay.size()+1);
for(unsigned int hhel=0;hhel<hadron.size();++hhel) {
// map the index for the hadrons to a helicity state
for(unsigned int ix=decay.size();ix>1;--ix) {
ihel[ix]=(hhel%_constants[ix-1])/_constants[ix];
}
// loop over the helicities of the tau and neutrino and set up the matrix
// element
for(ihel[1]=0;ihel[1]<2;++ihel[1]){
for(ihel[0]=0;ihel[0]<2;++ihel[0]) {
- (*ME())(ihel)= lepton[ihel[0]][ihel[1]].dot(hadron[hhel])*
- SM().fermiConstant();
+ (*ME())(ihel)= Complex(lepton[ihel[0]][ihel[1]].dot(hadron[hhel])*SM().fermiConstant());
}
}
}
// multiply by the CKM element
int iq,ia;
_current->decayModeInfo(mode,iq,ia);
double ckm(1.);
if(iq<=6) {
if(iq%2==0) ckm = SM().CKM(iq/2-1,(abs(ia)-1)/2);
else ckm = SM().CKM(abs(ia)/2-1,(iq-1)/2);
}
return 0.5*pre*ckm*(ME()->contract(_rho)).real();
}
// output the setup information for the particle database
void TauDecayer::dataBaseOutput(ofstream & output,bool header) const {
unsigned int ix;
if(header) output << "update decayers set parameters=\"";
DecayIntegrator::dataBaseOutput(output,false);
for(ix=0;ix<_wgtloc.size();++ix) {
output << "insert " << name() << ":WeightLocation " << ix << " "
<< _wgtloc[ix] << "\n";
}
for(ix=0;ix<_wgtmax.size();++ix) {
output << "insert " << name() << ":MaximumWeight " << ix << " "
<< _wgtmax[ix] << "\n";
}
for(ix=0;ix<_weights.size();++ix) {
output << "insert " << name() << ":Weights " << ix << " "
<< _weights[ix] << "\n";
}
_current->dataBaseOutput(output,false,true);
output << "newdef " << name() << ":WeakCurrent " << _current->name() << " \n";
output << "\n\" where BINARY ThePEGName=\"" << fullName() << "\";\n";
}
diff --git a/Decay/Tau/TauDecayer.h b/Decay/Tau/TauDecayer.h
--- a/Decay/Tau/TauDecayer.h
+++ b/Decay/Tau/TauDecayer.h
@@ -1,231 +1,231 @@
// -*- C++ -*-
//
// TauDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TauDecayer_H
#define HERWIG_TauDecayer_H
// This is the declaration of the TauDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "Herwig/Decay/WeakCurrents/WeakDecayCurrent.h"
#include "ThePEG/Helicity/LorentzSpinor.h"
#include "ThePEG/Helicity/LorentzSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::LorentzPolarizationVector;
/** \ingroup Decay
*
* The TauDecayer class performs the decay of the \f$\tau\f$. The matrix element
* for \f$\tau\f$ decay can be split into a leptonic current describing the
* weak decay of the decay to a neutrino and a highly virtual \f$W\f$ combined
* with a hadronic current for the virtual \f$W\f$ decay.
*
* The matrix element has the form
* \f[\mathcal{M} = \frac{G_F}{\sqrt{2}}\bar{u}(p_{\nu_\tau})
* \gamma^\mu\left(1-\gamma^5\right)u(p_{\tau}) J_\mu,\f]
* where
* - \f$G_F\f$ is the Fermi constant,
* - \f$p_{\nu_\tau}\f$ is the momentum of the \f$\tau\f$ neutrino,
* - \f$p_{\tau}\f$ is the momentum of the \f$\tau\f$,
* - \f$ J_\mu\f$ is the hadronic current.
*
* The leptonic part of this matrix element is implemented in this class
* together with a WeakDecayCurrent member which calculates the hadronic
* current \f$ J_\mu\f$. This allows a range of \f$\tau\f$ decays to be
* constructed via the repository using the interfaces.
*
* @see DecayIntegrator.
* @see WeakDecayCurrent
*
*/
class TauDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
TauDecayer() : _polOpt(false), _tauMpol(0.), _tauPpol(0.) {
generateIntermediates(true);
}
/**
* Check if this decayer can perfom the decay for a particular mode.
* @param parent The decaying particle
* @param children The decay products
*/
virtual bool accept(tcPDPtr parent, const tPDVector & children) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* This method combines the leptonic current and the hadronic current to
* calculate the matrix element.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
virtual double me2(const int ichan, const Particle & part,
const ParticleVector & decay,MEOption meopt) const;
/**
* Output the setup information for the particle database.
*/
void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- TauDecayer & operator=(const TauDecayer &);
+ TauDecayer & operator=(const TauDecayer &) = delete;
private:
/**
* mapping of the modes to the currents
*/
vector<unsigned int> _modemap;
/**
* the hadronic current
*/
WeakDecayCurrentPtr _current;
/**
* location of the weights
*/
vector<int> _wgtloc;
/**
* the maximum weight
*/
vector<double> _wgtmax;
/**
* The weights for the different channels
*/
vector<double> _weights;
/**
* The spinors for the decaying particle
*/
mutable vector<LorentzSpinor <SqrtEnergy> > _inspin;
/**
* Barred spinors for the deaying particle
*/
mutable vector<LorentzSpinorBar<SqrtEnergy> > _inbar ;
/**
* Rho matrix
*/
mutable RhoDMatrix _rho;
/**
* Maps for the vectors
*/
mutable vector<unsigned int> _constants;
/**
* Spins of the particles
*/
mutable vector<PDT::Spin> _ispin;
/**
* Option to force the polarizations of the tau leptons
*/
bool _polOpt;
/**
* Polarization for \f$\tau^-\f$
*/
double _tauMpol;
/**
* Polarization of \f$\tau^+\f$
*/
double _tauPpol;
};
}
#endif /* THEPEG_TauDecayer_H */
diff --git a/Decay/TensorMeson/TensorMeson2PScalarDecayer.cc b/Decay/TensorMeson/TensorMeson2PScalarDecayer.cc
--- a/Decay/TensorMeson/TensorMeson2PScalarDecayer.cc
+++ b/Decay/TensorMeson/TensorMeson2PScalarDecayer.cc
@@ -1,382 +1,382 @@
// -*- C++ -*-
//
// TensorMeson2PScalarDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the TensorMeson2PScalarDecayer class.
//
#include "TensorMeson2PScalarDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void TensorMeson2PScalarDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
TensorMeson2PScalarDecayer::TensorMeson2PScalarDecayer()
: _incoming(48), _outgoing1(48), _outgoing2(48),
_coupling(48), _maxweight(48) {
// a_2 -> eta pi
_incoming[0] = 115; _outgoing1[0] = 221; _outgoing2[0] = 111;
_coupling[0] = 10.90/GeV; _maxweight[0] = 1.7;
_incoming[1] = 215; _outgoing1[1] = 221; _outgoing2[1] = 211;
_coupling[1] = 10.90/GeV; _maxweight[1] = 1.7;
// a_2 -> eta' pi
_incoming[2] = 115; _outgoing1[2] = 331; _outgoing2[2] = 111;
_coupling[2] = 9.92/GeV; _maxweight[2] = 1.9;
_incoming[3] = 215; _outgoing1[3] = 331; _outgoing2[3] = 211;
_coupling[3] = 9.92/GeV; _maxweight[3] = 1.9;
// a_2 -> K K
_incoming[4] = 115; _outgoing1[4] = 311; _outgoing2[4] = -311;
_coupling[4] = 7.36/GeV; _maxweight[4] = 1.7;
_incoming[5] = 115; _outgoing1[5] = 321; _outgoing2[5] = -321;
_coupling[5] = 7.36/GeV; _maxweight[5] = 1.7;
_incoming[6] = 215; _outgoing1[6] = 321; _outgoing2[6] = -311;
_coupling[6] = 10.41/GeV; _maxweight[6] = 1.7;
// f_2 -> pi pi
_incoming[7] = 225; _outgoing1[7] = 211; _outgoing2[7] = -211;
_coupling[7] = 18.73/GeV; _maxweight[7] = 1.7;
_incoming[8] = 225; _outgoing1[8] = 111; _outgoing2[8] = 111;
_coupling[8] = 13.24/GeV; _maxweight[8] = 1.7;
// f_2 -> eta eta
_incoming[9] = 225; _outgoing1[9] = 221; _outgoing2[9] = 221;
_coupling[9] = 8.362/GeV; _maxweight[9] = 1.8;
// f_2 -> KK
_incoming[10] = 225; _outgoing1[10] = 321; _outgoing2[10] = -321;
_coupling[10] = 11.03/GeV; _maxweight[10] = 2.;
_incoming[11] = 225; _outgoing1[11] = 311; _outgoing2[11] = -311;
_coupling[11] = 11.38/GeV; _maxweight[11] = 2.;
// f'_2 -> KK
_incoming[12] = 335; _outgoing1[12] = 321; _outgoing2[12] = -321;
_coupling[12] = 14.65/GeV; _maxweight[12] = 1.65;
_incoming[13] = 335; _outgoing1[13] = 311; _outgoing2[13] = -311;
_coupling[13] = 14.65/GeV; _maxweight[13] = 1.65;
// f'_2 -> eta eta
_incoming[14] = 335; _outgoing1[14] = 221; _outgoing2[14] = 221;
_coupling[14] = 9.15/GeV; _maxweight[14] = 1.7;
// f'_2 -> pi pi
_incoming[15] = 335; _outgoing1[15] = 211; _outgoing2[15] = -211;
_coupling[15] = 0.860/GeV; _maxweight[15] = 1.7;
_incoming[16] = 335; _outgoing1[16] = 111; _outgoing2[16] = 111;
_coupling[16] = 0.608/GeV; _maxweight[16] = 1.7;
// K_2 -> K eta
_incoming[17] = 325; _outgoing1[17] = 321; _outgoing2[17] = 221;
_coupling[17] = 1.52/GeV; _maxweight[17] = 1.8;
_incoming[18] = 315; _outgoing1[18] = 311; _outgoing2[18] = 221;
_coupling[18] = 1.52/GeV; _maxweight[18] = 1.8;
// K_2 -> K pi
_incoming[19] = 325; _outgoing1[19] = 321; _outgoing2[19] = 111;
_coupling[19] = 8.30/GeV;_maxweight[19] = 1.65;
_incoming[20] = 325; _outgoing1[20] = 311; _outgoing2[20] = 211;
_coupling[20] = 11.74/GeV; _maxweight[20] = 1.65;
_incoming[21] = 315; _outgoing1[21] = 311; _outgoing2[21] = 111;
_coupling[21] = 8.68/GeV; _maxweight[21] = 1.65;
_incoming[22] = 315; _outgoing1[22] = 321; _outgoing2[22] = -211;
_coupling[22] = 12.28/GeV; _maxweight[22] = 1.65;
// B_2 -> B pi
_incoming[23] = 525; _outgoing1[23] = 521; _outgoing2[23] = 111;
_coupling[23] = 27.23/GeV; _maxweight[23] = 1.65;
_incoming[24] = 525; _outgoing1[24] = 511; _outgoing2[24] = 211;
_coupling[24] = 38.52/GeV; _maxweight[24] = 1.65;
_incoming[25] = 515; _outgoing1[25] = 511; _outgoing2[25] = 111;
_coupling[25] = 27.16/GeV; _maxweight[25] = 1.65;
_incoming[26] = 515; _outgoing1[26] = 521; _outgoing2[26] = -211;
_coupling[26] = 38.62/GeV; _maxweight[26] = 1.65;
// D_2 -> D pi
_incoming[27] = 425; _outgoing1[27] = 421; _outgoing2[27] = 111;
_coupling[27] = 18.07/GeV; _maxweight[27] = 1.7;
_incoming[28] = 425; _outgoing1[28] = 411; _outgoing2[28] = -211;
_coupling[28] = 25.56/GeV; _maxweight[28] = 1.7;
_incoming[29] = 415; _outgoing1[29] = 411; _outgoing2[29] = 111;
_coupling[29] = 14.91/GeV; _maxweight[29] = 1.7;
_incoming[30] = 415; _outgoing1[30] = 421; _outgoing2[30] = 211;
_coupling[30] = 21.09/GeV; _maxweight[30] = 1.7;
// D_s2
_incoming[31] = 435; _outgoing1[31] = 421; _outgoing2[31] = 321;
_coupling[31] = 23.39/GeV; _maxweight[31] = 1.7;
_incoming[32] = 435; _outgoing1[32] = 411; _outgoing2[32] = 311;
_coupling[32] = 23.39/GeV; _maxweight[32] = 1.7;
// B_s2
_incoming[33] = 535; _outgoing1[33] = 521; _outgoing2[33] = -321;
_coupling[33] = 45.43/GeV; _maxweight[33] = 1.7;
_incoming[34] = 535; _outgoing1[34] = 511; _outgoing2[34] = -311;
_coupling[34] = 48.84/GeV; _maxweight[34] = 1.7;
// chi_c2 to pi pi
_incoming[35] = 445; _outgoing1[35] = 211; _outgoing2[35] = -211;
_coupling[35] = 0.0200/GeV; _maxweight[35] = 1.7;
_incoming[36] = 445; _outgoing1[36] = 111; _outgoing2[36] = 111;
_coupling[36] = 0.0141/GeV; _maxweight[36] = 1.7;
// chi_c2 to K K
_incoming[37] = 445; _outgoing1[37] = 321; _outgoing2[37] = -321;
_coupling[37] = 0.056/GeV; _maxweight[37] = 1.7;
_incoming[38] = 445; _outgoing1[38] = 311; _outgoing2[38] = -311;
_coupling[38] = 0.056/GeV; _maxweight[38] = 1.7;
// f_2 to sigma sigma
_incoming[39] = 225; _outgoing1[39] = 9000221; _outgoing2[39] = 9000221;
_coupling[39] = 104.1/GeV; _maxweight[39] = 60.;
// pi_2 to sigma pi
_incoming[40] = 10115; _outgoing1[40] = 9000221; _outgoing2[40] = 111;
_coupling[40] = 15.3/GeV; _maxweight[40] = 10.;
_incoming[41] = 10215; _outgoing1[41] = 9000221; _outgoing2[41] = 211;
_coupling[41] = 15.3/GeV; _maxweight[41] = 10.;
// eta_2 to a_0 pi
_incoming[42] = 10225; _outgoing1[42] = 9000111; _outgoing2[42] = 111;
_coupling[42] = 11.3/GeV; _maxweight[42] = 10.;
_incoming[43] = 10225; _outgoing1[43] = 9000211; _outgoing2[43] = -211;
_coupling[43] = 11.3/GeV; _maxweight[43] = 10.;
// eta'_2 to a_0 pi
_incoming[44] = 10335; _outgoing1[44] = 9000111; _outgoing2[44] = 111;
_coupling[44] = 4.43/GeV; _maxweight[44] = 10.;
_incoming[45] = 10335; _outgoing1[45] = 9000211; _outgoing2[45] = -211;
_coupling[45] = 4.43/GeV; _maxweight[45] = 10.;
// chi_c2(2P) to D D
_incoming[46] = 100445; _outgoing1[46] = 411; _outgoing2[46] = -411;
_coupling[46] = 22.3/GeV; _maxweight[46] = 1.7;
_incoming[47] = 100445; _outgoing1[47] = 421; _outgoing2[47] = -421;
_coupling[47] = 22.3/GeV; _maxweight[47] = 1.7;
// initial size of the vectors
_initsize=_incoming.size();
// intermediates
generateIntermediates(false);
}
void TensorMeson2PScalarDecayer::doinit() {
DecayIntegrator::doinit();
// check consistence of the parameters
unsigned int isize=_incoming.size();
if(isize!=_outgoing1.size()||isize!=_outgoing2.size()||
isize!=_maxweight.size()||isize!=_coupling.size())
throw InitException() << "Inconsistent parameters TensorMeson2PScalarDecayer"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt(0);
DecayPhaseSpaceModePtr mode;
tPDVector extpart(3);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0]=getParticleData(_incoming[ix]);
extpart[1]=getParticleData(_outgoing1[ix]);
extpart[2]=getParticleData(_outgoing2[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
int TensorMeson2PScalarDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id(parent->id());
int idbar = parent->CC() ? parent->CC()->id() : id;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
int imode(-1);
unsigned int ix(0);
cc=false;
do {
if(id ==_incoming[ix]) {
if((id1 ==_outgoing1[ix]&&id2 ==_outgoing2[ix])||
(id2 ==_outgoing1[ix]&&id1 ==_outgoing2[ix])) imode=ix;
}
if(idbar==_incoming[ix]) {
if((id1bar==_outgoing1[ix]&&id2bar==_outgoing2[ix])||
(id2bar==_outgoing1[ix]&&id1bar==_outgoing2[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void TensorMeson2PScalarDecayer::persistentOutput(PersistentOStream & os) const {
os << _incoming << _outgoing1 << _outgoing2 << _maxweight
<< ounit(_coupling,1/GeV);
}
void TensorMeson2PScalarDecayer::persistentInput(PersistentIStream & is, int) {
is >> _incoming >> _outgoing1 >> _outgoing2 >> _maxweight
>> iunit(_coupling,1/GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<TensorMeson2PScalarDecayer,DecayIntegrator>
describeHerwigTensorMeson2PScalarDecayer("Herwig::TensorMeson2PScalarDecayer", "HwTMDecay.so");
void TensorMeson2PScalarDecayer::Init() {
static ClassDocumentation<TensorMeson2PScalarDecayer> documentation
("The TensorMeson2PScalarDecayer class is designed for the decay"
" of a tensor meson to two (pseudo)-scalar mesons.");
static ParVector<TensorMeson2PScalarDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&TensorMeson2PScalarDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMeson2PScalarDecayer,int> interfaceOutcoming1
("FirstOutgoing",
"The PDG code for the first outgoing particle",
&TensorMeson2PScalarDecayer::_outgoing1,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMeson2PScalarDecayer,int> interfaceOutcoming2
("SecondOutgoing",
"The PDG code for the second outgoing particle",
&TensorMeson2PScalarDecayer::_outgoing2,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMeson2PScalarDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&TensorMeson2PScalarDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 1000./GeV, false, false, true);
static ParVector<TensorMeson2PScalarDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&TensorMeson2PScalarDecayer::_maxweight,
0, 0, 0, 0., 100000., false, false, true);
}
// matrix elememt for the process
double TensorMeson2PScalarDecayer::me2(const int, const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin2,PDT::Spin0,PDT::Spin0)));
// stuff for incoming particle
if(meopt==Initialize) {
_rho = RhoDMatrix(PDT::Spin2);
TensorWaveFunction::
calculateWaveFunctions(_tensors,_rho,const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
TensorWaveFunction::constructSpinInfo(_tensors,const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
// set up the spin information for the decay products
for(unsigned int ix=0;ix<decay.size();++ix)
ScalarWaveFunction::constructSpinInfo(decay[ix],outgoing,true);
return 0.;
}
// calculate the matrix element
for(unsigned int ix=0;ix<5;++ix) {
- (*ME())(ix,0,0) = _coupling[imode()]/inpart.mass()*
- ((_tensors[ix]*decay[1]->momentum())*decay[0]->momentum());
+ (*ME())(ix,0,0) = Complex(_coupling[imode()]/inpart.mass()*
+ ((_tensors[ix]*decay[1]->momentum())*decay[0]->momentum()));
}
// // test of the answer
// double me = newME.contract(_rho).real();
// Energy pcm = Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = Energy4(pow<4,1>(2*pcm))*sqr( _coupling[imode()]/inpart.mass())/120.;
// cout << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << test << " " << (me-test)/(me+test) << endl;
// return the answer
return ME()->contract(_rho).real();
}
bool TensorMeson2PScalarDecayer::twoBodyMEcode(const DecayMode & dm,int & mecode,
double & coupling) const {
int imode(-1);
int id(dm.parent()->id());
int idbar = dm.parent()->CC() ? dm.parent()->CC()->id() : id;
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());
int id1bar = (**pit).CC() ? (**pit).CC()->id() : id1;
++pit;
int id2((**pit).id());
int id2bar = (**pit).CC() ? (**pit).CC()->id() : id2;
unsigned int ix(0); bool order(false);
do {
if(id ==_incoming[ix]) {
if(id1==_outgoing1[ix]&&id2==_outgoing2[ix]) {
imode=ix;
order=true;
}
if(id2==_outgoing1[ix]&&id1==_outgoing2[ix]) {
imode=ix;
order=false;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoing1[ix]&&id2bar==_outgoing2[ix]) {
imode=ix;
order=true;
}
if(id2bar==_outgoing1[ix]&&id1bar==_outgoing2[ix]) {
imode=ix;
order=false;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling=_coupling[imode]*dm.parent()->mass();
mecode=7;
return order;
}
void TensorMeson2PScalarDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "newdef " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "insert " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/TensorMeson/TensorMeson2PScalarDecayer.h b/Decay/TensorMeson/TensorMeson2PScalarDecayer.h
--- a/Decay/TensorMeson/TensorMeson2PScalarDecayer.h
+++ b/Decay/TensorMeson/TensorMeson2PScalarDecayer.h
@@ -1,204 +1,204 @@
// -*- C++ -*-
//
// TensorMeson2PScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TensorMeson2PScalarDecayer_H
#define HERWIG_TensorMeson2PScalarDecayer_H
//
// This is the declaration of the TensorMeson2PScalarDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>TensorMeson2PScalarDecayer</code> class is designed for the decay
* of a tensor meson to two pseudoscalars via matrix element which takes the form
* \f[ \mathcal{M} = g \epsilon^{\mu\nu} p_{1,\mu}p_{2,\nu} \f]
* where \f$\epsilon^{\mu\nu}\f$ is the polarization tensor of the decaying tensor
* meson, $p_{1,2}$ are the momenta of the decay products and \f$g\f$ is the coupling.
*
* It can also be used for the decay of a tensor to two scalar mesons although
* this rarely happens in practice.
*
* The incoming tensor mesons together with their decay products and the coupling
* \f$g\f$ can be specified using the interfaces for the class. The maximum weights
* for the decays can be calculated using the Initialize interface of the
* DecayIntegrator class or specified using the interface.
*
* The incoming and outgoing particles, couplings and maximum weights for
* many of the common \f$T\to PP\f$ decays are specified in the default
* constructor.
*
* @see DecayIntegrator
*
* @see \ref TensorMeson2PScalarDecayerInterfaces "The interfaces"
* defined for TensorMeson2PScalarDecayer.
*
*/
class TensorMeson2PScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
TensorMeson2PScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 7.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- TensorMeson2PScalarDecayer & operator=(const TensorMeson2PScalarDecayer &);
+ TensorMeson2PScalarDecayer & operator=(const TensorMeson2PScalarDecayer &) = delete;
private:
/**
* the PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* the PDG codes for first outgoing particle
*/
vector<int> _outgoing1;
/**
* the PDG codes for second outgoing particle
*/
vector<int> _outgoing2;
/**
* the coupling for the decay
*/
vector<InvEnergy> _coupling;
/**
* the maximum weight for the decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Storage of polarization tensors to try and increase
* speed
*/
mutable vector<Helicity::LorentzTensor<double> > _tensors;
/**
* Storage of the \f$\rho\f$ matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_TensorMeson2PScalarDecayer_H */
diff --git a/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.cc b/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.cc
--- a/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.cc
+++ b/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.cc
@@ -1,351 +1,351 @@
// -*- C++ -*-
//
// TensorMesonVectorPScalarDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the TensorMesonVectorPScalarDecayer class.
//
#include "TensorMesonVectorPScalarDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/epsilon.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void TensorMesonVectorPScalarDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()){
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
TensorMesonVectorPScalarDecayer::TensorMesonVectorPScalarDecayer()
: _incoming(31), _outgoingV(31), _outgoingP(31),
_coupling(31), _maxweight(31) {
// a_2 -> rho pi
_incoming[0] = 115; _outgoingV[0] = 213; _outgoingP[0] = -211;
_coupling[0] = 21.1/GeV2; _maxweight[0] = 10.;
_incoming[1] = 215; _outgoingV[1] = 113; _outgoingP[1] = 211;
_coupling[1] = 21.1/GeV2; _maxweight[1] = 9.;
_incoming[2] = 215; _outgoingV[2] = 213; _outgoingP[2] = 111;
_coupling[2] = 21.1/GeV2; _maxweight[2] = 9.;
// a_2+/- -> gamma pi+/-
_incoming[3] = 215; _outgoingV[3] = 22; _outgoingP[3] = 211;
_coupling[3] = 0.551/GeV2; _maxweight[3] = 2.;
// k_2 -> K_2 omega
_incoming[4] = 315; _outgoingV[4] = 223; _outgoingP[4] = 311;
_coupling[4] = 11.66/GeV2; _maxweight[4] = 17.;
_incoming[5] = 325; _outgoingV[5] = 223; _outgoingP[5] = 321;
_coupling[5] = 11.66/GeV2; _maxweight[5] = 20.5;
// k_2+/- -> K+/- gamma
_incoming[6] = 325; _outgoingV[6] = 22; _outgoingP[6] = 321;
_coupling[6] = 0.553/GeV2; _maxweight[6] = 2.2;
// B_c2 -> B_c gamma
_incoming[7] = 545; _outgoingV[7] = 22; _outgoingP[7] = 541;
_coupling[7] = 0.651/GeV2; _maxweight[7] = 2.;
// K_2 -> K rho
_incoming[8] = 325; _outgoingV[8] = 113; _outgoingP[8] = 321;
_coupling[8] = 10.14/GeV2; _maxweight[8] = 9.;
_incoming[9] = 325; _outgoingV[9] = 213; _outgoingP[9] = 311;
_coupling[9] = 14.33/GeV2; _maxweight[9] = 9.;
_incoming[10] = 315; _outgoingV[10] = 113; _outgoingP[10] = 311;
_coupling[10] = 10.14/GeV2; _maxweight[10] = 9.;
_incoming[11] = 315; _outgoingV[11] = -213; _outgoingP[11] = 321;
_coupling[11] = 14.33/GeV2; _maxweight[11] = 9.;
// K_2 -> K* pi
_incoming[12] = 325; _outgoingV[12] = 323; _outgoingP[12] = 111;
_coupling[12] = 9.733/GeV2; _maxweight[12] = 13;
_incoming[13] = 325; _outgoingV[13] = 313; _outgoingP[13] = 211;
_coupling[13] = 13.77/GeV2; _maxweight[13] = 11;
_incoming[14] = 315; _outgoingV[14] = 313; _outgoingP[14] = 111;
_coupling[14] = 9.733/GeV2; _maxweight[14] = 8.;
_incoming[15] = 315; _outgoingV[15] = 323; _outgoingP[15] = -211;
_coupling[15] = 13.77/GeV2; _maxweight[15] = 8.;
// D_2 -> D* pi
_incoming[16] = 425; _outgoingV[16] = 423; _outgoingP[16] = 111;
_coupling[16] = 8.035/GeV2; _maxweight[16] = 2.2;
_incoming[17] = 425; _outgoingV[17] = 413; _outgoingP[17] = -211;
_coupling[17] = 11.670/GeV2; _maxweight[17] = 2.4;
_incoming[18] = 415; _outgoingV[18] = 413; _outgoingP[18] = 111;
_coupling[18] = 6.801/GeV2; _maxweight[18] = 2.4;
_incoming[19] = 415; _outgoingV[19] = 423; _outgoingP[19] = 211;
_coupling[19] = 9.527/GeV2; _maxweight[19] = 2.;
// D_s2 -> D* K
_incoming[20] = 435; _outgoingV[20] = 423; _outgoingP[20] = 321;
_coupling[20] = 13.10/GeV2; _maxweight[20] = 2.2;
_incoming[21] = 435; _outgoingV[21] = 413; _outgoingP[21] = 311;
_coupling[21] = 13.10/GeV2; _maxweight[21] = 2.5;
// B_2 -> B* pi
_incoming[22] = 525; _outgoingV[22] = 523; _outgoingP[22] = 111;
_coupling[22] = 4.99/GeV2; _maxweight[22] = 2.1;
_incoming[23] = 525; _outgoingV[23] = 513; _outgoingP[23] = 211;
_coupling[23] = 7.059/GeV2; _maxweight[23] = 2.1;
_incoming[24] = 515; _outgoingV[24] = 513; _outgoingP[24] = 111;
_coupling[24] = 4.99/GeV2; _maxweight[24] = 2.1;
_incoming[25] = 515; _outgoingV[25] = 523; _outgoingP[25] = -211;
_coupling[25] = 7.059/GeV2; _maxweight[25] = 2.1;
// D_s2
_incoming[26] = 435; _outgoingV[26] = 423; _outgoingP[26] = 321;
_coupling[26] = 13.09/GeV2; _maxweight[26] = 2.2;
_incoming[27] = 435; _outgoingV[27] = 413; _outgoingP[27] = 311;
_coupling[27] = 13.09/GeV2; _maxweight[27] = 2.5;
// B_s2
_incoming[28] = 535; _outgoingV[28] = 523; _outgoingP[28] = -321;
_coupling[28] = 7.29/GeV2; _maxweight[28] = 2.4;
_incoming[29] = 535; _outgoingV[29] = 513; _outgoingP[29] = -311;
_coupling[29] = 9.43/GeV2; _maxweight[29] = 2.1;
// upsilon_2(1d) to chi_b gamma
_incoming[30] = 20555; _outgoingV[30] = 22; _outgoingP[30] = 10551;
_coupling[30] = 1.11/GeV2; _maxweight[30] = 2.4;
// initial size of the arrays
_initsize=_incoming.size();
// intermediates
generateIntermediates(false);
}
void TensorMesonVectorPScalarDecayer::doinit() {
DecayIntegrator::doinit();
// check consistence of the parameters
unsigned int isize=_incoming.size();
if(isize!=_outgoingV.size()||isize!=_outgoingP.size()||
isize!=_maxweight.size()||isize!=_coupling.size())
throw InitException() << "Inconsistent parameters TensorMesonVectorPScalarDecayer"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt;
DecayPhaseSpaceModePtr mode;
tPDVector extpart(3);
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0] = getParticleData(_incoming[ix]);
extpart[1] = getParticleData(_outgoingV[ix]);
extpart[2] = getParticleData(_outgoingP[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
int TensorMesonVectorPScalarDecayer::modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id(parent->id());
int idbar = parent->CC() ? parent->CC()->id() : id;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
int imode(-1);
unsigned int ix(0);
cc=false;
do {
if(id ==_incoming[ix]) {
if((id1 ==_outgoingP[ix]&&id2 ==_outgoingV[ix])||
(id2 ==_outgoingP[ix]&&id1 ==_outgoingV[ix])) imode=ix;
}
if(idbar==_incoming[ix]) {
if((id1bar==_outgoingP[ix]&&id2bar==_outgoingV[ix])||
(id2bar==_outgoingP[ix]&&id1bar==_outgoingV[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void TensorMesonVectorPScalarDecayer::persistentOutput(PersistentOStream & os) const {
os << _incoming << _outgoingV << _outgoingP << _maxweight << ounit(_coupling,1/GeV2);
}
void TensorMesonVectorPScalarDecayer::persistentInput(PersistentIStream & is, int) {
is >> _incoming >> _outgoingV >> _outgoingP >> _maxweight >> iunit(_coupling,1/GeV2);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<TensorMesonVectorPScalarDecayer,DecayIntegrator>
describeHerwigTensorMesonVectorPScalarDecayer("Herwig::TensorMesonVectorPScalarDecayer", "HwTMDecay.so");
void TensorMesonVectorPScalarDecayer::Init() {
static ClassDocumentation<TensorMesonVectorPScalarDecayer> documentation
("The TensorMesonVectorPScalarDecayer class implements the"
" decay of a tensor meson to a spin-1 particle and a pseduoscalar meson");
static ParVector<TensorMesonVectorPScalarDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&TensorMesonVectorPScalarDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMesonVectorPScalarDecayer,int> interfaceOutcomingV
("OutgoingVector",
"The PDG code for the outgoing spin-1particle",
&TensorMesonVectorPScalarDecayer::_outgoingV,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMesonVectorPScalarDecayer,int> interfaceOutcomingP
("OutgoingScalar",
"The PDG code for the outgoing pseudoscalar meson",
&TensorMesonVectorPScalarDecayer::_outgoingP,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMesonVectorPScalarDecayer,InvEnergy2> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&TensorMesonVectorPScalarDecayer::_coupling,
1/GeV2, 0, ZERO, ZERO, 100./GeV2, false, false, true);
static ParVector<TensorMesonVectorPScalarDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&TensorMesonVectorPScalarDecayer::_maxweight,
0, 0, 0, 0., 1000., false, false, true);
}
// matrix elememt for the process
double TensorMesonVectorPScalarDecayer::me2(const int,const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin2,PDT::Spin1,PDT::Spin0)));
// check for photons
bool photon(_outgoingV[imode()]==ParticleID::gamma);
// stuff for incoming particle
if(meopt==Initialize) {
_rho = RhoDMatrix(PDT::Spin2);
TensorWaveFunction::
calculateWaveFunctions(_tensors,_rho,const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
TensorWaveFunction::constructSpinInfo(_tensors,const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
// set up the spin information for the decay products
VectorWaveFunction::constructSpinInfo(_vectors,decay[0],outgoing,true,photon);
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
VectorWaveFunction::calculateWaveFunctions(_vectors,decay[0],outgoing,photon);
InvEnergy3 fact(_coupling[imode()]/inpart.mass());
// calculate the matrix element
for(unsigned int inhel=0;inhel<5;++inhel) {
for(unsigned int vhel=0;vhel<3;++vhel){
if(vhel==1&&photon) (*ME())(inhel,vhel,0)=0.;
else {
LorentzVector<complex<InvEnergy> > vtemp=
fact*epsilon(decay[0]->momentum(),_vectors[vhel],decay[1]->momentum());
- (*ME())(inhel,vhel,0)= (decay[1]->momentum()*_tensors[inhel]).dot(vtemp);
+ (*ME())(inhel,vhel,0)= Complex((decay[1]->momentum()*_tensors[inhel]).dot(vtemp));
}
}
}
// // test of the answer
// double me = ME()->contract(_rho).real();
// Energy pcm = Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = Energy4(pow<4,1>(2*pcm))*sqr( _coupling[imode()])/80.;
// cout << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << test << " " << (me-test)/(me+test) << endl;
// return the answer
return ME()->contract(_rho).real();
}
bool TensorMesonVectorPScalarDecayer::twoBodyMEcode(const DecayMode & dm,int & mecode,
double & coupling) const {
int imode(-1);
int id(dm.parent()->id());
int idbar = dm.parent()->CC() ? dm.parent()->CC()->id() : id;
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());
int id1bar = (**pit).CC() ? (**pit).CC()->id() : id1;
++pit;
int id2((**pit).id());
int id2bar = (**pit).CC() ? (**pit).CC()->id() : id2;
unsigned int ix(0);
bool order(false);
do {
if(id ==_incoming[ix]) {
if(id1==_outgoingP[ix]&&id2==_outgoingV[ix]) {
imode=ix;
order=true;
}
if(id2==_outgoingP[ix]&&id1==_outgoingV[ix]) {
imode=ix;
order=false;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoingP[ix]&&id2bar==_outgoingV[ix]) {
imode=ix;
order=true;
}
if(id2bar==_outgoingP[ix]&&id1bar==_outgoingV[ix]) {
imode=ix;
order=false;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling=_coupling[imode]*sqr(dm.parent()->mass());
mecode=8;
return order;
}
void TensorMesonVectorPScalarDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "newdef " << name() << ":OutgoingScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV2 << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "insert " << name() << ":OutgoingScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV2 << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.h b/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.h
--- a/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.h
+++ b/Decay/TensorMeson/TensorMesonVectorPScalarDecayer.h
@@ -1,211 +1,211 @@
// -*- C++ -*-
//
// TensorMesonVectorPScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TensorMesonVectorPScalarDecayer_H
#define HERWIG_TensorMesonVectorPScalarDecayer_H
//
// This is the declaration of the TensorMesonVectorPScalarDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>TensorMesonVectorPScalarDecayer</code> class handles the decay of
* a tensor meson to a vector and a pseudoscalar. Examples of this decay
* are \f$a_2\to\rho\pi\f$ or \f$a_2 \to\pi \gamma\f$. The matrix element is
* given by
* \f[\mathcal{M}=\epsilon_T^{\mu\nu}p_{P,\mu} \epsilon_{\nu\alpha\beta\gamma}
* p_V^\alpha \epsilon_V^\beta p_P^\gamma,\f]
* where \f$p_P\f$ is the momentum of the pseudoscalar meson, \f$p_V\f$ is
* the momentum of the vector, \f$\epsilon_T\f$ is the polarization tensor of the
* decaying meson and \f$\epsilon_V\f$ is the polarization vector of the outgoing
* vector meson.
*
* The incoming tensor mesons together with their decay products and the coupling
* \f$g\f$ can be specified using the interfaces for the class. The maximum weights
* for the decays can be calculated using the Initialize interface of the
* DecayIntegrator class or specified using the interface.
*
* The incoming and outgoing particles, couplings and maximum weights for
* many of the common \f$T\to PV\f$ decays are specified in the default
* constructor.
*
* @see DecayIntegrator
* @see \ref TensorMesonVectorPScalarDecayerInterfaces "The interfaces"
* defined for TensorMesonVectorPScalarDecayer.
*/
class TensorMesonVectorPScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
TensorMesonVectorPScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 8.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- TensorMesonVectorPScalarDecayer & operator=(const TensorMesonVectorPScalarDecayer &);
+ TensorMesonVectorPScalarDecayer & operator=(const TensorMesonVectorPScalarDecayer &) = delete;
private:
/**
* PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* PDG codes for the outgoing vector
*/
vector<int> _outgoingV;
/**
* PDG codes for the outgoing pseudoscalar
*/
vector<int> _outgoingP;
/**
* coupling for the decay
*/
vector<InvEnergy2> _coupling;
/**
* max weight ofr the decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Storage of polarization tensors to try and increase
* speed
*/
mutable vector<Helicity::LorentzTensor<double> > _tensors;
/**
* Storage of the polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
/**
* Storage of the \f$\rho\f$ matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_TensorMesonVectorPScalarDecayer_H */
diff --git a/Decay/TensorMeson/TensorMesonVectorVectorDecayer.cc b/Decay/TensorMeson/TensorMesonVectorVectorDecayer.cc
--- a/Decay/TensorMeson/TensorMesonVectorVectorDecayer.cc
+++ b/Decay/TensorMeson/TensorMesonVectorVectorDecayer.cc
@@ -1,359 +1,359 @@
// -*- C++ -*-
//
// TensorMesonVectorVectorDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the TensorMesonVectorVectorDecayer class.
//
#include "TensorMesonVectorVectorDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void TensorMesonVectorVectorDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
void TensorMesonVectorVectorDecayer::doinit() {
DecayIntegrator::doinit();
// check consistence of the parameters
unsigned int isize=_incoming.size();
if(isize!=_outgoing1.size()||isize!=_outgoing2.size()||
isize!=_maxweight.size()||isize!=_coupling.size())
throw InitException() << "Inconsistent parameters TensorMesonVectorVectorDecayer"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt(0);
tPDVector extpart(3);
DecayPhaseSpaceModePtr mode;
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0]=getParticleData(_incoming[ix]);
extpart[1]=getParticleData(_outgoing1[ix]);
extpart[2]=getParticleData(_outgoing2[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
TensorMesonVectorVectorDecayer::TensorMesonVectorVectorDecayer()
: _incoming(22), _outgoing1(22), _outgoing2(22),
_coupling(22), _maxweight(22) {
// a_2 -> gamma gamma
_incoming[0] = 115; _outgoing1[0] = 22; _outgoing2[0] = 22;
_coupling[0] = 0.00727/GeV; _maxweight[0] = 1.7;
// f_2 -> gamma gamma
_incoming[1] = 225; _outgoing1[1] = 22; _outgoing2[1] = 22;
_coupling[1] = 0.01253/GeV; _maxweight[1] = 1.7;
// f'_2 -> gamma gamma
_incoming[2] = 335; _outgoing1[2] = 22; _outgoing2[2] = 22;
_coupling[2] = 0.00161/GeV; _maxweight[2] = 1.7;
// chi_b(2P) decays
_incoming[3] = 100555; _outgoing1[3] = 553; _outgoing2[3] = 223;
_coupling[3] = 0.0118/GeV; _maxweight[3] = 1.8;
_incoming[4] = 100555; _outgoing1[4] = 553; _outgoing2[4] = 22;
_coupling[4] = 0.0172/GeV; _maxweight[4] = 1.7;
_incoming[5] = 100555; _outgoing1[5] = 100553; _outgoing2[5] = 22;
_coupling[5] = 0.145/GeV; _maxweight[5] = 1.7;
_incoming[6] = 100555; _outgoing1[6] = 333; _outgoing2[6] = 333;
_coupling[6] = 0.00483/GeV; _maxweight[6] = 18.0;
// chi_c decays
_incoming[7] = 445; _outgoing1[7] = 443; _outgoing2[7] = 22;
_coupling[7] = 0.243/GeV; _maxweight[7] = 1.7;
_incoming[8] = 445; _outgoing1[8] = 323; _outgoing2[8] = -323;
_coupling[8] = 0.00560/GeV; _maxweight[8] = 15.;
_incoming[9] = 445; _outgoing1[9] = 313; _outgoing2[9] = -313;
_coupling[9] = 0.00560/GeV; _maxweight[9] = 20.;
_incoming[10] = 445; _outgoing1[10] = 333; _outgoing2[10] = 333;
_coupling[10] = 0.00418/GeV; _maxweight[10] = 10.;
_incoming[11] = 445; _outgoing1[11] = 22; _outgoing2[11] = 22;
_coupling[11] = 0.00122/GeV; _maxweight[11] = 1.7;
// chi_b(1P) decays
_incoming[12] = 555; _outgoing1[12] = 553; _outgoing2[12] = 22;
_coupling[12] = 0.0683/GeV; _maxweight[12] = 1.8;
// a_2 omega rho
_incoming[13] = 115; _outgoing1[13] = 223; _outgoing2[13] = 113;
_coupling[13] = 23.1/GeV; _maxweight[13] = 15.;
_incoming[14] = 215; _outgoing1[14] = 223; _outgoing2[14] = 213;
_coupling[14] = 23.1/GeV; _maxweight[14] = 21.;
// f_2 rho rho
_incoming[15] = 225; _outgoing1[15] = 113; _outgoing2[15] = 113;
_coupling[15] = 11.7/GeV; _maxweight[15] = 26.;
_incoming[16] = 225; _outgoing1[16] = 213; _outgoing2[16] = -213;
_coupling[16] = 16.5/GeV; _maxweight[16] = 26.;
// K_2-> K* rho
_incoming[17] = 315; _outgoing1[17] = 113; _outgoing2[17] = 313;
_coupling[17] = 13.42/GeV; _maxweight[17] = 30.;
_incoming[18] = 315; _outgoing1[18] = -213; _outgoing2[18] = 323;
_coupling[18] = 18.98/GeV; _maxweight[18] = 30.;
_incoming[19] = 325; _outgoing1[19] = 113; _outgoing2[19] = 323;
_coupling[19] = 13.42/GeV; _maxweight[19] = 30.;
_incoming[20] = 325; _outgoing1[20] = 213; _outgoing2[20] = 313;
_coupling[20] = 18.98/GeV; _maxweight[20] = 30.;
_incoming[21] = 445; _outgoing1[21] = 223; _outgoing2[21] = 223;
_coupling[21] = 0.00389/GeV; _maxweight[21] = 12.;
// initial size of the vectors
_initsize = _incoming.size();
// intermediates
generateIntermediates(false);
}
int TensorMesonVectorVectorDecayer::modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id(parent->id());
int idbar = parent->CC() ? parent->CC()->id() : id;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
int imode(-1);
unsigned int ix(0);
cc=false;
do {
if(id ==_incoming[ix]) {
if((id1 ==_outgoing1[ix]&&id2 ==_outgoing2[ix])||
(id2 ==_outgoing1[ix]&&id1 ==_outgoing2[ix])) imode=ix;
}
if(idbar==_incoming[ix]) {
if((id1bar==_outgoing1[ix]&&id2bar==_outgoing2[ix])||
(id2bar==_outgoing1[ix]&&id1bar==_outgoing2[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void TensorMesonVectorVectorDecayer::persistentOutput(PersistentOStream & os) const {
os << _incoming << _outgoing1 << _outgoing2 << _maxweight << ounit(_coupling,1/GeV);
}
void TensorMesonVectorVectorDecayer::persistentInput(PersistentIStream & is, int) {
is >> _incoming >> _outgoing1 >> _outgoing2 >> _maxweight >> iunit(_coupling,1/GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<TensorMesonVectorVectorDecayer,DecayIntegrator>
describeHerwigTensorMesonVectorVectorDecayer("Herwig::TensorMesonVectorVectorDecayer", "HwTMDecay.so");
void TensorMesonVectorVectorDecayer::Init() {
static ClassDocumentation<TensorMesonVectorVectorDecayer> documentation
("The TensorMesonVectorVectorDecayer class performs the"
" decay of a tensor meson to two scalar mesons.");
static ParVector<TensorMesonVectorVectorDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&TensorMesonVectorVectorDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMesonVectorVectorDecayer,int> interfaceOutcoming1
("FirstOutgoing",
"The PDG code for the first outgoing particle",
&TensorMesonVectorVectorDecayer::_outgoing1,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMesonVectorVectorDecayer,int> interfaceOutcoming2
("SecondOutgoing",
"The PDG code for the second outgoing particle",
&TensorMesonVectorVectorDecayer::_outgoing2,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<TensorMesonVectorVectorDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&TensorMesonVectorVectorDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 1000./GeV, false, false, true);
static ParVector<TensorMesonVectorVectorDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&TensorMesonVectorVectorDecayer::_maxweight,
0, 0, 0, 0., 100., false, false, true);
}
// matrix elememt for the process
double TensorMesonVectorVectorDecayer::me2(const int,const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin2,PDT::Spin1,PDT::Spin1)));
// photons ??
bool photon[2];
for(unsigned int ix=0;ix<2;++ix)
photon[ix]=decay[ix]->id()==ParticleID::gamma;
// stuff for incoming particle
if(meopt==Initialize) {
_rho = RhoDMatrix(PDT::Spin2);
TensorWaveFunction::
calculateWaveFunctions(_tensors,_rho,const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
TensorWaveFunction::constructSpinInfo(_tensors,const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
// set up the spin information for the decay products
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::constructSpinInfo(_vectors[ix],decay[ix],
outgoing,true,photon[ix]);
return 0.;
}
for(unsigned int ix=0;ix<2;++ix)
VectorWaveFunction::calculateWaveFunctions(_vectors[ix],decay[ix],
outgoing,photon[ix]);
// compute some useful dot products etc
complex<Energy> p1eps2[3],p2eps1[3];
Energy2 p1p2(decay[0]->momentum()*decay[1]->momentum());
for(unsigned int ix=0;ix<3;++ix) {
p1eps2[ix]=_vectors[1][ix]*decay[0]->momentum();
p2eps1[ix]=_vectors[0][ix]*decay[1]->momentum();
}
// compute the traces and useful dot products
Complex trace[5];
complex<Energy2> pboth[5];
LorentzPolarizationVectorE pleft[2][5],pright[2][5];
for(unsigned int ix=0;ix<5;++ix) {
trace[ix]=_tensors[ix].xx() + _tensors[ix].yy() + _tensors[ix].zz() + _tensors[ix].tt();
pleft[0][ix] =(-decay[0]->momentum())*_tensors[ix];
pleft[1][ix] =(-decay[1]->momentum())*_tensors[ix];
pright[0][ix]=_tensors[ix]*(-decay[0]->momentum());
pright[1][ix]=_tensors[ix]*(-decay[1]->momentum());
pboth[ix]=((pleft[0][ix]+pright[0][ix])*decay[1]->momentum());
}
// loop to compute the matrix element
Complex e1e2;
LorentzTensor<Energy2> te1e2;
InvEnergy2 fact(_coupling[imode()]/inpart.mass());
complex<Energy2> me;
for(unsigned int ix=0;ix<3;++ix) {
for(unsigned iy=0;iy<3;++iy) {
e1e2=_vectors[0][ix].dot(_vectors[1][iy]);
te1e2=complex<Energy2>(p1p2)*
(LorentzTensor<double>(_vectors[0][ix],_vectors[1][iy])+
LorentzTensor<double>(_vectors[1][iy],_vectors[0][ix]));
for(unsigned int inhel=0;inhel<5;++inhel) {
me = (_tensors[inhel]*te1e2
-p2eps1[ix]*(_vectors[1][iy].dot(pleft[0][inhel]+pright[0][inhel]))
-p1eps2[iy]*(_vectors[0][ix].dot(pleft[1][inhel]+pright[1][inhel]))
+pboth[inhel]*e1e2
+(p2eps1[ix]*p1eps2[iy]-e1e2*p1p2)*trace[inhel]);
- (*ME())(inhel,ix,iy)=fact*me;
+ (*ME())(inhel,ix,iy)=Complex(fact*me);
}
}
}
// // testing the matrix element
// double metest = ME()->contract(_rho).real();
// Energy2 m02(sqr(inpart.mass())),m12(sqr(decay[0]->mass())),m22(sqr(decay[1]->mass()));
// Energy pcm = Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// Energy2 pcm2(sqr(pcm));
// double test = 4./15./m02/m02*sqr(_coupling[imode()])*
// (3.*m02*(8.*pcm2*pcm2+5.*(m12*m22+pcm2*(m12+m22)))-5.*(m12-m22)*(m12-m22)*pcm2);
// cout << "testing the matrix element VV " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << metest << " " << test << " " << (metest-test)/(metest+test) << endl;
// return the answer
return ME()->contract(_rho).real();
}
bool TensorMesonVectorVectorDecayer::twoBodyMEcode(const DecayMode & dm,int & mecode,
double & coupling) const {
int imode(-1);
int id(dm.parent()->id());
int idbar = dm.parent()->CC() ? dm.parent()->CC()->id() : id;
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());
int id1bar = (**pit).CC() ? (**pit).CC()->id() : id1;
++pit;
int id2((**pit).id());
int id2bar = (**pit).CC() ? (**pit).CC()->id() : id2;
unsigned int ix(0);
do {
if(id ==_incoming[ix]) {
if(id1==_outgoing1[ix]&&id2==_outgoing2[ix]) {
imode=ix;
}
if(id2==_outgoing1[ix]&&id1==_outgoing2[ix]) {
imode=ix;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoing1[ix]&&id2bar==_outgoing2[ix]) {
imode=ix;
}
if(id2bar==_outgoing1[ix]&&id1bar==_outgoing2[ix]) {
imode=ix;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling=_coupling[imode]*dm.parent()->mass();
mecode=9;
return id1==_outgoing1[imode]&&id2==_outgoing2[imode];
}
void TensorMesonVectorVectorDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "newdef " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":FirstOutgoing " << ix << " "
<< _outgoing1[ix] << "\n";
output << "insert " << name() << ":SecondOutgoing " << ix << " "
<< _outgoing2[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/TensorMeson/TensorMesonVectorVectorDecayer.h b/Decay/TensorMeson/TensorMesonVectorVectorDecayer.h
--- a/Decay/TensorMeson/TensorMesonVectorVectorDecayer.h
+++ b/Decay/TensorMeson/TensorMesonVectorVectorDecayer.h
@@ -1,220 +1,220 @@
// -*- C++ -*-
//
// TensorMesonVectorVectorDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TensorMesonVectorVectorDecayer_H
#define HERWIG_TensorMesonVectorVectorDecayer_H
//
// This is the declaration of the TensorMesonVectorVectorDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzTensor.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The TensorMesonVectorVectorDecayer class is designed to simulate
* the decay of a tensor meson to two spin-1 particles. In practice, at least
* for the light tensor mesons, this is only the decay of a tensor meson to two
* photons. In principle for bottom and charm tensors this may be the decay to
* two vector mesons an d it is used to simulate three and four body
* \f$a_2\f$, \f$f_2\f$ and \f$K_2\f$ decays.
*
* The form of the matrix element is based on the perturbative matrix element
* for the decay of a graviton to two vector bosons with the neglect of a mass term
*
* \f[ \mathcal{M} = g\epsilon_{\mu\nu}\left[
* \left(\epsilon_{1\alpha} p_1^\mu - \epsilon_1^\mu p_{1\alpha}\right)
* \left(\epsilon_2^\alpha p_2^\nu - \epsilon_2^\nu p_2^\alpha\right)
* +\left(\epsilon_{1\alpha} p_1^\nu - \epsilon_1^\nu p_{1\alpha}\right)
* \left(\epsilon_2^\alpha p_2^\mu - \epsilon_2^\nu p_2^\alpha\right)
* -\frac12g^{\mu\nu}
* \left(\epsilon_{1\alpha} p_{1\beta}- \epsilon_{1\beta} p_{1\alpha}\right)
* \left(\epsilon_2^\alpha p_2^\beta - \epsilon_2^\beta p_2^\alpha\right)\right] \f]
* in such a way that it vanishes if the polarizations of the outgoing vectors are
* replaced with their momenta.
*
* The incoming tensor mesons together with their decay products and the coupling
* \f$g\f$ can be specified using the interfaces for the class. The maximum weights
* for the decays can be calculated using the Initialize interface of the
* DecayIntegrator class or specified using the interface.
*
* The incoming and outgoing particles, couplings and maximum weights for
* many of the common \f$T\to VV\f$ decays are specified in the default
* constructor.
*
* @see DecayIntegrator
* * @see \ref TensorMesonVectorVectorDecayerInterfaces "The interfaces"
* defined for TensorMesonVectorVectorDecayer.
*
*/
class TensorMesonVectorVectorDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
TensorMesonVectorVectorDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 9.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- TensorMesonVectorVectorDecayer & operator=(const TensorMesonVectorVectorDecayer &);
+ TensorMesonVectorVectorDecayer & operator=(const TensorMesonVectorVectorDecayer &) = delete;
private:
/**
* the PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* the PDG codes for the first outgoing particle
*/
vector<int> _outgoing1;
/**
* the PDG codes for the second outgoing particle
*/
vector<int> _outgoing2;
/**
* the coupling for the decay
*/
vector<InvEnergy> _coupling;
/**
* the maximum weight for the decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Storage of polarization tensors to try and increase
* speed
*/
mutable vector<Helicity::LorentzTensor<double> > _tensors;
/**
* Storage of the polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector > _vectors[2];
/**
* Storage of the \f$\rho\f$ matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_TensorMesonVectorVectorDecayer_H */
diff --git a/Decay/VectorMeson/OniumToOniumPiPiDecayer.h b/Decay/VectorMeson/OniumToOniumPiPiDecayer.h
--- a/Decay/VectorMeson/OniumToOniumPiPiDecayer.h
+++ b/Decay/VectorMeson/OniumToOniumPiPiDecayer.h
@@ -1,264 +1,264 @@
// -*- C++ -*-
//
// OniumToOniumPiPiDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_OniumToOniumPiPiDecayer_H
#define HERWIG_OniumToOniumPiPiDecayer_H
//
// This is the declaration of the OniumToOniumPiPiDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
* The OniumToOniumPiPiDecayer class uses the matrix element of
* Brown and Cahn PRL35, 1 (1975) for the decay of onium resonaces to
* lighter states and pion pairs. The matrix element is given by
* \f[\mathcal{M} = \epsilon'\cdot\epsilon\left[
* \mathcal{A}\left(q^2-2m^2_\pi\right)+\mathcal{B}E_1E_2\right]
* +\mathcal{C}\left((\epsilon'\cdot q_1)(\epsilon\cdot q_2)+
* (\epsilon'\cdot q_2)(\epsilon\cdot q_1)\right),\f]
* where \f$\epsilon'\f$ is the polarization vector of the decaying onium resonance,
* \f$\epsilon\f$ is the polarization vector of the outgoing onium resonance,
* \f$\mathcal{A}\f$, \f$\mathcal{B}\f$ and \f$\mathcal{C}\f$ are complex couplings,
* \f$m_\pi\f$ is the pion mass, \f$E_{1,2}\f$ are the pion energies, \f$q_{1,2}\f$
* are the pion momenta and \f$q\f$ is the momentum of the \f$\pi\pi\f$ system.
*
* The results of hep-ex/9909038 are used for \f$\psi'\to J/\psi\f$ and arXiv:0706.2317
* for \f$\Upsilon(3S)\f$ and \f$\Upsilon(2S)\f$ decays.
* The remaining parameters are choosen
* to approximately reproduce the distributions from hep-ex/0604031 and hep-ex/0508023.
*
* @see \ref OniumToOniumPiPiDecayerInterfaces "The interfaces"
* defined for OniumToOniumPiPiDecayer.
*/
class OniumToOniumPiPiDecayer: public DecayIntegrator {
public:
/**
* The default constructor.
*/
OniumToOniumPiPiDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode, const Energy2 q2,
const Energy2 s3, const Energy2 s2, const
Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- OniumToOniumPiPiDecayer & operator=(const OniumToOniumPiPiDecayer &);
+ OniumToOniumPiPiDecayer & operator=(const OniumToOniumPiPiDecayer &) = delete;
private:
/**
* the PDG codes for the incoming onium resonace
*/
vector<long> _incoming;
/**
* the PDG codes for the outgoing onium resonance
*/
vector<long> _outgoing;
/**
* the maximum weight for the integration
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* The couplings for the decays
*/
//@{
/**
* Overall normalisation
*/
vector<double> _coupling;
/**
* The real part of \f$A\f$
*/
vector<InvEnergy2> _reA;
/**
* The imaginary part of \f$A\f$
*/
vector<InvEnergy2> _imA;
/**
* The complex \f$A\f$ coupling
*/
vector<complex<InvEnergy2> > _cA;
/**
* The real part of \f$B\f$
*/
vector<InvEnergy2> _reB;
/**
* The imaginary part of \f$B\f$
*/
vector<InvEnergy2> _imB;
/**
* The complex \f$B\f$ coupling
*/
vector<complex<InvEnergy2> > _cB;
/**
* The real part of \f$C\f$
*/
vector<InvEnergy2> _reC;
/**
* The imaginary part of \f$C\f$
*/
vector<InvEnergy2> _imC;
/**
* The complex \f$C\f$ coupling
*/
vector<complex<InvEnergy2> > _cC;
//@}
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the incomng and outgoing onium resonances
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_OniumToOniumPiPiDecayer_H */
diff --git a/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.cc b/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.cc
--- a/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.cc
+++ b/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.cc
@@ -1,443 +1,443 @@
// -*- C++ -*-
//
// PVectorMesonVectorPScalarDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the PVectorMesonVectorPScalarDecayer class.
//
#include "PVectorMesonVectorPScalarDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void PVectorMesonVectorPScalarDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
void PVectorMesonVectorPScalarDecayer::doinit() {
DecayIntegrator::doinit();
// check consistence of the parameters
unsigned int isize=_incoming.size();
if(isize!=_outgoingV.size()||isize!=_outgoingP.size()||
isize!=_maxweight.size()||isize!=_coupling.size())
throw InitException() << "Inconsistent parameters in "
<< "PVectorMesonVectorPScalarDecayer::doinit()"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt(0);
tPDVector extpart(3);
DecayPhaseSpaceModePtr mode;
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0]=getParticleData(_incoming[ix]);
extpart[1]=getParticleData(_outgoingV[ix]);
extpart[2]=getParticleData(_outgoingP[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
PVectorMesonVectorPScalarDecayer::PVectorMesonVectorPScalarDecayer()
: _coupling(67), _incoming(67), _outgoingV(67), _outgoingP(67),
_maxweight(67) {
// decay mode h'_1 to K K*
_incoming[0] = 10333; _outgoingV[0] = 313; _outgoingP[0] = -311;
_coupling[0] = 4.889/GeV; _maxweight[0] = 11.;
_incoming[1] = 10333; _outgoingV[1] = 323; _outgoingP[1] = -321;
_coupling[1] = 4.156/GeV; _maxweight[1] = 11.;
// decay mode h_1 to rho
_incoming[2] = 10223; _outgoingV[2] = 113; _outgoingP[2] = 111;
_coupling[2] = 4.411/GeV; _maxweight[2] = 6.;
_incoming[3] = 10223; _outgoingV[3] = -213; _outgoingP[3] = 211;
_coupling[3] = 4.411/GeV; _maxweight[3] = 6.;
// decay mode b_1 to omega pi
_incoming[4] = 10113; _outgoingV[4] = 223; _outgoingP[4] = 111;
_coupling[4] = 3.862/GeV; _maxweight[4] = 7.5;
_incoming[5] = 10213; _outgoingV[5] = 223; _outgoingP[5] = 211;
_coupling[5] = 3.862/GeV; _maxweight[5] = 7.5;
// decay mode b_1^+ to gamma pi
_incoming[6] = 10213; _outgoingV[6] = 22; _outgoingP[6] = 211;
_coupling[6] = 0.195/GeV; _maxweight[6] = 2.;
// decay mode D'_s1 to D*K
_incoming[7] = 20433; _outgoingV[7] = 413; _outgoingP[7] = 311;
_coupling[7] = 0.161/GeV; _maxweight[7] = 2.5;
_incoming[8] = 20433; _outgoingV[8] = 423; _outgoingP[8] = 321;
_coupling[8] = 0.161/GeV; _maxweight[8] = 2.5;
// decay mode B'_s1 to B*K
_incoming[9] = 20533; _outgoingV[9] = 513; _outgoingP[9] = -311;
_coupling[9] = 0.389/GeV; _maxweight[9] = 2.1;
_incoming[10] = 20533; _outgoingV[10] = 523; _outgoingP[10] = -321;
_coupling[10] = 0.389/GeV; _maxweight[10] = 2.1;
// decay mode K_1 to rho K
_incoming[11] = 10323; _outgoingV[11] = 213; _outgoingP[11] = 311;
_coupling[11] = 4.98/GeV; _maxweight[11] = 3.5;
_incoming[12] = 10323; _outgoingV[12] = 113; _outgoingP[12] = 321;
_coupling[12] = 3.40/GeV; _maxweight[12] = 3.5;
_incoming[13] = 10313; _outgoingV[13] = -213; _outgoingP[13] = 321;
_coupling[13] = 4.87/GeV; _maxweight[13] = 3.5;
_incoming[14] = 10313; _outgoingV[14] = 113; _outgoingP[14] = 311;
_coupling[14] = 3.55/GeV; _maxweight[14] = 3.5;
// decay mode K'_1 to rho K
_incoming[15] = 20323; _outgoingV[15] = 213; _outgoingP[15] = 311;
_coupling[15] = 0.97/GeV; _maxweight[15] = 6.5;
_incoming[16] = 20323; _outgoingV[16] = 113; _outgoingP[16] = 321;
_coupling[16] = 0.69/GeV; _maxweight[16] = 6.5;
_incoming[17] = 20313; _outgoingV[17] = -213; _outgoingP[17] = 321;
_coupling[17] = 0.97/GeV; _maxweight[17] = 6.5;
_incoming[18] = 20313; _outgoingV[18] = 113; _outgoingP[18] = 311;
_coupling[18] = 0.707/GeV; _maxweight[18] = 6.5;
// decay mode K_1 to omega K
_incoming[19] = 10323; _outgoingV[19] = 223; _outgoingP[19] = 321;
_coupling[19] = 4.76/GeV; _maxweight[19] = 7.5;
_incoming[20] = 10313; _outgoingV[20] = 223; _outgoingP[20] = 311;
_coupling[20] = 6.0/GeV; _maxweight[20] = 7.5;
// decay mode K'_1 to omega K
_incoming[21] = 20323; _outgoingV[21] = 223; _outgoingP[21] = 321;
_coupling[21] = 0.600/GeV; _maxweight[21] = 8.;
_incoming[22] = 20313; _outgoingV[22] = 223; _outgoingP[22] = 311;
_coupling[22] = 0.600/GeV; _maxweight[22] = 8.;
// decay mode K_1 to K* pi
_incoming[23] = 10323; _outgoingP[23] = 211; _outgoingV[23] = 313;
_coupling[23] = 0.941/GeV; _maxweight[23] = 8.5;
_incoming[24] = 10323; _outgoingP[24] = 111; _outgoingV[24] = 323;
_coupling[24] = 0.656/GeV; _maxweight[24] = 8.5;
_incoming[25] = 10313; _outgoingP[25] = -211; _outgoingV[25] = 323;
_coupling[25] = 0.932/GeV; _maxweight[25] = 8.5;
_incoming[26] = 10313; _outgoingP[26] = 111; _outgoingV[26] = 313;
_coupling[26] = 0.658/GeV; _maxweight[26] = 8.5;
// decay mode K'_1 to K* pi
_incoming[27] = 20323; _outgoingP[27] = 211; _outgoingV[27] = 313;
_coupling[27] = 2.845/GeV; _maxweight[27] = 12.;
_incoming[28] = 20323; _outgoingP[28] = 111; _outgoingV[28] = 323;
_coupling[28] = 1.99/GeV; _maxweight[28] = 12.;
_incoming[29] = 20313; _outgoingP[29] = -211; _outgoingV[29] = 323;
_coupling[29] = 2.84/GeV; _maxweight[29] = 12.;
_incoming[30] = 20313; _outgoingP[30] = 111; _outgoingV[30] = 313;
_coupling[30] = 2.00/GeV; _maxweight[30] = 12.;
// decaymode D_1 to D* pi
_incoming[31] = 10423; _outgoingP[31] = -211; _outgoingV[31] = 413;
_coupling[31] = 0.489/GeV; _maxweight[31] = 3.;
_incoming[32] = 10423; _outgoingP[32] = 111; _outgoingV[32] = 423;
_coupling[32] = 0.347/GeV; _maxweight[32] = 3.;
_incoming[33] = 10413; _outgoingP[33] = 211; _outgoingV[33] = 423;
_coupling[33] = 0.542/GeV; _maxweight[33] = 3.;
_incoming[34] = 10413; _outgoingP[34] = 111; _outgoingV[34] = 413;
_coupling[34] = 0.383/GeV; _maxweight[34] = 3.;
// decaymode D'_1 to D* pi
_incoming[35] = 20423; _outgoingP[35] = -211; _outgoingV[35] = 413;
_coupling[35] = 1.933/GeV; _maxweight[35] = 3.;
_incoming[36] = 20423; _outgoingP[36] = 111; _outgoingV[36] = 423;
_coupling[36] = 1.367/GeV; _maxweight[36] = 3.;
_incoming[37] = 20413; _outgoingP[37] = 211; _outgoingV[37] = 423;
_coupling[37] = 1.926/GeV; _maxweight[37] = 3.;
_incoming[38] = 20413; _outgoingP[38] = 111; _outgoingV[38] = 413;
_coupling[38] = 1.367/GeV; _maxweight[38] = 3.;
// decaymode B_1 to B* pi
_incoming[39] = 10523; _outgoingP[39] = 211; _outgoingV[39] = 513;
_coupling[39] = 0.130/GeV; _maxweight[39] = 2.2;
_incoming[40] = 10523; _outgoingP[40] = 111; _outgoingV[40] = 523;
_coupling[40] = 0.0924/GeV; _maxweight[40] = 2.2;
_incoming[41] = 10513; _outgoingP[41] = -211; _outgoingV[41] = 523;
_coupling[41] = 0.130/GeV; _maxweight[41] = 2.2;
_incoming[42] = 10513; _outgoingP[42] = 111; _outgoingV[42] = 513;
_coupling[42] = 0.0924/GeV; _maxweight[42] = 2.2;
// decaymode B'_1 to B* pi
_incoming[43] = 20523; _outgoingP[43] = 211; _outgoingV[43] = 513;
_coupling[43] = 0.445/GeV; _maxweight[43] = 2.2;
_incoming[44] = 20523; _outgoingP[44] = 111; _outgoingV[44] = 523;
_coupling[44] = 0.314/GeV; _maxweight[44] = 2.2;
_incoming[45] = 20513; _outgoingP[45] = -211; _outgoingV[45] = 523;
_coupling[45] = 0.445/GeV; _maxweight[45] = 2.2;
_incoming[46] = 20513; _outgoingP[46] = 111; _outgoingV[46] = 513;
_coupling[46] = 0.314/GeV; _maxweight[46] = 2.2;
// decaymode D_s1 to D* pi
_incoming[47] = 10433; _outgoingP[47] = 111; _outgoingV[47] = 433;
_coupling[47] = 0.022/GeV; _maxweight[47] = 2.5;
// decaymode D_s1 to D gamma
_incoming[48] = 10433; _outgoingP[48] = 431; _outgoingV[48] = 22;
_coupling[48] = 0.0587/GeV; _maxweight[48] = 2.1;
// decaymode B_s1 to B gamma
_incoming[49] = 10533; _outgoingP[49] = 531; _outgoingV[49] = 22;
_coupling[49] = 0.142/GeV; _maxweight[49] = 2.;
// decaymode B_s1 to B* pi
_incoming[50] = 10533; _outgoingP[50] = 111; _outgoingV[50] = 533;
_coupling[50] = 0.0074/GeV; _maxweight[50] = 2.1;
// decaymode B_c1 to B_c gamma
_incoming[51] = 10543; _outgoingP[51] = 541; _outgoingV[51] = 22;
_coupling[51] = 0.0759/GeV; _maxweight[51] = 2.2;
// decaymode B'_c1 to B_c gamma
_incoming[52] = 20543; _outgoingP[52] = 541; _outgoingV[52] = 22;
_coupling[52] = 0.175/GeV; _maxweight[52] = 2.2;
// decaymode h_c to eta_c gamma
_incoming[53] = 10443; _outgoingP[53] = 441; _outgoingV[53] = 22;
_coupling[53] = 0.329/GeV; _maxweight[53] = 4.;
// decaymode h_b to eta_b gamma
_incoming[54] = 10553; _outgoingP[54] = 551; _outgoingV[54] = 22;
_coupling[54] = 0.0356/GeV; _maxweight[54] = 3.5;
// a_1 to K* K
_incoming[55] = 20213; _outgoingP[55] = -311; _outgoingV[55] = 323;
_coupling[55] = 3.42/GeV; _maxweight[55] = 2.5;
_incoming[56] = 20213; _outgoingP[56] = 321; _outgoingV[56] = -313;
_coupling[56] = 3.42/GeV; _maxweight[56] = 2.5;
_incoming[57] = 20113; _outgoingP[57] = 321; _outgoingV[57] = -323;
_coupling[57] = 3.42/GeV; _maxweight[57] = 4.0;
_incoming[58] = 20113; _outgoingP[58] = 311; _outgoingV[58] = -313;
_coupling[58] = 3.42/GeV; _maxweight[58] = 4.0;
// a_1 to gamma pi
_incoming[59] = 20113; _outgoingP[59] = 111; _outgoingV[59] = 22;
_coupling[59] = 0.01/GeV; _maxweight[59] = 2.;
_incoming[60] = 20213; _outgoingP[60] = 211; _outgoingV[60] = 22;
_coupling[60] = 0.01/GeV; _maxweight[60] = 2.;
// f'_1 to K* K
_incoming[61] = 20333; _outgoingP[61] = 321; _outgoingV[61] = -323;
_coupling[61] = 1.637/GeV; _maxweight[61] = 7.;
_incoming[62] = 20333; _outgoingP[62] = 311; _outgoingV[62] = -313;
_coupling[62] = 1.737/GeV; _maxweight[62] = 7.;
// decay mode K_1 to gamma K
_incoming[63] = 10313; _outgoingV[63] = 22; _outgoingP[63] = 311;
_coupling[63] = 0.119/GeV; _maxweight[63] = 7.5;
// decay mode K'_1 to gamma K
_incoming[64] = 20313; _outgoingV[64] = 22; _outgoingP[64] = 311;
_coupling[64] = 0.220/GeV; _maxweight[64] = 8.;
// decaymode B_s1 to B K
_incoming[65] = 10533; _outgoingP[65] = -311; _outgoingV[65] = 513;
_coupling[65] = 0.0418/GeV; _maxweight[65] = 2.;
_incoming[66] = 10533; _outgoingP[66] = -321; _outgoingV[66] = 523;
_coupling[66] = 0.0373/GeV; _maxweight[66] = 2.;
// initial size of the arrays
_initsize = _coupling.size();
// intermediates
generateIntermediates(false);
}
int PVectorMesonVectorPScalarDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id(parent->id());
int idbar = parent->CC() ? parent->CC()->id() : id;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
int imode(-1);
unsigned int ix(0);
cc=false;
do {
if(id ==_incoming[ix]) {
if((id1 ==_outgoingV[ix]&&id2 ==_outgoingP[ix])||
(id2 ==_outgoingV[ix]&&id1 ==_outgoingP[ix])) imode=ix;
}
if(idbar==_incoming[ix]&&imode<0) {
if((id1bar==_outgoingV[ix]&&id2bar==_outgoingP[ix])||
(id2bar==_outgoingV[ix]&&id1bar==_outgoingP[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void PVectorMesonVectorPScalarDecayer::persistentOutput(PersistentOStream & os) const {
os << _incoming << _outgoingV << _outgoingP << _maxweight << ounit(_coupling,1/GeV);
}
void PVectorMesonVectorPScalarDecayer::persistentInput(PersistentIStream & is, int) {
is >> _incoming >> _outgoingV >> _outgoingP >> _maxweight >> iunit(_coupling,1/GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<PVectorMesonVectorPScalarDecayer,DecayIntegrator>
describeHerwigPVectorMesonVectorPScalarDecayer("Herwig::PVectorMesonVectorPScalarDecayer", "HwVMDecay.so");
void PVectorMesonVectorPScalarDecayer::Init() {
static ClassDocumentation<PVectorMesonVectorPScalarDecayer> documentation
("The PVectorMesonVectorPScalarDecayer class is designed for the "
"decay of a pseudovector meson to a vector meson, or the photon, and a "
"pseudoscalar meson.");
static ParVector<PVectorMesonVectorPScalarDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&PVectorMesonVectorPScalarDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PVectorMesonVectorPScalarDecayer,int> interfaceOutcomingVector
("OutgoingVector",
"The PDG code for the outgoing spin-1 particle",
&PVectorMesonVectorPScalarDecayer::_outgoingV,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PVectorMesonVectorPScalarDecayer,int> interfaceOutcomingPScalar
("OutgoingPScalar",
"The PDG code for the outgoing spin-0 particle",
&PVectorMesonVectorPScalarDecayer::_outgoingP,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<PVectorMesonVectorPScalarDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&PVectorMesonVectorPScalarDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 100./GeV, false, false, true);
static ParVector<PVectorMesonVectorPScalarDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&PVectorMesonVectorPScalarDecayer::_maxweight,
0, 0, 0, 0., 10000., false, false, true);
}
double PVectorMesonVectorPScalarDecayer::me2(const int,
const Particle & inpart,
const ParticleVector& decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1,PDT::Spin1,PDT::Spin0)));
// is the vector massless
bool photon(_outgoingV[imode()]==ParticleID::gamma);
if(meopt==Initialize) {
VectorWaveFunction::calculateWaveFunctions(_vectors[0],_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
VectorWaveFunction::constructSpinInfo(_vectors[0],const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
VectorWaveFunction::constructSpinInfo(_vectors[1],decay[0],
outgoing,true,photon);
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
VectorWaveFunction::calculateWaveFunctions(_vectors[1],decay[0],outgoing,photon);
// compute the matrix element
Energy2 p0dotpv(inpart.momentum()*decay[0]->momentum());
complex<Energy> epsdot(ZERO);
InvEnergy2 pre(_coupling[imode()]/inpart.mass());
for(unsigned ix=0;ix<3;++ix) {
if(ix==1&&photon) {
for(unsigned int iy=0;iy<3;++iy) (*ME())(iy,ix,0)=0.;
}
else {
epsdot=_vectors[1][ix]*inpart.momentum();
for(unsigned int iy=0;iy<3;++iy)
- (*ME())(iy,ix,0)=pre*_vectors[0][iy].dot(p0dotpv*_vectors[1][ix]
- -epsdot*decay[0]->momentum());
+ (*ME())(iy,ix,0)=Complex(pre*_vectors[0][iy].dot(p0dotpv*_vectors[1][ix]
+ -epsdot*decay[0]->momentum()));
}
}
// test of the matrix element
// double me = newME.contract(rhoin).real();
// Energy pcm=Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = sqr(_coupling[imode()])/3.*(2.*sqr(pcm)+3.*sqr(decay[0]->mass()));
// cerr << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << test << " " << (me-test)/(me+test) << "\n";
// return the answer
return ME()->contract(_rho).real();
}
bool PVectorMesonVectorPScalarDecayer::twoBodyMEcode(const DecayMode & dm,
int & mecode,
double & coupling) const {
int id(dm.parent()->id()),idbar(id);
if(dm.parent()->CC()){idbar=dm.parent()->CC()->id();}
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id()),id1bar(id1);
if((**pit).CC()){id1bar=(**pit).CC()->id();}
++pit;
int id2((**pit).id()),id2bar(id2);
if((**pit).CC()){id2bar=(**pit).CC()->id();}
unsigned int ix(0); bool order(false);
int imode(-1);
do {
if(id==_incoming[ix]) {
if(id1 ==_outgoingV[ix]&&id2 ==_outgoingP[ix]) {
imode=ix;
order=true;
}
if(id2 ==_outgoingV[ix]&&id1 ==_outgoingP[ix]) {
imode=ix;
order=false;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoingV[ix]&&id2bar==_outgoingP[ix]) {
imode=ix;
order=true;
}
if(id2bar==_outgoingV[ix]&&id1bar==_outgoingP[ix]) {
imode=ix;
order=false;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling = _coupling[imode]*dm.parent()->mass();
mecode = 4;
return order;
}
void PVectorMesonVectorPScalarDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "newdef " << name() << ":OutgoingPScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "insert " << name() << ":OutgoingPScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.h b/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.h
--- a/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.h
+++ b/Decay/VectorMeson/PVectorMesonVectorPScalarDecayer.h
@@ -1,198 +1,198 @@
// -*- C++ -*-
//
// PVectorMesonVectorPScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PVectorMesonVectorPScalarDecayer_H
#define HERWIG_PVectorMesonVectorPScalarDecayer_H
//
// This is the declaration of the PVectorMesonVectorPScalarDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class is designed for the decay of a pseudovector meson to a spin-1
* particle, either a vector meson or a photon, and a pseudoscalar meson.
* The current for the decay is
*
* \f[\mathcal{M}=g\epsilon_mu\left[ p_V \cdot p_0 \epsilon_V^\mu
* -p_V^\mu \epsilon_V \cdot p_0\right],\f]
* where \f$\epsilon\f$ is the polarization vector of the decaying pseudo-vector
* meson, \f$\epsilon_V\f$ is the polarization vector of the outgoing vector meson,
* \f$p_0\f$ is the momentum of the decaying particle and \f$p_V\f$ is the momentum
* of the outgoing vector meson.
*
* @see DecayIntegrator
* @see \ref PVectorMesonVectorPScalarDecayerInterfaces "The interfaces"
* defined for PVectorMesonVectorPScalarDecayer.
*
* \author Peter Richardson
*
*/
class PVectorMesonVectorPScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
PVectorMesonVectorPScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 4.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- PVectorMesonVectorPScalarDecayer & operator=(const PVectorMesonVectorPScalarDecayer &);
+ PVectorMesonVectorPScalarDecayer & operator=(const PVectorMesonVectorPScalarDecayer &) = delete;
private:
/**
* Coupling for a decay
*/
vector<InvEnergy> _coupling;
/**
* PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* PDG codes for the outgoing vector
*/
vector<int> _outgoingV;
/**
* PDG codes for the outgoing pseudoscalar mesons.
*/
vector<int> _outgoingP;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the incoming and outgoing vector mesons
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_PVectorMesonVectorPScalarDecayer_H */
diff --git a/Decay/VectorMeson/VectorMeson2FermionDecayer.h b/Decay/VectorMeson/VectorMeson2FermionDecayer.h
--- a/Decay/VectorMeson/VectorMeson2FermionDecayer.h
+++ b/Decay/VectorMeson/VectorMeson2FermionDecayer.h
@@ -1,212 +1,212 @@
// -*- C++ -*-
//
// VectorMeson2FermionDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMeson2FermionDecayer_H
#define HERWIG_VectorMeson2FermionDecayer_H
// This is the declaration of the VectorMeson2FermionDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "ThePEG/Helicity/LorentzSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>VectorMeson2FermionDecayer</code> class is designed for the decay
* of a vector meson to a fermion-antifermion pair. This class is mainly used for the
* decay of the vector mesons to electron and muon pairs but can also be used for
* the decay of charmonium, \e e.g. \f$J/\psi\f$, or bottomonium decays to
* baryons, \e e.g. \f$p\bar{p}\f$ and \f$n\bar{n}\f$.
*
* In this case the matrix element is taken to have the form
* \f[\mathcal{M} = g\epsilon_\mu \bar{u}(p_f)\gamma^\mu u(p_{\bar{f}}).\f]
*
* The incoming vector mesons together with their decay products and the coupling
* \f$g\f$ can be specified using the interfaces for the class. The maximum weights
* for the decays can be calculated using the Initialize interface of the
* DecayIntegrator class or specified using the interface.
*
* The incoming and outgoing particles, couplings and maximum weights for
* many of the common \f$V\to f\bar{f}\f$ decays are specified in the default
* constructor.
*
* @see DecayIntegrator
* @see \ref VectorMeson2FermionDecayerInterfaces "The interfaces"
* defined for VectorMeson2FermionDecayer.
*
*/
class VectorMeson2FermionDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMeson2FermionDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 2.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMeson2FermionDecayer & operator=(const VectorMeson2FermionDecayer &);
+ VectorMeson2FermionDecayer & operator=(const VectorMeson2FermionDecayer &) = delete;
private:
/**
* coupling for a decay
*/
vector<double> _coupling;
/**
* the PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* the PDG codes for the outgoing fermion
*/
vector<int> _outgoingf;
/**
* the PDG codes for the outgoing antifermion.
*/
vector<int> _outgoinga;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decaying particle
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
/**
* Spinors for the decay products
*/
mutable vector<Helicity::LorentzSpinor <SqrtEnergy> > _wave;
/**
* barred spinors for the decay products
*/
mutable vector<Helicity::LorentzSpinorBar<SqrtEnergy> > _wavebar;
};
}
#endif /* HERWIG_VectorMeson2FermionDecayer_H */
diff --git a/Decay/VectorMeson/VectorMeson2MesonDecayer.h b/Decay/VectorMeson/VectorMeson2MesonDecayer.h
--- a/Decay/VectorMeson/VectorMeson2MesonDecayer.h
+++ b/Decay/VectorMeson/VectorMeson2MesonDecayer.h
@@ -1,209 +1,209 @@
// -*- C++ -*-
//
// VectorMeson2MesonDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMeson2MesonDecayer_H
#define HERWIG_VectorMeson2MesonDecayer_H
//
// This is the declaration of the VectorMeson2MesonDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class is the implementation for the decay of a vector meson to
* two scalar mesons, the classic example is \f$\rho -> \pi\pi\f$, via a current
* which is the difference of the momenta of the mesons.
* \f[\mathcal{M} = g\epsilon_\mu(p_1-p_2)^\mu,\f]
* where \f$p_{1,2}\f$ are the momenta of the decay products,
* \f$\epsilon\f$ is the polarization vector of the decaying particle
* and \f$g\f$ the coupling.
* Obviously the
* order of the momenta doesn't matter as it will only effect the sign of the
* matrix element.
*
* The incoming vector mesons together with their decay products and the coupling
* \f$g\f$ can be specified using the interfaces for the class. The maximum weights
* for the decays can be calculated using the Initialize interface of the
* DecayIntegrator class or specified using the interface.
*
* The incoming and outgoing particles, couplings and maximum weights for
* many of the common \f$V\to PP\f$ decays are specified in the default
* constructor.
*
* @see DecayIntegrator
* @see \ref VectorMeson2MesonDecayerInterfaces "The interfaces"
* defined for VectorMeson2MesonDecayer.
*
* \author Peter Richardson
*
*/
class VectorMeson2MesonDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMeson2MesonDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 0.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMeson2MesonDecayer & operator=(const VectorMeson2MesonDecayer &);
+ VectorMeson2MesonDecayer & operator=(const VectorMeson2MesonDecayer &) = delete;
private:
/**
* the PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* the PDG codes for the first outgoing meson
*/
vector<int> _outgoing1;
/**
* the PDG codes for the second outgoing meson
*/
vector<int> _outgoing2;
/**
* the maximum weight for the integration
*/
vector<double> _maxweight;
/**
* the coupling for the decay
*/
vector<double> _coupling;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Storage of polarization tensors to try and increase
* speed
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
/**
* Storage of the \f$\rho\f$ matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_VectorMeson2MesonDecayer_H */
diff --git a/Decay/VectorMeson/VectorMeson3PionDecayer.h b/Decay/VectorMeson/VectorMeson3PionDecayer.h
--- a/Decay/VectorMeson/VectorMeson3PionDecayer.h
+++ b/Decay/VectorMeson/VectorMeson3PionDecayer.h
@@ -1,381 +1,381 @@
// -*- C++ -*-
//
// VectorMeson3PionDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMeson3PionDecayer_H
#define HERWIG_VectorMeson3PionDecayer_H
// This is the declaration of the VectorMeson3PionDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The VectorMeson3PionDecayer class is designed to perform the
* decay of an \f$I=0\f$ meson to three pions via rho mesons including the
* option of higher rho resonaces and a constant term. It is mainly intended for
* the decays:
* - \f$\omega \to \pi^+\pi^-\pi^0\f$;
* - \f$\phi \to \pi^+\pi^-\pi^0\f$.
*
* The default for the \f$\omega\f$ is to only include the
* contributions of the \f$\rho(770)\f$
* without a constant term, whereas for the \f$\phi\f$ the parameters
* from hep-ex/0303016 (KLOE) which includes the \f$\rho(770)\f$
* and a constant term to represent the effects
* of the higher rho resonances is used.
* (The KLOE paper also included a omega contribution but this is assumed to be a
* non-resonant contribution to the \f$e^+e^-\f$ cross section.)
*
* The form of the matrix element is taken to be
*
* \f[\mathcal{M} = \frac{g}{M^2_{\rho}}\epsilon^{\mu\alpha\beta\gamma}
* \epsilon_{0\mu}
* p_{+\alpha}p_{-\beta}p_{0\gamma}
* \left[a_de^{i\phi_d} +\sum_k a_{\rho_k}e^{i\phi_{\rho_k}}
* \left\{
* \frac{M^2_{\rho_k^+}}{m^2_{0+}-M^2_{\rho_k^+}
* +im_{0+}\Gamma_{\rho_k^+}(m^2_{0+})}
* +\frac{M^2_{\rho_k^-}}{m^2_{0-}-M^2_{\rho_k^-}
* +im_{0-}\Gamma_{\rho_k^-}(m^2_{0-})}
* +\frac{M^2_{\rho_k^0}}{m^2_{+-}-M^2_{\rho_k^0}
* +im_{+-}\Gamma_{\rho_k^0}(m^2_{+-})}\right\}
* \right],\f]
* where \f$\epsilon_0\f$ is the polarization vector of the decaying meson,
* \f$p_{+,-,0}\f$ are the momenta of the positively charged, negatively charged
* and neutral pions respectively, \f$m^2_{ij}=(p_i+p_j)^2\f$, \f$M_{\rho_k}\f$ is
* the mass of the \f$k\f$th \f$\rho\f$ resonance, \f$g\f$ is the overall coupling and
* \f[\Gamma_{\rho_k}(m^2) = \Gamma_{\rho_k}\left(\frac{p_\pi(m^2)}{p_\pi(M_{\rho_k}^2)}\right)^2
* \left(\frac{M_{\rho_k}^2}{m^2}\right) \f]
* where \f$p_\pi\f$ is the pion momentum in the \f$\rho\f$ rest frame
* and \f$\Gamma_{\rho_k}\f$ is the width. In practice the couplings of the different
* terms are measured relative to the coupling of the lightest \f$\rho\f$ multiplet
* which is assumed to be one.
*
*
* To allow the easy addition of further modes the parameters for additional modes
* can be set. The following must be specified for each mode
*
* - Incoming - the PDG code for the incoming particle
* - Coupling - the overall coupling for the decay, \f$g\f$.
* - DirectCoupling - the relative coupling for the direct term, \f$a_d\f$.
* - DirectPhase - the phase of the coupling for the direct term, \f$\phi_d\f$.
* - Rho2Coupling - the relative coupling for the second rho multiplet,
* \f$a_{\rho_2}\f$.
* - Rho2Phase - the phase of the coupling for the second rho multiplet,
* \f$\phi_{\rho_2}\f$.
* - Rho3Coupling - the relative coupling for the third rho multiplet,
* \f$a_{\rho_3}\f$.
* - Rho3Phase - the phase of the coupling for the third rho multiplet,
* \f$\phi_{\rho_3}\f$.
* - MaximumWeight - the maximum weight for the integration of the channel
* - Rho1Weight - the weight for the first rho multiplet in the
* multichannel integration
* - Rho2Weight - the weight for the second rho multiplet in the
* multichannel integration
* - Rho3Weight - the weight for the third rho multiplet in the
* multichannel integration
* - Rho1Mass - mass of the first rho multiplet, \f$M_{\rho_1}\f$.
* - Rho2Mass - mass of the second rho multiplet, \f$M_{\rho_2}\f$.
* - Rho3Mass - mass of the third rho multiplet, \f$M_{\rho_3}\f$.
* - Rho1Width - width of the first rho multiplet, \f$\Gamma_{\rho_1}\f$.
* - Rho2Width - width of the second rho multiplet, \f$\Gamma_{\rho_2}\f$.
* - Rho3Width - width of the third rho multiplet, \f$\Gamma_{\rho_3}\f$.
*
* @see DecayIntegrator
* @see \ref VectorMeson3PionDecayerInterfaces "The interfaces"
* defined for VectorMeson3PionDecayer.
*
* \author Peter Richardson
*/
class VectorMeson3PionDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMeson3PionDecayer();
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode, const Energy2 q2,
const Energy2 s3, const Energy2 s2, const
Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMeson3PionDecayer & operator=(const VectorMeson3PionDecayer &);
+ VectorMeson3PionDecayer & operator=(const VectorMeson3PionDecayer &) = delete;
private:
/**
* vector storing the decaying particles for the different modes
*/
vector<double> _incoming;
/**
* the overall coupling for the decay, \f$g\f$.
*/
vector<InvEnergy> _coupling;
/**
* relative coupling for the direct term, \f$a_d\f$.
*/
vector<double> _directcoupling;
/**
* relative phase for the direct term, \f$\phi_d\f$.
*/
vector<double> _directphase;
/**
* relative coupling for the second rho multiplet, \f$a_{\rho_2}\f$.
*/
vector<double> _rho2coupling;
/**
* relative phase for the second rho multiplet, \f$\phi_{\rho_2}\f$.
*/
vector<double> _rho2phase;
/**
* relative coupling for the second rho multiplet, \f$a_{\rho_3}\f$.
*/
vector<double> _rho3coupling;
/**
* relative phase for the second rho multiplet, \f$\phi_{\rho_3}\f$.
*/
vector<double> _rho3phase;
/**
* maximum weight for the integration of the channel
*/
vector<double> _maxwgt;
/**
* weight for the first rho multiplet in the integration
*/
vector<double> _rho1wgt;
/**
* weight for the second rho multiplet in the integration
*/
vector<double> _rho2wgt;
/**
* weight for the third rho multiplet in the integration
*/
vector<double> _rho3wgt;
/**
* mass of the first rho multiplet, \f$M_{\rho_1}\f$.
*/
vector<Energy> _rho1mass;
/**
* mass of the second rho multiplet, \f$M_{\rho_2}\f$.
*/
vector<Energy> _rho2mass;
/**
* mass of the third rho multiplet, \f$M_{\rho_3}\f$.
*/
vector<Energy> _rho3mass;
/**
* width of the first rho multiplet, \f$\Gamma_{\rho_1}\f$.
*/
vector<Energy> _rho1width;
/**
* width of the second rho multiplet, \f$\Gamma_{\rho_2}\f$.
*/
vector<Energy> _rho2width;
/**
* width of the third rho multiplet, \f$\Gamma_{\rho_3}\f$.
*/
vector<Energy> _rho3width;
/**
* use the default parameters for the rho masses and widths
*/
vector<bool> _defaultmass;
/**
* Constants for the running widths
*/
//@{
/**
* For the neutral \f$\rho\f$
*/
vector<vector <double> > _rho0const;
/**
* For the charged \f$\rho\f$
*/
vector<vector <double> > _rhocconst;
//@}
/**
* rho mass parameters
*/
vector<vector<Energy> > _rhomass;
/**
* rho mass parameters
*/
vector<vector<Energy2> > _rhomass2;
/**
* couplings as complex numbers
*/
vector<vector <complex<InvEnergy2> > > _ccoupling;
/**
* The charge pion mass
*/
Energy _mpic;
/**
* The neutral pion mass
*/
Energy _mpi0;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Storage of polarization tensors to try and increase
* speed
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
/**
* Storage of the \f$\rho\f$ matrix
*/
mutable RhoDMatrix _rho;
};
}
#endif /* HERWIG_VectorMeson3PionDecayer_H */
diff --git a/Decay/VectorMeson/VectorMesonPScalarFermionsDecayer.h b/Decay/VectorMeson/VectorMesonPScalarFermionsDecayer.h
--- a/Decay/VectorMeson/VectorMesonPScalarFermionsDecayer.h
+++ b/Decay/VectorMeson/VectorMesonPScalarFermionsDecayer.h
@@ -1,257 +1,257 @@
// -*- C++ -*-
//
// VectorMesonPScalarFermionsDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMesonPScalarFermionsDecayer_H
#define HERWIG_VectorMesonPScalarFermionsDecayer_H
//
// This is the declaration of the VectorMesonPScalarFermionsDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
#include "ThePEG/Helicity/LorentzSpinorBar.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>VectorMesonPScalarFermionsDecayer</code> class is designed to perform the
* decay of a vector meson to a pesudo scalar and a fermion-antifermion pair according
* to a current which is the \f$V\to VP\f$ vertex combined with the branching of the
* vector into a fermion-antifermion pair.
*
* The current is
* \f[\mathcal{M}=\frac{g}{(p_f+p_{\bar f})^2}\epsilon^{\mu\nu\alpha\beta}
* \epsilon_{0\mu}p_{0\nu}(p_f+p_{\bar f})_\alpha
* \bar{u}(p_f)\gamma_\beta v(p_{\bar f})
* \f]
*
* It includes the option of a vector meson dominance (VMD) type form factor
* \f$\frac{-M^2+i\Gamma M}{(m^2_{ff}-M^2+i\Gamma M)}\f$.
*
* The incoming and outgoing meson together with the types of fermions can be
* specified using the interfaces.
*
* @see DecayIntegrator
* @see VectorMesonVectorPScalarDecayer
* @see \ref VectorMesonPScalarFermionsDecayerInterfaces "The interfaces"
* defined for VectorMesonPScalarFermionsDecayer.
*
* \author Peter Richardson
*
*/
class VectorMesonPScalarFermionsDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMesonPScalarFermionsDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The differential three body decay rate with one integral performed.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s The invariant mass which still needs to be integrate over.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The differential rate \f$\frac{d\Gamma}{ds}\f$
*/
virtual InvEnergy threeBodydGammads(const int imode, const Energy2 q2,
const Energy2 s,
const Energy m1, const Energy m2,
const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMesonPScalarFermionsDecayer & operator=(const VectorMesonPScalarFermionsDecayer &);
+ VectorMesonPScalarFermionsDecayer & operator=(const VectorMesonPScalarFermionsDecayer &) = delete;
private:
/**
* coupling for a decay
*/
vector<InvEnergy> _coupling;
/**
* PDG codes for the incoming particle
*/
vector<int> _incoming;
/**
* PDG codes for the outgoing meson.
*/
vector<int> _outgoingP;
/**
* PDG codes for the outgoing fermion.
*/
vector<int> _outgoingf;
/**
* PDG codes for the outgoing antifermion.
*/
vector<int> _outgoinga;
/**
* Maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Relative weights for the two channels
*/
vector<double> _weight;
/**
* Include the VMD form factor.
*/
vector<int> _includeVMD;
/**
* PDG code for the particle mass and width to use for the VMD form factor.
*/
vector<int> _VMDid;
/**
* Mass for the VMD form factor.
*/
vector<Energy> _VMDmass;
/**
* Width for the VMD form factor.
*/
vector<Energy> _VMDwidth;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrixl
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the decaying particle
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
/**
* Spinors for the fermions
*/
mutable vector<Helicity::LorentzSpinor <SqrtEnergy> > _wave;
/**
* Barred spinors for the fermions
*/
mutable vector<Helicity::LorentzSpinorBar<SqrtEnergy> > _wavebar;
};
}
#endif /* HERWIG_VectorMesonPScalarFermionsDecayer_H */
diff --git a/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.cc b/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.cc
--- a/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.cc
+++ b/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.cc
@@ -1,327 +1,327 @@
// -*- C++ -*-
//
// VectorMesonPVectorPScalarDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the VectorMesonPVectorPScalarDecayer class.
//
#include "VectorMesonPVectorPScalarDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void VectorMesonPVectorPScalarDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
void VectorMesonPVectorPScalarDecayer::doinit() {
DecayIntegrator::doinit();
// check consistence of the parameters
unsigned int isize=_incoming.size();
if(isize!=_outgoingA.size()||isize!=_outgoingP.size()||
isize!=_maxweight.size()||isize!=_coupling.size())
throw InitException() << "Inconsistent parameters in "
<< "VectorMesonPVectorPScalarDecayer::doinit()"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt(0);
tPDVector extpart(3);
DecayPhaseSpaceModePtr mode;
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0]=getParticleData(_incoming[ix]);
extpart[1]=getParticleData(_outgoingA[ix]);
extpart[2]=getParticleData(_outgoingP[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
VectorMesonPVectorPScalarDecayer::VectorMesonPVectorPScalarDecayer()
: _coupling(21), _incoming(21), _outgoingA(21), _outgoingP(21),
_maxweight(21) {
// Jpsi to K_1 K
_incoming[0] = 443; _outgoingA[0] = 20313; _outgoingP[0] = -311;
_coupling[0] = 0.00127/GeV; _maxweight[0] = 12.;
_incoming[1] = 443; _outgoingA[1] = 20323; _outgoingP[1] = -321;
_coupling[1] = 0.00127/GeV; _maxweight[1] = 12.;
// Jpsi to b_1 pi
_incoming[2] = 443; _outgoingA[2] = 10213; _outgoingP[2] = -211;
_coupling[2] = 0.00106/GeV; _maxweight[2] = 10.5;
_incoming[3] = 443; _outgoingA[3] = 10113; _outgoingP[3] = 111;
_coupling[3] = 0.00106/GeV; _maxweight[3] = 10.5;
// psi(2s) to K_1 K
_incoming[4] = 100443; _outgoingA[4] = 10313; _outgoingP[4] = -311;
_coupling[4] = 0.00152/GeV; _maxweight[4] = 12.;
_incoming[5] = 100443; _outgoingA[5] = 10323; _outgoingP[5] = -321;
_coupling[5] = 0.00152/GeV; _maxweight[5] = 12.;
// psi(2s) to b_1 pi
_incoming[6] = 100443; _outgoingA[6] = 10213; _outgoingP[6] = -211;
_coupling[6] = 0.000694/GeV; _maxweight[6] = 10.5;
_incoming[7] = 100443; _outgoingA[7] = 10113; _outgoingP[7] = 111;
_coupling[7] = 0.000694/GeV; _maxweight[7] = 10.5;
// rho'' decays
// to h_1
_incoming[8] = 30213; _outgoingA[8] = 10223; _outgoingP[8] = 211;
_coupling[8] = 1.45/GeV; _maxweight[8] = 5.5;
_incoming[9] = 30113; _outgoingA[9] = 10223; _outgoingP[9] = 111;
_coupling[9] = 1.45/GeV; _maxweight[9] = 5.5;
// to a_1
_incoming[10] = 30213; _outgoingA[10] = 20213; _outgoingP[10] = 111;
_coupling[10] = 1.09/GeV; _maxweight[10] = 4.;
_incoming[11] = 30213; _outgoingA[11] = 20113; _outgoingP[11] = 211;
_coupling[11] = 1.09/GeV; _maxweight[11] = 4.;
_incoming[12] = 30113; _outgoingA[12] = 20213; _outgoingP[12] = -211;
_coupling[12] = 1.09/GeV; _maxweight[12] = 4.;
// rho' decays
// to h_1
_incoming[13] = 100213; _outgoingA[13] = 10223; _outgoingP[13] = 211;
_coupling[13] = 1.20/GeV; _maxweight[13] = 5.;
_incoming[14] = 100113; _outgoingA[14] = 10223; _outgoingP[14] = 111;
_coupling[14] = 1.20/GeV; _maxweight[14] = 5.;
// to a_1
_incoming[15] = 100213; _outgoingA[15] = 20213; _outgoingP[15] = 111;
_coupling[15] = 1.83/GeV; _maxweight[15] = 4.;
_incoming[16] = 100213; _outgoingA[16] = 20113; _outgoingP[16] = 211;
_coupling[16] = 1.83/GeV; _maxweight[16] = 4.;
_incoming[17] = 100113; _outgoingA[17] = 20213; _outgoingP[17] = -211;
_coupling[17] = 1.83/GeV; _maxweight[17] = 4.;
// omega' to b pi
_incoming[18] = 100223; _outgoingA[18] = 10113; _outgoingP[18] = 111;
_coupling[18] = 1.659/GeV; _maxweight[18] = 7.;
_incoming[19] = 100223; _outgoingA[19] = 10213; _outgoingP[19] = -211;
_coupling[19] = 1.659/GeV; _maxweight[19] = 6.;
// psi(2s) -> h_c pi0
_incoming[20] = 100443; _outgoingA[20] = 10443; _outgoingP[20] = 111;
_coupling[20] = 0.0029/GeV; _maxweight[20] = 6.;
// initial size of the arrays
_initsize = _coupling.size();
// intermediates
generateIntermediates(false);
}
int VectorMesonPVectorPScalarDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id(parent->id());
int idbar = parent->CC() ? parent->CC()->id() : id;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
int imode(-1);
unsigned int ix(0);
cc=false;
do {
if(id ==_incoming[ix]) {
if((id1 ==_outgoingA[ix]&&id2 ==_outgoingP[ix])||
(id2 ==_outgoingA[ix]&&id1 ==_outgoingP[ix])) imode=ix;
}
if(idbar==_incoming[ix]) {
if((id1bar==_outgoingA[ix]&&id2bar==_outgoingP[ix])||
(id2bar==_outgoingA[ix]&&id1bar==_outgoingP[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void VectorMesonPVectorPScalarDecayer::persistentOutput(PersistentOStream & os) const {
os << _incoming << _outgoingA << _outgoingP << _maxweight << ounit(_coupling,1/GeV);
}
void VectorMesonPVectorPScalarDecayer::persistentInput(PersistentIStream & is, int) {
is >> _incoming >> _outgoingA >> _outgoingP >> _maxweight >> iunit(_coupling,1/GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<VectorMesonPVectorPScalarDecayer,DecayIntegrator>
describeHerwigVectorMesonPVectorPScalarDecayer("Herwig::VectorMesonPVectorPScalarDecayer", "HwVMDecay.so");
void VectorMesonPVectorPScalarDecayer::Init() {
static ClassDocumentation<VectorMesonPVectorPScalarDecayer> documentation
("The VectorMesonPVectorPScalarDecayer class is designed for the "
"decay of a vector meson to a pseudovector meson and a "
"pseudoscalar meson.");
static ParVector<VectorMesonPVectorPScalarDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&VectorMesonPVectorPScalarDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<VectorMesonPVectorPScalarDecayer,int> interfaceOutcomingVector
("OutgoingPVector",
"The PDG code for the outgoing spin-1 particle",
&VectorMesonPVectorPScalarDecayer::_outgoingA,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<VectorMesonPVectorPScalarDecayer,int> interfaceOutcomingScalar
("OutgoingPScalar",
"The PDG code for the outgoing spin-0 particle",
&VectorMesonPVectorPScalarDecayer::_outgoingP,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<VectorMesonPVectorPScalarDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&VectorMesonPVectorPScalarDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 100./GeV, false, false, true);
static ParVector<VectorMesonPVectorPScalarDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&VectorMesonPVectorPScalarDecayer::_maxweight,
0, 0, 0, 0., 100., false, false, true);
}
double VectorMesonPVectorPScalarDecayer::me2(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin1,PDT::Spin1,PDT::Spin0)));
// is the vector massless
bool photon(_outgoingA[imode()]==ParticleID::gamma);
if(meopt==Initialize) {
VectorWaveFunction::calculateWaveFunctions(_vectors[0],_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
VectorWaveFunction::constructSpinInfo(_vectors[0],const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
VectorWaveFunction::constructSpinInfo(_vectors[1],decay[0],
outgoing,true,photon);
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
VectorWaveFunction::calculateWaveFunctions(_vectors[1],decay[0],outgoing,photon);
// compute the matrix element
Energy2 p0dotpv(inpart.momentum()*decay[0]->momentum());
complex<Energy> epsdot(ZERO);
InvEnergy2 pre(_coupling[imode()]/inpart.mass());
for(unsigned int ix=0;ix<3;++ix) {
epsdot=_vectors[1][ix]*inpart.momentum();
for(unsigned int iy=0;iy<3;++iy) {
- (*ME())(iy,ix,0)=pre*(p0dotpv*(_vectors[1][ix].dot(_vectors[0][iy]))-
- epsdot*(_vectors[0][iy]*decay[0]->momentum()));
+ (*ME())(iy,ix,0)=Complex(pre*(p0dotpv*(_vectors[1][ix].dot(_vectors[0][iy]))-
+ epsdot*(_vectors[0][iy]*decay[0]->momentum())));
}
}
// test of the matrix element
// double me = ME()->contract(_rho).real();
// Energy pcm=Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = sqr(_coupling[imode()])/3.*(2.*sqr(pcm)+3.*sqr(decay[0]->mass()));
// cerr << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << test << " " << (me-test)/(me+test) << "\n";
// return the answer
return ME()->contract(_rho).real();
}
bool VectorMesonPVectorPScalarDecayer::twoBodyMEcode(const DecayMode & dm,
int & mecode,
double & coupling) const {
int imode(-1);
int id(dm.parent()->id());
int idbar = dm.parent()->CC() ? dm.parent()->CC()->id() : id;
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());
int id1bar = (**pit).CC() ? (**pit).CC()->id() : id1;
++pit;
int id2((**pit).id());
int id2bar = (**pit).CC() ? (**pit).CC()->id() : id2;
unsigned int ix(0); bool order(false);
do {
if(id==_incoming[ix]) {
if(id1 ==_outgoingA[ix]&&id2 ==_outgoingP[ix]) {
imode=ix;
order=true;
}
if(id2 ==_outgoingA[ix]&&id1 ==_outgoingP[ix]) {
imode=ix;
order=false;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoingA[ix]&&id2bar==_outgoingP[ix]) {
imode=ix;
order=true;
}
if(id2bar==_outgoingA[ix]&&id1bar==_outgoingP[ix]) {
imode=ix;
order=false;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling = _coupling[imode]*dm.parent()->mass();
mecode = 4;
return order;
}
void VectorMesonPVectorPScalarDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":OutgoingPVector " << ix << " "
<< _outgoingA[ix] << "\n";
output << "newdef " << name() << ":OutgoingPScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":OutgoingPVector " << ix << " "
<< _outgoingA[ix] << "\n";
output << "insert " << name() << ":OutgoingPScalar " << ix << " "
<< _outgoingP[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.h b/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.h
--- a/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.h
+++ b/Decay/VectorMeson/VectorMesonPVectorPScalarDecayer.h
@@ -1,192 +1,192 @@
// -*- C++ -*-
//
// VectorMesonPVectorPScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMesonPVectorPScalarDecayer_H
#define HERWIG_VectorMesonPVectorPScalarDecayer_H
// This is the declaration of the VectorMesonPVectorPScalarDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class is designed for the decay of a vector meson to a pseudovector
* meson and a pseudoscalar meson.
* The current for the decay is
*
* \f[\mathcal{M}= g\left[ p_V \cdot p_0 \epsilon_V\cdot \epsilon_0
* -p_V\cdot \epsilon_0 \epsilon_V \cdot p_0\right]\f]
*
* @see DecayIntegrator
* @see \ref VectorMesonPVectorPScalarDecayerInterfaces "The interfaces"
* defined for VectorMesonPVectorPScalarDecayer.
*
* \author Peter Richardson
*/
class VectorMesonPVectorPScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMesonPVectorPScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 4.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMesonPVectorPScalarDecayer & operator=(const VectorMesonPVectorPScalarDecayer &);
+ VectorMesonPVectorPScalarDecayer & operator=(const VectorMesonPVectorPScalarDecayer &) = delete;
private:
/**
* coupling for a decay
*/
vector<InvEnergy> _coupling;
/**
* PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* PDG codes for the outgoing pseudo-vector
*/
vector<int> _outgoingA;
/**
* PDG codes for the outgoing pseudoscalar mesons.
*/
vector<int> _outgoingP;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors for the incoming and outgoing ferimons
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_VectorMesonPVectorPScalarDecayer_H */
diff --git a/Decay/VectorMeson/VectorMesonVectorPScalarDecayer.h b/Decay/VectorMeson/VectorMesonVectorPScalarDecayer.h
--- a/Decay/VectorMeson/VectorMesonVectorPScalarDecayer.h
+++ b/Decay/VectorMeson/VectorMesonVectorPScalarDecayer.h
@@ -1,206 +1,206 @@
// -*- C++ -*-
//
// VectorMesonVectorPScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMesonVectorPScalarDecayer_H
#define HERWIG_VectorMesonVectorPScalarDecayer_H
// This is the declaration of the VectorMesonVectorPScalarDecayer class.
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
/** \ingroup Decay
*
* This class is designed for the decay of a vector meson to another spin-1
* particle, either another vector meson or a photon, and a pseduoscalar meson.
* The matrix element for the decay is
* \f[\mathcal{M} = g\epsilon^{\mu\nu\alpha\beta}
* \epsilon_{0\mu} p_{0\nu} p_{1\alpha} \epsilon_{1\beta}, \f]
* where \f$p_0\f$ is the momentum of the decaying particle, \f$p_1\f$ is the momentum
* of the outgoing vector particle, \f$\epsilon_0\f$ is the polarization vector of
* the incoming meson and \f$\epsilon_1\f$ is the polarization vector of the
* outgoing vector particle..
*
* Examples of such decays are \f$\rho\to\pi\gamma\f$.
*
* The incoming vector mesons together with their decay products and the coupling
* \f$g\f$ can be specified using the interfaces for the class. The maximum weights
* for the decays can be calculated using the Initialize interface of the
* DecayIntegrator class or specified using the interface.
*
* The incoming and outgoing particles, couplings and maximum weights for
* many of the common \f$V\to PV\f$ decays are specified in the default
* constructor.
*
* @see DecayIntegrator
* @see \ref VectorMesonVectorPScalarDecayerInterfaces "The interfaces"
* defined for VectorMesonVectorPScalarDecayer.
*
* \author Peter Richardson
*
*/
class VectorMesonVectorPScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMesonVectorPScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 1.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMesonVectorPScalarDecayer & operator=(const VectorMesonVectorPScalarDecayer &);
+ VectorMesonVectorPScalarDecayer & operator=(const VectorMesonVectorPScalarDecayer &) = delete;
private:
/**
* coupling for a decay
*/
vector<InvEnergy> _coupling;
/**
* the PDG codes for the incoming particle
*/
vector<int> _incoming;
/**
* the PDG codes for the outgoing vector
*/
vector<int> _outgoingV;
/**
* the PDG codes for the outgoing pseudoscalar
*/
vector<int> _outgoingP;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_VectorMesonVectorPScalarDecayer_H */
diff --git a/Decay/VectorMeson/VectorMesonVectorScalarDecayer.cc b/Decay/VectorMeson/VectorMesonVectorScalarDecayer.cc
--- a/Decay/VectorMeson/VectorMesonVectorScalarDecayer.cc
+++ b/Decay/VectorMeson/VectorMesonVectorScalarDecayer.cc
@@ -1,315 +1,315 @@
// -*- C++ -*-
//
// VectorMesonVectorScalarDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the VectorMesonVectorScalarDecayer class.
//
#include "VectorMesonVectorScalarDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Decay/TwoBodyDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
void VectorMesonVectorScalarDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
for(unsigned int ix=0;ix<_incoming.size();++ix)
if(mode(ix)) _maxweight[ix] = mode(ix)->maxWeight();
}
}
VectorMesonVectorScalarDecayer::VectorMesonVectorScalarDecayer()
: _coupling(16), _incoming(16), _outgoingV(16),
_outgoingS(16), _maxweight(16) {
// decay of the phi to the a_0 and f_0 and a photon
_incoming[0] = 333; _outgoingV[0] = 22; _outgoingS[0] = 9000111;
_coupling[0] = 0.238/GeV; _maxweight[0] = 10.;
_incoming[1] = 333; _outgoingV[1] = 22; _outgoingS[1] = 9010221;
_coupling[1] = 0.267/GeV; _maxweight[1] = 15.;
// Jpsi decays
_incoming[2] = 443; _outgoingV[2] = 22; _outgoingS[2] = 10331;
_coupling[2] = 0.00207/GeV; _maxweight[2] = 3.;
_incoming[3] = 443; _outgoingV[3] = 223; _outgoingS[3] = 10331;
_coupling[3] = 0.00144/GeV; _maxweight[3] = 9.;
_incoming[4] = 443; _outgoingV[4] = 333; _outgoingS[4] = 10331;
_coupling[4] = 0.00127/GeV; _maxweight[4] = 9.;
_incoming[5] = 443; _outgoingV[5] = 333; _outgoingS[5] = 9010221;
_coupling[5] = 0.00064/GeV; _maxweight[5] = 6.;
_incoming[6] = 443; _outgoingV[6] = 223; _outgoingS[6] = 9010221;
_coupling[6] = 0.00044/GeV; _maxweight[6] = 7.;
_incoming[15] = 443; _outgoingV[15] = 22; _outgoingS[15] = 9030221;
_coupling[15] = 0.00114/GeV; _maxweight[15] = 3.;
// upsilon(2s)
_incoming[7] = 100553; _outgoingV[7] = 22; _outgoingS[7] = 10551;
_coupling[7] = 0.105/GeV; _maxweight[7] = 2.;
// upsilon(3s)
_incoming[8] = 200553; _outgoingV[8] = 22; _outgoingS[8] = 110551;
_coupling[8] = 0.160/GeV; _maxweight[8] = 2.;
// psi2s decays
_incoming[9] = 100443; _outgoingV[9] = 22; _outgoingS[9] = 10441;
_coupling[9] = 0.258/GeV; _maxweight[9] = 4.;
_incoming[10] = 100443; _outgoingV[10] = 22; _outgoingS[10] = 331;
_coupling[10] = 0.0508/GeV; _maxweight[10] = 2.;
_incoming[11] = 100443; _outgoingV[11] = 22; _outgoingS[11] = 10331;
_coupling[11] = 0.000680/GeV; _maxweight[11] = 2.;
_incoming[12] = 100443; _outgoingV[12] = 333; _outgoingS[12] = 9010221;
_coupling[12] = 0.000509/GeV; _maxweight[12] = 6.;
// rho' to sigma rho
_incoming[13] = 100213; _outgoingV[13] = 213; _outgoingS[13] = 9000221;
_coupling[13] = 5.056/GeV; _maxweight[13] = 5.5;
_incoming[14] = 100113; _outgoingV[14] = 113; _outgoingS[14] = 9000221;
_coupling[14] = 5.056/GeV; _maxweight[14] = 5.5;
// initial size of the arrays
_initsize = _coupling.size();
// intermediates
generateIntermediates(false);
}
void VectorMesonVectorScalarDecayer::doinit() {
DecayIntegrator::doinit();
// check consistence of the parameters
unsigned int isize=_incoming.size();
if(isize!=_outgoingV.size()||isize!=_outgoingS.size()||
isize!=_maxweight.size()||isize!=_coupling.size())
throw InitException() << "Inconsistent parameters in "
<< "VectorMesonVectorScalarDecayer::doinit()"
<< Exception::abortnow;
// set up the integration channels
vector<double> wgt(0);
tPDVector extpart(3);
DecayPhaseSpaceModePtr mode;
for(unsigned int ix=0;ix<_incoming.size();++ix) {
extpart[0]=getParticleData(_incoming[ix]);
extpart[1]=getParticleData(_outgoingV[ix]);
extpart[2]=getParticleData(_outgoingS[ix]);
if(extpart[0]&&extpart[1]&&extpart[2])
mode=new_ptr(DecayPhaseSpaceMode(extpart,this));
else
mode=DecayPhaseSpaceModePtr();
addMode(mode,_maxweight[ix],wgt);
}
}
int VectorMesonVectorScalarDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=2) return -1;
int id(parent->id());
int idbar = parent->CC() ? parent->CC()->id() : id;
int id1(children[0]->id());
int id1bar = children[0]->CC() ? children[0]->CC()->id() : id1;
int id2(children[1]->id());
int id2bar = children[1]->CC() ? children[1]->CC()->id() : id2;
int imode(-1);
unsigned int ix(0);
cc=false;
do {
if(id ==_incoming[ix]) {
if((id1 ==_outgoingV[ix]&&id2 ==_outgoingS[ix])||
(id2 ==_outgoingV[ix]&&id1 ==_outgoingS[ix])) imode=ix;
}
if(idbar==_incoming[ix]) {
if((id1bar==_outgoingV[ix]&&id2bar==_outgoingS[ix])||
(id2bar==_outgoingV[ix]&&id1bar==_outgoingS[ix])) {
imode=ix;
cc=true;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
return imode;
}
void VectorMesonVectorScalarDecayer::persistentOutput(PersistentOStream & os) const {
os << _incoming << _outgoingV << _outgoingS << _maxweight << ounit(_coupling,1/GeV);
}
void VectorMesonVectorScalarDecayer::persistentInput(PersistentIStream & is, int) {
is >> _incoming >> _outgoingV >> _outgoingS >> _maxweight >> iunit(_coupling,1/GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<VectorMesonVectorScalarDecayer,DecayIntegrator>
describeHerwigVectorMesonVectorScalarDecayer("Herwig::VectorMesonVectorScalarDecayer", "HwVMDecay.so");
void VectorMesonVectorScalarDecayer::Init() {
static ClassDocumentation<VectorMesonVectorScalarDecayer> documentation
("The VectorMesonVectorScalarDecayer class is designed for the "
"decay of a vector meson to a vector meson, or the photon, and a "
"scalar meson.");
static ParVector<VectorMesonVectorScalarDecayer,int> interfaceIncoming
("Incoming",
"The PDG code for the incoming particle",
&VectorMesonVectorScalarDecayer::_incoming,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<VectorMesonVectorScalarDecayer,int> interfaceOutcomingVector
("OutgoingVector",
"The PDG code for the outgoing spin-1 particle",
&VectorMesonVectorScalarDecayer::_outgoingV,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<VectorMesonVectorScalarDecayer,int> interfaceOutcomingScalar
("OutgoingScalar",
"The PDG code for the outgoing spin-0 particle",
&VectorMesonVectorScalarDecayer::_outgoingS,
0, 0, 0, -10000000, 10000000, false, false, true);
static ParVector<VectorMesonVectorScalarDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The coupling for the decay mode",
&VectorMesonVectorScalarDecayer::_coupling,
1/GeV, 0, ZERO, ZERO, 100./GeV, false, false, true);
static ParVector<VectorMesonVectorScalarDecayer,double> interfaceMaxWeight
("MaxWeight",
"The maximum weight for the decay mode",
&VectorMesonVectorScalarDecayer::_maxweight,
0, 0, 0, 0., 100., false, false, true);
}
double VectorMesonVectorScalarDecayer::me2(const int,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
if(!ME())
ME(new_ptr(TwoBodyDecayMatrixElement(PDT::Spin1,PDT::Spin1,PDT::Spin0)));
// is the vector massless
bool photon(_outgoingV[imode()]==ParticleID::gamma);
if(meopt==Initialize) {
VectorWaveFunction::calculateWaveFunctions(_vectors[0],_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
VectorWaveFunction::constructSpinInfo(_vectors[0],const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
VectorWaveFunction::constructSpinInfo(_vectors[1],decay[0],
outgoing,true,photon);
ScalarWaveFunction::constructSpinInfo(decay[1],outgoing,true);
return 0.;
}
VectorWaveFunction::calculateWaveFunctions(_vectors[1],decay[0],outgoing,photon);
// compute the matrix element
Energy2 p0dotpv(inpart.momentum()*decay[0]->momentum());
complex<Energy> epsdot(ZERO);
InvEnergy2 pre(_coupling[imode()]/inpart.mass());
for(unsigned int ix=0;ix<3;++ix) {
if(ix==1&&photon) {
for(unsigned int iy=0;iy<3;++iy) (*ME())(iy,ix,0)=0.;
}
else {
epsdot=_vectors[1][ix]*inpart.momentum();
for(unsigned int iy=0;iy<3;++iy) {
- (*ME())(iy,ix,0)=pre*_vectors[0][iy].dot(p0dotpv*_vectors[1][ix]-
- epsdot*decay[0]->momentum());
+ (*ME())(iy,ix,0)=Complex(pre*_vectors[0][iy].dot(p0dotpv*_vectors[1][ix]-
+ epsdot*decay[0]->momentum()));
}
}
}
// test of the matrix element
// double me = newME.contract(rhoin).real();
// Energy pcm=Kinematics::pstarTwoBodyDecay(inpart.mass(),decay[0]->mass(),
// decay[1]->mass());
// double test = sqr(_coupling[imode()])/3.*(2.*sqr(pcm)+3.*sqr(decay[0]->mass()));
// cerr << "testing matrix element for " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << me << " " << test << " " << (me-test)/(me+test) << "\n";
// return the answer
return ME()->contract(_rho).real();
}
bool VectorMesonVectorScalarDecayer::twoBodyMEcode(const DecayMode & dm,
int & mecode,
double & coupling) const {
int id(dm.parent()->id());
int idbar = dm.parent()->CC() ? dm.parent()->CC()->id() : id;
ParticleMSet::const_iterator pit(dm.products().begin());
int id1((**pit).id());
int id1bar = (**pit).CC() ? (**pit).CC()->id() : id1;
++pit;
int id2((**pit).id());
int id2bar = (**pit).CC() ? (**pit).CC()->id() : id2;
unsigned int ix(0);
bool order(false);
int imode(-1);
do {
if(id==_incoming[ix]) {
if(id1 ==_outgoingV[ix]&&id2 ==_outgoingS[ix]) {
imode=ix;
order=true;
}
if(id2 ==_outgoingV[ix]&&id1 ==_outgoingS[ix]) {
imode=ix;
order=false;
}
}
if(idbar==_incoming[ix]&&imode<0) {
if(id1bar==_outgoingV[ix]&&id2bar==_outgoingS[ix]) {
imode=ix;
order=true;
}
if(id2bar==_outgoingV[ix]&&id1bar==_outgoingS[ix]) {
imode=ix;
order=false;
}
}
++ix;
}
while(ix<_incoming.size()&&imode<0);
coupling = _coupling[imode]*dm.parent()->mass();
mecode = 4;
return order;
}
void VectorMesonVectorScalarDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// the rest of the parameters
for(unsigned int ix=0;ix<_incoming.size();++ix) {
if(ix<_initsize) {
output << "newdef " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "newdef " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "newdef " << name() << ":OutgoingScalar " << ix << " "
<< _outgoingS[ix] << "\n";
output << "newdef " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "newdef " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
else {
output << "insert " << name() << ":Incoming " << ix << " "
<< _incoming[ix] << "\n";
output << "insert " << name() << ":OutgoingVector " << ix << " "
<< _outgoingV[ix] << "\n";
output << "insert " << name() << ":OutgoingScalar " << ix << " "
<< _outgoingS[ix] << "\n";
output << "insert " << name() << ":Coupling " << ix << " "
<< _coupling[ix]*GeV << "\n";
output << "insert " << name() << ":MaxWeight " << ix << " "
<< _maxweight[ix] << "\n";
}
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/VectorMeson/VectorMesonVectorScalarDecayer.h b/Decay/VectorMeson/VectorMesonVectorScalarDecayer.h
--- a/Decay/VectorMeson/VectorMesonVectorScalarDecayer.h
+++ b/Decay/VectorMeson/VectorMesonVectorScalarDecayer.h
@@ -1,198 +1,198 @@
// -*- C++ -*-
//
// VectorMesonVectorScalarDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMesonVectorScalarDecayer_H
#define HERWIG_VectorMesonVectorScalarDecayer_H
//
// This is the declaration of the VectorMesonVectorScalarDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace Herwig;
/** \ingroup Decay
*
* This class is designed for the decay of a vector meson to a spin-1
* particle, either a vector meson or a photon, and a scalar meson.
* The current for the decay is
*
* \f[\mathcal{M}=g\epsilon_mu\left[ p_V \cdot p_0 \epsilon_V^\mu
* -p_V^\mu \epsilon_V \cdot p_0\right],\f]
* where \f$\epsilon\f$ is the polarization vector of the decaying vector
* meson, \f$\epsilon_V\f$ is the polarization vector of the outgoing vector meson,
* \f$p_0\f$ is the momentum of the decaying particle and \f$p_V\f$ is the momentum
* of the outgoing vector meson.
*
* @see DecayIntegrator
* @see \ref VectorMesonVectorScalarDecayerInterfaces "The interfaces"
* defined for VectorMesonVectorScalarDecayer.
*
* \author Peter Richardson
*
*/
class VectorMesonVectorScalarDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMesonVectorScalarDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 4.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMesonVectorScalarDecayer & operator=(const VectorMesonVectorScalarDecayer &);
+ VectorMesonVectorScalarDecayer & operator=(const VectorMesonVectorScalarDecayer &) = delete;
private:
/**
* coupling for a decay
*/
vector<InvEnergy> _coupling;
/**
* PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* PDG codes for the outgoing vector
*/
vector<int> _outgoingV;
/**
* PDG codes for the outgoing scalar mesons.
*/
vector<int> _outgoingS;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[2];
};
}
#endif /* HERWIG_VectorMesonVectorScalarDecayer_H */
diff --git a/Decay/VectorMeson/VectorMesonVectorVectorDecayer.h b/Decay/VectorMeson/VectorMesonVectorVectorDecayer.h
--- a/Decay/VectorMeson/VectorMesonVectorVectorDecayer.h
+++ b/Decay/VectorMeson/VectorMesonVectorVectorDecayer.h
@@ -1,209 +1,209 @@
// -*- C++ -*-
//
// VectorMesonVectorVectorDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_VectorMesonVectorVectorDecayer_H
#define HERWIG_VectorMesonVectorVectorDecayer_H
//
// This is the declaration of the VectorMesonVectorVectorDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class is designed for the decay of a vector meson to two spin
* one particles, either other vector mesons or photons.
*
* The current for the decay is taken to be
*
* \f[\mathcal{M}= \frac{g}{M_0^2}
* ( p_{0\nu}\epsilon^\alpha-p_{0\alpha} \epsilon^\nu)\left[
* ((p_{1\nu} \epsilon_1^\beta- p_1^\beta \epsilon_{1\nu})
* (p_{2\alpha} \epsilon_{2\beta}- p_{2\beta} \epsilon_{2\alpha})
* -(\nu \leftrightarrow\alpha))\right],\f]
* where \f$p_{0,1,2}\f$ are the momenta of the incoming and two outgoing
* vector mesons and \f$\epsilon_{1,2}\f$ are the polarization vectors of
* the outgoing mesons and \f$\epsilon\f$ is the polarization vector of the
* incoming meson.
*
* The incoming vector mesons together with their decay products and the coupling
* \f$g\f$ can be specified using the interfaces for the class. The maximum weights
* for the decays can be calculated using the Initialize interface of the
* DecayIntegrator class or specified using the interface.
*
* The incoming and outgoing particles, couplings and maximum weights for
* many of the common \f$V\to VV\f$ decays are specified in the default
* constructor.
*
* @see DecayIntegrator.
* @see \ref VectorMesonVectorVectorDecayerInterfaces "The interfaces"
* defined for VectorMesonVectorVectorDecayer.
*/
class VectorMesonVectorVectorDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
VectorMesonVectorVectorDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Specify the \f$1\to2\f$ matrix element to be used in the running width calculation.
* @param dm The DecayMode
* @param mecode The code for the matrix element as described
* in the GenericWidthGenerator class, in this case 5.
* @param coupling The coupling for the matrix element.
* @return True or False if this mode can be handled.
*/
bool twoBodyMEcode(const DecayMode & dm, int & mecode, double & coupling) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMesonVectorVectorDecayer & operator=(const VectorMesonVectorVectorDecayer &);
+ VectorMesonVectorVectorDecayer & operator=(const VectorMesonVectorVectorDecayer &) = delete;
private:
/**
* the coupling for the decay
*/
vector<double> _coupling;
/**
* the PDG codes for the incoming particles
*/
vector<int> _incoming;
/**
* the PDG codes for the 1st outgoing particle
*/
vector<int> _outgoing1;
/**
* the PDG codes for the 2nd outgoing particle
*/
vector<int> _outgoing2;
/**
* maximum weight for a decay
*/
vector<double> _maxweight;
/**
* Initial size of the vectors
*/
unsigned int _initsize;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors[3];
};
}
#endif /* HERWIG_VectorMesonVectorVectorDecayer_H */
diff --git a/Decay/VectorMeson/a1SimpleDecayer.cc b/Decay/VectorMeson/a1SimpleDecayer.cc
--- a/Decay/VectorMeson/a1SimpleDecayer.cc
+++ b/Decay/VectorMeson/a1SimpleDecayer.cc
@@ -1,479 +1,479 @@
// -*- C++ -*-
//
// a1SimpleDecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the a1SimpleDecayer class.
//
#include "a1SimpleDecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/PDT/WidthCalculatorBase.h"
#include "Herwig/PDT/ThreeBodyAllOnCalculator.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
a1SimpleDecayer::a1SimpleDecayer()
: _rhomass(3), _rhowidth(3), _rhowgts(3),_localparameters(true),
_coupling(47.95/GeV), _onemax(5.4474), _twomax(5.47784),
_threemax(5.40185), _onewgts(6),
_twowgts(6), _threewgts(6), _mpi(ZERO) {
// rho masses, widths and weights
_rhomass[0] = 0.773*GeV; _rhowidth[0] = 0.145*GeV; _rhowgts[0] = 1.0;
_rhomass[1] = 1.370*GeV; _rhowidth[1] = 0.510*GeV; _rhowgts[1] = -0.145;
_rhomass[2] = 1.750*GeV; _rhowidth[2] = 0.120*GeV; _rhowgts[2] = 0.;
// integration weights
_onewgts[0] = 0.235562; _twowgts[0] = 0.236208; _threewgts[0] = 0.234259;
_onewgts[1] = 0.231098; _twowgts[1] = 0.229481; _threewgts[1] = 0.233634;
_onewgts[2] = 0.131071; _twowgts[2] = 0.131169; _threewgts[2] = 0.135922;
_onewgts[3] = 0.131135; _twowgts[3] = 0.133604; _threewgts[3] = 0.129231;
_onewgts[4] = 0.135841; _twowgts[4] = 0.132685; _threewgts[4] = 0.133949;
_onewgts[5] = 0.135294; _twowgts[5] = 0.136854; _threewgts[5] = 0.133005;
generateIntermediates(true);
}
void a1SimpleDecayer::doinit() {
DecayIntegrator::doinit();
// pointers to the particles we need as external particles
tPDPtr a1p = getParticleData(ParticleID::a_1plus);
tPDPtr a10 = getParticleData(ParticleID::a_10);
tPDPtr pip = getParticleData(ParticleID::piplus);
tPDPtr pim = getParticleData(ParticleID::piminus);
tPDPtr pi0 = getParticleData(ParticleID::pi0);
// the different rho resonances
tPDPtr rhop[3] = {getParticleData(213),getParticleData(100213),
getParticleData(30213)};
tPDPtr rho0[3] = {getParticleData(113),getParticleData(100113),
getParticleData(30113)};
tPDPtr rhom[3] = {getParticleData(-213),getParticleData(-100213),
getParticleData(-30213)};
tPDVector extpart(4);
DecayPhaseSpaceChannelPtr newchannel;
DecayPhaseSpaceModePtr mode;
// decay mode a_1+ -> pi+ pi0 pi0
extpart[0]=a1p;
extpart[1]=pi0;
extpart[2]=pi0;
extpart[3]=pip;
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
for(unsigned int ix=0;ix<3;++ix) {
if(!rhop[ix]) continue;
// first rho+ channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,2);
newchannel->addIntermediate(rhop[ix],0,0.0,1,3);
mode->addChannel(newchannel);
// second rho+ channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,1);
newchannel->addIntermediate(rhop[ix],0,0.0,2,3);
mode->addChannel(newchannel);
}
if(_onewgts.size()!=mode->numberChannels())
_onewgts=vector<double>(mode->numberChannels(),1./mode->numberChannels());
addMode(mode,_onemax,_onewgts);
// decay mode a_10 -> pi+ pi- pi0
extpart[0]=a10;
extpart[1]=pip;
extpart[2]=pim;
extpart[3]=pi0;
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
for(unsigned int ix=0;ix<3;++ix) {
if(!rhop[ix]) continue;
// first rho channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,2);
newchannel->addIntermediate(rhop[ix],0,0.0,1,3);
mode->addChannel(newchannel);
// second channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,1);
newchannel->addIntermediate(rhom[ix],0,0.0,2,3);
mode->addChannel(newchannel);
}
if(_twowgts.size()!=mode->numberChannels())
_twowgts=vector<double>(mode->numberChannels(),1./mode->numberChannels());
addMode(mode,_twomax,_twowgts);
// decay mode a_1+ -> pi+ pi+ pi-
extpart[0]=a1p;
extpart[1]=pip;
extpart[2]=pip;
extpart[3]=pim;
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
for(unsigned int ix=0;ix<3;++ix) {
if(!rho0[ix]) continue;
// the neutral rho channels
// first channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,2);
newchannel->addIntermediate(rho0[ix],0,0.0,1,3);
mode->addChannel(newchannel);
// interchanged channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,1);
newchannel->addIntermediate(rho0[ix],0,0.0,2,3);
mode->addChannel(newchannel);
}
if(_threewgts.size()!=mode->numberChannels())
_threewgts=vector<double>(mode->numberChannels(),1./mode->numberChannels());
addMode(mode,_threemax,_threewgts);
// if using local parameters set the values in the phase space channels
if(_localparameters) {
for(unsigned int iy=0;iy<_rhomass.size();++iy) {
resetIntermediate(rho0[iy],_rhomass[iy],_rhowidth[iy]);
resetIntermediate(rhop[iy],_rhomass[iy],_rhowidth[iy]);
resetIntermediate(rhom[iy],_rhomass[iy],_rhowidth[iy]);
}
// make sure the rho array has enough masses
if(_rhomass.size()<3) {
for(unsigned int ix=_rhomass.size();ix<3;++ix) {
_rhomass.push_back(rhop[ix]->mass());
_rhowidth.push_back(rhop[ix]->width());
}
}
}
// set the local variables if needed
else {
// masses and widths for the particles
_rhomass.resize(3);_rhowidth.resize(3);
for(unsigned int ix=0;ix<3;++ix) {
if(!rhop[ix]) continue;
_rhomass[ix]=rhop[ix]->mass();
_rhowidth[ix]=rhop[ix]->width();
}
}
_mpi = pip->mass();
}
void a1SimpleDecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
// get the weights for the different channels
for(unsigned int ix=0;ix<_onewgts.size();++ix)
_onewgts[ix]=mode(0)->channelWeight(ix);
for(unsigned int ix=0;ix<_twowgts.size();++ix)
_twowgts[ix]=mode(1)->channelWeight(ix);
for(unsigned int ix=0;ix<_threewgts.size();++ix)
_threewgts[ix]=mode(2)->channelWeight(ix);
// get the maximum weight
_onemax = mode(0)->maxWeight();
_twomax = mode(1)->maxWeight();
_threemax = mode(2)->maxWeight();
}
}
void a1SimpleDecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_rhomass,GeV) << ounit(_rhowidth,GeV) << _rhowgts
<< _localparameters << ounit(_coupling,1./GeV) << _onemax
<< _twomax << _threemax << _onewgts << _twowgts << _threewgts
<< ounit(_mpi,GeV);
}
void a1SimpleDecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_rhomass,GeV) >> iunit(_rhowidth,GeV) >> _rhowgts
>> _localparameters >> iunit(_coupling,1./GeV) >> _onemax
>> _twomax >> _threemax >> _onewgts >> _twowgts >> _threewgts
>> iunit(_mpi,GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<a1SimpleDecayer,DecayIntegrator>
describeHerwiga1SimpleDecayer("Herwig::a1SimpleDecayer", "HwVMDecay.so");
void a1SimpleDecayer::Init() {
static ClassDocumentation<a1SimpleDecayer> documentation
("The a1SimpleDecayer class implements a simple model for the decay of"
" the a_1 to three pions based on the approach of Kuhn and Santanmaria,"
" Z.Phys. C48, 445 (1990)",
"The decays of the $a_1$ were modelled using the approach of "
"\\cite{Kuhn:1990ad}.\n",
"\\bibitem{Kuhn:1990ad} J.~H.~Kuhn and A.~Santamaria,\n"
"Z.\\ Phys.\\ C {\\bf 48} (1990) 445.\n"
"%%CITATION = ZEPYA,C48,445;%%\n");
static Switch<a1SimpleDecayer,bool> interfaceLocalParameters
("LocalParameters",
"Use local values of the intermediate resonances masses and widths",
&a1SimpleDecayer::_localparameters, true, false, false);
static SwitchOption interfaceLocalParametersLocal
(interfaceLocalParameters,
"Local",
"Use the local values",
true);
static SwitchOption interfaceLocalParametersDefault
(interfaceLocalParameters,
"ParticleData",
"Use the values from the particleData objects",
false);
static Parameter<a1SimpleDecayer,InvEnergy> interfaceCoupling
("Coupling",
"The overall coupling for the decay",
&a1SimpleDecayer::_coupling, 1./GeV, 47.95/GeV, ZERO, 100./GeV,
false, false, Interface::limited);
static ParVector<a1SimpleDecayer,Energy> interfacerhomass
("RhoMasses",
"The masses of the different rho resonnaces",
&a1SimpleDecayer::_rhomass,
MeV, 0, ZERO, ZERO, 10000*MeV, false, false, true);
static ParVector<a1SimpleDecayer,Energy> interfacerhowidth
("RhoWidths",
"The widths of the different rho resonnaces",
&a1SimpleDecayer::_rhowidth,
MeV, 0, ZERO, ZERO, 10000*MeV, false, false, true);
static ParVector<a1SimpleDecayer,double> interfaceRhoWeights
("RhoWeights",
"Weight for the different rho resonances",
&a1SimpleDecayer::_rhowgts, -1, 0.0, -10.0, 10.0,
false, false, Interface::limited);
static Parameter<a1SimpleDecayer,double> interfaceOneMax
("OneMax",
"The maximum weight for the integration fo the channel a_1^+->pi+pi0pi0",
&a1SimpleDecayer::_onemax, 5.57613, 0.0, 10000.0,
false, false, true);
static Parameter<a1SimpleDecayer,double> interfaceTwoMax
("TwoMax",
"The maximum weight for the integration fo the channel a_1^0->pi+pi-pi0",
&a1SimpleDecayer::_twomax, 5.61218, 0.0, 10000.0,
false, false, true);
static Parameter<a1SimpleDecayer,double> interfaceThreeMax
("ThreeMax",
"The maximum weight for the integration fo the channel a_1^+->pi+pi+pi-",
&a1SimpleDecayer::_threemax, 5.5384, 0.0, 10000.0,
false, false, true);
static ParVector<a1SimpleDecayer,double> interfaceonewgts
("OneChargedWeights",
"The weights of the different channels to use for the integration of"
" the decay a_1^+->pi+pi0pi0",
&a1SimpleDecayer::_onewgts,
0, 0, 0, 0., 1., false, false, true);
static ParVector<a1SimpleDecayer,double> interfacetwowgts
("TwoChargedWeights",
"The weights of the different channels to use for the integration of"
" the decay a_1^0->pi+pi-pi0",
&a1SimpleDecayer::_twowgts,
0, 0, 0, 0., 1., false, false, true);
static ParVector<a1SimpleDecayer,double> interfacethreewgts
("ThreeChargedWeights",
"The weights of the different channels to use for the integration of"
" the decay a_1^+->pi+pi+pi-",
&a1SimpleDecayer::_threewgts,
0, 0, 0, 0., 1., false, false, true);
}
int a1SimpleDecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=3) return -1;
int id(parent->id());
// check the pions
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
int idtemp,npi0(0),npiplus(0),npiminus(0);
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(idtemp==ParticleID::piplus) ++npiplus;
else if(idtemp==ParticleID::piminus) ++npiminus;
else if(idtemp==ParticleID::pi0) ++npi0;
}
int imode(-1);
// a_1+ decay modes
if(id==ParticleID::a_1plus) {
cc=false;
if(npiplus==1&&npi0==2) imode=0;
else if(npiplus==2&&npiminus==1) imode=2;
}
// a_1- modes
else if(id==ParticleID::a_1minus) {
cc=true;
if(npiminus==1&&npi0==2) imode=0;
else if(npiminus==2&&npiplus==1) imode=2;
}
// a_0 modes
else if(id==ParticleID::a_10) {
cc=false;
if(npiminus==1&&npiplus==1&&npi0==1) imode=1;
}
return imode;
}
double a1SimpleDecayer::me2(const int ichan,const Particle & inpart,
const ParticleVector & decay,MEOption meopt) const {
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1,PDT::Spin0,PDT::Spin0,PDT::Spin0)));
useMe();
if(meopt==Initialize) {
VectorWaveFunction::calculateWaveFunctions(_vectors,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
VectorWaveFunction::constructSpinInfo(_vectors,const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
// set up the spin information for the decay products
for(unsigned int ix=0;ix<3;++ix)
ScalarWaveFunction::constructSpinInfo(decay[ix],outgoing,true);
return 0.;
}
Lorentz5Vector<complex<Energy> > current;
Energy2 s1 = (decay[1]->momentum()+decay[2]->momentum()).m2();
Energy2 s2 = (decay[0]->momentum()+decay[2]->momentum()).m2();
if(ichan<0) {
current = rhoFormFactor(s2,-1)*(decay[0]->momentum()-decay[2]->momentum())
+rhoFormFactor(s1,-1)*(decay[1]->momentum()-decay[2]->momentum());
}
else if(ichan<3) {
current =
rhoFormFactor(s2,ichan)*(decay[0]->momentum()-decay[2]->momentum());
}
else if(ichan<6) {
current =
rhoFormFactor(s1,-1)*(decay[1]->momentum()-decay[2]->momentum());
}
// compute the matrix element
for(unsigned int ix=0;ix<3;++ix)
- (*ME())(ix,0,0,0)=_coupling*current.dot(_vectors[ix]);
+ (*ME())(ix,0,0,0) = Complex(_coupling*current.dot(_vectors[ix]));
// matrix element and identical particle factor
double output=ME()->contract(_rho).real();
if(imode()!=1) output*=0.5;
// test the output
// double test = threeBodyMatrixElement(imode(),sqr(inpart.mass()),
// s3,s2,s1,decay[0]->mass(),decay[1]->mass(),
// decay[2]->mass());
// if(ichan<0) cerr << "testing matrix element " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << decay[2]->PDGName() << output << " " << test << " "
// << (output-test)/(output+test) << "\n";
// return the answer
return output;
}
double a1SimpleDecayer::
threeBodyMatrixElement(const int iopt,const Energy2 q2, const Energy2 s3,
const Energy2 s2,const Energy2 s1, const Energy m1,
const Energy m2 ,const Energy m3) const {
Energy2 v12 = (s2-2.*sqr(m1)-2.*sqr(m3))+0.25*sqr(s1-s3-sqr(m1)+sqr(m3))/q2;
Energy2 v22 = (s1-2.*sqr(m2)-2.*sqr(m3))+0.25*sqr(s2-s3-sqr(m2)+sqr(m3))/q2;
Energy2 v1v2 = (0.5*q2-s3-0.5*(3*sqr(m3)-sqr(m1)-sqr(m2)))
+0.25*(s1-s3-sqr(m1)+sqr(m3))*(s2-s3-sqr(m2)+sqr(m3))/q2;
Complex rho1=rhoFormFactor(s2,-1);
Complex rho2=rhoFormFactor(s1,-1);
double me = sqr(_coupling)*real(v12*rho1*conj(rho1)+v22*rho2*conj(rho2)
+2.*v1v2*rho1*conj(rho2))/3.;
if(iopt!=1) me *= 0.5;
return me;
}
WidthCalculatorBasePtr
a1SimpleDecayer::threeBodyMEIntegrator(const DecayMode & dm) const {
ParticleMSet::const_iterator pit = dm.products().begin();
ParticleMSet::const_iterator pend = dm.products().end();
int ncharged=0;
for( ; pit!=pend;++pit) {
if(abs((**pit).id())==ParticleID::piplus) ++ncharged;
}
--ncharged;
// integrator to perform the integral
vector<double> inweights;inweights.push_back(0.5);inweights.push_back(0.5);
vector<int> intype;intype.push_back(2);intype.push_back(3);
vector<Energy> inmass(2,_rhomass[0]),inwidth(2,_rhowidth[0]);
vector<double> inpow(2,0.0);
Energy mpi0=getParticleData(ParticleID::pi0)->mass();
Energy mpic=getParticleData(ParticleID::piplus)->mass();
Energy m[3];
m[0] = ncharged<2 ? mpi0 : mpic;
m[1] = m[0];
m[2] = (ncharged==0||ncharged==2) ? mpi0 : mpic;
return new_ptr(ThreeBodyAllOnCalculator<a1SimpleDecayer>
(inweights,intype,inmass,inwidth,inpow,*this,ncharged,m[0],m[1],m[2]));
}
void a1SimpleDecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
output << "newdef " << name() << ":LocalParameters " << _localparameters << "\n";
output << "newdef " << name() << ":Coupling " << _coupling*GeV << "\n";
output << "newdef " << name() << ":OneMax " << _onemax << "\n";
output << "newdef " << name() << ":TwoMax " << _twomax << "\n";
output << "newdef " << name() << ":ThreeMax " << _threemax << "\n";
for(unsigned int ix=0;ix<_rhomass.size();++ix) {
if(ix<3) output << "newdef " << name() << ":RhoMasses " << ix << " "
<< _rhomass[ix]/MeV << "\n";
else output << "insert " << name() << ":RhoMasses " << ix << " "
<< _rhomass[ix]/MeV << "\n";
}
for(unsigned int ix=0;ix<_rhowidth.size();++ix) {
if(ix<3) output << "newdef " << name() << ":RhoWidths " << ix << " "
<< _rhowidth[ix]/MeV << "\n";
else output << "insert " << name() << ":RhoWidths " << ix << " "
<< _rhowidth[ix]/MeV << "\n";
}
for(unsigned int ix=0;ix<_rhowgts.size();++ix) {
if(ix<3) output << "newdef " << name() << ":RhoWeights " << ix << " "
<< _rhowgts[ix] << "\n";
else output << "insert " << name() << ":RhoWeights " << ix << " "
<< _rhowgts[ix] << "\n";
}
for(unsigned int ix=0;ix<_onewgts.size();++ix) {
output << "newdef " << name() << ":OneChargedWeights "
<< ix << " " << _onewgts[ix] << "\n";
}
for(unsigned int ix=0;ix<_twowgts.size();++ix) {
output << "newdef " << name() << ":TwoChargedWeights "
<< ix << " " << _twowgts[ix] << "\n";
}
for(unsigned int ix=0;ix<_threewgts.size();++ix) {
output << "newdef " << name() << ":ThreeChargedWeights "
<< ix << " " << _threewgts[ix] << "\n";
}
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
// functions to return the Breit-Wigners
Complex a1SimpleDecayer::rhoFormFactor(Energy2 q2,int ires) const {
Complex output(0.),norm(0.);
for(unsigned int ix=0,N=min(3,int(_rhowgts.size()));ix<N;++ix)
norm+=_rhowgts[ix];
if(ires<0) {
for(unsigned int ix=0,N=min(3,int(_rhowgts.size()));ix<N;++ix) {
output+=_rhowgts[ix]*rhoBreitWigner(q2,ix);
}
}
else {
unsigned int temp(ires);
if(temp<_rhowgts.size()&&temp<3)
output=_rhowgts[temp]*rhoBreitWigner(q2,temp);
else
output=0.;
}
return output/norm;
}
diff --git a/Decay/VectorMeson/a1SimpleDecayer.h b/Decay/VectorMeson/a1SimpleDecayer.h
--- a/Decay/VectorMeson/a1SimpleDecayer.h
+++ b/Decay/VectorMeson/a1SimpleDecayer.h
@@ -1,261 +1,261 @@
// -*- C++ -*-
//
// a1SimpleDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_a1SimpleDecayer_H
#define HERWIG_a1SimpleDecayer_H
//
// This is the declaration of the a1SimpleDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/**
* The a1SimpleDecayer class provides a simple model of the decay of the
* \f$a_1\f$ meson to three pions including \f$\rho\f$ meson intermediate states.
*
* @see \ref a1SimpleDecayerInterfaces "The interfaces"
* defined for a1SimpleDecayer.
*/
class a1SimpleDecayer: public DecayIntegrator {
public:
/**
* The default constructor.
*/
a1SimpleDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector& decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode , const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* Breit-Wigner for the \f$\rho\f$
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner.
* @param ires Which multiplet to use.
*/
Complex rhoBreitWigner(Energy2 q2, unsigned int ires) const {
Energy q(sqrt(q2));
Energy mass = _rhomass[ires], width = _rhowidth[ires];
Energy pcm0(Kinematics::pstarTwoBodyDecay(mass,_mpi,_mpi));
Energy pcm = 2.*_mpi<q ? Kinematics::pstarTwoBodyDecay(q,_mpi,_mpi) : ZERO;
Energy gamrun(width*mass*Math::Pow<3>(pcm/pcm0)/q);
return -sqr(mass)/complex<Energy2>(q2-mass*mass,mass*gamrun);
}
/**
* The \f$\rho\f$ form factors
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$\rho\f$ multiplet
* @return The form factor
*/
Complex rhoFormFactor(Energy2 q2,int ires) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- a1SimpleDecayer & operator=(const a1SimpleDecayer &);
+ a1SimpleDecayer & operator=(const a1SimpleDecayer &) = delete;
private:
/**
* The \f$\rho\f$ masses
*/
vector<Energy> _rhomass;
/**
* The \f$\rho\f$ widths
*/
vector<Energy> _rhowidth;
/**
* Weights for the different \f$\rho\f$ resonances
*/
vector<double> _rhowgts;
/**
* Use local values of the parameters
*/
bool _localparameters;
/**
* The overall coupling for the decay
*/
InvEnergy _coupling;
/**
* Maximum weight for the one charged pion channel.
*/
mutable double _onemax;
/**
* Maximum weight for the two charged pion channel.
*/
mutable double _twomax;
/**
* Maximum weight for the three charged pion channel.
*/
mutable double _threemax;
/**
* Weights for the channels for the one charged pion channel.
*/
mutable vector<double> _onewgts;
/**
* Weights for the channels for the two charged pion channel.
*/
mutable vector<double> _twowgts;
/**
* Weights for the channels for the three charged pion channel.
*/
mutable vector<double> _threewgts;
/**
* The pion mass
*/
Energy _mpi;
/**
* Spin Density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
};
}
#endif /* HERWIG_a1SimpleDecayer_H */
diff --git a/Decay/VectorMeson/a1ThreePionCLEODecayer.cc b/Decay/VectorMeson/a1ThreePionCLEODecayer.cc
--- a/Decay/VectorMeson/a1ThreePionCLEODecayer.cc
+++ b/Decay/VectorMeson/a1ThreePionCLEODecayer.cc
@@ -1,1126 +1,1126 @@
// -*- C++ -*-
//
// a1ThreePionCLEODecayer.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the a1ThreePionCLEODecayer class.
//
#include "a1ThreePionCLEODecayer.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/PDT/ThreeBodyAllOnCalculator.h"
#include "Herwig/Decay/GeneralDecayMatrixElement.h"
using namespace Herwig;
using namespace ThePEG::Helicity;
using Constants::pi;
a1ThreePionCLEODecayer::a1ThreePionCLEODecayer()
: _rhomass(2), _rhowidth(2), _f2mass(1.275*GeV), _f2width(0.185*GeV),
_pf2cc(ZERO), _pf200(ZERO), _f0mass(1.186*GeV), _f0width(0.350*GeV),
_pf0cc(ZERO), _pf000(ZERO), _sigmamass(0.860*GeV), _sigmawidth(0.880*GeV),
_psigmacc(ZERO), _psigma00(ZERO), _mpi0(ZERO), _mpic(ZERO),
_coupling(45.57/GeV), _rhomagP(2), _rhophaseP(2), _rhomagD(2),
_rhophaseD(2), _f2mag(0.71/GeV2), _f2phase(0.56*pi), _f2coup(ZERO,ZERO),
_f0mag(0.77), _f0phase(-0.54*pi), _f0coup(0.,0.), _sigmamag(2.10),
_sigmaphase(0.23*pi), _sigmacoup(0.,0.), _localparameters(true),
_zerowgts(9), _onewgts(9), _twowgts(9), _threewgts(12), _zeromax(13.0704),
_onemax(6.91104), _twomax(6.94654), _threemax(6.40086) {
// rho masses and widths
_rhomass[0] = 0.7743*GeV; _rhowidth[0] = 0.1491*GeV;
_rhomass[1] = 1.370 *GeV; _rhowidth[1] = 0.386 *GeV;
// p-wave rho and rho prime
_rhomagP[0] = 1. ; _rhophaseP[0] = 0.;
_rhomagP[1] = 0.12; _rhophaseP[1] = 0.99*pi;
// d-wave rho and rho prime
_rhomagD[0] = 0.37/GeV2; _rhophaseD[0] = -0.15*pi;
_rhomagD[1] = 0.87/GeV2; _rhophaseD[1] = 0.53*pi;
// set up the integration channels
_zerowgts[0] = 0.132162;_zerowgts[1] = 0.116638;_zerowgts[2] = 0.121088;
_zerowgts[3] = 0.10656 ;_zerowgts[4] = 0.102577;_zerowgts[5] = 0.101169;
_zerowgts[6] = 0.104587;_zerowgts[7] = 0.104663;_zerowgts[8] = 0.110557;
_onewgts[0] = 0.177017;_onewgts[1] = 0.176011;_onewgts[2] = 0.110129;
_onewgts[3] = 0.108023;_onewgts[4] = 0.110553;_onewgts[5] = 0.109976;
_onewgts[6] = 0.088634;_onewgts[7] = 0.059104;_onewgts[8] = 0.060553;
_twowgts[0] = 0.173357;_twowgts[1] = 0.172283;_twowgts[2] = 0.116031;
_twowgts[3] = 0.114642;_twowgts[4] = 0.109058;_twowgts[5] = 0.114073;
_twowgts[6] = 0.080946;_twowgts[7] = 0.060135;_twowgts[8] = 0.059477;
_threewgts[0] = 0.125022;_threewgts[1] = 0.129911;_threewgts[2] = 0.074165;
_threewgts[3] = 0.075813;_threewgts[4 ]= 0.071154;_threewgts[5 ]= 0.077730;
_threewgts[6] = 0.082255;_threewgts[7 ]= 0.086761;_threewgts[8 ]= 0.067106;
_threewgts[9] = 0.070171;_threewgts[10]= 0.070146;_threewgts[11]= 0.069767;
// generation of intermediates
generateIntermediates(true);
}
void a1ThreePionCLEODecayer::doinit() {
DecayIntegrator::doinit();
// pointers to the particles we need as external particles
tPDPtr a1p = getParticleData(ParticleID::a_1plus);
tPDPtr a10 = getParticleData(ParticleID::a_10);
tPDPtr pip = getParticleData(ParticleID::piplus);
tPDPtr pim = getParticleData(ParticleID::piminus);
tPDPtr pi0 = getParticleData(ParticleID::pi0);
// possible intermediate particles
// the different rho resonances
tPDPtr rhop[3] = {getParticleData(213),getParticleData(100213),
getParticleData(30213)};
tPDPtr rho0[3] = {getParticleData(113),getParticleData(100113),
getParticleData(30113)};
tPDPtr rhom[3] = {getParticleData(-213),getParticleData(-100213),
getParticleData(-30213)};
// the sigma
tPDPtr sigma = getParticleData(9000221);
// the f_2
tPDPtr f2=getParticleData(225);
// the f_0
tPDPtr f0=getParticleData(10221);
// set up the integration channels
tPDVector extpart(4);
DecayPhaseSpaceChannelPtr newchannel;
DecayPhaseSpaceModePtr mode;
// decay mode a_10 -> pi0 pi0 pi0
extpart[0]=a10;
extpart[1]=pi0;
extpart[2]=pi0;
extpart[3]=pi0;
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
// there are six sigma channels
tPDPtr temp;
for(unsigned int ix=0;ix<3;++ix) {
if(ix==0) temp = sigma;
else if(ix==1) temp = f2;
else if(ix==2) temp = f0;
if(temp) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,1);
newchannel->addIntermediate(temp,0,0.0,2,3);
mode->addChannel(newchannel);
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,2);
newchannel->addIntermediate(temp,0,0.0,1,3);
mode->addChannel(newchannel);
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,3);
newchannel->addIntermediate(temp,0,0.0,1,2);
mode->addChannel(newchannel);
}
}
if(_zerowgts.size()!=mode->numberChannels())
_zerowgts=vector<double>(mode->numberChannels(),1./mode->numberChannels());
addMode(mode,_zeromax,_zerowgts);
// decay mode a_1+ -> pi+ pi0 pi0
extpart[0]=a1p;
extpart[1]=pi0;
extpart[2]=pi0;
extpart[3]=pip;
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
for(unsigned int ix=0;ix<3;++ix) {
if(!rhop[ix]) continue;
// first rho+ channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,1);
newchannel->addIntermediate(rhop[ix],0,0.0,2,3);
mode->addChannel(newchannel);
// second rho+ channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,2);
newchannel->addIntermediate(rhop[ix],0,0.0,1,3);
mode->addChannel(newchannel);
}
// the sigma channel
if(sigma) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,3);
newchannel->addIntermediate(sigma,0,0.0,1,2);
mode->addChannel(newchannel);
}
// the f_2 channel
if(f2) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,3);
newchannel->addIntermediate(f2,0,0.0,1,2);
mode->addChannel(newchannel);
}
// the f_0 channel
if(f0) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,3);
newchannel->addIntermediate(f0,0,0.0,1,2);
mode->addChannel(newchannel);
}
if(_onewgts.size()!=mode->numberChannels())
_onewgts=vector<double>(mode->numberChannels(),1./mode->numberChannels());
addMode(mode,_onemax,_onewgts);
// decay mode a_10 -> pi+ pi- pi0
extpart[0]=a10;
extpart[1]=pip;
extpart[2]=pim;
extpart[3]=pi0;
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
for(unsigned int ix=0;ix<3;++ix) {
if(!rhop[ix]) continue;
// first rho channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,1);
newchannel->addIntermediate(rhom[ix],0,0.0,2,3);
mode->addChannel(newchannel);
// second channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,2);
newchannel->addIntermediate(rhop[ix],0,0.0,1,3);
mode->addChannel(newchannel);
}
// sigma channel
if(sigma) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,3);
newchannel->addIntermediate(sigma,0,0.0,1,2);
mode->addChannel(newchannel);
}
// f_2 channel
if(f2) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,3);
newchannel->addIntermediate(f2,0,0.0,1,2);
mode->addChannel(newchannel);
}
// f_0 channel
if(f0) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a10,0,0.0,-1,3);
newchannel->addIntermediate(f0,0,0.0,1,2);
mode->addChannel(newchannel);
}
if(_twowgts.size()!=mode->numberChannels())
_twowgts=vector<double>(mode->numberChannels(),1./mode->numberChannels());
addMode(mode,_twomax,_twowgts);
// decay mode a_1+ -> pi+ pi+ pi-
extpart[0]=a1p;
extpart[1]=pip;
extpart[2]=pip;
extpart[3]=pim;
mode = new_ptr(DecayPhaseSpaceMode(extpart,this));
for(unsigned int ix=0;ix<3;++ix) {
// the neutral rho channels
if(!rho0[ix]) continue;
// first channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,1);
newchannel->addIntermediate(rho0[ix],0,0.0,2,3);
mode->addChannel(newchannel);
// interchanged channel
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,2);
newchannel->addIntermediate(rho0[ix],0,0.0,1,3);
mode->addChannel(newchannel);
}
// the sigma channels
if(sigma) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,1);
newchannel->addIntermediate(sigma,0,0.0,2,3);
mode->addChannel(newchannel);
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,2);
newchannel->addIntermediate(sigma,0,0.0,1,3);
mode->addChannel(newchannel);
}
// the f_2 channels
if(f2) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,1);
newchannel->addIntermediate(f2,0,0.0,2,3);
mode->addChannel(newchannel);
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,2);
newchannel->addIntermediate(f2,0,0.0,1,3);
mode->addChannel(newchannel);
}
// the f_0 channel
if(f0) {
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,1);
newchannel->addIntermediate(f0,0,0.0,2,3);
mode->addChannel(newchannel);
newchannel = new_ptr(DecayPhaseSpaceChannel(mode));
newchannel->addIntermediate(a1p,0,0.0,-1,2);
newchannel->addIntermediate(f0,0,0.0,1,3);
mode->addChannel(newchannel);
}
if(_threewgts.size()!=mode->numberChannels())
_threewgts=vector<double>(mode->numberChannels(),1./mode->numberChannels());
addMode(mode,_threemax,_threewgts);
// if using local parameters set the values in the phase space channels
if(_localparameters) {
for(unsigned int iy=0;iy<_rhomass.size();++iy) {
resetIntermediate(rho0[iy],_rhomass[iy],_rhowidth[iy]);
resetIntermediate(rhop[iy],_rhomass[iy],_rhowidth[iy]);
resetIntermediate(rhom[iy],_rhomass[iy],_rhowidth[iy]);
}
resetIntermediate(sigma,_sigmamass,_sigmawidth);
resetIntermediate(f2,_f2mass,_f2width);
resetIntermediate(f0,_f0mass,_f0width);
// make sure the rho array has enough masses
if(_rhomass.size()<3) {
for(unsigned int ix=_rhomass.size();ix<3;++ix) {
_rhomass.push_back(rhop[ix]->mass());
_rhowidth.push_back(rhop[ix]->width());
}
}
}
// set the local variables if needed
else {
// masses and widths for the particles
_rhomass.resize(3);_rhowidth.resize(3);
for(unsigned int ix=0;ix<3;++ix) {
_rhomass[ix]=rhop[ix]->mass();
_rhowidth[ix]=rhop[ix]->width();
}
if(f2) {
_f2mass=f2->mass();
_f2width=f2->width();
}
if(f0) {
_f0mass=f0->mass();
_f0width=f0->width();
}
if(sigma) {
_sigmamass=sigma->mass();
_sigmawidth=sigma->width();
}
}
// parameters for the breit-wigners
_mpic=pip->mass();
_mpi0=pi0->mass();
// momenta of the decay products for on-shell particles
_psigmacc = Kinematics::pstarTwoBodyDecay(_sigmamass,_mpic,_mpic);
_psigma00 = Kinematics::pstarTwoBodyDecay(_sigmamass,_mpi0,_mpi0);
_pf2cc = Kinematics::pstarTwoBodyDecay(_f2mass ,_mpic,_mpic);
_pf200 = Kinematics::pstarTwoBodyDecay(_f2mass ,_mpi0,_mpi0);
_pf0cc = Kinematics::pstarTwoBodyDecay(_f0mass ,_mpic,_mpic);
_pf000 = Kinematics::pstarTwoBodyDecay(_f0mass ,_mpi0,_mpi0);
_prhocc.resize(3);_prhoc0.resize(3);
for(unsigned int ix=0;ix<3;++ix) {
_prhocc[ix] = Kinematics::pstarTwoBodyDecay(_rhomass[ix],_mpic,_mpic);
_prhoc0[ix] = Kinematics::pstarTwoBodyDecay(_rhomass[ix],_mpic,_mpi0);
}
// couplings for the different modes
Complex ii(0.,1.);
_rhocoupP.resize(_rhomagP.size());
for(unsigned int ix=0;ix<_rhomagP.size();++ix)
_rhocoupP[ix]=_rhomagP[ix]*(cos(_rhophaseP[ix])+ii*sin(_rhophaseP[ix]));
_rhocoupD.resize(_rhomagD.size());
for(unsigned int ix=0;ix<_rhomagD.size();++ix)
_rhocoupD[ix]=_rhomagD[ix]*(cos(_rhophaseD[ix])+ii*sin(_rhophaseD[ix]));
_f0coup=_f0mag*(cos(_f0phase)+ii*sin(_f0phase));
_f2coup=_f2mag*(cos(_f2phase)+ii*sin(_f2phase));
_sigmacoup=_sigmamag*(cos(_sigmaphase)+ii*sin(_sigmaphase));
}
inline void a1ThreePionCLEODecayer::doinitrun() {
DecayIntegrator::doinitrun();
if(initialize()) {
// get the weights for the different channels
for(unsigned int ix=0;ix<_zerowgts.size();++ix)
_zerowgts[ix]=mode(0)->channelWeight(ix);
for(unsigned int ix=0;ix<_onewgts.size();++ix)
_onewgts[ix]=mode(1)->channelWeight(ix);
for(unsigned int ix=0;ix<_twowgts.size();++ix)
_twowgts[ix]=mode(2)->channelWeight(ix);
for(unsigned int ix=0;ix<_threewgts.size();++ix)
_threewgts[ix]=mode(3)->channelWeight(ix);
// get the maximum weight
_zeromax = mode(0)->maxWeight();
_onemax = mode(1)->maxWeight();
_twomax = mode(2)->maxWeight();
_threemax = mode(3)->maxWeight();
}
}
int a1ThreePionCLEODecayer::modeNumber(bool & cc,tcPDPtr parent,
const tPDVector & children) const {
if(children.size()!=3) return -1;
int id(parent->id());
// check the pions
tPDVector::const_iterator pit = children.begin();
tPDVector::const_iterator pend = children.end();
int idtemp,npi0(0),npiplus(0),npiminus(0);
for( ; pit!=pend;++pit) {
idtemp=(**pit).id();
if(idtemp==ParticleID::piplus) ++npiplus;
else if(idtemp==ParticleID::piminus) ++npiminus;
else if(idtemp==ParticleID::pi0) ++npi0;
}
int imode(-1);
// a_1+ decay modes
if(id==ParticleID::a_1plus) {
cc=false;
if(npiplus==1&&npi0==2) imode=1;
else if(npiplus==2&&npiminus==1) imode=3;
}
// a_1- modes
else if(id==ParticleID::a_1minus) {
cc=true;
if(npiminus==1&&npi0==2) imode=1;
else if(npiminus==2&&npiplus==1) imode=3;
}
// a_0 modes
else if(id==ParticleID::a_10) {
cc=false;
if(npiminus==1&&npiplus==1&&npi0==1) imode=2;
else if(npi0==3) imode=0;
}
return imode;
}
void a1ThreePionCLEODecayer::persistentOutput(PersistentOStream & os) const {
os << ounit(_rhomass,GeV) << ounit(_rhowidth,GeV)
<< ounit(_prhocc,GeV) << ounit(_prhoc0,GeV)
<< ounit(_f2mass,GeV) << ounit(_f2width,GeV)
<< ounit(_pf2cc,GeV)
<< ounit(_pf200,GeV) << ounit(_f0mass,GeV)
<< ounit(_f0width,GeV) << ounit(_pf0cc,GeV) << ounit(_pf000,GeV)
<< ounit(_sigmamass,GeV) << ounit(_sigmawidth,GeV)
<< ounit(_psigmacc,GeV) << ounit(_psigma00,GeV)
<< ounit(_mpi0,GeV) << ounit(_mpic,GeV)
<< ounit(_coupling,1/GeV) << _rhomagP << _rhophaseP
<< _rhocoupP << ounit(_rhomagD ,1/GeV2)<< _rhophaseD
<< ounit(_rhocoupD,1/GeV2) << ounit(_f2mag,1/GeV2)
<< _f2phase << ounit(_f2coup,1/GeV2)
<< _f0mag << _f0phase << _f0coup
<< _sigmamag << _sigmaphase << _sigmacoup
<< _localparameters
<< _zerowgts << _onewgts << _twowgts << _threewgts
<< _zeromax << _onemax << _twomax << _threemax;
}
void a1ThreePionCLEODecayer::persistentInput(PersistentIStream & is, int) {
is >> iunit(_rhomass,GeV) >> iunit(_rhowidth,GeV)
>> iunit(_prhocc,GeV) >> iunit(_prhoc0,GeV)
>> iunit(_f2mass,GeV) >> iunit(_f2width,GeV)
>> iunit(_pf2cc,GeV)
>> iunit(_pf200,GeV) >> iunit(_f0mass,GeV)
>> iunit(_f0width,GeV) >> iunit(_pf0cc,GeV) >> iunit(_pf000,GeV)
>> iunit(_sigmamass,GeV) >> iunit(_sigmawidth,GeV)
>> iunit(_psigmacc,GeV) >> iunit(_psigma00,GeV)
>> iunit(_mpi0,GeV) >> iunit(_mpic,GeV)
>> iunit(_coupling,1/GeV) >> _rhomagP >> _rhophaseP
>> _rhocoupP >> iunit(_rhomagD,1/GeV2) >> _rhophaseD
>> iunit(_rhocoupD,1/GeV2)>>iunit(_f2mag,1/GeV2)
>> _f2phase >> iunit(_f2coup,1/GeV2)
>> _f0mag >> _f0phase >> _f0coup
>> _sigmamag >> _sigmaphase >> _sigmacoup
>> _localparameters
>> _zerowgts >> _onewgts >> _twowgts >> _threewgts
>> _zeromax >> _onemax >> _twomax >> _threemax;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<a1ThreePionCLEODecayer,DecayIntegrator>
describeHerwiga1ThreePionCLEODecayer("Herwig::a1ThreePionCLEODecayer", "HwVMDecay.so");
void a1ThreePionCLEODecayer::Init() {
static ClassDocumentation<a1ThreePionCLEODecayer> documentation
("The a1ThreePionCLEODecayer class performs the decay of the "
"a_1 to three pions using the model of CLEO",
"The decay of a_1 to three pions was modelled after \\cite{Asner:1999kj}.",
"%\\cite{Asner:1999kj}\n"
"\\bibitem{Asner:1999kj}\n"
" D.~M.~Asner {\\it et al.} [CLEO Collaboration],\n"
" ``Hadronic structure in the decay tau- --> nu/tau pi- pi0 pi0 and the sign\n"
" %of the tau neutrino helicity,''\n"
" Phys.\\ Rev.\\ D {\\bf 61}, 012002 (2000)\n"
" [arXiv:hep-ex/9902022].\n"
" %%CITATION = PHRVA,D61,012002;%%\n"
);
static ParVector<a1ThreePionCLEODecayer,Energy> interfacerhomass
("RhoMasses",
"The masses of the different rho resonnaces",
&a1ThreePionCLEODecayer::_rhomass,
GeV, 0, ZERO, -10000*GeV, 10000*GeV, false, false, true);
static ParVector<a1ThreePionCLEODecayer,Energy> interfacerhowidth
("RhoWidths",
"The widths of the different rho resonnaces",
&a1ThreePionCLEODecayer::_rhowidth,
GeV, 0, ZERO, -10000*GeV, 10000*GeV, false, false, true);
static Parameter<a1ThreePionCLEODecayer,Energy> interfacef_2Mass
("f_2Mass",
"The mass of the f_2 meson",
&a1ThreePionCLEODecayer::_f2mass, GeV, 1.275*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,Energy> interfacef_2Width
("f_2Width",
"The width of the f_2 meson",
&a1ThreePionCLEODecayer::_f2width, GeV, 0.185*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,Energy> interfacef_0Mass
("f_0Mass",
"The mass of the f_0 meson",
&a1ThreePionCLEODecayer::_f0mass, GeV, 1.186*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,Energy> interfacef_0Width
("f_0Width",
"The width of the f_0 meson",
&a1ThreePionCLEODecayer::_f0width, GeV, 0.350*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,Energy> interfacesigmaMass
("sigmaMass",
"The mass of the sigma meson",
&a1ThreePionCLEODecayer::_sigmamass, GeV, 0.860*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,Energy> interfacesigmaWidth
("sigmaWidth",
"The width of the sigma meson",
&a1ThreePionCLEODecayer::_sigmawidth, GeV, 0.880*GeV, ZERO, 2.0*GeV,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,InvEnergy> interfaceCoupling
("Coupling",
"The overall coupling for the decay",
&a1ThreePionCLEODecayer::_coupling, 1./GeV, 45.57/GeV, -0./GeV, 1000./GeV,
false, false, false);
static ParVector<a1ThreePionCLEODecayer,double> interfacerhomagP
("RhoPWaveMagnitude",
"The magnitude of the couplings for the p-wave rho currents",
&a1ThreePionCLEODecayer::_rhomagP,
0, 0, 0, 0, 10000, false, false, true);
static ParVector<a1ThreePionCLEODecayer,double> interfacerhophaseP
("RhoPWavePhase",
"The phase of the couplings for the p-wave rho currents",
&a1ThreePionCLEODecayer::_rhophaseP,
0, 0, 0, -pi, pi, false, false, true);
static ParVector<a1ThreePionCLEODecayer,InvEnergy2> interfacerhomagD
("RhoDWaveMagnitude",
"The magnitude of the couplings for the d-wave rho currents",
&a1ThreePionCLEODecayer::_rhomagD,
1/MeV2, 0, ZERO, ZERO, 10000/MeV2, false, false, true);
static ParVector<a1ThreePionCLEODecayer,double> interfacerhophaseD
("RhoDWavePhase",
"The phase of the couplings for the d-wave rho currents",
&a1ThreePionCLEODecayer::_rhophaseD,
0, 0, 0, -pi, pi, false, false, true);
static Parameter<a1ThreePionCLEODecayer,double> interfacef0Phase
("f0Phase",
"The phase of the f_0 scalar current",
&a1ThreePionCLEODecayer::_f0phase, 0.54*pi, -pi, pi,
false, false, Interface::limited);
static Parameter<a1ThreePionCLEODecayer,double> interfacef2Phase
("f2Phase",
"The phase of the f_2 tensor current",
&a1ThreePionCLEODecayer::_f2phase, 0.56*pi, -pi, pi,
false, false, Interface::limited);
static Parameter<a1ThreePionCLEODecayer,double> interfacesigmaPhase
("sigmaPhase",
"The phase of the sigma scalar current",
&a1ThreePionCLEODecayer::_sigmaphase, 0.23*pi, -pi, pi,
false, false, Interface::limited);
static Parameter<a1ThreePionCLEODecayer,double> interfacef0Magnitude
("f0Magnitude",
"The magnitude of the f_0 scalar current",
&a1ThreePionCLEODecayer::_f0mag, 0.77, 0.0, 10,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,InvEnergy2> interfacef2Magnitude
("f2Magnitude",
"The magnitude of the f_2 tensor current",
&a1ThreePionCLEODecayer::_f2mag, 1./GeV2, 0.71/GeV2, ZERO, 10./GeV2,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,double> interfacesigmaMagnitude
("sigmaMagnitude",
"The magnitude of the sigma scalar current",
&a1ThreePionCLEODecayer::_sigmamag, 2.1, 0.0, 10,
false, false, true);
static Switch<a1ThreePionCLEODecayer,bool> interfaceLocalParameters
("LocalParameters",
"Use local values of the intermediate resonances masses and widths",
&a1ThreePionCLEODecayer::_localparameters, true, false, false);
static SwitchOption interfaceLocalParametersLocal
(interfaceLocalParameters,
"Local",
"Use the local values",
true);
static SwitchOption interfaceLocalParametersDefault
(interfaceLocalParameters,
"ParticleData",
"Use the values from the particleData objects",
false);
static ParVector<a1ThreePionCLEODecayer,double> interfacezerowgts
("AllNeutralWeights",
"The weights of the different channels to use for the integration of"
" the decay a_1^0->pi0pi0pi0",
&a1ThreePionCLEODecayer::_zerowgts,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<a1ThreePionCLEODecayer,double> interfaceonewgts
("OneChargedWeights",
"The weights of the different channels to use for the integration of"
" the decay a_1^+->pi+pi0pi0",
&a1ThreePionCLEODecayer::_onewgts,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<a1ThreePionCLEODecayer,double> interfacetwowgts
("TwoChargedWeights",
"The weights of the different channels to use for the integration of"
" the decay a_1^0->pi+pi-pi0",
&a1ThreePionCLEODecayer::_twowgts,
0, 0, 0, -10000, 10000, false, false, true);
static ParVector<a1ThreePionCLEODecayer,double> interfacethreewgts
("ThreeChargedWeights",
"The weights of the different channels to use for the integration of"
" the decay a_1^+->pi+pi+pi-",
&a1ThreePionCLEODecayer::_threewgts,
0, 0, 0, -10000, 10000, false, false, true);
static Parameter<a1ThreePionCLEODecayer,double> interfaceZeroMax
("ZeroMax",
"The maximum weight for the integration fo the channel a_1^0->pi0pi0pi0",
&a1ThreePionCLEODecayer::_zeromax, 0.0716349E3, 0.0, 10000.0,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,double> interfaceOneMax
("OneMax",
"The maximum weight for the integration fo the channel a_1^+->pi+pi0pi0",
&a1ThreePionCLEODecayer::_onemax,1.23756E3, 0.0, 10000.0,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,double> interfaceTwoMax
("TwoMax",
"The maximum weight for the integration fo the channel a_1^0->pi+pi-pi0",
&a1ThreePionCLEODecayer::_twomax,2.43819E3, 0.0, 10000.0,
false, false, true);
static Parameter<a1ThreePionCLEODecayer,double> interfaceThreeMax
("ThreeMax",
"The maximum weight for the integration fo the channel a_1^+->pi+pi+pi-",
&a1ThreePionCLEODecayer::_threemax, 1.38754E3, 0.0, 10000.0,
false, false, true);
}
double a1ThreePionCLEODecayer::me2(const int ichan,
const Particle & inpart,
const ParticleVector & decay,
MEOption meopt) const {
useMe();
if(!ME())
ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1,PDT::Spin0,PDT::Spin0,PDT::Spin0)));
if(meopt==Initialize) {
VectorWaveFunction::calculateWaveFunctions(_vectors,_rho,
const_ptr_cast<tPPtr>(&inpart),
incoming,false);
}
if(meopt==Terminate) {
VectorWaveFunction::constructSpinInfo(_vectors,const_ptr_cast<tPPtr>(&inpart),
incoming,true,false);
// set up the spin information for the decay products
for(unsigned int ix=0;ix<3;++ix)
ScalarWaveFunction::constructSpinInfo(decay[ix],outgoing,true);
return 0.;
}
// momentum of the incoming particle
Lorentz5Momentum Q=inpart.momentum();
Energy2 q2=Q.mass2();
// identify the mesons
// calculate the invariants and form factors
Lorentz5Momentum ps1=decay[1]->momentum()+decay[2]->momentum();
Lorentz5Momentum ps2=decay[0]->momentum()+decay[2]->momentum();
Lorentz5Momentum ps3=decay[0]->momentum()+decay[1]->momentum();
ps1.rescaleMass();
ps2.rescaleMass();
ps3.rescaleMass();
Energy2 s1=ps1.mass2(),s2=ps2.mass2(),s3=ps3.mass2();
complex<InvEnergy> F1,F2,F3;
formFactors(imode(),ichan,q2,s1,s2,s3,F1,F2,F3);
// use the form-factors to compute the current
LorentzPolarizationVector output=
- F1*decay[1]->momentum()-F1*decay[2]->momentum()
- -F2*decay[2]->momentum()+F2*decay[0]->momentum()
- +F3*decay[0]->momentum()-F3*decay[1]->momentum();
+ LorentzPolarizationVector(F1*decay[1]->momentum())-LorentzPolarizationVector(F1*decay[2]->momentum())
+ -LorentzPolarizationVector(F2*decay[2]->momentum())+LorentzPolarizationVector(F2*decay[0]->momentum())
+ +LorentzPolarizationVector(F3*decay[0]->momentum())-LorentzPolarizationVector(F3*decay[1]->momentum());
// compute the matrix element
for(unsigned int ix=0;ix<3;++ix)
(*ME())(ix,0,0,0)=output.dot(_vectors[ix]);
// answer
double out = ME()->contract(_rho).real();
// test of the answer
// double test = threeBodyMatrixElement(imode(),sqr(inpart.mass()),
// s3,s2,s1,decay[0]->mass(),decay[1]->mass(),
// decay[2]->mass());
// if(ichan<0) cerr << "testing matrix element " << inpart.PDGName() << " -> "
// << decay[0]->PDGName() << " " << decay[1]->PDGName() << " "
// << decay[2]->PDGName() << out << " " << test << " "
// << (out-test)/(out+test) << "\n";
// return the answer
return out;
}
// matrix element for the running a_1 width
double a1ThreePionCLEODecayer::
threeBodyMatrixElement(const int iopt,const Energy2 q2, const Energy2 s3,
const Energy2 s2,const Energy2 s1, const Energy m1,
const Energy m2 ,const Energy m3) const {
Energy2 m12=m1*m1,m22=m2*m2,m32=m3*m3;
// calculate the form factors
complex<InvEnergy> F1,F2,F3;
formFactors(iopt,-1,q2,s1,s2,s3,F1,F2,F3);
// analytic calculation of the matrix element
double dot1=( F1*conj(F1)*(2.*m22+2.*m32-s1)+F2*conj(F2)*(2.*m12+2.*m32-s2)
+F3*conj(F3)*(2.*m12+2.*m22-s3)-F1*conj(F2)*( s1+s2-s3-4.*m32)
+F1*conj(F3)*( s1-s2+s3-4.*m22)-F2*conj(F3)*(-s1+s2+s3-4.*m12)).real();
complex<Energy> dot2 = 0.5*(F1*(s3-m32-s2+m22)-F2*(s1-m12-s3+m32)+F3*(s2-m22-s1+m12));
return (-dot1+(dot2*conj(dot2)).real()/q2)/3.;
}
WidthCalculatorBasePtr
a1ThreePionCLEODecayer::threeBodyMEIntegrator(const DecayMode & dm) const {
ParticleMSet::const_iterator pit = dm.products().begin();
ParticleMSet::const_iterator pend = dm.products().end();
int ncharged=0;
for( ; pit!=pend;++pit) {
if(abs((**pit).id())==ParticleID::piplus) ++ncharged;
}
// integrator to perform the integral
vector<double> inweights;inweights.push_back(0.5);inweights.push_back(0.5);
vector<int> intype;intype.push_back(2);intype.push_back(3);
vector<Energy> inmass(2,_rhomass[0]),inwidth(2,_rhowidth[0]);
vector<double> inpow(2,0.0);
Energy m[3];
m[0] = ncharged<2 ? _mpi0 : _mpic;
m[1] = m[0];
m[2] = (ncharged==0||ncharged==2) ? _mpi0 : _mpic;
return new_ptr(ThreeBodyAllOnCalculator<a1ThreePionCLEODecayer>
(inweights,intype,inmass,inwidth,inpow,*this,ncharged,m[0],m[1],m[2]));
}
// calculate the form factos
void a1ThreePionCLEODecayer::formFactors(int iopt,int ichan,
Energy2 q2,Energy2 s1,Energy2 s2,
Energy2 s3,
complex<InvEnergy> & FF1,
complex<InvEnergy> & FF2,
complex<InvEnergy> & FF3) const {
Complex F1, F2, F3;
InvEnergy fact = _coupling;
// a_1^0 pi0 pi0 pi0 mode
if(iopt==0) {
fact*=1./sqrt(6.);
// compute the breit wigners we need
Complex sigbws1 = sigmaBreitWigner(s1,1);
Complex sigbws2 = sigmaBreitWigner(s2,1);
Complex sigbws3 = sigmaBreitWigner(s3,1);
Complex f0bws1 = f0BreitWigner(s1,1);
Complex f0bws2 = f0BreitWigner(s2,1);
Complex f0bws3 = f0BreitWigner(s3,1);
Complex f2bws1 = f2BreitWigner(s1,1);
Complex f2bws2 = f2BreitWigner(s2,1);
Complex f2bws3 = f2BreitWigner(s3,1);
if(ichan<0) {
// the scalar terms
F1=2./3.*(_sigmacoup*sigbws3+_f0coup*f0bws3)
-2./3.*(_sigmacoup*sigbws2+_f0coup*f0bws2);
F2=2./3.*(_sigmacoup*sigbws3+_f0coup*f0bws3)
-2./3.*(_sigmacoup*sigbws1+_f0coup*f0bws1);
F3=-2./3.*(_sigmacoup*sigbws1+_f0coup*f0bws1)
+2./3.*(_sigmacoup*sigbws2+_f0coup*f0bws2);
// the tensor terms
complex<Energy2> Dfact1 = 1./18.*(4.*_mpi0*_mpi0-s1)*(q2+s1-_mpi0*_mpi0)/s1*f2bws1;
complex<Energy2> Dfact2 = 1./18.*(4.*_mpi0*_mpi0-s2)*(q2+s2-_mpi0*_mpi0)/s2*f2bws2;
complex<Energy2> Dfact3 = 1./18.*(4.*_mpi0*_mpi0-s3)*(q2-_mpi0*_mpi0+s3)/s3*f2bws3;
- F1+=_f2coup*( 0.5*(s3-s2)*f2bws1-Dfact2+Dfact3);
- F2+=_f2coup*( 0.5*(s3-s1)*f2bws2-Dfact1+Dfact3);
- F3+=_f2coup*(-0.5*(s1-s2)*f2bws3-Dfact1+Dfact2);
+ F1 += Complex(_f2coup*( 0.5*(s3-s2)*f2bws1-Dfact2+Dfact3));
+ F2 += Complex(_f2coup*( 0.5*(s3-s1)*f2bws2-Dfact1+Dfact3));
+ F3 += Complex(_f2coup*(-0.5*(s1-s2)*f2bws3-Dfact1+Dfact2));
}
else if(ichan==0) {
F2=-2./3.*_sigmacoup*sigbws1;
F3=-2./3.*_sigmacoup*sigbws1;
}
else if(ichan==1) {
F1=-2./3.*_sigmacoup*sigbws2;
F3=+2./3.*_sigmacoup*sigbws2;
}
else if(ichan==2) {
F1= 2./3.*_sigmacoup*sigbws3;
F2= 2./3.*_sigmacoup*sigbws3;
}
else if(ichan==3) {
complex<Energy2> Dfact1 = 1./18.*(4.*_mpi0*_mpi0-s1)*(q2+s1-_mpi0*_mpi0)/s1*f2bws1;
- F1+=_f2coup*0.5*(s3-s2)*f2bws1;
- F2-=_f2coup*Dfact1;
- F3-=_f2coup*Dfact1;
+ F1+=Complex(_f2coup*0.5*(s3-s2)*f2bws1);
+ F2-=Complex(_f2coup*Dfact1);
+ F3-=Complex(_f2coup*Dfact1);
}
else if(ichan==4) {
complex<Energy2> Dfact2 = 1./18.*(4.*_mpi0*_mpi0-s2)*(q2+s2-_mpi0*_mpi0)/s2*f2bws2;
- F2+=_f2coup*0.5*(s3-s1)*f2bws2;
- F1-=_f2coup*Dfact2;
- F3+=_f2coup*Dfact2;
+ F2+=Complex(_f2coup*0.5*(s3-s1)*f2bws2);
+ F1-=Complex(_f2coup*Dfact2);
+ F3+=Complex(_f2coup*Dfact2);
}
else if(ichan==5) {
complex<Energy2> Dfact3 = 1./18.*(4.*_mpi0*_mpi0-s3)*(q2-_mpi0*_mpi0+s3)/s3*f2bws3;
- F3+=-_f2coup*0.5*(s1-s2)*f2bws3;
- F1+=_f2coup*Dfact3;
- F2+=_f2coup*Dfact3;
+ F3+=Complex(-_f2coup*0.5*(s1-s2)*f2bws3);
+ F1+=Complex(_f2coup*Dfact3);
+ F2+=Complex(_f2coup*Dfact3);
}
else if(ichan==6) {
F2=-2./3.*_f0coup*f0bws1;
F3=-2./3.*_f0coup*f0bws1;
}
else if(ichan==7) {
F1=-2./3.*_f0coup*f0bws2;
F3=+2./3.*_f0coup*f0bws2;
}
else if(ichan==8) {
F1= 2./3.*_f0coup*f0bws3;
F2= 2./3.*_f0coup*f0bws3;
}
}
// a_1^+ -> pi0 pi0 pi+
else if(iopt==1) {
fact *= 1./sqrt(2.);
// compute the breit wigners we need
Complex rhos1bw[3],rhos2bw[3],f0bw,sigbw,f2bw;
for(unsigned int ix=0,N=max(_rhocoupP.size(),_rhocoupD.size());ix<N;++ix) {
rhos1bw[ix]=rhoBreitWigner(ix,s1,1);
rhos2bw[ix]=rhoBreitWigner(ix,s2,1);
}
f0bw = f0BreitWigner(s3,1);
sigbw = sigmaBreitWigner(s3,1);
f2bw = f2BreitWigner(s3,1);
if(ichan<0) {
// the p-wave rho terms
for(unsigned int ix=0;ix<_rhocoupP.size();++ix) {
F1+=_rhocoupP[ix]*rhos1bw[ix];
F2+=_rhocoupP[ix]*rhos2bw[ix];
}
// the D-wave rho terms
Energy2 Dfact1=-1./3.*((s3-_mpic*_mpic)-(s1-_mpi0*_mpi0));
Energy2 Dfact2=-1./3.*((s3-_mpic*_mpic)-(s2-_mpi0*_mpi0));
for(unsigned int ix=0;ix<_rhocoupD.size();++ix) {
- F1+=Dfact1*_rhocoupD[ix]*rhos2bw[ix];
- F2+=Dfact2*_rhocoupD[ix]*rhos1bw[ix];
- F3+=_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]);
+ F1+=Complex(Dfact1*_rhocoupD[ix]*rhos2bw[ix]);
+ F2+=Complex(Dfact2*_rhocoupD[ix]*rhos1bw[ix]);
+ F3+=Complex(_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]));
}
// the scalar terms
Complex scalar=2./3.*(_sigmacoup*sigbw+_f0coup*f0bw);
F1+=scalar;
F2+=scalar;
// the tensor terms
Complex Dfact3=1./18./s3*_f2coup*(q2-_mpic*_mpic+s3)*(4.*_mpi0*_mpi0-s3)*f2bw;
F1+=Dfact3;F2+=Dfact3;
- F3-=0.5*_f2coup*(s1-s2)*f2bw;
+ F3-=Complex(0.5*_f2coup*(s1-s2)*f2bw);
}
else if(ichan%2==0&&ichan<=4) {
unsigned int ires=ichan/2;
if(ires<_rhocoupP.size()) F1+=_rhocoupP[ires]*rhos1bw[ires];
Energy2 Dfact2=-1./3.*((s3-_mpic*_mpic)-(s2-_mpi0*_mpi0));
if(ires<_rhocoupD.size()) {
- F2+=Dfact2*_rhocoupD[ires]*rhos1bw[ires];
- F3+=_rhocoupD[ires]*Dfact2*rhos1bw[ires];
+ F2+=Complex(Dfact2*_rhocoupD[ires]*rhos1bw[ires]);
+ F3+=Complex(_rhocoupD[ires]*Dfact2*rhos1bw[ires]);
}
}
else if(ichan%2==1&&ichan<=5) {
unsigned int ires=(ichan-1)/2;
if(ires<_rhocoupP.size()) F2+=_rhocoupP[ires]*rhos2bw[ires];
Energy2 Dfact1=-1./3.*((s3-_mpic*_mpic)-(s1-_mpi0*_mpi0));
if(ires<_rhocoupD.size()) {
- F1+=Dfact1*_rhocoupD[ires]*rhos2bw[ires];
- F3-=_rhocoupD[ires]*Dfact1*rhos2bw[ires];
+ F1+=Complex(Dfact1*_rhocoupD[ires]*rhos2bw[ires]);
+ F3-=Complex(_rhocoupD[ires]*Dfact1*rhos2bw[ires]);
}
}
else if(ichan==6) {
F1+=2./3.*_sigmacoup*sigbw;
F2+=2./3.*_sigmacoup*sigbw;
}
else if(ichan==7) {
Complex Dfact3=1./18./s3*_f2coup*(q2-_mpic*_mpic+s3)*(4.*_mpi0*_mpi0-s3)*f2bw;
F1+=Dfact3;
F2+=Dfact3;
- F3-=0.5*_f2coup*(s1-s2)*f2bw;
+ F3-=Complex(0.5*_f2coup*(s1-s2)*f2bw);
}
else if(ichan==8) {
F1+=2./3.*_f0coup*f0bw;
F2+=2./3.*_f0coup*f0bw;
}
}
// a_1^0 ->pi+pi-pi0
else if(iopt==2) {
// compute the breit wigners we need
Complex rhos1bw[3],rhos2bw[3],f0bw,sigbw,f2bw;
for(unsigned int ix=0,N=max(_rhocoupP.size(),_rhocoupD.size());ix<N;++ix) {
rhos1bw[ix]=rhoBreitWigner(ix,s1,1);
rhos2bw[ix]=rhoBreitWigner(ix,s2,1);
}
f0bw =f0BreitWigner(s3,0);
sigbw =sigmaBreitWigner(s3,0);
f2bw =f2BreitWigner(s3,0);
if(ichan<0) {
// the p-wave rho terms
for(unsigned int ix=0;ix<_rhocoupP.size();++ix) {
F1+=_rhocoupP[ix]*rhos1bw[ix];
F2+=_rhocoupP[ix]*rhos2bw[ix];
}
// the D-wave rho terms
Energy2 Dfact1=-1./3.*(s3-_mpi0*_mpi0-s1+_mpic*_mpic);
Energy2 Dfact2=-1./3.*(s3-_mpi0*_mpi0-s2+_mpic*_mpic);
for(unsigned int ix=0;ix<_rhocoupD.size();++ix) {
- F1+=Dfact1*_rhocoupD[ix]*rhos2bw[ix];
- F2+=Dfact2*_rhocoupD[ix]*rhos1bw[ix];
- F3+=_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]);
+ F1+=Complex(Dfact1*_rhocoupD[ix]*rhos2bw[ix]);
+ F2+=Complex(Dfact2*_rhocoupD[ix]*rhos1bw[ix]);
+ F3+=Complex(_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]));
}
// the scalar terms
Complex scalar=2./3.*(_sigmacoup*sigbw+_f0coup*f0bw);
F1+=scalar;
F2+=scalar;
// the tensor terms
Complex Dfact3=1./18./s3*_f2coup*(q2-_mpi0*_mpi0+s3)*(4.*_mpic*_mpic-s3)*f2bw;
F1+=Dfact3;
F2+=Dfact3;
- F3-=0.5*_f2coup*(s1-s2)*f2bw;
+ F3-=Complex(0.5*_f2coup*(s1-s2)*f2bw);
}
else if(ichan%2==0&&ichan<=4) {
unsigned int ires=ichan/2;
if(ires<_rhocoupP.size()) F1+=_rhocoupP[ires]*rhos1bw[ires];
Energy2 Dfact2=-1./3.*(s3-_mpi0*_mpi0-s2+_mpic*_mpic);
if(ires<_rhocoupD.size()) {
- F2+=Dfact2*_rhocoupD[ires]*rhos1bw[ires];
- F3+=_rhocoupD[ires]*Dfact2*rhos1bw[ires];
+ F2+=Complex(Dfact2*_rhocoupD[ires]*rhos1bw[ires]);
+ F3+=Complex(_rhocoupD[ires]*Dfact2*rhos1bw[ires]);
}
}
else if(ichan%2==1&&ichan<=5) {
unsigned int ires=(ichan-1)/2;
if(ires<_rhocoupP.size()) F2+=_rhocoupP[ires]*rhos2bw[ires];
Energy2 Dfact1=-1./3.*(s3-_mpi0*_mpi0-s1+_mpic*_mpic);
if(ires<_rhocoupD.size()) {
- F1+=Dfact1*_rhocoupD[ires]*rhos2bw[ires];
- F3-=_rhocoupD[ires]*-Dfact1*rhos2bw[ires];
+ F1+=Complex(Dfact1*_rhocoupD[ires]*rhos2bw[ires]);
+ F3-=Complex(_rhocoupD[ires]*-Dfact1*rhos2bw[ires]);
}
}
else if(ichan==6) {
F1+=2./3.*_sigmacoup*sigbw;
F2+=2./3.*_sigmacoup*sigbw;
}
else if(ichan==7) {
Complex Dfact3=1./18./s3*_f2coup*(q2-_mpi0*_mpi0+s3)*(4.*_mpic*_mpic-s3)*f2bw;
F1+=Dfact3;
F2+=Dfact3;
- F3-=0.5*_f2coup*(s1-s2)*f2bw;
+ F3-=Complex(0.5*_f2coup*(s1-s2)*f2bw);
}
else if(ichan==8) {
F1+=2./3.*_f0coup*f0bw;
F2+=2./3.*_f0coup*f0bw;
}
}
// a_1^+ -> pi+ pi+ pi- mode
else {
fact *= 1./sqrt(2.);
// compute the breit wigners we need
Complex rhos1bw[3],rhos2bw[3],f0bws1,sigbws1,f2bws1,f0bws2,sigbws2,f2bws2;
for(unsigned int ix=0,N=max(_rhocoupP.size(),_rhocoupD.size());ix<N;++ix) {
rhos1bw[ix]=rhoBreitWigner(ix,s1,0);
rhos2bw[ix]=rhoBreitWigner(ix,s2,0);
}
f0bws1 =f0BreitWigner(s1,0);
sigbws1 =sigmaBreitWigner(s1,0);
f2bws1 =f2BreitWigner(s1,0);
f0bws2 =f0BreitWigner(s2,0);
sigbws2 =sigmaBreitWigner(s2,0);
f2bws2 =f2BreitWigner(s2,0);
if(ichan<0) {
// the p-wave rho terms
for(unsigned int ix=0;ix<_rhocoupP.size();++ix) {
F1-=_rhocoupP[ix]*rhos1bw[ix];
F2-=_rhocoupP[ix]*rhos2bw[ix];
}
// the D-wave rho terms
Energy2 Dfact1=1./3.*(s1-s3);
Energy2 Dfact2=1./3.*(s2-s3);
for(unsigned int ix=0;ix<_rhocoupD.size();++ix) {
- F1-=Dfact1*_rhocoupD[ix]*rhos2bw[ix];
- F2-=Dfact2*_rhocoupD[ix]*rhos1bw[ix];
- F3-=_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]);
+ F1-=Complex(Dfact1*_rhocoupD[ix]*rhos2bw[ix]);
+ F2-=Complex(Dfact2*_rhocoupD[ix]*rhos1bw[ix]);
+ F3-=Complex(_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]));
}
// the scalar terms
F1-=2./3.*(_sigmacoup*sigbws2+_f0coup*f0bws2);
F2-=2./3.*(_sigmacoup*sigbws1+_f0coup*f0bws1);
F3+=-2./3.*(_sigmacoup*sigbws1+_f0coup*f0bws1)
+2./3.*(_sigmacoup*sigbws2+_f0coup*f0bws2);
// the tensor terms
complex<Energy2> sfact1
= 1./18.*(4.*_mpic*_mpic-s1)*(q2+s1-_mpic*_mpic)/s1*f2bws1;
complex<Energy2> sfact2
= 1./18.*(4.*_mpic*_mpic-s2)*(q2+s2-_mpic*_mpic)/s2*f2bws2;
- F1+=_f2coup*(0.5*(s3-s2)*f2bws1-sfact2);
- F2+=_f2coup*(0.5*(s3-s1)*f2bws2-sfact1);
- F3+=_f2coup*(-sfact1+sfact2);
+ F1+=Complex(_f2coup*(0.5*(s3-s2)*f2bws1-sfact2));
+ F2+=Complex(_f2coup*(0.5*(s3-s1)*f2bws2-sfact1));
+ F3+=Complex(_f2coup*(-sfact1+sfact2));
}
else if(ichan%2==0&&ichan<=4) {
unsigned int ires=ichan/2;
Energy2 Dfact2=1./3.*(s2-s3);
if(ires<_rhocoupP.size()) F1-=_rhocoupP[ires]*rhos1bw[ires];
if(ires<_rhocoupD.size()){
- F2-=Dfact2*_rhocoupD[ires]*rhos1bw[ires];
- F3-=_rhocoupD[ires]*Dfact2*rhos1bw[ires];
+ F2-=Complex(Dfact2*_rhocoupD[ires]*rhos1bw[ires]);
+ F3-=Complex(_rhocoupD[ires]*Dfact2*rhos1bw[ires]);
}
}
else if(ichan%2==1&&ichan<=5) {
unsigned int ires=(ichan-1)/2;
Energy2 Dfact1=1./3.*(s1-s3);
if(ires<_rhocoupP.size()) F2-=_rhocoupP[ires]*rhos2bw[ires];
if(ires<_rhocoupD.size()) {
- F1-=Dfact1*_rhocoupD[ires]*rhos2bw[ires];
- F3+=_rhocoupD[ires]*Dfact1*rhos2bw[ires];
+ F1-=Complex(Dfact1*_rhocoupD[ires]*rhos2bw[ires]);
+ F3+=Complex(_rhocoupD[ires]*Dfact1*rhos2bw[ires]);
}
}
else if(ichan==6) {
F2-=2./3.*_sigmacoup*sigbws1;
F3-=2./3.*_sigmacoup*sigbws1;
}
else if(ichan==7) {
F1-=2./3.*_sigmacoup*sigbws2;
F3+=2./3.*_sigmacoup*sigbws2;
}
else if(ichan==8) {
complex<Energy2> sfact1 = 1./18.*(4.*_mpic*_mpic-s1)*(q2+s1-_mpic*_mpic)/s1*f2bws1;
- F1+=_f2coup*0.5*(s3-s2)*f2bws1;
- F2-=_f2coup*sfact1;
- F3-=_f2coup*sfact1;
+ F1+=Complex(_f2coup*0.5*(s3-s2)*f2bws1);
+ F2-=Complex(_f2coup*sfact1);
+ F3-=Complex(_f2coup*sfact1);
}
else if(ichan==9) {
complex<Energy2> sfact2 = 1./18.*(4.*_mpic*_mpic-s2)*(q2+s2-_mpic*_mpic)/s2*f2bws2;
- F1-=_f2coup*sfact2;
- F2+=_f2coup*0.5*(s3-s1)*f2bws2;
- F3+=_f2coup*sfact2;
+ F1-=Complex(_f2coup*sfact2);
+ F2+=Complex(_f2coup*0.5*(s3-s1)*f2bws2);
+ F3+=Complex(_f2coup*sfact2);
}
else if(ichan==10) {
F2-=2./3.*_f0coup*f0bws1;
F3-=2./3.*_f0coup*f0bws1;
}
else if(ichan==11) {
F1-=2./3.*_f0coup*f0bws2;
F3+=2./3.*_f0coup*f0bws2;
}
}
FF1 = F1 * fact;
FF2 = F2 * fact;
FF3 = F3 * fact;
}
// output the setup information for the particle database
void a1ThreePionCLEODecayer::dataBaseOutput(ofstream & output,
bool header) const {
if(header) output << "update decayers set parameters=\"";
// parameters for the DecayIntegrator base class
DecayIntegrator::dataBaseOutput(output,false);
// masses and widths of the intermediate particles
output << "newdef " << name() << ":f_2Mass " << _f2mass/GeV << "\n";
output << "newdef " << name() << ":f_2Width " << _f2width/GeV << "\n";
output << "newdef " << name() << ":f_0Mass " << _f0mass/GeV << "\n";
output << "newdef " << name() << ":f_0Width " << _f0width/GeV << "\n";
output << "newdef " << name() << ":sigmaMass " << _sigmamass/GeV << "\n";
output << "newdef " << name() << ":sigmaWidth " << _sigmawidth/GeV << "\n";
for(unsigned int ix=0;ix<_rhomass.size();++ix) {
if(ix<2) output << "newdef " << name() << ":RhoMasses " << ix << " "
<< _rhomass[ix]/GeV << "\n";
else output << "insert " << name() << ":RhoMasses " << ix << " "
<< _rhomass[ix]/GeV << "\n";
}
for(unsigned int ix=0;ix<_rhowidth.size();++ix) {
if(ix<2) output << "newdef " << name() << ":RhoWidths " << ix << " "
<< _rhowidth[ix]/GeV << "\n";
else output << "insert " << name() << ":RhoWidths " << ix << " "
<< _rhowidth[ix]/GeV << "\n";
}
// couplings and phases for different channels
output << "newdef " << name() << ":f0Phase " << _f0phase << "\n";
output << "newdef " << name() << ":f2Phase " << _f2phase<< "\n";
output << "newdef " << name() << ":sigmaPhase " << _sigmaphase<< "\n";
output << "newdef " << name() << ":f0Magnitude " << _f0mag<< "\n";
output << "newdef " << name() << ":f2Magnitude " << _f2mag*GeV2 << "\n";
output << "newdef " << name() << ":sigmaMagnitude " << _sigmamag << "\n";
output << "newdef " << name() << ":Coupling " << _coupling*GeV << "\n";
for(unsigned int ix=0;ix<_rhomagP.size();++ix) {
if(ix<2) output << "newdef " << name() << ":RhoPWaveMagnitude " << ix << " "
<< _rhomagP[ix] << "\n";
else output << "insert " << name() << ":RhoPWaveMagnitude " << ix << " "
<< _rhomagP[ix] << "\n";
}
for(unsigned int ix=0;ix<_rhophaseP.size();++ix) {
if(ix<2) output << "newdef " << name() << ":RhoPWavePhase " << ix << " "
<< _rhophaseP[ix] << "\n";
else output << "insert " << name() << ":RhoPWavePhase " << ix << " "
<< _rhophaseP[ix] << "\n";
}
for(unsigned int ix=0;ix<_rhomagD.size();++ix) {
if(ix<2) output << "newdef " << name() << ":RhoDWaveMagnitude " << ix << " "
<< _rhomagD[ix]*MeV2 << "\n";
else output << "insert " << name() << ":RhoDWaveMagnitude " << ix << " "
<< _rhomagD[ix]*MeV2 << "\n";
}
for(unsigned int ix=0;ix<_rhophaseD.size();++ix) {
if(ix<2) output << "newdef " << name() << ":RhoDWavePhase " << ix << " "
<< _rhophaseD[ix] << "\n";
else output << "insert " << name() << ":RhoDWavePhase " << ix << " "
<< _rhophaseD[ix] << "\n";
}
// use local values of the masses etc.
output << "newdef " << name() << ":LocalParameters " << _localparameters << "\n";
// integration weights for the different channels
for(unsigned int ix=0;ix<_zerowgts.size();++ix) {
output << "newdef " << name() << ":AllNeutralWeights "
<< ix << " " << _zerowgts[ix] << "\n";
}
for(unsigned int ix=0;ix<_onewgts.size();++ix) {
output << "newdef " << name() << ":OneChargedWeights "
<< ix << " " << _onewgts[ix] << "\n";
}
for(unsigned int ix=0;ix<_twowgts.size();++ix) {
output << "newdef " << name() << ":TwoChargedWeights "
<< ix << " " << _twowgts[ix] << "\n";
}
for(unsigned int ix=0;ix<_threewgts.size();++ix) {
output << "newdef " << name() << ":ThreeChargedWeights "
<< ix << " " << _threewgts[ix] << "\n";
}
// maximum weights for the different channels
output << "newdef " << name() << ":ZeroMax " << _zeromax << "\n";
output << "newdef " << name() << ":OneMax " << _onemax << "\n";
output << "newdef " << name() << ":TwoMax " << _twomax << "\n";
output << "newdef " << name() << ":ThreeMax " << _threemax << "\n";
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
diff --git a/Decay/VectorMeson/a1ThreePionCLEODecayer.h b/Decay/VectorMeson/a1ThreePionCLEODecayer.h
--- a/Decay/VectorMeson/a1ThreePionCLEODecayer.h
+++ b/Decay/VectorMeson/a1ThreePionCLEODecayer.h
@@ -1,604 +1,604 @@
// -*- C++ -*-
//
// a1ThreePionCLEODecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_a1ThreePionCLEODecayer_H
#define HERWIG_a1ThreePionCLEODecayer_H
//
// This is the declaration of the a1ThreePionCLEODecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>a1ThreePionCLEODecayer</code> class is designed to implement the decay
* of the \f$a_1\f$ to three pions using the model of Phys.Rev.D61:012002,2000,
* (hep-ex/9902022) (CLEO) which was fitted to the one charged and two neutral pion
* channel for the charged \f$a_1\f$ decay in \f$\tau \to a_1 -> \pi\pi\pi\f$.
* The other modes are infered from this using isospin. This is a sophisticated model
* including the coupling of the \f$a_1\f$ to the \f$\rho\f$, \f$\rho(1450)\f$,
* \f$f(1370)\f$ and \f$\sigma\f$ sigma mesons.
*
* In this case the current is given by
* \f[\mathcal{M} = \epsilon_\mu
* \left[F_1(p_2-p_3)^\mu+F_2(p_3-p_1)^\mu+F_3(p_1-p_2)^\mu\right].\f]
*
*
* The form factors for the \f$a_1^0 \to \pi^0 \pi^0 \pi^0\f$ mode are
* \f[F_1=
* \phantom{-}\frac23\left(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3)\right)
* -\frac23\left(g_\sigma B^S_\sigma(s_2)+g_{f_0}B^S_{f_0}(s_2)\right)
* +g_{f_2}\left(\frac12(s_3-s_2)B^D_{f_2}(s_1)
* -\frac1{18}\frac{(4m_{\pi^0}^2-s_2)(q^2+s_2-m_{\pi^0}^2)}{s_2}B^D_{f_2}(s_2)
* +\frac1{18}\frac{(4m_{\pi^0}^2-s_3)(q^2-m_{\pi^0}^2+s_3)}{s_3}B^D_{f_2}(s_3)\right)
*\f]
*
* \f[F_2=\phantom{-}\frac23(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3))
* -\frac23(g_\sigma B^S_\sigma(s_1)+g_{f_0}B^S_{f_0}(s_1))
* +g_{f_2}\left( \frac12(s_3-s1)B^D_{f_2}(s_2)
* -\frac1{18}\frac{(4m_{\pi^0}^2-s_1)(q^2+s_1-m_{\pi^0}^2)}{s_1}B^D_{f_2}(s_1)
* +\frac1{18}\frac{(4m_{\pi^0}^2-s_3)(q^2-m_{\pi^0}^2+s_3)}{s_3}B^D_{f_2}(s_3)\right)
*\f]
* \f[F_3=-\frac23(g_\sigma B^S_\sigma(s_1)+g_{f_0}B^S_{f_0}(s_1))
* +\frac23(g_\sigma B^S_\sigma(s_2)+g_{f_0}B^S_{f_0}(s_2))
* +g_{f_2}\left( \frac12(s_1-s_2)B^D_{f_2}(s_3)
* -\frac1{18}\frac{(4m_{\pi^0}^2-s_1)(q^2+s_1-m_{\pi^0}^2)}{s_1}B^D_{f_2}(s_1)
* +\frac1{18}\frac{(4m_{\pi^0}^2-s_2)(q^2+s_2-m_{\pi^0}^2)}{s_2}B^D_{f_2}(s_2)\right)
*\f]
*
* The form factors for the \f$a_1^+ \to \pi^0 \pi^0 \pi^+\f$ mode are
*
* \f[F_1=\sum_k\left\{-\frac{g^P_{\rho_k}}3B_{\rho_k}^P(s_1)
* -g^D_{\rho_k}B_{\rho_k}^P(s_2)
* \left((s_3-m_{\pi^+}^2)-(s_1-m_{\pi^0}^2)\right)\right\}
* +\frac23\left(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3)\right)
* +\frac{g_{f_2}}{18s_3}(q^2-m_{\pi^+}^2+s_3)(4m_{\pi^0}^2-s_3)B^D_{f_2}(s_3)
*\f]
*
* \f[F_2=\sum_k\left\{-\frac13g^P_{\rho_k}B_{\rho_k}^P(s_2)
* -g^D_{\rho_k}B_{\rho_k}^P(s_1)
* \left((s_3-m_{\pi^+}^2)-(s_2-m_{\pi^0}^2)\right)\right\}
* +\frac23\left(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3)\right)
* +\frac1{18s_3}g_{f_2}(q^2-m_{\pi^+}^2+s_3)(4m_{\pi^0}^2-s_3)B^D_{f_2}(s_3)
*\f]
*
* \f[F_3=\sum_k g^D_{\rho_k}\left\{
* -\frac13B_{\rho_k}^P(s_1)\left((s_3-m_{\pi^+}^2)-(s_2-m_{\pi^0}^2)\right)
* +\frac13B_{\rho_k}^P(s_2)\left((s_3-m_{\pi^+}^2)-(s_1-m_{\pi^0}^2)\right)\right\}
* -\frac{g_{f_2}}2(s_1-s_2)B^D_{f_2}(s_3)\f]
*
* The form factors for \f$a_1^0\to\pi^+\pi^-\pi^0\f$.
*
* \f[F_1=\sum_k\left\{g^P_{\rho_k}B_{\rho_k}^P(s_1)
* -\frac{g^D_{\rho_k}}3B_{\rho_k}^P(s_2)(s_3-m_{\pi^0}^2-s_1+m_{\pi^+}^2)\right\}
* +\frac23\left(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3)\right)
* +\frac{g_{f_2}}{18s_3}(q^2-m_{\pi^0}^2+s_3)(4m_{\pi^+}^2-s_3)B^D_{f_2}(s_3)\f]
*
* \f[F_2=\sum_k\left\{g^P_{\rho_k}B_{\rho_k}^P(s_2)
* -\frac{g^D_{\rho_k}}3B_{\rho_k}^P(s_1)(s_3-m_{\pi^0}^2-s_2+m_{\pi^+}^2)\right\}
* +\frac23\left(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3)\right)
* +\frac{g_{f_2}}{18s_3}(q^2-m_{\pi^0}^2+s_3)(4m_{\pi^+}^2-s_3)B^D_{f_2}(s_3)\f]
*
* \f[F_3=\sum_k
* g^D_{\rho_k}\left\{-\frac13B_{\rho_k}^P(s_1)(s_3-m_{\pi^0}^2-s_2+m_{\pi^+}^2)
* +\frac13B_{\rho_k}^P(s_2)(s_3-m_{\pi^0}^2-s_1+m_{\pi^+}^2)
* \right\}
* -\frac{g_{f_2}}2(s_1-s_2)B^D_{f_2}(s_3)\f]
*
* The form factors for \f$a_1^+\to \pi^+ \pi^+ \pi^-\f$ mode
*
* \f[F_1=\sum_k\left\{-g^P_{\rho_k}B_{\rho_k}^P(s_1)
* -\frac{g^D_{\rho_k}}3B_{\rho_k}^P(s_2)(s_1-s_3)\right\}
* -\frac23\left(g_\sigma B^S_\sigma(s_2)+g_{f_0} B^S_{f_0}(s_2)\right)
* +g_{f_2}\left(\frac12(s_3-s_2)B^D_{f_2}(s_1)
* -\frac1{18s_2}(4m_{\pi^+}^2-s_2)(q^2+s_2-m_{\pi^+}^2)B^D_{f_2}(s_2)\right)\f]
*
* \f[F_2=\sum_k\left\{-g^P_{\rho_k}B_{\rho_k}^P(s_2)
* -\frac{g^D_{\rho_k}}3B_{\rho_k}^P(s_1)(s_2-s_3)\right\}
* -\frac23\left(g_\sigma B^S_\sigma(s_1)+g_{f_0} B^S_{f_0}(s_1)\right)
* +g_{f_2}\left(\frac12(s_3-s_1)B^D_{f_2}(s_2)
* -\frac1{18s_1}(4m_{\pi^+}^2-s_1)(q^2+s_1-m_{\pi^+}^2)B^D_{f_2}(s_1)\right)\f]
*
* \f[F_3=\sum_k
* -g^D_{\rho_k}\left( \frac13(s_2-s_3)B_{\rho_k}^P(s_1)
* -\frac13(s_1-s_3)B_{\rho_k}^P(s_2)\right)
* -\frac23\left(g_\sigma B^S_\sigma(s_1)+g_{f_0}B^S_{f_0}(s_1)\right)
* +\frac23\left(g_\sigma B^S_\sigma(s_2)+g_{f_0}B^S_{f_0}(s_2)\right)\f]
*\f[
* +g_{f_2}\left(-\frac1{18s_1}(4m_{\pi^+}^2-s_1)(q^2+s_1-m_{\pi^+}^2)B^D_{f_2}(s_1)
* +\frac1{18s_2}(4m_{\pi^+}^2-s_2)(q^2+s_2-m_{\pi^+}^2)B^D_{f_2}(s_2)\right)\f]
*
* where
*
* - \f$g_{f_2}\f$ is the coupling of the \f$f_2\f$ to the \f$a_1\f$
* - \f$g_{f_0}\f$ is the coupling of the \f$f_0(1370)\f$ to the \f$a_1\f$
* - \f$g_{\sigma}\f$ is the coupling of the \f$\sigma\f$ to the \f$a_1\f$
* - \f$g^P_{\rho_k}\f$ is the \f$p\f$-wave coupling of the \f$\rho_k\f$ multiplet
* to the \f$a_1\f$.
* - \f$g^D_{\rho_k}\f$ is the \f$d\f$-wave coupling of the \f$\rho_k\f$ multiplet
* to the \f$a_1\f$.
* - \f$s_3=m^2_{12}\f$ is the invariant mass squared of particles 1 and 2.
* - \f$s_2=m^2_{13}\f$ is the invariant mass squared of particles 1 and 3.
* - \f$s_1=m^2_{23}\f$ is the invariant mass squared of particles 2 and 3.
*
* The Breit-Wigner factors are given by
\f$B^L_Y(s_i) = \frac{m^2_Y}{m^2_Y-s_i)+im_Y\Gamma^{Y,L}(s_i)}\f$
* where
* \f$\Gamma^{Y,L}(s_i) = \Gamma^Y\left(\frac{p(s_i)}{p(M_Y}\right)^{2L+1}\frac{m_Y}{\sqrt{s_i}}\f$
* \f$m_Y\f$ and \f$\Gamma^Y\f$ are the mass and width of the particle \f$Y\f$
* respectively. \f$p(s_i)\f$ is the momentum of the outgoing pion in the
* rest frame of the resonanc \f$Y\f$.
*
* @see ThreePionCLEOCurrent
* @see DecayIntegrator
*
*/
class a1ThreePionCLEODecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
a1ThreePionCLEODecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode , const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- a1ThreePionCLEODecayer & operator=(const a1ThreePionCLEODecayer &);
+ a1ThreePionCLEODecayer & operator=(const a1ThreePionCLEODecayer &) = delete;
private:
/**
* Breit wigner for the \f$\rho\f$, \f$B^P_{\rho_k}(q^2)\f$.
* @param ires The \f$\rho\f$ multiplet to used.
* @param q2 The scale, \f$q^2\f$.
* @param icharge Which pion masses to use for the momentum calculation
* @return The Breit-Wigner
*/
Complex rhoBreitWigner(int ires, Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
Complex ii(0.,1.);
double ratio = icharge==0 ?
Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_prhocc[ires] :
Kinematics::pstarTwoBodyDecay(q,_mpic,_mpi0)/_prhoc0[ires];
Energy gamrun=_rhowidth[ires]*pow(ratio,3)*_rhomass[ires]/q;
return sqr(_rhomass[ires])
/(sqr(_rhomass[ires])-q2-ii*_rhomass[ires]*gamrun);
}
/**
* Breit wigner for the \f$\sigma\f$, \f$B^S_\sigma(q^2)\f$.
* @param q2 The scale, \f$q^2\f$.
* @param icharge Which pion masses to use for the momentum calculation
* @return The Breit-Wigner
*/
Complex sigmaBreitWigner(Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
Complex ii(0.,1.);
double ratio = icharge==0 ?
Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_psigmacc :
Kinematics::pstarTwoBodyDecay(q,_mpi0,_mpi0)/_psigma00;
Energy gamrun=_sigmawidth*ratio*_sigmamass/q;
return sqr(_sigmamass)/(sqr(_sigmamass)-q2-ii*_sigmamass*gamrun);
}
/**
* Breit wigner for the \f$f_0(1370)\f$, \f$B^S_{f_0}(q^2)\f$.
* @param q2 The scale, \f$q^2\f$.
* @param icharge Which pion masses to use for the momentum calculation
* @return The Breit-Wigner
*/
Complex f0BreitWigner(Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
Complex ii(0.,1.);
double ratio = icharge==0 ?
Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_pf0cc :
Kinematics::pstarTwoBodyDecay(q,_mpi0,_mpi0)/_pf000;
Energy gamrun=_f0width*ratio*_f0mass/q;
return sqr(_f0mass)/(sqr(_f0mass)-q2-ii*_f0mass*gamrun);
}
/**
* Breit wigner for the \f$f_2\f$, \f$B^D_{f_2}(q^2)\f$.
* @param q2 The scale, \f$q^2\f$.
* @param icharge Which pion masses to use for the momentum calculation
* @return The Breit-Wigner
*/
Complex f2BreitWigner(Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
Complex ii(0.,1.);
double ratio = icharge==0 ?
Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_pf2cc :
Kinematics::pstarTwoBodyDecay(q,_mpi0,_mpi0)/_pf200;
Energy gamrun=_f2width*pow(ratio,5)*_f2mass/q;
return sqr(_f2mass)/(sqr(_f2mass)-q2-ii*_f2mass*gamrun);
}
/**
* Calculate the form factors
* @param iopt The mode being calculated in the order given above
* @param ichan The phase space channel in the order given in the doinit member.
* @param q2 The sacale \f$q^2\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param F1 The form factor \f$F_1\f$.
* @param F2 The form factor \f$F_2\f$.
* @param F3 The form factor \f$F_3\f$.
*
*/
void formFactors(int iopt,int ichan,Energy2 q2,Energy2 s1,Energy2 s2,
Energy2 s3,
complex<InvEnergy> & F1,
complex<InvEnergy> & F2,
complex<InvEnergy> & F3) const;
private:
/**
* Masses of the rho resonaces
*/
vector<Energy> _rhomass;
/**
* Widths of the rho resonaces
*/
vector<Energy> _rhowidth;
/**
* Momentum of the particles produced in charged rho decay
*/
vector<Energy> _prhocc;
/**
* Momentum of the particles produced in neutral rho decay
*/
vector<Energy> _prhoc0;
/**
* Mass of the \f$f_2\f$.
*/
Energy _f2mass;
/**
* Width of the \f$f_2\f$.
*/
Energy _f2width;
/**
* Momentum for the decay of the \f$f_2\f$ to two charged pions.
*/
Energy _pf2cc;
/**
* Momentum for the decay of the \f$f_2\f$ to two neutral pions.
*/
Energy _pf200;
/**
* Mass of the \f$f_0(1370)\f$.
*/
Energy _f0mass;
/**
* Width of the \f$f_0(1370)\f$.
*/
Energy _f0width;
/**
* Momentum for the decay of the \f$f_0(1370)\f$ to two charged pions.
*/
Energy _pf0cc;
/**
* Momentum for the decay of the \f$f_0(1370)\f$ to two neutral pions.
*/
Energy _pf000;
/**
* Mass of the \f$\sigma\f$ meson.
*/
Energy _sigmamass;
/**
* Width of the \f$\sigma\f$ meson.
*/
Energy _sigmawidth;
/**
* Momentum for the decay of the \f$\sigma\f$ to two charged pions.
*/
Energy _psigmacc;
/**
* Momentum for the decay of the \f$\sigma\f$ to two neutral pions.
*/
Energy _psigma00;
/**
* Mass of the neutral pion
*/
Energy _mpi0;
/**
* Mass of the charged pion
*/
Energy _mpic;
/**
* overall coupling for the decay
*/
InvEnergy _coupling;
/**
* Magnitude of the \f$p\f$-wave couplings of the rho resonance, \f$g^P_{\rho_k}\f$,
* (\f$\beta_{1,2}\f$ in the CLEO paper.)
*/
vector<double> _rhomagP;
/**
* Phase of the \f$p\f$-wave couplings of the rho resonance, \f$g^P_{\rho_k}\f$,
* (\f$\beta_{1,2}\f$ in the CLEO paper.)
*/
vector<double> _rhophaseP;
/**
*\f$p\f$-wave couplings of the rho resonance, \f$g^P_{\rho_k}\f$,
* (\f$\beta_{1,2}\f$ in the CLEO paper.)
*/
vector<Complex> _rhocoupP;
/**
* Magnitude of the \f$d\f$-wave couplings of the rho resonance, \f$g^D_{\rho_k}\f$,
* (\f$\beta_{3,4}\f$ in the CLEO paper.)
*/
vector<InvEnergy2> _rhomagD;
/**
* Phase of the \f$d\f$-wave couplings of the rho resonance, \f$g^D_{\rho_k}\f$,
* (\f$\beta_{3,4}\f$ in the CLEO paper.)
*/
vector<double>_rhophaseD;
/**
* \f$d\f$-wave couplings of the rho resonance, \f$g^D_{\rho_k}\f$,
* (\f$\beta_{3,4}\f$ in the CLEO paper.)
*/
vector<complex<InvEnergy2> > _rhocoupD;
/**
* Magntiude of the coupling of the \f$f_2\f$ resonance, \f$g_{f_2}\f$,
* (\f$\beta_5\f$ in the CLEO paper.)
*/
InvEnergy2 _f2mag;
/**
* Phase of the coupling of the \f$f_2\f$ resonance, \f$g_{f_2}\f$,
* (\f$\beta_5\f$ in the CLEO paper.)
*/
double _f2phase;
/**
* Coupling of the \f$f_2\f$ resonance, \f$g_{f_2}\f$,
* (\f$\beta_5\f$ in the CLEO paper.)
*/
complex<InvEnergy2> _f2coup;
/**
* Magntiude of the coupling of the \f$f_0(1370)\f$ resonance, \f$g_{f_0}\f$,
* (\f$\beta_6\f$ in the CLEO paper.)
*/
double _f0mag;
/**
* Phase of the coupling of the \f$f_0(1370)\f$ resonance, \f$g_{f_0}\f$,
* (\f$\beta_6\f$ in the CLEO paper.)
*/
double _f0phase;
/**
* Coupling of the \f$f_0(1370)\f$ resonance, \f$g_{f_0}\f$,
* (\f$\beta_6\f$ in the CLEO paper.)
*/
Complex _f0coup;
/**
* Magntiude of the coupling of the \f$\sigma\f$ resonance, \f$g_\sigma\f$,
* (\f$\beta_7\f$ in the CLEO paper.)
*/
double _sigmamag;
/**
* Phase of the coupling of the \f$\sigma\f$ resonance, \f$g_\sigma\f$,
* (\f$\beta_7\f$ in the CLEO paper.)
*/
double _sigmaphase;
/**
* Coupling of the \f$\sigma\f$ resonance, \f$g_\sigma\f$,
* (\f$\beta_7\f$ in the CLEO paper.)
*/
Complex _sigmacoup;
/**
* Use local values of the mass parameters
*/
bool _localparameters;
/**
* Weights for the channels for the zero charged pion channel.
*/
mutable vector<double> _zerowgts;
/**
* Weights for the channels for the one charged pion channel.
*/
mutable vector<double> _onewgts;
/**
* Weights for the channels for the two charged pion channel.
*/
mutable vector<double> _twowgts;
/**
* Weights for the channels for the three charged pion channel.
*/
mutable vector<double> _threewgts;
/**
* Maximum weight for the zero charged pion channel.
*/
mutable double _zeromax;
/**
* Maximum weight for the one charged pion channel.
*/
mutable double _onemax;
/**
* Maximum weight for the two charged pion channel.
*/
mutable double _twomax;
/**
* Maximum weight for the three charged pion channel.
*/
mutable double _threemax;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
};
}
#endif /* HERWIG_a1ThreePionCLEODecayer_H */
diff --git a/Decay/VectorMeson/a1ThreePionDecayer.h b/Decay/VectorMeson/a1ThreePionDecayer.h
--- a/Decay/VectorMeson/a1ThreePionDecayer.h
+++ b/Decay/VectorMeson/a1ThreePionDecayer.h
@@ -1,490 +1,490 @@
// -*- C++ -*-
//
// a1ThreePionDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_a1ThreePionDecayer_H
#define HERWIG_a1ThreePionDecayer_H
//
// This is the declaration of the a1ThreePionDecayer class.
//
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>a1ThreePionDecayer</code> class is designed to implement the decay
* of the a_1 to three pions. The model used is one based on the Novosibirsk
* four pion current used in TAUOLA.
*
* - The matrix element for the decay \f$a_1^0\to\pi^0\pi^0\pi^0\f$ is
*
* \f[J^\mu =\frac{F_{a_1}(q^2)g}{qM^2_{\rho_0}}\epsilon_\mu\left[
* q^2z \sum_i p^\mu_i \frac1{D_\sigma(s_i)}\right]\f]
*
* - The matrix element for the decay \f$a_1^+\to\pi^0\pi^0\pi^+\f$ is
*
* \f[J^\mu =\frac{F_{a_1}(q^2)g}{qM^2_{\rho_0}}\epsilon_\mu\left[
* q^2z\frac1{D_\sigma(s_3)} p_3^\mu
* +\sum_k g_{\rho_k}\left\{
* \frac1{D_{\rho_k}(s_1)}\left(p_0\cdot p_3p_2^\mu-p_0\cdot p_2p_3^\mu\right)
* +\frac1{D_{\rho_k}(s_2)}\left(p_0\cdot p_3p_1^\mu-p_0\cdot p_1p_3^\mu\right) \right\}
* \right]\f]
*
* - The matrix element for the decay \f$a_10\to\pi^+\pi^-\pi^0\f$ is
*
* \f[J^\mu =\frac{F_{a_1}(q^2)g}{qM^2_{\rho_0}}\left[
* q^2z\frac1{D_\sigma(s_3)}p_3^\mu
* +\sum_k g_{\rho_k}\left\{
* \frac1{D_{\rho_k}(s_1)}\left(p_0\cdot p_3p_2^\mu-p_0\cdot p_2p_3^\mu\right)
* +\frac1{D_{\rho_k}(s_2)}\left(p_0\cdot p_3p_1^\mu-p_0\cdot p_1p_3^\mu\right)\right\}
* \right]\f]
*
* - The current for the decay \f$a_1^+\to\pi^+\pi^+\pi^-\f$ is
*
* \f[J^\mu = \frac{F_{a_1}(q^2)g}{qM^2_{\rho_0}}\left[
* q^2z\left(\frac1{D_\sigma(s_1)}p_1^\mu+\frac1{D_\sigma(s_2)}p_2^\mu\right)
* -\sum_k g_{\rho_k}\left\{
* \frac1{D_{\rho_k}(s_1)}\left(p_0\cdot p_3p_2^\mu-p_0\cdot p_2p_3^\mu\right)
* +\frac1{D_{\rho_k}(s_2)}\left(p_0\cdot p_3p_1^\mu-p_0\cdot p_1p_3^\mu\right)\right\}
* \right]\f]
*
* * The denominator factor is
* \f[D_\sigma(q^2) = q^2-M^2+iM\Gamma\frac{g_\sigma(q^2)}{g_\sigma(M^2)}\f]
* where \f$g(s) = \left(1-4\frac{m_{\pi}^2}{s}\right)\f$ for the \f$\sigma\f$ meson,
* and
* \f[D_{\rho_k}(q^2) = q^2-M^2_{\rho_k}-M_{\rho_k}\Gamma_{\rho_k}dm(q^2)
* +iM_{\rho_k}\Gamma_{\rho_k}\frac{g_{\rho_k}(q^2)}{g_{\rho_k}(M^2)}
* \f]
* for the \f$\rho\f$.
*
* The propagator factors are normalized such that \f$D(0)=-1\f$.
*
* Here
* \f[dm(q^2) = \frac1{g_{\rho_k}(M^2_{\rho_k}}\left(h_{\rho_k}(q^2)-h_{\rho_k}(M^2_{\rho_k}
* -\left.(q^2-M^2_{\rho_k})\frac{dh_{\rho_k}(q^2)}{dq^2}\right|_{q^2=M^2_{\rho_k}}
* \right)\f]
* where
* \f[h_{\rho_k}(q^2) =
* \left\{ \begin{array}{cc}
* \frac{\sqrt{1-\frac{4m_\pi^2}{q^2}}\ln\left(\frac{1+\sqrt{1-\frac{4m_\pi^2}{q^2}}}{1-\sqrt{1-\frac{4m_\pi^2}{q^2}}}\right)(q^2-4m_\pi^2)}\pi & {\rm for\ } q^2>4m_\pi^2 \\
* -8\frac{m_\pi^2}{\pi} & {\rm for\ } q^2=0\,{\rm GeV^2} \\
* 0 & {\rm otherwise}
* \end{array}\right.\f]
*
* The \f$a_1\f$ form factor for the off-shell \f$a_1\f$ is given by
* \f[F_{a_1}(q^2) = \frac{\left(1+m^2_{a_1}/\Lambda^2\right)}
* {\left(1+ q^2/\Lambda^2\right)}.\f]
*
* The masses and couplings are
* - \f$z\f$ is the relative coupling of the \f$\sigma\f$.
* - \f$m_\pi\f$ is the mass of the pion.
* - \f$g_{\rho_k}\f$ is the coupling of the \f$k\f$th \f$\rho\f$ multiplet.
* - \f$M_{\rho_k}\f$ the mass of the \f$k\f$th \f$\rho\f$ resonance.
* - \f$\Gamma_{\rho_k}\f$ the width of the \f$k\f$th \f$\rho\f$ resonance.
* - \f$M_\sigma\f$ the mass of the \f$\sigma\f$ meson.
* - \f$\Gamma_\sigma\f$ the width of the \f$\sigma\f$ meson.
* - \f$m_{a_1}\f$ the mass of the \f$a_1\f$ meson.
* - \f$\Lambda^2\f$ the mass parameter for the \f$a_1\f$ form factor.
* @see FourPionNovosibirskCurrent
* @see DecayIntegrator
*
*/
class a1ThreePionDecayer: public DecayIntegrator {
public:
/**
* Default constructor.
*/
a1ThreePionDecayer();
/**
* Which of the possible decays is required
* @param cc Is this mode the charge conjugate
* @param parent The decaying particle
* @param children The decay products
*/
virtual int modeNumber(bool & cc, tcPDPtr parent,
const tPDVector & children) const;
/**
* Return the matrix element squared for a given mode and phase-space channel.
* @param ichan The channel we are calculating the matrix element for.
* @param part The decaying Particle.
* @param decay The particles produced in the decay.
* @param meopt Option for the calculation of the matrix element
* @return The matrix element squared for the phase-space configuration.
*/
double me2(const int ichan,const Particle & part,
const ParticleVector & decay, MEOption meopt) const;
/**
* Method to return an object to calculate the 3 body partial width.
* @param dm The DecayMode
* @return A pointer to a WidthCalculatorBase object capable of calculating the width
*/
virtual WidthCalculatorBasePtr threeBodyMEIntegrator(const DecayMode & dm) const;
/**
* The matrix element to be integrated for the three-body decays as a function
* of the invariant masses of pairs of the outgoing particles.
* @param imode The mode for which the matrix element is needed.
* @param q2 The scale, \e i.e. the mass squared of the decaying particle.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element
*/
virtual double threeBodyMatrixElement(const int imode , const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
*/
virtual void dataBaseOutput(ofstream & os,bool header) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- a1ThreePionDecayer & operator=(const a1ThreePionDecayer &);
+ a1ThreePionDecayer & operator=(const a1ThreePionDecayer &) = delete;
private:
/**
* Breit-wigner for the \f$\sigma\f$, this is \f$\frac1{D_\sigma(q^2)}\f$.
* @param q2 The scale, \f$q^2\f$.
* @return The Breit-Wigner
*/
Complex sigmaBreitWigner(Energy2 q2) const {
Energy q=sqrt(q2);
Energy width=_sigmawidth*Kinematics::pstarTwoBodyDecay(q,_mpi,_mpi)/_psigma;
Energy2 msigma2=_sigmamass*_sigmamass;
Complex ii(0.,1.);
complex<Energy2> denom = q>2.*_mpi ? q2-msigma2+ii*msigma2*width/q :
q2-msigma2;
return msigma2/denom;
}
/**
* The \f$a_1\f$ form factor, \f$F_{a_1}(q^2)\f$
* @param q2 The scale, \f$q^2\f$.
* @return The form factor.
*/
double a1FormFactor(Energy2 q2) const {
return (1.+_a1mass2/_lambda2)/(1.+q2/_lambda2);
}
/**
* Breit-Wigner for the \f$\rho\f$, this is \f$\frac1{D_{\rho_k}(q^2)}\f$.
* @param q2 The scale, \f$q^2\f$.
* @param ires The \f$\rho\f$ multiplet.
* @return The Breit-Wigner
*/
Complex rhoBreitWigner(Energy2 q2,int ires) const {
Energy q=sqrt(q2);
Energy2 grhom = 8.*_prho[ires]*_prho[ires]*_prho[ires]/_rhomass[ires];
complex<Energy2> denom;
Complex ii(0.,1.);
if(q2<4.*_mpi2) {
denom=q2-_rhomass[ires]*_rhomass[ires]-_rhowidth[ires]*_rhomass[ires]*
(hFunction(q)-_hm2[ires]-(q2-_rhomass[ires]*_rhomass[ires])*_dhdq2m2[ires])
/grhom;
}
else {
Energy pcm=2.*Kinematics::pstarTwoBodyDecay(q,_mpi,_mpi);
Energy2 grho = pcm*pcm*pcm/q;
denom=q2-_rhomass[ires]*_rhomass[ires]
-_rhowidth[ires]*_rhomass[ires]*
(hFunction(q)-_hm2[ires]-(q2-_rhomass[ires]*_rhomass[ires])*_dhdq2m2[ires])/grhom
+ii*_rhomass[ires]*_rhowidth[ires]*grho/grhom;
}
return _rhoD[ires]/denom;
}
/**
* Normalisation factor for the \f$\rho\f$ propagator to ensure \f$D(0)=-1\f$.
* @param ires The \f$\rho\f$ multiplet.
* @return The normalisation factor.
*/
Energy2 DParameter(int ires) const {
Energy2 grhom = 8.*_prho[ires]*_prho[ires]*_prho[ires]/_rhomass[ires];
return _rhomass[ires]*_rhomass[ires]+_rhowidth[ires]*_rhomass[ires]*
(hFunction(ZERO)-_hm2[ires]+sqr(_rhomass[ires])*_dhdq2m2[ires])/grhom;
}
/**
* The \f$\frac{dh}{dq^2}\f$ function in the rho propagator evaluated at \f$q^2=m^2\f$.
* @param ires The \f$\rho\f$ resonance for the function
* @return \f$\frac{dh}{dq^2}\f$ evaluated at \f$q^2=m^2\f$.
*/
double dhdq2Parameter(int ires) const {
Energy2 mrho2(sqr(_rhomass[ires]));
double root = sqrt(1.-4.*_mpi2/mrho2);
using Constants::pi;
return root/pi*(root+(1.+2*_mpi2/mrho2)*log((1+root)/(1-root)));
}
/**
* The \f$h(q^2)\f$ function in the \f$\rho\f$ propagator.
* @param q The scale, \f$q\f$.
* @return The function \f$h(q^2)\f$.
*/
Energy2 hFunction(const Energy q) const {
static const Energy2 eps(0.01*MeV2);
Energy2 q2=sqr(q), output;
double root = sqrt(1.-4.*_mpi2/q2);
if(q2>4*_mpi2) {
output=root*log((1.+root)/(1.-root))*(q2-4*_mpi2)/Constants::pi;
}
else if(q2>eps) output=ZERO;
else output=-8.*_mpi2/Constants::pi;
return output;
}
/**
* Momentum Function
*/
Energy4 lambda(Energy2 a, Energy2 b, Energy2 c) const {
return sqr(a)+sqr(b)+sqr(c)-2.*a*b-2.*a*c-2.*b*c;
}
private:
/**
* Mass of the rho resonances
*/
vector<Energy> _rhomass;
/**
* Width of the rho resonaces
*/
vector<Energy> _rhowidth;
/**
* Momentum of the pions produced in the \f$\rho\f$ decay.
*/
vector<Energy> _prho;
/**
* The function \f$h(q^2)\f$ evaluated at \f$q^2=M^2_{\rho_k}\f$
*/
vector<Energy2> _hm2;
/**
* The normalization factor for the \f$\rho_k\f$ propagator factor.
*/
vector<Energy2> _rhoD;
/**
* The \f$\frac{dh}{dq^2}\f$ function in the rho propagator evaluated at \f$q^2=m^2\f$
* for the different \f$\rho\f$ multiplets.
*/
vector<double> _dhdq2m2;
/**
* The mass of the \f$\sigma\f$ meson.
*/
Energy _sigmamass;
/**
* The width of the \f$\sigma\f$ meson.
*/
Energy _sigmawidth;
/**
* The momenta of the pions produced in the \f$\sigma\f$ meson decay.
*/
Energy _psigma;
/**
* The mass of the pion, \f$m_\pi\f$.
*/
Energy _mpi;
/**
* The mass of the pion, \f$m^2_\pi\f$.
*/
Energy2 _mpi2;
/**
* The \f$\Lambda^2\f$ parameter for the \f$a_1\f$ form factor.
*/
Energy2 _lambda2;
/**
* The mass squared of the \f$a_1\f$ meson, \f$m_{a_1}^2\f$.
*/
Energy2 _a1mass2;
/**
* The \f$z\f$ coupling for the \f$\sigma\f$ resonance.
*/
Complex _zsigma;
/**
* The magnitude of the \f$z\f$ \f$\sigma\f$ coupling.
*/
double _zmag;
/**
* The phase of the \f$z\f$ \f$\sigma\f$ coupling.
*/
double _zphase;
/**
* \f$g_{\rho_k}\f$ is the coupling of the \f$k\f$ th \f$\rho\f$ multiplet.
*/
vector<Complex> _rhocoupling;
/**
* Magnitude of the rho coupling
*/
vector<double> _rhomag;
/**
* Phase of the rho coupling
*/
vector<double> _rhophase;
/**
* The overall coupling for the decay.
*/
double _coupling;
/**
* use local values of the mass parameters
*/
bool _localparameters;
/**
* Weights for the channels for the zero charged pion channel.
*/
mutable vector<double> _zerowgts;
/**
* Weights for the channels for the one charged pion channel.
*/
mutable vector<double> _onewgts;
/**
* Weights for the channels for the two charged pion channel.
*/
mutable vector<double> _twowgts;
/**
* Weights for the channels for the three charged pion channel.
*/
mutable vector<double> _threewgts;
/**
* Maximum weight for the zero charged pion channel.
*/
mutable double _zeromax;
/**
* Maximum weight for the one charged pion channel.
*/
mutable double _onemax;
/**
* Maximum weight for the two charged pion channel.
*/
mutable double _twomax;
/**
* Maximum weight for the three charged pion channel.
*/
mutable double _threemax;
/**
* Spin density matrix
*/
mutable RhoDMatrix _rho;
/**
* Polarization vectors
*/
mutable vector<Helicity::LorentzPolarizationVector> _vectors;
};
}
#endif /* HERWIG_a1ThreePionDecayer_H */
diff --git a/Decay/WeakCurrents/FivePionCurrent.h b/Decay/WeakCurrents/FivePionCurrent.h
--- a/Decay/WeakCurrents/FivePionCurrent.h
+++ b/Decay/WeakCurrents/FivePionCurrent.h
@@ -1,408 +1,408 @@
// -*- C++ -*-
//
// FivePionCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FivePionCurrent_H
#define HERWIG_FivePionCurrent_H
//
// This is the declaration of the FivePionCurrent class.
//
#include "WeakDecayCurrent.h"
#include "ThePEG/Helicity/epsilon.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the FivePionCurrent class.
*
* @see \ref FivePionCurrentInterfaces "The interfaces"
* defined for FivePionCurrent.
*/
class FivePionCurrent: public WeakDecayCurrent {
public:
/**
* The default constructor.
*/
FivePionCurrent();
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.classes inheriting
* from this one.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This method is purely virtual and must be implemented in
* all classes inheriting from this one.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode,const int ichan,Energy & scale,
const ParticleVector & decay, DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay.
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Methods to calculate the Breit-Wigner distributions for the various
* mesons.
*/
//@{
/**
* Breit-Wigner for the \f$\rho\f$.
* @param scale The virtual mass
*/
Complex rhoBreitWigner(Energy2 scale) const {
Energy2 m2=sqr(_rhomass);
return m2/(m2-scale-Complex(0.,1.)*_rhomass*_rhowidth);
}
/**
* Breit-Wigner for the \f$a_1\f$.
* @param scale The virtual mass
*/
Complex a1BreitWigner(Energy2 scale) const {
Energy2 m2=sqr(_a1mass);
return m2/(m2-scale-Complex(0.,1.)*_a1mass*_a1width);
}
/**
* Breit-Wigner for the \f$\omega\f$.
* @param scale The virtual mass
*/
Complex omegaBreitWigner(Energy2 scale) const {
Energy2 m2=sqr(_omegamass);
return m2/(m2-scale-Complex(0.,1.)*_omegamass*_omegawidth);
}
/**
* Breit-Wigner for the \f$\sigma\f$.
* @param scale The virtual mass
*/
Complex sigmaBreitWigner(Energy2 scale) const {
Energy2 m2=sqr(_sigmamass);
return m2/(m2-scale-Complex(0.,1.)*_sigmamass*_sigmawidth);
}
//@}
/**
* Currents for the different channels
*/
//@{
/**
* The \f$\rho\omega\f$ current
* @param iopt Option for the inclusion of \f$\rho\f$ Breit-Wigner terms in the
* \f$\omega\f$ decay piece
* @param Q The total momentum for the current
* @param q1 The first momentum
* @param q2 The first momentum
* @param q3 The first momentum
* @param q4 The first momentum
* @param q5 The first momentum
*/
LorentzVector<complex<InvEnergy2> >
rhoOmegaCurrent(unsigned int iopt,
const Lorentz5Momentum & Q,
const Lorentz5Momentum & q1,
const Lorentz5Momentum & q2,
const Lorentz5Momentum & q3,
const Lorentz5Momentum & q4,
const Lorentz5Momentum & q5) const {
// prefactor
complex<InvEnergy7> pre(_preomega*a1BreitWigner(Q.m2())*
omegaBreitWigner((q1+q2+q3).m2())*
rhoBreitWigner((q4+q5).m2()));
// omega piece
Complex omega(-1.);
if(_rhoomega) {
if(iopt==1) omega=rhoBreitWigner((q2+q3).m2());
else if(iopt==2) omega=rhoBreitWigner((q1+q3).m2());
else if(iopt==3) omega=rhoBreitWigner((q1+q2).m2());
else
omega=rhoBreitWigner((q2+q3).m2())+rhoBreitWigner((q1+q3).m2())+
rhoBreitWigner((q1+q2).m2());
}
LorentzVector<complex<Energy3> > omegacurrent(Helicity::epsilon(q1,q2,q3));
LorentzVector<complex<InvEnergy2> > output =
pre * omega * Helicity::epsilon(q4-q5,omegacurrent,Q);
return output;
}
/**
* The \f$a_1\sigma\f$ current
* @param iopt Option for the inclusion of \f$\rho\f$ Breit-Wigner terms in the
* \f$a_1\f$ decay piece
* @param Q The total momentum for the current
* @param q1 The first momentum
* @param q2 The first momentum
* @param q3 The first momentum
* @param q4 The first momentum
* @param q5 The first momentum
*/
LorentzVector<complex<InvEnergy2> >
a1SigmaCurrent(unsigned int iopt,
const Lorentz5Momentum & Q,
const Lorentz5Momentum & q1,
const Lorentz5Momentum & q2,
const Lorentz5Momentum & q3,
const Lorentz5Momentum & q4,
const Lorentz5Momentum & q5) const {
Lorentz5Momentum pa1(q1+q2+q3);pa1.rescaleMass();
Energy2 ma12(pa1.m2());
complex<InvEnergy3> pre(_presigma*a1BreitWigner(Q.m2())*a1BreitWigner(ma12)*
sigmaBreitWigner((q4+q5).m2()));
Energy2 pdot[2]={q2*(q1-q3),q1*(q2-q3)};
LorentzPolarizationVectorE rho[2] =
{(pdot[0]/ma12*pa1-q1+q3)*rhoBreitWigner((q1+q3).m2()),
(pdot[1]/ma12*pa1-q2+q3)*rhoBreitWigner((q2+q3).m2())};
LorentzPolarizationVectorE total;
if(iopt==1) total = rho[0];
else if(iopt==2) total = rho[1];
else total = rho[0]+rho[1];
Complex qdot = total * Q / Q.m2();
LorentzPolarizationVectorE cq(Q);
cq = cq * qdot;
cq -= total;
return pre * cq;
}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FivePionCurrent & operator=(const FivePionCurrent &);
+ FivePionCurrent & operator=(const FivePionCurrent &) = delete;
private:
/**
* The masses and widths of the intermediate particles
*/
//@{
/**
* The mass of the \f$\rho\f$ for the current.
*/
Energy _rhomass;
/**
* The mass of the \f$a_1\f$ for the current.
*/
Energy _a1mass;
/**
* The mass of the \f$\omega\f$ for the current.
*/
Energy _omegamass;
/**
* The mass of the \f$\sigma\f$ for the current.
*/
Energy _sigmamass;
/**
* The width for the \f$\rho\f$.
*/
Energy _rhowidth;
/**
* The \f$a_1\f$ width
*/
Energy _a1width;
/**
* The \f$\omega\f$ width.
*/
Energy _omegawidth;
/**
* The \f$\sigma\f$ width.
*/
Energy _sigmawidth;
//@}
/**
* use local values of the particle masses
*/
bool _localparameters;
/**
* Option for the treatment of \f$\rho\f$ Breit-Wigners in \f$\omega\f$ decay
*/
bool _rhoomega;
/**
* Normalisation parameters for the different currents
*/
//@{
/**
* The \f$c\f$ parameter
*/
Energy2 _c;
/**
* The \f$c_0\f$ parameter
*/
double _c0;
/**
* The \f$f_{\omega\rho\pi}\f$ parameter
*/
InvEnergy _fomegarhopi;
/**
* The \f$g_{\rho\pi\pi}\f$ parameter
*/
double _grhopipi;
/**
* The \f$G_{a\rho\pi}\f$ parameter
*/
Energy _garhopi;
/**
* The \f$f_{aaf}\f$ parameter
*/
Energy _faaf;
/**
* The \f$f_{f\pi\pi}\f$ parameter
*/
Energy _ffpipi;
//@}
/**
* Values cached to avoid unnessacary calculations
*/
//@{
/**
* Prefactor for the \f$\rho\omega\f$ current
*/
InvEnergy7 _preomega;
/**
* Prefactor for the \f$a_1\sigma\f$ current
*/
InvEnergy3 _presigma;
//@}
};
}
#endif /* HERWIG_FivePionCurrent_H */
diff --git a/Decay/WeakCurrents/FourPionNovosibirskCurrent.h b/Decay/WeakCurrents/FourPionNovosibirskCurrent.h
--- a/Decay/WeakCurrents/FourPionNovosibirskCurrent.h
+++ b/Decay/WeakCurrents/FourPionNovosibirskCurrent.h
@@ -1,570 +1,570 @@
// -*- C++ -*-
//
// FourPionNovosibirskCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FourPionNovosibirskCurrent_H
#define HERWIG_FourPionNovosibirskCurrent_H
//
// This is the declaration of the FourPionNovosibirskCurrent class.
//
#include "WeakDecayCurrent.h"
#include "Herwig/Utilities/Interpolator.h"
#include "Herwig/Utilities/Kinematics.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>FourPionNovosibirskCurrent</code> class implements the decay of the weak
* current to 4 pions using the hadronic currents of
* Comput. Phys. Commun. 146: 139-153, 2002,
* which is a model based on the \f$e^+e^-\to4\pi\f$ data from Novosibirsk.
*
* It should be noted that there were a large number of mistakes in this paper which
* were corrected in hep-ph/0312240.
*
* @see WeakDecayCurrent
* @see FourPionDefaultMatrixElement
*
* \author Peter Richardson
*
*/
class FourPionNovosibirskCurrent: public WeakDecayCurrent {
/**
* The FourPionDefaultMatrixElement class is a friend so it can perform the
* integration.
*/
friend class FourPionDefaultMatrixElement;
public:
/**
* Default constructor
*/
FourPionNovosibirskCurrent();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version constructs the four pion current.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current. This returns the four pions for the
* current.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This version calculates the four pion current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode, const int ichan,Energy & scale,
const ParticleVector & decay, DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks this is one of the four pion modes.
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* Works out which four pion mode this is.
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
/**
* The matrix element to evaluate the \f$a_1\f$ running width.
* @param iopt The mode
* @param q2 The mass of the decaying off-shell \f$a_1\f$, \f$q^2\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element squared summed over spins.
*/
double threeBodyMatrixElement(const int iopt, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
/**
* Check sanity of the object during the setup phase.
*/
virtual void doupdate();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- FourPionNovosibirskCurrent & operator=(const FourPionNovosibirskCurrent &);
+ FourPionNovosibirskCurrent & operator=(const FourPionNovosibirskCurrent &) = delete;
protected:
/**
* Initialize the \f$a_1\f$ width.
* @param iopt Initialization option
* (-1 is full initialization and 0 sets up the interpolator for the running width)
*/
void inita1width(int iopt);
/**
* Form foactor for the \f$a_1\f$ vertex.
* @param q2 The scale \f$q^2\f$.
* @return The \f$a_1\f$ form factor.
*/
double a1FormFactor(Energy2 q2) const {
return sqr((1.+_a1massolam2)/(1.+q2*_onedlam2));
}
/**
* Breit-Wigner for the \f$\sigma\f$ meson
* @param q2 The scale \f$q^2\f$.
* @param iopt The pion masses to used (0=\f$\pi^0\f$, 1=\f$\pi^+\f$)
* @return The Breit-Wigner for the \f$\sigma\f$ meson
*/
Complex sigmaBreitWigner(Energy2 q2,unsigned int iopt) const;
/**
* The \f$a_1\f$ breit wigner.
* @param q2 The scale \f$q^2\f$.
* @return The Breit-Wigner for the \f$a_1\f$.
*/
Complex a1BreitWigner(Energy2 q2) const;
/**
* The Breit-Wigner for the \f$\omega\f$.
* @param q2 The scale \f$q^2\f$.
* @return The Breit-Wigner for the \f$\omega\f$.
*/
Complex omegaBreitWigner(Energy2 q2) const;
/**
* The Breit-Wigner for the \f$\rho\f$.
* @param q2 The scale \f$q^2\f$.
* @return The Breit-Wigner for the \f$\rho\f$.
*/
Complex rhoBreitWigner(Energy2 q2) const;
/**
* Return the \f$a_1\f$ running width.
* @param q2 The scale \f$q^2\f$.
* @return The running width.
*/
Energy a1width(Energy2 q2) const {return (*_a1runinter)(q2);}
/**
* The \f$t_1\f$ current used in calculating the current.
* @param q1 The first momentum.
* @param q2 The first momentum.
* @param q3 The first momentum.
* @param q4 The first momentum.
* @return The current \f$t_1\f$.
*/
LorentzVector<complex<Energy5> >
t1(Lorentz5Momentum & q1,Lorentz5Momentum & q2,
Lorentz5Momentum & q3,Lorentz5Momentum & q4) const;
/**
* The \f$t_2\f$ current used in calculating the current.
* @param q1 The first momentum.
* @param q2 The first momentum.
* @param q3 The first momentum.
* @param q4 The first momentum.
* @param iopt 0 for \f$\sigma\to\pi^+\pi^-\f$ and 1 for \f$\sigma\to\pi^0\pi^0\f$
* @return The current \f$t_2\f$.
*/
LorentzVector<complex<Energy5> >
t2(Lorentz5Momentum & q1,Lorentz5Momentum & q2,
Lorentz5Momentum & q3,Lorentz5Momentum & q4,
unsigned int iopt) const;
/**
* The \f$t_3\f$ current used in calculating the current.
* @param q1 The first momentum.
* @param q2 The first momentum.
* @param q3 The first momentum.
* @param q4 The first momentum.
* @return The current \f$t_3\f$.
*/
LorentzVector<complex<Energy5> >
t3(Lorentz5Momentum & q1,Lorentz5Momentum & q2,
Lorentz5Momentum & q3,Lorentz5Momentum & q4) const;
/**
* The G functions of hep-ph/0201149
* @param q2 The scale \f$q^2\f$.
* @param ichan Which of the four pion channels this is for.
* @return The G function.
*/
InvEnergy6 gFunction(Energy2 q2, int ichan) const;
/**
* The d parameter in \f$\rho\f$ the propagator.
*/
Energy2 DParameter() const;
/**
* The \f$\frac{dh}{dq^2}\f$ function in the rho propagator evaluated at \f$q^2=m^2\f$.
*/
double dhdq2Parameter() const;
/**
* The h function in the \f$\rho\f$ propagator.
* @param q The scale.
* @return The h function.
*/
Energy2 hFunction(const Energy q) const;
private:
/**
* Interpolating functions for the G functions of hep-ph/0201149
*/
//@{
/**
* The interpolator for the \f$\omega\f$ current.
*/
Interpolator<double,Energy>::Ptr _Fomega;
/**
* The interpolator for the three charged pion \f$a_1\f$ current.
*/
Interpolator<double,Energy>::Ptr _Fthreec;
/**
* The interpolator for the one charged pion \f$a_1\f$ current.
*/
Interpolator<double,Energy>::Ptr _Fonec;
/**
* The interpolator for the \f$\sigma\f$ current.
*/
Interpolator<double,Energy2>::Ptr _Fsigma;
//@}
/**
* The charged pion mass
*/
Energy _mpic;
/**
* The neutral pion mass
*/
Energy _mpi0;
/**
* The mass of the \f$\rho\f$ for the current.
*/
Energy _rhomass;
/**
* The mass of the \f$a_1\f$ for the current.
*/
Energy _a1mass;
/**
* The mass of the \f$\omega\f$ for the current.
*/
Energy _omegamass;
/**
* The mass of the \f$\sigma\f$ for the current.
*/
Energy _sigmamass;
/**
* The width for the \f$\rho\f$.
*/
Energy _rhowidth;
/**
* The \f$a_1\f$ width
*/
Energy _a1width;
/**
* The \f$\omega\f$ width.
*/
Energy _omegawidth;
/**
* The \f$\sigma\f$ width.
*/
Energy _sigmawidth;
/**
* Mass for the intermediate in the phase-space, this is a technical parameter to
* improve the phase-space integration efficiency.
*/
Energy _intmass;
/**
* Width for the intermediate in the phase-space, this is a technical parameter to
* improve the phase-space integration efficiency.
*/
Energy _intwidth;
/**
* The \f$z\f$ \f$\sigma\f$ coupling.
*/
Complex _zsigma;
/**
* The magnitude of the \f$z\f$ \f$\sigma\f$ coupling.
*/
double _zmag;
/**
* The phase of the \f$z\f$ \f$\sigma\f$ coupling.
*/
double _zphase;
/**
* The mass parameter for the \f$a_1\f$ form-factor.
*/
Energy2 _lambda2;
/**
* The inverse of the mass parameter for the \f$a_1\f$ form-factor.
*/
InvEnergy2 _onedlam2;
/**
* The physical \f$a_1\f$ mass divided by the mass parameter in the
* \f$a_1\f$ form-factor.
*/
double _a1massolam2;
/**
* The momentum of the pions in on-shell \f$\sigma\f$ decay which is used
* in the calculation of the running \f$\sigma\f$ width.
*/
vector<Energy> _psigma;
/**
* The charged pion mass squared.
*/
Energy2 _mpic2;
/**
* The neutral pion mass squared
*/
Energy2 _mpi02;
/**
* The h function evaluated at the \f$\rho\f$ mass.
*/
Energy2 _hm2;
/**
* The d parameter for the \f$\rho\f$ width.
*/
Energy2 _rhoD;
/**
* The momentum of the pions produced in on-shell \f$rho\f$ decay.
*/
Energy _prho;
/**
* \f$\frac{dh}{dq^2}\f$ evaluates at \f$q^2=m^2\f$ for the \f$\rho\f$.
*/
double _dhdq2m2;
/**
* Magic number for the omega current.
*/
InvEnergy _aomega;
/**
* Magic number for the three charged pion current.
*/
InvEnergy _athreec;
/**
* Magic number for the one charged pion current
*/
InvEnergy _aonec;
/**
* Magic number for the omega current.
*/
double _bomega;
/**
* Magic number for the three charged pion current.
*/
double _bthreec;
/**
* Magic number for the one charged pion current
*/
double _bonec;
/**
* Magic number for the omega current.
*/
double _comega;
/**
* Magic number for the three charged pion current.
*/
double _cthreec;
/**
* Magic number for the one charged pion current
*/
double _conec;
/**
* magic numbers for the running omega width
*/
vector<double> _omegaparam;
/**
* whether or not to initialize the calculation of the \f$a_1\f$ width
*/
bool _initializea1;
/**
* use local values of the particle masses
*/
bool _localparameters;
/**
* The widths for the interpolation table for the running \f$a_1\f$ width.
*/
vector<Energy> _a1runwidth;
/**
* The \f$q^2\f$ values for the interpolation table for the running \f$a_1\f$ width.
*/
vector<Energy2> _a1runq2;
/**
* The interpolator for the running \f$a_1\f$ width.
*/
Interpolator<Energy,Energy2>::Ptr _a1runinter;
/**
* The maximum mass of the hadronic system
*/
Energy _maxmass;
/**
* The maximum mass when the running width was calculated
*/
Energy _maxcalc;
};
}
#endif /* HERWIG_FourPionNovosibirskCurrent_H */
diff --git a/Decay/WeakCurrents/KPiCurrent.h b/Decay/WeakCurrents/KPiCurrent.h
--- a/Decay/WeakCurrents/KPiCurrent.h
+++ b/Decay/WeakCurrents/KPiCurrent.h
@@ -1,320 +1,320 @@
// -*- C++ -*-
//
// KPiCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_KPiCurrent_H
#define HERWIG_KPiCurrent_H
//
// This is the declaration of the KPiCurrent class.
//
#include "WeakDecayCurrent.h"
#include "Herwig/Utilities/Kinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the KPiCurrent class.
*
* @see \ref KPiCurrentInterfaces "The interfaces"
* defined for KPiCurrent.
*/
class KPiCurrent: public WeakDecayCurrent {
public:
/**
* The default constructor.
*/
KPiCurrent();
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version just adds the intermediate resonances, two outgoing mesons
* and photon.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current. This just returns the two pseudoscalar
* mesons and the photon.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This version returns the hadronic current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode,const int ichan,Energy & scale,
const ParticleVector & decay, DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks the particles are the allowed mode.
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Breit-Wigner distributions
*/
//@{
/**
* s-wave Breit-Wigner for the scalar resonances
* @param q2 The scale
* @param ires The resonances
*/
Complex sWaveBreitWigner(Energy2 q2,unsigned int ires) const {
Energy q=sqrt(q2),gam(ZERO);
Energy2 m2=sqr(_scamass[ires]);
if(q>_mK+_mpi) {
Energy pX=Kinematics::pstarTwoBodyDecay(_scamass[ires],_mK,_mpi);
Energy p =Kinematics::pstarTwoBodyDecay( q ,_mK,_mpi);
gam = _scawidth[ires]*m2/q2*p/pX;
}
return m2/(m2-q2-Complex(0.,1.)*q*gam);
}
/**
* p-wave Breit-Wigner for the vector resonances
* @param q2 The scale
* @param ires The resonances
*/
Complex pWaveBreitWigner(Energy2 q2,unsigned int ires) const {
Energy q=sqrt(q2),gam(ZERO);
Energy2 m2=sqr(_vecmass[ires]);
if(q>_mK+_mpi) {
Energy pX=Kinematics::pstarTwoBodyDecay(_vecmass[ires],_mK,_mpi);
Energy p =Kinematics::pstarTwoBodyDecay( q ,_mK,_mpi);
double ratio=p/pX;
gam = _vecwidth[ires]*m2/q2*ratio*sqr(ratio);
}
return m2/(m2-q2-Complex(0.,1.)*q*gam);
}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- KPiCurrent & operator=(const KPiCurrent &);
+ KPiCurrent & operator=(const KPiCurrent &) = delete;
private:
/**
* Use local value of the parameters not those from the ParticleData objects
*/
bool _localparameters;
/**
* Whether to use \f$m^2\f$ or \f$Q^2\f$ in the projection operator.
*/
bool _transverse;
/**
* Normalizations of the vector and scalar pieces
*/
//@{
/**
* \f$c_V\f$, normalization of the vector piece.
*/
double _cV;
/**
* \f$c_S\f$, normalization of the scalar piece
*/
double _cS;
//@}
/**
* Parameters for the vector resonances
*/
//@{
/**
* Magnitude of the vector weights
*/
vector<double> _vecmag;
/**
* Phase of the vector weights
*/
vector<double> _vecphase;
/**
* Weights for the vector resonaces
*/
vector<Complex> _vecwgt;
/**
* Masses of the vector resonances
*/
vector<Energy> _vecmass;
/**
* Widths of the vector resonances
*/
vector<Energy> _vecwidth;
//@}
/**
* Parameters for the scalar resonances
*/
//@{
/**
* Magnitude of the scalar weights
*/
vector<double> _scamag;
/**
* Phase of the scalar weights
*/
vector<double> _scaphase;
/**
* Weights for the scalar resonances
*/
vector<Complex> _scawgt;
/**
* Masses of the scalar resonances
*/
vector<Energy> _scamass;
/**
* Widths of the scalar resonances
*/
vector<Energy> _scawidth;
//@}
/**
* Masses for calculating the running widths
*/
//@{
/**
* The pion mass
*/
Energy _mpi;
/**
* The kaon mass
*/
Energy _mK;
//@}
/**
* Map for the resonances
*/
vector<int> _resmap;
};
}
#endif /* HERWIG_KPiCurrent_H */
diff --git a/Decay/WeakCurrents/KaonThreeMesonCurrent.h b/Decay/WeakCurrents/KaonThreeMesonCurrent.h
--- a/Decay/WeakCurrents/KaonThreeMesonCurrent.h
+++ b/Decay/WeakCurrents/KaonThreeMesonCurrent.h
@@ -1,536 +1,536 @@
// -*- C++ -*-
//
// KaonThreeMesonCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_KaonThreeMesonCurrent_H
#define HERWIG_KaonThreeMesonCurrent_H
//
// This is the declaration of the KaonThreeMesonCurrent class.
//
#include "ThreeMesonCurrentBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The KaonThreeMesonCurrent class implements the model of M. Finkemeier
* and E.~Mirkes, Z. Phys. C 69 (1996) 243 [arXiv:hep-ph/9503474],
* for the weak current for three mesons where at least one of the mesons is
* a kaon.
*
* @see \ref KaonThreeMesonCurrentInterfaces "The interfaces"
* defined for KaonThreeMesonCurrent.
*/
class KaonThreeMesonCurrent: public ThreeMesonCurrentBase {
public:
/**
* The default constructor.
*/
KaonThreeMesonCurrent();
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version addes the mesons for the current
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
/**
* the matrix element for the \f$a_1\f$ decay to calculate the running width
* @param imode The mode for which the matrix element is needed.
* @param q2 The mass of the decaying off-shell \f$a_1\f$, \f$q^2\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element squared summed over spins.
*/
double threeBodyMatrixElement(const int imode, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
protected:
/**
* Can the current handle a particular set of mesons.
* As this current includes all the allowed modes this is always true.
*/
virtual bool acceptMode(int) const;
/**
* Calculate the form factor for the current. Implements the form factors
* described above.
* @param ichan The phase space channel
* @param imode The mode
* @param q2 The scale \f$q^2\f$ for the current.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
*/
virtual FormFactors calculateFormFactors(const int ichan,const int imode,
Energy2 q2,Energy2 s1,Energy2 s2,Energy2 s3) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
/**
* Check sanity of the object during the setup phase.
*/
virtual void doupdate();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- KaonThreeMesonCurrent & operator=(const KaonThreeMesonCurrent &);
+ KaonThreeMesonCurrent & operator=(const KaonThreeMesonCurrent &) = delete;
private:
/**
* The \f$\rho\f$ lineshape for the axial-vector terms
* @param q2 The scale \f$q^2\f$ for the lineshape
* @param ires Which \f$\rho\f$ multiplet
*/
Complex Trho1(Energy2 q2,int ires) const;
/**
* The \f$\rho\f$ lineshape for the vector terms
* @param q2 The scale \f$q^2\f$ for the lineshape
* @param ires Which \f$\rho\f$ multiplet
*/
Complex Trho2(Energy2 q2,int ires) const;
/**
* The \f$K^*\f$ lineshape for the axial-vector terms
* @param q2 The scale \f$q^2\f$ for the lineshape
* @param ires Which \f$K^*\f$ multiplet
*/
Complex TKstar1(Energy2 q2,int ires) const;
/**
* The \f$\rho\f$ lineshape for the vector terms
* @param q2 The scale \f$q^2\f$ for the lineshape
* @param ires Which \f$K^*\f$ multiplet
*/
Complex TKstar2(Energy2 q2,int ires) const;
/**
* The \f$\rho\f$ Breit-Wigner for the axial-vector terms
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$\rho\f$ multiplet
*/
Complex BWrho1(Energy2 q2, unsigned int ires) const;
/**
* The \f$\rho\f$ Breit-Wigner for the vector terms
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$\rho\f$ multiplet
*/
Complex BWrho2(Energy2 q2, unsigned int ires) const;
/**
* The \f$K^*\f$ Breit-Wigner for the axial-vector terms
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$K^*\f$ multiplet
*/
Complex BWKstar1(Energy2 q2, unsigned int ires) const;
/**
* The \f$K^*\f$ Breit-Wigner for the vector terms
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$K^*\f$ multiplet
*/
Complex BWKstar2(Energy2 q2, unsigned int ires) const;
/**
* \f$a_1\f$ Breit-Wigner
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @return The Breit-Wigner
*/
Complex a1BreitWigner(Energy2 q2) const;
/**
* The \f$K_1\f$ line shape
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param iopt Whether this is \f$K^*\pi\f$ or \f$\rho K\f$.
* @param ires the resonance
*/
Complex TK1(Energy2 q2,unsigned int iopt,int ires) const;
/**
* The \f$K_1\f$ Breit-Wigner
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires the resonance
* @return The Breit-Wigner
*/
Complex K1BreitWigner(Energy2 q2,unsigned int ires) const;
/**
* The \f$a_1\f$ running width
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @return The \f$a_1\f$ running width.
*/
Energy a1Width(Energy2 q2) const;
/**
* The \f$g(Q^2)\f$ function of Kuhn and Santamaria
*/
double g(Energy2 q2) const;
/**
* Initialize the \f$a_1\f$ running width
* @param iopt Initialization option (-1 full calculation, 0 set up the interpolation)
*/
void inita1Width(int iopt);
/**
* The \f$T_\omega\f$ function
* @param q2 The scale
* @param ires the resonance
*/
Complex Tomega(Energy2 q2, int ires) const;
/**
* The \f$\omega\f$ and \f$\phi\f$ Breit-Wigner
* @param q2 The scale
* @param ires the resonance
*/
Complex OmegaPhiBreitWigner(Energy2 q2, unsigned int ires) const;
/**
* The \f$\omega-\phi\f$ \f$K^*\f$ form-factor for the \f$F_5\f$ form-factor
* @param s1 The scale \f$s_1\f$.
* @param s2 The scale \f$s_2\f$.
* @param ires Which resonances to use
* @return The mixed Breit-Wigner
*/
Complex TOmegaKStar(Energy2 s1,Energy2 s2,int ires) const;
private:
/**
* Parameters for the \f$\rho\f$ in the axial-vector terms
*/
//@{
/**
* Weight for the different resonances
*/
vector<double> _rho1wgts;
/**
* Masses
*/
vector<Energy> _rho1mass;
/**
* Widths
*/
vector<Energy> _rho1width;
//@}
/**
* Parameters for the \f$\rho\f$ in the vector terms
*/
//@{
/**
* Weight for the different resonances
*/
vector<double> _rho2wgts;
/**
* Masses
*/
vector<Energy> _rho2mass;
/**
* Widths
*/
vector<Energy> _rho2width;
//@}
/**
* Parameters for the \f$K^*\f$ in the axial-vector terms
*/
//@{
/**
* Weight for the different resonances
*/
vector<double> _kstar1wgts;
/**
* Masses
*/
vector<Energy> _kstar1mass;
/**
* Widths
*/
vector<Energy> _kstar1width;
//@}
/**
* Parameters for the \f$K^*\f$ in the vector terms
*/
//@{
/**
* Weight for the different resonances
*/
vector<double> _kstar2wgts;
/**
* Masses
*/
vector<Energy> _kstar2mass;
/**
* Widths
*/
vector<Energy> _kstar2width;
//@}
/**
* Parameters for the three meson resonances
*/
//@{
/**
* The mass of the \f$a_1\f$ resonances.
*/
Energy _a1mass;
/**
* The width of the \f$a_1\f$ resonances.
*/
Energy _a1width;
/**
* The masses of the \f$aK1\f$ resonances.
*/
vector<Energy> _k1mass;
/**
* The widths of the \f$K_1\f$ resonances.
*/
vector<Energy> _k1width;
/**
* The weights for the different \f$K_1\f$ resonances for \f$K_1\to K^*\pi\f$
*/
vector<double> _k1wgta;
/**
* The weights for the different \f$K_1\f$ resonaces for \f$K_1\to\rho K\f$.
*/
vector<double> _k1wgtb;
/**
* The \f$a_1\f$ width for the running \f$a_1\f$ width calculation.
*/
vector<Energy> _a1runwidth;
/**
* The \f$q^2\f$ for the running \f$a_1\f$ width calculation.
*/
vector<Energy2> _a1runq2;
/**
* The interpolator for the running \f$a_1\f$ width calculation.
*/
Interpolator<Energy,Energy2>::Ptr _a1runinter;
//@}
/**
* Parameters for the \f$T_\omega\f$ function
*/
//@{
/**
* Mixing parameter
*/
double _epsomega;
/**
* Mass of the \f$\omega\f$
*/
Energy _omegamass;
/**
* Width of the \f$\omega\f$
*/
Energy _omegawidth;
/**
* Mass of the \f$\phi\f$
*/
Energy _phimass;
/**
* Width of the \f$\phi\f$
*/
Energy _phiwidth;
//@}
/**
* The relative weight of the \f$\omega-\phi\f$ and \f$K^*\f$ where needed.
*/
double _omegaKstarwgt;
/**
* The pion decay constant, \f$f_\pi\f$.
*/
Energy _fpi;
/**
* The pion mass
*/
Energy _mpi;
/**
* The kaon mass
*/
Energy _mK;
/**
* Initialization switches
*/
//@{
/**
* Initialize the running \f$a_1\f$ width.
*/
bool _initializea1;
/**
* use local values of the \f$\rho\f$ masses and widths
*/
bool _rhoparameters;
/**
* use local values of the \f$K^*\f$ resonances masses and widths
*/
bool _kstarparameters;
/**
* Use local values of the \f$a_1\f$ parameters
*/
bool _a1parameters;
/**
* Use local values of the \f$K_1\f$ parameters
*/
bool _k1parameters;
/**
* Option for the \f$a_1\f$ width
*/
bool _a1opt;
/**
* Option for the \f$\omega-\phi\f$ parameters
*/
bool _omegaopt;
//@}
/**
* The maximum mass of the hadronic system
*/
Energy _maxmass;
/**
* The maximum mass when the running width was calculated
*/
Energy _maxcalc;
};
}
#endif /* HERWIG_KaonThreeMesonCurrent_H */
diff --git a/Decay/WeakCurrents/LeptonNeutrinoCurrent.h b/Decay/WeakCurrents/LeptonNeutrinoCurrent.h
--- a/Decay/WeakCurrents/LeptonNeutrinoCurrent.h
+++ b/Decay/WeakCurrents/LeptonNeutrinoCurrent.h
@@ -1,152 +1,152 @@
// -*- C++ -*-
//
// LeptonNeutrinoCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LeptonNeutrinoCurrent_H
#define HERWIG_LeptonNeutrinoCurrent_H
//
// This is the declaration of the LeptonNeutrinoCurrent class.
//
#include "WeakDecayCurrent.h"
#include "LeptonNeutrinoCurrent.fh"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::LorentzPolarizationVector;
/** \ingroup Decay
*
* This class implements the weak decay current for a lepton and a neutrino.
* In this case the current is given by
* \f$J^\mu = \bar{u}(p_\nu)\gamma^\mu(1-\gamma_5)u(p_\ell)\f$
* where
* - \f$p_\nu\f$ is the momentum of the neutrino,
* - \f$p_\ell\f$ is the momentum of the charged lepton.
*
* @see WeakDecayCurrent.
*
*/
class LeptonNeutrinoCurrent: public WeakDecayCurrent {
public:
/**
* Default constructor
*/
LeptonNeutrinoCurrent() {
// set up the modes in the base class
addDecayMode(11,-12);
addDecayMode(13,-15);
addDecayMode(15,-16);
setInitialModes(3);
}
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version just adds the intermediate \f$W\f$ and the leptons.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current. This just returns the leptons.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This version returns the hadronic current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode, const int ichan,Energy & scale,
const ParticleVector & decay, DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks that this is one of the allowed modes.
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Returns the decay mode number for a given set of particles in the current.
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- LeptonNeutrinoCurrent & operator=(const LeptonNeutrinoCurrent &);
+ LeptonNeutrinoCurrent & operator=(const LeptonNeutrinoCurrent &) = delete;
};
}
#endif /* HERWIG_LeptonNeutrinoCurrent_H */
diff --git a/Decay/WeakCurrents/ScalarMesonCurrent.h b/Decay/WeakCurrents/ScalarMesonCurrent.h
--- a/Decay/WeakCurrents/ScalarMesonCurrent.h
+++ b/Decay/WeakCurrents/ScalarMesonCurrent.h
@@ -1,200 +1,200 @@
// -*- C++ -*-
//
// ScalarMesonCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ScalarMesonCurrent_H
#define HERWIG_ScalarMesonCurrent_H
// This is the declaration of the ScalarMesonCurrent class.
#include "WeakDecayCurrent.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The weak current for the production of one (pseudo)-scalar meson.
*
* In this case the current is given by
* \f[J^\mu = f_Pp_P^\mu,\f]
* where
* - \f$f_P\f$ is the decay constant for the meson,
* - \f$p_P\f$ is the momentum of the meson.
*
* The outgoing mesons and their decay constants can be specified using the
* interfaces.
*
* @see WeakDecayCurrent.
*
*/
class ScalarMesonCurrent: public WeakDecayCurrent {
public:
/**
* Default constructor
*/
ScalarMesonCurrent();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version just adds the meson as the daughter of the last
* resonance in the phase space channel.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current. This just returns the pseudoscalar
* meson.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This version returns the hadronic current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode,const int ichan, Energy & scale,
const ParticleVector & decay, DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks the meson against the list
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* Checks the meson against the list
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ScalarMesonCurrent & operator=(const ScalarMesonCurrent &);
+ ScalarMesonCurrent & operator=(const ScalarMesonCurrent &) = delete;
private:
/**
* the pdg code for the meson
*/
vector<long> _id;
/**
* the decay constant
*/
vector<Energy> _decay_constant;
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _thetaeta;
/**
* The inital size of the arrays
*/
unsigned int _initsize;
};
}
#endif /* HERWIG_ScalarMesonCurrent_H */
diff --git a/Decay/WeakCurrents/ThreeMesonCurrentBase.cc b/Decay/WeakCurrents/ThreeMesonCurrentBase.cc
--- a/Decay/WeakCurrents/ThreeMesonCurrentBase.cc
+++ b/Decay/WeakCurrents/ThreeMesonCurrentBase.cc
@@ -1,248 +1,248 @@
// -*- C++ -*-
//
// ThreeMesonCurrentBase.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ThreeMesonCurrentBase class.
//
#include "ThreeMesonCurrentBase.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Helicity/epsilon.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Utilities/DescribeClass.h"
using namespace Herwig;
using namespace ThePEG;
using namespace ThePEG::Helicity;
ThreeMesonCurrentBase::ThreeMesonCurrentBase() {
// the quarks for the different modes
addDecayMode(2,-1);
addDecayMode(2,-1);
addDecayMode(2,-1);
addDecayMode(2,-1);
addDecayMode(2,-1);
addDecayMode(2,-3);
addDecayMode(2,-3);
addDecayMode(2,-3);
addDecayMode(2,-1);
addDecayMode(2,-1);
addDecayMode(2,-1);
addDecayMode(2,-1);
setInitialModes(12);
}
DescribeAbstractNoPIOClass<ThreeMesonCurrentBase,WeakDecayCurrent>
describeHerwigThreeMesonCurrentBase("Herwig::ThreeMesonCurrentBase",
"HwWeakCurrents.so");
void ThreeMesonCurrentBase::Init() {
static ClassDocumentation< ThreeMesonCurrentBase> documentation
("The ThreeMesonCurrentBase class is designed to be the "
"base class for "
"the three meson decays of the tau, ie pi- pi- pi+, pi0 pi0 pi-, "
"K- pi- K+, K0 pi- Kbar0, K- pi0 K0,pi0 pi0 K-, K- pi- pi+, "
"pi- Kbar0 pi0, pi- pi0 eta, K0S pi- K0S, K0L pi- K0L, K0S pi- K0L");
}
// the hadronic currents
vector<LorentzPolarizationVectorE>
ThreeMesonCurrentBase::current(const int imode, const int ichan,
Energy & scale,const ParticleVector & decay,
DecayIntegrator::MEOption meopt) const {
if(meopt==DecayIntegrator::Terminate) {
for(unsigned int ix=0;ix<3;++ix)
ScalarWaveFunction::constructSpinInfo(decay[ix],outgoing,true);
return vector<LorentzPolarizationVectorE>(1,LorentzPolarizationVectorE());
}
// calculate q2,s1,s2,s3
Lorentz5Momentum q;
for(unsigned int ix=0;ix<decay.size();++ix){q+=decay[ix]->momentum();}
q.rescaleMass();
scale=q.mass();
Energy2 q2=q.mass2();
Energy2 s1 = (decay[1]->momentum()+decay[2]->momentum()).m2();
Energy2 s2 = (decay[0]->momentum()+decay[2]->momentum()).m2();
Energy2 s3 = (decay[0]->momentum()+decay[1]->momentum()).m2();
FormFactors F = calculateFormFactors(ichan,imode,q2,s1,s2,s3);
//if(inpart.id()==ParticleID::tauplus){F.F5=conj(F.F5);}
// the first three form-factors
LorentzPolarizationVector vect;
- vect = (F.F2-F.F1)*decay[2]->momentum()
- +(F.F1-F.F3)*decay[1]->momentum()
- +(F.F3-F.F2)*decay[0]->momentum();
+ vect = LorentzPolarizationVector((F.F2-F.F1)*decay[2]->momentum())
+ +LorentzPolarizationVector((F.F1-F.F3)*decay[1]->momentum())
+ +LorentzPolarizationVector((F.F3-F.F2)*decay[0]->momentum());
// multiply by the transverse projection operator
complex<InvEnergy> dot=(vect*q)/q2;
// scalar and parity violating terms
- vect += (F.F4-dot)*q;
+ vect += LorentzPolarizationVector((F.F4-dot)*q);
if(F.F5!=complex<InvEnergy3>())
- vect += Complex(0.,1.)*F.F5*Helicity::epsilon(decay[0]->momentum(),
- decay[1]->momentum(),
- decay[2]->momentum());
+ vect += LorentzPolarizationVector(Complex(0.,1.)*F.F5*Helicity::epsilon(decay[0]->momentum(),
+ decay[1]->momentum(),
+ decay[2]->momentum()));
// factor to get dimensions correct
return vector<LorentzPolarizationVectorE>(1,q.mass()*vect);
}
bool ThreeMesonCurrentBase::accept(vector<int> id) {
int npip(0),npim(0),nkp(0),nkm(0),
npi0(0),nk0(0),nk0bar(0),neta(0),nks(0),nkl(0);
for(unsigned int ix=0;ix<id.size();++ix) {
if(id[ix]==ParticleID::piplus) ++npip;
else if(id[ix]==ParticleID::piminus) ++npim;
else if(id[ix]==ParticleID::Kplus) ++nkp;
else if(id[ix]==ParticleID::Kminus) ++nkm;
else if(id[ix]==ParticleID::pi0) ++npi0;
else if(id[ix]==ParticleID::K0) ++nk0;
else if(id[ix]==ParticleID::Kbar0) ++nk0bar;
else if(id[ix]==ParticleID::eta) ++neta;
else if(id[ix]==ParticleID::K_S0) ++nks;
else if(id[ix]==ParticleID::K_L0) ++nkl;
}
int imode(-1);
if( (npip==2&&npim==1) || (npim==2&&npip==1) ) imode= 0;
else if( (npip==1&&npi0==2) || (npim==1&&npi0==2) ) imode= 1;
else if( (nkp==1&&nkm==1&&npip==1) ||
(nkp==1&&nkm==1&&npim==1)) imode= 2;
else if( (nk0==1&&nk0bar==1&&npip==1) ||
(nk0==1&&nk0bar==1&&npim==1)) imode= 3;
else if( (nkp==1&&nk0bar==1&&npi0==1) ||
(nkm==1&&npi0==1&&nk0==1)) imode= 4;
else if( (nkp==1&&npi0==2) || (npi0==2&&nkm==1) ) imode= 5;
else if( (npip==1&&npim==1&&nkp==1) ||
(nkm==1&&npim==1&&npip==1) ) imode= 6;
else if( (nk0==1&&npip==1&&npi0==1) ||
(npim==1&&nk0bar==1&&npi0==1)) imode= 7;
else if( (npip==1&&npi0==1&&neta==1) ||
(npim==1&&npi0==1&&neta==1)) imode= 8;
else if( nks==2 && (npip==1||npim==1) ) imode= 9;
else if( nkl==2 && (npip==1||npim==1) ) imode=10;
else if( nks==1&&nkl==1 && (npip==1||npim==1) ) imode=11;
return imode==-1 ? false : acceptMode(imode);
}
unsigned int ThreeMesonCurrentBase::decayMode(vector<int> id) {
int npip(0),npim(0),nkp(0),nkm(0),
npi0(0),nk0(0),nk0bar(0),neta(0),nks(0),nkl(0);
for(unsigned int ix=0;ix<id.size();++ix) {
if(id[ix]==ParticleID::piplus) ++npip;
else if(id[ix]==ParticleID::piminus) ++npim;
else if(id[ix]==ParticleID::Kplus) ++nkp;
else if(id[ix]==ParticleID::Kminus) ++nkm;
else if(id[ix]==ParticleID::pi0) ++npi0;
else if(id[ix]==ParticleID::K0) ++nk0;
else if(id[ix]==ParticleID::Kbar0) ++nk0bar;
else if(id[ix]==ParticleID::eta) ++neta;
else if(id[ix]==ParticleID::K_S0) ++nks;
else if(id[ix]==ParticleID::K_L0) ++nkl;
}
int imode(-1);
if( (npip==2&&npim==1) || (npim==2&&npip==1) ) imode= 0;
else if( (npip==1&&npi0==2) || (npim==1&&npi0==2) ) imode= 1;
else if( (nkp==1&&nkm==1&&npip==1) ||
(nkp==1&&nkm==1&&npim==1)) imode= 2;
else if( (nk0==1&&nk0bar==1&&npip==1) ||
(nk0==1&&nk0bar==1&&npim==1)) imode= 3;
else if( (nkp==1&&nk0bar==1&&npi0==1) ||
(nkm==1&&npi0==1&&nk0==1)) imode= 4;
else if( (nkp==1&&npi0==2) || (npi0==2&&nkm==1) ) imode= 5;
else if( (npip==1&&npim==1&&nkp==1) ||
(nkm==1&&npim==1&&npip==1) ) imode= 6;
else if( (nk0==1&&npip==1&&npi0==1) ||
(npim==1&&nk0bar==1&&npi0==1)) imode= 7;
else if( (npip==1&&npi0==1&&neta==1) ||
(npim==1&&npi0==1&&neta==1)) imode= 8;
else if( nks==2 && (npip==1||npim==1) ) imode= 9;
else if( nkl==2 && (npip==1||npim==1) ) imode=10;
else if( nks==1&&nkl==1 && (npip==1||npim==1) ) imode=11;
return imode;
}
void ThreeMesonCurrentBase::dataBaseOutput(ofstream & output,bool header,
bool create) const {
WeakDecayCurrent::dataBaseOutput(output,header,create);
}
tPDVector ThreeMesonCurrentBase::particles(int icharge, unsigned int imode,int,int) {
tPDVector extpart(3);
if(imode==0) {
extpart[0]=getParticleData(ParticleID::piminus);
extpart[1]=getParticleData(ParticleID::piminus);
extpart[2]=getParticleData(ParticleID::piplus);
}
else if(imode==1) {
extpart[0]=getParticleData(ParticleID::pi0);
extpart[1]=getParticleData(ParticleID::pi0);
extpart[2]=getParticleData(ParticleID::piminus);
}
else if(imode==2) {
extpart[0]=getParticleData(ParticleID::Kminus);
extpart[1]=getParticleData(ParticleID::piminus);
extpart[2]=getParticleData(ParticleID::Kplus);
}
else if(imode==3) {
extpart[0]=getParticleData(ParticleID::K0);
extpart[1]=getParticleData(ParticleID::piminus);
extpart[2]=getParticleData(ParticleID::Kbar0);
}
else if(imode==4) {
extpart[0]=getParticleData(ParticleID::Kminus);
extpart[1]=getParticleData(ParticleID::pi0);
extpart[2]=getParticleData(ParticleID::K0);
}
else if(imode==5) {
extpart[0]=getParticleData(ParticleID::pi0);
extpart[1]=getParticleData(ParticleID::pi0);
extpart[2]=getParticleData(ParticleID::Kminus);
}
else if(imode==6) {
extpart[0]=getParticleData(ParticleID::Kminus);
extpart[1]=getParticleData(ParticleID::piminus);
extpart[2]=getParticleData(ParticleID::piplus);
}
else if(imode==7) {
extpart[0]=getParticleData(ParticleID::piminus);
extpart[1]=getParticleData(ParticleID::Kbar0);
extpart[2]=getParticleData(ParticleID::pi0);
}
else if(imode==8) {
extpart[0]=getParticleData(ParticleID::piminus);
extpart[1]=getParticleData(ParticleID::pi0);
extpart[2]=getParticleData(ParticleID::eta);
}
else if(imode==9) {
extpart[0]=getParticleData(ParticleID::K_S0);
extpart[1]=getParticleData(ParticleID::piminus);
extpart[2]=getParticleData(ParticleID::K_S0);
}
else if(imode==10) {
extpart[0]=getParticleData(ParticleID::K_L0);
extpart[1]=getParticleData(ParticleID::piminus);
extpart[2]=getParticleData(ParticleID::K_L0);
}
else if(imode==11) {
extpart[0]=getParticleData(ParticleID::K_S0);
extpart[1]=getParticleData(ParticleID::piminus);
extpart[2]=getParticleData(ParticleID::K_L0);
}
// conjugate the particles if needed
if(icharge==3) {
for(unsigned int ix=0;ix<3;++ix) {
if(extpart[ix]->CC()) extpart[ix]=extpart[ix]->CC();
}
}
// return the answer
return extpart;
}
diff --git a/Decay/WeakCurrents/ThreeMesonCurrentBase.h b/Decay/WeakCurrents/ThreeMesonCurrentBase.h
--- a/Decay/WeakCurrents/ThreeMesonCurrentBase.h
+++ b/Decay/WeakCurrents/ThreeMesonCurrentBase.h
@@ -1,202 +1,202 @@
// -*- C++ -*-
//
// ThreeMesonCurrentBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ThreeMesonCurrentBase_H
#define HERWIG_ThreeMesonCurrentBase_H
// This is the declaration of the ThreeMesonCurrentBase class.
#include "WeakDecayCurrent.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This is the base class for the three meson decays of the weak current.
* It is designed so that the currents for the following modes can be implemented
* in classes inheriting from this
* - \f$ \pi^- \pi^- \pi^+ \f$, (imode=0)
* - \f$ \pi^0 \pi^0 \pi^- \f$, (imode=1)
* - \f$ K^- \pi^- K^+ \f$, (imode=2)
* - \f$ K^0 \pi^- \bar{K}^0\f$, (imode=3)
* - \f$ K^- \pi^0 K^0 \f$, (imode=4)
* - \f$ \pi^0 \pi^0 K^- \f$, (imode=5)
* - \f$ K^- \pi^- \pi^+ \f$, (imode=6)
* - \f$ \pi^- \bar{K}^0 \pi^0 \f$, (imode=7)
* - \f$ \pi^- \pi^0 \eta \f$, (imode=8)
*
* obviously there are other modes with three pseudoscalar mesons for the decay
* of the weak current but this model original came from \f$\tau\f$ decay where
* these are the only modes. However one case which is important is the inclusion
* of the mixing in the neutral kaon sector for which we include the additional
* currents
* - \f$ K^0_S \pi^- K^0_S\f$, (imode=9)
* - \f$ K^0_L \pi^- K^0_L\f$, (imode=10)
* - \f$ K^0_S \pi^- K^0_L\f$, (imode=11)
*
* In this case the current is given by
* \f[ J^\mu = \left(g^{\mu\nu}-\frac{q^\mu q^\nu}{q^2}\right)
* \left[F_1(p_2-p_3)^\mu +F_2(p_3-p_1)^\mu+F_3(p_1-p_2)^\mu\right]
* +q^\mu F_4
* +F_5\epsilon^{\mu\alpha\beta\gamma}p_1^\alpha p_2^\beta p_3^\gamma
* \f]
* where
* - \f$p_{1,2,3}\f$ are the momenta of the mesons in the order given above.
* - \f$F_1,F_2,F_3,F_4,F_5\f$ are the form factors which must be
* calculated in the calculateFormFactors member which should be implemented
* in classes inheriting from this.
*
* @see WeakDecayCurrent.
*
* \author Peter Richardson
*
*/
class ThreeMesonCurrentBase: public WeakDecayCurrent {
public:
/**
* Default constructor
*/
ThreeMesonCurrentBase();
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/**
* Hadronic current. This version returns the hadronic current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode,const int ichan,Energy & scale,
const ParticleVector & decay,DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks the mesons against the list.
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* Checks the mesons against the list.
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* The particles produced by the current. This returns the mesons for the mode.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/**
* can a particular decayer handle this type of mode
* @param imode The mode number as given above
* @return Whether this mode can be handled.
*/
virtual bool acceptMode(int imode) const=0;
/**
* Helper class for form factors
*/
struct FormFactors {
/**
* @param F1 The \f$F_1\f$ form factor
*/
complex<InvEnergy> F1;
/**
* @param F2 The \f$F_2\f$ form factor
*/
complex<InvEnergy> F2;
/**
* @param F3 The \f$F_3\f$ form factor
*/
complex<InvEnergy> F3;
/**
* @param F4 The \f$F_4\f$ form factor
*/
complex<InvEnergy> F4;
/**
* @param F5 The \f$F_5\f$ form factor
*/
complex<InvEnergy3> F5;
/**
* Constructor
* @param f1 The \f$F_1\f$ form factor
* @param f2 The \f$F_2\f$ form factor
* @param f3 The \f$F_3\f$ form factor
* @param f4 The \f$F_4\f$ form factor
* @param f5 The \f$F_5\f$ form factor
*/
FormFactors(complex<InvEnergy> f1 = InvEnergy(),
complex<InvEnergy> f2 = InvEnergy(),
complex<InvEnergy> f3 = InvEnergy(),
complex<InvEnergy> f4 = InvEnergy(),
complex<InvEnergy3> f5 = InvEnergy3())
: F1(f1), F2(f2), F3(f3), F4(f4), F5(f5) {}
};
/**
* Calculate the form factor for the current.
* @param ichan The phase space channel
* @param imode The mode
* @param q2 The scale \f$q^2\f$ for the current.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
*/
virtual FormFactors calculateFormFactors(const int ichan, const int imode,
Energy2 q2,
Energy2 s1, Energy2 s2, Energy2 s3) const = 0;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ThreeMesonCurrentBase & operator=(const ThreeMesonCurrentBase &);
+ ThreeMesonCurrentBase & operator=(const ThreeMesonCurrentBase &) = delete;
};
}
#endif /* HERWIG_ThreeMesonCurrentBase_H */
diff --git a/Decay/WeakCurrents/ThreeMesonDefaultCurrent.h b/Decay/WeakCurrents/ThreeMesonDefaultCurrent.h
--- a/Decay/WeakCurrents/ThreeMesonDefaultCurrent.h
+++ b/Decay/WeakCurrents/ThreeMesonDefaultCurrent.h
@@ -1,556 +1,556 @@
// -*- C++ -*-
//
// ThreeMesonDefaultCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ThreeMesonDefaultCurrent_H
#define HERWIG_ThreeMesonDefaultCurrent_H
//
// This is the declaration of the ThreeMesonDefaultCurrent class.
//
#include "ThreeMesonCurrentBase.h"
#include "Herwig/Utilities/Interpolator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The ThreeMesonDefaultCurrent class implements the currents from Z.Phys.C58:445 (1992),
* this paper uses the form from Z.Phys.C48:445 (1990) for the \f$a_1\f$ width and
* is the default model in TAUOLA.
*
* The following three meson modes are implemented.
*
* - \f$ \pi^- \pi^- \pi^+ \f$, (imode=0)
* - \f$ \pi^0 \pi^0 \pi^- \f$, (imode=1)
* - \f$ K^- \pi^- K^+ \f$, (imode=2)
* - \f$ K^0 \pi^- \bar{K}^0\f$, (imode=3)
* - \f$ K^- \pi^0 K^0 \f$, (imode=4)
* - \f$ \pi^0 \pi^0 K^- \f$, (imode=5)
* - \f$ K^- \pi^- \pi^+ \f$, (imode=6)
* - \f$ \pi^- \bar{K}^0 \pi^0 \f$, (imode=7)
* - \f$ \pi^- \pi^0 \eta \f$, (imode=8)
*
* using the currents from TAUOLA
*
*
* @see ThreeMesonCurrentBase,
* @see WeakDecayCurrent.
* @see Defaulta1MatrixElement
*
*/
class ThreeMesonDefaultCurrent: public ThreeMesonCurrentBase {
/**
* The matrix element for the running \f$a_1\f$ width is a friend to
* keep some members private.
*/
friend class Defaulta1MatrixElement;
public:
/**
* Default constructor
*/
ThreeMesonDefaultCurrent();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version addes the mesons for the current
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
/**
* the matrix element for the \f$a_1\f$ decay to calculate the running width
* @param imode The mode for which the matrix element is needed.
* @param q2 The mass of the decaying off-shell \f$a_1\f$, \f$q^2\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element squared summed over spins.
*/
double threeBodyMatrixElement(const int imode, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
protected:
/**
* Can the current handle a particular set of mesons.
* As this current includes all the allowed modes this is always true.
*/
virtual bool acceptMode(int) const;
/**
* Calculate the form factor for the current. Implements the form factors
* described above.
* @param ichan The phase space channel
* @param imode The mode
* @param q2 The scale \f$q^2\f$ for the current.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
*/
virtual FormFactors calculateFormFactors(const int ichan, const int imode,
Energy2 q2,
Energy2 s1, Energy2 s2, Energy2 s3) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
/**
* Check sanity of the object during the setup phase.
*/
virtual void doupdate();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ThreeMesonDefaultCurrent & operator=(const ThreeMesonDefaultCurrent &);
+ ThreeMesonDefaultCurrent & operator=(const ThreeMesonDefaultCurrent &) = delete;
private:
/**
* The \f$\rho\f$ Breit-Wigner for the \f$F_{1,2,3}\f$ form factors.
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$\rho\f$ multiplet
* @return The Breit-Wigner
*/
Complex BrhoF123(Energy2 q2,int ires) const {
Complex output(0.),norm(0.);
for(unsigned int ix=0,N=min(3,int(_rhoF123wgts.size()));ix<N;++ix) {
norm+=_rhoF123wgts[ix];
}
if(ires<0) {
for(unsigned int ix=0,N=min(3,int(_rhoF123wgts.size()));ix<N;++ix) {
output+=_rhoF123wgts[ix]*rhoKBreitWigner(q2,0,ix);
}
}
else {
unsigned int temp(ires);
if(temp<_rhoF123wgts.size()&&temp<3)
output=_rhoF123wgts[temp]*rhoKBreitWigner(q2,0,temp);
else
output=0.;
}
return output/norm;
}
/**
* The \f$\rho\f$ Breit-Wigner for the \f$F_5\f$ form factors.
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$\rho\f$ multiplet
* @return The Breit-Wigner
*/
Complex BrhoF5(Energy2 q2,int ires) const {
Complex output(0.),norm(0.);
for(unsigned int ix=0,N=min(3,int(_rhoF5wgts.size()));ix<N;++ix) {
norm+=_rhoF5wgts[ix];
}
if(ires<0) {
for(unsigned int ix=0,N=min(3,int(_rhoF5wgts.size()));ix<N;++ix) {
output+=_rhoF5wgts[ix]*rhoKBreitWigner(q2,1,ix);
}
}
else {
unsigned int temp(ires);
if(temp<_rhoF5wgts.size()&&temp<3) {
output=_rhoF5wgts[temp]*rhoKBreitWigner(q2,1,temp);
}
}
return output/norm;
}
/**
* The \f$K^*\f$ Breit-Wigner for the \f$F_{1,2,3}\f$ form factors.
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$\rho\f$ multiplet
* @return The Breit-Wigner
*/
Complex BKstarF123(Energy2 q2,int ires) const {
Complex output(0.),norm(0.);
for(unsigned int ix=0,N=min(3,int(_kstarF123wgts.size()));ix<N;++ix) {
norm+=_kstarF123wgts[ix];
}
if(ires<0) {
for(unsigned int ix=0,N=min(3,int(_kstarF123wgts.size()));ix<N;++ix) {
output+=_kstarF123wgts[ix]*rhoKBreitWigner(q2,2,ix);
}
}
else {
unsigned int temp(ires);
if(temp<_kstarF123wgts.size()&&temp<3) {
output=_kstarF123wgts[temp]*rhoKBreitWigner(q2,2,temp);
}
}
return output/norm;
}
/**
* The \f$K^*\f$ Breit-Wigner for the \f$F_5\f$ form factors.
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param ires Which \f$\rho\f$ multiplet
* @return The Breit-Wigner
*/
Complex BKstarF5(Energy2 q2,int ires) const {
Complex output(0.),norm(0.);
for(unsigned int ix=0,N=min(3,int(_kstarF5wgts.size()));ix<N;++ix) {
norm+=_kstarF5wgts[ix];
}
if(ires<0) {
for(unsigned int ix=0,N=min(3,int(_kstarF5wgts.size()));ix<N;++ix) {
output+=_kstarF5wgts[ix]*rhoKBreitWigner(q2,3,ix);
}
}
else {
unsigned int temp(ires);
if(temp<_kstarF5wgts.size()&&temp<3) {
output=_kstarF5wgts[ires]*rhoKBreitWigner(q2,3,temp);
}
}
return output/norm;
}
/**
* Mixed Breit Wigner for the \f$F_5\f$ form factor
* @param si The scale \f$s_1\f$.
* @param sj The scale \f$s_2\f$.
* @param ires Which resonances to use
* @return The mixed Breit-Wigner
*/
Complex FKrho(Energy2 si,Energy2 sj,int ires) const {
Complex output;
if(ires<0){output = _rhoKstarwgt*BKstarF123(si,-1)+BrhoF123(sj,-1);}
else if(ires%2==0){output= _rhoKstarwgt*BKstarF123(si,ires/2);}
else if(ires%2==1){output=BrhoF123(sj,ires/2);}
output /=(1.+_rhoKstarwgt);
return output;
}
/**
* \f$a_1\f$ Breit-Wigner
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @return The Breit-Wigner
*/
Complex a1BreitWigner(Energy2 q2) const {
Complex ii(0.,1.);
Energy2 m2(_a1mass*_a1mass);
Energy q(sqrt(q2));
return m2/(m2-q2-ii*q*a1Width(q2));
}
/**
* The \f$K_1\f$ Breit-Wigner
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @return The Breit-Wigner
*/
Complex K1BreitWigner(Energy2 q2) const {
Energy2 m2 = sqr(_k1mass);
Complex ii(0.,1.);
complex<Energy2> fact(m2 - ii*_k1mass*_k1width);
return fact/(fact-q2);
}
/**
* The \f$a_1\f$ running width
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @return The \f$a_1\f$ running width.
*/
Energy a1Width(Energy2 q2) const {
Energy output;
if(!_a1opt) output = _a1mass*_a1width*g(q2)/g(sqr(_a1mass))/sqrt(q2);
else output = (*_a1runinter)(q2);
return output;
}
/**
* The \f$g(Q^2)\f$ function of Kuhn and Santamaria
*/
double g(Energy2 q2) const {
double output;
if(q2 < 9.*sqr(_mpi)) {
output=0.;
}
else if(q2 < sqr(_rhoF123masses[0]+_mpi)) {
double diff = (q2-9.*sqr(_mpi))/GeV2;
output = 4.1*sqr(diff)*diff*(1.-3.3*diff+5.8*sqr(diff));
}
else {
double ratio = q2/GeV2;
output = ratio*(1.623+10.38/ratio-9.32/sqr(ratio)+0.65/(ratio*sqr(ratio)));
}
return output;
}
/**
* Initialize the \f$a_1\f$ running width
* @param iopt Initialization option (-1 full calculation, 0 set up the interpolation)
*/
void inita1Width(int iopt);
/**
* Breit-Wigners for the \f$\rho\f$ and \f$K^*\f$.
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner.
* @param itype The type of Breit-Wigner, \e i.e. which masses and widths to use.x
* @param ires Which multiplet to use.
*/
Complex rhoKBreitWigner(Energy2 q2,unsigned int itype,unsigned int ires) const;
private:
/**
* Parameters for the \f$\rho\f$ Breit-Wigner in the
* \f$F_{1,2,3}\f$ form factors.
*/
vector<double> _rhoF123wgts;
/**
* Parameters for the \f$K^*\f$ Breit-Wigner in the
* \f$F_{1,2,3}\f$ form factors.
*/
vector<double> _kstarF123wgts;
/**
* Parameters for the \f$\rho\f$ Breit-Wigner in the
* \f$F_5\f$ form factors.
*/
vector<double> _rhoF5wgts;
/**
* Parameters for the \f$K^*\f$ Breit-Wigner in the
* \f$F_5\f$ form factors.
*/
vector<double> _kstarF5wgts;
/**
* The relative weight of the \f$\rho\f$ and \f$K^*\f$ where needed.
*/
double _rhoKstarwgt;
/**
* The \f$a_1\f$ width for the running \f$a_1\f$ width calculation.
*/
vector<Energy> _a1runwidth;
/**
* The \f$q^2\f$ for the running \f$a_1\f$ width calculation.
*/
vector<Energy2> _a1runq2;
/**
* The interpolator for the running \f$a_1\f$ width calculation.
*/
Interpolator<Energy,Energy2>::Ptr _a1runinter;
/**
* Initialize the running \f$a_1\f$ width.
*/
bool _initializea1;
/**
* The mass of the \f$a_1\f$ resonances.
*/
Energy _a1mass;
/**
* The width of the \f$a_1\f$ resonances.
*/
Energy _a1width;
/**
* The mass of the \f$aK1\f$ resonances.
*/
Energy _k1mass;
/**
* The width of the \f$K_1\f$ resonances.
*/
Energy _k1width;
/**
* The pion decay constant, \f$f_\pi\f$.
*/
Energy _fpi;
/**
* The pion mass
*/
Energy _mpi;
/**
* The kaon mass
*/
Energy _mK;
/**
* use local values of the \f$\rho\f$ masses and widths
*/
bool _rhoparameters;
/**
* The \f$\rho\f$ masses for the \f$F_{1,2,3}\f$ form factors.
*/
vector<Energy> _rhoF123masses;
/**
* The \f$\rho\f$ masses for the \f$F_5\f$ form factors.
*/
vector<Energy> _rhoF5masses;
/**
* The \f$\rho\f$ widths for the \f$F_{1,2,3}\f$ form factors.
*/
vector<Energy> _rhoF123widths;
/**
* The \f$\rho\f$ widths for the \f$F_5\f$ form factors.
*/
vector<Energy> _rhoF5widths;
/**
* use local values of the \f$K^*\f$ resonances masses and widths
*/
bool _kstarparameters;
/**
* The \f$K^*\f$ masses for the \f$F_{1,2,3}\f$ form factors.
*/
vector<Energy> _kstarF123masses;
/**
* The \f$K^*\f$ masses for the \f$F_5\f$ form factors.
*/
vector<Energy> _kstarF5masses;
/**
* The \f$K^*\f$ widths for the \f$F_{1,2,3}\f$ form factors.
*/
vector<Energy> _kstarF123widths;
/**
* The \f$K^*\f$ widths for the \f$F_5\f$ form factors.
*/
vector<Energy> _kstarF5widths;
/**
* Use local values of the \f$a_1\f$ parameters
*/
bool _a1parameters;
/**
* Use local values of the \f$K_1\f$ parameters
*/
bool _k1parameters;
/**
* Option for the \f$a_1\f$ width
*/
bool _a1opt;
/**
* The maximum mass of the hadronic system
*/
Energy _maxmass;
/**
* The maximum mass when the running width was calculated
*/
Energy _maxcalc;
};
}
#endif /* THEPEG_ThreeMesonDefaultCurrent_H */
diff --git a/Decay/WeakCurrents/ThreePionCLEOCurrent.cc b/Decay/WeakCurrents/ThreePionCLEOCurrent.cc
--- a/Decay/WeakCurrents/ThreePionCLEOCurrent.cc
+++ b/Decay/WeakCurrents/ThreePionCLEOCurrent.cc
@@ -1,1086 +1,1086 @@
// -*- C++ -*-
//
// ThreePionCLEOCurrent.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ThreePionCLEOCurrent class.
//
#include "ThreePionCLEOCurrent.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/PDT/ThreeBodyAllOnCalculator.h"
#include "ThePEG/Utilities/DescribeClass.h"
using namespace Herwig;
DescribeClass<ThreePionCLEOCurrent,ThreeMesonCurrentBase>
describeHerwigThreePionCLEOCurrent("Herwig::ThreePionCLEOCurrent",
"HwWeakCurrents.so");
HERWIG_INTERPOLATOR_CLASSDESC(ThreePionCLEOCurrent,Energy,Energy2)
ThreePionCLEOCurrent::ThreePionCLEOCurrent() {
// local particle properties
_localparameters=true;
// rho masses and widths
if(_rhomass.size()==0) {
_rhomass.push_back(0.7743*GeV);_rhowidth.push_back(0.1491*GeV);
_rhomass.push_back(1.370*GeV);_rhowidth.push_back(0.386*GeV);
}
// f_2 mass and width
_f2mass=1.275*GeV;_f2width=0.185*GeV;
// f_0(1370) mass and width
_f0mass=1.186*GeV;_f0width=0.350*GeV;
// sigma mass and width
_sigmamass = 0.860*GeV;_sigmawidth =0.880*GeV;
// a1 mass and width
_a1mass = 1.331*GeV;_a1width=0.814*GeV;
// parameters for the K K* contribution to the a_1 running width
_mKstar = 894*MeV;
_mK=496*MeV;
_gammk=3.32;
// pion decay constant
_fpi = 130.7*MeV/sqrt(2.);
// couplings and phases for the different channels
// p-wave rho and rho prime
using Constants::pi;
if(_rhomagP.size()==0) {
_rhomagP.push_back(1.) ;_rhophaseP.push_back(0.);
_rhomagP.push_back(0.12);_rhophaseP.push_back(0.99*pi);
}
// d-wave rho and rho prime
if(_rhomagD.size()==0) {
_rhomagD.push_back(0.37/GeV2);_rhophaseD.push_back(-0.15*pi);
_rhomagD.push_back(0.87/GeV2);_rhophaseD.push_back( 0.53*pi);
}
// f_2
_f2mag=0.71/GeV2;_f2phase=0.56*pi;_f2coup=ZERO;
// sigma
_sigmamag=2.10;_sigmaphase=0.23*pi;_sigmacoup=0.;
// f_0
_f0mag=0.77;_f0phase=-0.54*pi;_f0coup=0.;
// initialize the a_1 width
_initializea1=false;
_a1opt=true;
double a1q2in[200]={0 ,15788.6,31577.3,47365.9,63154.6,78943.2,
94731.9,110521 ,126309 ,142098 ,157886 ,173675 ,
189464 ,205252 ,221041 ,236830 ,252618 ,268407 ,
284196 ,299984 ,315773 ,331562 ,347350 ,363139 ,
378927 ,394716 ,410505 ,426293 ,442082 ,457871 ,
473659 ,489448 ,505237 ,521025 ,536814 ,552603 ,
568391 ,584180 ,599969 ,615757 ,631546 ,647334 ,
663123 ,678912 ,694700 ,710489 ,726278 ,742066 ,
757855 ,773644 ,789432 ,805221 ,821010 ,836798 ,
852587 ,868375 ,884164 ,899953 ,915741 ,931530 ,
947319 ,963107 ,978896 ,994685 ,
1.01047e+06,1.02626e+06,1.04205e+06,1.05784e+06,
1.07363e+06,1.08942e+06,1.10521e+06,1.12099e+06,
1.13678e+06,1.15257e+06,1.16836e+06,1.18415e+06,
1.19994e+06,1.21573e+06,1.23151e+06,1.24730e+06,
1.26309e+06,1.27888e+06,1.29467e+06,1.31046e+06,
1.32625e+06,1.34203e+06,1.35782e+06,1.37361e+06,
1.38940e+06,1.40519e+06,1.42098e+06,1.43677e+06,
1.45256e+06,1.46834e+06,1.48413e+06,1.49992e+06,
1.51571e+06,1.53150e+06,1.54729e+06,1.56308e+06,
1.57886e+06,1.59465e+06,1.61044e+06,1.62623e+06,
1.64202e+06,1.65781e+06,1.67360e+06,1.68939e+06,
1.70517e+06,1.72096e+06,1.73675e+06,1.75254e+06,
1.76833e+06,1.78412e+06,1.79991e+06,1.81569e+06,
1.83148e+06,1.84727e+06,1.86306e+06,1.87885e+06,
1.89464e+06,1.91043e+06,1.92621e+06,1.94200e+06,
1.95779e+06,1.97358e+06,1.98937e+06,2.00516e+06,
2.02095e+06,2.03674e+06,2.05252e+06,2.06831e+06,
2.08410e+06,2.09989e+06,2.11568e+06,2.13147e+06,
2.14726e+06,2.16304e+06,2.17883e+06,2.19462e+06,
2.21041e+06,2.22620e+06,2.24199e+06,2.25778e+06,
2.27356e+06,2.28935e+06,2.30514e+06,2.32093e+06,
2.33672e+06,2.35251e+06,2.36830e+06,2.38409e+06,
2.39987e+06,2.41566e+06,2.43145e+06,2.44724e+06,
2.46303e+06,2.47882e+06,2.49461e+06,2.51039e+06,
2.52618e+06,2.54197e+06,2.55776e+06,2.57355e+06,
2.58934e+06,2.60513e+06,2.62092e+06,2.63670e+06,
2.65249e+06,2.66828e+06,2.68407e+06,2.69986e+06,
2.71565e+06,2.73144e+06,2.74722e+06,2.76301e+06,
2.77880e+06,2.79459e+06,2.81038e+06,2.82617e+06,
2.84196e+06,2.85774e+06,2.87353e+06,2.88932e+06,
2.90511e+06,2.92090e+06,2.93669e+06,2.95248e+06,
2.96827e+06,2.98405e+06,2.99984e+06,3.01563e+06,
3.03142e+06,3.04721e+06,3.06300e+06,3.07879e+06,
3.09457e+06,3.11036e+06,3.12615e+06,3.14194e+06};
double a1widthin[200]={0,0,0,0,0,0,0,0,
0,0,0,0.00021256,0.0107225,0.0554708,0.150142,0.303848,
0.522655,0.81121,1.1736,1.61381,2.13606,2.74499,3.44583,4.24454,
5.14795,6.16391,7.3014,8.57079,9.98398,11.5547,13.2987,15.2344,
17.3827,19.7683,22.4195,25.3695,28.6568,32.3264,36.4311,41.0322,
46.201,52.0203,58.5847,66.0011,74.3871,83.8666,94.5615,106.578,
119.989,134.807,150.968,168.315,186.615,205.576,224.893,244.28,
263.499,282.364,300.748,318.569,335.781,352.367,368.327,383.677,
398.438,412.638,426.306,439.472,452.167,464.421,476.263,487.719,
498.815,509.576,520.024,530.179,540.063,549.693,559.621,568.26,
577.229,586.005,594.604,603.035,611.314,619.447,627.446,635.321,
643.082,650.736,658.288,665.75,673.127,680.427,687.659,694.82,
701.926,708.977,715.983,722.944,729.862,736.752,743.619,750.452,
757.271,764.076,770.874,777.658,784.444,791.233,798.027,804.838,
811.649,818.485,825.342,832.224,839.139,846.082,853.059,860.079,
867.143,874.248,881.409,919.527,945.28,965.514,983.228,999.471,
1014.69,1029.15,1043.05,1056.49,1069.57,1082.36,1094.88,1107.2,
1120.89,1131.4,1143.33,1155.15,1166.92,1178.61,1190.27,1201.92,
1213.55,1225.18,1236.81,1250.06,1260.16,1271.86,1283.64,1295.46,
1307.36,1319.3,1331.34,1343.45,1355.64,1367.93,1380.31,1392.77,
1405.35,1418.03,1430.83,1443.75,1457.17,1469.94,1483.22,1496.64,
1510.18,1523.86,1537.67,1551.64,1565.72,1579.99,1594.38,1608.92,
1623.63,1642.08,1653.51,1668.69,1684.03,1699.53,1715.21,1731.04,
1747.05,1763.23,1779.59,1796.12,1812.83,1829.72,1846.79,1864.04,
1881.49,1899.11,1916.93,1934.93,1953.13,1971.52,1990.12,2008.89};
if(_a1runwidth.empty()) {
vector<double> tmp1(a1widthin,a1widthin+200);
std::transform(tmp1.begin(), tmp1.end(),
back_inserter(_a1runwidth),
[](double x){return x*GeV;});
vector<double> tmp2(a1q2in,a1q2in+200);
_a1runq2.clear();
std::transform(tmp2.begin(), tmp2.end(),
back_inserter(_a1runq2),
[](double x){return x*GeV2;});
}
// zero parameters which will be calculated later to avoid problems
_pf2cc=ZERO;
_pf200=ZERO;
_pf0cc=ZERO;
_pf000=ZERO;
_psigmacc=ZERO;
_psigma00=ZERO;
_mpi0=ZERO;
_mpic=ZERO;
_fact=ZERO;
_maxmass=ZERO;
_maxcalc=ZERO;
}
void ThreePionCLEOCurrent::doinit() {
ThreeMesonCurrentBase::doinit();
// pointers to the particles we need
tPDPtr a1m = getParticleData(ParticleID::a_1minus);
// the different rho resonances
tPDPtr rhom[3];
rhom[0] = getParticleData(-213);
rhom[1] = getParticleData(-100213);
rhom[2] = getParticleData(-30213);
// the sigma
tPDPtr sigma = getParticleData(9000221);
// the f_2
tPDPtr f2=getParticleData(225);
// the f_0
tPDPtr f0=getParticleData(10221);
if(_localparameters) {
// make sure the rho array has enough masses
if(_rhomass.size()<3) {
for(unsigned int ix=_rhomass.size();ix<3;++ix) {
_rhomass.push_back(rhom[ix]->mass());
_rhowidth.push_back(rhom[ix]->width());
}
}
}
// set the local variables if needed
else {
// masses and widths for the particles
_rhomass.resize(3);_rhowidth.resize(3);
for(unsigned int ix=0;ix<3;++ix)
{_rhomass[ix]=rhom[ix]->mass();_rhowidth[ix]=rhom[ix]->width();}
_f2mass=f2->mass();_f2width=f2->width();
_f0mass=f0->mass();_f0width=f0->width();
_sigmamass=sigma->mass();_sigmawidth=sigma->width();
_a1mass=a1m->mass();_a1width=a1m->width();
_mKstar=getParticleData(ParticleID::Kstarplus)->mass();
_mK =getParticleData(ParticleID::Kplus)->mass();
}
// parameters for the breit-wigners
_mpic=getParticleData(ParticleID::piplus)->mass();
_mpi0=getParticleData(ParticleID::pi0)->mass();
// momenta of the decay products for on-shell particles
_psigmacc=Kinematics::pstarTwoBodyDecay(_sigmamass,_mpic,_mpic);
_psigma00=Kinematics::pstarTwoBodyDecay(_sigmamass,_mpi0,_mpi0);
_pf2cc=Kinematics::pstarTwoBodyDecay(_f2mass,_mpic,_mpic);
_pf200=Kinematics::pstarTwoBodyDecay(_f2mass,_mpi0,_mpi0);
_pf0cc=Kinematics::pstarTwoBodyDecay(_f0mass,_mpic,_mpic);
_pf000=Kinematics::pstarTwoBodyDecay(_f0mass,_mpi0,_mpi0);
_prhocc.resize(3);_prhoc0.resize(3);
for(unsigned int ix=0;ix<3;++ix) {
_prhocc[ix]=Kinematics::pstarTwoBodyDecay(_rhomass[ix],_mpic,_mpic);
_prhoc0[ix]=Kinematics::pstarTwoBodyDecay(_rhomass[ix],_mpic,_mpi0);
}
// couplings for the different modes
Complex ii(0.,1.);
_rhocoupP.resize(_rhomagP.size());
for(unsigned int ix=0;ix<_rhomagP.size();++ix)
{_rhocoupP[ix]=_rhomagP[ix]*(cos(_rhophaseP[ix])+ii*sin(_rhophaseP[ix]));}
_rhocoupD.resize(_rhomagD.size());
for(unsigned int ix=0;ix<_rhomagD.size();++ix)
{_rhocoupD[ix]=_rhomagD[ix]*(cos(_rhophaseD[ix])+ii*sin(_rhophaseD[ix]));}
_f0coup=_f0mag*(cos(_f0phase)+ii*sin(_f0phase));
_f2coup=_f2mag*(cos(_f2phase)+ii*sin(_f2phase));
_sigmacoup=_sigmamag*(cos(_sigmaphase)+ii*sin(_sigmaphase));
// overall coupling
_fact = 2.*sqrt(2.)/_fpi/3.;
// initialise the a_1 running width calculation
inita1Width(-1);
}
void ThreePionCLEOCurrent::persistentOutput(PersistentOStream & os) const {
os << ounit(_rhomass,GeV) << ounit(_rhowidth,GeV) << ounit(_prhocc,GeV) << ounit(_prhoc0,GeV)
<< ounit(_f2mass,GeV) << ounit(_f2width,GeV) << ounit(_pf2cc,GeV)
<< ounit(_pf200,GeV) << ounit(_f0mass,GeV) << ounit(_f0width,GeV)
<< ounit(_pf0cc,GeV) << ounit(_pf000,GeV)
<< ounit(_sigmamass,GeV) << ounit(_sigmawidth,GeV)
<< ounit(_psigmacc,GeV) << ounit(_psigma00,GeV) << ounit(_mpi0,GeV) << ounit(_mpic,GeV)
<< ounit(_fpi,GeV) << ounit(_fact,1/GeV)
<< _rhomagP << _rhophaseP
<< _rhocoupP << ounit(_rhomagD,1/GeV2) << _rhophaseD
<< ounit(_rhocoupD,1/GeV2) <<ounit(_f2mag,1/GeV2) << _f2phase << ounit(_f2coup ,1/GeV2)
<< _f0mag << _f0phase << _f0coup << _sigmamag << _sigmaphase << _sigmacoup
<< _localparameters
<< ounit(_a1mass,GeV) << ounit(_a1width,GeV) << ounit(_a1runwidth,GeV)
<< ounit(_a1runq2,GeV2) << _initializea1
<< ounit(_mKstar,GeV) << ounit(_mK,GeV) << _gammk << _a1opt
<< ounit(_maxmass,GeV) << ounit(_maxcalc,GeV) << _a1runinter;
}
void ThreePionCLEOCurrent::persistentInput(PersistentIStream & is, int) {
is >> iunit(_rhomass,GeV) >> iunit(_rhowidth,GeV) >> iunit(_prhocc,GeV) >> iunit(_prhoc0,GeV)
>> iunit(_f2mass,GeV) >> iunit(_f2width,GeV) >> iunit(_pf2cc,GeV)
>> iunit(_pf200,GeV) >> iunit(_f0mass,GeV) >> iunit(_f0width,GeV)
>> iunit(_pf0cc,GeV) >> iunit(_pf000,GeV)
>> iunit(_sigmamass,GeV) >> iunit(_sigmawidth,GeV)
>> iunit(_psigmacc,GeV) >> iunit(_psigma00,GeV) >> iunit(_mpi0,GeV) >> iunit(_mpic,GeV)
>> iunit(_fpi,GeV) >> iunit(_fact,1/GeV)
>> _rhomagP >> _rhophaseP
>> _rhocoupP >> iunit(_rhomagD,1/GeV2) >> _rhophaseD >> iunit(_rhocoupD,1/GeV2)
>> iunit(_f2mag,1/GeV2) >> _f2phase >> iunit(_f2coup,1/GeV2)
>> _f0mag >> _f0phase >> _f0coup >> _sigmamag >> _sigmaphase >> _sigmacoup
>> _localparameters
>> iunit(_a1mass,GeV) >> iunit(_a1width,GeV) >> iunit(_a1runwidth,GeV)
>> iunit(_a1runq2,GeV2) >> _initializea1
>> iunit(_mKstar,GeV) >> iunit(_mK,GeV) >> _gammk >> _a1opt
>> iunit(_maxmass,GeV) >> iunit(_maxcalc,GeV) >> _a1runinter;
}
void ThreePionCLEOCurrent::Init() {
static ClassDocumentation<ThreePionCLEOCurrent> documentation
("The ThreePionCLEOCurrent class performs the decay of the"
" tau to three pions using the currents from CLEO",
"The decay of tau to three pions is modelled using the currents from "
"\\cite{Asner:1999kj}.",
" %\\cite{Asner:1999kj}\n"
"\\bibitem{Asner:1999kj}\n"
" D.~M.~Asner {\\it et al.} [CLEO Collaboration],\n"
" ``Hadronic structure in the decay tau- --> nu/tau pi- pi0 pi0 and the sign\n"
" %of the tau neutrino helicity,''\n"
" Phys.\\ Rev.\\ D {\\bf 61}, 012002 (2000)\n"
" [arXiv:hep-ex/9902022].\n"
" %%CITATION = PHRVA,D61,012002;%%\n"
);
static ParVector<ThreePionCLEOCurrent,Energy> interfacerhomass
("RhoMasses",
"The masses of the different rho resonnaces",
&ThreePionCLEOCurrent::_rhomass,
MeV, 0, ZERO, -10000*MeV, 10000*MeV, false, false, true);
static ParVector<ThreePionCLEOCurrent,Energy> interfacerhowidth
("RhoWidths",
"The widths of the different rho resonnaces",
&ThreePionCLEOCurrent::_rhowidth,
MeV, 0, ZERO, -10000*MeV, 10000*MeV, false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacef_2Mass
("f_2Mass",
"The mass of the f_2 meson",
&ThreePionCLEOCurrent::_f2mass, GeV, 1.275*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacef_2Width
("f_2Width",
"The width of the f_2 meson",
&ThreePionCLEOCurrent::_f2width, GeV, 0.185*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacef_0Mass
("f_0Mass",
"The mass of the f_0 meson",
&ThreePionCLEOCurrent::_f0mass, GeV, 1.186*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacef_0Width
("f_0Width",
"The width of the f_0 meson",
&ThreePionCLEOCurrent::_f0width, GeV, 0.350*GeV, ZERO, 1.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacesigmaMass
("sigmaMass",
"The mass of the sigma meson",
&ThreePionCLEOCurrent::_sigmamass, GeV, 0.860*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacesigmaWidth
("sigmaWidth",
"The width of the sigma meson",
&ThreePionCLEOCurrent::_sigmawidth, GeV, 0.880*GeV, ZERO, 2.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacea1Mass
("a1Mass",
"The mass of the a_1 meson",
&ThreePionCLEOCurrent::_a1mass, GeV, 1.331*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfacea1Width
("a1Width",
"The width of the a_1 meson",
&ThreePionCLEOCurrent::_a1width, GeV, 0.814*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfaceKaonMass
("KaonMass",
"The mass of the kaon",
&ThreePionCLEOCurrent::_mK, GeV, 0.496*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfaceKStarMass
("KStarMass",
"The mass of the k* meson",
&ThreePionCLEOCurrent::_mKstar, GeV, 0.894*GeV, ZERO, 10.0*GeV,
false, false, true);
static Parameter<ThreePionCLEOCurrent,double> interfaceKaonCoupling
("KaonCoupling",
"The relative coupling for the kaon in the a_1 running width",
&ThreePionCLEOCurrent::_gammk, 3.32, 0.0, 10.0,
false, false, true);
static Parameter<ThreePionCLEOCurrent,Energy> interfaceFpi
("Fpi",
"The pion decay constant",
&ThreePionCLEOCurrent::_fpi, MeV, 130.7*MeV/sqrt(2.), ZERO, 500.0*MeV,
false, false, true);
static ParVector<ThreePionCLEOCurrent,double> interfacerhomagP
("RhoPWaveMagnitude",
"The magnitude of the couplings for the p-wave rho currents",
&ThreePionCLEOCurrent::_rhomagP,
0, 0, 0, 0, 10000, false, false, true);
static ParVector<ThreePionCLEOCurrent,double> interfacerhophaseP
("RhoPWavePhase",
"The phase of the couplings for the p-wave rho currents",
&ThreePionCLEOCurrent::_rhophaseP,
0, 0, 0, -Constants::twopi, Constants::twopi, false, false, true);
static ParVector<ThreePionCLEOCurrent,InvEnergy2> interfacerhomagD
("RhoDWaveMagnitude",
"The magnitude of the couplings for the d-wave rho currents",
&ThreePionCLEOCurrent::_rhomagD,
1/MeV2, 0, ZERO, ZERO, 10000/MeV2, false, false, true);
static ParVector<ThreePionCLEOCurrent,double> interfacerhophaseD
("RhoDWavePhase",
"The phase of the couplings for the d-wave rho currents",
&ThreePionCLEOCurrent::_rhophaseD,
0, 0, 0, -Constants::twopi, Constants::twopi, false, false, true);
static Parameter<ThreePionCLEOCurrent,double> interfacef0Phase
("f0Phase",
"The phase of the f_0 scalar current",
&ThreePionCLEOCurrent::_f0phase, 0.54*Constants::pi, -Constants::twopi, Constants::twopi,
false, false, true);
static Parameter<ThreePionCLEOCurrent,double> interfacef2Phase
("f2Phase",
"The phase of the f_2 tensor current",
&ThreePionCLEOCurrent::_f2phase, 0.56*Constants::pi,-Constants::twopi, Constants::twopi,
false, false, true);
static Parameter<ThreePionCLEOCurrent,double> interfacesigmaPhase
("sigmaPhase",
"The phase of the sigma scalar current",
&ThreePionCLEOCurrent::_sigmaphase, 0.23*Constants::pi, -Constants::twopi, Constants::twopi,
false, false, true);
static Parameter<ThreePionCLEOCurrent,double> interfacef0Magnitude
("f0Magnitude",
"The magnitude of the f_0 scalar current",
&ThreePionCLEOCurrent::_f0mag, 0.77, 0.0, 10,
false, false, true);
static Parameter<ThreePionCLEOCurrent,InvEnergy2> interfacef2Magnitude
("f2Magnitude",
"The magnitude of the f_2 tensor current",
&ThreePionCLEOCurrent::_f2mag, 1./GeV2, 0.71/GeV2, ZERO, 10./GeV2,
false, false, true);
static Parameter<ThreePionCLEOCurrent,double> interfacesigmaMagnitude
("sigmaMagnitude",
"The magnitude of the sigma scalar current",
&ThreePionCLEOCurrent::_sigmamag, 2.1, 0.0, 10,
false, false, true);
static Switch<ThreePionCLEOCurrent,bool> interfaceLocalParameters
("LocalParameters",
"Use local values of the intermediate resonances masses and widths",
&ThreePionCLEOCurrent::_localparameters, true, false, false);
static SwitchOption interfaceLocalParametersLocal
(interfaceLocalParameters,
"Local",
"Use the local values",
true);
static SwitchOption interfaceLocalParametersDefault
(interfaceLocalParameters,
"ParticleData",
"Use the values from the particleData objects",
false);
static ParVector<ThreePionCLEOCurrent,Energy> interfacea1RunningWidth
("a1RunningWidth",
"The values of the a_1 width for interpolation to giving the running width.",
&ThreePionCLEOCurrent::_a1runwidth,
MeV, 0, ZERO, ZERO, 10000000*MeV, false, false, true);
static ParVector<ThreePionCLEOCurrent,Energy2> interfacea1RunningQ2
("a1RunningQ2",
"The values of the q^2 for interpolation to giving the running width.",
&ThreePionCLEOCurrent::_a1runq2,
MeV2, 0, ZERO, ZERO, 10000000*MeV2, false, false, true);
static Switch<ThreePionCLEOCurrent,bool> interfaceInitializea1
("Initializea1",
"Initialise the calculation of the a_1 running width",
&ThreePionCLEOCurrent::_initializea1, false, false, false);
static SwitchOption interfaceInitializea1Initialization
(interfaceInitializea1,
"Yes",
"Initialize the calculation",
true);
static SwitchOption interfaceInitializea1NoInitialization
(interfaceInitializea1,
"No",
"Use the default values",
false);
static Switch<ThreePionCLEOCurrent,bool> interfacea1WidthOption
("a1WidthOption",
"Option for the treatment of the a1 width",
&ThreePionCLEOCurrent::_a1opt, true, false, false);
static SwitchOption interfacea1WidthOptionLocal
(interfacea1WidthOption,
"Local",
"Use a calculation of the running width based on the parameters as"
" interpolation table.",
true);
static SwitchOption interfacea1WidthOptionParam
(interfacea1WidthOption,
"Kuhn",
"Use the parameterization of Kuhn and Santamaria for default parameters."
" This should only be used for testing vs TAUOLA",
false);
}
// initialisation of the a_1 width
// (iopt=-1 initialises, iopt=0 starts the interpolation)
void ThreePionCLEOCurrent::inita1Width(int iopt) {
if(iopt==-1) {
_maxcalc=_maxmass;
if(!_initializea1||_maxmass==ZERO) return;
// parameters for the table of values
Energy2 step=sqr(_maxmass)/200.;
// function to be integrated to give the matrix element
// integrator to perform the integral
vector<double> inweights;inweights.push_back(0.5);inweights.push_back(0.5);
vector<int> intype;intype.push_back(2);intype.push_back(3);
Energy mrho=getParticleData(ParticleID::rhoplus)->mass();
Energy wrho=getParticleData(ParticleID::rhoplus)->width();
vector<Energy> inmass;inmass.push_back(mrho);inmass.push_back(mrho);
vector<Energy> inwidth;inwidth.push_back(wrho);inwidth.push_back(wrho);
vector<double> inpow(2,0.0);
ThreeBodyAllOnCalculator<ThreePionCLEOCurrent>
widthgenN(inweights,intype,inmass,inwidth,inpow,*this,0,_mpi0,_mpi0,_mpic);
ThreeBodyAllOnCalculator<ThreePionCLEOCurrent>
widthgenC(inweights,intype,inmass,inwidth,inpow,*this,1,_mpic,_mpic,_mpic);
// normalisation constant to give physical width if on shell
double a1const = _a1width/(widthgenN.partialWidth(sqr(_a1mass))+
widthgenC.partialWidth(sqr(_a1mass)));
// loop to give the values
_a1runq2.clear();_a1runwidth.clear();
for(Energy2 moff2=ZERO; moff2<=sqr(_maxmass); moff2+=step) {
Energy moff=sqrt(moff2);
_a1runq2.push_back(moff2);
Energy charged=a1const*widthgenC.partialWidth(moff2);
Energy neutral=a1const*widthgenN.partialWidth(moff2);
Energy kaon = moff<=_mK+_mKstar ? ZERO : 2.870*_gammk*_gammk/8./Constants::pi*
Kinematics::pstarTwoBodyDecay(moff,_mK,_mKstar)/moff2*GeV2;
Energy total = charged + neutral + kaon;
_a1runwidth.push_back(total);
}
}
// set up the interpolator
else if(iopt==0) {
_a1runinter = make_InterpolatorPtr(_a1runwidth,_a1runq2,3);
}
}
// modes handled by this class
bool ThreePionCLEOCurrent::acceptMode(int imode) const {
return imode>=0&&imode<=1;
}
ThreePionCLEOCurrent::FormFactors ThreePionCLEOCurrent::
calculateFormFactors(const int ichan, const int imode,
Energy2 q2, Energy2 s1, Energy2 s2, Energy2 s3) const {
Complex F1=0., F2=0., F3=0.;//F4=0.;F5=0.;
// calculate the form factors without the a_1 piece
CLEOFormFactor(imode,ichan,q2,s1,s2,s3,F1,F2,F3);
// change sign of the f_2 term
F2=-F2;
// multiply by the a_1 factor
complex<InvEnergy> a1fact = a1BreitWigner(q2) * _fact;
return FormFactors(F1*a1fact, F2*a1fact, F3*a1fact);
}
void ThreePionCLEOCurrent::CLEOFormFactor(int imode,int ichan,
Energy2 q2,Energy2 s1, Energy2 s2, Energy2 s3,
Complex & F1, Complex & F2,
Complex & F3) const {
useMe();
if(imode==0) {
// compute the breit wigners we need
Complex rhos1bw[3],rhos2bw[3],f0bws1,sigbws1,f2bws1,f0bws2,sigbws2,f2bws2;
for(unsigned int ix=0,N=max(_rhocoupP.size(),_rhocoupD.size());ix<N;++ix) {
rhos1bw[ix]=rhoBreitWigner(ix,s1,0);
rhos2bw[ix]=rhoBreitWigner(ix,s2,0);
}
f0bws1 =f0BreitWigner(s1,0);
sigbws1 =sigmaBreitWigner(s1,0);
f2bws1 =f2BreitWigner(s1,0);
f0bws2 =f0BreitWigner(s2,0);
sigbws2 =sigmaBreitWigner(s2,0);
f2bws2 =f2BreitWigner(s2,0);
if(ichan<0) {
// the p-wave rho terms
for(unsigned int ix=0;ix<_rhocoupP.size();++ix) {
F1-=_rhocoupP[ix]*rhos1bw[ix];
F2-=_rhocoupP[ix]*rhos2bw[ix];
}
// the D-wave rho terms
Energy2 Dfact1=1./3.*(s1-s3);
Energy2 Dfact2=1./3.*(s2-s3);
for(unsigned int ix=0;ix<_rhocoupD.size();++ix) {
- F1-=Dfact1*_rhocoupD[ix]*rhos2bw[ix];
- F2-=Dfact2*_rhocoupD[ix]*rhos1bw[ix];
- F3-=_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]);
+ F1-=Complex(Dfact1*_rhocoupD[ix]*rhos2bw[ix]);
+ F2-=Complex(Dfact2*_rhocoupD[ix]*rhos1bw[ix]);
+ F3-=Complex(_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]));
}
// the scalar terms
F1-=2./3.*(_sigmacoup*sigbws2+_f0coup*f0bws2);
F2-=2./3.*(_sigmacoup*sigbws1+_f0coup*f0bws1);
F3+=-2./3.*(_sigmacoup*sigbws1+_f0coup*f0bws1)
+2./3.*(_sigmacoup*sigbws2+_f0coup*f0bws2);
// the tensor terms
complex<Energy2> sfact1 = 1./18.*(4.*_mpic*_mpic-s1)*(q2+s1-_mpic*_mpic)/s1*f2bws1;
complex<Energy2> sfact2 = 1./18.*(4.*_mpic*_mpic-s2)*(q2+s2-_mpic*_mpic)/s2*f2bws2;
- F1+=_f2coup*(0.5*(s3-s2)*f2bws1-sfact2);
- F2+=_f2coup*(0.5*(s3-s1)*f2bws2-sfact1);
- F3+=_f2coup*(-sfact1+sfact2);
+ F1+=Complex(_f2coup*(0.5*(s3-s2)*f2bws1-sfact2));
+ F2+=Complex(_f2coup*(0.5*(s3-s1)*f2bws2-sfact1));
+ F3+=Complex(_f2coup*(-sfact1+sfact2));
}
else if(ichan%2==0&&ichan<=4) {
unsigned int ires=ichan/2;
Energy2 Dfact2=1./3.*(s2-s3);
if(ires<_rhocoupP.size()) F1-=_rhocoupP[ires]*rhos1bw[ires];
if(ires<_rhocoupD.size()) {
- F2-=Dfact2*_rhocoupD[ires]*rhos1bw[ires];
- F3-=_rhocoupD[ires]*Dfact2*rhos1bw[ires];
+ F2-=Complex(Dfact2*_rhocoupD[ires]*rhos1bw[ires]);
+ F3-=Complex(_rhocoupD[ires]*Dfact2*rhos1bw[ires]);
}
}
else if(ichan%2==1&&ichan<=5) {
unsigned int ires=(ichan-1)/2;
Energy2 Dfact1=1./3.*(s1-s3);
if(ires<_rhocoupP.size()) {
F2-=_rhocoupP[ires]*rhos2bw[ires];
}
if(ires<_rhocoupD.size()) {
- F1-=Dfact1*_rhocoupD[ires]*rhos2bw[ires];
- F3+=_rhocoupD[ires]*Dfact1*rhos2bw[ires];
+ F1-=Complex(Dfact1*_rhocoupD[ires]*rhos2bw[ires]);
+ F3+=Complex(_rhocoupD[ires]*Dfact1*rhos2bw[ires]);
}
}
else if(ichan==6) {
F2-=2./3.*_sigmacoup*sigbws1;
F3-=2./3.*_sigmacoup*sigbws1;
}
else if(ichan==7) {
F1-=2./3.*_sigmacoup*sigbws2;
F3+=2./3.*_sigmacoup*sigbws2;
}
else if(ichan==8) {
complex<Energy2> sfact1 = 1./18.*(4.*_mpic*_mpic-s1)*(q2+s1-_mpic*_mpic)/s1*f2bws1;
- F1+=_f2coup*0.5*(s3-s2)*f2bws1;
- F2-=_f2coup*sfact1;
- F3-=_f2coup*sfact1;
+ F1+=Complex(_f2coup*0.5*(s3-s2)*f2bws1);
+ F2-=Complex(_f2coup*sfact1);
+ F3-=Complex(_f2coup*sfact1);
}
else if(ichan==9) {
complex<Energy2> sfact2 = 1./18.*(4.*_mpic*_mpic-s2)*(q2+s2-_mpic*_mpic)/s2*f2bws2;
- F1-=_f2coup*sfact2;
- F2+=_f2coup*0.5*(s3-s1)*f2bws2;
- F3+=_f2coup*sfact2;
+ F1-=Complex(_f2coup*sfact2);
+ F2+=Complex(_f2coup*0.5*(s3-s1)*f2bws2);
+ F3+=Complex(_f2coup*sfact2);
}
else if(ichan==10) {
F2-=2./3.*_f0coup*f0bws1;
F3-=2./3.*_f0coup*f0bws1;
}
else if(ichan==11) {
F1-=2./3.*_f0coup*f0bws2;
F3+=2./3.*_f0coup*f0bws2;
}
}
// calculate the pi0 pi0 pi+ factor
else if(imode==1) {
// compute the breit wigners we need
Complex rhos1bw[3],rhos2bw[3],f0bw,sigbw,f2bw;
for(unsigned int ix=0,N=max(_rhocoupP.size(),_rhocoupD.size());ix<N;++ix) {
rhos1bw[ix]=rhoBreitWigner(ix,s1,1);
rhos2bw[ix]=rhoBreitWigner(ix,s2,1);
}
f0bw =f0BreitWigner(s3,1);
sigbw =sigmaBreitWigner(s3,1);
f2bw =f2BreitWigner(s3,1);
if(ichan<0) {
// the p-wave rho terms
for(unsigned int ix=0;ix<_rhocoupP.size();++ix) {
F1+=_rhocoupP[ix]*rhos1bw[ix];
F2+=_rhocoupP[ix]*rhos2bw[ix];
}
// the D-wave rho terms
Energy2 Dfact1=-1./3.*((s3-_mpic*_mpic)-(s1-_mpi0*_mpi0));
Energy2 Dfact2=-1./3.*((s3-_mpic*_mpic)-(s2-_mpi0*_mpi0));
for(unsigned int ix=0;ix<_rhocoupD.size();++ix) {
- F1+=Dfact1*_rhocoupD[ix]*rhos2bw[ix];
- F2+=Dfact2*_rhocoupD[ix]*rhos1bw[ix];
- F3+=_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]);
+ F1+=Complex(Dfact1*_rhocoupD[ix]*rhos2bw[ix]);
+ F2+=Complex(Dfact2*_rhocoupD[ix]*rhos1bw[ix]);
+ F3+=Complex(_rhocoupD[ix]*(Dfact2*rhos1bw[ix]-Dfact1*rhos2bw[ix]));
}
// the scalar terms
Complex scalar=2./3.*(_sigmacoup*sigbw+_f0coup*f0bw);
F1+=scalar;F2+=scalar;
// the tensor terms
Complex Dfact3=1./18./s3*_f2coup*(q2-_mpic*_mpic+s3)*(4.*_mpi0*_mpi0-s3)*f2bw;
F1+=Dfact3;F2+=Dfact3;
- F3-=0.5*_f2coup*(s1-s2)*f2bw;
+ F3-=Complex(0.5*_f2coup*(s1-s2)*f2bw);
}
else if(ichan%2==0&&ichan<=4) {
unsigned int ires=ichan/2;
if(ires<_rhocoupP.size()){F1+=_rhocoupP[ires]*rhos1bw[ires];}
Energy2 Dfact2=-1./3.*((s3-_mpic*_mpic)-(s2-_mpi0*_mpi0));
if(ires<_rhocoupD.size()) {
- F2+=Dfact2*_rhocoupD[ires]*rhos1bw[ires];
- F3+=_rhocoupD[ires]*Dfact2*rhos1bw[ires];
+ F2+=Complex(Dfact2*_rhocoupD[ires]*rhos1bw[ires]);
+ F3+=Complex(_rhocoupD[ires]*Dfact2*rhos1bw[ires]);
}
}
else if(ichan%2==1&&ichan<=5) {
unsigned int ires=(ichan-1)/2;
if(ires<_rhocoupP.size()){F2+=_rhocoupP[ires]*rhos2bw[ires];}
Energy2 Dfact1=-1./3.*((s3-_mpic*_mpic)-(s1-_mpi0*_mpi0));
if(ires<_rhocoupD.size()) {
- F1+=Dfact1*_rhocoupD[ires]*rhos2bw[ires];
- F3-=_rhocoupD[ires]*Dfact1*rhos2bw[ires];
+ F1+=Complex(Dfact1*_rhocoupD[ires]*rhos2bw[ires]);
+ F3-=Complex(_rhocoupD[ires]*Dfact1*rhos2bw[ires]);
}
}
else if(ichan==6) {
F1+=2./3.*_sigmacoup*sigbw;
F2+=2./3.*_sigmacoup*sigbw;
}
else if(ichan==7) {
Complex Dfact3=1./18./s3*_f2coup*(q2-_mpic*_mpic+s3)*(4.*_mpi0*_mpi0-s3)*f2bw;
F1+=Dfact3;F2+=Dfact3;
- F3-=0.5*_f2coup*(s1-s2)*f2bw;
+ F3-=Complex(0.5*_f2coup*(s1-s2)*f2bw);
}
else if(ichan==8) {
F1+=2./3.*_f0coup*f0bw;
F2+=2./3.*_f0coup*f0bw;
}
}
else {
throw DecayIntegratorError() << "ThreePionCLEOCurrent Unknown Decay" << imode
<< Exception::abortnow;
}
// identical particle factors
double fact = 1./sqrt(2.);
F1*=fact;F2*=fact;F3*=fact;
}
// complete the construction of the decay mode for integration
bool ThreePionCLEOCurrent::createMode(int icharge, unsigned int imode,
DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp) {
if(!acceptMode(imode)){return false;}
int iq(0),ia(0);
tPDVector extpart=particles(1,imode,iq,ia);
Energy min(ZERO);
for(unsigned int ix=0;ix<extpart.size();++ix) min+=extpart[ix]->massMin();
if(min>upp) return false;
_maxmass=max(_maxmass,upp);
// pointers to the particles we need
tPDPtr a1m = getParticleData(ParticleID::a_1minus);
// the different rho resonances
tPDPtr rhom[3];
if(icharge==-3) {
rhom[0] = getParticleData(-213);
rhom[1] = getParticleData(-100213);
rhom[2] = getParticleData(-30213);
}
else if(icharge==3) {
rhom[0] = getParticleData(213);
rhom[1] = getParticleData(100213);
rhom[2] = getParticleData(30213);
}
else {
return false;
}
tPDPtr rho0[3] = {getParticleData(113),getParticleData(100113),
getParticleData(30113)};
// the sigma
tPDPtr sigma = getParticleData(9000221);
// the f_2
tPDPtr f2=getParticleData(225);
// the f_0
tPDPtr f0=getParticleData(10221);
// set up the integration channels
DecayPhaseSpaceChannelPtr newchannel;
if(imode==0) {
for(unsigned int ix=0;ix<3;++ix) {
if(!rho0[ix]) continue;
// the neutral rho channels
// first channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc);
newchannel->addIntermediate(rho0[ix],0,0.0,iloc+1,iloc+2);
mode->addChannel(newchannel);
// interchanged channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+1);
newchannel->addIntermediate(rho0[ix],0,0.0,iloc,iloc+2);
mode->addChannel(newchannel);
}
// the sigma channels
if(sigma) {
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc);
newchannel->addIntermediate(sigma,0,0.0,iloc+1,iloc+2);
mode->addChannel(newchannel);
// interchanged channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+1);
newchannel->addIntermediate(sigma,0,0.0,iloc,iloc+2);
mode->addChannel(newchannel);
}
// the f_2 channels
if(f2) {
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc);
newchannel->addIntermediate(f2,0,0.0,iloc+1,iloc+2);
mode->addChannel(newchannel);
// interchanged channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+1);
newchannel->addIntermediate(f2,0,0.0,iloc,iloc+2);
mode->addChannel(newchannel);
}
if(f0) {
// the f_0 channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc);
newchannel->addIntermediate(f0,0,0.0,iloc+1,iloc+2);
mode->addChannel(newchannel);
// interchanged channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+1);
newchannel->addIntermediate(f0,0,0.0,iloc,iloc+2);
mode->addChannel(newchannel);
}
}
else {
for(unsigned int ix=0;ix<3;++ix) {
if(!rhom[ix]) continue;
// first rho+ channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc);
newchannel->addIntermediate(rhom[ix],0,0.0,iloc+2,iloc+1);
mode->addChannel(newchannel);
// second rho+ channel
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+1);
newchannel->addIntermediate(rhom[ix],0,0.0,iloc+2,iloc);
mode->addChannel(newchannel);
}
// the sigma channel
if(sigma) {
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+2);
newchannel->addIntermediate(sigma,0,0.0,iloc,iloc+1);
mode->addChannel(newchannel);
}
// the f_2 channel
if(f2) {
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+2);
newchannel->addIntermediate(f2,0,0.0,iloc,iloc+1);
mode->addChannel(newchannel);
}
// the f_0 channel
if(f0) {
newchannel = new_ptr(DecayPhaseSpaceChannel(*phase));
newchannel->addIntermediate(a1m,0,0.0,-ires-1,iloc+2);
newchannel->addIntermediate(f0,0,0.0,iloc,iloc+1);
mode->addChannel(newchannel);
}
}
if(_localparameters) {
for(unsigned int iy=0;iy<_rhomass.size();++iy) {
if(rho0[iy]) mode->resetIntermediate(rho0[iy],_rhomass[iy],_rhowidth[iy]);
if(rhom[iy]) mode->resetIntermediate(rhom[iy],_rhomass[iy],_rhowidth[iy]);
}
if(sigma) mode->resetIntermediate(sigma,_sigmamass,_sigmawidth);
if(f2) mode->resetIntermediate(f2,_f2mass,_f2width);
if(f0) mode->resetIntermediate(f0,_f0mass,_f0width);
mode->resetIntermediate(a1m,_a1mass,_a1width);
}
return true;
}
void ThreePionCLEOCurrent::dataBaseOutput(ofstream & output,bool header,
bool create) const {
if(header){output << "update decayers set parameters=\"";}
if(create) {
output << "create Herwig::ThreePionCLEOCurrent " << name()
<< " HwWeakCurrents.so\n";
}
for(unsigned int ix=0;ix<_rhomass.size();++ix) {
if(ix<2) {
output << "newdef " << name() << ":RhoMasses " << ix
<< " " << _rhomass[ix]/MeV << "\n";
}
else {
output << "insert " << name() << ":RhoMasses " << ix
<< " " << _rhomass[ix]/MeV << "\n";
}
}
for(unsigned int ix=0;ix<_rhowidth.size();++ix) {
if(ix<2) {
output << "newdef " << name() << ":RhoWidths " << ix
<< " " << _rhowidth[ix]/MeV << "\n";
}
else {
output << "insert " << name() << ":RhoWidths " << ix
<< " " << _rhowidth[ix]/MeV << "\n";
}
}
output << "newdef " << name() << ":f_2Mass " << _f2mass/GeV << "\n";
output << "newdef " << name() << ":f_2Width " << _f2width/GeV << "\n";
output << "newdef " << name() << ":f_0Mass " << _f0mass/GeV << "\n";
output << "newdef " << name() << ":f_0Width " << _f0width/GeV << "\n";
output << "newdef " << name() << ":sigmaMass " << _sigmamass/GeV << "\n";
output << "newdef " << name() << ":sigmaWidth " << _sigmawidth/GeV << "\n";
output << "newdef " << name() << ":a1Mass " << _a1mass/GeV << "\n";
output << "newdef " << name() << ":a1Width " <<_a1width /GeV << "\n";
output << "newdef " << name() << ":KaonMass " << _mK/GeV << "\n";
output << "newdef " << name() << ":KStarMass " << _mKstar/GeV << "\n";
output << "newdef " << name() << ":KaonCoupling " << _gammk << "\n";
output << "newdef " << name() << ":Fpi " << _fpi/MeV << "\n";
output << "newdef " << name() << ":a1WidthOption " << _a1opt << "\n";
for(unsigned int ix=0;ix<_rhomagP.size();++ix) {
if(ix<2) {
output << "newdef " << name() << ":RhoPWaveMagnitude " << ix
<< " " << _rhomagP[ix] << "\n";
}
else {
output << "insert " << name() << ":RhoPWaveMagnitude " << ix
<< " " << _rhomagP[ix] << "\n";
}
}
for(unsigned int ix=0;ix<_rhophaseP.size();++ix) {
if(ix<2) {
output << "newdef " << name() << ":RhoPWavePhase " << ix
<< " " << _rhophaseP[ix] << "\n";
}
else {
output << "insert " << name() << ":RhoPWavePhase " << ix
<< " " << _rhophaseP[ix] << "\n";
}
}
for(unsigned int ix=0;ix<_rhomagD.size();++ix) {
if(ix<2) {
output << "newdef " << name() << ":RhoDWaveMagnitude " << ix
<< " " << _rhomagD[ix]*MeV2 << "\n";
}
else {
output << "insert " << name() << ":RhoDWaveMagnitude " << ix
<< " " << _rhomagD[ix]*MeV2 << "\n";
}
}
for(unsigned int ix=0;ix<_rhophaseD.size();++ix) {
if(ix<2) {
output << "newdef " << name() << ":RhoDWavePhase " << ix
<< " " << _rhophaseD[ix] << "\n";
}
else {
output << "insert " << name() << ":RhoDWavePhase " << ix
<< " " << _rhophaseD[ix] << "\n";
}
}
output << "newdef " << name() << ":f0Phase " << _f0phase << "\n";
output << "newdef " << name() << ":f2Phase " <<_f2phase << "\n";
output << "newdef " << name() << ":sigmaPhase " <<_sigmaphase << "\n";
output << "newdef " << name() << ":f0Magnitude " << _f0mag << "\n";
output << "newdef " << name() << ":f2Magnitude " << _f2mag*GeV2 << "\n";
output << "newdef " << name() << ":sigmaMagnitude " <<_sigmamag << "\n";
output << "newdef " << name() << ":LocalParameters " << _localparameters << "\n";
output << "newdef " << name() << ":Initializea1 " <<_initializea1 << "\n";
for(unsigned int ix=0;ix<_a1runwidth.size();++ix) {
if(ix<200) {
output << "newdef " << name() << ":a1RunningWidth " << ix
<< " " << _a1runwidth[ix]/MeV << "\n";
}
else {
output << "insert " << name() << ":a1RunningWidth " << ix
<< " " << _a1runwidth[ix]/MeV << "\n";
}
}
for(unsigned int ix=0;ix<_a1runq2.size();++ix) {
if(ix<200) {
output << "newdef " << name() << ":a1RunningQ2 " << ix
<< " " << _a1runq2[ix]/MeV2 << "\n";
}
else {
output << "insert " << name() << ":a1RunningQ2 " << ix
<< " " << _a1runq2[ix]/MeV2 << "\n";
}
}
ThreeMesonCurrentBase::dataBaseOutput(output,false,false);
if(header) output << "\n\" where BINARY ThePEGName=\""
<< fullName() << "\";" << endl;
}
void ThreePionCLEOCurrent::doinitrun() {
// set up the running a_1 width
inita1Width(0);
ThreeMesonCurrentBase::doinitrun();
}
void ThreePionCLEOCurrent::doupdate() {
ThreeMesonCurrentBase::doupdate();
// update running width if needed
if ( !touched() ) return;
if(_maxmass!=_maxcalc) inita1Width(-1);
}
Energy ThreePionCLEOCurrent::a1width(Energy2 q2) const {
Energy output;
if(_a1opt) output=(*_a1runinter)(q2);
else {
double gam(0.);
if(q2<0.1753*GeV2) {
gam =0.;
}
else if(q2<0.823*GeV2) {
double p=q2/GeV2-0.1753;
gam = 5.80900*p*sqr(p)*(1.-3.00980*p+4.57920*sqr(p));
}
else {
double p=q2/GeV2;
gam = -13.91400+27.67900*p-13.39300*sqr(p)
+3.19240*sqr(p)*p-0.10487*sqr(sqr(p));
}
if(q2<0.1676*GeV2) {
gam+=0.;
}
else if(q2<0.823*GeV2) {
double p=q2/GeV2-0.1676;
gam+= 6.28450*p*sqr(p)*(1.-2.95950*p+4.33550*sqr(p));
}
else {
double p=q2/GeV2;
gam+= -15.41100+32.08800*p-17.66600*sqr(p)
+4.93550*sqr(p)*p-0.37498*sqr(sqr(p));
}
Energy mkst=0.894*GeV,mk=0.496*GeV;
Energy2 mk1sq=sqr(mkst+mk), mk2sq=sqr(mkst-mk);
double c3pi=sqr(0.2384),ckst=sqr(4.7621)*c3pi;
gam*=c3pi;
if(q2>mk1sq) gam+=0.5*ckst*sqrt((q2-mk1sq)*(q2-mk2sq))/q2;
gam = gam*_a1width*_a1mass/GeV2/1.331/0.814/1.0252088;
output = gam*GeV2/sqrt(q2);
}
return output;
}
double
ThreePionCLEOCurrent::threeBodyMatrixElement(const int iopt, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy,
const Energy, const Energy) const {
Energy p1[5],p2[5],p3[5];
Energy2 p1sq, p2sq, p3sq;
Energy q=sqrt(q2);
Energy2 mpi2c=_mpic*_mpic;
Energy2 mpi20=_mpi0*_mpi0;
// construct the momenta for the 2 neutral 1 charged mode
Complex F1,F2,F3;
if(iopt==0) {
// construct the momenta of the decay products
p1[0] = 0.5*(q2+mpi20-s1)/q; p1sq=p1[0]*p1[0]; p1[4]=sqrt(p1sq-mpi20);
p2[0] = 0.5*(q2+mpi20-s2)/q; p2sq=p2[0]*p2[0]; p2[4]=sqrt(p2sq-mpi20);
p3[0] = 0.5*(q2+mpi2c-s3)/q; p3sq=p3[0]*p3[0]; p3[4]=sqrt(p3sq-mpi2c);
// take momentum of 1 parallel to z axis
p1[1]=ZERO;p1[2]=ZERO;p1[3]=p1[4];
// construct 2
double cos2 = 0.5*(p1sq+p2sq-p3sq-2.*mpi20+mpi2c)/p1[4]/p2[4];
p2[1] = p2[4]*sqrt(1.-cos2*cos2); p2[2]=ZERO; p2[3]=-p2[4]*cos2;
// construct 3
double cos3 = 0.5*(p1sq-p2sq+p3sq-mpi2c)/p1[4]/p3[4];
p3[1] =-p3[4]*sqrt(1.-cos3*cos3); p3[2]=ZERO; p3[3]=-p3[4]*cos3;
// calculate the form factors
CLEOFormFactor(1,-1,q2,s1,s2,s3,F1,F2,F3);
}
// construct the momenta for the 3 charged mode
else {
// construct the momenta of the decay products
p1[0] = 0.5*(q2+mpi2c-s1)/q; p1sq=p1[0]*p1[0]; p1[4]=sqrt(p1sq-mpi2c);
p2[0] = 0.5*(q2+mpi2c-s2)/q; p2sq=p2[0]*p2[0]; p2[4]=sqrt(p2sq-mpi2c);
p3[0] = 0.5*(q2+mpi2c-s3)/q; p3sq=p3[0]*p3[0]; p3[4]=sqrt(p3sq-mpi2c);
// take momentum of 1 parallel to z axis
p1[1]=ZERO;p1[2]=ZERO;p1[3]=p1[4];
// construct 2
double cos2 = 0.5*(p1sq+p2sq-p3sq-mpi2c)/p1[4]/p2[4];
p2[1] = p2[4]*sqrt(1.-cos2*cos2); p2[2]=ZERO; p2[3]=-p2[4]*cos2;
// construct 3
double cos3 = 0.5*(p1sq-p2sq+p3sq-mpi2c)/p1[4]/p3[4];
p3[1] =-p3[4]*sqrt(1.-cos3*cos3); p3[2]=ZERO; p3[3]=-p3[4]*cos3;
// calculate the form factors
CLEOFormFactor(0,-1,q2,s1,s2,s3,F1,F2,F3);
}
// construct a vector with the current
complex<Energy> current[4];
for(unsigned int ix=0;ix<4;++ix)
current[ix] = F1*(p2[ix]-p3[ix])-F2*(p3[ix]-p1[ix])+F3*(p1[ix]-p2[ix]);
complex<Energy2> dot1=current[0]*conj(current[0]);
for(unsigned int ix=1;ix<4;++ix) dot1-=current[ix]*conj(current[ix]);
complex<Energy2> dot2=current[0]*q;
return(-dot1+dot2*conj(dot2)/q2).real() / sqr(_rhomass[0]);
}
diff --git a/Decay/WeakCurrents/ThreePionCLEOCurrent.h b/Decay/WeakCurrents/ThreePionCLEOCurrent.h
--- a/Decay/WeakCurrents/ThreePionCLEOCurrent.h
+++ b/Decay/WeakCurrents/ThreePionCLEOCurrent.h
@@ -1,623 +1,623 @@
// -*- C++ -*-
//
// ThreePionCLEOCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_ThreePionCLEOCurrent_H
#define THEPEG_ThreePionCLEOCurrent_H
//
// This is the declaration of the ThreePionCLEOCurrent class.
//
#include "ThreeMesonCurrentBase.h"
#include "Herwig/Utilities/Interpolator.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The <code>ThreePionCLEOCurrent</code> class implements
* the decay of the weak current to three pions
* using the currents from CLEO Phys. Rev. D 61,012002. This is
* a model including two \f$\rho\f$ mesons in both \f$s\f$ and \f$p\f$ wave,
* a \f$\sigma\f$, the \f$f_2\f$ and \f$f_0(1370)\f$.
*
* The form factors for the \f$a_1^+ \to \pi^0 \pi^0 \pi^+\f$ mode are
*
* \f[F_1=\sum_k\left\{g^P_{\rho_k}B_{\rho_k}^P(s_1)
* -\frac{g^D_{\rho_k}}3B_{\rho_k}^P(s_2)
* \left((s_3-m_{\pi^+}^2)-(s_1-m_{\pi^0}^2)\right)\right\}
* +\frac23\left(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3)\right)
* +\frac{g_{f_2}}{18s_3}(q^2-m_{\pi^+}^2+s_3)(4m_{\pi^0}^2-s_3)B^D_{f_2}(s_3)
*\f]
*
* \f[F_2=\sum_k\left\{-\frac13g^P_{\rho_k}B_{\rho_k}^P(s_2)
* -g^D_{\rho_k}B_{\rho_k}^P(s_1)
* \left((s_3-m_{\pi^+}^2)-(s_2-m_{\pi^0}^2)\right)\right\}
* +\frac23\left(g_\sigma B^S_\sigma(s_3)+g_{f_0}B^S_{f_0}(s_3)\right)
* +\frac1{18s_3}g_{f_2}(q^2-m_{\pi^+}^2+s_3)(4m_{\pi^0}^2-s_3)B^D_{f_2}(s_3)
*\f]
*
* \f[F_3=\sum_k g^D_{\rho_k}\left\{
* -\frac13B_{\rho_k}^P(s_1)\left((s_3-m_{\pi^+}^2)-(s_2-m_{\pi^0}^2)\right)
* +\frac13B_{\rho_k}^P(s_2)\left((s_3-m_{\pi^+}^2)-(s_1-m_{\pi^0}^2)\right)\right\}
* -\frac{g_{f_2}}2(s_1-s_2)B^D_{f_2}(s_3)\f]
* The form factors for \f$a_1^+\to \pi^+ \pi^+ \pi^-\f$ mode
*
* \f[F_1=\sum_k\left\{-g^P_{\rho_k}B_{\rho_k}^P(s_1)
* -\frac{g^D_{\rho_k}}3B_{\rho_k}^P(s_2)(s_1-s_3)\right\}
* -\frac23\left(g_\sigma B^S_\sigma(s_2)+g_{f_0} B^S_{f_0}(s_2)\right)
* +g_{f_2}\left(\frac12(s_3-s_2)B^D_{f_2}(s_1)
* -\frac1{18s_2}(4m_{\pi^+}^2-s_2)(q^2+s_2-m_{\pi^+}^2)B^D_{f_2}(s_2)\right)\f]
*
* \f[F_2=\sum_k\left\{-g^P_{\rho_k}B_{\rho_k}^P(s_2)
* -\frac{g^D_{\rho_k}}3B_{\rho_k}^P(s_1)(s_2-s_3)\right\}
* -\frac23\left(g_\sigma B^S_\sigma(s_1)+g_{f_0} B^S_{f_0}(s_1)\right)
* +g_{f_2}\left(\frac12(s_3-s_1)B^D_{f_2}(s_2)
* -\frac1{18s_1}(4m_{\pi^+}^2-s_1)(q^2+s_1-m_{\pi^+}^2)B^D_{f_2}(s_1)\right)\f]
*
* \f[F_3=\sum_k
* -g^D_{\rho_k}\left( \frac13(s_2-s_3)B_{\rho_k}^P(s_1)
* -\frac13(s_1-s_3)B_{\rho_k}^P(s_2)\right)
* -\frac23\left(g_\sigma B^S_\sigma(s_1)+g_{f_0}B^S_{f_0}(s_1)\right)
* +\frac23\left(g_\sigma B^S_\sigma(s_2)+g_{f_0}B^S_{f_0}(s_2)\right)\f]
*\f[
* +g_{f_2}\left(-\frac1{18s_1}(4m_{\pi^+}^2-s_1)(q^2+s_1-m_{\pi^+}^2)B^D_{f_2}(s_1)
* +\frac1{18s_2}(4m_{\pi^+}^2-s_2)(q^2+s_2-m_{\pi^+}^2)B^D_{f_2}(s_2)\right)\f]
*
* where
*
* - \f$g_{f_2}\f$ is the coupling of the \f$f_2\f$ to the \f$a_1\f$
* - \f$g_{f_0}\f$ is the coupling of the \f$f_0(1370)\f$ to the \f$a_1\f$
* - \f$g_{\sigma}\f$ is the coupling of the \f$\sigma\f$ to the \f$a_1\f$
* - \f$g^P_{\rho_k}\f$ is the \f$p\f$-wave coupling of the \f$\rho_k\f$ multiplet
* to the \f$a_1\f$.
* - \f$g^D_{\rho_k}\f$ is the \f$d\f$-wave coupling of the \f$\rho_k\f$ multiplet
* to the \f$a_1\f$.
* - \f$s_3=m^2_{12}\f$ is the invariant mass squared of particles 1 and 2.
* - \f$s_2=m^2_{13}\f$ is the invariant mass squared of particles 1 and 3.
* - \f$s_1=m^2_{23}\f$ is the invariant mass squared of particles 2 and 3.
*
* The Breit-Wigner factors are given by
\f$B^L_Y(s_i) = \frac{m^2_Y}{m^2_Y-s_i+im_Y\Gamma^{Y,L}(s_i)}\f$
* where
* \f$\Gamma^{Y,L}(s_i) = \Gamma^Y\left(\frac{p(s_i)}{p(M_Y}\right)^{2L+1}\frac{m_Y}{\sqrt{s_i}}\f$
* \f$m_Y\f$ and \f$\Gamma^Y\f$ are the mass and width of the particle \f$Y\f$
* respectively. \f$p(s_i)\f$ is the momentum of the outgoing pion in the
* rest frame of the resonance \f$Y\f$.
*
* @see ThreeMesonCurrentBase
* @see a1ThreePionCLEODecayer
* @see ThreePionCLEOa1MatrixElement
*
*/
class ThreePionCLEOCurrent: public ThreeMesonCurrentBase {
/**
* The matrix element for the running \f$a_1\f$ width is a friend to
* keep some members private.
*/
friend class ThreePionCLEOa1MatrixElement;
public:
/**
* Default constructor
*/
ThreePionCLEOCurrent();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version addes the mesons for the current
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
//@}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
/**
* the matrix element for the a1 decay to calculate the running width
* @param iopt The mode
* @param q2 The mass of the decaying off-shell \f$a_1\f$, \f$q^2\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @param m3 The mass of the third outgoing particle.
* @return The matrix element squared summed over spins.
*/
double threeBodyMatrixElement(const int iopt, const Energy2 q2,
const Energy2 s3, const Energy2 s2,
const Energy2 s1, const Energy m1,
const Energy m2, const Energy m3) const;
protected:
/**
* Can the current handle a particular set of mesons.
* As this current includes all the allowed modes this is always true.
*/
virtual bool acceptMode(int) const;
/**
* Calculate the form factor for the current. Implements the form factors
* described above.
* @param ichan The phase space channel
* @param imode The mode
* @param q2 The scale \f$q^2\f$ for the current.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
*/
virtual FormFactors calculateFormFactors(const int ichan,const int imode,Energy2 q2,
Energy2 s1,Energy2 s2,Energy2 s3) const;
/**
* Calculate CLEO form factors for the current. Implements the form factors
* described above.
* @param imode The mode
* @param ichan The phase space channel
* @param q2 The scale \f$q^2\f$ for the current.
* @param s1 The invariant mass squared of particles 2 and 3, \f$s_1=m^2_{23}\f$.
* @param s2 The invariant mass squared of particles 1 and 3, \f$s_2=m^2_{13}\f$.
* @param s3 The invariant mass squared of particles 1 and 2, \f$s_3=m^2_{12}\f$.
* @param F1 The form factor \f$F_1\f$.
* @param F2 The form factor \f$F_2\f$.
* @param F3 The form factor \f$F_3\f$.
*/
void CLEOFormFactor(int imode,int ichan,Energy2 q2,Energy2 s1, Energy2 s2,
Energy2 s3,Complex & F1, Complex & F2, Complex & F3) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object to the begining of the run phase.
*/
virtual void doinitrun();
/**
* Check sanity of the object during the setup phase.
*/
virtual void doupdate();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ThreePionCLEOCurrent & operator=(const ThreePionCLEOCurrent &);
+ ThreePionCLEOCurrent & operator=(const ThreePionCLEOCurrent &) = delete;
private:
/**
* The \f$a_1\f$ running width
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @return The \f$a_1\f$ running width.
*/
Energy a1width(Energy2 q2) const;
/**
* Initialize the \f$a_1\f$ running width
* @param iopt Initialization option (-1 full calculation, 0 set up the interpolation)
*/
void inita1Width(int iopt);
/**
* \f$a_1\f$ Breit-Wigner
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @return The Breit-Wigner
*/
Complex a1BreitWigner(Energy2 q2) const {
Complex ii(0.,1.);
Energy2 m2=_a1mass*_a1mass; Energy q=sqrt(q2);
Complex output=m2/(m2-q2-ii*q*a1width(q2));
return output;
}
/**
* The \f$\rho\f$ Breit-Wigner.
* @param ires The \f$\rho\f$ multiplet.
* @param q2 The scale, \f$q^2\f$.
* @param icharge The charge of the \f$\rho\f$.
* @return The Breit-Wigner
*/
Complex rhoBreitWigner(int ires, Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
double ratio; Complex ii(0.,1.);
if(icharge==0) ratio=Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_prhocc[ires];
else ratio=Kinematics::pstarTwoBodyDecay(q,_mpic,_mpi0)/_prhoc0[ires];
ratio*= ratio*ratio;
Energy gamrun=_rhowidth[ires]*ratio*_rhomass[ires]/q;
return _rhomass[ires]*_rhomass[ires]/(_rhomass[ires]*_rhomass[ires]
-q2-ii*_rhomass[ires]*gamrun);
}
/**
* Breit-Wigner for the \f$\sigma\f$.
* @param q2 The scale, \f$q^2\f$.
* @param icharge Whether the pions produced in the meson decay are
* charged (0) or neutral (1)
* @return The Breit-Wigner
*/
Complex sigmaBreitWigner(Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
double ratio; Complex ii(0.,1.);
if(icharge==0) ratio=Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_psigmacc;
else ratio=Kinematics::pstarTwoBodyDecay(q,_mpi0,_mpi0)/_psigma00;
Energy gamrun=_sigmawidth*ratio*_sigmamass/q;
return _sigmamass*_sigmamass/(_sigmamass*_sigmamass-q2-ii*_sigmamass*gamrun);
}
/**
* Breit-Wigner for the \f$f_0(1370)\f$.
* @param q2 The scale, \f$q^2\f$.
* @param icharge Whether the pions produced in the meson decay are
* charged (0) or neutral (1)
* @return The Breit-Wigner
*/
Complex f0BreitWigner(Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
double ratio; Complex ii(0.,1.);
if(icharge==0) ratio=Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_pf0cc;
else ratio=Kinematics::pstarTwoBodyDecay(q,_mpi0,_mpi0)/_pf000;
Energy gamrun=_f0width*ratio*_f0mass/q;
return _f0mass*_f0mass/(_f0mass*_f0mass-q2-ii*_f0mass*gamrun);
}
/**
* Breit-Wigner for the \f$f_2\f$.
* @param q2 The scale, \f$q^2\f$.
* @param icharge Whether the pions produced in the meson decay are
* charged (0) or neutral (1)
* @return The Breit-Wigner
*/
Complex f2BreitWigner(Energy2 q2,int icharge) const {
Energy q=sqrt(q2);
double ratio; Complex ii(0.,1.);
if(icharge==0) ratio=Kinematics::pstarTwoBodyDecay(q,_mpic,_mpic)/_pf2cc;
else ratio=Kinematics::pstarTwoBodyDecay(q,_mpi0,_mpi0)/_pf200;
ratio*= ratio*ratio*ratio*ratio;
Energy gamrun=_f2width*ratio*_f2mass/q;
return _f2mass*_f2mass/(_f2mass*_f2mass-q2-ii*_f2mass*gamrun);
}
private:
/**
* Masses of the \f$\rho\f$ resonances.
*/
vector<Energy> _rhomass;
/**
* Widths of the \f$\rho\f$ resonances.
*/
vector<Energy> _rhowidth;
/**
* Momenta of the decay products for neutral \f$\rho\f$ decay.
*/
vector<Energy> _prhocc;
/**
* Momenta of the decay products for charged \f$\rho\f$ decay.
*/
vector<Energy> _prhoc0;
/**
* Mass of the \f$f_2\f$ resonance
*/
Energy _f2mass;
/**
* Width of the \f$f_2\f$ resonance
*/
Energy _f2width;
/**
* Momenta of the decay products for \f$f_2\f$ decay to charged pions.
*/
Energy _pf2cc;
/**
* Momenta of the decay products for \f$f_2\f$ decay to neutral pions.
*/
Energy _pf200;
/**
* Mass of the \f$f_0(1370)\f$ resonance
*/
Energy _f0mass;
/**
* Width of the \f$f_0(1370)\f$ resonance
*/
Energy _f0width;
/**
* Momenta of the decay products for \f$f_0(1370)\f$ decay to charged pions.
*/
Energy _pf0cc;
/**
* Momenta of the decay products for \f$f_0(1370)\f$ decay to neutral pions.
*/
Energy _pf000;
/**
* Mass of the \f$\sigma\f$ resonance
*/
Energy _sigmamass;
/**
* Width of the \f$\sigma\f$ resonance
*/
Energy _sigmawidth;
/**
* Momenta of the decay products for \f$\sigma\f$ decay to charged pions.
*/
Energy _psigmacc;
/**
* Momenta of the decay products for \f$\sigma\f$ decay to neutral pions.
*/
Energy _psigma00;
/**
* Mass of the neutral pion.
*/
Energy _mpi0;
/**
* Mass of the charged pion.
*/
Energy _mpic;
/**
* The \f$a_1\f$ mass
*/
Energy _a1mass;
/**
* The \f$a_1\f$ width
*/
Energy _a1width;
/**
* Mass of the \f$K^*\f$ resonace
*/
Energy _mKstar;
/**
* Mass of the \f$K\f$ resonace
*/
Energy _mK;
/**
* Coupling for the \f$KK^*\f$ term in the running width.
*/
double _gammk;
/**
* pion decay constant
*/
Energy _fpi;
/**
* The prefactor
*/
InvEnergy _fact;
/**
* Magnitude of the \f$p\f$-wave couplings of the rho resonance, \f$g^P_{\rho_k}\f$,
* (\f$\beta_{1,2}\f$ in the CLEO paper.)
*/
vector<double> _rhomagP;
/**
* Phase of the \f$p\f$-wave couplings of the rho resonance, \f$g^P_{\rho_k}\f$,
* (\f$\beta_{1,2}\f$ in the CLEO paper.)
*/
vector<double> _rhophaseP;
/**
*\f$p\f$-wave couplings of the rho resonance, \f$g^P_{\rho_k}\f$,
* (\f$\beta_{1,2}\f$ in the CLEO paper.)
*/
vector<Complex> _rhocoupP;
/**
* Magnitude of the \f$d\f$-wave couplings of the rho resonance, \f$g^D_{\rho_k}\f$,
* (\f$\beta_{3,4}\f$ in the CLEO paper.)
*/
vector<InvEnergy2> _rhomagD;
/**
* Phase of the \f$d\f$-wave couplings of the rho resonance, \f$g^D_{\rho_k}\f$,
* (\f$\beta_{3,4}\f$ in the CLEO paper.)
*/
vector<double>_rhophaseD;
/**
* \f$d\f$-wave couplings of the rho resonance, \f$g^D_{\rho_k}\f$,
* (\f$\beta_{3,4}\f$ in the CLEO paper.)
*/
vector<complex<InvEnergy2> > _rhocoupD;
/**
* Magntiude of the coupling of the \f$f_2\f$ resonance, \f$g_{f_2}\f$,
* (\f$\beta_5\f$ in the CLEO paper.)
*/
InvEnergy2 _f2mag;
/**
* Phase of the coupling of the \f$f_2\f$ resonance, \f$g_{f_2}\f$,
* (\f$\beta_5\f$ in the CLEO paper.)
*/
double _f2phase;
/**
* Coupling of the \f$f_2\f$ resonance, \f$g_{f_2}\f$,
* (\f$\beta_5\f$ in the CLEO paper.)
*/
complex<InvEnergy2> _f2coup;
/**
* Magntiude of the coupling of the \f$f_0(1370)\f$ resonance, \f$g_{f_0}\f$,
* (\f$\beta_6\f$ in the CLEO paper.)
*/
double _f0mag;
/**
* Phase of the coupling of the \f$f_0(1370)\f$ resonance, \f$g_{f_0}\f$,
* (\f$\beta_6\f$ in the CLEO paper.)
*/
double _f0phase;
/**
* Coupling of the \f$f_0(1370)\f$ resonance, \f$g_{f_0}\f$,
* (\f$\beta_6\f$ in the CLEO paper.)
*/
Complex _f0coup;
/**
* Magntiude of the coupling of the \f$\sigma\f$ resonance, \f$g_\sigma\f$,
* (\f$\beta_7\f$ in the CLEO paper.)
*/
double _sigmamag;
/**
* Phase of the coupling of the \f$\sigma\f$ resonance, \f$g_\sigma\f$,
* (\f$\beta_7\f$ in the CLEO paper.)
*/
double _sigmaphase;
/**
* Coupling of the \f$\sigma\f$ resonance, \f$g_\sigma\f$,
* (\f$\beta_7\f$ in the CLEO paper.)
*/
Complex _sigmacoup;
/**
* use local values of the mass parameters
*/
bool _localparameters;
/**
* The \f$a_1\f$ width for the running \f$a_1\f$ width calculation.
*/
vector<Energy> _a1runwidth;
/**
* The \f$q^2\f$ for the running \f$a_1\f$ width calculation.
*/
vector<Energy2> _a1runq2;
/**
* The interpolator for the running \f$a_1\f$ width calculation.
*/
Interpolator<Energy,Energy2>::Ptr _a1runinter;
/**
* Initialize the running \f$a_1\f$ width.
*/
bool _initializea1;
/**
* Option for the \f$a_1\f$ width
*/
bool _a1opt;
/**
* The maximum mass of the hadronic system
*/
Energy _maxmass;
/**
* The maximum mass when the running width was calculated
*/
Energy _maxcalc;
};
}
#endif /* THEPEG_ThreePionCLEOCurrent_H */
diff --git a/Decay/WeakCurrents/TwoMesonRhoKStarCurrent.h b/Decay/WeakCurrents/TwoMesonRhoKStarCurrent.h
--- a/Decay/WeakCurrents/TwoMesonRhoKStarCurrent.h
+++ b/Decay/WeakCurrents/TwoMesonRhoKStarCurrent.h
@@ -1,422 +1,422 @@
// -*- C++ -*-
//
// TwoMesonRhoKStarCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TwoMesonRhoKStarCurrent_H
#define HERWIG_TwoMesonRhoKStarCurrent_H
// This is the declaration of the TwoMesonRhoKStarCurrent class.
#include "WeakDecayCurrent.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/Utilities/Kinematics.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* Weak current for the production of two mesons via the \f$\rho\f$ or \f$K^*\f$
* resonances.
* These currents are taken from tau decays.
*
* The current takes the form
*
* \f[J^\mu = \frac{\sqrt{2}}{\sum_k\alpha_k}\left((p_1-p_2)^\mu-\frac{(p_1-p_2)\cdot q}{q^2}q^\mu))\right)
* \sum_k \alpha_k B_{R_k}(q^2)
* \f]
* where
* - \f$p_{1,2}\f$ are the momenta of the outgoing mesons,
* - \f$q=p_1+p_2\f$,
* - \f$B_{R_k}(q^2)\f$ is the Breit-Wigner distribution for the intermediate vector
* meson \f$R_k\f$.
* - \f$\alpha_k\f$ is the weight for the resonance.
*
* The Breit-Wigner term is summed over the \f$\rho\f$ or \f$K^*\f$ resonances that
* can contribute to a given decay.
*
* The models of either Kuhn and Santamaria (Z. Phys. C48, 445 (1990))
* or Gounaris and Sakurai Phys. Rev. Lett. 21, 244 (1968) are supported for the
* shape of the Breit-Wigner distribution. The mixing parameters
* are taken from Phys.Rev.D61:112002,2000 (CLEO) for the decay \f$\pi^\pm\pi^0\f$ and
* the CLEO version of TAUOLA for the \f$K\pi\f$ decays.
*
* @see WeakDecayCurrent.
*
* \author Peter Richardson
*
*/
class TwoMesonRhoKStarCurrent: public WeakDecayCurrent {
public:
/**
* Default constructor
*/
TwoMesonRhoKStarCurrent();
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version just adds the intermediate resonances, two outgoing mesons
* and photon.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current. This just returns the two pseudoscalar
* mesons and the photon.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This version returns the hadronic current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode, const int ichan,Energy & scale,
const ParticleVector & decay, DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks the particles are the allowed mode.
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- TwoMesonRhoKStarCurrent & operator=(const TwoMesonRhoKStarCurrent &);
+ TwoMesonRhoKStarCurrent & operator=(const TwoMesonRhoKStarCurrent &) = delete;
private:
/** @name Breit-Wigner functions */
//@{
/**
* \f$p\f$-wave breit wigner for form-factors
* @param q2 The scale \f$q^2\f$ for the Breit-Wigner
* @param imodel Which of the two models for the Breit-Wigner shape to use.
* @param itype Whether this is a \f$\rho\f$ or \f$K^*\f$ resonance.
* @param ires Which of the different multiplets to use.
* @return The value of the Breit-Wigner distribution.
*/
Complex BreitWigner(Energy2 q2, unsigned int imodel,unsigned int itype,
unsigned int ires) const {
// workout the index of the resonace
unsigned int iy(3*itype+ires);
// off shell mass
Energy q(sqrt(q2));
// and the running width
Energy pq(pcm(iy,q));
double ratio(pow<3,1>(pq/_mom[iy]));
Energy gamrun(_width[iy]*_mass[iy]*ratio/q);
// work out the denominator
complex<Energy2> denom, numer;
Complex ii(0.,1.);
if(imodel==0) {
denom=q2-_mass2[iy]+ii*_mass[iy]*gamrun;
numer=-_mass2[iy];
}
else if(imodel==1) {
denom = q2 - _mass2[iy] + ii*_mass[iy]*gamrun
- ( sqr(pq) * (GSModelhFunction(iy,q)-_hm2[iy])
- sqr(_mom[iy]) * (q2-_mass2[iy]) * _dhdq2[iy]);
numer = -(_mass2[iy]+_dparam[iy]*_mass[iy]*_width[iy]);
}
else assert(false);
// return the answer
return numer/denom;
}
/**
* The \f$d\f$ parameter in the GS model of the propagator.
* @param ires Which of the \f$\rho\f$ or \f$K^*\f$ resonances to use
* @return The \f$d\f$ parameter
*/
double GSModelDParameter(const unsigned int ires)const {
Energy mpi(0.5*(_massa[ires]+_massb[ires]));
using Constants::pi;
return 3.*mpi*mpi/pi/sqr(_mom[ires])*log(0.5*(_mass[ires]+2.*_mom[ires])/mpi)
+0.5*_mass[ires]/pi/_mom[ires]-mpi*mpi*_mass[ires]/pi/pow<3,1>(_mom[ires]);
}
/**
* The \f$\frac{dh}{dq^2}\f$ function in the GS model for the propagator
* evaluated at \f$q^2=m^2\f$.
* @param ires Which of the \f$\rho\f$ or \f$K^*\f$ resonances to use
* @return The value of \f$\frac{dh}{dq^2}\f$ at \f$q^2=m^2\f$.
*/
InvEnergy2 GSModeldhdq2Parameter(const unsigned int ires)const {
Energy mpi = 0.5 * (_massa[ires] + _massb[ires]);
return _width[ires] / Constants::pi / pow<3,1>(_mom[ires]) *
(sqr(mpi) / _mass[ires] / _mom[ires] *
log(0.5 * (_mass[ires] + 2.*_mom[ires])/mpi) + 0.5);
}
/**
* The \f$h\f$ function in the GS model.
* @param ires Which of the \f$\rho\f$ or \f$K^*\f$ resonances to use
* @param q The scale \f$q\f$.
* @return The value of the \f$h\f$ function at scale \f$q\f$.
*/
double GSModelhFunction(const unsigned int ires, const Energy q) const {
Energy pq(pcm(ires,q));
return _width[ires]*_mass2[ires]/pow<3,1>(_mom[ires])
*2.*pq/Constants::pi/q*log((q+2.*pq)/(_massa[ires]+_massb[ires]));
}
/**
* The momentum of the decay products for the running width.
* @param ires Which of the \f$\rho\f$ or \f$K^*\f$ resonances to use
* @param q The scale \f$q\f$.
* @return The momenta of the decay products in the rest frame of the
* intermediate resonance.
*/
Energy pcm(const unsigned int ires, const Energy q) const {
Energy2 q2(q*q);
if(q <= _massa[ires]+_massb[ires]) return ZERO;
return 0.5/q*sqrt((q2-sqr(_massa[ires]+_massb[ires]))*
(q2-sqr(_massa[ires]-_massb[ires])));
}
//@}
private:
/**
* Weights for the different \f$\rho\f$ resonances in the current, \f$\alpha_k\f$.
*/
//@{
/**
* The Complex weight used in the calculation
*/
vector<Complex> _piwgt;
/**
* The magnitude for input
*/
vector<double> _pimag;
/**
* The phase for input
*/
vector<double> _piphase;
//@}
/**
* Weights for the different \f$K^*\f$ resonances in the current, \f$\alpha_k\f$.
*/
//@{
/**
* The Complex weight used in the calculation
*/
vector<Complex> _kwgt;
/**
* The magnitude for input
*/
vector<double> _kmag;
/**
* The phase for input
*/
vector<double> _kphase;
//@}
/**
* Model to use for the \f$\rho\f$ propagator.
*/
int _pimodel;
/**
* Model to use for the \f$K^*\f$ propagator.
*/
int _kmodel;
/**
* Option not to use the physical masses and widths for the \f$\rho\f$.
*/
bool _rhoparameters;
/**
* The masses of the \f$\rho\f$ resonances.
*/
vector<Energy> _rhomasses;
/**
* The widths of the \f$\rho\f$ resonances.
*/
vector<Energy> _rhowidths;
/**
* Option not to use the physical masses and widths for the \f$K^*\f$.
*/
bool _kstarparameters;
/**
* The masses of the \f$K^*\f$ resonances.
*/
vector<Energy> _kstarmasses;
/**
* The masses of the \f$K^*\f$ resonances.
*/
vector<Energy> _kstarwidths;
/**
* Parameters for the Breit-Wigners
*/
//@{
/**
* The masses of the resonances
*/
vector<Energy> _mass;
/**
* The widths of the resonances
*/
vector<Energy> _width;
/**
* squares of the masses
*/
vector<Energy2> _mass2;
/**
* product of the mass and the width
*/
vector<Energy2> _massw;
/**
* Masses of the decay products for the momentum calculation.
*/
vector<Energy> _massa,_massb;
/**
* The decay for the on-shell mass momentum
*/
vector<Energy> _mom;
/**
* The function \f$\frac{dh}{dq^2}\f$ at \f$q^2=m^2\f$ for the GS form of the
* Breit-Wigner
*/
vector<InvEnergy2> _dhdq2;
/**
* The function \f$h\f$ at \f$q^2=m^2\f$ for the GS form of the
* Breit-Wigner
*/
vector<double> _hm2;
/**
* The \f$d\f$ parameter for the GS form of the
* Breit-Wigner
*/
vector<double> _dparam;
//@}
};
}
#endif /* HERWIG_TwoMesonRhoKStarCurrent_H */
diff --git a/Decay/WeakCurrents/TwoPionPhotonCurrent.h b/Decay/WeakCurrents/TwoPionPhotonCurrent.h
--- a/Decay/WeakCurrents/TwoPionPhotonCurrent.h
+++ b/Decay/WeakCurrents/TwoPionPhotonCurrent.h
@@ -1,298 +1,298 @@
// -*- C++ -*-
//
// TwoPionPhotonCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TwoPionPhotonCurrent_H
#define HERWIG_TwoPionPhotonCurrent_H
//
// This is the declaration of the TwoPionPhotonCurrent class.
//
#include "WeakDecayCurrent.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* This class implements the decay current for \f$\pi^\pm\pi^0 \gamma\f$ via
* an intermediate \f$\omega\f$. It inherits from the <code>WeakDecayCurrent</code>
* class and implements the hadronic current.
*
* The model is based on the one used in TAUOLA, Comput.Phys.Commun.76:361-380,1993.
* The current is given by
* \f[J^\mu = e T \left\{
* \epsilon^\mu\left[ m^2_\pi p_1\cdot p_3
* -p_2\cdot p_3(p_2\cdot p_1-p_1\cdot p_3)\right]
* -p_2^\mu\left[p_2\cdot\epsilon p_1\cdot p_3-p_1\cdot\epsilon p_2\cdot p_3\right]
* +p_3^\mu\left[\epsilon\cdot p_2-\epsilon\cdot p_1(m^2_\pi+p_2\cdotp_3)\right]
*\right\}\f]
* where
* - \f$p_1\f$ is the momentum of the charged pion
* - \f$p_2\f$ is the momentum of the neutral pion
* - \f$p_3\f$ is the momentum of the photon
* - \f$\epsilon\f$ is the polarization of the photon
* - \f$e\f$ is the electric charge of the positron
* and the normaliztion factor is
* \f[T = F(q^2)F(0)\frac1{\sqrt{2}B_\omega(s_2)}\f]
* and
* \f[F(s) = \sqrt{2}F_\rho g_{\rho\omega\pi}\sum_k\sigma_k B_{\rho_k}(s)\f]
* where
* - \f$B_\omega(s)=\frac1{m^2_\omega-s-im_\omega\Gamma_\omega}\f$ is the Breit-Wigner for the \f$\omega\f$.
* - \f$m_\omega\f$ is the mass of the \f$\omega\f$.
* - \f$\Gamma_\omega \f$ is the width of the \f$\omega\f$.
* - \f$F_\rho\f$ is the coupling for the conversion of the \f$\rho\f$ to a photon.
* - \f$g_{\rho\omega\pi}\f$ is the coupling of \f$\rho\f$, \f$\omega\f$, \f$\pi\f$.
* - \f$m_{\rho_k}\f$ is the mass of the \f$k\f$th \f$\rho\f$ resonance
* - \f$B_{\rho_k}(s)=\frac1{m^2_{\rho_k}-s-im_{\rho_k}\Gamma_{\rho_k}}\f$ is the
* Breit-Wigner for \f${\rho_k}\f$.
* - \f$m_{\rho_k}\f$ is the mass of the \f${\rho_k}\f$.
* - \f$\Gamma_{\rho_k} \f$ is the width of the \f${\rho_k}\f$.
*
* @see WeakDecayCurrent
*
* \author Peter Richardson
*
*/
class TwoPionPhotonCurrent: public WeakDecayCurrent {
public:
/**
* Default constructor
*/
TwoPionPhotonCurrent();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version just adds the meson as the daughter of the last
* resonance in the phase space channel.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current. This just returns the pseudoscalar
* meson.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This version returns the hadronic current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode,const int ichan,Energy & scale,
const ParticleVector & decay,DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks the meson against the list
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* Checks the meson against the list
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- TwoPionPhotonCurrent & operator=(const TwoPionPhotonCurrent &);
+ TwoPionPhotonCurrent & operator=(const TwoPionPhotonCurrent &) = delete;
private:
/**
* Calculate the \f$F(q^2)\f$ function at a given scale
* @param q2 The scale \f$q^2\f$.
* @return The value of the function.
*/
complex<InvEnergy> FFunction(Energy2 q2) const {
complex<InvEnergy2> output(ZERO);
for(unsigned int ix=0, N=_resweights.size(); ix<N && ix <3;++ix) {
output -= _resweights[ix]*BreitWigner(q2,ix);
}
return output*_grho*_grhoomegapi*sqrt(2.);
}
/**
* Fixed width Breit wigner
* @param q2 The scame \f$q^2\f$
* @param ires The resonance required (0,1,3) are the \f$\rho\f$'s and 10 is the
* \f$\omega\f$.
* @return The breit wigner
*/
complex<InvEnergy2> BreitWigner(Energy2 q2,unsigned int ires) const {
static const Complex ii(0.,1.);
complex<Energy2> denom;
if(ires<_rhomasses.size()) {
denom = q2-_rhomasses[ires]*_rhomasses[ires]+ii*_rhomasses[ires]*_rhowidths[ires];
}
else if(ires==10) {
denom = q2-_omegamass*_omegamass+ii*_omegamass*_omegawidth;
}
else assert(false);
return 1./denom;
}
private:
/**
* Coupling of the rho to the photon, \f$F_\rho\f$.
*/
Energy2 _grho;
/**
* Coupling of the rho to the omega and a pion, \f$g_{\rho\omega\pi}\f$.
*/
InvEnergy _grhoomegapi;
/**
* Weights of the different rho resonances in the current
*/
vector<double> _resweights;
/**
* Use local parameters for the rho resonances rather than from the particle data
* objects
*/
bool _rhoparameters;
/**
* Masses of the \f$\rho\f$ resonances
*/
vector<Energy> _rhomasses;
/**
* Widths of the \f$\rho\f$ resonances
*/
vector<Energy> _rhowidths;
/**
* use local parameters for the omega rather than from the particle data objects
*/
bool _omegaparameters;
/**
* The \f$\omega\f$ mass.
*/
Energy _omegamass;
/**
* The \f$\omega\f$ width.
*/
Energy _omegawidth;
/**
* Mass for the intermediate in the phase-space, this is a technical parameter to
* improve the phase-space integration efficiency.
*/
Energy _intmass;
/**
* Width for the intermediate in the phase-space, this is a technical parameter to
* improve the phase-space integration efficiency.
*/
Energy _intwidth;
};
}
#endif /* HERWIG_TwoPionPhotonCurrent_H */
diff --git a/Decay/WeakCurrents/VectorMesonCurrent.h b/Decay/WeakCurrents/VectorMesonCurrent.h
--- a/Decay/WeakCurrents/VectorMesonCurrent.h
+++ b/Decay/WeakCurrents/VectorMesonCurrent.h
@@ -1,194 +1,194 @@
// -*- C++ -*-
//
// VectorMesonCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_VectorMesonCurrent_H
#define THEPEG_VectorMesonCurrent_H
// This is the declaration of the VectorMesonCurrent class.
#include "WeakDecayCurrent.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Decay
*
* The weak current for the production of one (pseudo)-vector meson
*
* In this case the current is given by
* \f[J^\mu = f_V \epsilon^\mu,\f]
* where
* - \f$f_V\f$ is the decay constant of the vector meson,
* - \f$\epsilon^\mu\f$ is the polarizaion vector of the outgoing vector meson.
*
* @see WeakDecayCurrent.
*
*/
class VectorMesonCurrent: public WeakDecayCurrent {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor
*/
VectorMesonCurrent();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.
* This version just adds the meson as the daughter of the last
* resonance in the phase space channel.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp);
/**
* The particles produced by the current. This just returns the pseudoscalar
* meson.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
//@}
/**
* Hadronic current. This version returns the hadronic current described above.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode,const int ichan,Energy & scale,
const ParticleVector & decay,DecayIntegrator::MEOption meopt) const;
/**
* Accept the decay. Checks the meson against the list
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id);
/**
* Return the decay mode number for a given set of particles in the current.
* Checks the meson against the list
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id);
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- VectorMesonCurrent & operator=(const VectorMesonCurrent &);
+ VectorMesonCurrent & operator=(const VectorMesonCurrent &) = delete;
private:
/**
* The PDG code for the meson.
*/
vector<int> _id;
/**
* The decay constant
*/
vector<Energy2> _decay_constant;
/**
* initial size of the vectors
*/
unsigned int _initsize;
};
}
#endif /* THEPEG_VectorMesonCurrent_H */
diff --git a/Decay/WeakCurrents/WeakDecayCurrent.h b/Decay/WeakCurrents/WeakDecayCurrent.h
--- a/Decay/WeakCurrents/WeakDecayCurrent.h
+++ b/Decay/WeakCurrents/WeakDecayCurrent.h
@@ -1,233 +1,233 @@
// -*- C++ -*-
//
// WeakDecayCurrent.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_WeakDecayCurrent_H
#define HERWIG_WeakDecayCurrent_H
//
// This is the declaration of the WeakDecayCurrent class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "WeakDecayCurrent.fh"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Decay/DecayPhaseSpaceChannel.h"
#include "ThePEG/Helicity/LorentzPolarizationVector.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::LorentzPolarizationVector;
using ThePEG::Helicity::LorentzPolarizationVectorE;
/** \ingroup Decay
*
* The <code>WeakDecayCurrent</code> class is the base class for the hadronic
* currents produced in weak decays. This is designed so it can be used in
* any weak decay. In general the currents which are implemented are either
* simple one meson production or taken from tau decay.
*
* In classes inheriting from this one a number of member functions must be implemented
*
* - createMode which takes a vector of partially completed DecayPhaseSpaceChannel
* and adds the extra information required for the current. This method should
* assume that the particles from the current are the last ones specified in the
* DecayPhaseSpaceMode. This method will then construct the DecayPhaseSpaceMode
* for the decay.
*
* - particles() which returns the external particles produced by the current.
*
* - current() which given the decay products calculates the decay current
*
* - accept() which uses the PDG codes for the particles in the current to
* decide if a given mode is allowed.
*
* - decayMode() which uses the PDG codes for the particles in the current to
* workout which modes is being performed.
*
* - dataBaseOutput() which should output the information on all the Interfaces so
* that the WeakDecayCurrent can be reconstructed by the Herwig particle
* properties database.
*
* @see Interfaced.
*
*/
class WeakDecayCurrent: public Interfaced {
public:
/**
* Default constructor
*/
WeakDecayCurrent() : _numbermodes(0) {}
public:
/** @name Methods for the construction of the phase space integrator. */
//@{
/**
* Complete the construction of the decay mode for integration.classes inheriting
* from this one.
* This method is purely virtual and must be implemented in the classes inheriting
* from WeakDecayCurrent.
* @param icharge The total charge of the outgoing particles in the current.
* @param imode The mode in the current being asked for.
* @param mode The phase space mode for the integration
* @param iloc The location of the of the first particle from the current in
* the list of outgoing particles.
* @param ires The location of the first intermediate for the current.
* @param phase The prototype phase space channel for the integration.
* @param upp The maximum possible mass the particles in the current are
* allowed to have.
* @return Whether the current was sucessfully constructed.
*/
virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
unsigned int iloc,unsigned int ires,
DecayPhaseSpaceChannelPtr phase,Energy upp)=0;
/**
* The particles produced by the current. This method is purely virtual and
* must be implemented in classes inheriting from this one.
* @param icharge The total charge of the particles in the current.
* @param imode The mode for which the particles are being requested
* @param iq The PDG code for the quark
* @param ia The PDG code for the antiquark
* @return The external particles for the current.
*/
virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia)=0;
//@}
/**
* Return the number of modes handled by this current
*/
unsigned int numberOfModes() const {return _quark.size();}
/**
* Hadronic current. This method is purely virtual and must be implemented in
* all classes inheriting from this one.
* @param imode The mode
* @param ichan The phase-space channel the current is needed for.
* @param scale The invariant mass of the particles in the current.
* @param decay The decay products
* @param meopt Option for the calculation of the matrix element
* @return The current.
*/
virtual vector<LorentzPolarizationVectorE>
current(const int imode, const int ichan,Energy & scale,
const ParticleVector & decay, DecayIntegrator::MEOption meopt) const=0;
/**
* Accept the decay. This method is purely virtual and must be implemented in any class
* inheriting from this one.
* @param id The id's of the particles in the current.
* @return Can this current have the external particles specified.
*/
virtual bool accept(vector<int> id)=0;
/**
* Return the decay mode number for a given set of particles in the current.
* This method is purely virtual and must be implemented in any class
* inheriting from this one.
* @param id The id's of the particles in the current.
* @return The number of the mode
*/
virtual unsigned int decayMode(vector<int> id)=0;
/**
* Information on a decay mode
* @param imode The mode
* @param iq The PDG code of the quark.
* @param ia The PDG code of the antiquark.
*/
void decayModeInfo(unsigned int imode, int& iq, int& ia) const {
if(imode<_quark.size()) {
iq=_quark[imode];
ia=_antiquark[imode];
}
else {
iq=0;
ia=0;
}
}
/**
* Output the setup information for the particle database
* @param os The stream to output the information to
* @param header Whether or not to output the information for MySQL
* @param create Whether or not to add a statement creating the object
*/
virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Add a decay mode to the list.
* @param iq The PDG code for the quark.
* @param ia The PDG code for the antiquark.
*/
void addDecayMode(int iq,int ia) {
_quark.push_back(iq);
_antiquark.push_back(ia);
}
/**
* Set initial number of modes
* @param nmodes The number of modes.
*/
void setInitialModes(unsigned int nmodes) {_numbermodes=nmodes;}
private:
/**
* Private and non-existent assignment operator.
*/
- WeakDecayCurrent & operator=(const WeakDecayCurrent &);
+ WeakDecayCurrent & operator=(const WeakDecayCurrent &) = delete;
private:
/**
* The PDG codes for the quarks contained in the current.
*/
vector<int> _quark;
/**
* The PDG codes for the antiquarks contained in the current.
*/
vector<int> _antiquark;
/**
* The initial number of modes
*/
unsigned int _numbermodes;
};
}
#endif /* HERWIG_WeakDecayCurrent_H */
diff --git a/Doc/HerwigDefaults.in.in b/Doc/HerwigDefaults.in.in
--- a/Doc/HerwigDefaults.in.in
+++ b/Doc/HerwigDefaults.in.in
@@ -1,41 +1,53 @@
# @configure_input@
#
# output interfaces for documentation
# the following need to come first
globallibrary Herwig.so
library HwWeakCurrents.so
#
library Hw64Decay.so
library HwAnalysis.so
library HwFormFactors.so
library HwMamboDecay.so
library HwMEHadronFast.so
library HwMEHadron.so
library HwMEDIS.so
library HwMELepton.so
library HwMEGammaGamma.so
library HwMEGammaHadron.so
library HwPowhegMEHadron.so
library HwPowhegMELepton.so
library JetCuts.so
library SimpleKTCut.so
library HwMPI.so
library HwReggeonPDF.so
library HwPomeronPDF.so
library HwPomeronFlux.so
library HwPartonicDecay.so
library HwPerturbativeDecay.so
library HwShower.so
library HwSMDecay.so
library HwTauDecay.so
library HwTMDecay.so
library HwBaryonDecay.so
library HwSOPHTY.so
library HwVMDecay.so
library HwSatPDF.so
library HwIncomingPhotonEvolver.so
@LOAD_BSM@
-## @LOAD_DIPOLE_ALPHAS@
-## @LOAD_MATCHBOX@
-## @LOAD_DIPOLE@
+library HwDipoleMatching.so
+library HwDipoleShowerAlphaS.so
+library HwDipoleShower.so
+library HwDipoleMatching.so
+library HwMatchboxBuiltin.so
+library HwMatchboxCuts.so
+library HwMatchboxGoSam.so
+library HwMatchboxMadGraph.so
+library HwMatchboxNJet.so
+library HwMatchboxOpenLoops.so
+library HwMatchboxScales.so
+library HwMatchboxVBFNLO.so
+library HwMatching.so
+library HwQTildeMatching.so
+library HwKrknloEventReweight.so
doxygendump Herwig:: AllInterfaces.h
diff --git a/Hadronization/Cluster.cc b/Hadronization/Cluster.cc
--- a/Hadronization/Cluster.cc
+++ b/Hadronization/Cluster.cc
@@ -1,262 +1,271 @@
// -*- C++ -*-
//
// Cluster.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the Cluster class.
//
#include "Cluster.h"
#include <ThePEG/Repository/UseRandom.h>
#include <ThePEG/Repository/CurrentGenerator.h>
#include <ThePEG/PDT/ParticleData.h>
#include "ClusterHadronizationHandler.h"
using namespace Herwig;
PPtr Cluster::clone() const {
return new_ptr(*this);
}
PPtr Cluster::fullclone() const {
return clone();
}
ClassDescription<Cluster> Cluster::initCluster;
Cluster::Cluster()
: Particle(),
_isAvailable(true),
_hasReshuffled(false),
_component(),
_original(),
_isBeamRemnant(),
_isPerturbative(),
_numComp(0),
_id(0) {}
void Cluster::persistentOutput(PersistentOStream & os) const {
os << _isAvailable << _hasReshuffled << _component << _original
<< _isBeamRemnant << _isPerturbative << _numComp << _id;
}
void Cluster::persistentInput(PersistentIStream & is, int) {
is >> _isAvailable >> _hasReshuffled >> _component >> _original
>> _isBeamRemnant >> _isPerturbative >> _numComp >> _id;
}
Cluster::Cluster(tPPtr p1, tPPtr p2, tPPtr p3)
: Particle(CurrentGenerator::current().
getParticleData(long(ParticleID::Cluster))),
_isAvailable(true), _hasReshuffled(false)
{
if(!dataPtr()) {
cerr << "Cluster Particle Data not defined. Cannot complete Hadronization "
<< "without ParticleData for id " << ParticleID::Cluster << '\n';
}
_component.push_back(new_ptr(Particle(*p1)));
_component.push_back(new_ptr(Particle(*p2)));
if(p3) _component.push_back(new_ptr(Particle(*p3)));
_original.push_back(p1);
_original.push_back(p2);
if(p3) _original.push_back(p3);
_isPerturbative.push_back(initPerturbative(p1));
_isPerturbative.push_back(initPerturbative(p2));
if(p3) _isPerturbative.push_back(initPerturbative(p3));
else _isPerturbative.push_back(false);
for(int i = 0; i<3; i++) _isBeamRemnant.push_back(false);
if(p3) {
_numComp = 3;
_id = 100*abs(p1->id()) + 10*abs(p2->id()) + abs(p3->id());
} else {
_numComp = 2;
- if(p2->id() > 10)
- _id = 10*abs(p2->id()/100) + abs(p1->id());
- else if(p1->id() > 10)
- _id = 10*abs(p1->id()/100) + abs(p2->id());
- else
- _id = 10*abs(p1->id()) + abs(p2->id());
+ int i1,i2;
+ if(p2->id() > 10) {
+ i1 = abs(p2->id()/100);
+ i2 = abs(p1->id());
+ }
+ else if(p1->id() > 10) {
+ i1 = abs(p1->id()/100);
+ i2 = abs(p2->id());
+ }
+ else {
+ i1 = abs(p1->id());
+ i2 = abs(p2->id());
+ }
+ if(i1>i2) swap (i1,i2);
+ _id = 10*i1+i2;
}
// calculate the momentum
calculateP();
// calculate the position
// Only in the case of two components we have a definition of cluster
// position in terms of the two components.
if ( _numComp != 2 ) {
// take the average
setVertex(LorentzPoint());
}
else {
setVertex(calculateX(_component[0],_component[1]));
}
}
Cluster::Cluster(tcEventPDPtr x)
: Particle(x),
_isAvailable(false),
_hasReshuffled(false),
_component(),
_original(),
_isBeamRemnant(),
_isPerturbative(),
_numComp(0),
_id(0) {}
Cluster::Cluster(const Particle &x)
: Particle(x),
_isAvailable(false),
_hasReshuffled(false),
_component(),
_original(),
_isBeamRemnant(),
_isPerturbative(),
_numComp(0),
_id(0) {}
Energy Cluster::sumConstituentMasses() const
{
if(_numComp == 3) {
return _component[0]->mass() +
_component[1]->mass() +
_component[2]->mass();
} else if(_numComp == 2)
return _component[0]->mass() + _component[1]->mass();
else return ZERO;
}
void Cluster::calculateP() {
Lorentz5Momentum m;
for(int i = 0; i<_numComp; i++)
m += _component[i]->momentum();
m.rescaleMass();
set5Momentum(m);
}
LorentzPoint Cluster::calculateX(tPPtr q1, tPPtr q2) {
// Get the needed parameters.
Energy2 vmin2
= ClusterHadronizationHandler::currentHandler()->minVirtuality2();
Length dmax
= ClusterHadronizationHandler::currentHandler()->maxDisplacement();
// Get the positions and displacements of the two components (Lab frame).
LorentzPoint pos1 = q1->vertex();
Lorentz5Momentum p1 = q1->momentum();
LorentzDistance displace1 = -log( UseRandom::rnd() ) *
hbarc * p1 * (1 / sqrt(sqr(p1.m2() - p1.mass2()) + sqr(vmin2)));
if ( abs( displace1.m() ) > dmax ) {
displace1 *= dmax / abs( displace1.m() );
}
LorentzPoint pos2 = q2->vertex();
Lorentz5Momentum p2 = q2->momentum();
LorentzDistance displace2 = -log( UseRandom::rnd() ) *
hbarc * p2 * (1 / sqrt(sqr(p2.m2() - p2.mass2()) + sqr(vmin2)));
if ( abs( displace2.m() ) > dmax ) {
displace2 *= dmax / abs( displace2.m() );
}
double s1 = 0.0, s2 = 0.0;
Lorentz5Momentum pcl = p1 + p2;
if ( abs( pcl.vect().dot( displace1.vect() ) ) > 1.0e-20*MeV*mm &&
abs( pcl.vect().dot( displace2.vect() ) ) > 1.0e-20*MeV*mm ) {
// The displacement with the smallest projection along pcl.vect()
// is scaled up such that both displacements have equal projections
// along pcl.vect().
double ratio = ( abs( pcl.vect().dot( displace1.vect() ) ) /
abs( pcl.vect().dot( displace2.vect() ) ) );
if ( pcl.vect().dot(displace1.vect()) *
pcl.vect().dot(displace2.vect()) < 0.0*sqr(MeV*mm) ) {
ratio *= -1;
}
if ( abs( ratio ) > 1.0 ) {
displace2 *= ratio;
} else {
displace1 *= ratio;
}
// Now determine the s1 and s2 values.
double s1minusS2 = ( pcl.vect().dot( pos2.vect() - pos1.vect() ) /
pcl.vect().dot( displace1.vect() ) );
if ( s1minusS2 < 0 ) {
s1 = 1.0;
s2 = s1 - s1minusS2;
} else if ( s1minusS2 > 0 ) {
s2 = 1;
s1 = s2 + s1minusS2;
}
}
// Now, finally, determine the cluster position
LorentzPoint position = 0.5 * (pos1 + pos2 + s1*displace1 + s2*displace2);
// set the decay vertex of the two particles via the lifeLength
q1->setLifeLength(position-q1->vertex());
q2->setLifeLength(position-q2->vertex());
// return the answer
return position;
}
bool Cluster::isBeamCluster() const {
for(int i = 0; i<_numComp; i++)
if(_isBeamRemnant[i]) return true;
return false;
}
void Cluster::isBeamCluster(tPPtr part) {
for(int i = 0; i<_numComp; i++) {
if(_original[i] == part) {
_isBeamRemnant[i] = true;
break;
}
}
}
bool Cluster::isStatusFinal() const {
int s = children().size();
for(unsigned int i = 0; i<children().size(); i++)
if(children()[i]->PDGName() == "Cluster") s--;
return ( s > 0);
}
tPPtr Cluster::particle(int i) const {
return (i < _numComp) ? _component[i] : PPtr();
}
tPPtr Cluster::colParticle(bool anti) const {
if ( _numComp != 2 ) return PPtr();
if ( _original[0]->hasColour(anti) ) return _original[0];
else if ( _original[1]->hasColour(anti) ) return _original[1];
else return PPtr();
}
tPPtr Cluster::antiColParticle() const {
return colParticle(true);
}
bool Cluster::isPerturbative(int i) const {
return _isPerturbative[i];
}
bool Cluster::isBeamRemnant(int i) const {
return _isBeamRemnant[i];
}
void Cluster::setBeamRemnant(int i, bool b) {
if(i < _numComp)
_isBeamRemnant[i] = b;
}
bool Cluster::initPerturbative(tPPtr p)
{
Energy mg
= CurrentGenerator::current().getParticleData(ParticleID::g)->constituentMass();
return p->scale() > sqr(mg);
}
diff --git a/Hadronization/Cluster.h b/Hadronization/Cluster.h
--- a/Hadronization/Cluster.h
+++ b/Hadronization/Cluster.h
@@ -1,341 +1,341 @@
// -*- C++ -*-
//
// Cluster.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_Cluster_H
#define HERWIG_Cluster_H
#include <ThePEG/EventRecord/Particle.h>
#include "Herwig/Utilities/EnumParticles.h"
#include "CluHadConfig.h"
#include "ClusterHadronizationHandler.fh"
#include "Cluster.fh"
#include "ThePEG/Utilities/ClassDescription.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Hadronization
* \class Cluster
* \brief This class describes a cluster object.
* \author Philip Stephens
* \author Alberto Ribon
*
* This class represents a cluster, which is a colour singlet made usually
* of two components (quark-antiquark, quark-diquark, antiquark-antidiquark)
* or rarely by three components (quark-quark-quark, antiquark-antiquark-
* antiquark). A reference to the container with the pointers to its
* Components is provided.
*
* The class provides access to the pointers which point to:
*
* - The cluster parent. In the case that the cluster it is a fission
* product of a heavy cluster the parent is a cluster. If the cluster
* is formed from the perturbative partons then the parents will be
* the colour connected partons that formed the cluster.
* - The children (usually two). In the case the cluster is a
* heavy cluster that undergoes fission the children are clusters.
* Occasionally the cluster has been "redefined" (re-interpreted). For
* example in the case that three quark or anti-quark components
* have been redefined as two components (quark+diquark, or antiquark+
* antidiquark).
* - The (eventual) reshuffling partner, necessary for energy-momentum
* conservation when light clusters are decayed into single hadron. Not
* all clusters will have a reshuffling partner.
*
* Notice that in order to determine the cluster position from the positions
* of the components, the Cluster class needs some parameters.
* Because the Cluster class is neither interfaced nor persistent,
* a static pointer to the ClusterHadronizationHandler class instance,
* where the parameters are, is used. This static pointer is
* set via the method setPointerClusterHadHandler(), during the
* run initialization, doinitrun() of ClusterHadronizationHandler.
*
* @see ClusterHadronizationHandler
*/
class Cluster : public Particle {
protected:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor. Only used in PersistentIStream
*/
Cluster();
/**
* The ClassTraits<Cluster> class must be a friend to be able to
* use the private default constructor.
*/
friend struct ClassTraits<Cluster>;
public:
/**
* Constructor with a particleData pointer
*/
Cluster(tcEventPDPtr);
/**
* This creates a cluster from 2 (or 3) partons.
*/
Cluster(tPPtr part1, tPPtr part2, tPPtr part3 = tPPtr());
/**
* Also a constructor where a particle is given not a cluster.
*/
Cluster(const Particle &);
//@}
/**
* Number of quark (diquark) constituents (normally two).
*/
int numComponents() const
{ return _numComp; }
/**
* Sum of the constituent masses of the components of the cluster.
*/
Energy sumConstituentMasses() const;
/**
* Returns the ith constituent.
*/
tPPtr particle(int i) const;
/**
* Returns the original constituent carrying colour
*/
tPPtr colParticle(bool anti = false) const;
/**
* Returns the original constituent carrying anticolour
*/
tPPtr antiColParticle() const;
/**
* Returns whether the ith constituent is from a perturbative process.
*/
bool isPerturbative(int) const;
/**
* Indicates whether the ith constituent is a beam remnant.
*/
bool isBeamRemnant(int) const;
/**
* Sets whether the ith constituent is a beam remnant.
*/
void setBeamRemnant(int,bool);
/**
* Returns the clusters id, not the same as the PDG id.
*/
int clusterId() const { return _id; }
public:
/**
* Returns true when a constituent is a beam remnant.
*/
bool isBeamCluster() const;
/**
* Set the pointer to the reshuffling partner cluster.
*/
void flagAsReshuffled()
{ _hasReshuffled = true; }
/**
* Sets the component (if any) that points to "part" as a beam remnant.
*/
void isBeamCluster(tPPtr part);
/**
* Returns true if this cluster is to be handled by the hadronization.
*/
bool isAvailable() const
{ return _isAvailable; }
/**
* Sets the value of availability.
*/
void isAvailable(bool inputAvailable)
{ _isAvailable = inputAvailable; }
/**
* Return true if the cluster does not have cluster parent.
*/
bool isStatusInitial() const
{ return parents().empty(); }
/**
* Return true if the cluster does not have cluster children and
* it is not already decayed (i.e. it does not have hadron children)
* (to be used only after the fission of heavy clusters).
*/
bool isReadyToDecay() const
{ return children().empty(); }
/**
* Return true if the cluster has one and only one cluster children
* and no hadron children: that means either that its three quarks or
* anti-quarks components have been redefined as two components
* (quark+diquark, or antiquark+antidiquark), or that the cluster
* has been used as a partner for the momentum reshuffling necessary
* to conserve energy-momentum when a light cluster is decayed into
* a single hadron (notice that this latter light cluster has
* isRedefined() false, because it has an hadron child).
* In both cases, the unique cluster children is the new redefined
* cluster. The two cases can be distinguish by the next method.
*/
bool isRedefined() const {
return ( children().size() == 1
&& children()[0]->id() == ParticleID::Cluster );
}
/**
* Return true when it has a reshuffling partner.
* Notice that a cluster can have hasBeenReshuffled() true but
* isRedefined() false: this is the case of a light cluster
* that decays into a single hadron.
*/
bool hasBeenReshuffled() const
{ return _hasReshuffled; }
/**
* Return true if the cluster has hadron children.
*/
bool isStatusFinal() const;
public:
/**
* Calculate the 4-position vector of the cluster
* Method made static so can be used in other places
* Displacement of the ith constituent given by momentum \f$p_i\f$
* vertex \f$x_i\f$ and mass \f$m_i\f$ is
* \f[ D_i = -C \log(r) \frac{p_i}{\sqrt{(p_i^2 - m_i^2)^2 + v^4}} \f]
* where \f$r\f$ is a random number [0,1],
* \f$v\f$ is the minimum virtuality and \f$C\f$ is
* a conversion factor from GeV to millimeters. We can then find the
* difference in \f$s\f$ factors as
* \f[ (s_1-s_2) = \frac{(\vec{p}_1 + \vec{p}_2) \cdot (\vec{x}_2 -
* \vec{x}_1)}{(\vec{p}_1 + \vec{p}_2) \cdot \vec{D}_1}.
* \f]
* if \f$s_2>s_1\f$ then \f$s_1 = 1.0\f$ otherwise \f$s_2 = 1.0\f$.
* These are then used to determine the value of the clusters vertex as
* \f[ X = \frac{1}{2} ( x_1 +x_2 + s_1 D_1 + s_2 D_2). \f]
*/
static LorentzPoint calculateX(tPPtr q1, tPPtr q2);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual PPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual PPtr fullclone() const;
//@}
public:
/** @name Input and output functions. */
//@{
/**
* Standard function for writing to a persistent stream.
*/
void persistentOutput(PersistentOStream &) const;
/**
* Standard function for reading from a persistent stream.
*/
void persistentInput(PersistentIStream &, int);
private:
/**
* Private and non-existent assignment operator.
*/
- Cluster & operator=(const Cluster &);
+ Cluster & operator=(const Cluster &) = delete;
/**
* Calculate the 5-momentum vector of the cluster
* The 5-momentum of the cluster is given by
* \f[ P = \sum_i p_i \f]
* and the mass of the cluster is \f$m^2 = P^2\f$
*/
void calculateP();
/**
* Determines whether constituent p is perturbative or not.
*/
bool initPerturbative(tPPtr p);
/**
* Describe an abstract base class with persistent data.
*/
static ClassDescription<Cluster> initCluster;
bool _isAvailable; //!< Whether the cluster is hadronizing
bool _hasReshuffled; //!< Whether the cluster has been reshuffled
ParticleVector _component; //!< The constituent partons
tParticleVector _original; //!< The original components
vector<bool> _isBeamRemnant; //!< Whether a parton is a beam remnant
vector<bool> _isPerturbative; //!< Whether a parton is perturbative
int _numComp; //!< The number of constituents
long _id; //!< The id of this cluster
};
} // end namespace Herwig
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/**
* The following template specialization informs ThePEG about the
* base class of Cluster.
*/
template <>
struct BaseClassTrait<Herwig::Cluster,1> {
/** Typedef of the base class of Cluster. */
typedef Particle NthBase;
};
/**
* The following template specialization informs ThePEG about the
* name of this class and the shared object where it is defined.
*/
template <>
struct ClassTraits<Herwig::Cluster>:
public ClassTraitsBase<Herwig::Cluster> {
/** Return the class name. */
static string className() { return "Herwig::Cluster"; }
/** Create a Particle object. */
static TPtr create() { return TPtr::Create(Herwig::Cluster()); }
};
/** @endcond */
}
#endif // HERWIG_Cluster_H
diff --git a/Hadronization/ClusterDecayer.h b/Hadronization/ClusterDecayer.h
--- a/Hadronization/ClusterDecayer.h
+++ b/Hadronization/ClusterDecayer.h
@@ -1,166 +1,166 @@
// -*- C++ -*-
//
// ClusterDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ClusterDecayer_H
#define HERWIG_ClusterDecayer_H
#include <ThePEG/Interface/Interfaced.h>
#include <ThePEG/EventRecord/Step.h>
#include "CluHadConfig.h"
#include "HadronSelector.h"
#include "ClusterDecayer.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Hadronization
* \class ClusterDecayer
* \brief This class decays the "normal" clusters
* \author Philip Stephens
* \author Alberto Ribon
*
* This class decays the "normal" clusters, e.g. ones that are not heavy
* enough for fission, and not too light to decay into one hadron.
*
* This class is directs the production of hadrons via 2-body cluster decays.
* The selection of the hadron flavours is given by Herwig::HadronSelector.
*
* @see HadronSelector
* @see \ref ClusterDecayerInterfaces "The interfaces"
* defined for ClusterDecayer.
*/
class ClusterDecayer: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
ClusterDecayer();
//@}
/** Decays all remaining clusters into hadrons.
* This routine decays the clusters that are left after
* Herwig::ClusterFissioner::fission and
* Herwig::LightClusterDecayer::decay have been called. These are all
* the "normal" clusters which are not forced into hadrons by
* the other functions.
*/
void decay(const ClusterVector & clusters, tPVector & finalhadrons)
;
public:
/**
* Standard ThePEG function for writing a persistent stream.
*/
void persistentOutput(PersistentOStream &) const;
/**
* Standard ThePEG function for reading from a persistent stream.
*/
void persistentInput(PersistentIStream &, int);
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ClusterDecayer & operator=(const ClusterDecayer &);
+ ClusterDecayer & operator=(const ClusterDecayer &) = delete;
public:
/** Decays the cluster into two hadrons.
*
* This routine is used to take a given cluster and decay it into
* two hadrons which are returned. If one of the constituents is from
* the perturbative regime then the direction of the perturbative parton
* is remembered and the decay is preferentially in that direction. The
* direction of the decay is given by
* \f[ \cos \theta = 1 + S \log r_1 \f]
* where \f$ S \f$ is a parameter of the model and \f$ r_1 \f$ is a random
* number [0,1].
*/
pair<PPtr,PPtr> decayIntoTwoHadrons(tClusterPtr ptr);
private:
/** Compute the positions of the new hadrons based on the clusters position.
*
* This method calculates the positions of the children hadrons by a
* call to ThePEG::RandomGenerator::rndGaussTwoNumbers with width inversely
* proportional to the cluster mass, around the parent cluster position.
*/
void calculatePositions( const Lorentz5Momentum &, const LorentzPoint &,
const Lorentz5Momentum &, const Lorentz5Momentum &,
LorentzPoint &, LorentzPoint &) const;
/**
* Pointer to a Herwig::HadronSelector for choosing decay types
*/
Ptr<HadronSelector>::pointer _hadronsSelector;
//@{
/**
* Whether a cluster decays along the perturbative parton direction.
*/
bool _clDirLight;
bool _clDirBottom;
bool _clDirCharm;
bool _clDirExotic;
/**
* The S parameter from decayIntoTwoHadrons
*/
double _clSmrLight;
double _clSmrBottom;
double _clSmrCharm;
double _clSmrExotic;
//@}
/**
* Whether or not the hadrons produced should be on-shell
* or generated used the MassGenerator
*/
bool _onshell;
/**
* Number of tries to generate the masses of the decay products
*/
unsigned int _masstry;
};
}
#endif /* HERWIG_ClusterDecayer_H */
diff --git a/Hadronization/ClusterFinder.h b/Hadronization/ClusterFinder.h
--- a/Hadronization/ClusterFinder.h
+++ b/Hadronization/ClusterFinder.h
@@ -1,150 +1,150 @@
// -*- C++ -*-
//
// ClusterFinder.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ClusterFinder_H
#define HERWIG_ClusterFinder_H
#include <ThePEG/Interface/Interfaced.h>
#include "CluHadConfig.h"
#include "ClusterFinder.fh"
namespace Herwig {
using namespace ThePEG;
/*! \ingroup Hadronization
* \class ClusterFinder
* \brief This class forms clusters from the partons produced in the Shower.
* \author Philip Stephens
* \author Alberto Ribon
*
* This class scans through the particles in the event and produces a
* collection of clusters, defined as a colour-singlet combinations of
* colour-connected particles. There are no assumptions about the type
* (i.e. quark or diquark) or number of the component particles of the
* cluster; however, most of the time clusters are formed by quark-antiquark
* pairs. In special situations, such as baryon-violating processes in
* R-nonconserved Susy, three quarks (or three antiquarks) could form a
* cluster. Because at the moment we don't know how to handle 3-component
* clusters (i.e. how to fission heavy ones, or how to decay clusters), we
* provide also a separate method, reduceToTwoComponents, which
* does the job of redefining these 3-component clusters as "normal"
* 2-component ones, simply by randomly considering two (anti-) quarks as a
* (anti-) diquark. Notice that if in the future the method
* reduceToTwoComponents is modified or even eliminated, the
* main method for finding clusters, formClusters, will not need
* any change.
*
* @see \ref ClusterFinderInterfaces "The interfaces"
* defined for ClusterFinder.
*/
class ClusterFinder: public Interfaced {
public :
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
ClusterFinder() : heavyDiquarks_(2), diQuarkSelection_(1), diQuarkOnShell_(false)
{}
//@}
public:
/**
* This routine forms the clusters of the event.
*
* Form clusters starting from the list of partons given.
* It also checks if the cluster is a beam cluster, that is if
* at least one of its components is a beam remnant.
*/
ClusterVector formClusters(const PVector & partons)
;
/**
* Reduces three component clusters into two components.
*
* For the eventual clusters that have three components
* (quark, quark, quark) or (antiquark, antiquark, antiquark),
* it redefines them as "normal" clusters with two components:
* (quark,diquark) or (antiquark,antidiquark), by a random drawing.
* This could be eliminated or changed in the future.
*/
void reduceToTwoComponents(ClusterVector&)
;
public:
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ClusterFinder & operator=(const ClusterFinder &);
+ ClusterFinder & operator=(const ClusterFinder &) = delete;
private:
/**
* Treatment of diquarks contain heavy quarks in baryon-number violating clusters
*/
unsigned int heavyDiquarks_;
/**
* Option for the selection of which quarks to make into a diquark
*/
unsigned int diQuarkSelection_;
/**
* Force diquarks to be on-shell
*/
bool diQuarkOnShell_;
};
}
#endif /* HERWIG_ClusterFinder_H */
diff --git a/Hadronization/ClusterFissioner.h b/Hadronization/ClusterFissioner.h
--- a/Hadronization/ClusterFissioner.h
+++ b/Hadronization/ClusterFissioner.h
@@ -1,386 +1,386 @@
// -*- C++ -*-
//
// ClusterFissioner.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ClusterFissioner_H
#define HERWIG_ClusterFissioner_H
#include <ThePEG/Interface/Interfaced.h>
#include "CluHadConfig.h"
#include "HadronSelector.h"
#include "ClusterFissioner.fh"
namespace Herwig {
using namespace ThePEG;
//class Cluster; // forward declaration
/** \ingroup Hadronization
* \class ClusterFissioner
* \brief This class handles clusters which are too heavy.
* \author Philip Stephens
* \author Alberto Ribon
* \author Stefan Gieseke
*
* This class does the job of chopping up either heavy clusters or beam
* clusters in two lighter ones. The procedure is repeated recursively until
* all of the cluster children have masses below some threshold values.
*
* For the beam remnant clusters, at the moment what is done is the following.
* In the case that the soft underlying event is switched on, the
* beam remnant clusters are tagged as not available,
* therefore they will not be treated at all during the hadronization.
* In the case instead that the soft underlying event is switched off,
* then the beam remnant clusters are treated exactly as "normal" clusters,
* with the only exception of the mass spectrum used to generate the
* cluster children masses. For non-beam clusters, the masses of the cluster
* children are draw from a power-like mass distribution; for beam clusters,
* according to the value of the flag _IOpRem, either both
* children masses are draw from a fast-decreasing exponential mass
* distribution (case _IOpRem == 0, or, indendently by
* _IOpRem, in the special case that the beam cluster contains two
* beam remnants), or one mass from the exponential distribution (corresponding
* of the cluster child with the beam remnant) and the other with the usual
* power-like distribution (case _IOpRem == 1, which is the
* default one, as in Herwig 6.3).
*
* The reason behind the use of a fast-decreasing exponential distribution
* is that to avoid a large transverse energy from the many sequential
* fissions that would otherwise occur due to the typical large cluster
* mass of beam clusters. Using instead an exponential distribution
* the masses of the two cluster children will be very small (order of
* GeV).
*
* The rationale behind the implementation of the splitting of clusters
* has been to preserve *all* of the information about such splitting
* process. More explicitly a ThePEG::Step class is passed in and the
* new clusters are added to the step as the decay products of the
* heavy cluster. This approach has the twofold
* advantage to provide all of the information that could be needed
* (expecially in future developments), without any information loss,
* and furthermore it allows a better debugging.
*
* @see HadronSelector
* @see \ref ClusterFissionerInterfaces "The interfaces"
* defined for ClusterFissioner.
*/
class ClusterFissioner: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
ClusterFissioner();
//@}
/** Splits the clusters which are too heavy.
*
* Split either heavy clusters or beam clusters recursively until all
* children have mass below some threshold. Heavy clusters are those that
* satisfy the condition
* \f[ M^P > C^P + S^P \f]
* where \f$ M \f$ is the clusters mass, \f$ P \f$ is the parameter
* ClPow, \f$ C \f$ is the parameter ClMax and \f$ S \f$ is the
* sum of the clusters constituent partons.
* For beam clusters, they are split only if the soft underlying event
* is switched off, otherwise these clusters will be tagged as unavailable
* and they will not be treated by the hadronization altogether.
* In the case beam clusters will be split, the procedure is exactly
* the same as for normal non-beam clusters, with the only exception
* of the mass spectrum from which to draw the masses of the two
* cluster children (see method drawChildrenMasses for details).
*/
tPVector fission(ClusterVector & clusters, bool softUEisOn);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ClusterFissioner & operator=(const ClusterFissioner &);
+ ClusterFissioner & operator=(const ClusterFissioner &) = delete;
/**
* This method directs the splitting of the heavy clusters
*
* This method does the splitting of the clusters and all of its cluster
* children, if heavy. All of these new children clusters are added to the
* collection of clusters. The method works as follows.
* Initially the vector contains just the stack of input pointers to the
* clusters to be split. Then it will be filled recursively by all
* of the cluster's children that are heavy enough to require
* to be split. In each loop, the last element of the vector is
* considered (only once because it is then removed from the vector).
*
* \todo is the following still true?
* For normal, non-beam clusters, a power-like mass distribution
* is used, whereas for beam clusters a fast-decreasing exponential mass
* distribution is used instead. This avoids many iterative splitting which
* could produce an unphysical large transverse energy from a supposed
* soft beam remnant process.
*/
void cut(stack<ClusterPtr> &,
ClusterVector&, tPVector & finalhadrons, bool softUEisOn);
public:
/**
* Definition for easy passing of two particles.
*/
typedef pair<PPtr,PPtr> PPair;
/**
* Definition for use in the cut function.
*/
typedef pair<PPair,PPair> cutType;
/**
* Splits the input cluster.
*
* Split the input cluster (which can be either an heavy non-beam
* cluster or a beam cluster). The result is two pairs of particles. The
* first element of each pair is new cluster/hadron, while the second
* element of each pair is the particle drawn from the vacuum to create
* the new cluster/hadron.
* Notice that this method treats also beam clusters by using a different
* mass spectrum used to generate the cluster child masses (see method
* drawChildMass).
*/
//@{
/**
* Split two-component cluster
*/
virtual cutType cutTwo(ClusterPtr &, tPVector & finalhadrons, bool softUEisOn);
/**
* Split three-component cluster
*/
virtual cutType cutThree(ClusterPtr &, tPVector & finalhadrons, bool softUEisOn);
//@}
public:
/**
* Produces a hadron and returns the flavour drawn from the vacuum.
*
* This routine produces a new hadron. It
* also sets the momentum and vertex to the values given.
*/
PPair produceHadron(tcPDPtr hadron, tPPtr newPtr, const Lorentz5Momentum &a,
const LorentzPoint &b) const;
protected:
/**
* Produces a cluster from the flavours passed in.
*
* This routine produces a new cluster with the flavours given by ptrQ and newPtr.
* The new 5 momentum is a and the parent momentum are c and d. C is for the
* ptrQ and d is for the new particle newPtr. rem specifies whether the existing
* particle is a beam remnant or not.
*/
PPair produceCluster(tPPtr ptrQ, tPPtr newPtr, const Lorentz5Momentum &a,
const LorentzPoint &b, const Lorentz5Momentum &c,
const Lorentz5Momentum &d, const bool rem,
tPPtr spect=tPPtr(), bool remSpect=false) const;
/**
* Returns the new quark-antiquark pair
* needed for fission of a heavy cluster. Equal probabilities
* are assumed for producing u, d, or s pairs.
*/
void drawNewFlavour(PPtr& newPtrPos,PPtr& newPtrNeg) const;
/**
* Produces the mass of a child cluster.
*
* Draw the masses \f$M'\f$ of the the cluster child produced
* by the fission of an heavy cluster (of mass M). m1, m2 are the masses
* of the constituents of the cluster; m is the mass of the quark extract
* from the vacuum (together with its antiparticle). The algorithm produces
* the mass of the cluster formed with consituent m1.
* Two mass distributions can be used for the child cluster mass:
* -# power-like mass distribution ("normal" mass) with power exp
* \f[ M' = {\rm rnd}((M-m_1-m_2-m)^P, m^p)^{1/P} + m_1 \f]
* where \f$ P \f$ is a parameter of the model and \f$ \rm{rnd} \f$ is
* the function:
* \f[ \rm{rnd}(a,b) = (1-r)a + r b \f]
* and here \f$ r \f$ is a random number [0,1].
* -# fast-decreasing exponential mass distribution ("soft" mass) with
* rmin. rmin is given by
* \f[ r_{\rm min} = \exp(-b (M - m_1 - m_2 - 2 m)) \f]
* where \f$ b \f$ is a parameter of the model. The generated mass is
* given by
* \f[ M' = m_1 + m - \frac{\log\left(
* {\rm rnd}(r_{\rm min}, 1-r_{\rm min})\right)}{b} \f].
*
* The choice of which mass distribution should be used for each of the two
* cluster children is dictated by the parameter soft.
*/
Energy drawChildMass(const Energy M, const Energy m1, const Energy m2,
const Energy m, const double exp, const bool soft) const;
/**
* Determines the kinematics of a heavy cluster decay C->C1 + C2
*/
void calculateKinematics(const Lorentz5Momentum &pClu,
const Lorentz5Momentum &p0Q1,
const bool toHadron1, const bool toHadron2,
Lorentz5Momentum &pClu1, Lorentz5Momentum &pClu2,
Lorentz5Momentum &pQ1, Lorentz5Momentum &pQb,
Lorentz5Momentum &pQ2, Lorentz5Momentum &pQ2b) const;
/**
* Determine the positions of the two children clusters.
*
* This routine generates the momentum of the decay products. It also
* generates the momentum in the lab frame of the partons drawn out of
* the vacuum.
*/
void calculatePositions(const Lorentz5Momentum &pClu,
const LorentzPoint & positionClu,
const Lorentz5Momentum & pClu1,
const Lorentz5Momentum & pClu2,
LorentzPoint & positionClu1,
LorentzPoint & positionClu2 ) const;
protected:
/** @name Access members for child classes. */
//@{
/**
* Access to the hadron selector
*/
HadronSelectorPtr hadronsSelector() const {return _hadronsSelector;}
/**
* Access to soft-cluster parameter
*/
Energy btClM() const {return _btClM;}
/**
* Cluster splitting paramater for light quarks
*/
double pSplitLight() const {return _pSplitLight;}
/**
* Cluster splitting paramater for bottom quarks
*/
double pSplitBottom() const {return _pSplitBottom;}
/**
* Cluster splitting paramater for charm quarks
*/
double pSplitCharm() const {return _pSplitCharm;}
/**
* Cluster splitting paramater for exotic particles
*/
double pSplitExotic() const {return _pSplitExotic;}
//@}
private:
/**
* Check if a cluster is heavy enough to split again
*/
bool isHeavy(tcClusterPtr );
/**
* A pointer to a Herwig::HadronSelector object for generating hadrons.
*/
HadronSelectorPtr _hadronsSelector;
/**
* @name The Cluster max mass,dependant on which quarks are involved, used to determine when
* fission will occur.
*/
//@{
Energy _clMaxLight;
Energy _clMaxBottom;
Energy _clMaxCharm;
Energy _clMaxExotic;
//@}
/**
* @name The power used to determine when cluster fission will occur.
*/
//@{
double _clPowLight;
double _clPowBottom;
double _clPowCharm;
double _clPowExotic;
//@}
/**
* @name The power, dependant on whic quarks are involved, used in the cluster mass generation.
*/
//@{
double _pSplitLight;
double _pSplitBottom;
double _pSplitCharm;
double _pSplitExotic;
//@}
/**
* Parameter used (2/b) for the beam cluster mass generation.
* Currently hard coded value.
*/
Energy _btClM;
/**
* Flag used to determine what distributions to use for the cluster masses.
*/
int _iopRem;
/**
* The string constant
*/
Tension _kappa;
};
}
#endif /* HERWIG_ClusterFissioner_H */
diff --git a/Hadronization/HadronSelector.h b/Hadronization/HadronSelector.h
--- a/Hadronization/HadronSelector.h
+++ b/Hadronization/HadronSelector.h
@@ -1,814 +1,814 @@
// -*- C++ -*-
//
// HadronSelector.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HadronSelector_H
#define HERWIG_HadronSelector_H
//
// This is the declaration of the HadronSelector class.
//
#include "ThePEG/Interface/Interfaced.h"
#include <ThePEG/Persistency/PersistentOStream.h>
#include <ThePEG/Persistency/PersistentIStream.h>
#include <ThePEG/PDT/ParticleData.h>
#include <ThePEG/PDT/StandardMatchers.h>
#include <ThePEG/Repository/EventGenerator.h>
#include "HadronSelector.fh"
namespace Herwig {
using namespace ThePEG;
/**\ingroup Hadronization
* \class HadronSelector
* \brief This class selects the hadron flavours of a cluster decay.
* \author Philip Stephens
* \author Alberto Ribon
* \author Peter Richardson
*
* This is the base class for the selection of either a pair of hadrons, or
* in some cases a single hadron. The different approaches which were
* previously implemented in this class are now implemented in the
* HwppSelector and Hw64Selector which inherit from this class.
*
* This class implements a number of methods which are needed by all models
* and in addition contains the weights for the different meson multiplets and
* mixing of the light \f$I=0\f$ mesons.
*
* @see \ref HadronSelectorInterfaces "The interfaces"
* defined for HadronSelector.
* @see HwppSelector
* @see Hw64Selector
*/
class HadronSelector: public Interfaced {
public:
/** \ingroup Hadronization
* \class HadronInfo
* \brief Class used to store all the hadron information for easy access.
* \author Philip Stephens
*
* Note that:
* - the hadrons in _table can be filled in any ordered
* w.r.t. the mass value, and flavours for different
* groups (for instance, (u,s) hadrons don't need to
* be placed after (d,s) or any other flavour), but
* all hadrons with the same flavours must be consecutive
* ( for instance you cannot alternate hadrons of type
* (d,s) with those of flavour (u,s) ).
* Furthermore, it is assumed that particle and antiparticle
* have the same weights, and therefore only one of them
* must be entered in the table: we have chosen to refer
* to the particle, defined as PDG id > 0, although if
* an anti-particle is provided in input it is automatically
* transform to its particle, simply by taking the modulus
* of its id.
*/
class HadronInfo {
public:
/**
* Constructor
* @param idin The PDG code of the hadron
* @param datain The pointer to the ParticleData object
* @param swtin The singlet/decuplet/orbital factor
* @param massin The mass of the hadron
*/
HadronInfo(long idin=0, tPDPtr datain=tPDPtr(),
double swtin=1., Energy massin=ZERO)
: id(idin), ptrData(datain), swtef(swtin), wt(1.0), overallWeight(0.0),
mass(massin)
{}
/**
* Comparision operator on mass
*/
bool operator<(const HadronInfo &x) const {
if(mass!=x.mass) return mass < x.mass;
else return id < x.id;
}
/**
* The hadrons id.
*/
long id;
/**
* pointer to ParticleData, to get the spin, etc...
*/
tPDPtr ptrData;
/**
* singlet/decuplet/orbital factor
*/
double swtef;
/**
* mixing factor
*/
double wt;
/**
* (2*J+1)*wt*swtef
*/
double overallWeight;
/**
* The hadrons mass
*/
Energy mass;
/**
* Rescale the weight for a given hadron
*/
void rescale(double x) const {
const_cast<HadronInfo*>(this)->overallWeight *= x;
}
/**
* Friend method used to print the value of a table element.
*/
friend PersistentOStream & operator<< (PersistentOStream & os,
const HadronInfo & hi ) {
os << hi.id << hi.ptrData << hi.swtef << hi.wt
<< hi.overallWeight << ounit(hi.mass,GeV);
return os;
}
/**
* debug output
*/
friend ostream & operator<< (ostream & os, const HadronInfo & hi );
/**
* Friend method used to read in the value of a table element.
*/
friend PersistentIStream & operator>> (PersistentIStream & is,
HadronInfo & hi ) {
is >> hi.id >> hi.ptrData >> hi.swtef >> hi.wt
>> hi.overallWeight >> iunit(hi.mass,GeV);
return is;
}
};
/** \ingroup Hadronization
* \class Kupco
* \brief Class designed to make STL routines easy to use.
* \author Philip Stephens
*
* This class is used to generate a list of the hadron pairs which can
* be produced that allows easy traversal and quick access.
*/
class Kupco {
public:
/**
* Constructor
* @param inidQ PDG code of the quark drawn from the vacuum.
* @param inhad1 ParticleData for the first hadron produced.
* @param inhad2 ParticleData for the second hadron produced.
* @param inwgt The weight for the hadron pair
*/
Kupco(tcPDPtr inidQ,tcPDPtr inhad1,tcPDPtr inhad2, Energy inwgt)
: idQ(inidQ),hadron1(inhad1),hadron2(inhad2),weight(inwgt)
{}
/**
* id of the quark drawn from the vacuum.
*/
tcPDPtr idQ;
/**
* The ParticleData object for the first hadron produced.
*/
tcPDPtr hadron1;
/**
* The ParticleData object for the second hadron produced.
*/
tcPDPtr hadron2;
/**
* Weight factor of this componation.
*/
Energy weight;
};
public:
/**
* The helper classes
*/
//@{
/**
* The type is used to contain all the hadrons info of a given flavour.
*/
typedef set<HadronInfo> KupcoData;
//@}
/**
* The hadron table type.
*/
typedef map<pair<long,long>,KupcoData> HadronTable;
public:
/**
* The default constructor.
*/
HadronSelector(unsigned int);
/**
* Method to return a pair of hadrons given the PDG codes of
* two or three constituents
* @param cluMass The mass of the cluster
* @param par1 The first constituent
* @param par2 The second constituent
* @param par3 The third constituent
*/
virtual pair<tcPDPtr,tcPDPtr> chooseHadronPair(const Energy cluMass, tcPDPtr par1,
tcPDPtr par2,tcPDPtr par3 = PDPtr()) const
= 0;
/**
* Select the single hadron for a cluster decay
* return null pointer if not a single hadron decay
* @param par1 1st constituent
* @param par2 2nd constituent
* @param mass Mass of the cluster
*/
tcPDPtr chooseSingleHadron(tcPDPtr par1, tcPDPtr par2, Energy mass) const;
/**
* This returns the lightest pair of hadrons given by the flavours.
*
* Given the two (or three) constituents of a cluster, it returns
* the two lightest hadrons with proper flavour numbers.
* Furthermore, the first of the two hadrons must have the constituent with
* par1, and the second must have the constituent with par2.
* \todo At the moment it does *nothing* in the case that also par3 is present.
*
* The method is implemented by calling twice lightestHadron,
* once with (par1,quarktopick->CC()) ,and once with (par2,quarktopick)
* where quarktopick is either the pointer to
* d or u quarks . In fact, the idea is that whatever the flavour of par1
* and par2, no matter if (anti-)quark or (anti-)diquark, the lightest
* pair of hadrons containing flavour par1 and par2 will have either
* flavour d or u, being the lightest quarks.
* The method returns the pair (PDPtr(),PDPtr()) if anything goes wrong.
*
* \todo The method assumes par3 == PDPtr() (otherwise we don't know how to proceed: a
* possible, trivial way would be to randomly select two of the three
* (anti-)quarks and treat them as a (anti-)diquark, reducing the problem
* to two components as treated below.
* In the normal (two components) situation, the strategy is the following:
* treat in the same way the two possibilities: (d dbar) (i=0) and
* (u ubar) (i=1) as the pair quark-antiquark necessary to form a
* pair of hadrons containing the input flavour par1 and par2; finally,
* select the one that produces the lightest pair of hadrons, compatible
* with the charge conservation constraint.
*/
pair<tcPDPtr,tcPDPtr> lightestHadronPair(tcPDPtr ptr1, tcPDPtr ptr2,
tcPDPtr ptr3 = PDPtr ()) const;
/**
* Returns the mass of the lightest pair of hadrons with the given particles
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
* @param ptr3 is the third constituent
*/
Energy massLightestHadronPair(tcPDPtr ptr1, tcPDPtr ptr2,
tcPDPtr ptr3 = PDPtr ()) const {
pair<tcPDPtr,tcPDPtr> pairData = lightestHadronPair(ptr1, ptr2, ptr3);
if ( ! pairData.first || ! pairData.second ) return ZERO;
return ( pairData.first->mass() + pairData.second->mass() );
}
/**
* Returns the lightest hadron formed by the given particles.
*
* Given the id of two (or three) constituents of a cluster, it returns
* the lightest hadron with proper flavour numbers.
* At the moment it does *nothing* in the case that also 'ptr3' present.
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
* @param ptr3 is the third constituent
*/
tcPDPtr lightestHadron(tcPDPtr ptr1, tcPDPtr ptr2,
tcPDPtr ptr3 = PDPtr ()) const;
/**
* Returns the hadrons below the constituent mass threshold formed by the given particles,
* together with their total weight
*
* Given the id of two (or three) constituents of a cluster, it returns
* the lightest hadron with proper flavour numbers.
* At the moment it does *nothing* in the case that also 'ptr3' present.
* @param threshold The theshold
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
* @param ptr3 is the third constituent
*/
vector<pair<tcPDPtr,double> >
hadronsBelowThreshold(Energy threshold,
tcPDPtr ptr1, tcPDPtr ptr2,
tcPDPtr ptr3 = PDPtr ()) const;
/**
* Return the nominal mass of the hadron returned by lightestHadron()
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
* @param ptr3 is the third constituent
*/
Energy massLightestHadron(tcPDPtr ptr1, tcPDPtr ptr2,
#ifndef NDEBUG
tcPDPtr ptr3 = PDPtr ()) const {
#else
tcPDPtr = PDPtr ()) const {
#endif
// The method assumes ptr3 == empty
assert(!(ptr3));
// find entry in the table
pair<long,long> ids(abs(ptr1->id()),abs(ptr2->id()));
HadronTable::const_iterator tit=_table.find(ids);
// throw exception if flavours wrong
if(tit==_table.end()||tit->second.empty())
throw Exception() << "HadronSelector::massLightestHadron "
<< "failed for particle" << ptr1->id() << " "
<< ptr2->id()
<< Exception::eventerror;
// return the mass
return tit->second.begin()->mass;
}
/**
* Returns the mass of the lightest pair of baryons.
* @param ptr1 is the first constituent
* @param ptr2 is the second constituent
*/
Energy massLightestBaryonPair(tcPDPtr ptr1, tcPDPtr ptr2) const;
/**
* Return the weights for the different quarks and diquarks
*/
//@{
/**
* The down quark weight.
*/
double pwtDquark() const {
return _pwtDquark;
}
/**
* The up quark weight.
*/
double pwtUquark() const {
return _pwtUquark;
}
/**
* The strange quark weight.
*/
double pwtSquark() const {
return _pwtSquark;
}
/**
* The charm quark weight.
*/
double pwtCquark() const {
return _pwtCquark;
}
/**
* The bottom quark weight.
*/
double pwtBquark() const {
return _pwtBquark;
}
/**
* The diquark weight.
*/
double pwtDIquark() const {
return _pwtDIquark;
}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*
* The array _repwt is initialized using the interfaces to set different
* weights for different meson multiplets and the constructHadronTable()
* method called to complete the construction of the hadron tables.
*
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Construct the table of hadron data
* This is the main method to initialize the hadron data (mainly the
* weights associated to each hadron, taking into account its spin,
* eventual isoscalar-octect mixing, singlet-decuplet factor). This is
* the method that one should update when new or updated hadron data is
* available.
*
* This class implements the construction of the basic table but can be
* overridden if needed in inheriting classes.
*
* The rationale for factors used for diquarks involving different quarks can
* be can be explained by taking a prototype example that in the exact SU(2) limit,
* in which:
* \f[m_u=m_d\f]
* \f[M_p=M_n=M_\Delta\f]
* and we will have equal numbers of u and d quarks produced.
* Suppose that we weight 1 the diquarks made of the same
* quark and 1/2 those made of different quarks, the fractions
* of u and d baryons (p, n, Delta) we get are the following:
* - \f$\Delta^{++}\f$: 1 possibility only u uu with weight 1
* - \f$\Delta^- \f$: 1 possibility only d dd with weight 1
* - \f$p,\Delta^+ \f$: 2 possibilities u ud with weight 1/2
* d uu with weight 1
* - \f$n,\Delta^0 \f$: 2 possibilities d ud with weight 1/2
* u dd with weight 1
* In the latter two cases, we have to take into account the
* fact that p and n have spin 1/2 whereas Delta+ and Delta0
* have spin 3/2 therefore from phase space we get a double weight
* for Delta+ and Delta0 relative to p and n respectively.
* Therefore the relative amount of these baryons that is
* produced is the following:
* # p = # n = ( 1/2 + 1 ) * 1/3 = 1/2
* # Delta++ = # Delta- = 1 = ( 1/2 + 1) * 2/3 # Delta+ = # Delta0
* which is correct, and therefore the weight 1/2 for the
* diquarks of different types of quarks is justified (at least
* in this limit of exact SU(2) ).
*/
virtual void constructHadronTable();
/**
* Access to the table of hadrons
*/
const HadronTable & table() const {
return _table;
}
/**
* Access to the list of partons
*/
const vector<PDPtr> & partons() const {
return _partons;
}
/**
* Access the parton weights
*/
double pwt(long pid) const {
map<long,double>::const_iterator it = _pwt.find(abs(pid));
assert( it != _pwt.end() );
return it->second;
}
/**
* Methods for the mixing of \f$I=0\f$ mesons
*/
//@{
/**
* Return the probability of mixing for Octet-Singlet isoscalar mixing,
* the probability of the
* \f$\frac1{\sqrt{2}}(|u\bar{u}\rangle + |d\bar{d}\rangle)\f$ component
* is returned.
* @param angleMix The mixing angle in degrees (not radians)
* @param order is 0 for no mixing, 1 for the first resonance of a pair,
* 2 for the second one.
* The mixing is defined so that for example with \f$\eta-\eta'\f$ mixing where
* the mixing angle is \f$\theta=-23^0$ with $\eta\f$ as the first particle
* and \f$\eta'\f$ the second one.
* The convention used is
* \f[\eta = \cos\theta|\eta_{\rm octet }\rangle
* -\sin\theta|\eta_{\rm singlet}\rangle\f]
* \f[\eta' = \sin\theta|\eta_{\rm octet }\rangle
* -\cos\theta|\eta_{\rm singlet}\rangle\f]
* with
* \f[|\eta_{\rm singlet}\rangle = \frac1{\sqrt{3}}
* \left[|u\bar{u}\rangle + |d\bar{d}\rangle + |s\bar{s}\rangle\right]\f]
* \f[|\eta_{\rm octet }\rangle = \frac1{\sqrt{6}}
* \left[|u\bar{u}\rangle + |d\bar{d}\rangle - 2|s\bar{s}\rangle\right]\f]
*/
double probabilityMixing(const double angleMix,
const int order) const {
static double convert=Constants::pi/180.0;
if (order == 1)
return sqr( cos( angleMix*convert + atan( sqrt(2.0) ) ) );
else if (order == 2)
return sqr( sin( angleMix*convert + atan( sqrt(2.0) ) ) );
else
return 1.;
}
/**
* Returns the weight of given mixing state.
* @param id The PDG code of the meson
*/
virtual double mixingStateWeight(long id) const;
//@}
/**
* Calculates a special weight specific to a given hadron.
* @param id The PDG code of the hadron
*/
double specialWeight(long id) const;
/**
* This method returns the proper sign ( > 0 hadron; < 0 anti-hadron )
* for the input PDG id idHad > 0, suppose to be made by the
* two constituent particle pointers: par1 and par2 (both with proper sign).
*/
int signHadron(tcPDPtr ptr1, tcPDPtr ptr2, tcPDPtr hadron) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HadronSelector & operator=(const HadronSelector &);
+ HadronSelector & operator=(const HadronSelector &) = delete;
private:
/**
* The PDG codes of the constituent particles allowed
*/
vector<PDPtr> _partons;
/**
* The PDG codes of the hadrons which cannot be produced in the hadronization
*/
vector<PDPtr> _forbidden;
/**
* The weights for the different quarks and diquarks
*/
//@{
/**
* The probability of producting a down quark.
*/
double _pwtDquark;
/**
* The probability of producting an up quark.
*/
double _pwtUquark;
/**
* The probability of producting a strange quark.
*/
double _pwtSquark;
/**
* The probability of producting a charm quark.
*/
double _pwtCquark;
/**
* The probability of producting a bottom quark.
*/
double _pwtBquark;
/**
* The probability of producting a diquark.
*/
double _pwtDIquark;
/**
* Weights for quarks and diquarks.
*/
map<long,double> _pwt;
//@}
/**
* The mixing angles for the \f$I=0\f$ mesons containing light quarks
*/
//@{
/**
* The \f$\eta-\eta'\f$ mixing angle
*/
double _etamix;
/**
* The \f$\phi-\omega\f$ mixing angle
*/
double _phimix;
/**
* The \f$h_1'-h_1\f$ mixing angle
*/
double _h1mix;
/**
* The \f$f_0(1710)-f_0(1370)\f$ mixing angle
*/
double _f0mix;
/**
* The \f$f_1(1420)-f_1(1285)\f$ mixing angle
*/
double _f1mix;
/**
* The \f$f'_2-f_2\f$ mixing angle
*/
double _f2mix;
/**
* The \f$\eta_2(1870)-\eta_2(1645)\f$ mixing angle
*/
double _eta2mix;
/**
* The \f$\phi(???)-\omega(1650)\f$ mixing angle
*/
double _omhmix;
/**
* The \f$\phi_3-\omega_3\f$ mixing angle
*/
double _ph3mix;
/**
* The \f$\eta(1475)-\eta(1295)\f$ mixing angle
*/
double _eta2Smix;
/**
* The \f$\phi(1680)-\omega(1420)\f$ mixing angle
*/
double _phi2Smix;
//@}
/**
* The weights for the various meson multiplets to be used to supress the
* production of particular states
*/
//@{
/**
* The weights for the \f$\phantom{1}^1S_0\f$ multiplets
*/
vector<double> _weight1S0;
/**
* The weights for the \f$\phantom{1}^3S_1\f$ multiplets
*/
vector<double> _weight3S1;
/**
* The weights for the \f$\phantom{1}^1P_1\f$ multiplets
*/
vector<double> _weight1P1;
/**
* The weights for the \f$\phantom{1}^3P_0\f$ multiplets
*/
vector<double> _weight3P0;
/**
* The weights for the \f$\phantom{1}^3P_1\f$ multiplets
*/
vector<double> _weight3P1;
/**
* The weights for the \f$\phantom{1}^3P_2\f$ multiplets
*/
vector<double> _weight3P2;
/**
* The weights for the \f$\phantom{1}^1D_2\f$ multiplets
*/
vector<double> _weight1D2;
/**
* The weights for the \f$\phantom{1}^3D_1\f$ multiplets
*/
vector<double> _weight3D1;
/**
* The weights for the \f$\phantom{1}^3D_2\f$ multiplets
*/
vector<double> _weight3D2;
/**
* The weights for the \f$\phantom{1}^3D_3\f$ multiplets
*/
vector<double> _weight3D3;
//@}
/**
* The weights for the excited meson multiplets
*/
vector<vector<vector<double> > > _repwt;
/**
* Singlet and Decuplet weights
*/
//@{
/**
* The singlet weight
*/
double _sngWt;
/**
* The decuplet weight
*/
double _decWt;
//@}
/**
* The table of hadron data
*/
HadronTable _table;
/**
* Enums so arrays can be statically allocated
*/
//@{
/**
* Defines values for array sizes. L,J,N max values for excited mesons.
*/
enum MesonMultiplets { Lmax = 3, Jmax = 4, Nmax = 4};
//@}
/**
* Option for the construction of the tables
*/
unsigned int _topt;
/**
* Which particles to produce for debugging purposes
*/
unsigned int _trial;
/**
* @name A parameter used for determining when clusters are too light.
*
* This parameter is used for setting the lower threshold, \f$ t \f$ as
* \f[ t' = t(1 + r B^1_{\rm lim}) \f]
* where \f$ r \f$ is a random number [0,1].
*/
//@{
double _limBottom;
double _limCharm;
double _limExotic;
//@}
/**
* Option for the selection of hadrons below the pair threshold
*/
unsigned int belowThreshold_;
};
}
#endif /* HERWIG_HadronSelector_H */
diff --git a/Hadronization/Hw64Selector.h b/Hadronization/Hw64Selector.h
--- a/Hadronization/Hw64Selector.h
+++ b/Hadronization/Hw64Selector.h
@@ -1,111 +1,111 @@
// -*- C++ -*-
//
// Hw64Selector.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_Hw64Selector_H
#define HERWIG_Hw64Selector_H
//
// This is the declaration of the Hw64Selector class.
//
#include "HadronSelector.h"
#include "Hw64Selector.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup hadronization
* The Hw64Selector class selects the hadrons produced in cluster decay using
* the FORTRAN HERWIG variant of the cluster model.
*
* @see \ref Hw64SelectorInterfaces "The interfaces"
* defined for Hw64Selector.
*/
class Hw64Selector: public HadronSelector {
public:
/**
* The default constructor.
*/
Hw64Selector() : HadronSelector(0)
{}
/**
* Method to return a pair of hadrons given the PDG codes of
* two or three constituents
* @param cluMass The mass of the cluster
* @param par1 The particle pointer of the first constituent
* @param par2 The particle pointer of the second constituent
* @param par3 The particle pointer of the third constituent
*/
virtual pair<tcPDPtr,tcPDPtr> chooseHadronPair(const Energy cluMass,tcPDPtr par1,
tcPDPtr par2,tcPDPtr par3 = PDPtr()) const
;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Hw64Selector & operator=(const Hw64Selector &);
+ Hw64Selector & operator=(const Hw64Selector &) = delete;
};
}
#endif /* HERWIG_Hw64Selector_H */
diff --git a/Hadronization/HwppSelector.h b/Hadronization/HwppSelector.h
--- a/Hadronization/HwppSelector.h
+++ b/Hadronization/HwppSelector.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
//
// HwppSelector.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HwppSelector_H
#define HERWIG_HwppSelector_H
//
// This is the declaration of the HwppSelector class.
//
#include "HadronSelector.h"
#include "HwppSelector.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup hadronization
* The HwppSelector class selects the hadrons produced in cluster decay using
* the Herwig variant of the cluster model.
*
* @see \ref HwppSelectorInterfaces "The interfaces"
* defined for HwppSelector.
*/
class HwppSelector: public HadronSelector {
public:
/**
* The default constructor.
*/
HwppSelector() : HadronSelector(1), _mode(1)
{}
/**
*
* This method is used to choose a pair of hadrons.
*
* Given the mass of a cluster and the particle pointers of its
* two (or three) constituents, this returns the pair of particle pointers of
* the two hadrons with proper flavour numbers.
* Furthermore, the first of the two hadron must have the
* constituent with par1, and the second must have the constituent with par2.
* At the moment it does *nothing* in the case that also par3 is present.
*
* Kupco's method is used, rather than one used in FORTRAN HERWIG
* The idea is to build on the fly a table of all possible pairs
* of hadrons (Had1,Had2) (that we can call "cluster decay channels")
* which are kinematically above threshold and have flavour
* Had1=(par1,quarktopick->CC()), Had2=(quarktopick,par2), where quarktopick
* is the poniter of:
* --- d, u, s, c, b
* if either par1 or par2 is a diquark;
* --- d, u, s, c, b, dd, ud, uu, sd, su, ss,
* cd, cu, cs, cc, bd, bu, bs, bc, bb
* if both par1 and par2 are quarks.
* The weight associated with each channel is given by the product
* of: the phase space available including the spin factor 2*J+1,
* the constant weight factor for chosen idQ,
* the octet-singlet isoscalar mixing factor, and finally
* the singlet-decuplet weight factor.
*/
pair<tcPDPtr,tcPDPtr> chooseHadronPair(const Energy cluMass,tcPDPtr par1,
tcPDPtr par2,tcPDPtr par3 = PDPtr()) const
;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HwppSelector & operator=(const HwppSelector &);
+ HwppSelector & operator=(const HwppSelector &) = delete;
private:
/**
* Which algorithm to use
*/
unsigned int _mode;
};
}
#endif /* HERWIG_HwppSelector_H */
diff --git a/Hadronization/LightClusterDecayer.h b/Hadronization/LightClusterDecayer.h
--- a/Hadronization/LightClusterDecayer.h
+++ b/Hadronization/LightClusterDecayer.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
//
// LightClusterDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LightClusterDecayer_H
#define HERWIG_LightClusterDecayer_H
#include <ThePEG/Interface/Interfaced.h>
#include "CluHadConfig.h"
#include "HadronSelector.h"
#include "LightClusterDecayer.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Hadronization
* \class LightClusterDecayer
* \brief This class performs the decay of light clusters into a single hadron.
* \author Philip Stephens
* \author Alberto Ribon
*
* This is the class that performs the decay of light clusters into
* only one hadron. The major difficulty is that a kinematical reshuffling
* is necessary, between the cluster under consideration and its
* "neighbouring" clusters, to conserve energy-momentum in one-body decay.
* Notice that, differently from what happens in Fortran Herwig,
* light (that is below the threshold for the production of the lightest
* pair of hadrons with the proper flavours) fission products, produced
* by the fission of heavy clusters in ClusterFissioner
* have been already "decayed" into single hadron (the lightest one
* with proper flavour) by the same latter class, without require
* any reshuffling. Therefore the light clusters that are treated in
* this LightClusterDecayer class are produced directly
* (originally) by the ClusterFinder.
*
* Notice:
* - The choice of the candidate cluster with whom to reshuffle momentum
* is based on the minimal space-time distance from the light cluster.
* - An alternate choice of what is considered a "neighbour" could be
* implemented but was not considered for Herwig.
*
* @see HadronSelector
* @see \ref LightClusterDecayerInterfaces "The interfaces"
* defined for LightClusterDecayer.
*/
class LightClusterDecayer: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
LightClusterDecayer() {}
//@}
/**
* This method does the decay of light hadron in one hadron.
*
* This method requires a kinematical reshuffling for energy-momentum
* conservation. This is done explicitly by the (private) method
* reshuffling().
*/
bool decay(ClusterVector & clusters, tPVector & finalhadrons);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- LightClusterDecayer & operator=(const LightClusterDecayer &);
+ LightClusterDecayer & operator=(const LightClusterDecayer &) = delete;
/**
* This (private) method, called by decay(), takes care of the kinematical
* reshuffling necessary for energy-momentum conservation.
*/
bool reshuffling( const tcPDPtr, tClusterPtr, tClusterPtr,
tClusterVector &, tPVector & finalhadrons)
;
/**
* This (private) method, called by decay(), performs reshuffling in the
* special case of a semileptonic partonic b/c decay
* @param hadron The hadron to be produced
* @param cluster The cluster to be reshuffled
* @param finalhadrons The vector of outgoing hadrons
*/
bool partonicReshuffle(const tcPDPtr hadron,const PPtr cluster,
tPVector & finalhadrons);
/**
* A pointer to a Herwig::HadronSelector object used for producing hadrons.
*/
Ptr<HadronSelector>::pointer _hadronSelector;
};
}
#endif /* HERWIG_LightClusterDecayer_H */
diff --git a/Hadronization/PartonSplitter.h b/Hadronization/PartonSplitter.h
--- a/Hadronization/PartonSplitter.h
+++ b/Hadronization/PartonSplitter.h
@@ -1,172 +1,172 @@
// -*- C++ -*-
//
// PartonSplitter.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PartonSplitter_H
#define HERWIG_PartonSplitter_H
#include "CluHadConfig.h"
#include <ThePEG/Interface/Interfaced.h>
#include <ThePEG/Utilities/Selector.h>
#include "PartonSplitter.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Hadronization
* \class PartonSplitter
* \brief This class splits the gluons from the end of the shower.
* \author Philip Stephens
* \author Alberto Ribon
*
* This class does all of the nonperturbative parton splittings needed
* immediately after the end of the showering (both initial and final),
* as very first step of the cluster hadronization.
*
* the quarks are attributed with different weights for the splitting
* by default only the splitting in u and d quarks is allowed
* the option "set /Herwig/Hadronization/PartonSplitter:Split 1"
* allows for additional splitting into s quarks based on some weight
* in order for that to work the mass of the strange quark has to be changed
* from the default value s.t. m_g > 2m_s
*
*
* * @see \ref PartonSplitterInterfaces "The interfaces"
* defined for PartonSplitter.
*/
class PartonSplitter: public Interfaced {
public:
/**
* Default constructor
*/
PartonSplitter() :
_splitPwtUquark(1),
_splitPwtDquark(1),
_splitPwtSquark(0.5),
_gluonDistance(ZERO),
_splitGluon(0)
{}
/**
* This method does the nonperturbative splitting of:
* time-like gluons. At the end of the shower the gluons should be
* on a "physical" mass shell and should therefore be time-like.
* @param tagged The tagged particles to be split
* @return The particles which were not split and the products of splitting.
*/
void split(PVector & tagged);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- PartonSplitter & operator=(const PartonSplitter &);
+ PartonSplitter & operator=(const PartonSplitter &) = delete;
/**
* Non-perturbatively split a time-like gluon,
* if something goes wrong null pointers are returned.
* @param gluon The gluon to be split
* @param quark The quark produced in the splitting
* @param anti The antiquark produced in the splitting
*/
void splitTimeLikeGluon(tcPPtr gluon, PPtr & quark, PPtr & anti);
// probabilities for the different quark types
double _splitPwtUquark;
double _splitPwtDquark;
double _splitPwtSquark;
private:
/**
* The selector to pick the type of quark
*/
Selector<PDPtr,double> _quarkSelector;
/**
* A pointer to a Herwig::HadronSelector object for generating hadrons.
*/
/**
* c tau for gluon decays
*/
Length _gluonDistance;
/**
* Flag used to determine between normal gluon splitting and alternative gluon splitting
*/
int _splitGluon;
};
}
#endif /* HERWIG_PartonSplitter_H */
diff --git a/Looptools/B/ffcb0.F b/Looptools/B/ffcb0.F
--- a/Looptools/B/ffcb0.F
+++ b/Looptools/B/ffcb0.F
@@ -1,836 +1,837 @@
#include "externals.h"
#include "types.h"
* $Id: ffcb0.f,v 1.11 1996/07/18 10:49:04 gj Exp $
*###[ ffcb0:
subroutine ffcb0(cb0,cp,cma,cmb,ier)
***#[*comment:***********************************************************
* *
* calculates the the two-point function (cf 't Hooft and Veltman) *
* we include an overall factor 1/(i*pi^2) relative to FormF *
* *
* Input: cp (complex) k2, in B&D metric *
* cma (complex) mass2, re>0, im<0. *
* cmb (complex) mass2, re>0, im<0. *
* *
* Output: cb0 (complex) B0, the two-point function, *
* ier (integer) number of digits lost in calculation *
* *
* Calls: ffcb0p,ffxb0p *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
integer ier
ComplexType cb0,cp,cma,cmb
*
* local variables
*
integer init,ithres,i,j,nschsa
logical lreal
ComplexType cmamb,cmap,cmbp,cm,c,cb0p,cqi(3),cqiqj(3,3)
RealType absc,xp,xma,xmb,sprec,smax
save init
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
*
* data
*
data init /0/
*
* #] declarations:
* #[ the real cases:
*
if ( Im(cma) .eq. 0 .and. Im(cmb) .eq. 0 .and.
+ Im(cp).eq.0 ) then
lreal = .TRUE.
elseif ( nschem.le.4 ) then
lreal = .TRUE.
if ( init.eq.0 ) then
init = 1
print *,'ffcb0: nschem <= 4, ignoring complex masses: ',
+ nschem
endif
elseif ( nschem.le.6 ) then
if ( init.eq.0 ) then
init = 1
print *,'ffcb0: nschem = 5,6 complex masses near ',
+ 'threshold: ',nschem
endif
cqi(1) = cma
cqi(2) = cmb
cqi(3) = cp
cqiqj(1,2) = cma - cmb
cqiqj(2,1) = -cqiqj(1,2)
cqiqj(1,3) = cma - cp
cqiqj(3,1) = -cqiqj(1,3)
cqiqj(2,3) = cmb - cp
cqiqj(3,2) = -cqiqj(2,3)
cqiqj(1,1) = 0
cqiqj(2,2) = 0
cqiqj(3,3) = 0
call ffthre(ithres,cqi,cqiqj,3,1,2,3)
if ( ithres.eq.0 .or. ithres.eq.1 .and. nschem.eq.5 ) then
lreal = .TRUE.
else
lreal = .FALSE.
endif
else
lreal = .FALSE.
endif
if ( lreal ) then
xp = Re(cp)
xma = Re(cma)
xmb = Re(cmb)
sprec = precx
precx = precc
call ffxb0(cb0,xp,xma,xmb,ier)
precx = sprec
if ( ldot ) then
do 120 j=1,3
do 110 i=1,3
cfpij2(i,j) = fpij2(i,j)
110 continue
120 continue
endif
return
endif
*
* #] the real cases:
* #[ get differences:
*
cmamb = cma - cmb
cmap = cma - cp
cmbp = cmb - cp
*
* #] get differences:
* #[ calculations:
*
* no more schem-checking, please...
*
nschsa = nschem
nschem = 7
call ffcb0p(cb0p,cp,cma,cmb,cmap,cmbp,cmamb,ier)
nschem = nschsa
if ( cma .eq. 0 ) then
if ( cmb .eq. 0 ) then
cm = 1
else
cm = cmb**2
endif
elseif ( cmb .eq. 0 ) then
cm = cma**2
else
cm = cma*cmb
endif
if ( mudim .ne. 0 ) cm = cm/Re(mudim)**2
if ( absc(cm) .gt. xclogm ) then
cb0 = Re(delta) - cb0p - log(cm)/2
smax = max(abs(delta),absc(cb0p),absc(log(cm))/2)
else
call fferr(3,ier)
cb0 = -cb0p + Re(delta)
endif
* #] calculations:
*###] ffcb0:
end
*###[ ffcb0p:
subroutine ffcb0p(cb0p,cp,cma,cmb,cmap,cmbp,cmamb,ier)
***#[*comment:***********************************************************
* *
* calculates the main part of the two-point function (cf 't *
* Hooft and Veltman) for all possible cases: masses equal, *
* unequal, equal to zero, real or complex (with a negative *
* imaginary part). I think it works. *
* Has been checked against FormF for all parameter space. *
* Only problems with underflow for extreme cases. VERY OLD CODE. *
* *
* Input: cp (complex) k2, in B&D metric *
* cma (complex) mass2, re>0, im<0. *
* cmb (complex) mass2, re>0, im<0. *
* cmap/b (complex) cma/b - cp *
* cmamb (complex) cma - cmb *
* *
* Output: cb0p (complex) B0, the two-point function, *
* minus log(cm/mu), delta and the *
* factor -ipi^2. *
* ier (integer) 0=ok, 1=numerical problems, 2=error *
* *
* Calls: (z/a)log, atan. *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
integer ier
ComplexType cb0p,cp,cma,cmb,cmap,cmbp,cmamb
*
* local variables
*
integer i,j,initeq,initn1,n1,n2,nffeta,nffet1,init,
+ ithres,is1
logical lreal
RealType xp,ax,ay,ffbnd,
+ xprceq,bdeq01,bdeq05,bdeq11,bdeq17,bdeq25,
+ xprcn1,bdn101,bdn105,bdn110,bdn115,
+ xprnn2,bdn201,bdn205,bdn210,bdn215,
+ xpneq(30),xpnn1(30),
+ absc,sprec,xma,xmb,dmap,dmbp,dmamb,smax
ComplexType cm,cmp,cm1,cm2,cm1m2,
+ cm1p,cm2p,cs,cs1,cs2,cx,cy,csom,clam,cslam,clogmm,
+ zfflo1,c,zm,zp,zm1,zp1,zfflog,cqi(3),
+ cqiqj(3,3),cpiDpj(3,3),ck,clamr,cslamr,zmr,zpr,zm1r,zp1r
save initeq,initn1,xpneq,xpnn1,init,
+ xprceq,bdeq01,bdeq05,bdeq11,bdeq17,bdeq25,
+ xprcn1,bdn101,bdn105,bdn110,bdn115,
+ xprnn2,bdn201,bdn205,bdn210,bdn215
*FOR ABSOFT ONLY
* ComplexType csqrt
* external csqrt
*
* common blocks
*
#include "ff.h"
*
* data
*
data xprceq /-1./
data xprcn1 /-1./
data xprnn2 /-1./
data initeq /0/
data initn1 /0/
data init /0/
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
*
* #] declarations:
* #[ fill some dotproducts:
*
call ffcot2(cpiDpj,cp,cma,cmb,cmap,cmbp,cmamb,ier)
if ( ldot ) then
do 20 i=1,3
do 10 j=1,3
cfpij2(j,i) = cpiDpj(j,i)
fpij2(j,i) = Re(cpiDpj(j,i))
10 continue
20 continue
endif
*
* #] fill some dotproducts:
* #[ the real cases:
*
if ( Im(cma) .eq. 0 .and. Im(cmb) .eq. 0 .and.
+ Im(cp).eq.0 ) then
lreal = .TRUE.
elseif ( nschem.le.4 ) then
lreal = .TRUE.
if( init.eq.0 ) then
init = 1
print *,'ffcb0p: nschem <= 4, ignoring complex masses:',
+ nschem
endif
elseif ( nschem.le.6 ) then
if( init.eq.0 ) then
init = 1
print *,'ffcb0p: nschem = 4,6 complex masses near ',
+ 'threshold: ',nschem
endif
cqi(1) = cma
cqi(2) = cmb
cqi(3) = cp
cqiqj(1,2) = cmamb
cqiqj(2,1) = -cqiqj(1,2)
cqiqj(1,3) = cmap
cqiqj(3,1) = -cqiqj(1,3)
cqiqj(2,3) = cmbp
cqiqj(3,2) = -cqiqj(2,3)
cqiqj(1,1) = 0
cqiqj(2,2) = 0
cqiqj(3,3) = 0
call ffthre(ithres,cqi,cqiqj,3,1,2,3)
if ( ithres.eq.0 .or. ithres.eq.1 .and. nschem.eq.5 ) then
lreal = .TRUE.
else
lreal = .FALSE.
endif
else
lreal = .FALSE.
endif
if ( lreal ) then
xp = Re(cp)
xma = Re(cma)
xmb = Re(cmb)
dmap = Re(cmap)
dmbp = Re(cmbp)
dmamb = Re(cmamb)
sprec = precx
precx = precc
call ffxb0p(cb0p,xp,xma,xmb,dmap,dmbp,dmamb,ier)
precx = sprec
if ( ldot ) then
do 120 j=1,3
do 110 i=1,3
cfpij2(i,j) = fpij2(i,j)
110 continue
120 continue
endif
return
endif
*
* #] the real cases:
* #[ which case:
*
* sort according to the type of mass combination encountered:
* 200: one equal to zero, 300: both equal, 400: rest.
*
if ( cma .eq. 0 ) then
if ( cmb .eq. 0 ) then
goto 100
endif
cm = cmb
cmp = cmbp
goto 200
endif
if ( cmb .eq. 0 ) then
cm = cma
cmp = cmap
goto 200
endif
if ( cma .eq. cmb ) then
cm = cma
cmp = cmap
goto 300
endif
if ( Re(cma) .lt. Re(cmb) ) then
cm2 = cma
cm1 = cmb
cm1m2 = -cmamb
cm1p = cmbp
cm2p = cmap
is1 = 2
else
cm1 = cma
cm2 = cmb
cm1m2 = cmamb
cm1p = cmap
cm2p = cmbp
is1 = 1
endif
goto 400
* #] which case:
* #[ both masses equal to zero:
100 continue
if ( absc(cp) .gt. xclogm ) then
if ( Re(cp).gt.0 ) then
cb0p = log(cp) - c2ipi/2 - 2
else
cb0p = log(-cp) - 2
endif
else
cb0p = 0
call fferr(7,ier)
endif
return
* #] both masses equal to zero:
* #[ one mass zero:
200 continue
*
* special case cp = 0, checked 25-oct-1991
*
if ( cp .eq. 0 ) then
cb0p = -1
goto 990
endif
*
* Normal case:
*
cs1 = cp/cm
cs2 = cmp/cm
* make sure we get the right Riemann sheet!
if ( absc(cs1) .lt. xloss ) then
cs = zfflo1(cs1,ier)
elseif ( Re(cs2).gt.0 ) then
cs = zfflog(cs2,0,czero,ier)
else
cs = zfflog(-cs2,0,czero,ier)
cs = cs - c2ipi/2
endif
cs = -cs*cmp/cp
cb0p = cs - 2
goto 990
* #] one mass zero:
* #[ both masses equal:
300 continue
*
* Both masses are equal. Not only this speeds up things, some
* cancellations have to be avoided as well. Checked 25-oct-1991.
* -#[ taylor expansion:
*
* first this special case
*
if ( absc(cp) .lt. 8*xloss*absc(cm) ) then
*
* a Taylor expansion seems appropriate as the result will go
* as k^2 but seems to go as 1/k !!
*
* #[ data and bounds:
if ( initeq .eq. 0 ) then
initeq = 1
xpneq(1) = 1/6D0
do 1 i=2,30
xpneq(i) = xpneq(i-1)*Re(i-1)/Re(2*(2*i+1))
1 continue
endif
if (xprceq .ne. precc ) then
*
* calculate the boundaries for the number of terms to be
* included in the taylorexpansion
*
xprceq = precc
sprec = precx
precx = precc
bdeq01 = ffbnd(1,1,xpneq)
bdeq05 = ffbnd(1,5,xpneq)
bdeq11 = ffbnd(1,11,xpneq)
bdeq17 = ffbnd(1,17,xpneq)
bdeq25 = ffbnd(1,25,xpneq)
precx = sprec
endif
* #] data and bounds:
cx = cp/cm
ax = absc(cx)
if ( ax .gt. bdeq17 ) then
csom = cx*(Re(xpneq(18)) + cx*(Re(xpneq(19)) +
+ cx*(Re(xpneq(20)) + cx*(Re(xpneq(21)) +
+ cx*(Re(xpneq(22)) + cx*(Re(xpneq(23)) +
+ cx*(Re(xpneq(24)) + cx*(Re(xpneq(25)) ))))))))
else
csom = 0
endif
if ( ax .gt. bdeq11 ) then
csom = cx*(Re(xpneq(12)) + cx*(Re(xpneq(13)) +
+ cx*(Re(xpneq(14)) + cx*(Re(xpneq(15)) +
+ cx*(Re(xpneq(16)) + cx*(Re(xpneq(17)) + csom ))))
+ ))
endif
if ( ax .gt. bdeq05 ) then
csom = cx*(Re(xpneq(6)) + cx*(Re(xpneq(7)) +
+ cx*(Re(xpneq(8)) + cx*(Re(xpneq(9)) +
+ cx*(Re(xpneq(10)) + cx*(Re(xpneq(11)) + csom ))))))
endif
if ( ax .gt. bdeq01 ) then
csom = cx*(Re(xpneq(2)) + cx*(Re(xpneq(3)) +
+ cx*(Re(xpneq(4)) + cx*(Re(xpneq(5)) + csom ))))
endif
cb0p = -cx*(Re(xpneq(1))+csom)
goto 990
endif
* -#] taylor expansion:
* -#[ normal case:
*
* normal case. first determine if the arguments of the logarithm
* has positive real part: (we assume Re(cm) > Im(cm) )
*
call ffclmb(clam,-cp,-cm,-cm,cmp,cmp,czero)
cslam = sqrt(clam)
call ffcoot(zm,zp,cone,chalf,cm/cp,cslam/(2*cp),ier)
cs1 = zp/zm
if ( absc(cs1-1) .lt. xloss ) then
* In this case a quicker and more accurate way is to
* calculate log(1-cx).
cs2 = cp - cslam
if ( absc(cs2) .lt. xloss*absc(cp) ) then
cs2 = -cslam*(cp+cslam)/(4*cp*cm)
else
cs2 = -2*cslam/cs2
endif
cs = zfflo1(cs2/(2*cm),ier)
else
* finally the normal case
cs = zfflog(cs1,0,czero,ier)
endif
cs = cslam*cs/cp
cb0p = cs - 2
*
* eta terms
*
n1 = nffet1(zp,1/zm,cs1,ier)
if ( Im(cp).eq.0 ) then
n2 = nffet1(-zp,-1/zm,cs1,ier)
else
* use the onshell expression to get the correct continuation
ck = Re(cp)
call ffclmb(clamr,-ck,-cm,-cm,cm-ck,cm-ck,czero)
cslamr = sqrt(clamr)
call ffcoot(zmr,zpr,cone,chalf,cm/ck,cslamr/(2*ck),ier)
if ( absc(zm-zmr)+absc(zp-zpr).gt.absc(zm-zpr)+absc(zp-zmr)
+ ) then
cs1 = zmr
zmr = zpr
zpr = cs1
endif
if ( Im(zmr).eq.0 .or. Im(zpr).eq.0 ) then
if ( Re(zpr).gt.Re(zmr) ) then
n2 = +1
else
n2 = -1
endif
else
n2 = nffeta(-zpr,-1/zmr,ier)
endif
endif
if ( n1+n2 .ne. 0 )
+ cb0p = cb0p - cslam*c2ipi*(n1+n2)/(2*cp)
* also superfluous - just to make sure
goto 990
* -#] normal case:
*
* #] both masses equal:
* #[ unequal nonzero masses:
400 continue
* -#[ get log(xm2/xm1):
cx = cm2/cm1
c = cx-1
if ( 1/absc(cx) .lt. xclogm ) then
call fferr(6,ier)
clogmm = 0
elseif ( absc(c) .lt. xloss ) then
clogmm = zfflo1(cm1m2/cm1,ier)
else
clogmm = log(cx)
endif
* -#] get log(xm2/xm1):
* -#[ cp = 0:
*
* first a special case
*
if ( cp .eq. 0 ) then
cs2 = ((cm2+cm1) / cm1m2)*clogmm
* save the factor 1/2 for the end
cs = - cs2 - 2
if ( absc(cs) .lt. xloss*2 ) then
* Taylor expansions: choose which one
cx = cm1m2/cm1
ax = absc(cx)
if ( ax .lt. .15 .or. precc .gt. 1.E-8 .and. ax
+ .lt. .3 ) then
* #[ taylor 1:
*
* This is the simple Taylor expansion 'n1'
*
*--#[ data and bounds:
* get the coefficients of the taylor expansion
if ( initn1 .eq. 0 ) then
initn1 = 1
do 410 i = 1,30
- 410 xpnn1(i)=Re(i)/Re((i+1)*(i+2))
+ xpnn1(i)=Re(i)/Re((i+1)*(i+2))
+ 410 continue
endif
* determine the boundaries for 1,5,10,15 terms
if ( xprcn1 .ne. precc ) then
xprcn1 = precc
sprec = precx
precx = precc
bdn101 = ffbnd(1,1,xpnn1)
bdn105 = ffbnd(1,5,xpnn1)
bdn110 = ffbnd(1,10,xpnn1)
bdn115 = ffbnd(1,15,xpnn1)
precx = sprec
endif
*--#] data and bounds:
* calculate:
if ( ax .gt. bdn110 ) then
cs = cx*(Re(xpnn1(11)) + cx*(Re(xpnn1(12))
+ + cx*(Re(xpnn1(13)) + cx*(Re(xpnn1(14))
+ + cx*(Re(xpnn1(15))) ))))
else
cs = 0
endif
if ( ax .gt. bdn105 ) then
cs = cx*(Re(xpnn1(6)) + cx*(Re(xpnn1(7)) +
+ cx*(Re(xpnn1(8)) + cx*(Re(xpnn1(9)) +
+ cx*(Re(xpnn1(10)) + cs)))))
endif
if ( ax .gt. bdn101 ) then
cs = cx*(Re(xpnn1(2)) + cx*(Re(xpnn1(3)) +
+ cx*(Re(xpnn1(4)) + cx*(Re(xpnn1(5)) +
+ cs))))
endif
cs = cx*cx*(Re(xpnn1(1)) + cs)
* #] taylor 1:
else
* #[ taylor 2:
*
* This is the more complicated exponential Taylor
* expansion 'n2'
*
* #[ bounds:
* determine the boundaries for 1,5,10,15 terms for this
* Taylor expansion (starting at i=4)
*
if ( xprnn2 .ne. precc ) then
xprnn2 = precc
sprec = precx
precx = precc
bdn201 = ffbnd(4,1,xinfac)
bdn205 = ffbnd(4,5,xinfac)
bdn210 = ffbnd(4,10,xinfac)
bdn215 = ffbnd(4,15,xinfac)
precx = sprec
endif
* #] bounds:
* calculate:
cy = 2*cx/(2-cx)
ay = absc(cy)
if ( ay .gt. bdn210 ) then
cs = cy*(Re(xinfac(14)) + cy*(Re(xinfac(15))
+ + cy*(Re(xinfac(16)) + cy*(Re(xinfac(17))
+ + cy*(Re(xinfac(18)))))))
else
cs = 0
endif
if ( ay .gt. bdn205 ) then
cs = cy*(Re(xinfac(9)) + cy*(Re(xinfac(10))
+ + cy*(Re(xinfac(11)) + cy*(Re(xinfac(12))
+ + cy*(Re(xinfac(13)) + cs)))))
endif
if ( ay .gt. bdn201 ) then
cs = cy*(Re(xinfac(5)) + cy*(Re(xinfac(6))
+ + cy*(Re(xinfac(7)) + cy*(Re(xinfac(8))
+ + cs))))
endif
cs = (1-cx)*cy**4 * (Re(xinfac(4)) + cs)
cs = cx*cy**2*(1+cy)/12 - cs
cs = - 2*zfflo1(cs,ier)/cy
* #] taylor 2:
endif
endif
cb0p = cs/2
goto 990
endif
* -#] cp = 0:
* -#[ normal case:
*
* (programmed anew 28-oct-1991)
*
call ffclmb(clam,cm1,cm2,cp,cm1m2,cm1p,cm2p)
cslam = sqrt(clam)
if ( is1.eq.1 ) then
cs = +cpiDpj(2,3)
else
cs = -cpiDpj(1,3)
endif
call ffcoot(zm,zp,cp,cs,cm2,cslam/2,ier)
zm1 = 1-zm
zp1 = 1-zp
if ( absc(zm1) .lt. xloss .or. absc(zp1) .lt. xloss ) then
if ( is1.eq.1 ) then
cs = -cpiDpj(1,3)
else
cs = +cpiDpj(2,3)
endif
call ffcoot(zp1,zm1,cp,cs,cm1,cslam/2,ier)
if ( abs(Im(zm)) .lt. abs(Im(zm1)) ) then
zm = ToComplex(Re(zm),-Im(zm1))
else
zm1 = ToComplex(Re(zm1),-Im(zm))
endif
if ( abs(Im(zp)) .lt. abs(Im(zp1)) ) then
zp = ToComplex(Re(zp),-Im(zp1))
else
zp1 = ToComplex(Re(zp1),-Im(zp))
endif
endif
if ( Im(cp).ne.0 ) then
* compute roots for Im(cp).eq.0 for continuation terms.
ck = Re(cp)
call ffclmb(clamr,cm1,cm2,ck,cm1m2,cm1-ck,cm2-ck)
cslamr = sqrt(clamr)
if ( absc(cslamr-cslam).gt.absc(cslamr+cslam) )
+ cslamr = -cslamr
cs = (cm2-cm1+ck)/2
call ffcoot(zmr,zpr,ck,cs,cm2,cslamr/2,ier)
zm1r = 1-zmr
zp1r = 1-zpr
if ( absc(zm1r) .lt. xloss .or. absc(zp1r) .lt. xloss ) then
cs = -(cm2-cm1-ck)/2
call ffcoot(zp1r,zm1r,ck,cs,cm1,cslamr/2,ier)
if ( abs(Im(zmr)) .lt. abs(Im(zm1r)) ) then
zmr = ToComplex(Re(zmr),-Im(zm1r))
else
zm1r = ToComplex(Re(zm1r),-Im(zmr))
endif
if ( abs(Im(zpr)) .lt. abs(Im(zp1r)) ) then
zpr = ToComplex(Re(zpr),-Im(zp1r))
else
zp1r = ToComplex(Re(zp1r),-Im(zpr))
endif
endif
else
zmr = zm
zm1r = zm1
zpr = zp
zp1r = zp1
endif
call ffc1lg(cs1,zm,zm1,zmr,zm1r,-1,ier)
call ffc1lg(cs2,zp,zp1,zpr,zp1r,+1,ier)
cb0p = -clogmm/2 + cs1 + cs2
smax = max(absc(clogmm)/2,absc(cs1),absc(cs2))
if ( absc(cb0p) .lt. xloss*smax ) then
call ffwarn(7,ier,absc(cb0p),smax)
endif
goto 990
* -#] normal case:
* #] unequal nonzero masses:
* #[ debug:
990 continue
* #] debug:
*###] ffcb0p:
end
*###[ ffc1lg:
subroutine ffc1lg(cs,z,z1,zr,z1r,is,ier)
***#[*comment:***********************************************************
* *
* Calculate the potentially unstable combination -1-z*log(1-1/z) *
* = sum_{n=1} 1/(n+1) z^{-n}. *
* *
* Input z,z1 complex root, z1=1-z *
* zr,z1r complex root for Im(p^2)=0, z1r=1-zr *
* is integer -1: roots are z-, +1: z+ *
* *
* Output cs complex see above *
* ier integer usual error flag *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
integer is,ier
ComplexType cs,z,z1,zr,z1r
*
* local variables
*
RealType absc
ComplexType c,zfflog
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
*
* #] declarations:
* #[ work:
if ( 1 .lt. xclogm*absc(z) ) then
cs = 0
elseif ( 1 .lt. precc*absc(z) ) then
cs = 1/(2*z)
elseif ( 1 .gt. 2*xloss*absc(z) ) then
*
* normal case
*
cs = -1 - z*zfflog(-z1/z,0,czero,ier)
*
* check analytical continuation for Im(p^2) -> 0
*
if ( z.ne.zr .or. z1.ne.z1r ) then
c = -z1r/zr
if ( Re(c).lt.0 ) then
* check whetehr we chose the correct continuation
if ( (Im(c).gt.0 .or. Im(c).eq.0 .and.
+ is.eq.+1) .and. Im(-z1/z).lt.0 ) then
cs = cs - c2ipi*z
elseif ( (Im(c).lt.0 .or. Im(c).eq.0 .and.
+ is.eq.-1) .and. Im(-z1/z).gt.0 ) then
cs = cs + c2ipi*z
endif
endif
endif
if ( absc(cs) .lt. xloss ) call ffwarn(8,ier,absc(cs),1D0)
else
*
* Taylor expansion
*
call ffcayl(cs,1/z,xninv(2),29,ier)
endif
* #] work:
*###] ffc1lg:
end
*###[ ffcot2:
subroutine ffcot2(cpiDpj,cp,cma,cmb,cmap,cmbp,cmamb,ier)
***#[*comment:***********************************************************
* *
* Store the 3 dotproducts in the common block ffdot. *
* *
* Input: see ffxc0p *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
integer ier
ComplexType cpiDpj(3,3),cp,cma,cmb,cmap,cmbp,cmamb
*
* local variables
*
integer ier1
RealType absc,xmax
ComplexType c
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ work:
ier1 = ier
cpiDpj(1,1) = cma
cpiDpj(2,2) = cmb
cpiDpj(3,3) = cp
if ( absc(cmap) .lt. absc(cmbp) ) then
cpiDpj(1,2) = (cmap + cmb)/2
else
cpiDpj(1,2) = (cmbp + cma)/2
endif
cpiDpj(2,1) = cpiDpj(1,2)
xmax = min(absc(cma),absc(cmb))/2
if ( absc(cmamb) .lt. absc(cmbp) ) then
cpiDpj(1,3) = (-cmamb - cp)/2
else
cpiDpj(1,3) = (cmbp - cma)/2
endif
cpiDpj(3,1) = cpiDpj(1,3)
xmax = min(absc(cma),absc(cp))/2
if ( absc(cmamb) .lt. absc(cmap) ) then
cpiDpj(2,3) = (-cmamb + cp)/2
else
cpiDpj(2,3) = (-cmap + cmb)/2
endif
cpiDpj(3,2) = cpiDpj(2,3)
xmax = min(absc(cmb),absc(cp))/2
ier = ier1
* #] work:
*###] ffcot2:
end
diff --git a/Looptools/B/ffxb0.F b/Looptools/B/ffxb0.F
--- a/Looptools/B/ffxb0.F
+++ b/Looptools/B/ffxb0.F
@@ -1,968 +1,969 @@
#include "externals.h"
#include "types.h"
*###[ ffxb0:
subroutine ffxb0(cb0,xp,xma,xmb,ier)
***#[*comment:***********************************************************
* *
* Calculates the the two-point function (cf 't Hooft and Veltman) *
* we include an overall factor 1/(i*pi^2) relative to FormF *
* *
* Input: xp (real) k2, in B&D metric *
* xma (real) mass2 *
* xmb (real) mass2 *
* *
* Output: cb0 (complex) B0, the two-point function, *
* ier (integer) # of digits lost, if >=100: error *
* *
* Calls: ffxb0p *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
integer ier
ComplexType cb0
RealType xp,xma,xmb
*
* local variables
*
ComplexType cb0p
RealType dmamb,dmap,dmbp,xm
*
* common blocks
*
#include "ff.h"
*
* #] declarations:
* #[ get differences:
dmamb = xma - xmb
dmap = xma - xp
dmbp = xmb - xp
* #] get differences:
* #[ calculations:
call ffxb0p(cb0p,xp,xma,xmb,dmap,dmbp,dmamb,ier)
if ( xma .eq. 0 ) then
if ( xmb .eq. 0 ) then
xm = 1D0
else
xm = xmb**2
endif
elseif ( xmb .eq. 0 ) then
xm = xma**2
else
xm = xma*xmb
endif
if ( mudim .ne. 0 ) xm = xm/mudim**2
if ( abs(xm) .gt. xalogm ) then
cb0 = Re(delta - log(xm)/2D0) - cb0p
else
call fferr(4,ier)
cb0 = Re(delta) - cb0p
endif
* #] calculations:
*###] ffxb0:
end
*###[ ffxb0p:
subroutine ffxb0p(cb0p,xp,xma,xmb,dmap,dmbp,dmamb,ier)
***#[*comment:***********************************************************
* *
* calculates the two-point function (see 't Hooft and *
* Veltman) for all possible cases: masses equal, unequal, *
* equal to zero. *
* *
* Input: xp (real) p.p, in B&D metric *
* xma (real) mass2, *
* xmb (real) mass2, *
* dm[ab]p (real) xm[ab] - xp *
* dmamb (real) xma - xmb *
* *
* Output: cb0p (complex) B0, the two-point function, minus *
* log(xm1*xm2)/2, delta and ipi^2 *
* ier (integer) 0=ok, 1=numerical problems, 2=error *
* *
* Calls: ffxb0q. *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
integer ier
ComplexType cb0p
RealType xp,xma,xmb,dmap,dmbp,dmamb
*
* local variables
*
integer i,initeq,initn1,jsign
RealType ax,ay,ffbnd,
+ xprceq,bdeq01,bdeq05,bdeq11,bdeq17,
+ xprcn1,bdn101,bdn105,bdn110,bdn115,
+ xprnn2,bdn205,bdn210,bdn215,bdn220,
+ xprcn3,bdn301,bdn305,bdn310,bdn315,
+ xprcn5,bdn501,bdn505,bdn510,bdn515,
+ absc
RealType xm,dmp,xm1,xm2,dm1m2,dm1p,
+ dm2p,s,s1,s1a,s1b,s1p,s2,s2a,s2b,s2p,x,y,som,
+ xlam,slam,xlogmm,alpha,alph1,xnoe,xpneq(30),
+ xpnn1(30),xx,xtel,dfflo1
ComplexType cs2a,cs2b,cs2p,c,cx
external ffbnd,dfflo1
save initeq,initn1,xpneq,xpnn1,
+ xprceq,bdeq01,bdeq05,bdeq11,bdeq17,
+ xprcn1,bdn101,bdn105,bdn110,bdn115,
+ xprnn2,bdn205,bdn210,bdn215,bdn220,
+ xprcn3,bdn301,bdn305,bdn310,bdn315,
+ xprcn5,bdn501,bdn505,bdn510,bdn515
*
* common blocks
*
#include "ff.h"
*
* data
*
data xprceq /-1D0/
data xprcn1 /-1D0/
data xprnn2 /-1D0/
data xprcn3 /-1D0/
data xprcn5 /-1D0/
data initeq /0/
data initn1 /0/
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ fill some dotproducts:
if ( ldot ) then
call ffdot2(fpij2,xp,xma,xmb,dmap,dmbp,dmamb,ier)
endif
* #] fill some dotproducts:
* #[ which case:
*
* sort according to the type of masscombination encountered:
* 100: both masses zero, 200: one equal to zero, 300: both equal
* 400: rest.
*
if ( xma .eq. 0 ) then
if ( xmb .eq. 0 ) then
goto 100
endif
xm = xmb
dmp = dmbp
goto 200
endif
if ( xmb .eq. 0 ) then
xm = xma
dmp = dmap
goto 200
elseif ( dmamb .eq. 0 ) then
xm = xma
dmp = dmap
goto 300
elseif ( xma .gt. xmb ) then
xm2 = xma
xm1 = xmb
dm1m2 = -dmamb
dm1p = dmbp
dm2p = dmap
else
xm1 = xma
xm2 = xmb
dm1m2 = dmamb
dm1p = dmap
dm2p = dmbp
endif
goto 400
* #] which case:
* #[ both masses equal to zero:
100 continue
if ( xp .lt. -xalogm ) then
cb0p = log(-xp) - 2
elseif ( xp .gt. xalogm ) then
cb0p = ToComplex( Re(log(xp) - 2), Re(-pi) )
else
cb0p = 0
call fferr(7,ier)
endif
return
* #] both masses equal to zero:
* #[ one mass equal to zero:
200 continue
*
* special case xp = 0
*
if ( xp .eq. 0 ) then
cb0p = -1
goto 990
*
* special case xp = xm
*
elseif ( dmp.eq.0 ) then
cb0p = -2
goto 990
endif
*
* Normal case:
*
s1 = xp/xm
if ( abs(s1) .lt. xloss ) then
s = dfflo1(s1,ier)
else
s = log(abs(dmp/xm))
endif
s = -s*dmp/xp
cb0p = s - 2
if ( xp .gt. xm )
+ cb0p = cb0p - ToComplex(0D0,-(dmp/xp)*pi)
goto 990
* #] one mass equal to zero:
* #[ both masses equal:
300 continue
*
* Both masses are equal. Not only this speeds up things, some
* cancellations have to be avoided as well.
*
* first a special case
*
if ( abs(xp) .lt. 8*xloss*xm ) then
* -#[ taylor expansion:
*
* a Taylor expansion seems appropriate as the result will go
* as k^2 but seems to go as 1/k !!
*
*--#[ data and bounds:
if ( initeq .eq. 0 ) then
initeq = 1
xpneq(1) = 1D0/6D0
do 1 i=2,30
xpneq(i) = - xpneq(i-1)*Re(i-1)/Re(2*(2*i+1))
1 continue
endif
if (xprceq .ne. precx ) then
*
* calculate the boundaries for the number of terms to be
* included in the taylorexpansion
*
xprceq = precx
bdeq01 = ffbnd(1,1,xpneq)
bdeq05 = ffbnd(1,5,xpneq)
bdeq11 = ffbnd(1,11,xpneq)
bdeq17 = ffbnd(1,17,xpneq)
endif
*--#] data and bounds:
x = -xp/xm
ax = abs(x)
if ( ax .gt. bdeq17 ) then
som = x*(xpneq(18) + x*(xpneq(19) + x*(xpneq(20) +
+ x*(xpneq(21) + x*(xpneq(22) + x*(xpneq(23) +
+ x*(xpneq(24) + x*xpneq(25) )))))))
else
som = 0
endif
if ( ax .gt. bdeq11 ) then
som = x*(xpneq(12) + x*(xpneq(13) + x*(xpneq(14) +
+ x*(xpneq(15) + x*(xpneq(16) + x*(xpneq(17) + som ))))
+ ))
endif
if ( ax .gt. bdeq05 ) then
som = x*(xpneq(6) + x*(xpneq(7) + x*(xpneq(8) + x*(
+ xpneq(9) + x*(xpneq(10) + x*(xpneq(11) + som ))))))
endif
if ( ax .gt. bdeq01 ) then
som = x*(xpneq(2) + x*(xpneq(3) + x*(xpneq(4) + x*(
+ xpneq(5) + som ))))
endif
cb0p = x*(xpneq(1)+som)
goto 990
* -#] taylor expansion:
endif
* -#[ normal case:
*
* normal case
*
call ffxlmb(xlam,-xp,-xm,-xm,dmp,dmp,0D0)
if ( xlam .ge. 0 ) then
* cases 1,2 and 4
slam = sqrt(xlam)
s2a = dmp + xm
s2 = s2a + slam
if ( abs(s2) .gt. xloss*slam ) then
* looks fine
jsign = 1
else
s2 = s2a - slam
jsign = -1
endif
ax = abs(s2/(2*xm))
if ( ax .lt. xalogm ) then
s = 0
elseif( ax-1 .lt. .1 .and. s2 .gt. 0 ) then
* In this case a quicker and more accurate way is to
* calculate log(1-x).
s2 = (xp - slam)
* the following line is superfluous.
s = -slam/xp*dfflo1(s2/(2*xm),ier)
else
* finally the normal case
s = -slam/xp*log(ax)
if ( jsign .eq. -1 ) s = -s
endif
if ( xp .gt. 2*xm ) then
* in this case ( xlam>0, so xp>(2*m)^2) ) there also
* is an imaginary part
y = -pi*slam/xp
else
y = 0
endif
else
* the root is complex (k^2 between 0 and (2*m1)^2)
slam = sqrt(-xlam)
s = 2*slam/xp*atan2(xp,slam)
y = 0
endif
xx = s - 2
cb0p = ToComplex(Re(xx),Re(y))
goto 990
* -#] normal case:
*
* #] both masses equal:
* #[ unequal nonzero masses:
* -#[ get log(xm2/xm1):
400 continue
x = xm2/xm1
if ( 1 .lt. xalogm*x ) then
call fferr(8,ier)
xlogmm = 0
elseif ( abs(x-1) .lt. xloss ) then
xlogmm = dfflo1(dm1m2/xm1,ier)
else
xlogmm = log(x)
endif
* -#] get log(xm2/xm1):
* -#[ xp = 0:
*
* first a special case
*
if ( xp .eq. 0 ) then
s2 = ((xm2+xm1) / dm1m2)*xlogmm
s = - s2 - 2
* save the factor 1/2 for the end
if ( abs(s) .lt. xloss*2 ) then
* Taylor expansions: choose which one
x = dm1m2/xm1
ax = abs(x)
if ( ax .lt. .15 .or. precx .gt. 1.E-8 .and. ax
+ .lt. .3 ) then
*
* This is the simple Taylor expansion 'n1'
*
*--#[ data and bounds:
* get the coefficients of the taylor expansion
if ( initn1 .eq. 0 ) then
initn1 = 1
do 410 i = 1,30
- 410 xpnn1(i) = Re(i)/Re((i+1)*(i+2))
+ xpnn1(i) = Re(i)/Re((i+1)*(i+2))
+ 410 continue
endif
* determine the boundaries for 1,5,10,15 terms
if ( xprcn1 .ne. precx ) then
xprcn1 = precx
bdn101 = ffbnd(1,1,xpnn1)
bdn105 = ffbnd(1,5,xpnn1)
bdn110 = ffbnd(1,10,xpnn1)
bdn115 = ffbnd(1,15,xpnn1)
endif
*--#] data and bounds:
* calculate:
if ( ax .gt. bdn115 ) then
s = x*(xpnn1(16) + x*(xpnn1(17) + x*(xpnn1(18) +
+ x*(xpnn1(19) + x*xpnn1(20) ))))
else
s = 0
endif
if ( ax .gt. bdn110 ) then
s = x*(xpnn1(11) + x*(xpnn1(12) + x*(xpnn1(13) +
+ x*(xpnn1(14) + x*xpnn1(15) + s))))
endif
if ( ax .gt. bdn105 ) then
s = x*(xpnn1(6) + x*(xpnn1(7) + x*(xpnn1(8) + x*
+ (xpnn1(9) + x*(xpnn1(10) + s)))))
endif
if ( ax .gt. bdn101 ) then
s = x*(xpnn1(2) + x*(xpnn1(3) + x*(xpnn1(4) + x*
+ (xpnn1(5) +s))))
endif
s = x*x*(xpnn1(1) + s)
else
*
* This is the more complicated Taylor expansion 'fc'
*
* #[ bounds:
* determine the boundaries for 1,5,10,15 terms for
* the exponential taylor expansion, assuming it
* starts at n=2.
*
if ( xprnn2 .ne. precx ) then
xprnn2 = precx
bdn205 = ffbnd(4,5,xinfac)
bdn210 = ffbnd(4,10,xinfac)
bdn215 = ffbnd(4,15,xinfac)
bdn220 = ffbnd(4,20,xinfac)
endif
* #] bounds:
* calculate:
y = 2*x/(2-x)
ay = abs(y)
if ( ay .gt. bdn220 ) then
s = y*(xinfac(19) + y*(xinfac(20) + y*(xinfac(
+ 21) + y*(xinfac(22) + y*xinfac(
+ 23) ))))
else
s = 0
endif
if ( ay .gt. bdn215 ) then
s = y*(xinfac(14) + y*(xinfac(15) + y*(xinfac(
+ 16) + y*(xinfac(17) + y*(xinfac(
+ 18) + s)))))
endif
if ( ay .gt. bdn210 ) then
s = y*(xinfac(9) + y*(xinfac(10) + y*(xinfac(11)
+ + y*(xinfac(12) + y*(xinfac(13) + s)))))
endif
if ( ay .gt. bdn205 ) then
s = y*(xinfac(5) + y*(xinfac(6) + y*(xinfac(7) +
+ y*(xinfac(8) + s))))
endif
s = (1-x)*y**4*(xinfac(4)+s)
s = x*y**2*(1+y)/12 - s
s = - 2*dfflo1(s,ier)/y
endif
endif
cb0p = s/2
goto 990
endif
* -#] xp = 0:
* -#[ normal case:
*
* proceeding with the normal case
*
call ffxlmb(xlam,-xp,-xm2,-xm1,dm2p,dm1p,dm1m2)
if ( xlam .gt. 0 ) then
* cases k^2 < -(m2+m1)^2 or k^2 > -(m2-m1)^2:
*--#[ first try:
* first try the normal way
slam = sqrt(xlam)
s2a = dm2p + xm1
s2 = s2a + slam
if ( abs(s2) .gt. xloss*slam ) then
* looks fine
jsign = 1
else
s2 = s2a - slam
jsign = -1
endif
s2 = s2**2/(4*xm1*xm2)
if ( abs(s2) .lt. xalogm ) then
call fferr(9,ier)
s2 = 0
elseif ( abs(s2-1) .lt. xloss ) then
if ( jsign.eq.1 ) then
s2 = -slam*(s2a+slam)/(2*xm1*xm2)
s2 = -slam/(2*xp)*dfflo1(s2,ier)
else
s2 = +slam*(s2a-slam)/(2*xm1*xm2)
s2 = +slam/(2*xp)*dfflo1(s2,ier)
endif
else
s2 = -slam/(2*xp)*log(s2)
if ( jsign .eq. -1 ) s2 = -s2
endif
s1 = -dm1m2*xlogmm/(2*xp)
xx = s1+s2-2
*--#] first try:
if ( abs(xx) .lt. xloss*max(abs(s1),abs(s2)) ) then
*--#[ second try:
* this is unacceptable, try a better solution
s1a = dm1m2 + slam
if ( abs(s1a) .gt. xloss*slam ) then
* (strangely) this works
s1 = -s1a/(2*xp)
else
* by division a more accurate form can be found
s1 = ( -xp/2 + xm1 + xm2 ) / ( slam - dm1m2 )
endif
s1 = s1*xlogmm
if ( abs(xp) .lt. xm2 ) then
s2a = xp - dm1m2
else
s2a = xm2 - dm1p
endif
s2 = s2a - slam
if ( abs(s2) .gt. xloss*slam ) then
* at least reasonable
s2 = s2 / (2*xm2)
else
* division again
s2 = (2*xp) / (s2a+slam)
endif
if ( abs(s2) .lt. .1 ) then
* choose a quick way to get the logarithm
s2 = dfflo1(s2,ier)
else
s2a = abs(1-s2)
s2 = log(s2a)
endif
s2 = -(slam/xp)*s2
xx = s1 + s2 - 2
*--#] second try:
if ( abs(xx) .lt. xloss**2*max(abs(s1),abs(s2)) ) then
*--#[ third try:
* (we accept two times xloss because that's the same
* as in this try)
* A Taylor expansion might work. We expand
* inside the logs. Only do the necessary work.
*
alpha = slam/(slam-dm1m2)
alph1 = -dm1m2/(slam-dm1m2)
*
* First s1:
*
s1p = s1 - 2*alph1
if ( abs(s1p) .lt. xloss*abs(s1) ) then
* -#[ bounds:
* determine the boundaries for 1,5,10,15 terms
if ( xprcn3 .ne. precx ) then
xprcn3 = precx
bdn301 = ffbnd(3,1,xinfac)
bdn305 = ffbnd(3,5,xinfac)
bdn310 = ffbnd(3,10,xinfac)
bdn315 = ffbnd(3,15,xinfac)
endif
* -#] bounds:
xnoe = -xp + 2*xm1 + 2*xm2
x = 4*dm1m2/xnoe
ax = abs(x)
if ( ax .gt. bdn310 ) then
s1a = x*(xinfac(13) + x*(xinfac(14) + x*(
+ xinfac(15) + x*(xinfac(16) + x*
+ xinfac(17) ))))
else
s1a = 0
endif
if ( ax .gt. bdn305 ) then
s1a = x*(xinfac(8) + x*(xinfac(9) + x*(
+ xinfac(10) + x*(xinfac(11) + x*(
+ xinfac(12) + s1a)))))
endif
if ( ax .gt. bdn301 ) then
s1a = x*(xinfac(4) + x*(xinfac(5) + x*(
+ xinfac(6) + x*(xinfac(7) + s1a))))
endif
s1a = x**3 *(xinfac(3) + s1a) *xm2/xm1
s1b = dm1m2*(4*dm1m2**2 - xp*(4*xm1-xp))/
+ (xm1*xnoe**2)
s1p = s1b - s1a
s1p = xnoe*dfflo1(s1p,ier)/(slam - dm1m2)/2
endif
*
* next s2:
*
s2p = s2 - 2*alpha
if ( abs(s2p) .lt. xloss*abs(s2) ) then
* -#[ bounds:
* determine the boundaries for 1,5,10,15 terms
if ( xprcn5 .ne. precx ) then
xprcn5 = precx
bdn501 = ffbnd(4,1,xinfac)
bdn505 = ffbnd(4,5,xinfac)
bdn510 = ffbnd(4,10,xinfac)
bdn515 = ffbnd(4,15,xinfac)
endif
* -#] bounds:
xnoe = slam - dm1m2
x = 2*xp/xnoe
ax = abs(x)
* do not do the Taylor expansion
if ( ax .gt. bdn515 ) goto 495
if ( ax .gt. bdn510 ) then
s2a = x*(xinfac(14) + x*(xinfac(15) + x*(
+ xinfac(16) + x*(xinfac(17) + x*
+ xinfac(18) ))))
else
s2a = 0
endif
if ( ax .gt. bdn505 ) then
s2a = x*(xinfac(9) + x*(xinfac(10) + x*(
+ xinfac(11) + x*(xinfac(12) + x*(
+ xinfac(13) + s2a)))))
endif
if ( ax .gt. bdn501 ) then
s2a = x*(xinfac(5) + x*(xinfac(6) + x*(
+ xinfac(7) + x*(xinfac(8) + s2a))))
endif
s2a = x**4*(xinfac(4)+s2a)*(1-2*xp/(xnoe+xp))
s2b = -2*xp**3 *(-2*xp - xnoe)/(3*(xnoe+xp)*
+ xnoe**3)
s2p = s2b - s2a
s2p = -slam/xp*dfflo1(s2p,ier)
endif
*
* finally ...
*
495 xx = s1p + s2p
*--#] third try:
endif
endif
if ( xp .gt. xm1+xm2 ) then
*--#[ imaginary part:
* in this case ( xlam>0, so xp>(m1+m2)^2) ) there also
* is an imaginary part
y = -pi*slam/xp
else
y = 0
*--#] imaginary part:
endif
else
* the root is complex (k^2 between -(m1+m2)^2 and -(m2-m1)^2)
*--#[ first try:
slam = sqrt(-xlam)
xnoe = dm2p + xm1
s1 = -(dm1m2/(2*xp))*xlogmm
s2 = (slam/xp)*atan2(slam,xnoe)
xx = s1 + s2 - 2
*--#] first try:
* 13 Apr 11: added x .ne. 0 check to safeguard against div by zero
x = 2*xp*xnoe
if ( x .ne. 0 .and.
& abs(xx) .lt. xloss**2*max(abs(s1),abs(s2)) ) then
*--#[ second try:
* Again two times xloss as we'll accept that in the next
* step as well.
*
xtel = dm1m2**2 - xp**2
alpha = -xlam/x
alph1 = xtel/x
*
* try a taylor expansion on the terms. First s1:
*
s1p = s1 - 2*alph1
if ( abs(s1p) .lt. xloss*abs(s1) ) then
* -#[ bounds:
* determine the boundaries for 1,5,10,15 terms
if ( xprcn3 .ne. precx ) then
xprcn3 = precx
bdn301 = ffbnd(3,1,xinfac)
bdn305 = ffbnd(3,5,xinfac)
bdn310 = ffbnd(3,10,xinfac)
bdn315 = ffbnd(3,15,xinfac)
endif
* -#] bounds:
x = 2*xtel/(dm1m2*xnoe)
ax = abs(x)
* do not do the Taylor expansion
if ( ax .gt. bdn315 ) goto 590
if ( ax .gt. bdn310 ) then
s1a = x*(xinfac(13) + x*(xinfac(14) + x*(
+ xinfac(15) + x*(xinfac(16) + x*
+ xinfac(17) ))))
else
s1a = 0
endif
if ( ax .gt. bdn305 ) then
s1a = x*(xinfac(8) + x*(xinfac(9) + x*(
+ xinfac(10) + x*(xinfac(11) + x*(
+ xinfac(12) + s1a)))))
endif
if ( ax .gt. bdn301 ) then
s1a = x*(xinfac(4) + x*(xinfac(5) + x*(
+ xinfac(6) + x*(xinfac(7) + s1a))))
endif
s1a = x**3 *(xinfac(3) + s1a) *xm2/xm1
s1b = (dm1m2**3*(dm1m2**2-2*xp*xm1) + xp**2*(4*
+ dm1m2*xm1**2-dm1m2**2*(dm1m2+2*xm1))-2*xm2*
+ xp**3*(dm1m2+xp))/(xm1*dm1m2**2*xnoe**2)
s1p = s1b - s1a
s1p = -dm1m2*dfflo1(s1p,ier)/(2*xp)
endif
*
* next s2:
*
590 continue
s2p = s2 - 2*alpha
if ( abs(s2p) .lt. xloss*abs(s2) ) then
* -#[ bounds:
* determine the boundaries for 1,5,10,15 terms
if ( xprcn3 .ne. precx ) then
xprcn3 = precx
bdn301 = ffbnd(3,1,xinfac)
bdn305 = ffbnd(3,5,xinfac)
bdn310 = ffbnd(3,10,xinfac)
bdn315 = ffbnd(3,15,xinfac)
endif
* -#] bounds:
cx = ToComplex(0D0,-slam/xnoe)
ax = absc(cx)
if ( ax .gt. bdn315 ) goto 600
if ( ax .gt. bdn310 ) then
cs2a = cx*(Re(xinfac(13)) + cx*(Re(xinfac(14
+ )) + cx*(Re(xinfac(15)) + cx*(Re(xinfac(16
+ )) + cx*(Re(xinfac(17)))))))
else
cs2a = 0
endif
if ( ax .gt. bdn305 ) then
cs2a = cx*(Re(xinfac(8)) + cx*(Re(xinfac(9))
+ + cx*(Re(xinfac(10)) + cx*(Re(xinfac(11))
+ + cx*(Re(xinfac(12)) + cs2a)))))
endif
if ( ax .gt. bdn301 ) then
cs2a = cx*(Re(xinfac(4)) + cx*(Re(xinfac(5))
+ + cx*(Re(xinfac(6)) + cx*(Re(xinfac(7))
+ + cs2a))))
endif
cs2a = cx**3*(Re(xinfac(3))+cs2a)*
+ ToComplex(Re(xnoe),Re(slam))
cs2b = ToComplex(Re(xnoe-xlam/xnoe/2),
+ -Re(slam**3/xnoe**2/2))
cs2p = cs2b + cs2a
s2p = slam*atan2(Im(cs2p),Re(cs2p))/xp
endif
600 continue
xx = s1p + s2p
*--#] second try:
endif
y = 0
endif
cb0p = ToComplex(Re(xx),Re(y))
goto 990
* -#] normal case:
* #] unequal nonzero masses:
* #[ debug:
990 continue
* #] debug:
*###] ffxb0p:
end
*###[ ffxlmb:
subroutine ffxlmb(xlambd,a1,a2,a3,a12,a13,a23)
***#[*comment:***********************************************************
* calculate in a numerically stable way *
* lambda(a1,a2,a3) = *
* a1**2 + a2**2 + a3**2 - 2*a2*a3 - 2*a3*a1 - 2*a1*a2 *
* aij = ai - aj are required for greater accuracy at times *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
RealType xlambd,a1,a2,a3,a12,a13,a23
*
* local variables
*
RealType aa1,aa2,aa3,a,aff,asq
*
* common blocks
*
#include "ff.h"
* #] declarations:
* #[ calculations:
aa1 = abs(a1)
aa2 = abs(a2)
aa3 = abs(a3)
*
* first see if there are input parameters with opposite sign:
*
if ( a1 .lt. 0 .and. a2 .gt. 0 .or.
+ a1 .gt. 0 .and. a2 .lt. 0 ) then
goto 12
elseif ( a1 .lt. 0 .and. a3 .gt. 0 .or.
+ a1 .gt. 0 .and. a3 .lt. 0 ) then
goto 13
*
* all have the same sign, choose the smallest 4*ai*aj term
*
elseif ( aa1 .gt. aa2 .and. aa1 .gt. aa3 ) then
goto 23
elseif ( aa2 .gt. aa3 ) then
goto 13
else
goto 12
endif
12 continue
if ( aa1 .gt. aa2 ) then
a = a13 + a2
else
a = a1 + a23
endif
aff = 4*a1*a2
goto 100
13 continue
if ( aa1 .gt. aa3 ) then
a = a12 + a3
else
a = a1 - a23
endif
aff = 4*a1*a3
goto 100
23 continue
if ( aa2 .gt. aa3 ) then
a = a12 - a3
else
a = a13 - a2
endif
aff = 4*a2*a3
100 continue
asq = a**2
xlambd = asq - aff
* #] calculations:
*###] ffxlmb:
end
*###[ ffclmb:
subroutine ffclmb(clambd,cc1,cc2,cc3,cc12,cc13,cc23)
***#[*comment:***********************************************************
* calculate in cc numerically stable way *
* lambda(cc1,cc2,cc3) = *
* cc1**2 + cc2**2 + cc3**2 - 2*cc2*cc3 - 2*cc3*cc1 - 2*cc1*cc2 *
* cij = ci - cj are required for greater accuracy at times *
* ier is the usual error flag. *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
ComplexType clambd,cc1,cc2,cc3,cc12,cc13,cc23
*
* local variables
*
RealType aa1,aa2,aa3,absc
ComplexType cc,cff,csq,c
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ calculations (rather old style ...):
aa1 = absc(cc1)
aa2 = absc(cc2)
aa3 = absc(cc3)
*
* first see if there are input parameters with opposite sign:
*
if ( Re(cc1) .lt. 0 .and. Re(cc2) .gt. 0 .or.
+ Re(cc1) .gt. 0 .and. Re(cc2) .lt. 0 ) then
goto 12
elseif ( Re(cc1) .lt. 0 .and. Re(cc3) .gt. 0 .or.
+ Re(cc1) .gt. 0 .and. Re(cc3) .lt. 0 ) then
goto 13
*
* all have the same sign, choose the smallest 4*ci*cj term
*
elseif ( aa1 .gt. aa2 .and. aa1 .gt. aa3 ) then
goto 23
elseif ( aa2 .gt. aa3 ) then
goto 13
else
goto 12
endif
12 continue
if ( aa1 .gt. aa2 ) then
cc = cc13 + cc2
else
cc = cc1 + cc23
endif
cff = 4*cc1*cc2
goto 100
13 continue
if ( aa1 .gt. aa3 ) then
cc = cc12 + cc3
else
cc = cc1 - cc23
endif
cff = 4*cc1*cc3
goto 100
23 continue
if ( aa2 .gt. aa3 ) then
cc = cc12 - cc3
else
cc = cc13 - cc2
endif
cff = 4*cc2*cc3
100 continue
csq = cc**2
clambd = csq - cff
* #] calculations (rather old style ...):
*###] ffclmb:
end
*###[ ffdot2:
subroutine ffdot2(piDpj,xp,xma,xmb,dmap,dmbp,dmamb,ier)
***#[*comment:***********************************************************
* *
* Store the 3 dotproducts in the common block ffdot. *
* *
* Input: see ffxb0p *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
integer ier
RealType piDpj(3,3),xp,xma,xmb,dmap,dmbp,dmamb
*
* local variables
*
integer ier1
*
* common blocks
*
#include "ff.h"
*
* statement function
*
* absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ work:
ier1 = ier
piDpj(1,1) = xma
piDpj(2,2) = xmb
piDpj(3,3) = xp
if ( abs(dmap) .lt. abs(dmbp) ) then
piDpj(1,2) = (dmap + xmb)/2
else
piDpj(1,2) = (dmbp + xma)/2
endif
piDpj(2,1) = piDpj(1,2)
if ( abs(dmamb) .lt. abs(dmbp) ) then
piDpj(1,3) = (-dmamb - xp)/2
else
piDpj(1,3) = (dmbp - xma)/2
endif
piDpj(3,1) = piDpj(1,3)
if ( abs(dmamb) .lt. abs(dmap) ) then
piDpj(2,3) = (-dmamb + xp)/2
else
piDpj(2,3) = (-dmap + xmb)/2
endif
piDpj(3,2) = piDpj(2,3)
ier = ier1
* #] work:
*###] ffdot2:
end
diff --git a/Looptools/util/ffcxs3.F b/Looptools/util/ffcxs3.F
--- a/Looptools/util/ffcxs3.F
+++ b/Looptools/util/ffcxs3.F
@@ -1,654 +1,656 @@
#include "externals.h"
#include "types.h"
*###[ ffcxs3:
subroutine ffcxs3(cs3,ipi12,y,z,dyz,d2yzz,dy2z,xpi,piDpj,ii,ns,
+ isoort,ier)
***#[*comment:***********************************************************
* *
* calculates the s3 as defined in appendix b. *
* (ip = ii+3, is1 = ii, is2 = ii+1) *
* *
* log( xk*y^2 + (-xk+xm1-xm2)*y + xm2 - i*eps ) *
* /1 - log( ... ) |y=yi *
* s3 = \ dy -------------------------------------------------- *
* /0 y - yi *
* *
* = r(yi,y-,+) + r(yi,y+,-) *
* *
* with y+- the roots of the argument of the logarithm. *
* the sign of the argument to the logarithms in r is passed *
* in ieps *
* *
* input: y(4),z(4) (real) roots in form (z-,z+,1-z-,1-z+) *
* dyz(2,2),d2yzz, (real) y() - z(), y+ - z- - z+ *
* dy2z(4) (real) y() - 2z() *
* xpi (real(ns)) p(i).p(i) (B&D metric) i=1,3 *
* m(i)^2 = si.si i=4,6 *
* ii (integer) xk = xpi(ii+3) etc *
* ns (integer) size of arrays *
* isoort (integer) returns kind of action taken *
* cs3 (complex)(20) assumed zero. *
* ccy (complex)(3) if i0 != 0: complex y *
* *
* output: cs3 (complex) mod factors pi^2/12, in array *
* ipi12 (integer) these factors *
* ier (integer) 0=ok 1=inaccurate 2=error *
* *
* calls: ffcrr,ffcxr,real/dble,ToComplex,log,ffadd1,ffadd2,ffadd3 *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ipi12(2),ii,ns,isoort(2),ier
ComplexType cs3(20)
RealType y(4),z(4),dyz(2,2),d2yzz,dy2z(4),
+ xpi(ns),piDpj(ns,ns)
*
* local variables:
*
integer i,ip,ieps(2)
RealType yy,yy1,zz,zz1,dyyzz,xdilog,xlog,x00(3)
logical ld2yzz
*
* common blocks
*
#include "ff.h"
*
* #] declarations:
* #[ get counters:
ip = ii+3
if ( isoort(2) .ne. 0 ) then
if ( (z(2).gt.z(1) .or. z(1).eq.z(2) .and. z(4).lt.z(3) )
+ .eqv. xpi(ip) .gt. 0 ) then
ieps(1) = +1
ieps(2) = -1
else
ieps(1) = -1
ieps(2) = +1
endif
else
if ( piDpj(ip,ii) .gt. 0 ) then
ieps(1) = +1
else
ieps(1) = -1
endif
endif
* #] get counters:
* #[ special case |z| >> |y|:
if ( xpi(ip).lt.0 .and. max(abs(y(2)),abs(y(4))) .lt.
+ xloss*min(abs(z(1)), abs(z(2)))/2 ) then
*
* we will obtain cancellations of the type Li_2(x) + Li_2(-x)
* with x small.
*
yy = dyz(2,1)/d2yzz
yy1 = dyz(2,2)/d2yzz
if ( y(2) .eq. 0 ) goto 10
zz = z(2)*yy/y(2)
zz1 = 1-zz
dyyzz = dyz(2,2)*yy/y(2)
call ffcxr(cs3(1),ipi12(1),yy,yy1,zz,zz1,dyyzz,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,0,ier)
10 continue
if ( y(4) .eq. 0 ) goto 30
zz = yy*z(4)/y(4)
zz1 = 1-zz
dyyzz = -yy*dyz(2,2)/y(4)
call ffcxr(cs3(8),ipi12(2),yy,yy1,zz,zz1,dyyzz,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,0,ier)
do 20 i=8,14
- 20 cs3(i) = -cs3(i)
+ cs3(i) = -cs3(i)
+ 20 continue
30 continue
* And now the remaining Li_2(x^2) terms
call ffxli2(xdilog,xlog,(y(2)/dyz(2,1))**2,ier)
cs3(15) = +xdilog/2
call ffxli2(xdilog,xlog,(y(4)/dyz(2,1))**2,ier)
cs3(16) = -xdilog/2
goto 900
endif
* #] special case |z| >> |y|:
* #[ normal:
if ( xpi(ip) .eq. 0 ) then
ld2yzz = .FALSE.
else
ld2yzz = .TRUE.
endif
if ( isoort(1) .ne. 0 ) call ffcxr(cs3(1),ipi12(1),y(2),y(4),
+ z(1),z(3),dyz(2,1),ld2yzz,d2yzz,z(2),z(4),.TRUE.,dy2z(1),
+ ieps(1),ier)
if ( isoort(2) .ne. 0 ) then
if ( mod(isoort(2),10) .eq. 2 ) then
* both roots are equal: multiply by 2
do 60 i=1,7
cs3(i) = 2*Re(cs3(i))
60 continue
ipi12(1) = 2*ipi12(1)
else
call ffcxr(cs3(8),ipi12(2),y(2),y(4),z(2),z(4),dyz(2,2),
+ ld2yzz,d2yzz,z(1),z(3),.TRUE.,dy2z(2),ieps(2),ier)
endif
endif
*
* #] normal:
900 continue
*###] ffcxs3:
end
*###[ ffcs3:
subroutine ffcs3(cs3,ipi12,cy,cz,cdyz,cd2yzz,cpi,cpiDpj,ii,ns,
+ isoort,ier)
***#[*comment:***********************************************************
* *
* calculates the s3 as defined in appendix b. *
* *
* log( cpi(ii+3)*y^2 + (cpi(ii+3)+cpi(ii)-cpi(ii+1))*y *
* /1 + cpi(ii+1)) - log( ... ) |y=cyi *
* s3 = \ dy ---------------------------------------------------- *
* /0 y - cyi *
* *
* = r(cyi,cy+) + r(cyi,cy-) + ( eta(-cy-,-cy+) - *
* eta(1-cy-,1-cy+) - eta(...) )*log(1-1/cyi) *
* *
* with y+- the roots of the argument of the logarithm. *
* *
* input: cy(4) (complex) cy(1)=y^-,cy(2)=y^+,cy(i+2)=1-cy(1) *
* cz(4) (complex) cz(1)=z^-,cz(2)=z^+,cz(i+2)=1-cz(1) *
* cpi(6) (complex) masses & momenta (B&D) *
* ii (integer) position of cp,cma,cmb in cpi *
* ns (integer) size of arrays *
* isoort(2)(integer) returns the kind of action taken *
* cs3 (complex)(14) assumed zero. *
* *
* output: cs3 (complex) mod factors ipi12 *
* ipi12(2) (integer) these factors *
* ier (integer) 0=ok, 1=numerical problems, 2=error *
* *
* calls: ffcrr,Im,Re,zfflog *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ipi12(2),ii,ns,isoort(2),ier
ComplexType cs3(20),cpi(ns),cpiDpj(ns,ns)
ComplexType cy(4),cz(4),cdyz(2,2),cd2yzz
*
* local variables:
*
integer i,ip,ieps(2),ieps0,ni(4),ntot
logical ld2yzz
ComplexType c,zdilog,zlog,cyy,cyy1,czz,czz1,cdyyzz
RealType absc,y,y1,z,z1,dyz,d2yzz,zz,zz1,
+ x00(3),sprec
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ get ieps:
ip = ii+3
call ffieps(ieps,cz(1),cpi(ip),cpiDpj(ip,ii),isoort)
* #] get ieps:
* #[ special case |cz| >> |cy|:
if ( isoort(2) .ne. 0 .and. max(absc(cy(2)),absc(cy(4))) .lt.
+ xloss*min(absc(cz(1)),absc(cz(2)))/2 ) then
*
* we will obtain cancellations of the type Li_2(x) + Li_2(-x)
* with x small.
*
cyy = cdyz(2,1)/cd2yzz
cyy1 = cdyz(2,2)/cd2yzz
if ( absc(cy(2)) .lt. xclogm ) then
if ( Im(cy(2)) .eq. 0 .and. abs(Re(cy(2))) .gt.
+ xalogm ) then
czz = cz(2)*cyy*ToComplex(1/Re(cy(2)))
cdyyzz = cyy*cdyz(2,2)*ToComplex(1/Re(cy(2)))
elseif ( cy(2) .eq. 0 .and. cz(2) .ne. 0 .and. cyy
+ .ne. 0 ) then
* the answer IS zero
goto 30
endif
else
czz = cz(2)*cyy/cy(2)
cdyyzz = cyy*cdyz(2,2)/cy(2)
endif
czz1 = 1-czz
if ( isoort(1) .eq. -10 ) then
* no eta terms.
ieps0 = 99
else
* do not know the im part
ieps0 = 0
endif
call ffcrr(cs3(1),ipi12(1),cyy,cyy1,czz,czz1,cdyyzz,.FALSE.,
+ czero,czero,czero,-1,ieps0,ier)
30 continue
if ( absc(cy(4)) .lt. xclogm ) then
if ( Im(cy(4)) .eq. 0 .and. abs(Re(cy(4))) .gt.
+ xalogm ) then
czz = cz(4)*cyy*ToComplex(1/Re(cy(4)))
cdyyzz = -cyy*cdyz(2,2)*ToComplex(1/Re(cy(4)))
elseif ( cy(4) .eq. 0 .and. cz(4) .ne. 0 .and. cyy
+ .ne. 0 ) then
* the answer IS zero
goto 50
endif
else
czz = cz(4)*cyy/cy(4)
cdyyzz = -cyy*cdyz(2,2)/cy(4)
endif
czz1 = 1-czz
call ffcrr(cs3(8),ipi12(2),cyy,cyy1,czz,czz1,cdyyzz,.FALSE.,
+ czero,czero,czero,-1,ieps0,ier)
do 40 i=8,14
cs3(i) = -cs3(i)
40 continue
50 continue
*
* And now the remaining Li_2(x^2) terms
* stupid Gould NP1
*
c = cy(2)*cy(2)/(cdyz(2,1)*cdyz(2,1))
call ffzli2(zdilog,zlog,c,ier)
cs3(15) = +zdilog/2
* stupid Gould NP1
c = cy(4)*cy(4)/(cdyz(2,1)*cdyz(2,1))
call ffzli2(zdilog,zlog,c,ier)
cs3(16) = -zdilog/2
goto 900
endif
* #] special case |cz| >> |cy|:
* #[ normal:
if ( isoort(2) .eq. 0 ) then
ld2yzz = .FALSE.
else
ld2yzz = .TRUE.
endif
if ( isoort(1) .eq. 0 ) then
* do nothing
elseif ( mod(isoort(1),10).eq.0 .or. mod(isoort(1),10).eq.-1
+ .or. mod(isoort(1),10).eq.-3 ) then
call ffcrr(cs3(1),ipi12(1),cy(2),cy(4),cz(1),cz(3),
+ cdyz(2,1),ld2yzz,cd2yzz,cz(2),cz(4),isoort(1),
+ ieps(1),ier)
elseif ( mod(isoort(1),10) .eq. -5 .or. mod(isoort(1),10) .eq.
+ -6 ) then
y = Re(cy(2))
y1 = Re(cy(4))
z = Re(cz(1))
z1 = Re(cz(3))
dyz = Re(cdyz(2,1))
d2yzz = Re(cd2yzz)
zz = Re(cz(2))
zz1 = Re(cz(4))
sprec = precx
precx = precc
call ffcxr(cs3(1),ipi12(1),y,y1,z,z1,dyz,ld2yzz,d2yzz,zz,zz1
+ ,.FALSE.,x00,ieps(1),ier)
precx = sprec
else
call fferr(12,ier)
endif
if ( isoort(2) .eq. 0 ) then
* do nothing
elseif ( mod(isoort(2),5) .eq. 0 ) then
- do 100 i=1,7
- 100 cs3(i) = 2*Re(cs3(i))
+ do 100 i=1,7
+ cs3(i) = 2*Re(cs3(i))
+ 100 continue
ipi12(1) = 2*ipi12(1)
elseif ( mod(isoort(2),10).eq.-1 .or. mod(isoort(1),10).eq.-3 )
+ then
call ffcrr(cs3(8),ipi12(2),cy(2),cy(4),cz(2),cz(4),
+ cdyz(2,2),ld2yzz,cd2yzz,cz(1),cz(3),isoort(2),
+ ieps(2),ier)
elseif ( mod(isoort(2),10) .eq. -6 ) then
y = Re(cy(2))
y1 = Re(cy(4))
z = Re(cz(2))
z1 = Re(cz(4))
dyz = Re(cdyz(2,2))
d2yzz = Re(cd2yzz)
zz = Re(cz(1))
zz1 = Re(cz(3))
sprec = precx
precx = precc
call ffcxr(cs3(8),ipi12(2),y,y1,z,z1,dyz,ld2yzz,d2yzz,zz,zz1
+ ,.FALSE.,x00,ieps(2),ier)
precx = sprec
else
call fferr(13,ier)
endif
* #] normal:
* #[ eta's:
if ( mod(isoort(1),10).eq.-5 .or. mod(isoort(1),10).eq.-6 )
+ then
if ( mod(isoort(2),10).ne.-5 .and. mod(isoort(1),10).ne.-6
+ ) then
print *,'ffcxs3: error: I assumed both would be real!'
ier = ier + 50
endif
* we called ffcxr - no eta's
elseif ( Im(cpi(ip)).eq.0 ) then
call ffgeta(ni,cz(1),cdyz(1,1),
+ cpi(ip),cpiDpj(ii,ip),ieps,isoort,ier)
ntot = ni(1) + ni(2) + ni(3) + ni(4)
if ( ntot .ne. 0 ) call ffclgy(cs3(15),ipi12(2),ntot,
+ cy(1),cz(1),cd2yzz,ier)
else
*
* cpi(ip) is really complex (occurs in transformed
* 4pointfunction)
*
print *,'THIS PART IS NOT READY ',
+ 'and should not be reached'
c stop
endif
* #] eta's:
900 continue
*###] ffcs3:
end
*###[ ffclgy:
subroutine ffclgy(cs3,ipi12,ntot,cy,cz,cd2yzz,ier)
***#[*comment:***********************************************************
* *
* calculates the the difference of two S's with cy(3,4),cz(3,4), *
* cy(4)cz(3)-cy(3)cz(4) given. Note the difference with ffdcs4, *
* in which the cy's are the same and only the cz's different. *
* Here both can be different. Also we skip an intermediat *
* level. *
* *
* input: cy(4) (complex) cy,1-cy in S with s3,s4 *
* cz(4) (complex) cz,1-cz in S with s3,s4 *
* cdyz(2,2) (complex) cy - cz *
* cd2yzz (complex) 2*cy - cz+ - cz- *
* cdyzzy(4) (complex) cy(i,4)*cz(i,4)-cy(i,3)*cz(i,4) *
* cpiDpj(6,6) (complex) usual *
* cs3 (complex) assumed zero. *
* *
* output: cs3 (complex) mod factors pi^2/12, in array *
* ipi12 (integer) these factors *
* isoort (integer) returns kind of action taken *
* ier (integer) number of digits lost *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments
*
ComplexType cs3
ComplexType cy(4),cz(4),cd2yzz
integer ipi12,ntot,ier
*
* local variables
*
integer ipi
ComplexType c,cc,clogy,c2y1,zfflog,zfflo1,csum
RealType absc
external zfflog,zfflo1
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ calculations:
ipi = 0
if ( 1 .lt. xloss*absc(cy(2)) ) then
clogy = zfflo1(1/cy(2),ier)
else
if ( absc(cy(2)) .lt. xclogm .or. absc(cy(4)) .lt. xclogm )
+ then
if ( ntot .ne. 0 ) call fferr(15,ier)
clogy = 0
else
c = -cy(4)/cy(2)
if ( Re(c) .gt. -abs(Im(c)) ) then
clogy = zfflog(c,0,czero,ier)
else
* take out the factor 2*pi^2
cc = c+1
if ( absc(cc) .lt. xloss ) then
c2y1 = -cd2yzz - cz(1) + cz(4)
if ( absc(c2y1) .lt. xloss*max(absc(cz(1)),
+ absc(cz(4))) ) then
c2y1 = -cd2yzz - cz(2) + cz(3)
endif
csum = -c2y1/cy(2)
clogy = zfflo1(csum,ier)
else
csum = 0
clogy = zfflog(-c,0,czero,ier)
endif
if ( Im(c) .lt. -precc*absc(c) .or.
+ Im(csum) .lt. -precc*absc(csum) ) then
ipi = -1
elseif ( Im(c) .gt. precc*absc(c) .or.
+ Im(csum) .gt. precc*absc(csum) ) then
ipi = +1
else
call fferr(51,ier)
ipi = 0
endif
endif
endif
endif
cs3 = cs3 + ntot*c2ipi*clogy
if ( ipi .ne. 0 ) then
ipi12 = ipi12 - 24*ntot*ipi
endif
* #] calculations:
*###] ffclgy:
end
*###[ ffieps:
subroutine ffieps(ieps,cz,cp,cpDs,isoort)
***#[*comment:***********************************************************
* *
* Get the ieps prescription in such a way that it is compatible *
* with the imaginary part of cz if non-zero, compatible with the *
* real case if zero. *
* *
* Input: cz complex(4) the roots z-,z+,1-z-,1-z+ *
* cp complex p^2 *
* cpDs complex p.s *
* isoort integer(2) which type of Ri *
* *
* Output: ieps integer(2) z -> z-ieps*i*epsilon *
* will give correct im part *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ieps(2),isoort(2)
ComplexType cp,cpDs,cz(4)
*
* #] declarations:
* #[ work:
if ( Im(cp) .ne. 0 ) then
* do not calculate ANY eta terms, we'll do them ourselves.
ieps(1) = 99
ieps(2) = 99
elseif ( isoort(2) .ne. 0 ) then
if ( Im(cz(1)) .lt. 0 ) then
ieps(1) = +1
if ( Im(cz(2)) .lt. 0 ) then
ieps(2) = +1
else
ieps(2) = -1
endif
elseif ( Im(cz(1)) .gt. 0 ) then
ieps(1) = -1
if ( Im(cz(2)) .le. 0 ) then
ieps(2) = +1
else
ieps(2) = -1
endif
else
if ( Im(cz(2)) .lt. 0 ) then
ieps(1) = -1
ieps(2) = +1
elseif ( Im(cz(2)) .gt. 0 ) then
ieps(1) = +1
ieps(2) = -1
else
if ( (Re(cz(2)).gt.Re(cz(1))
+ .or. (Re(cz(1)).eq.Re(cz(2))
+ .and. Re(cz(4)).lt.Re(cz(3)))
+ ) .eqv. Re(cp).gt.0 ) then
ieps(1) = +1
ieps(2) = -1
else
ieps(1) = -1
ieps(2) = +1
endif
endif
endif
else
if ( Im(cz(1)) .lt. 0 ) then
ieps(1) = +1
elseif ( Im(cz(1)) .gt. 0 ) then
ieps(1) = -1
elseif ( Re(cpDs) .gt. 0 ) then
ieps(1) = +1
else
ieps(1) = -1
endif
ieps(2) = -9999
endif
* #] work:
*###] ffieps:
end
*###[ ffgeta:
subroutine ffgeta(ni,cz,cdyz,cp,cpDs,ieps,isoort,ier)
***#[*comment:***********************************************************
* *
* Get the eta terms which arise from splitting up *
* log(p2(x-z-)(x-z+)) - log(p2(y-z-)(y-z+)) *
* *
* Input: cz complex(4) the roots z-,z+,1-z-,1-z+ *
* cdyz complex(2,2) y-z *
* cd2yzz complex(2) 2y-(z-)-(z+) *
* cp complex p^2 *
* cpDs complex p.s *
* ieps integer(2) the assumed im part if Im(z)=0 *
* isoort integer(2) which type of Ri *
* *
* Output: ni integer(4) eta()/(2*pi*i) *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ni(4),ieps(2),isoort(2),ier
ComplexType cp,cpDs,cz(4),cdyz(2,2)
*
* local variables
*
integer i,nffeta,nffet1
ComplexType cmip
external nffeta,nffet1
*
* common
*
#include "ff.h"
*
* #] declarations:
* #[ complex masses or imaginary roots:
*
* only complex because of complex roots in y or z
* [checked and in agreement with ieps definition 23-sep-1991]
*
* isoort = +1: y is real, z is real
* isoort = -1-n*10: y is complex, possibly z as well
* isoort = -3-n*10: y,z complex, (y-z-)*(y-z+) real
* isoort = 0: y is complex, one z root only
* isoort = -10-n*10: y is real, z is complex
* isoort = -5,6-n*10: y,z real
*
if ( isoort(1) .gt. 0 ) then
*
* really a real case
*
ni(1) = 0
ni(2) = 0
ni(3) = 0
ni(4) = 0
elseif ( mod(isoort(1),10) .ne. 0 .and. isoort(2) .ne. 0 ) then
cmip = ToComplex(0D0,-Re(cp))
*
* ni(1) = eta(p2,(x-z-)(x-z+)) = 0 by definition (see ni(3))
* ni(2) = eta(x-z-,x-z+)
*
ni(1) = 0
if ( ieps(1) .gt. 0 .neqv. ieps(2) .gt. 0 ) then
ni(2) = 0
else
ni(2) = nffet1(-cz(1),-cz(2),cmip,ier)
if ( cz(3).ne.0 .and. cz(4).ne.0 ) then
i = nffet1(cz(3),cz(4),cmip,ier)
if ( i .ne. ni(2) ) call fferr(53,ier)
endif
endif
*
* ni(3) compensates for whatever convention we chose in ni(1)
* ni(4) = -eta(y-z-,y-z+)
*
if ( mod(isoort(1),10).eq.-3 ) then
* follow the i*epsilon prescription as (y-z-)(y-z+) real
ni(3) = 0
ni(4) = -nffet1(cdyz(2,1),cdyz(2,2),cmip,ier)
else
if ( Re(cp) .lt. 0 .and. Im(cdyz(2,1)*
+ cdyz(2,2)) .lt. 0 ) then
ni(3) = -1
else
ni(3) = 0
endif
ni(4) = -nffeta(cdyz(2,1),cdyz(2,2),ier)
endif
elseif ( (mod(isoort(1),10).eq.-1 .or. mod(isoort(1),10).eq.-3)
+ .and. isoort(2) .eq. 0 ) then
ni(1) = 0
if ( Im(cz(1)) .ne. 0 ) then
ni(2) = nffet1(-cpDs,-cz(1),ToComplex(Re(0),
+ Re(-1)),ier)
else
ni(2) = nffet1(-cpDs,ToComplex(Re(0),Re(1)),
+ ToComplex(Re(0),Re(-1)),ier)
endif
ni(3) = 0
ni(4) = -nffeta(-cpDs,cdyz(2,1),ier)
else
ni(1) = 0
ni(2) = 0
ni(3) = 0
ni(4) = 0
endif
* #] complex masses or imaginary roots:
*###] ffgeta:
end
diff --git a/Looptools/util/ffcxs4.F b/Looptools/util/ffcxs4.F
--- a/Looptools/util/ffcxs4.F
+++ b/Looptools/util/ffcxs4.F
@@ -1,778 +1,784 @@
#include "externals.h"
#include "types.h"
* $Id: ffcxs4.f,v 1.3 1995/10/17 06:55:09 gj Exp $
* $Log: ffcxs4.f,v $
c Revision 1.3 1995/10/17 06:55:09 gj
c Fixed ieps error in ffdcrr (ffcxs4.f), added real case in ffcrr, debugging
c info in ffxd0, and warned against remaining errors for del2=0 in ffrot4
c (ffxd0h.f)
c
c Revision 1.2 1995/10/06 09:17:22 gj
c Found stupid typo in ffxc0p which caused the result to be off by pi^2/3 in
c some equal-mass cases. Added checks to ffcxs4.f ffcrr.f.
c
*###[ ffcxs4:
subroutine ffcxs4(cs3,ipi12,w,y,z,dwy,dwz,dyz,d2yww,d2yzz,
+ xpi,piDpj,ii,ns,isoort,ier)
***#[*comment:***********************************************************
* *
* Calculate the 8 Spence functions = 4 R's = 2 dR's *
* *
* *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ipi12(4),ii,ns,isoort(4),ier
ComplexType cs3(40)
RealType w(4),y(4),z(4),dwy(2,2),dwz(2,2),dyz(2,2),
+ d2yww,d2yzz,xpi(ns),piDpj(ns,ns),x00(3)
*
* local variables:
*
integer iepz(2),iepw(2)
logical ld2yzz,ld2yww
*
* common blocks
*
#include "ff.h"
* #] declarations:
* #[ groundwork:
if ( isoort(2) .eq. 0 ) then
ld2yzz = .FALSE.
else
ld2yzz = .TRUE.
endif
if ( isoort(4) .eq. 0 ) then
ld2yww = .FALSE.
else
ld2yww = .TRUE.
endif
if ( isoort(2) .ne. 0 ) then
if ( z(2) .gt. z(1) .eqv. xpi(ii+3) .gt. 0 ) then
iepz(1) = +1
iepz(2) = -1
else
iepz(1) = -1
iepz(2) = +1
endif
else
print *,'ffcxs4: error: untested algorithm'
if ( piDpj(ii,ii+3) .gt. 0 ) then
iepz(1) = +1
else
iepz(1) = -1
endif
endif
if ( isoort(4) .ne. 0 ) then
if ( w(2) .gt. w(1) .eqv. xpi(5) .gt. 0 ) then
iepw(1) = 1
iepw(2) = -1
else
iepw(1) = -1
iepw(2) = 1
endif
else
print *,'ffcxs4: error: untested algorithm'
if ( piDpj(2,5) .gt. 0 ) then
iepw(1) = +1
else
iepw(1) = -1
endif
endif
* #] groundwork:
* #[ zm and wp:
if ( isoort(4) .eq. 0 ) then
call ffcxr(cs3(1),ipi12(1),y(2),y(4),z(1),z(3),dyz(2,1),
+ ld2yzz,d2yzz,z(2),z(4),.FALSE.,x00,iepz(1),ier)
else
if ( .not. ( dwz(2,1).eq.0 .and. iepz(1).eq.iepw(2) ) )
+ call ffdcxr(cs3( 1),ipi12(1),y(2),y(4),z(1),z(3),
+ z(2),z(4),d2yzz,w(2),w(4),w(1),w(3),d2yww,
+ dyz(2,1),dwy(2,2),dwz(2,1),iepz(1),iepw(2),ier)
endif
* #] zm and wp:
* #[ zp and wm:
if ( isoort(2) .eq. 0 ) then
call ffcxr(cs3(1),ipi12(1),y(2),y(4),w(1),w(3),-dwy(1,2),
+ ld2yww,d2yww,w(2),w(4),.FALSE.,x00,iepw(1),ier)
else
if ( .not. ( dwz(1,2).eq.0 .and. iepz(2).eq.iepw(1) ) )
+ call ffdcxr(cs3(21),ipi12(3),y(2),y(4),z(2),z(4),
+ z(1),z(3),d2yzz,w(1),w(3),w(2),w(4),d2yww,
+ dyz(2,2),dwy(1,2),dwz(1,2),iepz(2),iepw(1),ier)
endif
* #] zp and wm:
*###] ffcxs4:
end
*###[ ffcs4:
subroutine ffcs4(cs3,ipi12,cw,cy,cz,cdwy,cdwz,cdyz,cd2yww,cd2yzz
+ ,cpi,cpiDpj,cp2p,ii,ns,isoort,ier)
***#[*comment:***********************************************************
* *
* Calculate the 8 Spence functions = 4 R's = 2 dR's *
* *
* *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ipi12(4),ii,ns,isoort(4),ier
ComplexType cs3(40)
ComplexType cw(4),cy(4),cz(4),cdwy(2,2),cdwz(2,2),cdyz(2,2)
ComplexType cd2yww,cd2yzz,cpi(ns),cp2p,cpiDpj(ns,ns)
*
* local variables:
*
logical ld2yzz,ld2yww
integer i,j,ip,iepz(2),iepw(2),nz(4),nw(4),ntot,i2pi
ComplexType c,cc,clogy,c2y1,cdyw(2,2)
ComplexType zfflo1,zfflog
RealType absc
external zfflo1,zfflog
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ get counters:
ip = ii+3
if ( isoort(2) .eq. 0 ) then
ld2yzz = .FALSE.
else
ld2yzz = .TRUE.
endif
if ( isoort(4) .eq. 0 ) then
ld2yww = .FALSE.
else
ld2yww = .TRUE.
endif
call ffieps(iepz,cz,cpi(ip),cpiDpj(ip,ii),isoort)
call ffieps(iepw,cw,cp2p,cpiDpj(ip,ii),isoort(3))
if ( isoort(4) .eq. 0 ) then
print *,'ffcs4: error: case not implemented'
ier = ier + 50
endif
* #] get counters:
* #[ R's:
if ( isoort(4) .eq. 0 ) then
call ffcrr(cs3(1),ipi12(1),cy(2),cy(4),cz(1),cz(3),cdyz(2,1)
+ ,ld2yzz,cd2yzz,cz(2),cz(4),isoort(4),iepz(1),ier)
else
if ( .not. ( cdwz(2,1).eq.0 .and. iepz(1).eq.iepw(2) ) )
+ call ffdcrr(cs3( 1),ipi12(1),cy(2),cy(4),cz(1),cz(3),cz(2),
+ cz(4),cd2yzz,cw(2),cw(4),cw(1),cw(3),cd2yww,cdyz(2,1),
+ cdwy(2,2),cdwz(2,1),isoort(4),iepz(1),iepw(2),ier)
endif
if ( isoort(2) .eq. 0 ) then
call ffcrr(cs3(1),ipi12(1),cy(2),cy(4),cw(1),cw(3),-cdwy(1,2
+ ),ld2yww,cd2yww,cw(2),cw(4),isoort(2),iepw(1),ier)
else
if ( .not. ( cdwz(1,2).eq.0 .and. iepz(2).eq.iepw(1) ) )
+ call ffdcrr(cs3(21),ipi12(3),cy(2),cy(4),cz(2),cz(4),cz(1),
+ cz(3),cd2yzz,cw(1),cw(3),cw(2),cw(4),cd2yww,cdyz(2,2),
+ cdwy(1,2),cdwz(1,2),iepz(2),isoort(2),iepw(1),ier)
endif
* #] R's:
* #[ eta's:
if ( Im(cpi(ip)) .eq. 0 ) then
call ffgeta(nz,cz,cdyz,
+ cpi(ip),cpiDpj(ii,ip),iepz,isoort,ier)
do 120 i=1,2
do 110 j=1,2
cdyw(i,j) = cdwy(j,i)
110 continue
120 continue
call ffgeta(nw,cw,cdyw,
+ cp2p,cpiDpj(ii,ip),iepw,isoort(3),ier)
else
print *,'ffcs4: error: not ready for complex D0 yet'
endif
ntot = nz(1)+nz(2)+nz(3)+nz(4)-nw(1)-nw(2)-nw(3)-nw(4)
if ( ntot .ne. 0 ) then
i2pi = 0
if ( 1/absc(cy(2)) .lt. xloss ) then
clogy = zfflo1(1/cy(2),ier)
else
c = -cy(4)/cy(2)
if ( Re(c) .gt. -abs(Im(c)) ) then
clogy = zfflog(c,0,czero,ier)
else
* take out the factor 2*pi^2
cc = c+1
if ( absc(cc) .lt. xloss ) then
c2y1 = -cd2yzz - cz(1) + cz(4)
if ( absc(c2y1) .lt. xloss*max(absc(cz(1)),
+ absc(cz(4))) ) then
c2y1 = -cd2yzz - cz(2) + cz(3)
endif
clogy = zfflo1(-c2y1/cy(2),ier)
else
clogy = zfflog(-c,0,czero,ier)
endif
if ( Im(c) .lt. 0 ) then
i2pi = -1
elseif ( Im(c) .gt. 0 ) then
i2pi = +1
else
call fferr(51,ier)
i2pi = 0
endif
ipi12(2) = ipi12(2) - ntot*24*i2pi
endif
endif
if ( cs3(40) .ne. 0 ) print *,'ffcs4: error: cs3(40) != 0'
cs3(40) = ntot*c2ipi*clogy
endif
* #] eta's:
*###] ffcs4:
end
*###[ ffdcxr:
subroutine ffdcxr(cs3,ipi12,y,y1,z,z1,zp,zp1,d2yzz,
+ w,w1,wp,wp1,d2yww,dyz,dwy,dwz,iepsz,iepsw,ier)
***#[*comment:***********************************************************
* *
* Calculate *
* *
* R(y,z,iepsz) - R(y,w,iepsw) *
* *
* Input: *
* a = [yzw] (real) see definition *
* a1 = 1 - a (real) *
* dab = a - b (real) *
* ieps[zw] (integer) sign of imaginary part *
* of argument logarithm *
* cs3(20) (complex) assumed zero *
* *
* Output: *
* cs3(20) (complex) the results, not added *
* ipi12(2) (integer) factors pi^2/12 *
* *
* Calls: ffcxr *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ipi12(2),iepsz,iepsw,ier
ComplexType cs3(20)
RealType y,z,w,y1,z1,w1,dyz,dwy,dwz,zp,zp1,d2yzz,wp,wp1,
+ d2yww
*
* local variables:
*
integer i,ieps
logical again
RealType yy,yy1,zz,zz1,dyyzz,xx1,xx1n,term,tot,d2,d3,
+ d21,d31,d2n,d3n,d21n1,d31n1,dw,x00(3)
ComplexType chulp
RealType dfflo1
external dfflo1
*
* common blocks
*
#include "ff.h"
* #] declarations:
* #[ groundwork:
if ( dwz .eq. 0 .and. iepsz .eq. iepsw ) return
if ( dyz .eq. 0 ) then
call fferr(75,ier)
return
endif
xx1 = y/dyz
dw = dwz/dyz
if ( xx1 .le. .5D0 .or. xx1 .gt. 2 ) then
d2 = 1/y
dw = dw*y/w
else
d2 = 1/z1
endif
again = .FALSE.
123 continue
* #] groundwork:
* #[ trivial case:
if ( dw .eq. 0 ) then
* #] trivial case:
* #[ normal case:
elseif ( abs(dw) .gt. xloss .or. again ) then
* nothing's the matter
call ffcxr(cs3( 1),ipi12(1),y,y1,z,z1,dyz,
+ .TRUE.,d2yzz,zp,zp1,.FALSE.,x00,iepsz,ier)
call ffcxr(cs3(11),ipi12(2),y,y1,w,w1,-dwy,
+ .TRUE.,d2yww,wp,wp1,.FALSE.,x00,iepsw,ier)
do 10 i=11,20
- 10 cs3(i) = -cs3(i)
+ cs3(i) = -cs3(i)
+ 10 continue
ipi12(2) = -ipi12(2)
* #] normal case:
* #[ only cancellations in w, not in y:
elseif ( abs(d2) .gt. xloss ) then
* there are no cancellations the other way:
if ( iepsz .ne. iepsw .and. ( y/dyz .gt. 1 .or.-y/dwy .gt.
+ 1 ) ) then
again = .TRUE.
goto 123
endif
yy = dwy/dwz
zz = yy*z/y
yy1 = dyz/dwz
zz1 = yy1*w/y
dyyzz = yy*dyz/y
if ( y .lt. 0 ) then
ieps = iepsz
else
ieps = -iepsz
endif
call ffcxr(cs3( 1),ipi12(1),yy,yy1,zz,zz1,dyyzz,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,2*ieps,ier)
zz = yy*z1/y1
zz1 = yy1*w1/y1
dyyzz = -yy*dyz/y1
if ( y1 .gt. 0 ) then
ieps = iepsz
else
ieps = -iepsz
endif
call ffcxr(cs3(11),ipi12(2),yy,yy1,zz,zz1,dyyzz,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,2*ieps,ier)
do 20 i=11,20
cs3(i) = -cs3(i)
20 continue
ipi12(2) = -ipi12(2)
* #] only cancellations in w, not in y:
* #[ Hill identity:
elseif ( ( 1 .gt. xloss*abs(y) .or. abs(xx1) .gt. xloss )
+ .and. ( 1 .gt. xloss*abs(z) .or. abs(z/dyz) .gt. xloss )
+ .and. ( 1 .gt. xloss*abs(y) .or. abs(dyz/y) .gt. xloss )
+ ) then
* do a Hill identity on the y,y-1 direction
yy = -y*w1/dwy
yy1 = w*y1/dwy
zz = -z*w1/dwz
zz1 = w*z1/dwz
dyyzz = -w*w1*(dyz/(dwy*dwz))
if ( y*dwz .gt. 0 .eqv. (y+dwz) .gt. 0 ) then
ieps = 2*iepsw
else
ieps = -2*iepsw
endif
call ffcxr(cs3( 1),ipi12(1),yy,yy1,zz,zz1,dyyzz,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,ieps,ier)
yy = w1
yy1 = w
zz = -w1*z/dwz
zz1 = w*z1/dwz
dyyzz = w*w1/dwz
call ffcxr(cs3( 9),ipi12(2),yy,yy1,zz,zz1,dyyzz,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,ieps,ier)
do 30 i=9,16
- 30 cs3(i) = -cs3(i)
+ cs3(i) = -cs3(i)
+ 30 continue
ipi12(2) = -ipi12(2)
* the extra logarithms ...
if ( 1 .lt. xloss*abs(w) ) then
chulp = dfflo1(1/w,ier)
elseif ( w1 .lt. 0 .or. w .lt. 0 ) then
chulp = log(-w1/w)
else
chulp = ToComplex(Re(log(w1/w)),Re(-iepsw*pi))
endif
cs3(20) = -Re(dfflo1(dwz/dwy,ier))*chulp
* #] Hill identity:
* #[ Taylor expansion:
elseif ( (w.lt.0..or.w1.lt.0) .and. (z.lt.0..or.z1.lt.0) ) then
* do a Taylor expansion
if ( abs(xx1) .lt. xloss ) then
d3 = dwz/dwy
xx1n = xx1
d2n = d2
d3n = d3
d21 = 1-d2
d21n1 = 1
d31 = 1-d3
d31n1 = 1
tot = xx1*d2*d3
do 50 i=2,20
xx1n = xx1n*xx1
d21n1 = d21n1*d21
d31n1 = d31n1*d31
d2n = d2n + d2*d21n1
d3n = d3n + d3*d31n1
term = xx1n*d2n*d3n*xn2inv(i)
tot = tot + term
if ( abs(term) .le. precx*abs(tot) ) goto 51
50 continue
51 continue
cs3(1) = tot
elseif ( abs(z/dyz) .lt. xloss ) then
call ffcxr(cs3( 1),ipi12(1),y,y1,z,z1,dyz,
+ .TRUE.,d2yzz,zp,zp1,.FALSE.,x00,iepsz,ier)
call ffcxr(cs3(11),ipi12(2),y,y1,w,w1,-dwy,
+ .TRUE.,d2yww,wp,wp1,.FALSE.,x00,iepsw,ier)
do 110 i=11,20
- 110 cs3(i) = -cs3(i)
+ cs3(i) = -cs3(i)
+ 110 continue
else
call fferr(22,ier)
return
endif
else
call ffcxr(cs3( 1),ipi12(1),y,y1,z,z1,dyz,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,iepsz,ier)
call ffcxr(cs3(11),ipi12(2),y,y1,w,w1,-dwy,.FALSE.,
+ 0D0,0D0,0D0,.FALSE.,x00,iepsw,ier)
do 40 i=11,20
- 40 cs3(i) = -cs3(i)
+ cs3(i) = -cs3(i)
+ 40 continue
ipi12(2) = -ipi12(2)
endif
* #] Taylor expansion:
*###] ffdcxr:
end
*###[ ffdcrr:
subroutine ffdcrr(cs3,ipi12,cy,cy1,cz,cz1,czp,czp1,cd2yzz,cw,cw1
+ ,cwp,cwp1,cd2yww,cdyz,cdwy,cdwz,isoort,iepsz,iepsw,ier)
***#[*comment:***********************************************************
* *
* Calculate *
* *
* R(cy,cz,iepsz) - R(cy,cw,iepsw) *
* *
* Input: *
* a = [yzw] (real) see definition *
* a1 = 1 - a (real) *
* dab = a - b (real) *
* ieps[zw] (integer) sign of imaginary part *
* of argument logarithm *
* cs3(20) (complex) assumed zero *
* *
* Output: *
* cs3(20) (complex) the results, not added *
* ipi12(2) (integer) factors pi^2/12 *
* *
* Calls: ffcrr *
* *
***#]*comment:***********************************************************
* #[ declarations:
implicit none
*
* arguments:
*
integer ipi12(2),isoort,iepsz,iepsw,ier
ComplexType cs3(20)
ComplexType cy,cz,czp,cw,cwp,cy1,cz1,czp1,cw1,cwp1,
+ cdyz,cdwy,cdwz,cd2yzz,cd2yww
*
* local variables:
*
integer i,ieps,ieps1,ieps2,
+ nffeta,nffet1,n1,n2,n3,n4,n5,n6
logical ld2yyz
ComplexType cyy,cyy1,czz,czz1,cdyyzz,chulp,zfflo1,zfflog,
+ cc1,cdw,cc1n,cterm,ctot,cd2,cd3,
+ cd21,cd31,cd2n,cd3n,cd21n1,cd31n1,
+ cc2,cfactz,cfactw,czzp,czzp1,cd2yyz
ComplexType c
RealType absc
external nffeta,nffet1,zfflo1,zfflog
*
* common blocks
*
#include "ff.h"
*
* statement function
*
absc(c) = abs(Re(c)) + abs(Im(c))
* #] declarations:
* #[ groundwork:
if ( cdwz .eq. 0 ) then
if ( abs(Im(cz)) .gt. precc*abs(Re(cz)) .or.
+ iepsz .eq. iepsw ) return
if ( Re(cz) .ge. 0 .and. Re(cz1) .ge. 0 ) return
call fferr(76,ier)
return
endif
if ( cdyz .eq. 0 ) then
call fferr(77,ier)
return
endif
cc1 = cy/cdyz
cdw = cdwz/cdyz
if ( Re(cc1) .le. .5D0 .or. abs(cc1-1) .gt. 1 ) then
cd2 = 1/cy
cdw = cdw*cy/cw
else
cd2 = 1/cz1
endif
* #] groundwork:
* #[ trivial case:
if ( absc(cdw) .eq. 0 ) then
* #] trivial case:
* #[ normal case:
*
* if no cancellations are expected OR the imaginary signs differ
* and are significant
*
elseif ( absc(cdw) .gt. xloss .or. (iepsz.ne.iepsw .and.
+ (Re(cy/cdyz).gt.1 .or. Re(-cy1/cdyz).gt.1) ) ) then
* nothing's the matter
* special case to avoid bug found 15-oct=1995
if ( iepsz.eq.iepsw ) then
if ( Im(cz).eq.0 .and. Im(cz1).eq.0 ) then
print *,'ffdcrr: flipping sign iepsz'
iepsz = -iepsz
elseif ( Im(cw).eq.0 .and. Im(cw1).eq.0 ) then
print *,'ffdcrr: flipping sign iepsw'
iepsw = -iepsw
else
print *,'ffdcrr: error: missing eta terms!'
ier = ier + 100
endif
endif
call ffcrr(cs3(1),ipi12(1),cy,cy1,cz,cz1,cdyz,.TRUE.,
+ cd2yzz,czp,czp1,isoort,iepsz,ier)
call ffcrr(cs3(8),ipi12(2),cy,cy1,cw,cw1,-cdwy,.TRUE.,
+ cd2yww,cwp,cwp1,isoort,iepsw,ier)
do 10 i=8,14
cs3(i) = -cs3(i)
10 continue
ipi12(2) = -ipi12(2)
* #] normal case:
* #[ only cancellations in cw, not in cy:
elseif ( absc(cd2) .gt. xloss ) then
* there are no cancellations the other way:
cyy = cdwy/cdwz
czz = cz*cyy/cy
cyy1 = cdyz/cdwz
czz1 = cyy1*cw/cy
cdyyzz = cdyz*cyy/cy
if ( Re(cy) .gt. 0 ) then
ieps1 = -3*iepsz
else
ieps1 = +3*iepsz
endif
* Often 2y-z-z is relevant, but 2*yy-zz-zz is not, solve by
* introducing zzp.
czzp = czp*cyy/cy
cd2yyz = cd2yzz*cyy/cy
czzp1 = 1 - czzp
if ( absc(czzp1) .lt. xloss ) then
* later try more possibilities
ld2yyz = .FALSE.
else
ld2yyz = .TRUE.
endif
call ffcrr(cs3(1),ipi12(1),cyy,cyy1,czz,czz1,cdyyzz,
+ ld2yyz,cd2yyz,czzp,czzp1,isoort,ieps1,ier)
czz = cyy*cz1/cy1
czz1 = cyy1*cw1/cy1
if ( Re(-cy1) .gt. 0 ) then
ieps2 = -3*iepsz
else
ieps2 = +3*iepsz
endif
cdyyzz = -cyy*cdyz/cy1
czzp = czp1*cyy/cy1
cd2yyz = -cd2yzz*cyy/cy1
czzp1 = 1 - czzp
if ( absc(czzp1) .lt. xloss ) then
* later try more possibilities
ld2yyz = .FALSE.
else
ld2yyz = .TRUE.
endif
call ffcrr(cs3(8),ipi12(2),cyy,cyy1,czz,czz1,cdyyzz,
+ .TRUE.,cd2yyz,czzp,czzp1,isoort,ieps2,ier)
do 20 i=8,14
cs3(i) = -cs3(i)
20 continue
ipi12(2) = -ipi12(2)
* eta terms (are not calculated in ffcrr as ieps = 3)
cfactz = 1/cdyz
if ( Im(cz) .eq. 0 ) then
if ( Im(cy) .eq. 0 ) then
n1 = 0
n2 = 0
else
n1 = nffet1(ToComplex(Re(0),Re(iepsz)),cfactz,
+ -cz*cfactz,ier)
n2 = nffet1(ToComplex(Re(0),Re(iepsz)),cfactz,
+ cz1*cfactz,ier)
endif
else
n1 = nffeta(-cz,cfactz,ier)
n2 = nffeta(cz1,cfactz,ier)
endif
cfactw = -1/cdwy
if ( Im(cw) .eq. 0 ) then
if ( Im(cy) .eq. 0 ) then
n4 = 0
n5 = 0
else
n4 = nffet1(ToComplex(Re(0),Re(iepsw)),cfactw,
+ -cw*cfactw,ier)
n5 = nffet1(ToComplex(Re(0),Re(iepsw)),cfactw,
+ cw1*cfactw,ier)
endif
else
n4 = nffeta(-cw,cfactw,ier)
n5 = nffeta(cw1,cfactw,ier)
endif
*
* we assume that cs3(15-17) are not used, this is always true
*
n3 = 0
n6 = 0
if ( n1.eq.n4 ) then
if ( n1.eq.0 ) then
* nothing to do
else
cc1 = cdwz/cdyz
if ( absc(cc1) .lt. xloss ) then
cs3(15) = n1*c2ipi*zfflo1(cc1,ier)
else
cc1 = -cdwy/cdyz
cs3(15) = n1*c2ipi*zfflog(cc1,0,czero,ier)
endif
cc1 = cy*cfactz
cc2 = cy*cfactw
if ( Im(cc1).eq.0 .or. Im(cc2).eq.0 ) then
n3 = 0
else
n3 = nffeta(cc1,1/cc2,ier)
endif
if ( n3.ne.0 ) then
print *,'ffdcrr: error: untested algorithm'
ier = ier + 50
ipi12(1) = ipi12(1) + 4*12*n1*n3
endif
endif
else
cc1 = cy*cfactz
cc2 = cy*cfactw
cs3(15) = (n1*zfflog(cc1,ieps1,czero,ier) +
+ n4*zfflog(cc2,ieps1,czero,ier))*c2ipi
endif
if ( n2.eq.n5 ) then
if ( n2.eq.0 ) then
* nothing to do
else
cc1 = cdwz/cdyz
if ( absc(cc1) .lt. xloss ) then
cs3(16) = n2*c2ipi*zfflo1(cc1,ier)
else
cc1 = -cdwy/cdyz
cs3(16) = n2*c2ipi*zfflog(cc1,0,czero,ier)
endif
cc1 = -cy1*cfactz
cc2 = -cy1*cfactw
if ( Im(cc1).eq.0 .or. Im(cc2).eq.0 ) then
n6 = 0
else
n6 = nffeta(cc1,1/cc2,ier)
endif
if ( n6.ne.0 ) then
print *,'ffdcrr: error: untested algorithm'
ier = ier + 50
ipi12(2) = ipi12(2) + 4*12*n2*n6
endif
endif
else
cc1 = -cy1*cfactz
cc2 = -cy1*cfactw
cs3(15) = (n2*zfflog(cc1,ieps2,czero,ier) +
+ n5*zfflog(cc2,ieps2,czero,ier))*c2ipi
endif
* #] only cancellations in cw, not in cy:
* #[ Hill identity:
elseif ( ( 1.gt.xloss*absc(cy) .or. absc(cc1).gt.xloss )
+ .and. ( 1.gt.xloss*absc(cz) .or. absc(cz/cdyz).gt.xloss )
+ .and. ( 1.gt.xloss*absc(cy) .or. absc(cdyz/cy).gt.xloss )
+ ) then
* do a Hill identity on the cy,cy-1 direction
cyy = -cy*cw1/cdwy
cyy1 = cw*cy1/cdwy
czz = -cz*cw1/cdwz
czz1 = cw*cz1/cdwz
cdyyzz = -cw*cw1*(cdyz/(cdwy*cdwz))
ieps = -2*iepsz
call ffcrr(cs3(1),ipi12(1),cyy,cyy1,czz,czz1,cdyyzz,
+ .FALSE.,czero,czero,czero,isoort,ieps,ier)
cyy = cw1
cyy1 = cw
czz = -cw1*cz/cdwz
czz1 = cw*cz1/cdwz
cdyyzz = cw*cw1/cdwz
call ffcrr(cs3(8),ipi12(2),cyy,cyy1,czz,czz1,cdyyzz,
+ .FALSE.,czero,czero,czero,isoort,0,ier)
do 30 i=8,14
- 30 cs3(i) = -cs3(i)
+ cs3(i) = -cs3(i)
+ 30 continue
ipi12(2) = -ipi12(2)
* the extra logarithms ...
if ( 1 .lt. xloss*absc(cw) ) then
chulp = zfflo1(1/cw,ier)
else
chulp = zfflog(-cw1/cw,0,czero,ier)
endif
cs3(15) = -zfflo1(cdwz/cdwy,ier)*chulp
* #] Hill identity:
* #[ Taylor expansion:
else
* Do a Taylor expansion
if ( absc(cc1) .lt. xloss ) then
cd3 = cdwz/cdwy
* isign = 1
cc1n = cc1
cd2n = cd2
cd3n = cd3
cd21 = 1-cd2
cd21n1 = 1
cd31 = 1-cd3
cd31n1 = 1
ctot = cc1*cd2*cd3
do 50 i=2,20
cc1n = cc1n*cc1
cd21n1 = cd21n1*cd21
cd31n1 = cd31n1*cd31
cd2n = cd2n + cd2*cd21n1
cd3n = cd3n + cd3*cd31n1
cterm = cc1n*cd2n*cd3n*Re(xn2inv(i))
ctot = ctot + cterm
if ( absc(cterm) .lt. precc*absc(ctot) ) goto 51
50 continue
51 continue
cs3(1) = ctot
elseif ( absc(cz/cdyz) .lt. xloss ) then
call ffcrr(cs3(1),ipi12(1),cy,cy1,cz,cz1,cdyz,.TRUE.,
+ cd2yzz,czp,czp1,isoort,iepsz,ier)
call ffcrr(cs3(8),ipi12(2),cy,cy1,cw,cw1,-cdwy,.TRUE.,
+ cd2yww,cwp,cwp1,isoort,iepsw,ier)
do 110 i=8,14
- 110 cs3(i) = -cs3(i)
+ cs3(i) = -cs3(i)
+ 110 continue
ipi12(2) = -ipi12(2)
else
call fferr(20,ier)
return
endif
endif
* #] Taylor expansion:
*###] ffdcrr:
end
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,29 +1,29 @@
SUBDIRS = include \
Utilities PDT Decay PDF Models \
Shower Hadronization MatrixElement \
UnderlyingEvent Analysis Looptools Sampling \
API lib src Doc Contrib Tests
EXTRA_DIST = GUIDELINES cat_with_cpplines
-## DISTCHECK_CONFIGURE_FLAGS = --enable-debug --with-thepeg=$(THEPEGPATH) --with-gsl=$(GSLPATH) --with-boost=/mt/data1/herwig
+DISTCHECK_CONFIGURE_FLAGS = --enable-debug --with-thepeg=$(THEPEGPATH) --with-gsl=$(GSLPATH)
ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = config.herwig
libclean:
find . -name '*.la' -delete
cd lib && $(MAKE) $(AM_MAKEFLAGS) clean
cd src && $(MAKE) $(AM_MAKEFLAGS) clean
tests:
cd Tests && $(MAKE) $(AM_MAKEFLAGS) tests
## ThePEG registration
unregister:
cd src && $(MAKE) $(AM_MAKEFLAGS) unregister
register:
cd src && $(MAKE) $(AM_MAKEFLAGS) register
diff --git a/MatrixElement/BlobME.h b/MatrixElement/BlobME.h
--- a/MatrixElement/BlobME.h
+++ b/MatrixElement/BlobME.h
@@ -1,150 +1,150 @@
// -*- C++ -*-
#ifndef Herwig_BlobME_H
#define Herwig_BlobME_H
//
// This is the declaration of the BlobME class.
//
#include "ThePEG/MatrixElement/BlobMEBase.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
namespace Herwig {
using namespace ThePEG;
/**
* \brief BlobME serves as a base class for special processes such as
* instanton or sphaleron induced ones.
*
* \author Simon Platzer
*
* @see \ref BlobMEInterfaces "The interfaces"
* defined for BlobME.
*/
class BlobME: public BlobMEBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
BlobME();
/**
* The destructor.
*/
virtual ~BlobME();
//@}
public:
/**
* Return the scale associated with the phase space point provided
* by the last call to setKinematics().
*/
virtual Energy2 scale() const {
return lastSHat();
}
/**
* Generate internal degrees of freedom given nDim() uniform random
* numbers in the interval ]0,1[. To help the phase space generator,
* the 'dSigHatDR' should be a smooth function of these numbers,
* although this is not strictly necessary. The return value should
* be true of the generation succeeded. If so the generated momenta
* should be stored in the meMomenta() vector.
*/
virtual bool generateKinematics(const double * r) {
jacobian(thePhasespace->generateTwoToNKinematics(r,meMomenta()));
return jacobian() > 0.0;
}
/**
* Return the additional number of objects to generate
*/
size_t nAdditional() const { return theNAdditional; }
/**
* Set the additional number of objects to generate
*/
void nAdditional(size_t n) { theNAdditional = n; }
/**
* Return the minimal number of final state particles
*/
virtual size_t nOutgoing() const = 0;
/**
* The number of internal degreed of freedom used in the matrix
* element. This default version returns 0;
*/
virtual int nDim() const {
return thePhasespace->nDimPhasespace(nOutgoing()+nAdditional());
}
/**
* Set the xcomb object
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Return the phase space used
*/
Ptr<MatchboxPhasespace>::tptr phasespace() const { return thePhasespace; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The phase space to be used
*/
Ptr<MatchboxPhasespace>::ptr thePhasespace;
/**
* The multiplicity of additional objects to consider
*/
size_t theNAdditional;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BlobME & operator=(const BlobME &);
+ BlobME & operator=(const BlobME &) = delete;
};
}
#endif /* Herwig_BlobME_H */
diff --git a/MatrixElement/DIS/DISBase.h b/MatrixElement/DIS/DISBase.h
--- a/MatrixElement/DIS/DISBase.h
+++ b/MatrixElement/DIS/DISBase.h
@@ -1,438 +1,438 @@
// -*- C++ -*-
#ifndef HERWIG_DISBase_H
#define HERWIG_DISBase_H
//
// This is the declaration of the DISBase class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/**
* The DISBase class is the base class for the implementation
* of DIS type processes including corrections in both the old
* fashioned matrix element and POWHEG approaches
*
* @see \ref DISBaseInterfaces "The interfaces"
* defined for DISBase.
*/
class DISBase: public HwMEBase {
public:
/**
* The default constructor.
*/
DISBase();
/**
* The default constructor.
*/
virtual ~DISBase();
/**
* Members for the old-fashioned matrix element correction
*/
//@{
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return true;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr, double &,
double & );
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
//@}
/**
* Members for the POWHEG stype correction
*/
//@{
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return Both;}
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction);
//@}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DISBase & operator=(const DISBase &);
+ DISBase & operator=(const DISBase &) = delete;
protected:
/**
* The NLO weight
*/
double NLOWeight() const;
/**
* Calculate the coefficient A for the correlations
*/
virtual double A(tcPDPtr lin, tcPDPtr lout, tcPDPtr qin, tcPDPtr qout,
Energy2 scale) const =0;
/**
* Members for the matrix element correction
*/
//@{
/**
* Generate the values of \f$x_p\f$ and \f$z_p\f$
* @param xp The value of xp, output
* @param zp The value of zp, output
*/
double generateComptonPoint(double &xp, double & zp);
/**
* Generate the values of \f$x_p\f$ and \f$z_p\f$
* @param xp The value of xp, output
* @param zp The value of zp, output
*/
double generateBGFPoint(double &xp, double & zp);
/**
* Return the coefficients for the matrix element piece for
* the QCD compton case. The output is the \f$a_i\f$ coefficients to
* give the function as
* \f$a_0+a_1\cos\phi+a_2\sin\phi+a_3\cos^2\phi+a_4\sin^2\phi\f$
* @param xp \f$x_p\f$
* @param x2 \f$x_2\f$
* @param xperp \f$x_\perp\f$
* @param norm Normalise to the large $l$ value of the ME
*/
vector<double> ComptonME(double xp, double x2, double xperp,
bool norm);
/**
* Return the coefficients for the matrix element piece for
* the QCD compton case. The output is the \f$a_i\f$ coefficients to
* give the function as
* \f$a_0+a_1\cos\phi+a_2\sin\phi+a_3\cos^2\phi+a_4\sin^2\phi\f$
* @param xp \f$x_p\f$
* @param x2 \f$x_3\f$
* @param x3 \f$x_2\f$
* @param xperp \f$x_\perp\f$
* @param norm Normalise to the large $l$ value of the ME
*/
vector<double> BGFME(double xp, double x2, double x3, double xperp,
bool norm);
//@}
/**
* Members for the POWHEG correction
*/
//@{
/**
* Generate a Compton process
*/
void generateCompton();
/**
* Generate a BGF process
*/
void generateBGF();
//@}
private:
/**
* Parameters for the matrix element correction
*/
//@{
/**
* Enchancement factor for ISR
*/
double initial_;
/**
* Enchancement factor for FSR
*/
double final_;
/**
* Relative fraction of compton and BGF processes to generate
*/
double procProb_;
/**
* Integral for compton process
*/
double comptonInt_;
/**
* Integral for BGF process
*/
double bgfInt_;
//@}
/**
* Parameters for the POWHEG correction
*/
//@{
/**
* Weight for the compton channel
*/
double comptonWeight_;
/**
* Weight for the BGF channel
*/
double BGFWeight_;
/**
* Minimum value of \f$p_T\f$
*/
Energy pTmin_;
//@}
/**
* Parameters for the point being generated
*/
//@{
/**
* \f$Q^2\f$
*/
Energy2 q2_;
/**
*
*/
double l_;
/**
* Borm momentum fraction
*/
double xB_;
/**
* Beam particle
*/
tcBeamPtr beam_;
/**
* Partons
*/
tcPDPtr partons_[2];
/**
* Leptons
*/
tcPDPtr leptons_[2];
/**
* PDF object
*/
tcPDFPtr pdf_;
/**
* Rotation to the Breit frame
*/
LorentzRotation rot_;
/**
* Lepton momenta
*/
Lorentz5Momentum pl_[2];
/**
* Quark momenta
*/
Lorentz5Momentum pq_[2];
/**
* q
*/
Lorentz5Momentum q_;
/**
* Compton parameters
*/
Energy pTCompton_;
bool ComptonISFS_;
vector<Lorentz5Momentum> ComptonMomenta_;
/**
* BGF parameters
*/
Energy pTBGF_;
vector<Lorentz5Momentum> BGFMomenta_;
//@}
/**
* The coefficient for the correlations
*/
double acoeff_;
/**
* Coupling
*/
ShowerAlphaPtr alpha_;
/**
* Gluon particle data object
*/
PDPtr gluon_;
private:
/**
* The radiative variables
*/
//@{
/**
* The \f$x_p\f$ or \f$z\f$ real integration variable
*/
double xp_;
//@}
/**
* The hadron
*/
tcBeamPtr hadron_;
/**
* Selects a dynamic or fixed factorization scale
*/
unsigned int scaleOpt_;
/**
* The factorization scale
*/
Energy muF_;
/**
* Prefactor if variable scale used
*/
double scaleFact_;
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int contrib_;
/**
* Power for sampling \f$x_p\f$
*/
double power_;
/**
* Jacobian for \f$x_p\f$ integral
*/
double jac_;
};
}
#endif /* HERWIG_DISBase_H */
diff --git a/MatrixElement/DIS/MEChargedCurrentDIS.h b/MatrixElement/DIS/MEChargedCurrentDIS.h
--- a/MatrixElement/DIS/MEChargedCurrentDIS.h
+++ b/MatrixElement/DIS/MEChargedCurrentDIS.h
@@ -1,222 +1,222 @@
// -*- C++ -*-
#ifndef HERWIG_MEChargedCurrentDIS_H
#define HERWIG_MEChargedCurrentDIS_H
//
// This is the declaration of the MEChargedCurrentDIS class.
//
#include "DISBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEChargedCurrentDIS class provides the matrix elements for
* charged current DIS.
*
* By default both the incoming and outgong quarks are assumed to be massless
* although the mass of the outgoing quark can be included if required. This
* option should be used if top production is included.
*
* @see \ref MEChargedCurrentDISInterfaces "The interfaces"
* defined for MEChargedCurrentDIS.
*/
class MEChargedCurrentDIS: public DISBase {
public:
/**
* The default constructor.
*/
MEChargedCurrentDIS();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$\ell q\to \gamma/Z \to \ell q\f$.
* @param f1 Fermion on lepton line
* @param a1 Anti-fermion on lepton line
* @param f2 Fermion on quark line
* @param a2 Anti-fermion on quark line
* @param lorder The order of particles on the lepton line
* @param qorder The order of particles on the quark line
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double helicityME(vector<SpinorWaveFunction> & f1 ,
vector<SpinorWaveFunction> & f2,
vector<SpinorBarWaveFunction> & a1 ,
vector<SpinorBarWaveFunction> & a2,
bool lorder, bool qorder,
bool me) const;
/**
* Calculate the coefficient A for the correlations in the hard
* radiation
*/
virtual double A(tcPDPtr lin, tcPDPtr lout, tcPDPtr qin, tcPDPtr qout,
Energy2 scale) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEChargedCurrentDIS & operator=(const MEChargedCurrentDIS &);
+ MEChargedCurrentDIS & operator=(const MEChargedCurrentDIS &) = delete;
private:
/**
* Pointer to the vertex for the helicity calculations
*/
AbstractFFVVertexPtr _theFFWVertex;
/**
* The allowed flavours of the incoming quarks
*/
unsigned int _maxflavour;
/**
* Option for the mass of the outgoing quarks
*/
unsigned int _massopt;
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
/**
* Pointers to the intermediates resonances
*/
//@{
/**
* Pointer to the \f$W^+\f$
*/
tcPDPtr _wp;
/**
* Pointer to the \f$W^-\f$
*/
tcPDPtr _wm;
//@}
};
}
#endif /* HERWIG_MEChargedCurrentDIS_H */
diff --git a/MatrixElement/DIS/MENeutralCurrentDIS.h b/MatrixElement/DIS/MENeutralCurrentDIS.h
--- a/MatrixElement/DIS/MENeutralCurrentDIS.h
+++ b/MatrixElement/DIS/MENeutralCurrentDIS.h
@@ -1,266 +1,266 @@
// -*- C++ -*-
#ifndef HERWIG_MENeutralCurrentDIS_H
#define HERWIG_MENeutralCurrentDIS_H
//
// This is the declaration of the MENeutralCurrentDIS class.
//
#include "DISBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MENeutralCurrentDIS class provides the matrix elements for
* neutral current DIS.
*
* For consistency both the incoming and outgoing quarks are assumed to be massless.
*
* @see \ref MENeutralCurrentDISInterfaces "The interfaces"
* defined for MENeutralCurrentDIS.
*/
class MENeutralCurrentDIS: public DISBase {
public:
/**
* The default constructor.
*/
MENeutralCurrentDIS();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$\ell q\to \gamma/Z \to \ell q\f$.
* @param f1 Fermion on lepton line
* @param a1 Anti-fermion on lepton line
* @param f2 Fermion on quark line
* @param a2 Anti-fermion on quark line
* @param lorder The order of particles on the lepton line
* @param qorder The order of particles on the quark line
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double helicityME(vector<SpinorWaveFunction> & f1 ,
vector<SpinorWaveFunction> & f2,
vector<SpinorBarWaveFunction> & a1 ,
vector<SpinorBarWaveFunction> & a2,
bool lorder, bool qorder,
bool me) const;
/**
* Option for treatment of \f$\gamma/Z\f$ terms
*/
inline unsigned int gammaZOption() const {return _gammaZ;}
/**
* Calculate the coefficient A for the correlations in the hard
* radiation
*/
virtual double A(tcPDPtr lin, tcPDPtr lout, tcPDPtr qin, tcPDPtr qout,
Energy2 scale) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MENeutralCurrentDIS & operator=(const MENeutralCurrentDIS &);
+ MENeutralCurrentDIS & operator=(const MENeutralCurrentDIS &) = delete;
private:
/**
* Pointer to the vertices for the helicity calculations
*/
//@{
/**
* Pointer to the Z vertex
*/
AbstractFFVVertexPtr _theFFZVertex;
/**
* Pointer to the photon vertex
*/
AbstractFFVVertexPtr _theFFPVertex;
//@}
/**
* Pointers to the intermediate resonances
*/
//@{
/**
* Pointer to the Z ParticleData object
*/
tcPDPtr _z0;
/**
* Pointer to the photon ParticleData object
*/
tcPDPtr _gamma;
//@}
/**
* Switches to control the particles in the hard process
*/
//@{
/**
* Minimumflavour of the incoming quarks
*/
int _minflavour;
/**
* Maximum flavour of the incoming quarks
*/
int _maxflavour;
/**
* Whether to include both \f$Z^0\f$ and \f$\gamma\f$ or only one
*/
unsigned int _gammaZ;
//@}
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
/**
* Electroweak parameters
*/
//@{
/**
* \f$\sin\theta_W\f$
*/
double _sinW;
/**
* \f$\cos\theta_W\f$
*/
double _cosW;
/**
* The square of the Z mass
*/
Energy2 _mz2;
//@}
};
}
#endif /* HERWIG_MENeutralCurrentDIS_H */
diff --git a/MatrixElement/DIS/Makefile.am b/MatrixElement/DIS/Makefile.am
--- a/MatrixElement/DIS/Makefile.am
+++ b/MatrixElement/DIS/Makefile.am
@@ -1,6 +1,6 @@
pkglib_LTLIBRARIES = HwMEDIS.la
HwMEDIS_la_SOURCES = \
DISBase.h DISBase.cc \
MENeutralCurrentDIS.cc MENeutralCurrentDIS.h \
MEChargedCurrentDIS.cc MEChargedCurrentDIS.h
-HwMEDIS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:1:0
+HwMEDIS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:0:0
diff --git a/MatrixElement/DrellYanBase.h b/MatrixElement/DrellYanBase.h
--- a/MatrixElement/DrellYanBase.h
+++ b/MatrixElement/DrellYanBase.h
@@ -1,315 +1,315 @@
// -*- C++ -*-
#ifndef HERWIG_DrellYanBase_H
#define HERWIG_DrellYanBase_H
//
// This is the declaration of the DrellYanBase class.
//
#include "HwMEBase.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/**
* The DrellYanBase class class provides a base class for the implemented
* of Drell-Yan type processes and provides the matrix element and POWHEG
* style hard corrections
*
* @see \ref DrellYanBaseInterfaces "The interfaces"
* defined for DrellYanBase.
*/
class DrellYanBase: public HwMEBase {
public:
/**
* The default constructor.
*/
DrellYanBase();
/**
* Has a POWHEG style correction
*/
//virtual bool hasPOWHEGCorrection() {return _alpha;}
virtual POWHEGType hasPOWHEGCorrection() {return ISR;}
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return _alpha;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr, double & initial,
double & final) {
final = 1.;
initial = 1.;
}
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction);
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object.
*/
virtual void setKinematics() {
HwMEBase::setKinematics();
mb2_ = sHat();
}
protected:
/**
* Return the momenta and type of hard matrix element correction
* @param quarks The original incoming particles.
* @param beams The BeamParticleData objects
* @param boson The momentum of the original outgoing gauge boson
* @param iemit Whether the first (0) or second (1) particle emitted
* the radiation
* @param itype The type of radiated particle (0 is gluon, 1 is quark
* and 2 is antiquark)
* @param pnew The momenta of the new particles
* @param trans The LorentzRotation from the boson rest frame to the new lab
* @param xnew The new values of the momentuym fractions
* @return Whether or not the matrix element correction needs to be applied
*/
bool applyHard(ParticleVector & quarks,
vector<tcBeamPtr> beams,
Lorentz5Momentum boson,unsigned int & iemit,
unsigned int & itype,vector<Lorentz5Momentum> & pnew,
LorentzRotation & trans, pair<double,double> & xnew,
Energy2 shad);
/**
* Returns the matrix element for a given type of process,
* rapidity of the jet \f$y_j\f$ and transverse momentum \f$p_T\f$
* @param emis_type the type of emission,
* (0 is \f$q\bar{q}\to Vg\f$, 1 is \f$qg\to Vq\f$ and 2 is \f$g\bar{q}\to V\bar{q}\f$)
* @param pt The transverse momentum of the jet
* @param yj The rapidity of the jet
*/
double getResult(int emis_type, Energy pt, double yj);
/**
* generates the hardest emission (yj,p)
* @param pnew The momenta of the new particles
* @param emissiontype The type of emission, as for getResult
* @return Whether not an emission was generated
*/
bool getEvent(vector<Lorentz5Momentum> & pnew,int & emissiontype);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DrellYanBase & operator=(const DrellYanBase &);
+ DrellYanBase & operator=(const DrellYanBase &) = delete;
private:
/**
* Mass squared of the vector boson
*/
Energy2 mb2_;
/**
* Parameters for the old-style ME correction
*/
//@{
/**
* Relative weight for the \f$q\bar{q}\f$ and \f$q/\bar{q}g\f$ channels
*/
double _channelwgtA;
/**
* Relative weight for the \f$qg\f$ and \f$\bar{q}g\f$ channels
*/
double _channelwgtB;
/**
* Weights for the channels as a vector
*/
vector<double> _channelweights;
/**
* Number of weights greater than 1
*/
unsigned int _nover;
/**
* Maximum weight
*/
double _maxwgt;
//@}
/**
* Constants for the sampling. The distribution is assumed to have the
* form \f$\frac{c}{{\rm GeV}}\times\left(\frac{{\rm GeV}}{p_T}\right)^n\f$
*/
//@{
/**
* The power, \f$n\f$, for the sampling
*/
double _power;
/**
* The prefactor, \f$c\f$ for the \f$q\bar{q}\f$ channel
*/
double _preqqbar;
/**
* The prefactor, \f$c\f$ for the \f$qg\f$ channel
*/
double _preqg;
/**
* The prefactor, \f$c\f$ for the \f$g\bar{q}\f$ channel
*/
double _pregqbar;
/**
* The prefactors as a vector for easy use
*/
vector<double> _prefactor;
//@}
/**
* Properties of the incoming particles
*/
//@{
/**
* Pointers to the BeamParticleData objects
*/
vector<tcBeamPtr> _beams;
/**
* Pointers to the ParticleDataObjects for the partons
*/
vector<tcPDPtr> _partons;
//@}
/**
* Properties of the boson and jets
*/
//@{
/**
* The rapidity of the gauge boson
*/
double _yb;
/**
* The mass of the gauge boson
*/
Energy _mass;
/**
* Whether the quark is in the + or - z direction
*/
bool _quarkplus;
/**
* the rapidity of the jet
*/
double _yj;
/**
* The transverse momentum of the jet
*/
Energy _pt;
//@}
/**
* The transverse momentum of the jet
*/
Energy _min_pt;
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr _alpha;
};
}
#endif /* HERWIG_DrellYanBase_H */
diff --git a/MatrixElement/Gamma/MEGammaGamma2WW.h b/MatrixElement/Gamma/MEGammaGamma2WW.h
--- a/MatrixElement/Gamma/MEGammaGamma2WW.h
+++ b/MatrixElement/Gamma/MEGammaGamma2WW.h
@@ -1,197 +1,197 @@
// -*- C++ -*-
#ifndef HERWIG_MEGammaGamma2WW_H
#define HERWIG_MEGammaGamma2WW_H
//
// This is the declaration of the MEGammaGamma2WW class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.fh"
#include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.fh"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEGammaGamma2WW class provides the matrix elements for
* \f$\gamma\gamma\to f \bar{f}\f$.
*
* @see \ref MEGammaGamma2WWInterfaces "The interfaces"
* defined for MEGammaGamma2WW.
*/
class MEGammaGamma2WW : public HwMEBase {
public:
/**
* The default constructor.
*/
MEGammaGamma2WW();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$\gamma\gamma\to q\bar{q}\f$
* @param p1 The wavefunctions for the first incoming photon
* @param p2 The wavefunctions for the second incoming photon
* @param w1 The wavefunctions for the first outgoing W
* @param w2 The wavefunctions for the second outgoing W
* @param calc Whether or not to calculate the matrix element
*/
double helicityME(vector<VectorWaveFunction> & p1,
vector<VectorWaveFunction> & p2,
vector<VectorWaveFunction> & w1,
vector<VectorWaveFunction> & w2, bool calc) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEGammaGamma2WW & operator=(const MEGammaGamma2WW &);
+ MEGammaGamma2WW & operator=(const MEGammaGamma2WW &) = delete;
private:
/**
* Treatment of the the W mass
*/
unsigned int massOption_;
/**
* Pointer to the gammaWW vertex
*/
AbstractVVVVertexPtr WWWVertex_;
/**
* Pointer to the gammagammaWW vertex
*/
AbstractVVVVVertexPtr WWWWVertex_;
/**
* Matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_MEGammaGamma2WW_H */
diff --git a/MatrixElement/Gamma/MEGammaGamma2ff.h b/MatrixElement/Gamma/MEGammaGamma2ff.h
--- a/MatrixElement/Gamma/MEGammaGamma2ff.h
+++ b/MatrixElement/Gamma/MEGammaGamma2ff.h
@@ -1,191 +1,191 @@
// -*- C++ -*-
#ifndef HERWIG_MEGammaGamma2ff_H
#define HERWIG_MEGammaGamma2ff_H
//
// This is the declaration of the MEGammaGamma2ff class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The MEGammaGamma2ff class provides the matrix elements for
* \f$\gamma\gamma\to f \bar{f}\f$.
*
* @see \ref MEGammaGamma2ffInterfaces "The interfaces"
* defined for MEGammaGamma2ff.
*/
class MEGammaGamma2ff: public HwMEBase {
public:
/**
* The default constructor.
*/
MEGammaGamma2ff();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$\gamma\gamma\to q\bar{q}\f$
* @param p1 The wavefunctions for the first incoming photon
* @param p2 The wavefunctions for the second incoming photon
* @param f The wavefunction for the outgoing fermion
* @param fbar The wavefunction for the outgoing antifermion
* @param calc Whether or not to calculate the matrix element
*/
double helicityME(vector<VectorWaveFunction> &p1,vector<VectorWaveFunction> &p2,
vector<SpinorBarWaveFunction> & f,
vector<SpinorWaveFunction> & fbar, bool calc) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEGammaGamma2ff & operator=(const MEGammaGamma2ff &);
+ MEGammaGamma2ff & operator=(const MEGammaGamma2ff &) = delete;
private:
/**
* Which processes to include
*/
int process_;
/**
* Pointer to the photon vertex
*/
AbstractFFVVertexPtr vertex_;
/**
* Matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_MEGammaGamma2ff_H */
diff --git a/MatrixElement/Gamma/MEGammaP2Jets.h b/MatrixElement/Gamma/MEGammaP2Jets.h
--- a/MatrixElement/Gamma/MEGammaP2Jets.h
+++ b/MatrixElement/Gamma/MEGammaP2Jets.h
@@ -1,237 +1,237 @@
// -*- C++ -*-
#ifndef HERWIG_MEGammaP2Jets_H
#define HERWIG_MEGammaP2Jets_H
//
// This is the declaration of the MEGammaP2Jets class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEGammaP2Jets class implements the matrix elements for
* pointlike gamma+hadron -> jets.
*
* @see \ref MEGammaP2JetsInterfaces "The interfaces"
* defined for MEGammaP2Jets.
*/
class MEGammaP2Jets: public HwMEBase {
public:
/**
* The default constructor.
*/
MEGammaP2Jets();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
//@}
protected:
/**
* Members to calculate the matrix elements
*/
//@{
/**
* Matrix element for \f$\gamma g\to q \bar{q}\f$.
* @param gmin Polarization vectors for the incoming photon
* @param glin Polarization vectors for the incoming gluon
* @param fout Spinors for the outgoing quark
* @param aout Spinors for the outgoing antiquark
* @param calc Whether or not to calculate the matrix element for spin correlations
*/
double gammagluonME(vector<VectorWaveFunction> & gmin,
vector<VectorWaveFunction> & glin,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
bool calc) const;
/**
* Matrix element for \f$\gamma q\to g q\f$.
* @param gmin Polarization vectors for the incoming photon
* @param fin Spinors for the incoming quark
* @param gout Polarization vectors for the outgong gluon
* @param fout Spinors for the outgoing quark
* @param calc Whether or not to calculate the matrix element for spin correlations
*/
double gammaquarkME(vector<VectorWaveFunction> & gmin,
vector<SpinorWaveFunction> & fin,
vector<VectorWaveFunction> & gout,
vector<SpinorBarWaveFunction> & fout,
bool calc) const;
/**
* Matrix element for \f$\gamma q\to g q\f$.
* @param gmin Polarization vectors for the incoming photon
* @param fin Spinors for the incoming antiquark
* @param gout Polarization vectors for the outgong gluon
* @param fout Spinors for the outgoing antiquark
* @param calc Whether or not to calculate the matrix element for spin correlations
*/
double gammaantiquarkME(vector<VectorWaveFunction> & gmin,
vector<SpinorBarWaveFunction> & fin,
vector<VectorWaveFunction> & gout,
vector<SpinorWaveFunction> & fout,
bool calc) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEGammaP2Jets & operator=(const MEGammaP2Jets &);
+ MEGammaP2Jets & operator=(const MEGammaP2Jets &) = delete;
private:
/**
* Pointer to the quark-antiquark-gluon vertex
*/
AbstractFFVVertexPtr _gluonvertex;
/**
* Pointer to the quark-antiquark-photon vertex
*/
AbstractFFVVertexPtr _photonvertex;
/**
* Allowed processes
*/
unsigned int _process;
/**
* Minimum flavour
*/
int _minflavour;
/**
* Maximum flavour
*/
int _maxflavour;
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
};
}
#endif /* HERWIG_MEGammaP2Jets_H */
diff --git a/MatrixElement/Gamma/Makefile.am b/MatrixElement/Gamma/Makefile.am
--- a/MatrixElement/Gamma/Makefile.am
+++ b/MatrixElement/Gamma/Makefile.am
@@ -1,10 +1,10 @@
pkglib_LTLIBRARIES = HwMEGammaGamma.la HwMEGammaHadron.la
HwMEGammaGamma_la_SOURCES = \
MEGammaGamma2ff.cc MEGammaGamma2ff.h \
MEGammaGamma2WW.cc MEGammaGamma2WW.h
-HwMEGammaGamma_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
+HwMEGammaGamma_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
HwMEGammaHadron_la_SOURCES = \
MEGammaP2Jets.cc MEGammaP2Jets.h
-HwMEGammaHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
+HwMEGammaHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
diff --git a/MatrixElement/General/GeneralHardME.h b/MatrixElement/General/GeneralHardME.h
--- a/MatrixElement/General/GeneralHardME.h
+++ b/MatrixElement/General/GeneralHardME.h
@@ -1,494 +1,494 @@
// -*- C++ -*-
//
// GeneralHardME.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GeneralHardME_H
#define HERWIG_GeneralHardME_H
//
// This is the declaration of the GeneralHardME class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Utilities/Exception.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Models/General/HPDiagram.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "Herwig/MatrixElement/HardVertex.h"
#include "ThePEG/EventRecord/SpinInfo.h"
#include "ThePEG/PDF/PolarizedBeamParticleData.h"
#include "GeneralHardME.fh"
namespace Herwig {
using namespace ThePEG;
using Helicity::VertexBasePtr;
/**
* This defines the GeneralHardME class that is designed to serve as a
* base class for matrix elements of specific spin structures when those
* structures are created by a a general model, i.e. a SUSY production
* ME. It stores a vector of diagram structures that contain the required
* to calculate the matrix element.
*
* @see HwMEBase
*/
class GeneralHardME: public HwMEBase {
public:
/**
* Convenient typedef for size_type of HPDiagram vector
*/
typedef vector<HPDiagram>::size_type HPCount;
/**
* Enum for the possible colour structures
*/
enum ColourStructure {UNDEFINED,
Colour11to11,Colour11to33bar,Colour11to88,
Colour33to33,Colour33barto11,Colour33barto33bar,
Colour33barto66bar, Colour33barto6bar6,
Colour33to61, Colour3bar3barto6bar1,
Colour33to16, Colour3bar3barto16bar,
Colour38to3bar6, Colour38to63bar,
Colour33barto18,Colour33barto81,Colour33barto88,
Colour38to13,Colour38to31,
Colour38to83,Colour38to38,
Colour3bar3barto3bar3bar,
Colour3bar8to13bar,Colour3bar8to3bar1,
Colour3bar8to83bar,Colour3bar8to3bar8,
Colour88to11,Colour88to33bar,
Colour88to66bar,Colour88to88,
Colour88to18,Colour88to81,
Colour33to13bar,Colour33to3bar1,
Colour33to83bar,Colour33to3bar8,
Colour3bar3barto13,Colour3bar3barto31,
Colour3bar3barto83,Colour3bar3barto38,
Colour38to3bar3bar,Colour3bar8to33};
public:
/**
* The default constructor.
*/
GeneralHardME();
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const = 0;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const {
if(scaleChoice_==0) {
return scaleFactor_*sHat();
}
else if(scaleChoice_==1) {
Energy2 mbar = 0.5*(meMomenta()[2].mass2()+meMomenta()[3].mass2());
Energy2 t = 0.5*(tHat()-mbar);
Energy2 u = 0.5*(uHat()-mbar);
Energy2 s = 0.5*sHat();
return scaleFactor_*4.*s*t*u/(s*s+t*t+u*u);
}
else if(scaleChoice_ ==2) {
Energy2 scale1 = meMomenta()[2].mass2()+meMomenta()[2].perp2();
Energy2 scale2 = meMomenta()[3].mass2()+meMomenta()[3].perp2();
return scaleFactor_*max(scale1,scale2);
}
else assert(false);
}
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex>
diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
//@}
/**
* Set the diagrams and matrix of colour factors.
* @param process vector of MEDiagram with information that
* will allow the diagrams to be created in the specific matrix element
* @param colour The colour structure for the process
* @param debug Whether to compare the numerical answer to an analytical
* formula (This is only stored for certain processes. It is intended
* for quick checks of the matrix elements).
* @param scaleOption The option of what scale to use
* @param scaleFactor The prefactor for the scale
*/
void setProcessInfo(const vector<HPDiagram> & process,
ColourStructure colour, bool debug,
unsigned int scaleOption,
double scaleFactor);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function. This is to be overidden in an inheriting class.
*/
virtual void debug(double ) const {}
protected:
/**
* Access the HPDiagrams that store the required information
* to create the diagrams
*/
const vector<HPDiagram> & getProcessInfo() const {
return diagrams_;
}
/**
* Return the incoming pair
* @return Pair of particle ids for the incoming particles
*/
pair<long, long> getIncoming() const {
return incoming_;
}
/**
* Return the outgoing pair
* @return Pair of particle ids for the outgoing particles
*/
pair<long, long> getOutgoing() const {
return outgoing_;
}
/**
* Return the matrix of colour factors
*/
const vector<DVector> & getColourFactors() const {
return colour_;
}
/**
* Get the number of diagrams in this process
*/
HPCount numberOfDiags() const {
return numberOfDiagrams_;
}
/**
* Access number of colour flows
*/
size_t numberOfFlows() const {
return numberOfFlows_;
}
/**
* Whether to print the debug information
*/
bool debugME() const {
return debug_;
}
/**
* Set/Get Info on the selected diagram and colour flow
*/
//@{
/**
* Colour flow
*/
unsigned int colourFlow() const {return flow_;}
/**
* Colour flow
*/
void colourFlow(unsigned int flow) const {flow_=flow;}
/**
* Diagram
*/
unsigned int diagram() const {return diagram_;}
/**
* Diagram
*/
void diagram(unsigned int diag) const {diagram_=diag;}
//@}
/**
* Calculate weight and select colour flow
*/
double selectColourFlow(vector<double> & flow,
vector<double> & me,double average) const;
/**
* Access to the colour flow matrix element
*/
vector<ProductionMatrixElement> & flowME() const {
return flowME_;
}
/**
* Access to the diagram matrix element
*/
vector<ProductionMatrixElement> & diagramME() const {
return diagramME_;
}
/**
* Access to the colour structure
*/
ColourStructure colour() const {return colourStructure_;}
/**
* Extract the paricles from the subprocess
*/
ParticleVector hardParticles(tSubProPtr subp) {
ParticleVector output(4);
output[0] = subp->incoming().first;
output[1] = subp->incoming().second;
output[2] = subp->outgoing()[0];
output[3] = subp->outgoing()[1];
//ensure particle ordering is the same as it was when
//the diagrams were created
if( output[0]->id() != getIncoming().first )
swap(output[0], output[1]);
if( output[2]->id() != getOutgoing().first )
swap(output[2], output[3]);
// return answer
return output;
}
/**
* Set the rescaled momenta
*/
void setRescaledMomenta(const ParticleVector & external) {
cPDVector data(4);
vector<Lorentz5Momentum> momenta(4);
for( size_t i = 0; i < 4; ++i ) {
data[i] = external[i]->dataPtr();
momenta[i] = external[i]->momentum();
}
rescaleMomenta(momenta, data);
}
/**
* Create the vertes
*/
void createVertex(ProductionMatrixElement & me,
ParticleVector & external) {
HardVertexPtr hardvertex = new_ptr(HardVertex());
hardvertex->ME(me);
for(ParticleVector::size_type i = 0; i < 4; ++i) {
tSpinPtr spin = external[i]->spinInfo();
if(i<2) {
tcPolarizedBeamPDPtr beam =
dynamic_ptr_cast<tcPolarizedBeamPDPtr>(external[i]->dataPtr());
if(beam) spin->rhoMatrix() = beam->rhoMatrix();
}
spin->productionVertex(hardvertex);
}
}
/**
* Initialize the storage of the helicity matrix elements
*/
void initializeMatrixElements(PDT::Spin in1, PDT::Spin in2,
PDT::Spin out1, PDT::Spin out2) {
flowME().resize(numberOfFlows(),
ProductionMatrixElement(in1,in2,out1,out2));
diagramME().resize(numberOfDiags(),
ProductionMatrixElement(in1,in2,out1,out2));
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralHardME & operator=(const GeneralHardME &);
+ GeneralHardME & operator=(const GeneralHardME &) = delete;
private:
/**
* External particles
*/
//@{
/**
* Store incoming particles
*/
pair<long, long> incoming_;
/**
* Store the outgoing particles
*/
pair<long, long> outgoing_;
//@}
/**
* Diagrams
*/
//@{
/**
* Store all diagrams as a vector of structures
*/
vector<HPDiagram> diagrams_;
/**
* Store the number of diagrams for fast retrieval
*/
HPCount numberOfDiagrams_;
//@}
/**
* Colour information
*/
//@{
/**
* The colour structure
*/
ColourStructure colourStructure_;
/**
* Store colour factors for ME calc.
*/
vector<DVector> colour_;
/**
* The number of colourflows.
*/
unsigned int numberOfFlows_;
//@}
/**
* Whether to test the value of me2 against the analytical function
*/
bool debug_;
/**
* The scale chocie
*/
unsigned int scaleChoice_;
/**
* The scale factor
*/
double scaleFactor_;
/**
* Info on the selected diagram and colour flow
*/
//@{
/**
* Colour flow
*/
mutable unsigned int flow_;
/**
* Diagram
*/
mutable unsigned int diagram_;
//@}
/**
* Storage of the matrix elements
*/
//@{
/**
* Matrix elements for the different colour flows
*/
mutable vector<ProductionMatrixElement> flowME_;
/**
* Matrix elements for the different Feynman diagrams
*/
mutable vector<ProductionMatrixElement> diagramME_;
//@}
};
/** Exception class to indicate a problem has occurred with setting
up to matrix element.*/
class MEException : public Exception {};
}
#endif /* HERWIG_GeneralHardME_H */
diff --git a/MatrixElement/General/GeneralQQHiggs.h b/MatrixElement/General/GeneralQQHiggs.h
--- a/MatrixElement/General/GeneralQQHiggs.h
+++ b/MatrixElement/General/GeneralQQHiggs.h
@@ -1,363 +1,363 @@
// -*- C++ -*-
#ifndef HERWIG_GeneralQQHiggs_H
#define HERWIG_GeneralQQHiggs_H
//
// This is the declaration of the GeneralQQHiggs class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "GeneralQQHiggs.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The GeneralQQHiggs class implements the matrix elements for
* \f$gg\to Q \bar Q h^0\f$ and \f$q\bar q\to Q \bar Q h^0\f$.
*
* @see \ref GeneralQQHiggsInterfaces "The interfaces"
* defined for GeneralQQHiggs.
*/
class GeneralQQHiggs: public HwMEBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
GeneralQQHiggs();
//@}
/**
* Initialisation if used in a general model
*/
/**
* Set up the matrix element
*/
void setProcessInfo(unsigned int quark, PDPtr higgs,
AbstractFFSVertexPtr vertex,
unsigned int shapeOpt,
unsigned int proc);
public:
/** @name Virtual functions required by the HwMEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
protected:
/**
* Members to calculate the matrix elements
*/
//@{
/**
* Matrix element for \f$gg\to Q\bar{Q}h^0\f$
* @param g1 The wavefunctions for the first incoming gluon
* @param g2 The wavefunctions for the second incoming gluon
* @param q The wavefunction for the outgoing quark
* @param qbar The wavefunction for the outgoing antiquark
* @param h The wavefunction for the outgoing Higgs boson
* @param flow The colour flow
*/
double ggME(vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
vector<SpinorBarWaveFunction> & q,vector<SpinorWaveFunction> & qbar,
ScalarWaveFunction & h,
unsigned int flow) const;
/**
* Matrix element for \f$q\bar{q}\to Q\bar{Q}h^0\f$
* @param q1 The wavefunction for the incoming quark
* @param q2 The wavefunction for the incoming antiquark
* @param q3 The wavefunction for the outgoing quark
* @param q4 The wavefunction for the outgoing antiquark
* @param h The wavefunction for the outgoing Higgs boson
* @param flow The colour flow
*/
double qqME(vector<SpinorWaveFunction> & q1,
vector<SpinorBarWaveFunction> & q2,
vector<SpinorBarWaveFunction> & q3,
vector<SpinorWaveFunction> & q4,
ScalarWaveFunction & h,
unsigned int flow) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralQQHiggs & operator=(const GeneralQQHiggs &);
+ GeneralQQHiggs & operator=(const GeneralQQHiggs &) = delete;
private:
/**
* Switches to control the subprocess
*/
//@{
/**
* Quark Flavour
*/
unsigned int quarkFlavour_;
/**
* Processes to include
*/
unsigned int process_;
//@}
/**
* Switches etc for the Higgs mass generation
*/
//@{
/**
* Defines the Higgs resonance shape
*/
unsigned int shapeOpt_;
/**
* On-shell mass for the higgs
*/
Energy mh_;
/**
* On-shell width for the higgs
*/
Energy wh_;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr hmass_;
//@}
/**
* Vertices needed to compute the diagrams
*/
//@{
/**
* \f$ggg\f$ vertex
*/
AbstractVVVVertexPtr GGGVertex_;
/**
* \f$q\bar{q}g\f$ vertex
*/
AbstractFFVVertexPtr QQGVertex_;
/**
* \f$q\bar q h^0\f$ vertex
*/
AbstractFFSVertexPtr QQHVertex_;
//@}
/**
* ParticleData objects of the particles
*/
//@{
/**
* The gluon
*/
PDPtr gluon_;
/**
* The Higgs boson
*/
PDPtr higgs_;
/**
* the quarks
*/
vector<PDPtr> quark_;
/**
* the antiquarks
*/
vector<PDPtr> antiquark_;
//@}
/**
* Parameters for the phase-space generation
*/
//@{
/**
* Power for the phase-space mapping
*/
double alpha_;
//@}
/**
* Colour flow
*/
mutable unsigned int flow_;
/**
* Diagram
*/
mutable unsigned int diagram_;
/**
* Matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_GeneralQQHiggs_H */
diff --git a/MatrixElement/General/GeneralfftoVH.h b/MatrixElement/General/GeneralfftoVH.h
--- a/MatrixElement/General/GeneralfftoVH.h
+++ b/MatrixElement/General/GeneralfftoVH.h
@@ -1,114 +1,114 @@
// -*- C++ -*-
#ifndef HERWIG_GeneralfftoVH_H
#define HERWIG_GeneralfftoVH_H
//
// This is the declaration of the GeneralfftoVH class.
//
#include "Herwig/MatrixElement/MEfftoVH.h"
#include "GeneralfftoVH.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the GeneralfftoVH class.
*
* @see \ref GeneralfftoVHInterfaces "The interfaces"
* defined for GeneralfftoVH.
*/
class GeneralfftoVH: public MEfftoVH {
public:
/**
* Type of process
*/
enum Process {Lepton,HadronWplus,HadronWminus,HadronZ};
public:
/**
* The default constructor.
*/
GeneralfftoVH();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
//@}
/**
* Set up the matrix element
*/
void setProcessInfo(Process proc, PDPtr higgs,
AbstractVVSVertexPtr vertex,
unsigned int shapeOpt);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralfftoVH & operator=(const GeneralfftoVH &);
+ GeneralfftoVH & operator=(const GeneralfftoVH &) = delete;
private:
/**
* The vector boson
*/
Process process_;
};
}
#endif /* HERWIG_GeneralfftoVH_H */
diff --git a/MatrixElement/General/GeneralfftoffH.h b/MatrixElement/General/GeneralfftoffH.h
--- a/MatrixElement/General/GeneralfftoffH.h
+++ b/MatrixElement/General/GeneralfftoffH.h
@@ -1,115 +1,115 @@
// -*- C++ -*-
#ifndef HERWIG_GeneralfftoffH_H
#define HERWIG_GeneralfftoffH_H
//
// This is the declaration of the GeneralfftoffH class.
//
#include "Herwig/MatrixElement/MEfftoffH.h"
#include "GeneralfftoffH.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the GeneralfftoffH class.
*
* @see \ref GeneralfftoffHInterfaces "The interfaces"
* defined for GeneralfftoffH.
*/
class GeneralfftoffH: public MEfftoffH {
public:
/**
* Type of process
*/
enum Process {Lepton,Hadron};
public:
/**
* The default constructor.
*/
GeneralfftoffH();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
//@}
/**
* Set up the matrix element
*/
void setProcessInfo(Process proc, PDPtr higgs,
AbstractVVSVertexPtr vertex,
unsigned int shapeOpt,
unsigned int process);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralfftoffH & operator=(const GeneralfftoffH &);
+ GeneralfftoffH & operator=(const GeneralfftoffH &) = delete;
private:
/**
* The type of process
*/
Process _proc;
};
}
#endif /* HERWIG_GeneralfftoffH_H */
diff --git a/MatrixElement/General/MEff2ff.h b/MatrixElement/General/MEff2ff.h
--- a/MatrixElement/General/MEff2ff.h
+++ b/MatrixElement/General/MEff2ff.h
@@ -1,220 +1,220 @@
// -*- C++ -*-
//
// MEff2ff.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEff2ff_H
#define HERWIG_MEff2ff_H
//
// This is the declaration of the MEff2ff class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFFFVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SpinorWaveFunction;
using Helicity::SpinorBarWaveFunction;
/**
* This is the implementation of the \f$ 2\to 2\f$ matrix element for
* a \f$ \Psi \Psi \to \Psi \Psi\f$ process. It inherits from
* GeneralHardME and implements the appropriate virtual functions.
*
* @see GeneralHardME
*/
class MEff2ff: public GeneralHardME {
public:
/** Vector of SpinorWaveFunctions. */
typedef vector<SpinorWaveFunction> SpinorVector;
/** Vector of SpinorBarWaveFunctions. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
private:
/** @name Functions to compute the ProductionMatrixElement. */
//@{
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\Psi\bar{\Psi}\f$
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2ffbHeME(double & me2, bool first) const;
/**
* Compute the matrix element for \f$\Psi\Psi\to\Psi\Psi\f$
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement ff2ffHeME(double & me2, bool first) const;
/**
* Compute the matrix element for
* \f$\bar{\Psi}\bar{\Psi}\to\bar{\Psi}\bar{\Psi}\f$
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement fbfb2fbfbHeME(double & me2, bool first) const;
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\lambda\lambda\f$
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2mfmfHeME(double & me2, bool first) const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEff2ff & operator=(const MEff2ff &);
+ MEff2ff & operator=(const MEff2ff &) = delete;
private:
/**
* Store the vector of FFSVertex pairs
*/
vector<pair<AbstractFFSVertexPtr, AbstractFFSVertexPtr> > scalar_;
/**
* Store the vector of FFVVertex pairs
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > vector_;
/**
* Store the vector of FFTVertex pairs
*/
vector<pair<AbstractFFTVertexPtr, AbstractFFTVertexPtr> > tensor_;
/**
* Store any 4-point vertices
*/
vector<AbstractFFFFVertexPtr> four_;
/**
* Spinors
*/
mutable std::array<SpinorVector,4> spin_;
/**
* Barred spinors
*/
mutable std::array<SpinorBarVector,4> sbar_;
};
}
#endif /* HERWIG_MEff2ff_H */
diff --git a/MatrixElement/General/MEff2rf.h b/MatrixElement/General/MEff2rf.h
--- a/MatrixElement/General/MEff2rf.h
+++ b/MatrixElement/General/MEff2rf.h
@@ -1,219 +1,219 @@
// -*- C++ -*-
#ifndef Herwig_MEff2rf_H
#define Herwig_MEff2rf_H
//
// This is the declaration of the MEff2rf class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorBarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SpinorWaveFunction;
using Helicity::SpinorBarWaveFunction;
using Helicity::RSSpinorWaveFunction;
using Helicity::RSSpinorBarWaveFunction;
/**
* This is the implementation of the \f$ 2\to 2\f$ matrix element for
* a fermion-fermion to fermion RS fermion process. It inherits from
* GeneralHardME and implements the appropriate virtual functions.
*
* @see GeneralHardME
*/
class MEff2rf: public GeneralHardME {
public:
/** Vector of SpinorWaveFunctions. */
typedef vector<SpinorWaveFunction> SpinorVector;
/** Vector of SpinorBarWaveFunctions. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/** Vector of RSSpinorWaveFunctions. */
typedef vector<RSSpinorWaveFunction> RSSpinorVector;
/** Vector of RSSpinorBarWaveFunctions. */
typedef vector<RSSpinorBarWaveFunction> RSSpinorBarVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
private:
/** @name Functions to compute the ProductionMatrixElement. */
//@{
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\Psi\bar{\Psi}\f$
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2rfbHeME(double & me2, bool first) const;
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\Psi\bar{\Psi}\f$
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2rbfHeME(double & me2, bool first) const;
/**
* Compute the matrix element for \f$\Psi\Psi\to\Psi\Psi\f$
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement ff2rfHeME(double & me2, bool first) const;
/**
* Compute the matrix element for
* \f$\bar{\Psi}\bar{\Psi}\to\bar{\Psi}\bar{\Psi}\f$
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement fbfb2rbfbHeME(double & me2, bool first) const;
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\lambda\lambda\f$
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2mfmfHeME(double & me2, bool first) const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEff2rf & operator=(const MEff2rf &);
+ MEff2rf & operator=(const MEff2rf &) = delete;
private:
/**
* Store the vector of FFSVertex pairs
*/
vector<pair<AbstractFFSVertexPtr, AbstractRFSVertexPtr> > scalar_;
/**
* Store the vector of FFVVertex pairs
*/
vector<pair<AbstractFFVVertexPtr, AbstractRFVVertexPtr> > vector_;
/**
* Spinors
*/
mutable std::array<SpinorVector,3> spin_;
/**
* Barred spinors
*/
mutable std::array<SpinorBarVector,3> sbar_;
mutable RSSpinorVector rs_;
mutable RSSpinorBarVector rsbar_;
};
}
#endif /* Herwig_MEff2rf_H */
diff --git a/MatrixElement/General/MEff2ss.h b/MatrixElement/General/MEff2ss.h
--- a/MatrixElement/General/MEff2ss.h
+++ b/MatrixElement/General/MEff2ss.h
@@ -1,201 +1,201 @@
// -*- C++ -*-
//
// MEff2ss.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEff2ss_H
#define HERWIG_MEff2ss_H
//
// This is the declaration of the MEff2ss class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSSVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::SpinorWaveFunction;
using ThePEG::Helicity::SpinorBarWaveFunction;
using ThePEG::Helicity::ScalarWaveFunction;
/**
* The MEff2ss class is designed to implement the matrix element for a
* fermion-antifermion to scalar-scalar hard process. It inherits from
* GeneralHardME and implements the appropriate virtual functions for this
* specific spin combination.
*
* @see GeneralHardME
*/
class MEff2ss: public GeneralHardME {
public:
/** Vector of SpinorWaveFunctions objects */
typedef vector<SpinorWaveFunction> SpinorVector;
/** Vector of SpinorBarWaveFunction objects. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEff2ss & operator=(const MEff2ss &);
+ MEff2ss & operator=(const MEff2ss &) = delete;
private:
/**
* Calculate the matrix element
* @param sp A vector of SpinorWaveFunction objects
* @param sbar A vector of SpinorBarWaveFunction objects
* @param sca1 A ScalarWaveFunction for an outgoing scalar
* @param sca2 A ScalarWaveFunction for the other outgoing scalar
* @param me2 The spin averaged matrix element
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
*/
ProductionMatrixElement ff2ssME(const SpinorVector & sp,
const SpinorBarVector & sbar,
const ScalarWaveFunction & sca1,
const ScalarWaveFunction & sca2,
double & me2, bool first) const;
private:
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* vector
*/
vector<pair<AbstractFFSVertexPtr, AbstractSSSVertexPtr> > scalar_;
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* fermion
*/
vector<pair<AbstractFFSVertexPtr, AbstractFFSVertexPtr> > fermion_;
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* vector
*/
vector<pair<AbstractFFVVertexPtr, AbstractVSSVertexPtr> > vector_;
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* fermion
*/
vector<pair<AbstractRFSVertexPtr, AbstractRFSVertexPtr> > RSfermion_;
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* tensor
*/
vector<pair<AbstractFFTVertexPtr, AbstractSSTVertexPtr> > tensor_;
/**
* Storage for dynamically cast 4 point vertices
*/
vector<AbstractFFSSVertexPtr> fourPoint_;
};
}
#endif /* HERWIG_MEff2ss_H */
diff --git a/MatrixElement/General/MEff2ts.h b/MatrixElement/General/MEff2ts.h
--- a/MatrixElement/General/MEff2ts.h
+++ b/MatrixElement/General/MEff2ts.h
@@ -1,180 +1,180 @@
// -*- C++ -*-
#ifndef HERWIG_MEff2ts_H
#define HERWIG_MEff2ts_H
//
// This is the declaration of the MEff2ts class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSTVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SpinorWaveFunction;
using Helicity::SpinorBarWaveFunction;
using Helicity::ScalarWaveFunction;
using Helicity::TensorWaveFunction;
/**
* The MEff2ts class implements the general matrix element for fermion fermion -> tensor scalar
*
*/
class MEff2ts: public GeneralHardME {
public:
/** @name Typedefs */
//@{
/**
* A vector of SpinorWaveFunctions
*/
typedef vector<SpinorWaveFunction> SpinorVector;
/**
* A vector of SpinorWaveBarFunctions
*/
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/**
* A vector of VectorWaveFunctions
*/
typedef vector<TensorWaveFunction> TBVector;
//@}
public:
/**
* The default constructor.
*/
MEff2ts() : fermion_(0), scalar_(0), fourPoint_(0) {}
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEff2ts & operator=(const MEff2ts &);
+ MEff2ts & operator=(const MEff2ts &) = delete;
private:
/** @name Functions to compute the ProductionMatrixElement. */
//@{
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\Psi\bar{\Psi}\f$
* @param sp Spinors for first incoming particle
* @param spbar SpinorBar Wavefunctions for second incoming particle
* @param sca ScalarWaveFunction for outgoing scalar
* @param ten Outgoing TensorWaveFunction
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2tsHeME(SpinorVector & sp, SpinorBarVector & spbar,
TBVector & ten, ScalarWaveFunction & sca,
double & me2,bool first) const;
//@}
private:
/**
* Store a pair of FFTVertex and FFVVertex pointers
*/
vector<pair<AbstractFFTVertexPtr, AbstractFFSVertexPtr> > fermion_;
/**
* Store a pair of FFTVertex and VVTVertex pointers
*/
vector<pair<AbstractFFSVertexPtr, AbstractSSTVertexPtr> > scalar_;
/**
* The four point vertex
*/
vector<AbstractFFSTVertexPtr> fourPoint_;
};
}
#endif /* HERWIG_MEff2ts_H */
diff --git a/MatrixElement/General/MEff2tv.h b/MatrixElement/General/MEff2tv.h
--- a/MatrixElement/General/MEff2tv.h
+++ b/MatrixElement/General/MEff2tv.h
@@ -1,193 +1,193 @@
// -*- C++ -*-
#ifndef HERWIG_MEff2tv_H
#define HERWIG_MEff2tv_H
//
// This is the declaration of the MEff2tv class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVTVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SpinorWaveFunction;
using Helicity::SpinorBarWaveFunction;
using Helicity::VectorWaveFunction;
using Helicity::TensorWaveFunction;
/**
* The documentation of the MEff2tv class implements the general matrix element for
* vector vectro to tensor vector
*
*/
class MEff2tv: public GeneralHardME {
public:
/** @name Typedefs */
//@{
/**
* A vector of SpinorWaveFunctions
*/
typedef vector<SpinorWaveFunction> SpinorVector;
/**
* A vector of SpinorWaveBarFunctions
*/
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/**
* A vector of VectorWaveFunctions
*/
typedef vector<VectorWaveFunction> VBVector;
/**
* A vector of VectorWaveFunctions
*/
typedef vector<TensorWaveFunction> TBVector;
//@}
public:
/**
* The default constructor.
*/
MEff2tv() : fermion_(0), vector_(0), fourPoint_(0) {}
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEff2tv & operator=(const MEff2tv &);
+ MEff2tv & operator=(const MEff2tv &) = delete;
private:
/** @name Functions to compute the ProductionMatrixElement. */
//@{
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\Psi\bar{\Psi}\f$
* @param sp Spinors for first incoming particle
* @param spbar SpinorBar Wavefunctions for second incoming particle
* @param vec VectorWaveFunctions for outgoing vector
* @param ten Outgoing TensorWaveFunction
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2tvHeME(SpinorVector & sp, SpinorBarVector & spbar,
TBVector & ten, VBVector & vec,
double & me2,bool first) const;
//@}
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
private:
/**
* Store a pair of FFTVertex and FFVVertex pointers
*/
vector<pair<AbstractFFTVertexPtr, AbstractFFVVertexPtr> > fermion_;
/**
* Store a pair of FFTVertex and VVTVertex pointers
*/
vector<pair<AbstractFFVVertexPtr, AbstractVVTVertexPtr> > vector_;
/**
* The four point vertex
*/
vector<AbstractFFVTVertexPtr> fourPoint_;
};
}
#endif /* HERWIG_MEff2tv_H */
diff --git a/MatrixElement/General/MEff2vs.h b/MatrixElement/General/MEff2vs.h
--- a/MatrixElement/General/MEff2vs.h
+++ b/MatrixElement/General/MEff2vs.h
@@ -1,205 +1,205 @@
// -*- C++ -*-
//
// MEff2vs.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEff2vs_H
#define HERWIG_MEff2vs_H
//
// This is the declaration of the MEff2vs class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVSVertex.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SpinorWaveFunction;
using Helicity::SpinorBarWaveFunction;
using Helicity::VectorWaveFunction;
using Helicity::ScalarWaveFunction;
/**
* The MEff2vs class is designed to implement the matrix element for a
* fermion-antifermion to vector-scalar hard process. It inherits from
* GeneralHardME and implements the appropriate virtual functions for this
* specific spin combination.
*
* @see \ref MEff2vsInterfaces "The interfaces"
* defined for MEff2vs.
* @see GeneralHardME
*/
class MEff2vs: public GeneralHardME {
public:
/** @name Typedefs */
//@{
/**
* A vector of SpinorWaveFunctions
*/
typedef vector<SpinorWaveFunction> SpinorVector;
/**
* A vector of SpinorWaveBarFunctions
*/
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/**
* A vector of VectorWaveFunctions
*/
typedef vector<VectorWaveFunction> VBVector;
//@}
public:
/**
* The default constructor.
*/
MEff2vs() : scalar_(0), vector_(0), fermion_(0) {}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEff2vs & operator=(const MEff2vs &);
+ MEff2vs & operator=(const MEff2vs &) = delete;
private:
/** @name Functions to compute the ProductionMatrixElement. */
//@{
/**
* Compute the matrix element for \f$\Psi\bar{\Psi}\to\Psi\bar{\Psi}\f$
* @param sp Spinors for first incoming particle
* @param spbar SpinorBar Wavefunctions for second incoming particle
* @param vec VectorWaveFunctions for outgoing vector
* @param sca Outgoing ScalarWaveFunction
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
ffb2vsHeME(SpinorVector & sp, SpinorBarVector & spbar,
VBVector & vec, ScalarWaveFunction & sca,
double & me2,bool first) const;
//@}
private:
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* scalar
*/
vector<pair<AbstractFFSVertexPtr, AbstractVSSVertexPtr> > scalar_;
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* vector
*/
vector<pair<AbstractFFVVertexPtr, AbstractVVSVertexPtr> > vector_;
/**
* Storage for dynamically cast vertices for a diagram with intermediate
* fermion
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFSVertexPtr> > fermion_;
/**
* Four point vertices
*/
vector<AbstractFFVSVertexPtr> four_;
};
}
#endif /* HERWIG_MEff2vs_H */
diff --git a/MatrixElement/General/MEff2vv.h b/MatrixElement/General/MEff2vv.h
--- a/MatrixElement/General/MEff2vv.h
+++ b/MatrixElement/General/MEff2vv.h
@@ -1,198 +1,198 @@
// -*- C++ -*-
//
// MEff2vv.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEff2vv_H
#define HERWIG_MEff2vv_H
//
// This is the declaration of the MEff2vv class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::SpinorWaveFunction;
using ThePEG::Helicity::SpinorBarWaveFunction;
using ThePEG::Helicity::VectorWaveFunction;
/**
* This class implements the matrix element calculation for a generic
* \f$\Psi \Psi \rightarrow V^{\mu} V^{\nu}\f$ process.
*
* @see \ref MEff2vvInterfaces "The interfaces"
* defined for MEff2vv.
*/
class MEff2vv: public GeneralHardME {
public:
/** Vector of SpinorWaveFunctions objects */
typedef vector<SpinorWaveFunction> SpinorVector;
/** Vector of SpinorBarWaveFunction objects. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/** Vector of VectorWaveFunction objects. */
typedef vector<VectorWaveFunction> VBVector;
public:
/**
* The default constructor.
*/
MEff2vv() : vector_(0), tensor_(0), scalar_(0) {}
/** @name Virtual functions required by the GeneralHardME class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
private:
/**
* Compute the production matrix element.
* @param sp Spinors for first incoming fermion
* @param sbar SpinorBar Wavefunctions for incoming anti-fermion
* @param v1 A vector of VectorWaveFunction objects for the first vector
* @param m1 Whether v1 is massless or not
* @param v2 A vector of VectorWaveFunction objects for the second vector
* @param m2 Whether v2 is massless or not
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
ProductionMatrixElement
ff2vvME(const SpinorVector & sp, const SpinorBarVector sbar,
const VBVector & v1, bool m1, const VBVector & v2, bool m2,
double & me2, bool first) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEff2vv & operator=(const MEff2vv &);
+ MEff2vv & operator=(const MEff2vv &) = delete;
private:
/**
* Storage for a dynamically cast vertices for a tchannel vector
* intermediate
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > fermion_;
/**
* Storage for a dynamically cast vertices for a schannel vector
* intermediate
*/
vector<pair<AbstractFFVVertexPtr, AbstractVVVVertexPtr> > vector_;
/**
* Storage for a dynamically cast vertices for a schannel scalar
* intermediate
*/
vector<pair<AbstractFFTVertexPtr, AbstractVVTVertexPtr> > tensor_;
/**
* Storage for a dynamically cast vertices for a schannel scalar
* intermediate for massless external vector bosons
*/
vector<pair<AbstractFFSVertexPtr, AbstractVVSVertexPtr> > scalar_;
};
}
#endif /* HERWIG_MEff2vv_H */
diff --git a/MatrixElement/General/MEfv2fs.h b/MatrixElement/General/MEfv2fs.h
--- a/MatrixElement/General/MEfv2fs.h
+++ b/MatrixElement/General/MEfv2fs.h
@@ -1,214 +1,214 @@
// -*- C++ -*-
//
// MEfv2fs.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEfv2fs_H
#define HERWIG_MEfv2fs_H
//
// This is the declaration of the MEfv2fs class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVSVertex.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::SpinorWaveFunction;
using ThePEG::Helicity::SpinorBarWaveFunction;
using ThePEG::Helicity::VectorWaveFunction;
using ThePEG::Helicity::ScalarWaveFunction;
/**
* This class is designed to implement the matrix element for
* fermion-vector to fermion scalar. It inherits from GeneralHardME
* and implements the required virtual functions.
*
* @see GeneralHardME
*/
class MEfv2fs: public GeneralHardME {
/** Vector of SpinorWaveFunctions. */
typedef vector<SpinorWaveFunction> SpinorVector;
/** Vector of SpinorBarWaveFunctions. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/** Vector of VectorWaveFunctions. */
typedef vector<VectorWaveFunction> VecWFVector;
public:
/** @name Virtual functions required by the GeneralHardME class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param subp Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr subp);
private:
/** @name Functions to calculate production matrix elements and me2. */
//@{
/**
* Calculate me2 and the production matrix element for the normal mode.
* @param spIn Vector of SpinorWaveFunction for the incoming fermion
* @param vecIn Vector of VectorWaveFunction for incoming boson
* @param spbOut Vector of SpinorBarWaveFunction for outgoing fermion
* @param scaOut ScalarWaveFunction for outgoing scalar.
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param full_me The value of me2 calculation
*/
ProductionMatrixElement fv2fbsHeME(const SpinorVector & spIn,
const VecWFVector & vecIn,
const SpinorBarVector & spbOut,
const ScalarWaveFunction & scaOut,
double & full_me, bool first) const;
/**
* Calculate me2 and the production matrix element for the cc mode.
* @param spbIn Vector of SpinorBarWaveFunction for the incoming fermion
* @param vecIn Vector of VectorWaveFunction for incoming boson
* @param spOut Vector of SpinorWaveFunction for outgoing fermion
* @param scaOut ScalarWaveFunction for outgoing scalar.
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param full_me The value of me2 calculation
*/
ProductionMatrixElement fbv2fsHeME(const SpinorBarVector & spbIn,
const VecWFVector & vecIn,
const SpinorVector & spOut,
const ScalarWaveFunction & scaOut,
double & full_me, bool first) const;
//@}
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEfv2fs & operator=(const MEfv2fs &);
+ MEfv2fs & operator=(const MEfv2fs &) = delete;
private:
/**
* Store a pair of FFSVertex and VSSVertex pointers
*/
vector<pair<AbstractFFSVertexPtr, AbstractVSSVertexPtr> > scalar_;
/**
* Store a pair of FFSVertex and FFVVertex pointers
*/
vector<pair<AbstractFFSVertexPtr, AbstractFFVVertexPtr> > fermion_;
/**
* Store a pair of VVSVertex and FFVVertex pointers
*/
vector<pair<AbstractFFVVertexPtr,AbstractVVSVertexPtr> > vector_;
/**
* Store a pair of FFSVertex and FFVVertex pointers
*/
vector<pair<AbstractRFSVertexPtr, AbstractRFVVertexPtr> > RSfermion_;
/**
* Store any 4-point vertices
*/
vector<AbstractFFVSVertexPtr> four_;
};
}
#endif /* HERWIG_MEfv2fs_H */
diff --git a/MatrixElement/General/MEfv2rs.h b/MatrixElement/General/MEfv2rs.h
--- a/MatrixElement/General/MEfv2rs.h
+++ b/MatrixElement/General/MEfv2rs.h
@@ -1,204 +1,204 @@
// -*- C++ -*-
#ifndef Herwig_MEfv2rs_H
#define Herwig_MEfv2rs_H
//
// This is the declaration of the MEfv2rs class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class is designed to implement the matrix element for
* fermion-vector to RS fermion scalar. It inherits from GeneralHardME
* and implements the required virtual functions.
*
* @see GeneralHardME
*/
class MEfv2rs: public GeneralHardME {
/** Vector of SpinorWaveFunctions. */
typedef vector<SpinorWaveFunction> SpinorVector;
/** Vector of SpinorBarWaveFunctions. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/** Vector of RSSpinorWaveFunctions. */
typedef vector<RSSpinorWaveFunction> RSSpinorVector;
/** Vector of RSSpinorBarWaveFunctions. */
typedef vector<RSSpinorBarWaveFunction> RSSpinorBarVector;
/** Vector of VectorWaveFunctions. */
typedef vector<VectorWaveFunction> VecWFVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param subp Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr subp);
private:
/** @name Functions to calculate production matrix elements and me2. */
//@{
/**
* Calculate me2 and the production matrix element for the normal mode.
* @param spIn Vector of SpinorWaveFunction for the incoming fermion
* @param vecIn Vector of VectorWaveFunction for incoming boson
* @param spbOut Vector of SpinorBarWaveFunction for outgoing fermion
* @param scaOut ScalarWaveFunction for outgoing scalar.
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param full_me The value of me2 calculation
*/
ProductionMatrixElement fv2rbsHeME(const SpinorVector & spIn,
const VecWFVector & vecIn,
const RSSpinorBarVector & spbOut,
const ScalarWaveFunction & scaOut,
double & full_me, bool first) const;
/**
* Calculate me2 and the production matrix element for the cc mode.
* @param spbIn Vector of SpinorBarWaveFunction for the incoming fermion
* @param vecIn Vector of VectorWaveFunction for incoming boson
* @param spOut Vector of SpinorWaveFunction for outgoing fermion
* @param scaOut ScalarWaveFunction for outgoing scalar.
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param full_me The value of me2 calculation
*/
ProductionMatrixElement fbv2rsHeME(const SpinorBarVector & spbIn,
const VecWFVector & vecIn,
const RSSpinorVector & spOut,
const ScalarWaveFunction & scaOut,
double & full_me, bool first) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEfv2rs & operator=(const MEfv2rs &);
+ MEfv2rs & operator=(const MEfv2rs &) = delete;
private:
/**
* Store a pair of FFSVertex and VSSVertex pointers
*/
vector<pair<AbstractRFSVertexPtr, AbstractVSSVertexPtr> > scalar_;
/**
* Store a pair of FFSVertex and FFVVertex pointers
*/
vector<pair<AbstractFFVVertexPtr, AbstractRFSVertexPtr> > fermion1_;
/**
* Store a pair of FFSVertex and FFVVertex pointers
*/
vector<pair<AbstractFFSVertexPtr, AbstractRFVVertexPtr> > fermion2_;
/**
* Store a pair of VVSVertex and FFVVertex pointers
*/
vector<pair<AbstractRFVVertexPtr,AbstractVVSVertexPtr> > vector_;
/**
* Store the 4-point vertices
*/
vector<AbstractRFVSVertexPtr> four_;
};
}
#endif /* Herwig_MEfv2rs_H */
diff --git a/MatrixElement/General/MEfv2rv.h b/MatrixElement/General/MEfv2rv.h
--- a/MatrixElement/General/MEfv2rv.h
+++ b/MatrixElement/General/MEfv2rv.h
@@ -1,197 +1,197 @@
// -*- C++ -*-
#ifndef Herwig_MEfv2rv_H
#define Herwig_MEfv2rv_H
//
// This is the declaration of the MEfv2rv class.
//
#include "GeneralHardME.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorBarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the matrix element for a fermion and a vector
* boson to a vector boson and a RS fermion. It inherits from GeneralHardME
* and implements the appropriate virtual functions.
*
* @see GeneralHardME
*
*/
class MEfv2rv: public GeneralHardME {
public:
/** A vector of SpinorWaveFunctions. */
typedef vector<Helicity::SpinorWaveFunction> SpinorVector;
/** A vector of SpinorBarWaveFunctions. */
typedef vector<Helicity::SpinorBarWaveFunction> SpinorBarVector;
/** A vector of SpinorWaveFunctions. */
typedef vector<Helicity::RSSpinorWaveFunction> RSSpinorVector;
/** A vector of SpinorBarWaveFunctions. */
typedef vector<Helicity::RSSpinorBarWaveFunction> RSSpinorBarVector;
/** A vector of VectorWaveFunctions. */
typedef vector<Helicity::VectorWaveFunction> VBVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
private:
/** @name Functions to calculate the Helicity MatrixElement.*/
//@{
/**
* Calculate the matrix element for an incoming fermion
* @param spIn A vector of spinors for the incoming fermion
* @param vecIn A vector of VectorWaveFunctions for the incoming boson
* @param spbOut A vector of SpinorBarWaveFunctions for the outgoing fermion
* @param vecOut A vector of VectorWaveFunctions for the outgoing boson
* @param mc If the outgoing vector is massless or not
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param mesq The matrix element squared
*/
ProductionMatrixElement
fv2rvHeME(const SpinorVector & spIn, const VBVector & vecIn,
const RSSpinorBarVector & spbOut,
const VBVector & vecOut, bool mc,
double & mesq, bool first) const;
/**
* Calculate the matrix element for an incoming anti-fermion
* @param spbIn A vector of SpinorBarWaveFunctions for the incoming anti-fermion
* @param vecIn A vector of VectorWaveFunctions for the incoming boson
* @param spOut A vector of Spinors for the outgoing antifermion
* @param vecOut A vector of VectorWaveFunctions for the outgoing boson
* @param mc If the outgoing vector is massless or not
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param mesq The matrix element squared
*/
ProductionMatrixElement
fbv2rbvHeME(const SpinorBarVector & spbIn, const VBVector & vecIn,
const RSSpinorVector & spOut,
const VBVector & vecOut, bool mc,
double & mesq, bool first) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEfv2rv & operator=(const MEfv2rv &);
+ MEfv2rv & operator=(const MEfv2rv &) = delete;
private:
/** @name Store dynamically casted vertices. */
//@{
/**
* A pair off FFVVertex pointers
*/
vector<pair<AbstractFFVVertexPtr, AbstractRFVVertexPtr> > fermion_;
/**
* A pair of FFVVertex, VVVertex pointers
*/
vector<pair<AbstractRFVVertexPtr, AbstractVVVVertexPtr> > vector_;
/**
* Four point vertices
*/
vector<AbstractRFVVVertexPtr> four_;
//@}
};
}
#endif /* Herwig_MEfv2rv_H */
diff --git a/MatrixElement/General/MEfv2tf.h b/MatrixElement/General/MEfv2tf.h
--- a/MatrixElement/General/MEfv2tf.h
+++ b/MatrixElement/General/MEfv2tf.h
@@ -1,196 +1,196 @@
// -*- C++ -*-
#ifndef HERWIG_MEfv2tf_H
#define HERWIG_MEfv2tf_H
//
// This is the declaration of the MEfv2tf class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVTVertex.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::SpinorWaveFunction;
using ThePEG::Helicity::SpinorBarWaveFunction;
using ThePEG::Helicity::VectorWaveFunction;
using ThePEG::Helicity::TensorWaveFunction;
/**
* Here is the documentation of the MEfv2tf class.
*
* @see \ref MEfv2tfInterfaces "The interfaces"
* defined for MEfv2tf.
*/
class MEfv2tf: public GeneralHardME {
/** Vector of SpinorWaveFunctions. */
typedef vector<SpinorWaveFunction> SpinorVector;
/** Vector of SpinorBarWaveFunctions. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/** Vector of VectorWaveFunctions. */
typedef vector<VectorWaveFunction> VBVector;
/** Vector of TensorWaveFunctions. */
typedef vector<TensorWaveFunction> TBVector;
public:
/**
* The default constructor.
*/
MEfv2tf() : fermion_(0), vector_(0), fourPoint_(0) {}
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
void doinit();
//@}
private:
/** @name Functions to calculate production matrix elements and me2. */
//@{
/**
* Calculate me2 and the production matrix element for the normal mode.
* @param spIn Vector of SpinorWaveFunction for the incoming fermion
* @param vecIn Vector of VectorWaveFunction for incoming boson
* @param spbOut Vector of SpinorBarWaveFunction for outgoing fermion
* @param tenOut TensorWaveFunction for outgoing tensor.
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param full_me The value of me2 calculation
*/
ProductionMatrixElement fv2tfHeME(const SpinorVector & spIn,
const VBVector & vecIn,
const TBVector & tenOut,
const SpinorBarVector & spbOut,
double & full_me, bool first) const;
/**
* Calculate me2 and the production matrix element for the cc mode.
* @param spbIn Vector of SpinorBarWaveFunction for the incoming fermion
* @param vecIn Vector of VectorWaveFunction for incoming boson
* @param spOut Vector of SpinorWaveFunction for outgoing fermion
* @param tenOut TensorWaveFunction for outgoing tensor.
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param full_me The value of me2 calculation
*/
ProductionMatrixElement fbv2tfbHeME(const SpinorBarVector & spbIn,
const VBVector & vecIn,
const TBVector & tenOut,
const SpinorVector & spOut,
double & full_me, bool first) const;
//@}
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEfv2tf & operator=(const MEfv2tf &);
+ MEfv2tf & operator=(const MEfv2tf &) = delete;
private:
/**
* Store a pair of FFTVertex and FFVVertex pointers
*/
vector<pair<AbstractFFTVertexPtr, AbstractFFVVertexPtr> > fermion_;
/**
* Store a pair of FFTVertex and VVTVertex pointers
*/
vector<pair<AbstractFFVVertexPtr, AbstractVVTVertexPtr> > vector_;
/**
* The four point vertex
*/
vector<AbstractFFVTVertexPtr> fourPoint_;
};
}
#endif /* HERWIG_MEfv2tf_H */
diff --git a/MatrixElement/General/MEfv2vf.h b/MatrixElement/General/MEfv2vf.h
--- a/MatrixElement/General/MEfv2vf.h
+++ b/MatrixElement/General/MEfv2vf.h
@@ -1,204 +1,204 @@
// -*- C++ -*-
//
// MEfv2vf.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEfv2vf_H
#define HERWIG_MEfv2vf_H
//
// This is the declaration of the MEfv2vf class.
//
#include "GeneralHardME.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the matrix element for a fermion and a vector
* boson to a fermion and a vector boson. It inherits from GeneralHardME
* and implements the appropriate virtual functions.
*
* @see GeneralHardME
*
*/
class MEfv2vf: public GeneralHardME {
public:
/** A vector of SpinorWaveFunctions. */
typedef vector<Helicity::SpinorWaveFunction> SpinorVector;
/** A vector of SpinorBarWaveFunctions. */
typedef vector<Helicity::SpinorBarWaveFunction> SpinorBarVector;
/** A vector of VectorWaveFunctions. */
typedef vector<Helicity::VectorWaveFunction> VBVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
private:
/** @name Functions to calculate the Helicity MatrixElement.*/
//@{
/**
* Calculate the matrix element for an incoming fermion
* @param spIn A vector of spinors for the incoming fermion
* @param vecIn A vector of VectorWaveFunctions for the incoming boson
* @param spbOut A vector of SpinorBarWaveFunctions for the outgoing fermion
* @param vecOut A vector of VectorWaveFunctions for the outgoing boson
* @param mc If the outgoing vector is massless or not
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param mesq The matrix element squared
*/
ProductionMatrixElement
fv2vfHeME(const SpinorVector & spIn, const VBVector & vecIn,
const VBVector & vecOut, bool mc,
const SpinorBarVector & spbOut,
double & mesq, bool first) const;
/**
* Calculate the matrix element for an incoming anti-fermion
* @param spbIn A vector of SpinorBarWaveFunctions for the incoming anti-fermion
* @param vecIn A vector of VectorWaveFunctions for the incoming boson
* @param spOut A vector of Spinors for the outgoing antifermion
* @param vecOut A vector of VectorWaveFunctions for the outgoing boson
* @param mc If the outgoing vector is massless or not
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param mesq The matrix element squared
*/
ProductionMatrixElement
fbv2vfbHeME(const SpinorBarVector & spbIn, const VBVector & vecIn,
const VBVector & vecOut, bool mc,
const SpinorVector & spOut,
double & mesq, bool first) const;
//@}
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEfv2vf & operator=(const MEfv2vf &);
+ MEfv2vf & operator=(const MEfv2vf &) = delete;
private:
/** @name Store dynamically casted vertices. */
//@{
/**
* A pair off FFVVertex pointers
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > fermion_;
/**
* A pair of FFVVertex, VVVertex pointers
*/
vector<pair<AbstractFFVVertexPtr, AbstractVVVVertexPtr> > vector_;
/**
* Four point vertices
*/
vector<AbstractFFVVVertexPtr> four_;
//@}
};
}
#endif /* HERWIG_MEfv2vf_H */
diff --git a/MatrixElement/General/MEvv2ff.h b/MatrixElement/General/MEvv2ff.h
--- a/MatrixElement/General/MEvv2ff.h
+++ b/MatrixElement/General/MEvv2ff.h
@@ -1,198 +1,198 @@
// -*- C++ -*-
//
// MEvv2ff.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEvv2ff_H
#define HERWIG_MEvv2ff_H
//
// This is the declaration of the MEvv2ff class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVVertex.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::SpinorWaveFunction;
using ThePEG::Helicity::SpinorBarWaveFunction;
using ThePEG::Helicity::VectorWaveFunction;
/**
* This class is designed to implement the matrix element for the
* \f$2 \rightarrow 2\f$ process vector-vector to fermion-antifermion pair. It
* inherits from GeneralHardME and implements the me2() virtual function.
*
* @see GeneralHardME
*
*/
class MEvv2ff: public GeneralHardME {
public:
/** A Vector of VectorWaveFunction objects. */
typedef vector<VectorWaveFunction> VBVector;
/** A vector of SpinorBarWaveFunction objects. */
typedef vector<SpinorWaveFunction> SpinorVector;
/** A vector of SpinorBarWaveFunction objects. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
private:
/**
* Calculate the value of the matrix element
*/
ProductionMatrixElement vv2ffME(const VBVector & v1, const VBVector & v2,
const SpinorBarVector & sbar,
const SpinorVector & sp,
double & me2, bool first) const;
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEvv2ff & operator=(const MEvv2ff &);
+ MEvv2ff & operator=(const MEvv2ff &) = delete;
private:
/** @name Dynamically casted vertices. */
//@{
/**
* Intermediate scalar
*/
vector<pair<AbstractVVSVertexPtr, AbstractFFSVertexPtr > > scalar_;
/**
* Intermediate fermion
*/
vector<pair<AbstractFFVVertexPtr, AbstractFFVVertexPtr> > fermion_;
/**
* Intermediate vector
*/
vector<pair<AbstractVVVVertexPtr, AbstractFFVVertexPtr> > vector_;
/**
* Intermediate RS fermion
*/
vector<pair<AbstractRFVVertexPtr, AbstractRFVVertexPtr> > RSfermion_;
/**
* Intermediate tensor
*/
vector<pair<AbstractVVTVertexPtr, AbstractFFTVertexPtr> > tensor_;
/**
* Four point vertices
*/
vector<AbstractFFVVVertexPtr> four_;
//@}
};
}
#endif /* HERWIG_MEvv2ff_H */
diff --git a/MatrixElement/General/MEvv2rf.h b/MatrixElement/General/MEvv2rf.h
--- a/MatrixElement/General/MEvv2rf.h
+++ b/MatrixElement/General/MEvv2rf.h
@@ -1,182 +1,182 @@
// -*- C++ -*-
#ifndef Herwig_MEvv2rf_H
#define Herwig_MEvv2rf_H
//
// This is the declaration of the MEvv2rf class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVVertex.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/RSSpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class is designed to implement the matrix element for the
* \f$2 \rightarrow 2\f$ process vector-vector to fermion- RS fermion. It
* inherits from GeneralHardME and implements the me2() virtual function.
*
* @see GeneralHardME
*
*/
class MEvv2rf: public GeneralHardME {
public:
/** A Vector of VectorWaveFunction objects. */
typedef vector<VectorWaveFunction> VBVector;
/** A vector of SpinorBarWaveFunction objects. */
typedef vector<SpinorWaveFunction> SpinorVector;
/** A vector of SpinorBarWaveFunction objects. */
typedef vector<SpinorBarWaveFunction> SpinorBarVector;
/** A vector of SpinorBarWaveFunction objects. */
typedef vector<RSSpinorWaveFunction> RSSpinorVector;
/** A vector of SpinorBarWaveFunction objects. */
typedef vector<RSSpinorBarWaveFunction> RSSpinorBarVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Calculate the value of the matrix element
*/
ProductionMatrixElement vv2rfME(const VBVector & v1, const VBVector & v2,
const RSSpinorBarVector & sbar,
const SpinorVector & sp,
double & me2, bool first) const;
/**
* Calculate the value of the matrix element
*/
ProductionMatrixElement vv2frME(const VBVector & v1, const VBVector & v2,
const SpinorBarVector & sbar,
const RSSpinorVector & sp,
double & me2, bool first) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEvv2rf & operator=(const MEvv2rf &);
+ MEvv2rf & operator=(const MEvv2rf &) = delete;
private:
/** @name Dynamically casted vertices. */
//@{
/**
* Intermediate scalar
*/
vector<pair<AbstractVVSVertexPtr, AbstractRFSVertexPtr > > scalar_;
/**
* Intermediate fermion
*/
vector<pair<AbstractRFVVertexPtr, AbstractFFVVertexPtr> > fermion_;
/**
* Intermediate vector
*/
vector<pair<AbstractVVVVertexPtr, AbstractRFVVertexPtr> > vector_;
/**
* Four point vertices
*/
vector<AbstractRFVVVertexPtr> four_;
//@}
};
}
#endif /* Herwig_MEvv2rf_H */
diff --git a/MatrixElement/General/MEvv2ss.h b/MatrixElement/General/MEvv2ss.h
--- a/MatrixElement/General/MEvv2ss.h
+++ b/MatrixElement/General/MEvv2ss.h
@@ -1,199 +1,199 @@
// -*- C++ -*-
//
// MEvv2ss.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEvv2ss_H
#define HERWIG_MEvv2ss_H
//
// This is the declaration of the MEvv2ss class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSSVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::VectorWaveFunction;
using ThePEG::Helicity::ScalarWaveFunction;
/**
* This is the implementation of the matrix element for the process
* vector-vector to scalar-scalar. It inherits from GeneralHardME and
* implements the required virtual functions.
*
* @see \ref MEff2ffInterfaces "The Interfaces"
* defined for MEff2ff.
* @see GeneralHardME
*/
class MEvv2ss: public GeneralHardME {
public:
/** A vector of VectorWaveFunction objects*/
typedef vector<VectorWaveFunction> VBVector;
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Set the Hardvertex for the spin correlations
* @param sub
*/
virtual void constructVertex(tSubProPtr sub);
private:
/**
* Calculate the matrix element.
* @param v1 A vector of VectorWaveFunction objects for the first boson
* @param v2 A vector of VectorWaveFunction objects for the second boson
* @param sca1 A ScalarWaveFunction for the first outgoing
* @param sca2 A ScalarWaveFunction for the second outgoing
* @param me2 The value of the spin-summed matrix element squared
* (to be calculated)
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
*/
ProductionMatrixElement vv2ssME(const VBVector & v1, const VBVector & v2,
const ScalarWaveFunction & sca1,
const ScalarWaveFunction & sca2,
double & me2, bool first) const;
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEvv2ss & operator=(const MEvv2ss &);
+ MEvv2ss & operator=(const MEvv2ss &) = delete;
private:
/** @name The dynamically casted vertices. */
//@{
/**
* Intermediate s-channel scalar
*/
vector<pair<AbstractVVSVertexPtr, AbstractSSSVertexPtr> > scalar1_;
/**
* Intermediate t-channel scalar
*/
vector<pair<AbstractVSSVertexPtr, AbstractVSSVertexPtr> > scalar2_;
/**
* Intermediate t-channel scalar
*/
vector<pair<AbstractVVSVertexPtr, AbstractVVSVertexPtr> > scalar3_;
/**
* Intermediate s-channel vector
*/
vector<pair<AbstractVVVVertexPtr, AbstractVSSVertexPtr> > vector_;
/**
* Intermediate s-channel tensor
*/
vector<pair<AbstractVVTVertexPtr, AbstractSSTVertexPtr> > tensor_;
/**
* The contact vertex
*/
vector<AbstractVVSSVertexPtr> contact_;
//@}
};
}
#endif /* HERWIG_MEvv2ss_H */
diff --git a/MatrixElement/General/MEvv2tv.h b/MatrixElement/General/MEvv2tv.h
--- a/MatrixElement/General/MEvv2tv.h
+++ b/MatrixElement/General/MEvv2tv.h
@@ -1,163 +1,163 @@
// -*- C++ -*-
#ifndef HERWIG_MEvv2tv_H
#define HERWIG_MEvv2tv_H
//
// This is the declaration of the MEvv2tv class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVTVertex.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::VectorWaveFunction;
using ThePEG::Helicity::TensorWaveFunction;
/**
* Here is the documentation of the MEvv2tv class.
*
* @see \ref MEvv2tvInterfaces "The interfaces"
* defined for MEvv2tv.
*/
class MEvv2tv: public GeneralHardME {
/** Vector of VectorWaveFunctions. */
typedef vector<VectorWaveFunction> VBVector;
/** Vector of TensorWaveFunctions. */
typedef vector<TensorWaveFunction> TBVector;
public:
/**
* The default constructor.
*/
MEvv2tv() : vector_(0), fourPoint_(0) {}
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
void doinit();
//@}
private:
/** @name Functions to calculate production matrix elements and me2. */
//@{
/**
* Calculate me2 and the production matrix element for the normal mode.
* @param vec1 Vector of VectorWaveFunction for the 1st incoming boson
* @param vec2 Vector of VectorWaveFunction for the 2nd incoming boson
* @param ten TensorWaveFunction for outgoing tensor.
* @param vec3 Vector of VectorWaveFunction for the outgoing boson
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @param full_me The value of me2 calculation
*/
ProductionMatrixElement vv2tvHeME(const VBVector & vec1,
const VBVector & vec2,
const TBVector & ten,
const VBVector & vec3,
double & full_me, bool first) const;
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEvv2tv & operator=(const MEvv2tv &);
+ MEvv2tv & operator=(const MEvv2tv &) = delete;
private:
/**
* Store a pair of FFTVertex and FFVVertex pointers
*/
vector<pair<AbstractVVVVertexPtr, AbstractVVTVertexPtr> > vector_;
/**
* The four point vertex
*/
vector<AbstractVVVTVertexPtr> fourPoint_;
};
}
#endif /* HERWIG_MEvv2tv_H */
diff --git a/MatrixElement/General/MEvv2vs.h b/MatrixElement/General/MEvv2vs.h
--- a/MatrixElement/General/MEvv2vs.h
+++ b/MatrixElement/General/MEvv2vs.h
@@ -1,163 +1,163 @@
// -*- C++ -*-
#ifndef HERWIG_MEvv2vs_H
#define HERWIG_MEvv2vs_H
//
// This is the declaration of the MEvv2vs class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVSVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VectorWaveFunction;
using Helicity::ScalarWaveFunction;
/**
* This is the implementation of the matrix element for
* \f$2\to 2\f$ massless vector-boson pair to a vector and scalar boson.
* It inherits from GeneralHardME and implements the appropriate virtual
* member functions.
*
* @see \ref MEvv2vsInterfaces "The interfaces"
* defined for MEvv2vs.
*/
class MEvv2vs: public GeneralHardME {
public:
/**
* Typedef for VectorWaveFunction
*/
typedef vector<VectorWaveFunction> VBVector;
public:
/** @name Virtual functions required by the GeneralHardME class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
private:
/**
* Compute the matrix element for \f$V\, V\to V\, V\f$
* @param vin1 VectorWaveFunctions for first incoming particle
* @param vin2 VectorWaveFunctions for second incoming particle
* @param vout1 VectorWaveFunctions for first outgoing particle
* @param mc Whether vout1 is massless or not
* @param sout2 ScalarWaveFunction for outgoing particle
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
vv2vsHeME(VBVector & vin1, VBVector & vin2,
VBVector & vout1, bool mc, ScalarWaveFunction & sout2,
double & me2, bool first ) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEvv2vs & operator=(const MEvv2vs &);
+ MEvv2vs & operator=(const MEvv2vs &) = delete;
private:
/**
* Store the dynamically casted VVSVertex and VSSVertex pointers
*/
vector<pair<AbstractVVSVertexPtr, AbstractVSSVertexPtr> > scalar_;
/**
* Store the dynamically casted VVVVertex and VVSVertex pointers
*/
vector<pair<AbstractVVVVertexPtr, AbstractVVSVertexPtr> > vector_;
/**
* Store the dynamically casted VVVSVertex pointer
*/
vector<AbstractVVVSVertexPtr> four_;
};
}
#endif /* HERWIG_MEvv2vs_H */
diff --git a/MatrixElement/General/MEvv2vv.h b/MatrixElement/General/MEvv2vv.h
--- a/MatrixElement/General/MEvv2vv.h
+++ b/MatrixElement/General/MEvv2vv.h
@@ -1,188 +1,188 @@
// -*- C++ -*-
//
// MEvv2vv.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEvv2vv_H
#define HERWIG_MEvv2vv_H
//
// This is the declaration of the MEvv2vv class.
//
#include "GeneralHardME.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VectorWaveFunction;
/**
* This is the implementation of the matrix element for
* \f$2\to 2\f$ massless vector-boson pair to vector-boson pair. It inherits from
* GeneralHardME and implements the appropriate virtual member functions.
*
* @see \ref MEvv2vvInterfaces "The interfaces"
* defined for MEvv2vv.
*/
class MEvv2vv: public GeneralHardME {
public:
/**
* Typedef for VectorWaveFunction
*/
typedef vector<VectorWaveFunction> VBVector;
public:
/** @name Virtual functions required by the GeneralHardME class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
/**
* Construct the vertex information for the spin correlations
* @param sub Pointer to the relevent SubProcess
*/
virtual void constructVertex(tSubProPtr sub);
private:
/**
* Compute the matrix element for \f$V\, V\to V\, V\f$
* @param vin1 VectorWaveFunctions for first incoming particle
* @param vin2 VectorWaveFunctions for second incoming particle
* @param vout1 VectorWaveFunctions for first outgoing particle
* @param mc Whether vout1 is massless or not
* @param vout2 VectorWaveFunctions for outgoing particle
* @param md Whether vout2 is massless or not
* @param me2 colour averaged, spin summed ME
* @param first Whether or not first call to decide if colour decomposition etc
* should be calculated
* @return ProductionMatrixElement containing results of
* helicity calculations
*/
ProductionMatrixElement
vv2vvHeME(VBVector & vin1, VBVector & vin2,
VBVector & vout1, bool mc, VBVector & vout2, bool md,
double & me2, bool first ) const;
protected:
/**
* A debugging function to test the value of me2 against an
* analytic function.
* @param me2 The value of the \f$ |\bar{\mathcal{M}}|^2 \f$
*/
virtual void debug(double me2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEvv2vv & operator=(const MEvv2vv &);
+ MEvv2vv & operator=(const MEvv2vv &) = delete;
private:
/**
* Store the dynamically casted VVSVertex pointers
*/
vector<pair<AbstractVVSVertexPtr, AbstractVVSVertexPtr> > scalar_;
/**
* Store the dynamically casted VVVVertex pointers
*/
vector<pair<AbstractVVVVertexPtr, AbstractVVVVertexPtr> > vector_;
/**
* Store the dynamically casted VVTVertex pointers
*/
vector<pair<AbstractVVTVertexPtr, AbstractVVTVertexPtr> > tensor_;
/**
* Store the dynamically casted VVVVVertex pointer
*/
vector<AbstractVVVVVertexPtr> four_;
/**
* Four points for colour flows
*/
map<unsigned int,vector<pair<unsigned int,double> > > fourFlow_;
};
}
#endif /* HERWIG_MEvv2vv_H */
diff --git a/MatrixElement/Hadron/MEDiffraction.h b/MatrixElement/Hadron/MEDiffraction.h
--- a/MatrixElement/Hadron/MEDiffraction.h
+++ b/MatrixElement/Hadron/MEDiffraction.h
@@ -1,302 +1,302 @@
// -*- C++ -*-
#ifndef HERWIG_MEDiffraction_H
#define HERWIG_MEDiffraction_H
//
// This is the declaration of the MEDiffraction class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEDiffraction class provides a simple colour singlet exchange matrix element
* to be used in the soft component of the multiple scattering model of the
* underlying event
*
* @see \ref MEDiffractionInterfaces "The interfaces"
* defined for MEDiffraction.
*/
class MEDiffraction: public HwMEBase {
public:
MEDiffraction();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
//@}
/**
* Expect the incoming partons in the laboratory frame
*/
/* virtual bool wantCMS() const { return false; } */
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before a run begins.
*/
virtual void doinitrun();
//@}
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/* The matrix element squared */
double theme2;
/* Use only delta as excited state */
bool deltaOnly;
/* Direction of the excited proton */
unsigned int diffDirection;
/* Number of clusters the dissociated proton decays into */
unsigned int dissociationDecay;
/* The mass of the consitutent quark */
Energy mq() const {return Energy(0.325*GeV);}
/* The mass of the constituent diquark */
Energy mqq() const {return Energy(0.650*GeV);}
/* The proton-pomeron slope */
double theprotonPomeronSlope;
/* The soft pomeron intercept */
double thesoftPomeronIntercept;
/* The soft pomeron slope */
double thesoftPomeronSlope;
/**
* Sample the diffractive mass squared M2 and the momentum transfer t
*/
pair<pair<Energy2,Energy2>,Energy2> diffractiveMassAndMomentumTransfer() const;
/**
* Random value for the diffractive mass squared M2 according to (M2/s0)^(-intercept)
*/
Energy2 randomM2() const;
/**
* Random value for t according to exp(diffSlope*t)
*/
Energy2 randomt(Energy2 M2) const;
/**
* Random value for t according to exp(diffSlope*t) for double diffraction
*/
Energy2 doublediffrandomt(Energy2 M12, Energy2 M22) const;
/**
* Returns the momenta of the two-body decay of momentum pp
*/
pair<Lorentz5Momentum,Lorentz5Momentum> twoBodyDecayMomenta(Lorentz5Momentum pp) const;
/**
* Returns the proton-pomeron slope
*/
InvEnergy2 protonPomeronSlope() const;
/**
* Returns the soft pomeron intercept
*/
double softPomeronIntercept() const;
//M12 and M22 are masses squared of
//outgoing particles
/**
* Returns the minimal possible value of momentum transfer t given the center
* of mass energy and diffractive masses
*/
Energy2 tminfun(Energy2 s, Energy2 M12, Energy2 M22) const;
/**
* Returns the maximal possible value of momentum transfer t given the center
* of mass energy and diffractive masses
*/
Energy2 tmaxfun(Energy2 s , Energy2 M12, Energy2 M22) const;
/**
* Returns the minimal possible value of diffractive mass
*/
//lowest possible mass given the constituent masses of quark and diquark
Energy2 M2min() const{return sqr(getParticleData(2212)->mass()+mq()+mqq());}
/**
* Returns the maximal possible value of diffractive mass
*/
Energy2 M2max() const{
return sqr(generator()->maximumCMEnergy()-getParticleData(2212)->mass());
}//TODO:modify to get proper parameters
InvEnergy2 softPomeronSlope() const;
/* Kallen function */
template<typename A, typename B, typename C>
auto kallen(A a, B b, C c) const -> decltype(a*a)
{
return a*a + b*b + c*c - 2.0*(a*b + b*c + c*a);
}
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEDiffraction & operator=(const MEDiffraction &);
+ MEDiffraction & operator=(const MEDiffraction &) = delete;
bool isInRunPhase;
/* The proton mass */
Energy theProtonMass;
};
}
#endif /* HERWIG_MEDiffraction_H */
diff --git a/MatrixElement/Hadron/MEMinBias.h b/MatrixElement/Hadron/MEMinBias.h
--- a/MatrixElement/Hadron/MEMinBias.h
+++ b/MatrixElement/Hadron/MEMinBias.h
@@ -1,190 +1,190 @@
// -*- C++ -*-
#ifndef HERWIG_MEMinBias_H
#define HERWIG_MEMinBias_H
//
// This is the declaration of the MEMinBias class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEMinBias class provides a simple colour singlet exchange matrix element
* to be used in the soft component of the multiple scattering model of the
* underlying event
*
* @see \ref MEMinBiasInterfaces "The interfaces"
* defined for MEMinBias.
*/
class MEMinBias: public HwMEBase {
public:
/**
* The default constructor.
*/
MEMinBias() : csNorm_(1.) {}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Normalization of the min-bias cross section
*/
double csNorm_;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEMinBias & operator=(const MEMinBias &);
+ MEMinBias & operator=(const MEMinBias &) = delete;
};
}
#endif /* HERWIG_MEMinBias_H */
diff --git a/MatrixElement/Hadron/MEPP2GammaGamma.h b/MatrixElement/Hadron/MEPP2GammaGamma.h
--- a/MatrixElement/Hadron/MEPP2GammaGamma.h
+++ b/MatrixElement/Hadron/MEPP2GammaGamma.h
@@ -1,251 +1,251 @@
// -*- C++ -*-
//
// MEPP2GammaGamma.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEPP2GammaGamma_H
#define HERWIG_MEPP2GammaGamma_H
//
// This is the declaration of the MEPP2GammaGamma class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEPP2GammaGamma class implements the production of photon pairs in
* hadron hadron collisions.
*
* @see \ref MEPP2GammaGammaInterfaces "The interfaces"
* defined for MEPP2GammaGamma.
*/
class MEPP2GammaGamma: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2GammaGamma() : _maxflavour(5),_process(0), scalePreFactor_(1.) {
massOption(vector<unsigned int>(2,0));
}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Members to return the matrix elements for the different subprocesses
*/
//@{
/**
* Matrix element for \f$q\bar{q}\to \gamma\gamma\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param p1 Polarization vectors for the first outgoing photon
* @param p2 Polarization vectors for the second outgoing photon
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qqbarME(vector<SpinorWaveFunction> & fin, vector<SpinorBarWaveFunction> & ain,
vector<VectorWaveFunction> & p1 , vector<VectorWaveFunction> & p2 ,
bool me) const;
/**
* Matrix element for \f$gg \to \gamma\gamma\f$.
* @param g1 Polarization vectors for the first incoming gluon
* @param g2 Polarization vectors for the second incoming gluon
* @param p1 Polarization vectors for the first outgoing photon
* @param p2 Polarization vectors for the second outgoing photon
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double ggME(vector<VectorWaveFunction> & g1 , vector<VectorWaveFunction> & g2 ,
vector<VectorWaveFunction> & p1 , vector<VectorWaveFunction> & p2 ,
bool me) const;
//@}
/**
* \f$gg\to\gamma\gamma\f$ matrix element for the \f$++++\f$ helicity configuration.
* @param s The \f$s\f$ invariant
* @param t The \f$t\f$ invariant
* @param u The \f$u\f$ invariant
*/
Complex ggme(Energy2 s,Energy2 t,Energy2 u) const {
double ltu(log(abs(t/u)));
double frac1((t-u)/s),frac2((sqr(t)+sqr(u))/sqr(s));
double thetatu = (t/u<0) ? 0 : 1;
double thetat = (t<ZERO) ? 0 : 1;
double thetau = (u<ZERO) ? 0 : 1;
using Constants::pi;
return Complex(1.+frac1*ltu+0.5*frac2*(sqr(ltu)+sqr(pi)*thetatu),
-pi*(thetat-thetau)*(frac1+frac2*ltu));
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2GammaGamma & operator=(const MEPP2GammaGamma &);
+ MEPP2GammaGamma & operator=(const MEPP2GammaGamma &) = delete;
private:
/**
* Pointer to the quark-antiquark-photon vertex
*/
AbstractFFVVertexPtr _photonvertex;
/**
* Maximum PDG code of the quarks allowed
*/
unsigned int _maxflavour;
/**
* Option for which processes to include
*/
unsigned int _process;
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
/**
* weights for the different quark annhilation diagrams
*/
mutable double _diagwgt[2];
/**
* Scale prefactor
*/
double scalePreFactor_;
};
}
#endif /* HERWIG_MEPP2GammaGamma_H */
diff --git a/MatrixElement/Hadron/MEPP2GammaJet.h b/MatrixElement/Hadron/MEPP2GammaJet.h
--- a/MatrixElement/Hadron/MEPP2GammaJet.h
+++ b/MatrixElement/Hadron/MEPP2GammaJet.h
@@ -1,263 +1,263 @@
// -*- C++ -*-
//
// MEPP2GammaJet.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEPP2GammaJet_H
#define HERWIG_MEPP2GammaJet_H
//
// This is the declaration of the MEPP2GammaJet class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup MatrixElements
* The MEPP2GammaJet class implements the matrix element for photon+jet
* production in hadron-hadron collisions.
*
* @see \ref MEPP2GammaJetInterfaces "The interfaces"
* defined for MEPP2GammaJet.
*/
class MEPP2GammaJet: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2GammaJet();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* Members to return the matrix elements for the different subprocesses
*/
//@{
/**
* Matrix element for \f$q\bar{q}\to g\gamma\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param gout Polarization vectors for the outgoing gluon
* @param pout Polarization vectors for the outgoing photon
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qqbarME(vector<SpinorWaveFunction> & fin, vector<SpinorBarWaveFunction> & ain,
vector<VectorWaveFunction> & gout, vector<VectorWaveFunction> & pout,
bool me) const;
/**
* Matrix element for \f$qg\to \gamma q\f$.
* @param fin Spinors for incoming quark
* @param gin Polarization vectors for the incoming gluon
* @param pout Polarization vectors for the outgoing photon
* @param fout Spinors for outgoing quark
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qgME(vector<SpinorWaveFunction> & fin,vector<VectorWaveFunction> & gin,
vector<VectorWaveFunction> & pout,vector<SpinorBarWaveFunction> & fout,
bool me) const;
/**
* Matrix element for \f$\bar{q}g\to \gamma \bar{q}\f$.
* @param ain Spinors for the incoming antiquark
* @param gin Polarization vectors for the incoming gluon
* @param pout Polarization vectors for the outgoing photon
* @param aout Spinors for the outgoing antiquark
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qbargME(vector<SpinorBarWaveFunction> & ain, vector<VectorWaveFunction> & gin,
vector<VectorWaveFunction> & pout, vector<SpinorWaveFunction> & aout,
bool me) const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2GammaJet & operator=(const MEPP2GammaJet &);
+ MEPP2GammaJet & operator=(const MEPP2GammaJet &) = delete;
private:
/**
* Pointer to the quark-antiquark-gluon vertex
*/
AbstractFFVVertexPtr _gluonvertex;
/**
* Pointer to the quark-antiquark-photon vertex
*/
AbstractFFVVertexPtr _photonvertex;
/**
* Maximum PDG code of the quarks allowed
*/
int _maxflavour;
/**
* Option for which processes to include
*/
unsigned int _processopt;
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
/**
* Scale prefactor
*/
double scalePreFactor_;
};
}
#endif /* HERWIG_MEPP2GammaJet_H */
diff --git a/MatrixElement/Hadron/MEPP2Higgs.h b/MatrixElement/Hadron/MEPP2Higgs.h
--- a/MatrixElement/Hadron/MEPP2Higgs.h
+++ b/MatrixElement/Hadron/MEPP2Higgs.h
@@ -1,711 +1,711 @@
// -*- C++ -*-
//
// MEPP2Higgs.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEPP2Higgs_H
#define HERWIG_MEPP2Higgs_H
//
// This is the declaration of the MEPP2Higgs class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEPP2Higgs class implements the matrix element for the process
* pp->Higgs with different Higgs shape prescriptions (see details in hep-ph/9505211)
* and the NLL corrected Higgs width (see details in the FORTRAN HERWIG manual).
*
* @see \ref MEPP2HiggsInterfaces "The interfaces"
* defined for MEPP2Higgs.
*/
class MEPP2Higgs: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2Higgs();
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object.
*/
virtual void setKinematics() {
HwMEBase::setKinematics();
mh2_ = sHat();
}
public:
/** @name Member functions for the generation of hard QCD radiation */
//@{
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return ISR;}
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return true;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr, double &,
double & );
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction);
//@}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *> colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
protected:
/**
* Members to calculate the real emission matrix elements
*/
//@{
/**
* The leading-order matrix element for \f$gg\to H\f$
*/
Energy4 loME() const;
/**
* The matrix element for \f$gg\to H g\f$
*/
Energy2 ggME(Energy2 s, Energy2 t, Energy2 u);
/**
* The matrix element for \f$qg\to H q\f$
*/
Energy2 qgME(Energy2 s, Energy2 t, Energy2 u);
/**
* The matrix element for \f$qbarg\to H qbar\f$
*/
Energy2 qbargME(Energy2 s, Energy2 t, Energy2 u);
//@}
/**
* Members to calculate the functions for the loop diagrams
*/
//@{
/**
* The \f$B(s)\f$ function of NBP339 (1990) 38-66
* @param s The scale
* @param mf2 The fermion mass squared.
*/
Complex B(Energy2 s,Energy2 mf2) const;
/**
* The \f$C(s)\f$ function of NBP339 (1990) 38-66
* @param s The scale
* @param mf2 The fermion mass squared.
*/
complex<InvEnergy2> C(Energy2 s,Energy2 mf2) const;
/**
* The \f$C(s)\f$ function of NBP339 (1990) 38-66
* @param s The \f$s\f$ invariant
* @param t The \f$t\f$ invariant
* @param u The \f$u\f$ invariant
* @param mf2 The fermion mass squared
*/
complex<InvEnergy4> D(Energy2 s,Energy2 t, Energy2 u,Energy2 mf2) const;
/**
* The integral \f$\int\frac{dy}{y-y_0}\log(a-i\epsilon-b y(1-y))\f$
* from NBP339 (1990) 38-66.
* @param a The parameter \f$a\f$.
* @param b The parameter \f$b\f$.
* @param y0 The parameter \f$y_0\f$.
*/
Complex dIntegral(Energy2 a, Energy2 b, double y0) const;
/**
* The \f$M_{+++}\f$ matrix element of NBP339 (1990) 38-66.
* @param s The \f$s\f$ invariant
* @param t The \f$t\f$ invariant
* @param u The \f$u\f$ invariant
* @param mf2 The fermion mass squared.
* @param i Which of the stored values to use for \f$D(u,t)\f$.
* @param j Which of the stored values to use for \f$D(u,s)\f$.
* @param k Which of the stored values to use for \f$D(s,t)\f$.
* @param i1 Which of the stored values to use for \f$C_1(s)\f$.
* @param j1 Which of the stored values to use for \f$C_1(t)\f$.
* @param k1 Which of the stored values to use for \f$C_1(u)\f$.
*/
complex<Energy> me1(Energy2 s,Energy2 t,Energy2 u, Energy2 mf2,
unsigned int i,unsigned int j, unsigned int k,
unsigned int i1,unsigned int j1, unsigned int k1) const;
/**
* The \f$M_{++-}\f$ matrix element of NBP339 (1990) 38-66.
* @param s The \f$s\f$ invariant
* @param t The \f$t\f$ invariant
* @param u The \f$u\f$ invariant
* @param mf2 The fermion mass squared.
*/
complex<Energy> me2(Energy2 s,Energy2 t,Energy2 u, Energy2 mf2) const;
/**
* The \f$F(x)\f$ function for the leading-order result
*/
Complex F(double x) const;
//@}
/**
* Method to extract the PDF weight for quark/antiquark
* initiated processes and select the quark flavour
*/
tPDPtr quarkFlavour(tcPDFPtr pdf, Energy2 scale, double x, tcBeamPtr beam,
double & pdfweight, bool anti);
/**
* Return the momenta and type of hard matrix element correction
* @param gluons The original incoming particles.
* @param beams The BeamParticleData objects
* @param higgs The original outgoing higgs
* @param iemit Whether the first (0) or second (1) particle emitted
* the radiation
* @param itype The type of radiated particle (0 is gluon, 1 is quark
* and 2 is antiquark)
* @param pnew The momenta of the new particles
* @param xnew The new values of the momentuym fractions
* @param out The ParticleData object for the outgoing parton
* @return Whether or not the matrix element correction needs to be applied
*/
bool applyHard(ParticleVector gluons,
vector<tcBeamPtr> beams,
PPtr higgs,unsigned int & iemit,
unsigned int & itype,vector<Lorentz5Momentum> & pnew,
pair<double,double> & xnew,
tPDPtr & out);
/**
* generates the hardest emission (yj,p)
* @param pnew The momenta of the new particles
* @param emissiontype The type of emission, as for getResult
* @return Whether not an emission was generated
*/
bool getEvent(vector<Lorentz5Momentum> & pnew,int & emissiontype);
/**
* Returns the matrix element for a given type of process,
* rapidity of the jet \f$y_j\f$ and transverse momentum \f$p_T\f$
* @param emis_type the type of emission,
* (0 is \f$gg\to h^0g\f$, 1 is \f$qg\to h^0q\f$ and 2 is \f$g\bar{q}\to h^0\bar{q}\f$)
* @param pt The transverse momentum of the jet
* @param yj The rapidity of the jet
* @param outParton the outgoing parton
*/
double getResult(int emis_type, Energy pt, double yj,tcPDPtr & outParton);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2Higgs & operator=(const MEPP2Higgs &);
+ MEPP2Higgs & operator=(const MEPP2Higgs &) = delete;
//@}
/**
* Members to return the matrix elements for the different subprocesses
*/
//@{
/**
* Calculates the matrix element for the process g,g->h (via quark loops)
* @param g1 a vector of wave functions of the first incoming gluon
* @param g2 a vector of wave functions of the second incoming gluon
* @param calc Whether or not to calculate the matrix element for spin correlations
* @return the amlitude value.
*/
double ggME(vector<VectorWaveFunction> g1,
vector<VectorWaveFunction> g2,
ScalarWaveFunction &,
bool calc) const;
/**
* Calculates the matrix element for the process q,qbar->h
* @param fin a vector of quark spinors
* @param ain a vector of anti-quark spinors
* @param calc Whether or not to calculate the matrix element for spin correlations
* @return the amlitude value.
*/
double qqME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
ScalarWaveFunction &,
bool calc) const;
//@}
private:
/**
* Selects a dynamic (sHat) or fixed factorization scale
*/
unsigned int scaleopt_;
/**
* The value associated to the fixed factorization scale option
*/
Energy mu_F_;
/**
* Defines the Higgs resonance shape
*/
unsigned int shapeOption_;
/**
* The processes to be included (GG->H and/or qq->H)
*/
unsigned int processOption_;
/**
* Minimum flavour of incoming quarks
*/
int minFlavour_;
/**
* Maximum flavour of incoming quarks
*/
int maxFlavour_;
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement me_;
/**
* Pointer to the H-> 2 gluon vertex (used in gg->H)
*/
AbstractVVSVertexPtr HGGVertex_;
/**
* Pointer to the fermion-fermion Higgs vertex (used in qq->H)
*/
AbstractFFSVertexPtr HFFVertex_;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr hmass_;
/**
* On-shell mass for the higgs
*/
Energy mh_;
/**
* On-shell width for the higgs
*/
Energy wh_;
/**
* Stuff for the ME correction
*/
//@{
/**
* Parameters for the evaluation of the loops for the
* matrix elements
*/
//@{
/**
* Minimum flavour of quarks to include in the loops
*/
unsigned int minLoop_;
/**
* Maximum flavour of quarks to include in the loops
*/
unsigned int maxLoop_;
/**
* Option for treatment of the fermion loops
*/
unsigned int massOption_;
/**
* Option for dynamic scale choice in alpha_S (0=mT,>0=pT)
*/
unsigned int mu_R_opt_;
/**
* Option for dynamic scale choice in PDFs (0=mT,>0=pT)
*/
unsigned int mu_F_opt_;
//@}
//@}
/**
* Small complex number to regularize some integrals
*/
static const complex<Energy2> epsi_;
/**
* Storage of the loop functions
*/
//@{
/**
* B functions
*/
mutable Complex bi_[5];
/**
* C functions
*/
mutable complex<InvEnergy2> ci_[8];
/**
* D functions
*/
mutable complex<InvEnergy4> di_[4];
//@}
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr alpha_;
/**
* Mass squared of Higgs
*/
Energy2 mh2_;
/**
* Relative weight of the \f$qg\f$ to the \f$gg\f$ channel
*/
double channelwgtA_;
/**
* Relative weight for the \f$\bar{q}g\f$ to the \f$gg\f$ channel
*/
double channelwgtB_;
/**
* Weights for the channels as a vector
*/
vector<double> channelWeights_;
/**
* Power for the \f$\frac{{\rm d}\hat{s}}{\hat{s}^n}\f$ importance sampling
* of the \f$gg\f$ component
*/
double ggPow_;
/**
* Power for the \f$\frac{{\rm d}\hat{s}}{\hat{s}^n}\f$ importance sampling
* of the \f$qg\f$ and \f$\bar{q}g\f$ components
*/
double qgPow_;
/**
* The enhancement factor for initial-state radiation
*/
double enhance_;
/**
* Number of weights greater than 1
*/
unsigned int nover_;
/**
* Number of attempts
*/
unsigned int ntry_;
/**
* Number which suceed
*/
unsigned int ngen_;
/**
* Maximum weight
*/
double maxwgt_;
//@}
/**
* Constants for the sampling. The distribution is assumed to have the
* form \f$\frac{c}{{\rm GeV}}\times\left(\frac{{\rm GeV}}{p_T}\right)^n\f$
*/
//@{
/**
* The power, \f$n\f$, for the sampling
*/
double power_;
/**
* The prefactor, \f$c\f$ for the \f$gg\f$ channel
*/
double pregg_;
/**
* The prefactor, \f$c\f$ for the \f$qg\f$ channel
*/
double preqg_;
/**
* The prefactor, \f$c\f$ for the \f$g\bar{q}\f$ channel
*/
double pregqbar_;
/**
* The prefactors as a vector for easy use
*/
vector<double> prefactor_;
//@}
/**
* The transverse momentum of the jet
*/
Energy minpT_;
/**
* Properties of the incoming particles
*/
//@{
/**
* Pointers to the BeamParticleData objects
*/
vector<tcBeamPtr> beams_;
/**
* Pointers to the ParticleDataObjects for the partons
*/
vector<tcPDPtr> partons_;
//@}
/**
* Properties of the boson and jets
*/
//@{
/**
* The rapidity of the Higgs boson
*/
double yh_;
/**
* The mass of the Higgs boson
*/
Energy mass_;
/**
* the rapidity of the jet
*/
double yj_;
/**
* The transverse momentum of the jet
*/
Energy pt_;
/**
* The outgoing parton
*/
tcPDPtr out_;
//@}
/**
* Whether of not to construct the vertex for spin correlations
*/
bool spinCorrelations_;
};
}
#endif /* HERWIG_MEPP2Higgs_H */
diff --git a/MatrixElement/Hadron/MEPP2HiggsJet.cc b/MatrixElement/Hadron/MEPP2HiggsJet.cc
--- a/MatrixElement/Hadron/MEPP2HiggsJet.cc
+++ b/MatrixElement/Hadron/MEPP2HiggsJet.cc
@@ -1,878 +1,877 @@
// -*- C++ -*-
//
// MEPP2HiggsJet.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the MEPP2HiggsJet class.
//
#include "MEPP2HiggsJet.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Utilities/SimplePhaseSpace.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/Cuts/Cuts.h"
#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
#include "Herwig/MatrixElement/HardVertex.h"
#include "Herwig/Utilities/HiggsLoopFunctions.h"
using namespace Herwig;
using namespace Herwig::HiggsLoopFunctions;
IBPtr MEPP2HiggsJet::clone() const {
return new_ptr(*this);
}
IBPtr MEPP2HiggsJet::fullclone() const {
return new_ptr(*this);
}
unsigned int MEPP2HiggsJet::orderInAlphaS() const {
return 3;
}
unsigned int MEPP2HiggsJet::orderInAlphaEW() const {
return 1;
}
void MEPP2HiggsJet::persistentOutput(PersistentOStream & os) const {
os << _shapeopt << _maxflavour << _process << _minloop << _maxloop << _massopt
<< ounit(_mh,GeV) << ounit(_wh,GeV) << _hmass;
}
void MEPP2HiggsJet::persistentInput(PersistentIStream & is, int) {
is >> _shapeopt >> _maxflavour >> _process >> _minloop >> _maxloop >> _massopt
>> iunit(_mh,GeV) >> iunit(_wh,GeV) >> _hmass;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<MEPP2HiggsJet,ME2to2Base>
describeHerwigMEPP2HiggsJet("Herwig::MEPP2HiggsJet", "HwMEHadron.so");
void MEPP2HiggsJet::Init() {
static ClassDocumentation<MEPP2HiggsJet> documentation
("The MEPP2HiggsJet class implements the matrix elements for"
" Higgs+Jet production in hadron-hadron collisions.",
"The theoretical calculations of \\cite{Baur:1989cm} and \\cite{Ellis:1987xu}"
" were used for the Higgs+jet matrix element in hadron-hadron collisions.",
"\\bibitem{Baur:1989cm} U.~Baur and E.~W.~N.~Glover,"
"Nucl.\\ Phys.\\ B {\\bf 339} (1990) 38.\n"
"\\bibitem{Ellis:1987xu} R.~K.~Ellis, I.~Hinchliffe, M.~Soldate and "
"J.~J.~van der Bij, Nucl.\\ Phys.\\ B {\\bf 297} (1988) 221.");
static Parameter<MEPP2HiggsJet,unsigned int> interfaceMaximumFlavour
("MaximumFlavour",
"The maximum flavour of the quarks in the process",
&MEPP2HiggsJet::_maxflavour, 5, 1, 5,
false, false, Interface::limited);
static Switch<MEPP2HiggsJet,unsigned int> interfaceShapeOption
("ShapeScheme",
"Option for the treatment of the Higgs resonance shape",
&MEPP2HiggsJet::_shapeopt, 1, false, false);
static SwitchOption interfaceStandardShapeFixed
(interfaceShapeOption,
"FixedBreitWigner",
"Breit-Wigner s-channel resonanse",
1);
static SwitchOption interfaceStandardShapeRunning
(interfaceShapeOption,
"MassGenerator",
"Use the mass generator to give the shape",
2);
static Switch<MEPP2HiggsJet,unsigned int> interfaceProcess
("Process",
"Which subprocesses to include",
&MEPP2HiggsJet::_process, 0, false, false);
static SwitchOption interfaceProcessAll
(interfaceProcess,
"All",
"Include all subprocesses",
0);
static SwitchOption interfaceProcess1
(interfaceProcess,
"qqbar",
"Only include the incoming q qbar subprocess",
1);
static SwitchOption interfaceProcessqg
(interfaceProcess,
"qg",
"Only include the incoming qg subprocess",
2);
static SwitchOption interfaceProcessqbarg
(interfaceProcess,
"qbarg",
"Only include the incoming qbar g subprocess",
3);
static SwitchOption interfaceProcessgg
(interfaceProcess,
"gg",
"Only include the incoming gg subprocess",
4);
static Parameter<MEPP2HiggsJet,int> interfaceMinimumInLoop
("MinimumInLoop",
"The minimum flavour of the quarks to include in the loops",
&MEPP2HiggsJet::_minloop, 6, 4, 6,
false, false, Interface::limited);
static Parameter<MEPP2HiggsJet,int> interfaceMaximumInLoop
("MaximumInLoop",
"The maximum flavour of the quarks to include in the loops",
&MEPP2HiggsJet::_maxloop, 6, 4, 6,
false, false, Interface::limited);
static Switch<MEPP2HiggsJet,unsigned int> interfaceMassOption
("MassOption",
"Option for the treatment of the masses in the loop diagrams",
&MEPP2HiggsJet::_massopt, 0, false, false);
static SwitchOption interfaceMassOptionFull
(interfaceMassOption,
"Full",
"Include the full mass dependence",
0);
static SwitchOption interfaceMassOptionLarge
(interfaceMassOption,
"Large",
"Use the heavy mass limit",
1);
}
bool MEPP2HiggsJet::generateKinematics(const double * r) {
Energy ptmin = max(lastCuts().minKT(mePartonData()[2]),
lastCuts().minKT(mePartonData()[3]));
Energy e = sqrt(sHat())/2.0;
// generate the mass of the higgs boson
Energy2 mhmax2 = sHat()-4.*ptmin*e;
Energy2 mhmin2 =ZERO;
if(mhmax2<=mhmin2) return false;
double rhomin = atan2((mhmin2-sqr(_mh)), _mh*_wh);
double rhomax = atan2((mhmax2-sqr(_mh)), _mh*_wh);
Energy mh = sqrt(_mh*_wh*tan(rhomin+r[1]*(rhomax-rhomin))+sqr(_mh));
// assign masses
if(mePartonData()[2]->id()!=ParticleID::h0) {
meMomenta()[2].setMass(ZERO);
meMomenta()[3].setMass(mh);
}
else {
meMomenta()[3].setMass(ZERO);
meMomenta()[2].setMass(mh);
}
Energy q = ZERO;
try {
q = SimplePhaseSpace::
getMagnitude(sHat(), meMomenta()[2].mass(), meMomenta()[3].mass());
}
catch ( ImpossibleKinematics & e ) {
return false;
}
Energy2 m22 = meMomenta()[2].mass2();
Energy2 m32 = meMomenta()[3].mass2();
Energy2 e0e2 = 2.0*e*sqrt(sqr(q) + m22);
Energy2 e1e2 = 2.0*e*sqrt(sqr(q) + m22);
Energy2 e0e3 = 2.0*e*sqrt(sqr(q) + m32);
Energy2 e1e3 = 2.0*e*sqrt(sqr(q) + m32);
Energy2 pq = 2.0*e*q;
double ctmin = -1.0,ctmax = 1.0;
Energy2 thmin = lastCuts().minTij(mePartonData()[0], mePartonData()[2]);
if ( thmin > ZERO ) ctmax = min(ctmax, (e0e2 - m22 - thmin)/pq);
thmin = lastCuts().minTij(mePartonData()[1], mePartonData()[2]);
if ( thmin > ZERO ) ctmin = max(ctmin, (thmin + m22 - e1e2)/pq);
thmin = lastCuts().minTij(mePartonData()[1], mePartonData()[3]);
if ( thmin > ZERO ) ctmax = min(ctmax, (e1e3 - m32 - thmin)/pq);
thmin = lastCuts().minTij(mePartonData()[0], mePartonData()[3]);
if ( thmin > ZERO ) ctmin = max(ctmin, (thmin + m32 - e0e3)/pq);
if ( ptmin > ZERO ) {
double ctm = 1.0 - sqr(ptmin/q);
if ( ctm <= 0.0 ) return false;
ctmin = max(ctmin, -sqrt(ctm));
ctmax = min(ctmax, sqrt(ctm));
}
if ( ctmin >= ctmax ) return false;
double cth = getCosTheta(ctmin, ctmax, r);
Energy pt = q*sqrt(1.0-sqr(cth));
phi(rnd(2.0*Constants::pi));
meMomenta()[2].setX(pt*sin(phi()));
meMomenta()[2].setY(pt*cos(phi()));
meMomenta()[2].setZ(q*cth);
meMomenta()[3].setX(-pt*sin(phi()));
meMomenta()[3].setY(-pt*cos(phi()));
meMomenta()[3].setZ(-q*cth);
meMomenta()[2].rescaleEnergy();
meMomenta()[3].rescaleEnergy();
vector<LorentzMomentum> out(2);
out[0] = meMomenta()[2];
out[1] = meMomenta()[3];
tcPDVector tout(2);
tout[0] = mePartonData()[2];
tout[1] = mePartonData()[3];
if ( !lastCuts().passCuts(tout, out, mePartonData()[0], mePartonData()[1]) )
return false;
tHat(pq*cth + m22 - e0e2);
uHat(m22 + m32 - sHat() - tHat());
// main piece
jacobian((pq/sHat())*Constants::pi*jacobian());
// mass piece
jacobian((rhomax-rhomin)*jacobian());
return true;
}
void MEPP2HiggsJet::getDiagrams() const {
tcPDPtr h0=getParticleData(ParticleID::h0);
tcPDPtr g =getParticleData(ParticleID::g);
tcPDPtr q[6],qb[6];
for(int ix=0;ix<int(_maxflavour);++ix) {
q [ix]=getParticleData( ix+1);
qb[ix]=getParticleData(-ix-1);
}
// q qbar -> H g
if(_process==0||_process==1)
{for(unsigned int ix=0;ix<_maxflavour;++ix)
{add(new_ptr((Tree2toNDiagram(2), q[ix], qb[ix], 1, g , 3, h0, 3, g, -1)));}}
// q g -> H g
if(_process==0||_process==2)
{for(unsigned int ix=0;ix<_maxflavour;++ix)
{add(new_ptr((Tree2toNDiagram(3), q[ix], g, g, 2, h0, 1, q[ix], -2)));}}
// qbar g -> H qbar
if(_process==0||_process==3)
{for(unsigned int ix=0;ix<_maxflavour;++ix)
{add(new_ptr((Tree2toNDiagram(3), qb[ix], g, g, 2, h0, 1, qb[ix], -3)));}}
// g g -> H g
if(_process==0||_process==4)
{
// t channel
add(new_ptr((Tree2toNDiagram(3), g, g, g, 1, h0, 2, g, -4)));
// u channel
add(new_ptr((Tree2toNDiagram(3), g, g, g, 2, h0, 1, g, -5)));
// s channel
add(new_ptr((Tree2toNDiagram(2), g, g, 1, g , 3, h0, 3, g, -6)));
}
}
Energy2 MEPP2HiggsJet::scale() const {
return meMomenta()[2].perp2()+ meMomenta()[2].m2();
}
double MEPP2HiggsJet::me2() const {
useMe();
double output(0.);
// g g to H g
if(mePartonData()[0]->id()==ParticleID::g&&mePartonData()[1]->id()==ParticleID::g) {
// order of the particles
unsigned int ih(2),ig(3);
if(mePartonData()[3]->id()==ParticleID::h0){ig=2;ih=3;}
VectorWaveFunction glin1(meMomenta()[ 0],mePartonData()[ 0],incoming);
VectorWaveFunction glin2(meMomenta()[ 1],mePartonData()[ 1],incoming);
ScalarWaveFunction hout(meMomenta()[ih],mePartonData()[ih],outgoing);
VectorWaveFunction glout(meMomenta()[ig],mePartonData()[ig],outgoing);
vector<VectorWaveFunction> g1,g2,g4;
for(unsigned int ix=0;ix<2;++ix) {
glin1.reset(2*ix);g1.push_back(glin1);
glin2.reset(2*ix);g2.push_back(glin2);
glout.reset(2*ix);g4.push_back(glout);
}
// calculate the matrix element
output = ggME(g1,g2,hout,g4,false);
}
// qg -> H q
else if(mePartonData()[0]->id()>0&&mePartonData()[1]->id()==ParticleID::g) {
// order of the particles
unsigned int iq(0),iqb(3),ih(2),ig(1);
if(mePartonData()[0]->id()==ParticleID::g){iq=1;ig=0;}
if(mePartonData()[3]->id()==ParticleID::h0){iqb=2;ih=3;}
// calculate the spinors and polarization vectors
vector<SpinorWaveFunction> fin;
vector<SpinorBarWaveFunction> fout;
vector<VectorWaveFunction> gin;
SpinorWaveFunction qin (meMomenta()[iq ],mePartonData()[iq ],incoming);
VectorWaveFunction glin(meMomenta()[ig ],mePartonData()[ig ],incoming);
ScalarWaveFunction hout(meMomenta()[ih ],mePartonData()[ih ],outgoing);
SpinorBarWaveFunction qout(meMomenta()[iqb],mePartonData()[iqb],outgoing);
for(unsigned int ix=0;ix<2;++ix) {
qin.reset(ix) ; fin.push_back( qin);
qout.reset(ix) ;fout.push_back(qout);
glin.reset(2*ix); gin.push_back(glin);
}
// calculate the matrix element
output = qgME(fin,gin,hout,fout,false);
}
// qbar g -> H q
else if(mePartonData()[0]->id()<0&&mePartonData()[1]->id()==ParticleID::g) {
// order of the particles
unsigned int iq(0),iqb(3),ih(2),ig(1);
if(mePartonData()[0]->id()==ParticleID::g){iq=1;ig=0;}
if(mePartonData()[3]->id()==ParticleID::h0){iqb=2;ih=3;}
// calculate the spinors and polarization vectors
vector<SpinorBarWaveFunction> fin;
vector<SpinorWaveFunction> fout;
vector<VectorWaveFunction> gin;
SpinorBarWaveFunction qin (meMomenta()[iq ],mePartonData()[iq ],incoming);
VectorWaveFunction glin(meMomenta()[ig ],mePartonData()[ig ],incoming);
ScalarWaveFunction hout(meMomenta()[ih ],mePartonData()[ih ],outgoing);
SpinorWaveFunction qout(meMomenta()[iqb],mePartonData()[iqb],outgoing);
for(unsigned int ix=0;ix<2;++ix) {
qin.reset(ix) ; fin.push_back( qin);
qout.reset(ix) ;fout.push_back(qout);
glin.reset(2*ix); gin.push_back(glin);
}
// calculate the matrix element
output = qbargME(fin,gin,hout,fout,false);
}
// q qbar to H g
else if(mePartonData()[0]->id()==-mePartonData()[1]->id()) {
// order of the particles
unsigned int iq(0),iqb(1),ih(2),ig(3);
if(mePartonData()[0]->id()<0){iq=1;iqb=0;}
if(mePartonData()[2]->id()==ParticleID::g){ig=2;ih=3;}
// calculate the spinors and polarization vectors
vector<SpinorWaveFunction> fin;
vector<SpinorBarWaveFunction> ain;
vector<VectorWaveFunction> gout;
SpinorWaveFunction qin (meMomenta()[iq ],mePartonData()[iq ],incoming);
SpinorBarWaveFunction qbin(meMomenta()[iqb],mePartonData()[iqb],incoming);
ScalarWaveFunction hout(meMomenta()[ih ],mePartonData()[ih ],outgoing);
VectorWaveFunction glout(meMomenta()[ig ],mePartonData()[ig ],outgoing);
for(unsigned int ix=0;ix<2;++ix) {
qin.reset(ix) ; fin.push_back( qin);
qbin.reset(ix) ; ain.push_back( qbin);
glout.reset(2*ix);gout.push_back(glout);
}
// calculate the matrix element
output = qqbarME(fin,ain,hout,gout,false);
}
else
throw Exception() << "Unknown subprocess in MEPP2HiggsJet::me2()"
<< Exception::runerror;
// return the answer
return output;
}
double MEPP2HiggsJet::qqbarME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
ScalarWaveFunction & hout,
vector<VectorWaveFunction> & gout,
bool calc) const {
// the particles should be in the order
// for the incoming
// 0 incoming fermion (u spinor)
// 1 incoming antifermion (vbar spinor)
// for the outgoing
// 0 outgoing higgs
// 1 outgoing gluon
// me to be returned
ProductionMatrixElement newme(PDT::Spin1Half,PDT::Spin1Half,
PDT::Spin0,PDT::Spin1);
// get the kinematic invariants
Energy2 s(sHat()),u(uHat()),t(tHat()),mh2(hout.m2()),et(scale());
// calculate the loop function
complex<Energy2> A5 = Energy2();
for ( int ix=_minloop; ix<=_maxloop; ++ix ) {
// full mass dependance
if(_massopt==0) {
Energy2 mf2=sqr(getParticleData(ix)->mass());
A5+= mf2*(4.+4.*double(s/(u+t))*(W1(s,mf2)-W1(mh2,mf2))
+(1.-4.*double(mf2/(u+t)))*(W2(s,mf2)-W2(mh2,mf2)));
}
// infinite mass limit
else {
A5+=2.*(s-mh2)/3.;
}
}
// multiply by the rest of the form factors
using Constants::pi;
double g(sqrt(4.*pi*SM().alphaEM(mh2)/SM().sin2ThetaW()));
double gs(sqrt(4.*pi*SM().alphaS(et)));
Energy mw(getParticleData(ParticleID::Wplus)->mass());
complex<InvEnergy> A5c = A5 * Complex(0.,1.)*g*sqr(gs)*gs/(32.*s*sqr(pi)*mw);
// compute the matrix element
LorentzPolarizationVectorE fcurrent;
complex<Energy2> fdotp;
complex<Energy> epsdot[2];
Complex diag;
Lorentz5Momentum ps(fin[0].momentum()+ain[0].momentum());
ps.rescaleMass();
for(unsigned int ix=0;ix<2;++ix){epsdot[ix]=gout[ix].wave().dot(ps);}
Energy2 denom(-ps*gout[0].momentum());
LorentzSpinorBar<double> atemp;
double output(0.);
for(unsigned int ihel1=0;ihel1<2;++ihel1) {
for(unsigned int ihel2=0;ihel2<2;++ihel2) {
// compute the fermion current
atemp=ain[ihel2].wave();
fcurrent=UnitRemoval::E*fin[ihel1].wave().vectorCurrent(atemp);
fdotp = -(fcurrent.dot(gout[0].momentum()));
for(unsigned int ghel=0;ghel<2;++ghel) {
// calculate the matrix element
- diag=A5c*(fcurrent.dot(gout[ghel].wave())
- -fdotp*epsdot[ghel]/denom);
+ diag = Complex(A5c*(fcurrent.dot(gout[ghel].wave())
+ -fdotp*epsdot[ghel]/denom));
// calculate the matrix element
output+=real(diag*conj(diag));
if(calc) newme(ihel1,ihel2,0,2*ghel)=diag;
}
}
}
// test with glover form
// final colour/spin factors
if(calc) _me.reset(newme);
return output/9.;
}
double MEPP2HiggsJet::qgME(vector<SpinorWaveFunction> & fin,
vector<VectorWaveFunction> & gin,
ScalarWaveFunction & hout,
vector<SpinorBarWaveFunction> & fout,bool calc) const {
// the particles should be in the order
// for the incoming
// 0 incoming fermion (u spinor)
// 1 incoming gluon
// for the outgoing
// 0 outgoing higgs
// 1 outgoing fermion (ubar spinor)
// me to be returned
ProductionMatrixElement newme(PDT::Spin1Half,PDT::Spin1,
PDT::Spin0,PDT::Spin1Half);
// get the kinematic invariants
Energy2 s(sHat()),u(uHat()),t(tHat()),mh2(hout.m2()),et(scale());
// calculate the loop function
complex<Energy2> A5 = Energy2();
for(int ix=_minloop;ix<=_maxloop;++ix) {
if(_massopt==0) {
Energy2 mf2=sqr(getParticleData(ix)->mass());
A5+= mf2*(4.+4.*double(u/(s+t))*(W1(u,mf2)-W1(mh2,mf2))
+(1.-4.*double(mf2/(s+t)))*(W2(u,mf2)-W2(mh2,mf2)));
}
else {
A5+=2.*(u-mh2)/3.;
}
}
// multiply by the rest of the form factors
using Constants::pi;
double g(sqrt(4.*pi*SM().alphaEM(mh2)/SM().sin2ThetaW()));
double gs(sqrt(4.*pi*SM().alphaS(et)));
Energy mw(getParticleData(ParticleID::Wplus)->mass());
complex<InvEnergy> A5c =A5*Complex(0.,1.)*g*sqr(gs)*gs/(32.*u*sqr(pi)*mw);
// compute the matrix element
LorentzPolarizationVectorE fcurrent;
complex<Energy2> fdotp;
complex<Energy> epsdot[2];
Complex diag;
Lorentz5Momentum pu(fin[0].momentum()+fout[0].momentum());
pu.rescaleMass();
for(unsigned int ix=0;ix<2;++ix){epsdot[ix]=gin[ix].wave().dot(pu);}
Energy2 denom(pu*gin[0].momentum());
LorentzSpinorBar<double> atemp;
double output(0.);
for(unsigned int ihel=0;ihel<2;++ihel) {
for(unsigned int ohel=0;ohel<2;++ohel) {
// compute the fermion current
atemp=fout[ohel].wave();
fcurrent=UnitRemoval::E*fin[ihel].wave().vectorCurrent(atemp);
fdotp=fcurrent.dot(gin[0].momentum());
for(unsigned int ghel=0;ghel<2;++ghel) {
// calculate the matrix element
- diag=A5c*(fcurrent.dot(gin[ghel].wave())-fdotp*epsdot[ghel]/denom);
+ diag = Complex(A5c*(fcurrent.dot(gin[ghel].wave())-fdotp*epsdot[ghel]/denom));
// calculate the matrix element
output+=real(diag*conj(diag));
if(calc) newme(ihel,2*ghel,0,ohel)=diag;
}
}
}
// final colour/spin factors
if(calc) _me.reset(newme);
return output/24.;
}
double MEPP2HiggsJet::qbargME(vector<SpinorBarWaveFunction> & fin,
vector<VectorWaveFunction> & gin,
ScalarWaveFunction & hout,
vector<SpinorWaveFunction> & fout,bool calc) const {
// the particles should be in the order
// for the incoming
// 0 incoming antifermion (vbar spinor)
// 1 incoming gluon
// for the outgoing
// 0 outgoing higgs
// 1 outgoing antifermion (v spinor)
// me to be returned
ProductionMatrixElement newme(PDT::Spin1Half,PDT::Spin1,
PDT::Spin0,PDT::Spin1Half);
// get the kinematic invariants
Energy2 s(sHat()),u(uHat()),t(tHat()),mh2(hout.m2()),et(scale());
// calculate the loop function
complex<Energy2> A5 = Energy2();
for(int ix=_minloop;ix<=_maxloop;++ix) {
if(_massopt==0) {
Energy2 mf2=sqr(getParticleData(ix)->mass());
A5+= mf2*(4.+4.*double(u/(s+t))*(W1(u,mf2)-W1(mh2,mf2))
+(1.-4.*double(mf2/(s+t)))*(W2(u,mf2)-W2(mh2,mf2)));
}
else {
A5+=2.*(u-mh2)/3.;
}
}
// multiply by the rest of the form factors
using Constants::pi;
double g(sqrt(4.*pi*SM().alphaEM(mh2)/SM().sin2ThetaW()));
double gs(sqrt(4.*pi*SM().alphaS(et)));
Energy mw(getParticleData(ParticleID::Wplus)->mass());
complex<InvEnergy> A5c = A5*Complex(0.,1.)*g*sqr(gs)*gs/(32.*u*sqr(pi)*mw);
// compute the matrix element
LorentzPolarizationVectorE fcurrent;
complex<Energy2> fdotp;
complex<Energy> epsdot[2];
Complex diag;
Lorentz5Momentum pu(fin[0].momentum()+fout[0].momentum());
pu.rescaleMass();
for(unsigned int ix=0;ix<2;++ix){epsdot[ix]=gin[ix].wave().dot(pu);}
Energy2 denom(pu*gin[0].momentum());
LorentzSpinorBar<double> atemp;
double output(0.);
for(unsigned int ihel=0;ihel<2;++ihel) {
for(unsigned int ohel=0;ohel<2;++ohel) {
// compute the fermion current
atemp=fin[ihel].wave();
fcurrent=UnitRemoval::E*fout[ohel].wave().vectorCurrent(atemp);
fdotp=fcurrent.dot(gin[0].momentum());
for(unsigned int ghel=0;ghel<2;++ghel) {
// calculate the matrix element
- diag=A5c*(fcurrent.dot(gin[ghel].wave())-fdotp*epsdot[ghel]/denom);
+ diag = Complex(A5c*(fcurrent.dot(gin[ghel].wave())-fdotp*epsdot[ghel]/denom));
// calculate the matrix element
output+=real(diag*conj(diag));
if(calc) newme(ihel,2*ghel,0,ohel)=diag;
}
}
}
// final colour/spin factors
if(calc) _me.reset(newme);
return output/24.;
}
Selector<MEBase::DiagramIndex>
MEPP2HiggsJet::diagrams(const DiagramVector & diags) const {
Selector<DiagramIndex> sel;
for ( DiagramIndex i = 0; i < diags.size(); ++i )
{
if(abs(diags[i]->id())<4) sel.insert(1.0, i);
else sel.insert(_diagwgt[abs(diags[i]->id())-4], i);
}
return sel;
}
Selector<const ColourLines *>
MEPP2HiggsJet::colourGeometries(tcDiagPtr diag) const {
// colour lines for q qbar -> h0 g
static const ColourLines cqqbar("1 3 5,-2 -3 -5");
// colour lines for q g -> h0 q
static const ColourLines cqg("1 2 -3, 3 -2 5");
// colour lines for qbar q -> h0 qbar
static const ColourLines cqbarg("-1 -2 3, -3 2 -5");
// colour lines for g g -> h0 g
static const ColourLines cgg[6]={ColourLines("1 2 5, -3 -5, 3 -2 -1"),
ColourLines("-1 -2 -5, 3 5, -3 2 1"),
ColourLines("1 5, -1 -2 3, -3 2 -5"),
ColourLines("-1 -5, 1 2 -3, 3 -2 5"),
ColourLines("1 3 5, -5 -3 -2, 2 -1"),
ColourLines("-1 -3 -5, 5 3 2 ,-2 1")};
// select the colour flow
Selector<const ColourLines *> sel;
if ( diag->id() == -1) sel.insert(1.0, &cqqbar);
else if ( diag->id() == -2) sel.insert(1.0, &cqg);
else if ( diag->id() == -3) sel.insert(1.0, &cqbarg);
else
{
sel.insert(0.5, &cgg[2*(abs(diag->id())-4) ]);
sel.insert(0.5, &cgg[2*(abs(diag->id())-4)+1]);
}
// return the answer
return sel;
}
double MEPP2HiggsJet::ggME(vector<VectorWaveFunction> g1, vector<VectorWaveFunction> g2,
ScalarWaveFunction & hout, vector<VectorWaveFunction> g4,
bool calc) const {
// the particles should be in the order
// for the incoming
// 0 first incoming gluon
// 1 second incoming gluon
// for the outgoing
// 0 outgoing higgs
// 1 outgoing gluon
// me to be returned
ProductionMatrixElement newme(PDT::Spin1,PDT::Spin1,
PDT::Spin0,PDT::Spin1);
// get the kinematic invariants
Energy2 s(sHat()),u(uHat()),t(tHat()),mh2(hout.m2()),et(scale());
// calculate the loop functions
Complex A4stu(0.),A2stu(0.),A2tsu(0.),A2ust(0.);
Complex A5s(0.),A5t(0.),A5u(0.);
for(int ix=_minloop;ix<=_maxloop;++ix) {
Energy2 mf2=sqr(getParticleData(ix)->mass());
// loop functions
if(_massopt==0) {
A4stu+=A4(s,t,u,mf2);
A2stu+=A2(s,t,u,mf2);
A2tsu+=A2(u,s,t,mf2);
A2ust+=A2(t,s,u,mf2);
- A5s+= mf2/s*(4.+4.*double(s/(u+t))*(W1(s,mf2)-W1(mh2,mf2))
- +(1.-4.*double(mf2/(u+t)))*(W2(s,mf2)-W2(mh2,mf2)));
- A5t+= mf2/t*(4.+4.*double(t/(s+u))*(W1(t,mf2)-W1(mh2,mf2))
- +(1.-4.*double(mf2/(s+u)))*(W2(t,mf2)-W2(mh2,mf2)));
- A5u+= mf2/u*(4.+4.*double(u/(s+t))*(W1(u,mf2)-W1(mh2,mf2))
- +(1.-4.*double(mf2/(s+t)))*(W2(u,mf2)-W2(mh2,mf2)));
+ A5s+= double(mf2/s)*(4.+4.*double(s/(u+t))*(W1(s,mf2)-W1(mh2,mf2))
+ +(1.-4.*double(mf2/(u+t)))*(W2(s,mf2)-W2(mh2,mf2)));
+ A5t+= double(mf2/t)*(4.+4.*double(t/(s+u))*(W1(t,mf2)-W1(mh2,mf2))
+ +(1.-4.*double(mf2/(s+u)))*(W2(t,mf2)-W2(mh2,mf2)));
+ A5u+= double(mf2/u)*(4.+4.*double(u/(s+t))*(W1(u,mf2)-W1(mh2,mf2))
+ +(1.-4.*double(mf2/(s+t)))*(W2(u,mf2)-W2(mh2,mf2)));
}
else {
A4stu=-1./3.;
A2stu=-sqr(s/mh2)/3.;
A2tsu=-sqr(t/mh2)/3.;
A2ust=-sqr(u/mh2)/3.;
A5s+=2.*(s-mh2)/3./s;
A5t+=2.*(t-mh2)/3./t;
A5u+=2.*(u-mh2)/3./u;
}
}
Complex A3stu=0.5*(A2stu+A2ust+A2tsu-A4stu);
// compute the dot products for the matrix element
complex<InvEnergy> eps[3][4][2];
Energy2 pdot[4][4];
pdot[0][0]=ZERO;
pdot[0][1]= g1[0].momentum()*g2[0].momentum();
pdot[0][2]=-1.*g1[0].momentum()*g4[0].momentum();
pdot[0][3]=-1.*g1[0].momentum()*hout.momentum();
pdot[1][0]= pdot[0][1];
pdot[1][1]= ZERO;
pdot[1][2]=-1.*g2[0].momentum()*g4[0].momentum();
pdot[1][3]=-1.*g2[0].momentum()*hout.momentum();
pdot[2][0]= pdot[0][2];
pdot[2][1]= pdot[1][2];
pdot[2][2]= ZERO;
pdot[2][3]= g4[0].momentum()*hout.momentum();
pdot[3][0]=pdot[0][3];
pdot[3][1]=pdot[1][3];
pdot[3][2]=pdot[2][3];
pdot[3][3]=mh2;
for(unsigned int ix=0;ix<2;++ix)
{
eps[0][0][ix]=InvEnergy();
eps[0][1][ix]=g1[ix].wave().dot(g2[0].momentum())/pdot[0][1];
eps[0][2][ix]=-1.*g1[ix].wave().dot(g4[0].momentum())/pdot[0][2];
eps[0][3][ix]=-1.*g1[ix].wave().dot(hout.momentum())/ pdot[0][3];
eps[1][0][ix]=g2[ix].wave().dot(g1[0].momentum())/ pdot[1][0];
eps[1][1][ix]=InvEnergy();
eps[1][2][ix]=-1.*g2[ix].wave().dot(g4[0].momentum())/pdot[1][2];
eps[1][3][ix]=-1.*g2[ix].wave().dot(hout.momentum())/ pdot[1][3];
eps[2][0][ix]=g4[ix].wave().dot(g1[0].momentum())/ pdot[2][0];
eps[2][1][ix]=g4[ix].wave().dot(g2[0].momentum())/ pdot[2][1];
eps[2][2][ix]=InvEnergy();
eps[2][3][ix]=-1.*g4[ix].wave().dot(hout.momentum())/ pdot[2][3];
}
// prefactors
using Constants::pi;
double g(sqrt(4.*pi*SM().alphaEM(mh2)/SM().sin2ThetaW()));
double gs(sqrt(4.*pi*SM().alphaS(et)));
Energy mw(getParticleData(ParticleID::Wplus)->mass());
Energy3 pre=g*sqr(mh2)*gs*sqr(gs)/(32.*sqr(pi)*mw);
// compute the matrix element
double output(0.);
Complex diag[4],wdot[3][3];
_diagwgt[0]=0.;
_diagwgt[1]=0.;
_diagwgt[2]=0.;
for(unsigned int ihel1=0;ihel1<2;++ihel1) {
for(unsigned int ihel2=0;ihel2<2;++ihel2) {
for(unsigned int ohel=0;ohel<2;++ohel) {
wdot[0][1]=g1[ihel1].wave().dot(g2[ihel2].wave());
wdot[0][2]=g1[ihel1].wave().dot(g4[ohel ].wave());
wdot[1][0]=wdot[0][1];
wdot[1][2]=g2[ihel2].wave().dot(g4[ohel ].wave());
wdot[2][0]=wdot[0][2];
wdot[2][1]=wdot[1][2];
// last piece
- diag[3]=pre*A3stu*(eps[0][2][ihel1]*eps[1][0][ihel2]*eps[2][1][ohel]-
- eps[0][1][ihel1]*eps[1][2][ihel2]*eps[2][0][ohel]+
- (eps[2][0][ohel ]-eps[2][1][ohel ])*wdot[0][1]/pdot[0][1]+
- (eps[1][2][ihel2]-eps[1][0][ihel2])*wdot[0][2]/pdot[0][2]+
- (eps[0][1][ihel1]-eps[0][2][ihel1])*wdot[1][2]/pdot[1][2]);
+ diag[3]= Complex(pre*A3stu*(eps[0][2][ihel1]*eps[1][0][ihel2]*eps[2][1][ohel]-
+ eps[0][1][ihel1]*eps[1][2][ihel2]*eps[2][0][ohel]+
+ (eps[2][0][ohel ]-eps[2][1][ohel ])*wdot[0][1]/pdot[0][1]+
+ (eps[1][2][ihel2]-eps[1][0][ihel2])*wdot[0][2]/pdot[0][2]+
+ (eps[0][1][ihel1]-eps[0][2][ihel1])*wdot[1][2]/pdot[1][2]));
// first piece
- diag[3]+=pre*(
- +A2stu*(eps[0][1][ihel1]*eps[1][0][ihel2]-wdot[0][1]/pdot[0][1])*
- (eps[2][0][ohel ]-eps[2][1][ohel ])
- +A2ust*(eps[0][2][ihel1]*eps[2][0][ohel ]-wdot[0][2]/pdot[0][2])*
- (eps[1][2][ihel2]-eps[1][0][ihel2])
- +A2tsu*(eps[1][2][ihel2]*eps[2][1][ohel ]-wdot[1][2]/pdot[1][2])*
- (eps[0][1][ihel1]-eps[0][2][ihel1])
- );
+ diag[3] += Complex(pre*(+A2stu*(eps[0][1][ihel1]*eps[1][0][ihel2]-wdot[0][1]/pdot[0][1])*
+ (eps[2][0][ohel ]-eps[2][1][ohel ])
+ +A2ust*(eps[0][2][ihel1]*eps[2][0][ohel ]-wdot[0][2]/pdot[0][2])*
+ (eps[1][2][ihel2]-eps[1][0][ihel2])
+ +A2tsu*(eps[1][2][ihel2]*eps[2][1][ohel ]-wdot[1][2]/pdot[1][2])*
+ (eps[0][1][ihel1]-eps[0][2][ihel1])
+ ));
output+=real(diag[3]*conj(diag[3]));
// matrix element if needed
if(calc) newme(2*ihel1,2*ihel2,0,2*ohel)=diag[3];
// different diagrams
- diag[0] = A5t*UnitRemoval::InvE*(-eps[0][3][ihel1]*
- (-2.*eps[2][1][ohel ]*eps[1][0][ihel2]*pdot[2][1]*pdot[1][0]
- -2.*eps[1][2][ihel2]*eps[2][0][ohel ]*pdot[1][2]*pdot[2][0]
- +wdot[1][2]*(pdot[0][1]+pdot[0][2]))
- -2.*eps[2][1][ohel ]*pdot[2][1]*wdot[0][1]
- -2.*eps[1][2][ihel2]*pdot[1][2]*wdot[0][2]
- +wdot[1][2]*(eps[0][1][ihel1]*pdot[0][1]+
- eps[0][2][ihel1]*pdot[0][2]));
- diag[1] = A5u*UnitRemoval::InvE*(-eps[1][3][ihel2]*
- (+2.*eps[0][1][ihel1]*eps[2][0][ohel ]*pdot[0][1]*pdot[2][0]
- +2.*eps[0][2][ihel1]*eps[2][1][ohel ]*pdot[0][2]*pdot[2][1]
- -wdot[0][2]*(pdot[1][0]+pdot[1][2]))
- +2.*eps[2][0][ohel ]*pdot[2][0]*wdot[0][1]
- +2.*eps[0][2][ihel1]*pdot[0][2]*wdot[2][1]
- -wdot[0][2]*(eps[1][0][ihel2]*pdot[1][0]+
- eps[1][2][ihel2]*pdot[1][2]));
- diag[2] = A5s*UnitRemoval::InvE*(-eps[2][3][ohel ]*
- (+2.*eps[0][1][ihel1]*eps[1][2][ihel2]*pdot[0][1]*pdot[1][2]
- -2.*eps[1][0][ihel2]*eps[0][2][ihel1]*pdot[1][0]*pdot[1][3]
- +wdot[0][1]*(pdot[2][0]-pdot[2][1]))
- +2.*eps[0][1][ihel1]*pdot[0][1]*wdot[1][2]
- -2.*eps[1][0][ihel2]*pdot[1][0]*wdot[0][2]
- +wdot[0][1]*(eps[2][0][ohel]*pdot[2][0]-
- eps[2][1][ohel]*pdot[2][1]));
+ diag[0] = Complex(A5t*UnitRemoval::InvE*(-eps[0][3][ihel1]*
+ (-2.*eps[2][1][ohel ]*eps[1][0][ihel2]*pdot[2][1]*pdot[1][0]
+ -2.*eps[1][2][ihel2]*eps[2][0][ohel ]*pdot[1][2]*pdot[2][0]
+ +wdot[1][2]*(pdot[0][1]+pdot[0][2]))
+ -2.*eps[2][1][ohel ]*pdot[2][1]*wdot[0][1]
+ -2.*eps[1][2][ihel2]*pdot[1][2]*wdot[0][2]
+ +wdot[1][2]*(eps[0][1][ihel1]*pdot[0][1]+
+ eps[0][2][ihel1]*pdot[0][2])));
+ diag[1] = Complex(A5u*UnitRemoval::InvE*(-eps[1][3][ihel2]*
+ (+2.*eps[0][1][ihel1]*eps[2][0][ohel ]*pdot[0][1]*pdot[2][0]
+ +2.*eps[0][2][ihel1]*eps[2][1][ohel ]*pdot[0][2]*pdot[2][1]
+ -wdot[0][2]*(pdot[1][0]+pdot[1][2]))
+ +2.*eps[2][0][ohel ]*pdot[2][0]*wdot[0][1]
+ +2.*eps[0][2][ihel1]*pdot[0][2]*wdot[2][1]
+ -wdot[0][2]*(eps[1][0][ihel2]*pdot[1][0]+
+ eps[1][2][ihel2]*pdot[1][2])));
+ diag[2] = Complex(A5s*UnitRemoval::InvE*(-eps[2][3][ohel ]*
+ (+2.*eps[0][1][ihel1]*eps[1][2][ihel2]*pdot[0][1]*pdot[1][2]
+ -2.*eps[1][0][ihel2]*eps[0][2][ihel1]*pdot[1][0]*pdot[1][3]
+ +wdot[0][1]*(pdot[2][0]-pdot[2][1]))
+ +2.*eps[0][1][ihel1]*pdot[0][1]*wdot[1][2]
+ -2.*eps[1][0][ihel2]*pdot[1][0]*wdot[0][2]
+ +wdot[0][1]*(eps[2][0][ohel]*pdot[2][0]-
+ eps[2][1][ohel]*pdot[2][1])));
_diagwgt[0]+=real(diag[0]*conj(diag[0]));
_diagwgt[1]+=real(diag[1]*conj(diag[1]));
_diagwgt[2]+=real(diag[2]*conj(diag[2]));
}
}
}
// final colour and spin factors
if(calc){_me.reset(newme);}
return 3.*output/32.;
}
void MEPP2HiggsJet::constructVertex(tSubProPtr sub)
{
// extract the particles in the hard process
ParticleVector hard;
hard.push_back(sub->incoming().first);hard.push_back(sub->incoming().second);
hard.push_back(sub->outgoing()[0]);hard.push_back(sub->outgoing()[1]);
// ensure correct order or particles
if((hard[0]->id()==ParticleID::g&&hard[1]->id()!=ParticleID::g)||
(hard[0]->id()<0&&hard[1]->id()<6)) swap(hard[0],hard[1]);
if(hard[2]->id()!=ParticleID::h0) swap(hard[2],hard[3]);
// different processes
// g g to H g
if(hard[0]->id()==ParticleID::g) {
vector<VectorWaveFunction> g1,g2,g4;
VectorWaveFunction(g1,hard[0],incoming,false,true,true);
VectorWaveFunction(g2,hard[1],incoming,false,true,true);
VectorWaveFunction(g4,hard[3],outgoing,true ,true,true);
ScalarWaveFunction hout(hard[2],outgoing,true);
g1[1]=g1[2];g2[1]=g2[2];g4[1]=g4[2];
ggME(g1,g2,hout,g4,true);
}
// qg -> H q
else if(hard[0]->id()>0&&hard[1]->id()==ParticleID::g) {
vector<VectorWaveFunction> g2;
vector<SpinorWaveFunction> qin;
vector<SpinorBarWaveFunction> qout;
SpinorWaveFunction( qin,hard[0],incoming,false,true);
VectorWaveFunction( g2,hard[1],incoming,false,true,true);
SpinorBarWaveFunction(qout,hard[3],outgoing,true ,true);
ScalarWaveFunction hout(hard[2],outgoing,true);
g2[1]=g2[2];
qgME(qin,g2,hout,qout,true);
}
// qbar g -> H q
else if(hard[0]->id()<0&&hard[1]->id()==ParticleID::g) {
vector<VectorWaveFunction> g2;
vector<SpinorBarWaveFunction> qin;
vector<SpinorWaveFunction> qout;
SpinorBarWaveFunction( qin,hard[0],incoming,false,true);
VectorWaveFunction( g2,hard[1],incoming,false,true,true);
SpinorWaveFunction( qout,hard[3],outgoing,true ,true);
ScalarWaveFunction hout(hard[2],outgoing,true);
g2[1]=g2[2];
qbargME(qin,g2,hout,qout,true);
}
// q qbar to H g
else if(hard[0]->id()==-hard[1]->id()) {
vector<SpinorBarWaveFunction> qbar;
vector<SpinorWaveFunction> q;
vector<VectorWaveFunction> g4;
SpinorWaveFunction( q ,hard[0],incoming,false,true);
SpinorBarWaveFunction(qbar,hard[1],incoming,false,true);
VectorWaveFunction( g4,hard[3],outgoing,true ,true,true);
ScalarWaveFunction hout(hard[2],outgoing,true);
g4[1]=g4[2];
qqbarME(q,qbar,hout,g4,true);
}
else throw Exception() << "Unknown subprocess in MEPP2HiggsJet::constructVertex()"
<< Exception::runerror;
// construct the vertex
HardVertexPtr hardvertex=new_ptr(HardVertex());
// set the matrix element for the vertex
hardvertex->ME(_me);
// set the pointers and to and from the vertex
for(unsigned int ix=0;ix<4;++ix) {
(hard[ix]->spinInfo())->
productionVertex(hardvertex);
}
}
int MEPP2HiggsJet::nDim() const {
return 2;
}
void MEPP2HiggsJet::doinit() {
ME2to2Base::doinit();
tcPDPtr h0=getParticleData(ParticleID::h0);
_mh = h0->mass();
_wh = h0->generateWidth(_mh);
if(h0->massGenerator()) {
_hmass=dynamic_ptr_cast<GenericMassGeneratorPtr>(h0->massGenerator());
}
if(_shapeopt==2&&!_hmass) throw InitException()
<< "If using the mass generator for the line shape in MEPP2HiggsJet::doinit()"
<< "the mass generator must be an instance of the GenericMassGenerator class"
<< Exception::runerror;
}
CrossSection MEPP2HiggsJet::dSigHatDR() const {
using Constants::pi;
InvEnergy2 bwfact;
Energy moff = mePartonData()[2]->id()==ParticleID::h0 ?
meMomenta()[2].mass() : meMomenta()[3].mass();
if(_shapeopt==1) {
tcPDPtr h0 = mePartonData()[2]->id()==ParticleID::h0 ?
mePartonData()[2] : mePartonData()[3];
bwfact = h0->generateWidth(moff)*moff/pi/
(sqr(sqr(moff)-sqr(_mh))+sqr(_mh*_wh));
}
else {
bwfact = _hmass->BreitWignerWeight(moff);
}
return me2()*jacobian()/(16.0*sqr(Constants::pi)*sHat())*sqr(hbarc)*
(sqr(sqr(moff)-sqr(_mh))+sqr(_mh*_wh))/(_mh*_wh)*bwfact;
}
diff --git a/MatrixElement/Hadron/MEPP2HiggsJet.h b/MatrixElement/Hadron/MEPP2HiggsJet.h
--- a/MatrixElement/Hadron/MEPP2HiggsJet.h
+++ b/MatrixElement/Hadron/MEPP2HiggsJet.h
@@ -1,327 +1,327 @@
// -*- C++ -*-
//
// MEPP2HiggsJet.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEPP2HiggsJet_H
#define HERWIG_MEPP2HiggsJet_H
//
// This is the declaration of the MEPP2HiggsJet class.
//
#include "ThePEG/MatrixElement/ME2to2Base.h"
#include "Herwig/Utilities/Maths.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEPP2HiggsJet class implements the matrix element for Higgs+jet production.
*
* @see \ref MEPP2HiggsJetInterfaces "The interfaces"
* defined for MEPP2HiggsJet.
*/
class MEPP2HiggsJet: public ME2to2Base {
public:
/**
* The default constructor.
*/
MEPP2HiggsJet() :
_shapeopt(2),_maxflavour(5), _process(0),
_minloop(6),_maxloop(6),_massopt(0) , _mh(ZERO),_wh(ZERO)
{}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Members to return the matrix elements for the different subprocesses
*/
//@{
/**
* Matrix element for \f$q\bar{q}\to Hg\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param hout Wavefunction for the outgoing higgs
* @param gout Polarization vectors for the outgoing gluon
* @param me Whether or not to calculate the matrix element for spin correlations
**/
double qqbarME(vector<SpinorWaveFunction> & fin, vector<SpinorBarWaveFunction> & ain,
ScalarWaveFunction & hout, vector<VectorWaveFunction> & gout,
bool me) const;
/**
* Matrix element for \f$qg\to Hq\f$.
* @param fin Spinors for incoming quark
* @param gin Polarization vectors for the incoming gluon
* @param hout Wavefunction for the outgoing higgs
* @param fout Spinors for outgoing quark
* @param me Whether or not to calculate the matrix element for spin correlations
**/
double qgME(vector<SpinorWaveFunction> & fin,vector<VectorWaveFunction> & gin,
ScalarWaveFunction & hout, vector<SpinorBarWaveFunction> & fout,
bool me) const;
/**
* Matrix element for \f$\bar{q}g\to H\bar{q}\f$.
* @param fin Spinors for incoming antiquark
* @param gin Polarization vectors for the incoming gluon
* @param hout Wavefunction for the outgoing higgs
* @param fout Spinors for outgoing antiquark
* @param me Whether or not to calculate the matrix element for spin correlations
**/
double qbargME(vector<SpinorBarWaveFunction> & fin,vector<VectorWaveFunction> & gin,
ScalarWaveFunction & hout, vector<SpinorWaveFunction> & fout,
bool me) const;
/**
* Matrix element for \f$gg\to Hg\f$.
* @param g1 Polarization vectors for the first incoming gluon
* @param g2 Polarization vectors for the second incoming gluon
* @param hout Wavefunction for the outgoing higgs
* @param g4 Polarization vectors for the outgoing gluon
* @param me Whether or not to calculate the matrix element for spin correlations
**/
double ggME(vector<VectorWaveFunction> g1, vector<VectorWaveFunction> g2,
ScalarWaveFunction & hout, vector<VectorWaveFunction> g4,
bool me) const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2HiggsJet & operator=(const MEPP2HiggsJet &);
+ MEPP2HiggsJet & operator=(const MEPP2HiggsJet &) = delete;
private:
/**
* Defines the Higgs resonance shape
*/
unsigned int _shapeopt;
/**
* Maximum PDG code of the quarks allowed
*/
unsigned int _maxflavour;
/**
* Option for which processes to include
*/
unsigned int _process;
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
/**
* Minimum flavour of quarks to include in the loops
*/
int _minloop;
/**
* Maximum flavour of quarks to include in the loops
*/
int _maxloop;
/**
* Option for treatment of the fermion loops
*/
unsigned int _massopt;
/**
* On-shell mass for the higgs
*/
Energy _mh;
/**
* On-shell width for the higgs
*/
Energy _wh;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr _hmass;
/**
* Storage of the loop functions
*/
//@{
/**
* B functions
*/
mutable Complex _bi[5];
/**
* C functions
*/
mutable Complex _ci[8];
/**
* D functions
*/
mutable Complex _di[4];
//@}
/**
* Storage of the diagram weights for the \f$gg\to Hg\f$ subprocess
*/
mutable double _diagwgt[3];
};
}
#endif /* HERWIG_MEPP2HiggsJet_H */
diff --git a/MatrixElement/Hadron/MEPP2HiggsVBF.h b/MatrixElement/Hadron/MEPP2HiggsVBF.h
--- a/MatrixElement/Hadron/MEPP2HiggsVBF.h
+++ b/MatrixElement/Hadron/MEPP2HiggsVBF.h
@@ -1,471 +1,471 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2HiggsVBF_H
#define HERWIG_MEPP2HiggsVBF_H
//
// This is the declaration of the MEPP2HiggsVBF class.
//
#include "Herwig/MatrixElement/MEfftoffH.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2HiggsVBF class provides the matrix elements for the
* production of the Higgs boson via the vector boson fusion mechanism
* in hadron collisions
*
* @see \ref MEPP2HiggsVBFInterfaces "The interfaces"
* defined for MEPP2HiggsVBF.
*/
class MEPP2HiggsVBF: public MEfftoffH {
/**
* Struct to contain the hadronic system
*/
struct tChannelPair{
/**
* The hadron
*/
PPtr hadron;
/**
* The beam particle data object
*/
tcBeamPtr beam;
/**
* The incoming particle
*/
PPtr incoming;
/**
* The outgoing particle
*/
PPtr outgoing;
/**
* The PDF
*/
tcPDFPtr pdf;
};
public:
/**
* The default constructor.
*/
MEPP2HiggsVBF();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
//@}
/**
* Virtual members to be overridden by inheriting classes
* which implement hard corrections
*/
//@{
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return Both;}
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return true;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr, double &,
double & );
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Generate the hardest emission in the POWHEG approach
*/
//@{
/**
* Generate a Compton process
*/
void generateCompton(unsigned int system);
/**
* Generate a BGF process
*/
void generateBGF(unsigned int system);
/**
* Matrix element piece for the Compton process
*/
double comptonME(unsigned int system,
double xT,double xp, double zp, double phi);
/**
* Matrix element piece for the Compton process
*/
double BGFME(unsigned int system,
double xT,double xp, double zp, double phi);
/**
* Leading order matrix element
*/
Energy4 loMatrixElement(const Lorentz5Momentum &p1,
const Lorentz5Momentum &p2,
const Lorentz5Momentum &q1,
const Lorentz5Momentum &q2,
double G1, double G2) const;
//@}
/**
* Generate the hard emission in the old-fashioned matrix element correction approach
*/
//@{
/**
* Generate the values of \f$x_p\f$ and \f$z_p\f$
* @param xp The value of xp, output
* @param zp The value of zp, output
*/
double generateComptonPoint(double &xp, double & zp);
/**
* Generate the values of \f$x_p\f$ and \f$z_p\f$
* @param xp The value of xp, output
* @param zp The value of zp, output
*/
double generateBGFPoint(double &xp, double & zp);
/**
* Return the coefficients for the matrix element piece for
* the QCD compton case. The output is the \f$a_i\f$ coefficients to
* give the function as
* \f$a_0+a_1\cos\phi+a_2\sin\phi+a_3\cos^2\phi+a_4\sin^2\phi\f$
* @param xp \f$x_p\f$
* @param x2 \f$x_2\f$
* @param xperp \f$x_\perp\f$
* @param l Scaled momentum of incoming spectator
* @param m Scaled momentum of outgoing spectator
*
*/
vector<double> ComptonME(double xp, double x2, double xperp,
LorentzVector<double> l,
LorentzVector<double> m);
/**
* Return the coefficients for the matrix element piece for
* the QCD compton case. The output is the \f$a_i\f$ coefficients to
* give the function as
* \f$a_0+a_1\cos\phi+a_2\sin\phi+a_3\cos^2\phi+a_4\sin^2\phi\f$
* @param xp \f$x_p\f$
* @param x2 \f$x_3\f$
* @param x3 \f$x_2\f$
* @param xperp \f$x_\perp\f$
* @param l Scaled momentum of incoming spectator
* @param m Scaled momentum of outgoing spectator
*
*/
vector<double> BGFME(double xp, double x2, double x3, double xperp,
LorentzVector<double> l,
LorentzVector<double> m);
/**
* Calculate the coefficient A for the correlations
*/
double A(tcPDPtr qin1, tcPDPtr qout1, tcPDPtr qin2, tcPDPtr qout2);
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2HiggsVBF & operator=(const MEPP2HiggsVBF &);
+ MEPP2HiggsVBF & operator=(const MEPP2HiggsVBF &) = delete;
private:
/**
* Parameters for the hard POWHEG emission
*/
//@{
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr alpha_;
/**
* Weight for the compton channel
*/
double comptonWeight_;
/**
* Weight for the BGF channel
*/
double BGFWeight_;
/**
* Minimum value of \f$p_T\f$
*/
Energy pTmin_;
/**
* Gluon particle data object
*/
PDPtr gluon_;
//@}
/**
* Properties of the emission
*/
//@{
/**
* Beam particle
*/
tcBeamPtr beam_[2];
/**
* PDF object
*/
tcPDFPtr pdf_[2];
/**
* Partons
*/
tcPDPtr partons_[2][4];
/**
* q
*/
Lorentz5Momentum q_[2];
/**
* \f$Q^2\f$
*/
Energy2 q2_[2];
/**
* Coupling factor
*/
double acoeff_;
/**
* Lorentz vectors for the matrix element
*/
LorentzVector<double> l_;
/**
* Lorentz vectors for the matrix element
*/
LorentzVector<double> m_;
/**
* Born momentum fraction
*/
double xB_[2];
/**
* Rotation to the Breit frame
*/
LorentzRotation rot_[2];
/**
* Quark momenta for spectator system
*/
Lorentz5Momentum pother_[2][2];
/**
* Quark momenta for emitting system
*/
Lorentz5Momentum psystem_[2][2];
/**
* Higgs momenta
*/
Lorentz5Momentum phiggs_[2];
/**
* Transverse momenta for the compton emissions
*/
Energy pTCompton_[2];
/**
* Transverse momenta for the BGF emissions
*/
Energy pTBGF_[2];
/**
* Whether the Compton radiation is ISR or FSR
*/
bool ComptonISFS_[2];
/**
* Momenta of the particles for a compton emission
*/
vector<Lorentz5Momentum> ComptonMomenta_[2];
/**
* Momenta of the particles for a BGF emission
*/
vector<Lorentz5Momentum> BGFMomenta_[2];
/**
* the systems
*/
vector<tChannelPair> systems_;
/**
* Higgs boson
*/
PPtr higgs_;
//@}
/**
* Parameters for the matrix element correction
*/
//@{
/**
* Enchancement factor for ISR
*/
double initial_;
/**
* Enchancement factor for FSR
*/
double final_;
/**
* Relative fraction of compton and BGF processes to generate
*/
double procProb_;
/**
* Integral for compton process
*/
double comptonInt_;
/**
* Integral for BGF process
*/
double bgfInt_;
/**
* Number of weights greater than 1
*/
unsigned int nover_;
/**
* Maximum weight
*/
pair<double,double> maxwgt_;
//@}
};
}
#endif /* HERWIG_MEPP2HiggsVBF_H */
diff --git a/MatrixElement/Hadron/MEPP2QQ.h b/MatrixElement/Hadron/MEPP2QQ.h
--- a/MatrixElement/Hadron/MEPP2QQ.h
+++ b/MatrixElement/Hadron/MEPP2QQ.h
@@ -1,351 +1,351 @@
// -*- C++ -*-
//
// MEPP2QQ.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEPP2QQ_H
#define HERWIG_MEPP2QQ_H
//
// This is the declaration of the MEPP2QQ class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEPP2QQ class implements the production of a heavy quark-antiquark
* pair via QCD.
*
* @see \ref MEPP2QQInterfaces "The interfaces"
* defined for MEPP2QQ.
*/
class MEPP2QQ: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2QQ();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Members to calculate the matrix elements
*/
//@{
/**
* Matrix element for \f$gg\to q\bar{q}\f$
* @param g1 The wavefunctions for the first incoming gluon
* @param g2 The wavefunctions for the second incoming gluon
* @param q The wavefunction for the outgoing quark
* @param qbar The wavefunction for the outgoing antiquark
* @param flow The colour flow
*/
double gg2qqbarME(vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
vector<SpinorBarWaveFunction> & q,vector<SpinorWaveFunction> & qbar,
unsigned int flow) const;
/**
* Matrix element for \f$q\bar{q}\to q\bar{q}\f$
* @param q1 The wavefunction for the incoming quark
* @param q2 The wavefunction for the incoming antiquark
* @param q3 The wavefunction for the outgoing quark
* @param q4 The wavefunction for the outgoing antiquark
* @param flow The colour flow
*/
double qqbar2qqbarME(vector<SpinorWaveFunction> & q1,
vector<SpinorBarWaveFunction> & q2,
vector<SpinorBarWaveFunction> & q3,
vector<SpinorWaveFunction> & q4,
unsigned int flow) const;
/**
* Matrix element for \f$qq\to qq\f$
* @param q1 The wavefunction for the first incoming quark
* @param q2 The wavefunction for the second incoming quark
* @param q3 The wavefunction for the first outgoing quark
* @param q4 The wavefunction for the second outgoing quark
* @param flow The colour flow
*/
double qq2qqME(vector<SpinorWaveFunction> & q1, vector<SpinorWaveFunction> & q2,
vector<SpinorBarWaveFunction> & q3, vector<SpinorBarWaveFunction> & q4,
unsigned int flow) const;
/**
* Matrix element for \f$\bar{q}\bar{q}\to \bar{q}\bar{q}\f$
* @param q1 The wavefunction for the first incoming antiquark
* @param q2 The wavefunction for the second incoming antiquark
* @param q3 The wavefunction for the first outgoing antiquark
* @param q4 The wavefunction for the second outgoing antiquark
* @param flow The colour flow
*/
double qbarqbar2qbarqbarME(vector<SpinorBarWaveFunction> & q1,
vector<SpinorBarWaveFunction> & q2,
vector<SpinorWaveFunction> & q3,
vector<SpinorWaveFunction> & q4,
unsigned int flow) const;
/**
* Matrix element for \f$qg\to qg\f$
* @param qin The wavefunction for the incoming quark
* @param g2 The wavefunction for the incoming gluon
* @param qout The wavefunction for the outgoing quark
* @param g4 The wavefunction for the outgoing gluon
* @param flow The colour flow
*/
double qg2qgME(vector<SpinorWaveFunction> & qin,vector<VectorWaveFunction> &g2,
vector<SpinorBarWaveFunction> & qout,vector<VectorWaveFunction> &g4,
unsigned int flow) const;
/**
* Matrix elements for \f$\bar{q}g\to \bar{q}g\f$.
* @param qin The wavefunction for the incoming antiquark
* @param g2 The wavefunction for the incoming gluon
* @param qout The wavefunction for the outgoing antiquark
* @param g4 The wavefunction for the outgoing gluon
* @param flow The colour flow
*/
double qbarg2qbargME(vector<SpinorBarWaveFunction> & qin,
vector<VectorWaveFunction> &g2,
vector<SpinorWaveFunction> & qout,vector<VectorWaveFunction> &g4,
unsigned int flow) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2QQ & operator=(const MEPP2QQ &);
+ MEPP2QQ & operator=(const MEPP2QQ &) = delete;
private:
/**
* Vertices needed to compute the diagrams
*/
//@{
/**
* \f$ggg\f$ vertex
*/
AbstractVVVVertexPtr _gggvertex;
/**
* \f$q\bar{q}g\f$ vertex
*/
AbstractFFVVertexPtr _qqgvertex;
//@}
/**
* Quark Flavour
*/
unsigned int _quarkflavour;
/**
* Processes to include
*/
unsigned int _process;
/**
* Option for the treatment of bottom and lighter
* quark masses
*/
unsigned int _bottomopt;
/**
* Option for the treatment of top quark masses
*/
unsigned int _topopt;
/**
* Maximum numbere of quark flavours to include
*/
unsigned int _maxflavour;
/**
* Colour flow
*/
mutable unsigned int _flow;
/**
* Diagram
*/
mutable unsigned int _diagram;
/**
* Matrix element
*/
mutable ProductionMatrixElement _me;
/**
* ParticleData objects of the partons
*/
//@{
/**
* The gluon
*/
PDPtr _gluon;
/**
* the quarks
*/
vector<PDPtr> _quark;
/**
* the antiquarks
*/
vector<PDPtr> _antiquark;
//@}
};
}
#endif /* HERWIG_MEPP2QQ_H */
diff --git a/MatrixElement/Hadron/MEPP2QQHiggs.h b/MatrixElement/Hadron/MEPP2QQHiggs.h
--- a/MatrixElement/Hadron/MEPP2QQHiggs.h
+++ b/MatrixElement/Hadron/MEPP2QQHiggs.h
@@ -1,350 +1,350 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2QQHiggs_H
#define HERWIG_MEPP2QQHiggs_H
//
// This is the declaration of the MEPP2QQHiggs class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/PDT/GenericMassGenerator.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2QQHiggs class implements the matrix elements for
* \f$gg\to Q \bar Q h^0\f$ and \f$q\bar q\to Q \bar Q h^0\f$.
*
* @see \ref MEPP2QQHiggsInterfaces "The interfaces"
* defined for MEPP2QQHiggs.
*/
class MEPP2QQHiggs: public HwMEBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MEPP2QQHiggs();
//@}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
protected:
/**
* Members to calculate the matrix elements
*/
//@{
/**
* Matrix element for \f$gg\to Q\bar{Q}h^0\f$
* @param g1 The wavefunctions for the first incoming gluon
* @param g2 The wavefunctions for the second incoming gluon
* @param q The wavefunction for the outgoing quark
* @param qbar The wavefunction for the outgoing antiquark
* @param h The wavefunction for the outgoing Higgs boson
* @param flow The colour flow
*/
double ggME(vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
vector<SpinorBarWaveFunction> & q,vector<SpinorWaveFunction> & qbar,
ScalarWaveFunction & h,
unsigned int flow) const;
/**
* Matrix element for \f$q\bar{q}\to Q\bar{Q}h^0\f$
* @param q1 The wavefunction for the incoming quark
* @param q2 The wavefunction for the incoming antiquark
* @param q3 The wavefunction for the outgoing quark
* @param q4 The wavefunction for the outgoing antiquark
* @param h The wavefunction for the outgoing Higgs boson
* @param flow The colour flow
*/
double qqME(vector<SpinorWaveFunction> & q1,
vector<SpinorBarWaveFunction> & q2,
vector<SpinorBarWaveFunction> & q3,
vector<SpinorWaveFunction> & q4,
ScalarWaveFunction & h,
unsigned int flow) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2QQHiggs & operator=(const MEPP2QQHiggs &);
+ MEPP2QQHiggs & operator=(const MEPP2QQHiggs &) = delete;
private:
/**
* Switches to control the subprocess
*/
//@{
/**
* Quark Flavour
*/
unsigned int quarkFlavour_;
/**
* Processes to include
*/
unsigned int process_;
//@}
/**
* Switches etc for the Higgs mass generation
*/
//@{
/**
* Defines the Higgs resonance shape
*/
unsigned int shapeOpt_;
/**
* On-shell mass for the higgs
*/
Energy mh_;
/**
* On-shell width for the higgs
*/
Energy wh_;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr hmass_;
//@}
/**
* Vertices needed to compute the diagrams
*/
//@{
/**
* \f$ggg\f$ vertex
*/
AbstractVVVVertexPtr GGGVertex_;
/**
* \f$q\bar{q}g\f$ vertex
*/
AbstractFFVVertexPtr QQGVertex_;
/**
* \f$q\bar q h^0\f$ vertex
*/
AbstractFFSVertexPtr QQHVertex_;
//@}
/**
* ParticleData objects of the particles
*/
//@{
/**
* The gluon
*/
PDPtr gluon_;
/**
* The Higgs boson
*/
PDPtr higgs_;
/**
* the quarks
*/
vector<PDPtr> quark_;
/**
* the antiquarks
*/
vector<PDPtr> antiquark_;
//@}
/**
* Parameters for the phase-space generation
*/
//@{
/**
* Power for the phase-space mapping
*/
double alpha_;
//@}
/**
* Colour flow
*/
mutable unsigned int flow_;
/**
* Diagram
*/
mutable unsigned int diagram_;
/**
* Matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_MEPP2QQHiggs_H */
diff --git a/MatrixElement/Hadron/MEPP2SingleTop.h b/MatrixElement/Hadron/MEPP2SingleTop.h
--- a/MatrixElement/Hadron/MEPP2SingleTop.h
+++ b/MatrixElement/Hadron/MEPP2SingleTop.h
@@ -1,249 +1,249 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2SingleTop_H
#define HERWIG_MEPP2SingleTop_H
//
// This is the declaration of the MEPP2SingleTop class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2SingleTop class implements the matrix element for the
* production of a single top quark.
*
* @see \ref MEPP2SingleTopInterfaces "The interfaces"
* defined for MEPP2SingleTop.
*/
class MEPP2SingleTop: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2SingleTop();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix Elements ofr the different processes
*/
//@{
/**
* Matrix element for \f$q\bar{q}\to W \to t\bar{f}\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param fout Spinors for incoming quark
* @param aout Spinors for incoming antiquark
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double sChannelME(vector<SpinorWaveFunction> & fin ,
vector<SpinorBarWaveFunction> & ain ,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
bool me) const;
/**
* Matrix element for \f$qq\to t q\f$.
* @param f1 Spinors for incoming quark
* @param a1 Spinors for incoming antiquark
* @param f2 Spinors for incoming quark
* @param a2 Spinors for incoming antiquark
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double tChannelME(vector<SpinorWaveFunction> & f1 ,
vector<SpinorBarWaveFunction> & a1 ,
vector<SpinorWaveFunction> & f2,
vector<SpinorBarWaveFunction> & a2,
bool me) const;
/**
* Matrix element for \f$qg\to t W\f$.
* @param fin Spinors for incoming quark
* @param gin Polarization vectors for the incoming gluon
* @param fout Spinors for outgoing quark
* @param Wout Polarization vectors for the outgoing W
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double tWME(vector<SpinorWaveFunction> & fin,
vector<VectorWaveFunction> & gin,
vector<SpinorBarWaveFunction> & fout,
vector<VectorWaveFunction> & Wout,
bool me) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2SingleTop & operator=(const MEPP2SingleTop &);
+ MEPP2SingleTop & operator=(const MEPP2SingleTop &) = delete;
private:
/**
* Vertices
*/
//@{
/**
* FFWVertex
*/
AbstractFFVVertexPtr FFWvertex_;
/**
* FFGVertex
*/
AbstractFFVVertexPtr FFGvertex_;
//@}
/**
* Which processes to include
*/
unsigned int process_;
/**
* Allowed flavours of the incoming quarks
*/
int maxflavour_;
/**
* Treatment of the top quark mass
*/
int topOption_;
/**
* Treatment of the W mass
*/
int wOption_;
/**
* The matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_MEPP2SingleTop_H */
diff --git a/MatrixElement/Hadron/MEPP2VGamma.h b/MatrixElement/Hadron/MEPP2VGamma.h
--- a/MatrixElement/Hadron/MEPP2VGamma.h
+++ b/MatrixElement/Hadron/MEPP2VGamma.h
@@ -1,235 +1,235 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2VGamma_H
#define HERWIG_MEPP2VGamma_H
//
// This is the declaration of the MEPP2VGamma class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2VGamma class implements the .
*
* @see \ref MEPP2VGammaInterfaces "The interfaces"
* defined for MEPP2VGamma.
*/
class MEPP2VGamma: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2VGamma();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$f\bar{f}\to W^\pm \gamma\f$.
* @param f1 Spinors for the incoming fermion
* @param a1 Spinors for the incoming antifermion
* @param v1 \f$W^\pm\f$ wavefunction
* @param v2 \f$\gamma\f$ wavefunction
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double WGammaME(vector<SpinorWaveFunction> & f1,
vector<SpinorBarWaveFunction> & a1,
vector<VectorWaveFunction> & v1,
vector<VectorWaveFunction> & v2,
bool me) const;
/**
* Matrix element for \f$f\bar{f}\to Z^0 \gamma\f$.
* @param f1 Spinors for the incoming fermion
* @param a1 Spinors for the incoming antifermion
* @param v1 \f$Z^0\f$ wavefunction
* @param v2 \f$\gamma\f$ wavefunction
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double ZGammaME(vector<SpinorWaveFunction> & f1,
vector<SpinorBarWaveFunction> & a1,
vector<VectorWaveFunction> & v1,
vector<VectorWaveFunction> & v2,
bool me) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2VGamma & operator=(const MEPP2VGamma &);
+ MEPP2VGamma & operator=(const MEPP2VGamma &) = delete;
private:
/**
* Vertices
*/
//@{
/**
* FFPVertex
*/
AbstractFFVVertexPtr FFPvertex_;
/**
* FFWVertex
*/
AbstractFFVVertexPtr FFWvertex_;
/**
* FFZVertex
*/
AbstractFFVVertexPtr FFZvertex_;
/**
* WWW Vertex
*/
AbstractVVVVertexPtr WWWvertex_;
//@}
/**
* Processes
*/
unsigned int process_;
/**
* Allowed flavours of the incoming quarks
*/
int maxflavour_;
/**
* Treatment of the the boson masses
*/
unsigned int massOption_;
/**
* The matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_MEPP2VGamma_H */
diff --git a/MatrixElement/Hadron/MEPP2VV.h b/MatrixElement/Hadron/MEPP2VV.h
--- a/MatrixElement/Hadron/MEPP2VV.h
+++ b/MatrixElement/Hadron/MEPP2VV.h
@@ -1,262 +1,262 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2VV_H
#define HERWIG_MEPP2VV_H
//
// This is the declaration of the MEPP2VV class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2VV class implements the production of \f$W^+W^-\f$,
* \f$W^\pm Z^0\f$ and \f$Z^0Z^o\f$ in hadron-hadron collisions.
*
* @see \ref MEPP2VVInterfaces "The interfaces"
* defined for MEPP2VV.
*/
class MEPP2VV: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2VV();
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Return the process being run (WW/ZZ/WZ).
*/
virtual int process() const { return process_; }
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Used internally by generateKinematics, after calculating the
* limits on cos(theta).
*/
virtual double getCosTheta(double cthmin, double cthmax, const double r);
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$f\bar{f}\to W^+W^-\f$.
* @param f1 Spinors for the incoming fermion
* @param a1 Spinors for the incoming antifermion
* @param v1 The first outgoing W polarization vectors
* @param v2 The second outgoing W polarization vectors
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double WWME(vector<SpinorWaveFunction> & f1,
vector<SpinorBarWaveFunction> & a1,
vector<VectorWaveFunction> & v1,
vector<VectorWaveFunction> & v2,
bool me) const;
/**
* Matrix element for \f$f\bar{f}\to W^\pm Z^0\f$.
* @param f1 Spinors for the incoming fermion
* @param a1 Spinors for the incoming antifermion
* @param v1 The outgoing W polarization vectors
* @param v2 The outgoing Z polarization vectors
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double WZME(vector<SpinorWaveFunction> & f1,
vector<SpinorBarWaveFunction> & a1,
vector<VectorWaveFunction> & v1,
vector<VectorWaveFunction> & v2,
bool me) const;
/**
* Matrix element for \f$f\bar{f}\to Z^0Z^0\f$.
* @param f1 Spinors for the incoming fermion
* @param a1 Spinors for the incoming antifermion
* @param v1 The first outgoing Z polarization vectors
* @param v2 The second outgoing Z polarization vectors
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double ZZME(vector<SpinorWaveFunction> & f1,
vector<SpinorBarWaveFunction> & a1,
vector<VectorWaveFunction> & v1,
vector<VectorWaveFunction> & v2,
bool me) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2VV & operator=(const MEPP2VV &);
+ MEPP2VV & operator=(const MEPP2VV &) = delete;
private:
/**
* Vertices
*/
//@{
/**
* FFPVertex
*/
AbstractFFVVertexPtr FFPvertex_;
/**
* FFWVertex
*/
AbstractFFVVertexPtr FFWvertex_;
/**
* FFZVertex
*/
AbstractFFVVertexPtr FFZvertex_;
/**
* WWW Vertex
*/
AbstractVVVVertexPtr WWWvertex_;
//@}
/**
* Processes
*/
unsigned int process_;
/**
* Allowed flavours of the incoming quarks
*/
int maxflavour_;
/**
* Treatment of the the boson masses
*/
unsigned int massOption_;
/**
* The matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_MEPP2VV_H */
diff --git a/MatrixElement/Hadron/MEPP2WH.h b/MatrixElement/Hadron/MEPP2WH.h
--- a/MatrixElement/Hadron/MEPP2WH.h
+++ b/MatrixElement/Hadron/MEPP2WH.h
@@ -1,113 +1,113 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2WH_H
#define HERWIG_MEPP2WH_H
//
// This is the declaration of the MEPP2WH class.
//
#include "Herwig/MatrixElement/MEfftoVH.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2WH class provides the matrix elements for the production of
* the \f$W^\pm\f$ boson in association with the Higgs in hadron collisions.
*
* @see \ref MEPP2WHInterfaces "The interfaces"
* defined for MEPP2WH.
*/
class MEPP2WH: public MEfftoVH {
public:
/**
* Default constructor
*/
MEPP2WH();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2WH & operator=(const MEPP2WH &);
+ MEPP2WH & operator=(const MEPP2WH &) = delete;
private:
/**
* Which intermediate \f$W^\pm\f$ bosons to include
*/
unsigned int _plusminus;
};
}
#endif /* HERWIG_MEPP2WH_H */
diff --git a/MatrixElement/Hadron/MEPP2WJet.h b/MatrixElement/Hadron/MEPP2WJet.h
--- a/MatrixElement/Hadron/MEPP2WJet.h
+++ b/MatrixElement/Hadron/MEPP2WJet.h
@@ -1,316 +1,316 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2WJet_H
#define HERWIG_MEPP2WJet_H
//
// This is the declaration of the MEPP2WJet class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEPP2WJet class implements the matrix element for the production of
* a W boson and a jet including the decay of the W.
*
* @see \ref MEPP2WJetInterfaces "The interfaces"
* defined for MEPP2WJet.
*/
class MEPP2WJet: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2WJet();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix elements for the different subprocesses
*/
//@{
/**
* Matrix element for \f$q\bar{q}\to W^\pm g\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param gout Polarization vectors for the outgoing gluon
* @param lm Spinors for outgoing lepton
* @param lp Spinors for outgoing antilepton
* @param me Whether or not to calculate the matrix element for spin correlations
**/
InvEnergy2 qqbarME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
vector<VectorWaveFunction> & gout,
vector<SpinorBarWaveFunction> & lm,
vector<SpinorWaveFunction> & lp,
bool me=false) const;
/**
* Matrix element for \f$qg\to W^\pm q\f$.
* @param fin Spinors for incoming quark
* @param gin Polarization vectors for the incoming gluon
* @param fout Spinors for outgoing quark
* @param lm Spinors for outgoing lepton
* @param lp Spinors for outgoing antilepton
* @param me Whether or not to calculate the matrix element for spin correlations
**/
InvEnergy2 qgME(vector<SpinorWaveFunction> & fin,
vector<VectorWaveFunction> & gin,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorBarWaveFunction> & lm,
vector<SpinorWaveFunction> & lp,
bool me=false) const;
/**
* Matrix element for \f$\bar{q}g\to W^\pm\bar{q}\f$.
* @param fin Spinors for incoming antiquark
* @param gin Polarization vectors for the incoming gluon
* @param fout Spinors for outgoing antiquark
* @param lm Spinors for outgoing lepton
* @param lp Spinors for outgoing antilepton
* @param me Whether or not to calculate the matrix element for spin correlations
**/
InvEnergy2 qbargME(vector<SpinorBarWaveFunction> & fin,
vector<VectorWaveFunction> & gin,
vector<SpinorWaveFunction> & fout,
vector<SpinorBarWaveFunction> & lm,
vector<SpinorWaveFunction> & lp,
bool me=false) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2WJet & operator=(const MEPP2WJet &);
+ MEPP2WJet & operator=(const MEPP2WJet &) = delete;
private:
/**
* Vertices for the helicity amplitude calculation
*/
//@{
/**
* Pointer to the W vertex
*/
AbstractFFVVertexPtr _theFFWVertex;
/**
* Pointer to the \f$qqg\f$ vertex
*/
AbstractFFVVertexPtr _theQQGVertex;
//@}
/**
* @name Pointers to the W ParticleData objects
*/
//@{
/**
* The \f$W^+\f$ data pointer
*/
tcPDPtr _wplus;
/**
* The \f$W^-\f$ data pointer
*/
tcPDPtr _wminus;
//@}
/**
* @name Switches to control the particles in the hard process
*/
//@{
/**
* Subprocesses to include
*/
unsigned int _process;
/**
* Allowed flavours for the incoming quarks
*/
unsigned int _maxflavour;
/**
* Which charge states to include
*/
unsigned int _plusminus;
/**
* W decay modes
*/
unsigned int _wdec;
/**
* Option for the treatment of the W off-shell effects
*/
unsigned int _widthopt;
//@}
/**
* Matrix element for spin correlations
*/
mutable ProductionMatrixElement _me;
/**
* Storage of the scale to avoid the need to recalculate
*/
Energy2 _scale;
/**
* Storage of the off-shell W mass to avoid the need to recalculate
*/
Energy2 _mw2;
};
}
#endif /* HERWIG_MEPP2WJet_H */
diff --git a/MatrixElement/Hadron/MEPP2ZH.h b/MatrixElement/Hadron/MEPP2ZH.h
--- a/MatrixElement/Hadron/MEPP2ZH.h
+++ b/MatrixElement/Hadron/MEPP2ZH.h
@@ -1,111 +1,111 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2ZH_H
#define HERWIG_MEPP2ZH_H
//
// This is the declaration of the MEPP2ZH class.
//
#include "Herwig/MatrixElement/MEfftoVH.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2ZH class implements the matrix element
* for \f$q\bar{q}\to Z^0h^0\f$.
*
* @see \ref MEPP2ZHInterfaces "The interfaces"
* defined for MEPP2ZH.
*/
class MEPP2ZH: public MEfftoVH {
public:
/**
* The default constructor.
*/
MEPP2ZH();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2ZH & operator=(const MEPP2ZH &);
+ MEPP2ZH & operator=(const MEPP2ZH &) = delete;
private:
/**
* The allowed flavours of the incoming quarks
*/
int _maxflavour;
};
}
#endif /* HERWIG_MEPP2ZH_H */
diff --git a/MatrixElement/Hadron/MEPP2ZJet.h b/MatrixElement/Hadron/MEPP2ZJet.h
--- a/MatrixElement/Hadron/MEPP2ZJet.h
+++ b/MatrixElement/Hadron/MEPP2ZJet.h
@@ -1,323 +1,323 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2ZJet_H
#define HERWIG_MEPP2ZJet_H
//
// This is the declaration of the MEPP2ZJet class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEPP2ZJet class implements the matrix element for the production
* of a Z boson + a jet including the decay of the Z including \f$Z/\gamma\f$
* interference
*
* @see \ref MEPP2ZJetInterfaces "The interfaces"
* defined for MEPP2ZJet.
*/
class MEPP2ZJet: public HwMEBase {
public:
/**
* The default constructor.
*/
MEPP2ZJet();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix elements for the different subprocesses
*/
//@{
/**
* Matrix element for \f$q\bar{q}\to Z/\gamma g\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param gout Polarization vectors for the outgoing gluon
* @param lm Spinors for outgoing lepton
* @param lp Spinors for outgoing antilepton
* @param me Whether or not to calculate the matrix element for spin correlations
**/
InvEnergy2 qqbarME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
vector<VectorWaveFunction> & gout,
vector<SpinorBarWaveFunction> & lm, vector<SpinorWaveFunction> & lp,
bool me=false) const;
/**
* Matrix element for \f$qg\to Z/\gamma q\f$.
* @param fin Spinors for incoming quark
* @param gin Polarization vectors for the incoming gluon
* @param fout Spinors for outgoing quark
* @param lm Spinors for outgoing lepton
* @param lp Spinors for outgoing antilepton
* @param me Whether or not to calculate the matrix element for spin correlations
**/
InvEnergy2 qgME(vector<SpinorWaveFunction> & fin,vector<VectorWaveFunction> & gin,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorBarWaveFunction> & lm, vector<SpinorWaveFunction> & lp,
bool me=false) const;
/**
* Matrix element for \f$\bar{q}g\to Z/\gamma\bar{q}\f$.
* @param fin Spinors for incoming antiquark
* @param gin Polarization vectors for the incoming gluon
* @param fout Spinors for outgoing antiquark
* @param lm Spinors for outgoing lepton
* @param lp Spinors for outgoing antilepton
* @param me Whether or not to calculate the matrix element for spin correlations
**/
InvEnergy2 qbargME(vector<SpinorBarWaveFunction> & fin,
vector<VectorWaveFunction> & gin,
vector<SpinorWaveFunction> & fout,
vector<SpinorBarWaveFunction> & lm, vector<SpinorWaveFunction> & lp,
bool me=false) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2ZJet & operator=(const MEPP2ZJet &);
+ MEPP2ZJet & operator=(const MEPP2ZJet &) = delete;
private:
/**
* Vertices for the helicity amplitude calculation
*/
//@{
/**
* Pointer to the Z vertex
*/
AbstractFFVVertexPtr _theFFZVertex;
/**
* Pointer to the photon vertex
*/
AbstractFFVVertexPtr _theFFPVertex;
/**
* Pointer to the \f$qqg\f$ vertex
*/
AbstractFFVVertexPtr _theQQGVertex;
//@}
/**
* @name Pointers to the \f$Z^0\f$ and \f$\gamma\f$ ParticleData objects
*/
//@{
/**
* Pointer to the Z ParticleData object
*/
tcPDPtr _z0;
/**
* Pointer to the photon ParticleData object
*/
tcPDPtr _gamma;
//@}
/**
* @name Switches to control the particles in the hard process
*/
//@{
/**
* Subprocesses to include
*/
unsigned int _process;
/**
* Allowed flavours for the incoming quarks
*/
int _maxflavour;
/**
* Control over which Z decay modes to include
*/
int _zdec;
/**
* Which terms to include
*/
unsigned int _gammaZ;
/**
* Option for the treatment of the W off-shell effects
*/
unsigned int _widthopt;
//@}
/**
* Probability of selecting \f$1/s^2\f$ for the jacobian
* transformation of the boson mass
*/
double _pprob;
/**
* Matrix element for spin correlations
*/
mutable ProductionMatrixElement _me;
/**
* Storage of the scale to avoid the need to recalculate
*/
Energy2 _scale;
/**
* Storage of the off-shell Z mass to avoid the need to recalculate
*/
Energy2 _mz2;
};
}
#endif /* HERWIG_MEPP2ZJet_H */
diff --git a/MatrixElement/Hadron/MEQCD2to2.h b/MatrixElement/Hadron/MEQCD2to2.h
--- a/MatrixElement/Hadron/MEQCD2to2.h
+++ b/MatrixElement/Hadron/MEQCD2to2.h
@@ -1,364 +1,364 @@
// -*- C++ -*-
//
// MEQCD2to2.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEQCD2to2_H
#define HERWIG_MEQCD2to2_H
//
// This is the declaration of the MEQCD2to2 class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEQCD2to2 class provides the matrix elements for \f$2\to2\f$
* QCD scattering processes in hadron-hadron collisions.
*
* @see \ref MEQCD2to2Interfaces "The interfaces"
* defined for MEQCD2to2.
*/
class MEQCD2to2: public HwMEBase {
public:
/**
* The default constructor.
*/
MEQCD2to2();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Members to calculate the matrix elements
*/
//@{
/**
* Matrix element for \f$gg\to gg\f$.
* @param g1 The wavefunctions for the first incoming gluon
* @param g2 The wavefunctions for the second incoming gluon
* @param g3 The wavefunctions for the first outgoing gluon
* @param g4 The wavefunctions for the second outgoing gluon
* @param flow The colour flow
*/
double gg2ggME(vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
vector<VectorWaveFunction> &g3,vector<VectorWaveFunction> &g4,
unsigned int flow) const;
/**
* Matrix element for \f$gg\to q\bar{q}\f$
* @param g1 The wavefunctions for the first incoming gluon
* @param g2 The wavefunctions for the second incoming gluon
* @param q The wavefunction for the outgoing quark
* @param qbar The wavefunction for the outgoing antiquark
* @param flow The colour flow
*/
double gg2qqbarME(vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
vector<SpinorBarWaveFunction> & q,vector<SpinorWaveFunction> & qbar,
unsigned int flow) const;
/**
* Matrix element for \f$q\bar{q}\to gg\f$
* @param q The wavefunction for the incoming quark
* @param qbar The wavefunction for the incoming antiquark
* @param g1 The wavefunctions for the first outgoing gluon
* @param g2 The wavefunctions for the second outgoing gluon
* @param flow The colour flow
*/
double qqbar2ggME(vector<SpinorWaveFunction> & q,vector<SpinorBarWaveFunction> & qbar,
vector<VectorWaveFunction> &g1,vector<VectorWaveFunction> &g2,
unsigned int flow) const;
/**
* Matrix element for \f$qg\to qg\f$
* @param qin The wavefunction for the incoming quark
* @param g2 The wavefunction for the incoming gluon
* @param qout The wavefunction for the outgoing quark
* @param g4 The wavefunction for the outgoing gluon
* @param flow The colour flow
*/
double qg2qgME(vector<SpinorWaveFunction> & qin,vector<VectorWaveFunction> &g2,
vector<SpinorBarWaveFunction> & qout,vector<VectorWaveFunction> &g4,
unsigned int flow) const;
/**
* Matrix elements for \f$\bar{q}g\to \bar{q}g\f$.
* @param qin The wavefunction for the incoming antiquark
* @param g2 The wavefunction for the incoming gluon
* @param qout The wavefunction for the outgoing antiquark
* @param g4 The wavefunction for the outgoing gluon
* @param flow The colour flow
*/
double qbarg2qbargME(vector<SpinorBarWaveFunction> & qin,
vector<VectorWaveFunction> &g2,
vector<SpinorWaveFunction> & qout,vector<VectorWaveFunction> &g4,
unsigned int flow) const;
/**
* Matrix element for \f$qq\to qq\f$
* @param q1 The wavefunction for the first incoming quark
* @param q2 The wavefunction for the second incoming quark
* @param q3 The wavefunction for the first outgoing quark
* @param q4 The wavefunction for the second outgoing quark
* @param flow The colour flow
*/
double qq2qqME(vector<SpinorWaveFunction> & q1, vector<SpinorWaveFunction> & q2,
vector<SpinorBarWaveFunction> & q3, vector<SpinorBarWaveFunction> & q4,
unsigned int flow) const;
/**
* Matrix element for \f$\bar{q}\bar{q}\to \bar{q}\bar{q}\f$
* @param q1 The wavefunction for the first incoming antiquark
* @param q2 The wavefunction for the second incoming antiquark
* @param q3 The wavefunction for the first outgoing antiquark
* @param q4 The wavefunction for the second outgoing antiquark
* @param flow The colour flow
*/
double qbarqbar2qbarqbarME(vector<SpinorBarWaveFunction> & q1,
vector<SpinorBarWaveFunction> & q2,
vector<SpinorWaveFunction> & q3,
vector<SpinorWaveFunction> & q4,
unsigned int flow) const;
/**
* Matrix element for \f$q\bar{q}\to q\bar{q}\f$
* @param q1 The wavefunction for the incoming quark
* @param q2 The wavefunction for the incoming antiquark
* @param q3 The wavefunction for the outgoing quark
* @param q4 The wavefunction for the outgoing antiquark
* @param flow The colour flow
*/
double qqbar2qqbarME(vector<SpinorWaveFunction> & q1,
vector<SpinorBarWaveFunction> & q2,
vector<SpinorBarWaveFunction> & q3,
vector<SpinorWaveFunction> & q4,
unsigned int flow) const;
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEQCD2to2 & operator=(const MEQCD2to2 &);
+ MEQCD2to2 & operator=(const MEQCD2to2 &) = delete;
private:
/**
* Vertices needed to compute the diagrams
*/
//@{
/**
* \f$gggg\f$ vertex
*/
AbstractVVVVVertexPtr _ggggvertex;
/**
* \f$ggg\f$ vertex
*/
AbstractVVVVertexPtr _gggvertex;
/**
* \f$q\bar{q}g\f$ vertex
*/
AbstractFFVVertexPtr _qqgvertex;
//@}
/**
* Maximum numbere of quark flavours to include
*/
unsigned int _maxflavour;
/**
* Processes to include
*/
unsigned int _process;
/**
* Colour flow
*/
mutable unsigned int _flow;
/**
* Diagram
*/
mutable unsigned int _diagram;
/**
* Matrix element
*/
mutable ProductionMatrixElement _me;
/**
* ParticleData objects of the partons
*/
//@{
/**
* The gluon
*/
PDPtr _gluon;
/**
* the quarks
*/
vector<PDPtr> _quark;
/**
* the antiquarks
*/
vector<PDPtr> _antiquark;
//@}
};
}
#endif /* HERWIG_MEQCD2to2_H */
diff --git a/MatrixElement/Hadron/MEQCD2to2Fast.h b/MatrixElement/Hadron/MEQCD2to2Fast.h
--- a/MatrixElement/Hadron/MEQCD2to2Fast.h
+++ b/MatrixElement/Hadron/MEQCD2to2Fast.h
@@ -1,341 +1,341 @@
// -*- C++ -*-
//
// MEQCD2to2Fast.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEQCD2to2Fast_H
#define HERWIG_MEQCD2to2Fast_H
//
// This is the declaration of the MEQCD2to2Fast class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Repository/UseRandom.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEQCD2to2Fast class implements the matrix elements for
* QCD \f$2\to2\f$ scattering processes using hard coded formulae and
* as such can not include spin correlations. It is designed to be a faster
* replacement for MEQCD2to2 for use in the underlying event.
*
* @see \ref MEQCD2to2FastInterfaces "The interfaces"
* defined for MEQCD2to2Fast.
*/
class MEQCD2to2Fast: public HwMEBase {
public:
/**
* The default constructor.
*/
MEQCD2to2Fast() :_maxflavour(5),_process(0),_strictFlavourScheme(false) {
massOption(vector<unsigned int>(2,0));
}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Members to calculate the matrix elements
*/
//@{
/**
* Matrix element for \f$gg\to gg\f$.
*/
double gg2ggME() const {
Energy2 u(uHat()),t(tHat()),s(sHat());
double output = 9./4.*(3.-t*u/s/s-s*u/t/t-s*t/u/u);
double flow[3]={(1.-u*t/s/s-s*t/u/u+t*t/s/u),
(1.-t*u/s/s-s*u/t/t+u*u/s/t),
(1.-t*s/u/u-u*s/t/t+s*s/u/t)};
_flow = 1+UseRandom::rnd3(flow[0],flow[1],flow[2]);
double diag[3]={(sqr(u)+sqr(t))/sqr(s),
(sqr(s)+sqr(u))/sqr(t),
(sqr(s)+sqr(t))/sqr(u)};
if(_flow==1) diag[1]=0;
else if(_flow==2) diag[2]=0;
else if(_flow==3) diag[0]=0;
_diagram=1+UseRandom::rnd3(diag[0],diag[1],diag[2]);
return output;
}
/**
* Matrix element for \f$gg\to q\bar{q}\f$
*/
double gg2qqbarME() const {
Energy2 u(uHat()),t(tHat()),s(sHat());
Energy4 u2(sqr(u)),t2(sqr(t)),s2(sqr(s));
double output =(1./6./u/t-3./8./s2)*(t2+u2);
double flow[2]={u2/(u2+t2),t2/(u2+t2)};
_flow = 1+UseRandom::rnd2(flow[0],flow[1]);
_diagram=3+_flow;
return output;
}
/**
* Matrix element for \f$q\bar{q}\to gg\f$
*/
double qqbar2ggME() const {
Energy2 u(uHat()),t(tHat()),s(sHat());
Energy4 s2(sqr(s)),u2(sqr(u)),t2(sqr(t));
double output = 0.5*(32./27./u/t-8./3./s2)*(t2+u2);
double flow[2] = {u2/(u2+t2),t2/(t2+u2)};
_flow=1+UseRandom::rnd2(flow[0],flow[1]);
_diagram=6+_flow;
return output;
}
/**
* Matrix element for \f$qg\to qg\f$
*/
double qg2qgME() const {
Energy2 u(uHat()),t(tHat()),s(sHat());
Energy4 s2(sqr(s)),u2(sqr(u)),t2(sqr(t));
double output = (-4./9./s/u+1./t2)*(s2+u2);
double flow[2]={u2/(s2+u2),s2/(s2+u2)};
_flow=1+UseRandom::rnd2(flow[0],flow[1]);
_diagram=9+_flow;
return output;
}
/**
* Matrix elements for \f$\bar{q}g\to \bar{q}g\f$.
*/
double qbarg2qbargME() const {
// scale
Energy2 u(uHat()),t(tHat()),s(sHat());
Energy4 u2(sqr(u)),s2(sqr(s)); // t2(sqr(t))
double flow[2]={u2/(s2+u2),s2/(s2+u2)};
_flow=1+UseRandom::rnd2(flow[0],flow[1]);
_diagram=12+_flow;
return (-4./9./s/u+1./t/t)*(s*s+u*u);
}
/**
* Matrix element for \f$qq\to qq\f$
*/
double qq2qqME() const {
Energy2 u(uHat()),t(tHat());
Energy4 s2(sqr(sHat())),u2(sqr(u)),t2(sqr(t));
double output;
if(mePartonData()[0]->id()==mePartonData()[1]->id()) {
output = 0.5*(4./9.*((s2+u2)/t2+(s2+t2)/u2)
-8./27.*s2/u/t);
double flow[2]={(s2+u2)/t2,(s2+t2)/u2};
_flow=1+UseRandom::rnd2(flow[0],flow[1]);
}
else {
output = 4./9.*(s2+u2)/t2;
_flow=2;
}
_diagram = 15+_flow;
return output;
}
/**
* Matrix element for \f$\bar{q}\bar{q}\to \bar{q}\bar{q}\f$
*/
double qbarqbar2qbarqbarME() const {
Energy2 u(uHat()),t(tHat());
Energy4 u2(sqr(u)),t2(sqr(t)),s2(sqr(sHat()));
double output;
if(mePartonData()[0]->id()==mePartonData()[1]->id()) {
output = 0.5*(4./9.*((s2+u2)/t2+(s2+t2)/u2)
-8./27.*s2/u/t);
double flow[2]={(s2+u2)/t2,(s2+t2)/u2};
_flow=1+UseRandom::rnd2(flow[0],flow[1]);
}
else {
output = 4./9.*(s2+u2)/t2;
_flow = 2;
}
_diagram = 17+_flow;
// final part of colour and spin factors
return output;
}
/**
* Matrix element for \f$q\bar{q}\to q\bar{q}\f$
*/
double qqbar2qqbarME() const {
// type of process
bool diagon[2]={mePartonData()[0]->id()== -mePartonData()[1]->id(),
mePartonData()[0]->id()== mePartonData()[2]->id()};
// scale
Energy2 u(uHat()),t(tHat()),s(sHat());
Energy4 s2(sqr(s)),t2(sqr(t)),u2(sqr(u));
double output;
if(diagon[0]&&diagon[1]) {
output= (4./9.*((s2+u2)/t2+(u2+t2)/s2)
-8./27.*u2/s/t);
double flow[2]={(t2+u2)/s2,(s2+u2)/t2};
_flow=1+UseRandom::rnd2(flow[0],flow[1]);
}
else if(diagon[0]) {
output = (4./9.*(t2+u2)/s2);
_flow=1;
}
else {
output = (4./9.*(s2+u2)/t2);
_flow=2;
}
_diagram=19+_flow;
return output;
}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEQCD2to2Fast & operator=(const MEQCD2to2Fast &);
+ MEQCD2to2Fast & operator=(const MEQCD2to2Fast &) = delete;
private:
/**
* Maximum numbere of quark flavours to include
*/
unsigned int _maxflavour;
/**
* Processes to include
*/
unsigned int _process;
/**
* Colour flow
*/
mutable unsigned int _flow;
/**
* Diagram
*/
mutable unsigned int _diagram;
/**
* Exclude contributions with massive incominbg quarks
*/
bool _strictFlavourScheme;
};
}
#endif /* HERWIG_MEQCD2to2Fast_H */
diff --git a/MatrixElement/Hadron/MEqq2W2ff.h b/MatrixElement/Hadron/MEqq2W2ff.h
--- a/MatrixElement/Hadron/MEqq2W2ff.h
+++ b/MatrixElement/Hadron/MEqq2W2ff.h
@@ -1,231 +1,231 @@
// -*- C++ -*-
//
// MEqq2W2ff.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEqq2W2ff_H
#define HERWIG_MEqq2W2ff_H
//
// This is the declaration of the MEqq2W2ff class.
//
#include "Herwig/MatrixElement/DrellYanBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEqq2W2ff class implements the matrix element for \f$q\bar{q'}\to W^\pm\f$
* including the decay of the \f$W^\pm\f$ to Standard Model fermions.
*
* @see \ref MEqq2W2ffInterfaces "The interfaces"
* defined for MEqq2W2ff.
*/
class MEqq2W2ff: public DrellYanBase {
public:
/**
* The default constructor.
*/
MEqq2W2ff();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$q\bar{q}\to \gamma/Z \to f\bar{f}\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param fout Spinors for incoming quark
* @param aout Spinors for incoming antiquark
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qqbarME(vector<SpinorWaveFunction> & fin ,
vector<SpinorBarWaveFunction> & ain ,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
bool me) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEqq2W2ff & operator=(const MEqq2W2ff &);
+ MEqq2W2ff & operator=(const MEqq2W2ff &) = delete;
private:
/**
* Pointer to the W vertex
*/
AbstractFFVVertexPtr _theFFWVertex;
/**
* Pointers to the intermediates resonances
*/
//@{
/**
* Pointer to the \f$W^+\f$
*/
tcPDPtr _wp;
/**
* Pointer to the \f$W^-\f$
*/
tcPDPtr _wm;
//@}
/**
* Switches to control the particles in the hard process
*/
//@{
/**
* The allowed flavours of the incoming quarks
*/
unsigned int _maxflavour;
/**
* Which intermediate \f$W^\pm\f$ bosons to include
*/
unsigned int _plusminus;
/**
* Which decay products of the \f$W^\pm\f$ to include
*/
unsigned int _process;
//@}
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
};
}
#endif /* HERWIG_MEqq2W2ff_H */
diff --git a/MatrixElement/Hadron/MEqq2gZ2ff.h b/MatrixElement/Hadron/MEqq2gZ2ff.h
--- a/MatrixElement/Hadron/MEqq2gZ2ff.h
+++ b/MatrixElement/Hadron/MEqq2gZ2ff.h
@@ -1,252 +1,252 @@
// -*- C++ -*-
//
// MEqq2gZ2ff.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEqq2gZ2ff_H
#define HERWIG_MEqq2gZ2ff_H
//
// This is the declaration of the MEqq2gZ2ff class.
//
#include "Herwig/MatrixElement/DrellYanBase.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEqq2gZ2ff class implements the products of Standard Model
* fermion antifermion pairs via the \f$Z^0\f$ resonance including
* photon interference terms.
*
* @see \ref MEqq2gZ2ffInterfaces "The interfaces"
* defined for MEqq2gZ2ff.
*/
class MEqq2gZ2ff: public DrellYanBase {
public:
/**
* The default constructor.
*/
MEqq2gZ2ff();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$q\bar{q}\to \gamma/Z \to f\bar{f}\f$.
* @param fin Spinors for incoming quark
* @param ain Spinors for incoming antiquark
* @param fout Spinors for incoming quark
* @param aout Spinors for incoming antiquark
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double qqbarME(vector<SpinorWaveFunction> & fin ,
vector<SpinorBarWaveFunction> & ain ,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
bool me) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEqq2gZ2ff & operator=(const MEqq2gZ2ff &);
+ MEqq2gZ2ff & operator=(const MEqq2gZ2ff &) = delete;
private:
/**
* Pointer to the vertices for the helicity calculations
*/
//@{
/**
* Pointer to the Z vertex
*/
AbstractFFVVertexPtr _theFFZVertex;
/**
* Pointer to the photon vertex
*/
AbstractFFVVertexPtr _theFFPVertex;
//@}
/**
* Pointers to the intermediate resonances
*/
//@{
/**
* Pointer to the Z ParticleData object
*/
tcPDPtr _z0;
/**
* Pointer to the photon ParticleData object
*/
tcPDPtr _gamma;
//@}
/**
* Switches to control the particles in the hard process
*/
//@{
/**
* Minimum allowed flavour for the incoming quarks
*/
int _minflavour;
/**
* Maximum allowed flavour for the incoming quarks
*/
int _maxflavour;
/**
* Whether to include both \f$Z^0\f$ and \f$\gamma\f$ or only one
*/
unsigned int _gammaZ;
/**
* Which processes to include
*/
int _process;
//@}
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
/**
* Whether of not to construct the vertex for spin correlations
*/
bool spinCorrelations_;
};
}
#endif /* HERWIG_MEqq2gZ2ff_H */
diff --git a/MatrixElement/Hadron/Makefile.am b/MatrixElement/Hadron/Makefile.am
--- a/MatrixElement/Hadron/Makefile.am
+++ b/MatrixElement/Hadron/Makefile.am
@@ -1,28 +1,28 @@
pkglib_LTLIBRARIES = HwMEHadron.la
HwMEHadron_la_SOURCES = \
MEqq2gZ2ff.cc MEqq2gZ2ff.h \
MEqq2W2ff.cc MEqq2W2ff.h \
MEPP2GammaJet.h MEPP2GammaJet.cc\
MEQCD2to2.h MEQCD2to2.cc\
MEPP2HiggsJet.h MEPP2HiggsJet.cc\
MEPP2GammaGamma.h MEPP2GammaGamma.cc \
MEPP2QQ.h MEPP2QQ.cc \
MEPP2QQHiggs.h MEPP2QQHiggs.cc \
MEPP2Higgs.h MEPP2Higgs.cc\
MEPP2WH.h MEPP2WH.cc \
MEPP2ZH.h MEPP2ZH.cc \
MEPP2WJet.cc MEPP2WJet.h \
MEPP2ZJet.cc MEPP2ZJet.h \
MEPP2VV.cc MEPP2VV.h \
MEPP2VGamma.cc MEPP2VGamma.h \
MEPP2HiggsVBF.cc MEPP2HiggsVBF.h \
MEPP2SingleTop.cc MEPP2SingleTop.h \
MEMinBias.h MEMinBias.cc \
MEDiffraction.h MEDiffraction.cc
-HwMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:2:0
+HwMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 9:0:0
pkglib_LTLIBRARIES += HwMEHadronFast.la
HwMEHadronFast_la_SOURCES = \
MEQCD2to2Fast.h MEQCD2to2Fast.cc
-HwMEHadronFast_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0
+HwMEHadronFast_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0
diff --git a/MatrixElement/HardVertex.h b/MatrixElement/HardVertex.h
--- a/MatrixElement/HardVertex.h
+++ b/MatrixElement/HardVertex.h
@@ -1,99 +1,99 @@
// -*- C++ -*-
//
// HardVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HardVertex_H
#define HERWIG_HardVertex_H
//
// This is the declaration of the HardVertex class.
#include "ThePEG/EventRecord/HelicityVertex.h"
#include "ProductionMatrixElement.h"
#include "HardVertex.fh"
// #include "HardVertex.xh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
* \author Peter Richardson
*
* The HardVertex class is designed to implement the vertex for a
* hard interaction for the Herwig spin correlation algorithm.
* It inherits from the HelicityVertex class of ThePEG and implements
* the methods to calculate the \f$\rho\f$ and \f$D\f$ matrices.
*
* The ProductionMatrixElement class is used to store the matrix element
* and this class performs the calculations of the matrices.
*
* @see HelicityVertex
* @see ProductionMatrixElement
*/
class HardVertex: public HelicityVertex {
public:
/**
* Access to the matrix element
*/
//@{
/**
* Get the matrix element
*/
const ProductionMatrixElement & ME() const {
return _matrixelement;
}
/**
* Set the matrix element
*/
void ME(const ProductionMatrixElement & in) const {
_matrixelement.reset(in);
}
//@}
public:
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/**
* Method to calculate the \f$\rho\f$ matrix for one of the outgoing particles
* @param iout The outgoing particle we are calculating the \f$\rho\f$ matrix for.
*/
virtual RhoDMatrix getRhoMatrix(int iout,bool) const;
/**
* Method to calculate the \f$D\f$ matrix for an incoming particle.
* @param in The incoming particle we are calculating the \f$D\f$ matrix for.
*/
virtual RhoDMatrix getDMatrix(int in) const;
private:
/**
* Private and non-existent assignment operator.
*/
- HardVertex & operator=(const HardVertex &);
+ HardVertex & operator=(const HardVertex &) = delete;
private:
/**
* Storage of the matrix element.
*/
ProductionMatrixElement _matrixelement;
};
}
#endif /* HERWIG_HardVertex_H */
diff --git a/MatrixElement/HwMEBase.h b/MatrixElement/HwMEBase.h
--- a/MatrixElement/HwMEBase.h
+++ b/MatrixElement/HwMEBase.h
@@ -1,293 +1,293 @@
// -*- C++ -*-
#ifndef HERWIG_HwMEBase_H
#define HERWIG_HwMEBase_H
//
// This is the declaration of the HwMEBase class.
//
#include "ThePEG/MatrixElement/MEBase.h"
#include "Herwig/Shower/RealEmissionProcess.fh"
#include "Herwig/Shower/ShowerInteraction.h"
#include "ThePEG/PDF/BeamParticleData.h"
#include "HwMEBase.fh"
namespace Herwig {
struct Branching;
using namespace ThePEG;
typedef Ptr<BeamParticleData>::transient_const_pointer tcBeamPtr;
/**
* The HwMEBase class serves a number of purposes
* - it implements the phase space for \f$2\to2\f$ scattering processes
* - it provides virtual members for the implementation of hard radiation
* - it gives us greater control over the masses of the outgoing
* particles so that they can be
* - set massless where required by gauge invariance
* - have their off-shell masses generated using the sophisticated approaches
* available in Herwig.
*
* @see \ref HwMEBaseInterfaces "The interfaces"
* defined for HwMEBase.
*/
class HwMEBase: public MEBase {
public:
/**
* Default constructor.
*/
HwMEBase() : lastTHat_(ZERO), lastUHat_(ZERO),
lastPhi_(0.0), rescaleOption_(1)
{}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given 'nDim()' uniform
* random numbers in the interval ]0,1[. To help the phase space
* generator, the 'dSigHatDR()' should be a smooth function of these
* numbers, although this is not strictly necessary. Return
* false if the chosen points failed the kinematical cuts.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object.
*/
virtual void setKinematics();
//@}
/**
* Virtual members to be overridden by inheriting classes
* which implement hard corrections
*/
//@{
/**
* Type of POWHEG correction
*/
enum POWHEGType {No, ISR, FSR, Both};
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return No;}
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return false;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr , double & ,
double & );
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Access cached values in of the last set phase space point. */
//@{
/**
* Return the \f$\hat{t}\f$ of the last set phase space point.
*/
Energy2 tHat() const { return lastTHat_; }
/**
* Return the \f$\hat{u}\f$ of the last set phase space point.
*/
Energy2 uHat() const { return lastUHat_; }
/**
* Return the azimuth angle of the last set phase space point.
*/
double phi() const { return lastPhi_; }
//@}
/** @name Set the cached values in of the last set phase space point. */
//@{
/**
* Set the \f$\hat{t}\f$ of the last set phase space point.
*/
void tHat(Energy2 e2) { lastTHat_ = e2; }
/**
* Set the \f$\hat{u}\f$ of the last set phase space point.
*/
void uHat(Energy2 e2) { lastUHat_ = e2; }
/**
* Set the azimuth angle of the last set phase space point.
*/
void phi(double phi) { lastPhi_ = phi; }
//@}
/**
* Set the treatment of the outgoing masses
* @param iopt The option for the treatment of the mass
*/
void massOption(vector<unsigned int> iopt) {
massOption_ = iopt;
}
/**
* Rescaled momenta for the helicity ME
*/
//@{
/**
* Set the treatment of the rescaling of the momenta for
* the matrix element calculation
* @param iopt The rescaling option
*/
void rescalingOption(unsigned int iopt) {
rescaleOption_=iopt;
}
/**
* rescale the momenta for the computation of the helicity matrix element
*/
bool rescaleMomenta(const vector<Lorentz5Momentum> &,
const cPDVector &);
/**
* Access to the rescaled momenta
*/
const vector<Lorentz5Momentum> & rescaledMomenta() const {
return rescaledMomenta_;
}
//@}
/**
* Generate the masses of the particles
*/
bool generateMasses(vector<Energy> & masses, double & mjac,
const double *r);
/**
* Used internally by generateKinematics, after calculating the
* limits on cos(theta).
*/
virtual double getCosTheta(double cthmin, double cthmax, const double r);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HwMEBase & operator=(const HwMEBase &);
+ HwMEBase & operator=(const HwMEBase &) = delete;
private:
/**
* Option for the treatment of the particle masses
*/
vector<unsigned int> massOption_;
/**
* The \f$\hat{t}\f$ of the last set phase space point.
*/
Energy2 lastTHat_;
/**
* The \f$\hat{u}\f$ of the last set phase space point.
*/
Energy2 lastUHat_;
/**
* The azimuth angle of the last set phase space point.
*/
double lastPhi_;
/**
* Produced to produce rescaled momenta
*/
unsigned int rescaleOption_;
/**
* Rescaled momenta for use in ME calculations
*/
vector<Lorentz5Momentum> rescaledMomenta_;
};
}
#endif /* HERWIG_HwMEBase_H */
diff --git a/MatrixElement/Lepton/MEee2Higgs2SM.h b/MatrixElement/Lepton/MEee2Higgs2SM.h
--- a/MatrixElement/Lepton/MEee2Higgs2SM.h
+++ b/MatrixElement/Lepton/MEee2Higgs2SM.h
@@ -1,236 +1,236 @@
// -*- C++ -*-
//
// MEee2Higgs2SM.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEee2Higgs2SM_H
#define HERWIG_MEee2Higgs2SM_H
//
// This is the declaration of the MEee2Higgs2SM class.
//
#include "ThePEG/MatrixElement/ME2to2Base.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEee2Higgs2SM class implements the production of an \f$s\f$-channel
* Higgs in \f$e^+e^-\f$ collisions in order to allow easy tests of Higgs
* decays. It should not be used for physics studies.
*
* @see \ref MEee2Higgs2SMInterfaces "The interfaces"
* defined for MEee2Higgs2SM.
*/
class MEee2Higgs2SM: public ME2to2Base {
public:
/**
* The default constructor.
*/
inline MEee2Higgs2SM() : allowed_(0) {}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* set up the spin correlations
*/
virtual void constructVertex(tSubProPtr sub);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* The matrix element
* @param fin The incoming spinor wavefunction
* @param ain The incoming spinorbar wavefunction
* @param fout The outgoing spinor bar wavefunction
* @param aout The outgoing spinor wavefunction
* @param me The spin averaged matrix element
*/
ProductionMatrixElement HelicityME(vector<SpinorWaveFunction> fin,
vector<SpinorBarWaveFunction> ain,
vector<SpinorBarWaveFunction> fout,
vector<SpinorWaveFunction> aout,double& me) const;
/**
* \f$H\to gg\f$ matrix element
* @param fin The incoming spinor wavefunction
* @param ain The incoming spinorbar wavefunction
* @param g1 Outgoing gluon wavefunction
* @param g2 Outgoing gluon wavefunction
* @param me The spin averaged matrix element
*/
ProductionMatrixElement ggME(vector<SpinorWaveFunction> fin,
vector<SpinorBarWaveFunction> ain,
vector<VectorWaveFunction> g1,
vector<VectorWaveFunction> g2,
double & me) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2Higgs2SM & operator=(const MEee2Higgs2SM &);
+ MEee2Higgs2SM & operator=(const MEee2Higgs2SM &) = delete;
private:
/**
* Pointer to the Higgs fermion-antifermion vertex
*/
AbstractFFSVertexPtr FFHVertex_;
/**
* Pointer to Higgs-gluon-gluon vertex
*/
AbstractVVSVertexPtr HGGVertex_;
/**
* Allowed outgoing particles
*/
int allowed_;
/**
* Pointer to the Higgs ParticleData object
*/
PDPtr h0_;
};
}
#endif /* HERWIG_MEee2Higgs2SM_H */
diff --git a/MatrixElement/Lepton/MEee2HiggsVBF.h b/MatrixElement/Lepton/MEee2HiggsVBF.h
--- a/MatrixElement/Lepton/MEee2HiggsVBF.h
+++ b/MatrixElement/Lepton/MEee2HiggsVBF.h
@@ -1,83 +1,83 @@
// -*- C++ -*-
#ifndef HERWIG_MEee2HiggsVBF_H
#define HERWIG_MEee2HiggsVBF_H
//
// This is the declaration of the MEee2HiggsVBF class.
//
#include "Herwig/MatrixElement/MEfftoffH.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEee2HiggsVBF class
*
* @see \ref MEee2HiggsVBFInterfaces "The interfaces"
* defined for MEee2HiggsVBF.
*/
class MEee2HiggsVBF: public MEfftoffH {
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2HiggsVBF & operator=(const MEee2HiggsVBF &);
+ MEee2HiggsVBF & operator=(const MEee2HiggsVBF &) = delete;
};
}
#endif /* HERWIG_MEee2HiggsVBF_H */
diff --git a/MatrixElement/Lepton/MEee2VV.h b/MatrixElement/Lepton/MEee2VV.h
--- a/MatrixElement/Lepton/MEee2VV.h
+++ b/MatrixElement/Lepton/MEee2VV.h
@@ -1,233 +1,233 @@
// -*- C++ -*-
#ifndef HERWIG_MEee2VV_H
#define HERWIG_MEee2VV_H
//
// This is the declaration of the MEee2VV class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEee2VV class implements the matrix elements for
* \f$e^+e^-\to W^+W^-/|^0Z^0\f$.
*
* @see \ref MEee2VVInterfaces "The interfaces"
* defined for MEee2VV.
*/
class MEee2VV: public HwMEBase {
public:
/**
* The default constructor.
*/
MEee2VV();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Used internally by generateKinematics, after calculating the
* limits on cos(theta).
*/
virtual double getCosTheta(double cthmin, double cthmax, const double r);
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$f\bar{f}\to W^+W^-\f$.
* @param f1 Spinors for the incoming fermion
* @param a1 Spinors for the incoming antifermion
* @param v1 Polarization vector for the 1st outgoing boson
* @param v2 Polarization vector for the 2nd outgoing boson
*/
double WWME(vector<SpinorWaveFunction> & f1,
vector<SpinorBarWaveFunction> & a1,
vector<VectorWaveFunction> & v1,
vector<VectorWaveFunction> & v2) const;
/**
* Matrix element for \f$f\bar{f}\to Z^0Z^0\f$.
* @param f1 Spinors for the incoming fermion
* @param a1 Spinors for the incoming antifermion
* @param v1 Polarization vector for the 1st outgoing boson
* @param v2 Polarization vector for the 2nd outgoing boson
*/
double ZZME(vector<SpinorWaveFunction> & f1,
vector<SpinorBarWaveFunction> & a1,
vector<VectorWaveFunction> & v1,
vector<VectorWaveFunction> & v2) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2VV & operator=(const MEee2VV &);
+ MEee2VV & operator=(const MEee2VV &) = delete;
private:
/**
* Vertices
*/
//@{
/**
* FFPVertex
*/
AbstractFFVVertexPtr FFPvertex_;
/**
* FFWVertex
*/
AbstractFFVVertexPtr FFWvertex_;
/**
* FFZVertex
*/
AbstractFFVVertexPtr FFZvertex_;
/**
* WWW Vertex
*/
AbstractVVVVertexPtr WWWvertex_;
//@}
/**
* Processes
*/
unsigned int process_;
/**
* Treatment of the the W and Z masses
*/
unsigned int massOption_;
/**
* The matrix element
*/
mutable ProductionMatrixElement me_;
};
}
#endif /* HERWIG_MEee2VV_H */
diff --git a/MatrixElement/Lepton/MEee2VectorMeson.h b/MatrixElement/Lepton/MEee2VectorMeson.h
--- a/MatrixElement/Lepton/MEee2VectorMeson.h
+++ b/MatrixElement/Lepton/MEee2VectorMeson.h
@@ -1,236 +1,236 @@
// -*- C++ -*-
//
// MEee2VectorMeson.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef THEPEG_MEee2VectorMeson_H
#define THEPEG_MEee2VectorMeson_H
//
// This is the declaration of the MEee2VectorMeson class.
//
#include "ThePEG/MatrixElement/MEBase.h"
#include "Herwig/PDT/GenericMassGenerator.fh"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::SpinorWaveFunction;
using Helicity::SpinorBarWaveFunction;
using Helicity::VectorWaveFunction;
/**
* The MEee2VectorMeson class is designed to produce neutral vector mesons
* in \f$e^+e^-\f$ collisions and is primarily intended to test the hadronic
* decay package.
*
* @see \ref MEee2VectorMesonInterfaces "The interfaces"
* defined for MEee2VectorMeson.
*/
class MEee2VectorMeson: public MEBase {
public:
/**
* The default constructor.
*/
inline MEee2VectorMeson() :_coupling(0.0012), _lineshape(false)
{}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Set up the spin correlations
*/
virtual void constructVertex(tSubProPtr sub);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Member to return the helicity amplitudes
*/
ProductionMatrixElement HelicityME(vector<SpinorWaveFunction> fin,
vector<SpinorBarWaveFunction> ain,
vector<VectorWaveFunction> vout,double& me) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2VectorMeson & operator=(const MEee2VectorMeson &);
+ MEee2VectorMeson & operator=(const MEee2VectorMeson &) = delete;
private:
/**
* The vector meson being produced
*/
PDPtr _vector;
/**
* The coupling
*/
double _coupling;
/**
* Use the mass generator for the line shape
*/
bool _lineshape;
/**
* Pointer to the mass generator for the Higgs
*/
GenericMassGeneratorPtr _massgen;
};
}
#endif /* THEPEG_MEee2VectorMeson_H */
diff --git a/MatrixElement/Lepton/MEee2ZH.h b/MatrixElement/Lepton/MEee2ZH.h
--- a/MatrixElement/Lepton/MEee2ZH.h
+++ b/MatrixElement/Lepton/MEee2ZH.h
@@ -1,93 +1,93 @@
// -*- C++ -*-
#ifndef HERWIG_MEee2ZH_H
#define HERWIG_MEee2ZH_H
//
// This is the declaration of the MEee2ZH class.
//
#include "Herwig/MatrixElement/MEfftoVH.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEee2ZH class implements the matrix element
* for \f$e^+e^-\to Z^0h^0\f$.
*
* @see \ref MEee2ZHInterfaces "The interfaces"
* defined for MEee2ZH.
*/
class MEee2ZH: public MEfftoVH {
public:
/** @name Virtual functions required by the MEfftoVH class. */
//@{
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Has not got a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return No;}
/**
* Has not got an old fashioned ME correction
*/
virtual bool hasMECorrection() {return false;}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2ZH & operator=(const MEee2ZH &);
+ MEee2ZH & operator=(const MEee2ZH &) = delete;
};
}
#endif /* HERWIG_MEee2ZH_H */
diff --git a/MatrixElement/Lepton/MEee2gZ2ll.h b/MatrixElement/Lepton/MEee2gZ2ll.h
--- a/MatrixElement/Lepton/MEee2gZ2ll.h
+++ b/MatrixElement/Lepton/MEee2gZ2ll.h
@@ -1,366 +1,366 @@
// -*- C++ -*-
//
// MEee2gZ2ll.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEee2gZ2ll_H
#define HERWIG_MEee2gZ2ll_H
//
// This is the declaration of the MEee2gZ2ll class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEee2gZ2ll class provides the matrix element for
* \f$e^+e^-\to\ell^+\ell^-\f$. N.B. for the production of \f$e^+e^-\f$
* only the \f$s\f$-channel Z and photon diagrams are included.
*
* @see \ref MEee2gZ2llInterfaces "The interfaces"
* defined for MEee2gZ2ll.
*/
class MEee2gZ2ll: public HwMEBase {
public:
/**
* The default constructor.
*/
MEee2gZ2ll() : allowed_(0), pTmin_(GeV),
preFactor_(6.) {
massOption(vector<unsigned int>(2,1));
}
/**
* Members for hard corrections to the emission of QCD radiation
*/
//@{
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return false;}
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction);
//@}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
protected:
/**
* Calculate the matrix element for \f$e^+e^-\to \ell^+ \ell^-\f$.
* @param partons The incoming and outgoing particles
* @param momenta The momenta of the incoming and outgoing particles
*/
double loME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta,
bool first) const;
/**
* Member to calculate the matrix element
* @param fin Spinors for incoming fermion
* @param ain Spinors for incoming antifermion
* @param fout Spinors for outgoing fermion
* @param aout Spinors for outgong antifermion
* @param me Spin summed Matrix element
* @param cont The continuum piece of the matrix element
* @param BW The Z piece of the matrix element
*/
ProductionMatrixElement HelicityME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
double & me,
double & cont,
double & BW ) const;
/**
* The ratio of the matrix element for one additional jet over the
* leading order result. In practice
* \[\frac{\hat{s}|\overline{\mathcal{M}}|^2_2|D_{\rm emit}|}{4\pi C_F\alpha_S|\overline{\mathcal{M}}|^2_3\left(|D_{\rm emit}|+|D_{\rm spect}\right)}}\]
* is returned where \f$\|\overline{\mathcal{M}}|^2\f$ is
* the spin and colour summed/averaged matrix element.
* @param partons The incoming and outgoing particles
* @param momenta The momenta of the incoming and outgoing particles
* @param iemitter Whether the quark or antiquark is regardede as the emitter
* @param inter The type of interaction
*/
double meRatio(vector<cPDPtr> partons,
vector<Lorentz5Momentum> momenta,
unsigned int iemittor,
bool subtract=false) const;
/**
* Calculate the matrix element for \f$e^-e^-\to q \bar q g$.
* @param partons The incoming and outgoing particles
* @param momenta The momenta of the incoming and outgoing particles
* @param inter The type of interaction
*/
InvEnergy2 realME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta) const;
/**
* Generate the momenta for a hard configuration
*/
Energy generateHard(RealEmissionProcessPtr tree,
vector<Lorentz5Momentum> & emission,
unsigned int & iemit, unsigned int & ispect,
bool applyVeto);
protected:
/**
* Pointer to the fermion-antifermion Z vertex
*/
AbstractFFVVertexPtr FFZVertex() const {return FFZVertex_;}
/**
* Pointer to the fermion-antifermion photon vertex
*/
AbstractFFVVertexPtr FFPVertex() const {return FFPVertex_;}
/**
* Pointer to the particle data object for the Z
*/
PDPtr Z0() const {return Z0_;}
/**
* Pointer to the particle data object for the photon
*/
PDPtr gamma() const {return gamma_;}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2gZ2ll & operator=(const MEee2gZ2ll &);
+ MEee2gZ2ll & operator=(const MEee2gZ2ll &) = delete;
private:
/**
* Pointers to the vertices
*/
//@{
/**
* Pointer to the fermion-antifermion Z vertex
*/
AbstractFFVVertexPtr FFZVertex_;
/**
* Pointer to the fermion-antifermion photon vertex
*/
AbstractFFVVertexPtr FFPVertex_;
//@}
/**
* Pointer to the particle data object for the Z
*/
PDPtr Z0_;
/**
* Pointer to the particle data object for the photon
*/
PDPtr gamma_;
/**
* The allowed outgoing
*/
int allowed_;
/**
* The initial kappa-tilde values for radiation from the quark
*/
double d_kt1_;
/**
* Pointer to the EM coupling
*/
ShowerAlphaPtr alphaQED_;
/**
* Variables for the POWHEG style corrections
*/
//@{
/**
* The cut off on pt, assuming massless quarks.
*/
Energy pTmin_;
/**
* Overestimate for the prefactor
*/
double preFactor_;
/**
* ParticleData objects for the partons
*/
vector<cPDPtr> partons_;
/**
* Momenta of the leading-order partons
*/
vector<Lorentz5Momentum> loMomenta_;
//@}
};
}
#endif /* HERWIG_MEee2gZ2ll_H */
diff --git a/MatrixElement/Lepton/MEee2gZ2qq.cc b/MatrixElement/Lepton/MEee2gZ2qq.cc
--- a/MatrixElement/Lepton/MEee2gZ2qq.cc
+++ b/MatrixElement/Lepton/MEee2gZ2qq.cc
@@ -1,981 +1,981 @@
// -*- C++ -*-
//
// MEee2gZ2qq.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the MEee2gZ2qq class.
//
#include "MEee2gZ2qq.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "Herwig/MatrixElement/HardVertex.h"
#include "ThePEG/PDF/PolarizedBeamParticleData.h"
#include <numeric>
#include "ThePEG/Utilities/DescribeClass.h"
#include "Herwig/Shower/RealEmissionProcess.h"
using namespace Herwig;
const double MEee2gZ2qq::EPS_=0.00000001;
void MEee2gZ2qq::doinit() {
HwMEBase::doinit();
massOption(vector<unsigned int>(2,massopt_));
rescalingOption(3);
if(minflav_>maxflav_)
throw InitException() << "The minimum flavour " << minflav_
<< "must be lower the than maximum flavour " << maxflav_
<< " in MEee2gZ2qq::doinit() "
<< Exception::runerror;
// set the particle data objects
Z0_ = getParticleData(ParticleID::Z0);
gamma_ = getParticleData(ParticleID::gamma);
gluon_ = getParticleData(ParticleID::g);
// cast the SM pointer to the Herwig SM pointer
tcHwSMPtr hwsm= dynamic_ptr_cast<tcHwSMPtr>(standardModel());
// do the initialisation
if(!hwsm) throw InitException()
<< "Wrong type of StandardModel object in "
<< "MEee2gZ2qq::doinit() the Herwig version must be used"
<< Exception::runerror;
FFZVertex_ = hwsm->vertexFFZ();
FFPVertex_ = hwsm->vertexFFP();
FFGVertex_ = hwsm->vertexFFG();
}
void MEee2gZ2qq::getDiagrams() const {
// specific the diagrams
tcPDPtr ep = getParticleData(ParticleID::eplus);
tcPDPtr em = getParticleData(ParticleID::eminus);
tcPDPtr gamma = getParticleData(ParticleID::gamma);
tcPDPtr Z0 = getParticleData(ParticleID::Z0);
// setup the processes
for ( int i =minflav_; i<=maxflav_; ++i ) {
tcPDPtr qk = getParticleData(i);
tcPDPtr qb = qk->CC();
add(new_ptr((Tree2toNDiagram(2), em, ep, 1, gamma, 3, qk, 3, qb, -1)));
add(new_ptr((Tree2toNDiagram(2), em, ep, 1, Z0 , 3, qk, 3, qb, -2)));
}
}
Energy2 MEee2gZ2qq::scale() const {
return sHat();
}
unsigned int MEee2gZ2qq::orderInAlphaS() const {
return 0;
}
unsigned int MEee2gZ2qq::orderInAlphaEW() const {
return 2;
}
Selector<MEBase::DiagramIndex>
MEee2gZ2qq::diagrams(const DiagramVector & diags) const {
double lastCont(0.5),lastBW(0.5);
if ( lastXCombPtr() ) {
lastCont = meInfo()[0];
lastBW = meInfo()[1];
}
Selector<DiagramIndex> sel;
for ( DiagramIndex i = 0; i < diags.size(); ++i ) {
if ( diags[i]->id() == -1 ) sel.insert(lastCont, i);
else if ( diags[i]->id() == -2 ) sel.insert(lastBW, i);
}
return sel;
}
Selector<const ColourLines *>
MEee2gZ2qq::colourGeometries(tcDiagPtr ) const {
static const ColourLines c("-5 4");
Selector<const ColourLines *> sel;
sel.insert(1.0, &c);
return sel;
}
void MEee2gZ2qq::persistentOutput(PersistentOStream & os) const {
os << FFZVertex_ << FFPVertex_ << FFGVertex_
<< Z0_ << gamma_ << gluon_ << minflav_
<< maxflav_ << massopt_ << alphaQCD_ << alphaQED_
<< ounit(pTminQED_,GeV) << ounit(pTminQCD_,GeV) << preFactor_
<< spinCorrelations_;
}
void MEee2gZ2qq::persistentInput(PersistentIStream & is, int) {
is >> FFZVertex_ >> FFPVertex_ >> FFGVertex_
>> Z0_ >> gamma_ >> gluon_ >> minflav_
>> maxflav_ >> massopt_ >> alphaQCD_ >> alphaQED_
>> iunit(pTminQED_,GeV) >> iunit(pTminQCD_,GeV) >> preFactor_
>> spinCorrelations_;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<MEee2gZ2qq,HwMEBase>
describeMEee2gZ2qq("Herwig::MEee2gZ2qq", "HwMELepton.so");
void MEee2gZ2qq::Init() {
static ClassDocumentation<MEee2gZ2qq> documentation
("The MEee2gZ2qq class implements the matrix element for e+e- -> q qbar");
static Parameter<MEee2gZ2qq,int> interfaceMinimumFlavour
("MinimumFlavour",
"The PDG code of the quark with the lowest PDG code to produce.",
&MEee2gZ2qq::minflav_, 1, 1, 6,
false, false, Interface::limited);
static Parameter<MEee2gZ2qq,int> interfaceMaximumFlavour
("MaximumFlavour",
"The PDG code of the quark with the highest PDG code to produce",
&MEee2gZ2qq::maxflav_, 5, 1, 6,
false, false, Interface::limited);
static Switch<MEee2gZ2qq,unsigned int> interfaceTopMassOption
("TopMassOption",
"Option for the treatment of the top quark mass",
&MEee2gZ2qq::massopt_, 1, false, false);
static SwitchOption interfaceTopMassOptionOnMassShell
(interfaceTopMassOption,
"OnMassShell",
"The top is produced on its mass shell",
1);
static SwitchOption interfaceTopMassOption2
(interfaceTopMassOption,
"OffShell",
"The top is generated off-shell using the mass and width generator.",
2);
static Parameter<MEee2gZ2qq,Energy> interfacepTMinQED
("pTMinQED",
"Minimum pT for hard QED radiation",
&MEee2gZ2qq::pTminQED_, GeV, 1.0*GeV, 0.001*GeV, 10.0*GeV,
false, false, Interface::limited);
static Parameter<MEee2gZ2qq,Energy> interfacepTMinQCD
("pTMinQCD",
"Minimum pT for hard QCD radiation",
&MEee2gZ2qq::pTminQCD_, GeV, 1.0*GeV, 0.001*GeV, 10.0*GeV,
false, false, Interface::limited);
static Parameter<MEee2gZ2qq,double> interfacePrefactor
("Prefactor",
"Prefactor for the overestimate of the emission probability",
&MEee2gZ2qq::preFactor_, 6.0, 1.0, 100.0,
false, false, Interface::limited);
static Reference<MEee2gZ2qq,ShowerAlpha> interfaceQCDCoupling
("AlphaQCD",
"Pointer to the object to calculate the strong coupling for the correction",
&MEee2gZ2qq::alphaQCD_, false, false, true, false, false);
static Reference<MEee2gZ2qq,ShowerAlpha> interfaceEMCoupling
("AlphaQED",
"Pointer to the object to calculate the EM coupling for the correction",
&MEee2gZ2qq::alphaQED_, false, false, true, false, false);
static Switch<MEee2gZ2qq,bool> interfaceSpinCorrelations
("SpinCorrelations",
"Switch the construction of the veretx for spin correlations on/off",
&MEee2gZ2qq::spinCorrelations_, true, false, false);
static SwitchOption interfaceSpinCorrelationsYes
(interfaceSpinCorrelations,
"Yes",
"Swtich On",
true);
static SwitchOption interfaceSpinCorrelationsNo
(interfaceSpinCorrelations,
"No",
"Switch off",
false);
}
double MEee2gZ2qq::me2() const {
return loME(mePartonData(),rescaledMomenta(),true);
}
ProductionMatrixElement MEee2gZ2qq::HelicityME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
double & me,
double & cont,
double & BW ) const {
// the particles should be in the order
// for the incoming
// 0 incoming fermion (u spinor)
// 1 incoming antifermion (vbar spinor)
// for the outgoing
// 0 outgoing fermion (ubar spinor)
// 1 outgoing antifermion (v spinor)
// me to be returned
ProductionMatrixElement output(PDT::Spin1Half,PDT::Spin1Half,
PDT::Spin1Half,PDT::Spin1Half);
ProductionMatrixElement gamma (PDT::Spin1Half,PDT::Spin1Half,
PDT::Spin1Half,PDT::Spin1Half);
ProductionMatrixElement Zboson(PDT::Spin1Half,PDT::Spin1Half,
PDT::Spin1Half,PDT::Spin1Half);
// wavefunctions for the intermediate particles
VectorWaveFunction interZ,interG;
// temporary storage of the different diagrams
Complex diag1,diag2;
// sum over helicities to get the matrix element
unsigned int inhel1,inhel2,outhel1,outhel2;
double total[3]={0.,0.,0.};
for(inhel1=0;inhel1<2;++inhel1) {
for(inhel2=0;inhel2<2;++inhel2) {
// intermediate Z
interZ = FFZVertex_->evaluate(scale(),1,Z0_,fin[inhel1],ain[inhel2]);
// intermediate photon
interG = FFPVertex_->evaluate(scale(),1,gamma_,fin[inhel1],ain[inhel2]);
for(outhel1=0;outhel1<2;++outhel1) {
for(outhel2=0;outhel2<2;++outhel2) {
// first the Z exchange diagram
diag1 = FFZVertex_->evaluate(scale(),aout[outhel2],fout[outhel1],
interZ);
// then the photon exchange diagram
diag2 = FFPVertex_->evaluate(scale(),aout[outhel2],fout[outhel1],
interG);
// add up squares of individual terms
total[1] += norm(diag1);
Zboson(inhel1,inhel2,outhel1,outhel2) = diag1;
total[2] += norm(diag2);
gamma (inhel1,inhel2,outhel1,outhel2) = diag2;
// the full thing including interference
diag1 += diag2;
total[0] += norm(diag1);
output(inhel1,inhel2,outhel1,outhel2)=diag1;
}
}
}
}
for(int ix=0;ix<3;++ix) total[ix] *= 0.25;
tcPolarizedBeamPDPtr beam[2] =
{dynamic_ptr_cast<tcPolarizedBeamPDPtr>(mePartonData()[0]),
dynamic_ptr_cast<tcPolarizedBeamPDPtr>(mePartonData()[1])};
if( beam[0] || beam[1] ) {
RhoDMatrix rho[2] =
{beam[0] ? beam[0]->rhoMatrix() : RhoDMatrix(mePartonData()[0]->iSpin()),
beam[1] ? beam[1]->rhoMatrix() : RhoDMatrix(mePartonData()[1]->iSpin())};
total[0] = output.average(rho[0],rho[1]);
total[1] = Zboson.average(rho[0],rho[1]);
total[2] = gamma .average(rho[0],rho[1]);
}
// results
for(int ix=0;ix<3;++ix) total[ix]*= 3.;
cont = total[2];
BW = total[1];
me = total[0];
return output;
}
void MEee2gZ2qq::constructVertex(tSubProPtr sub) {
if(!spinCorrelations_) return;
// extract the particles in the hard process
ParticleVector hard;
hard.push_back(sub->incoming().first);
hard.push_back(sub->incoming().second);
hard.push_back(sub->outgoing()[0]);
hard.push_back(sub->outgoing()[1]);
if(hard[0]->id()<hard[1]->id()) swap(hard[0],hard[1]);
if(hard[2]->id()<hard[3]->id()) swap(hard[2],hard[3]);
vector<SpinorWaveFunction> fin,aout;
vector<SpinorBarWaveFunction> ain,fout;
// get wave functions for off-shell momenta for later on
SpinorWaveFunction( fin ,hard[0],incoming,false,true);
SpinorBarWaveFunction(ain ,hard[1],incoming,false,true);
SpinorBarWaveFunction(fout,hard[2],outgoing,true ,true);
SpinorWaveFunction( aout,hard[3],outgoing,true ,true);
// now rescale the momenta and compute the matrix element with the
// rescaled momenta for correlations
vector<Lorentz5Momentum> momenta;
cPDVector data;
for(unsigned int ix=0;ix<4;++ix) {
momenta.push_back(hard[ix]->momentum());
data .push_back(hard[ix]->dataPtr());
}
rescaleMomenta(momenta,data);
SpinorWaveFunction ein (rescaledMomenta()[0],data[0],incoming);
SpinorBarWaveFunction pin (rescaledMomenta()[1],data[1],incoming);
SpinorBarWaveFunction qkout(rescaledMomenta()[2],data[2],outgoing);
SpinorWaveFunction qbout(rescaledMomenta()[3],data[3],outgoing);
for(unsigned int ix=0;ix<2;++ix) {
ein.reset(ix) ; fin [ix] = ein ;
pin.reset(ix) ; ain [ix] = pin ;
qkout.reset(ix); fout[ix] = qkout;
qbout.reset(ix); aout[ix] = qbout;
}
// calculate the matrix element
double me,cont,BW;
ProductionMatrixElement prodme=HelicityME(fin,ain,fout,aout,me,cont,BW);
// construct the vertex
HardVertexPtr hardvertex=new_ptr(HardVertex());
// set the matrix element for the vertex
hardvertex->ME(prodme);
// set the pointers and to and from the vertex
for(unsigned int ix=0;ix<4;++ix) {
tSpinPtr spin = hard[ix]->spinInfo();
if(ix<2) {
tcPolarizedBeamPDPtr beam =
dynamic_ptr_cast<tcPolarizedBeamPDPtr>(hard[ix]->dataPtr());
if(beam) spin->rhoMatrix() = beam->rhoMatrix();
}
spin->productionVertex(hardvertex);
}
}
void MEee2gZ2qq::rebind(const TranslationMap & trans) {
FFZVertex_ = trans.translate(FFZVertex_);
FFPVertex_ = trans.translate(FFPVertex_);
FFGVertex_ = trans.translate(FFGVertex_);
Z0_ = trans.translate(Z0_);
gamma_ = trans.translate(gamma_);
gluon_ = trans.translate(gluon_);
HwMEBase::rebind(trans);
}
IVector MEee2gZ2qq::getReferences() {
IVector ret = HwMEBase::getReferences();
ret.push_back(FFZVertex_);
ret.push_back(FFPVertex_);
ret.push_back(FFGVertex_);
ret.push_back(Z0_ );
ret.push_back(gamma_ );
ret.push_back(gluon_ );
return ret;
}
void MEee2gZ2qq::initializeMECorrection(RealEmissionProcessPtr,
double & initial,
double & final) {
d_Q_ = sqrt(sHat());
d_m_ = 0.5*(meMomenta()[2].mass()+meMomenta()[3].mass());
// set the other parameters
d_rho_ = sqr(d_m_/d_Q_);
d_v_ = sqrt(1.-4.*d_rho_);
// maximum evolution scale
d_kt1_ = (1. + sqrt(1. - 4.*d_rho_))/2.;
double num = d_rho_ * d_kt1_ + 0.25 * d_v_ *(1.+d_v_)*(1.+d_v_);
double den = d_kt1_ - d_rho_;
d_kt2_ = num/den;
// maximums for reweighting
initial = 1.;
final = 1.;
}
RealEmissionProcessPtr MEee2gZ2qq::applyHardMatrixElementCorrection(RealEmissionProcessPtr born) {
return calculateRealEmission(born,true,ShowerInteraction::QCD);
}
RealEmissionProcessPtr MEee2gZ2qq::calculateRealEmission(RealEmissionProcessPtr born, bool veto,
ShowerInteraction inter) {
vector<Lorentz5Momentum> emission;
unsigned int iemit,ispect;
pair<Energy,ShowerInteraction> output =
generateHard(born,emission,iemit,ispect,veto,inter);
if(emission.empty()) {
if(inter!=ShowerInteraction::QCD) born->pT()[ShowerInteraction::QED] = pTminQED_;
if(inter!=ShowerInteraction::QED) born->pT()[ShowerInteraction::QCD] = pTminQCD_;
return born;
}
else {
Energy pTveto = output.first;
if(inter!=ShowerInteraction::QCD) born->pT()[ShowerInteraction::QED] = pTveto;
if(inter!=ShowerInteraction::QED) born->pT()[ShowerInteraction::QCD] = pTveto;
}
// generate the momenta for the hard emission
ShowerInteraction force = output.second;
born->interaction(force);
// get the quark and antiquark
ParticleVector qq;
for(unsigned int ix=0;ix<2;++ix) qq.push_back(born->bornOutgoing()[ix]);
bool order = qq[0]->id()>0;
if(!order) swap(qq[0],qq[1]);
// perform final check to ensure energy greater than constituent mass
for (int i=0; i<2; i++) {
if (emission[i+2].e() < qq[i]->data().constituentMass())
return RealEmissionProcessPtr();
}
if(force!=ShowerInteraction::QED &&
emission[4].e() < gluon_->constituentMass())
return RealEmissionProcessPtr();
// set masses
for (int i=0; i<2; i++) emission[i+2].setMass(qq[i]->mass());
emission[4].setMass(ZERO);
// create the new quark, antiquark and gluon
PPtr newq = qq[0]->dataPtr()->produceParticle(emission[2]);
PPtr newa = qq[1]->dataPtr()->produceParticle(emission[3]);
PPtr newg;
if(force==ShowerInteraction::QCD)
newg = gluon_->produceParticle(emission[4]);
else
newg = gamma_->produceParticle(emission[4]);
// create the output real emission process
for(unsigned int ix=0;ix<born->bornIncoming().size();++ix) {
born->incoming().push_back(born->bornIncoming()[ix]->dataPtr()->
produceParticle(born->bornIncoming()[ix]->momentum()));
}
if(order) {
born->outgoing().push_back(newq);
born->outgoing().push_back(newa);
}
else {
born->outgoing().push_back(newa);
born->outgoing().push_back(newq);
swap(iemit,ispect);
}
born->outgoing().push_back(newg);
// set emitter and spectator
born->emitter (iemit);
born->spectator(ispect);
born->emitted(4);
// make colour connections
if(force==ShowerInteraction::QCD) {
newg->colourNeighbour(newq);
newa->colourNeighbour(newg);
}
else {
newa->colourNeighbour(newq);
}
return born;
}
bool MEee2gZ2qq::softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & ,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & d_z,
const Energy & d_qt,
const Energy & ) {
// check we should be applying the veto
if(parent->id()!=progenitor->id()||
ids[0]->id()!=ids[1]->id()||
ids[2]->id()!=ParticleID::g) return false;
// calculate pt
Energy2 d_m2 = parent->momentum().m2();
Energy pPerp = (1.-d_z)*sqrt( sqr(d_z*d_qt) - d_m2);
// if not hardest so far don't apply veto
if(pPerp<highestpT) return false;
// calculate x and xb
double kti = sqr(d_qt/d_Q_);
double w = sqr(d_v_) + kti*(-1. + d_z)*d_z*(2. + kti*(-1. + d_z)*d_z);
if (w < 0) return false;
double x = (1. + sqr(d_v_)*(-1. + d_z) + sqr(kti*(-1. + d_z))*d_z*d_z*d_z
+ d_z*sqrt(w)
- kti*(-1. + d_z)*d_z*(2. + d_z*(-2 + sqrt(w))))/
(1. - kti*(-1. + d_z)*d_z + sqrt(w));
double xb = 1. + kti*(-1. + d_z)*d_z;
// calculate the weight
if(parent->id()<0) swap(x,xb);
// if exceptionally out of phase space, leave this emission, as there
// is no good interpretation for the soft ME correction.
if( x<0 || xb<0) return false;
double xg = 2. - xb - x;
// always return one in the soft gluon region
if(xg < EPS_) return false;
// check it is in the phase space
if((1.-x)*(1.-xb)*(1.-xg) < d_rho_*xg*xg) return true;
double k1 = getKfromX(x, xb);
double k2 = getKfromX(xb, x);
double weight = 1.;
// quark emission
if(parent->id() > 0 && k1 < d_kt1_) {
weight = MEV(x, xb)/PS(x, xb);
// is it also in the anti-quark emission zone?
if(k2 < d_kt2_) weight *= 0.5;
}
// antiquark emission
if(parent->id() < 0 && k2 < d_kt2_) {
weight = MEV(x, xb)/PS(xb, x);
// is it also in the quark emission zone?
if(k1 < d_kt1_) weight *= 0.5;
}
// compute veto from weight
return !UseRandom::rndbool(weight);
}
double MEee2gZ2qq::getKfromX(double x1, double x2) {
double uval = 0.5*(1. + d_rho_/(1.-x2+d_rho_));
double num = x1 - (2. - x2)*uval;
double den = sqrt(x2*x2 - 4.*d_rho_);
double zval = uval + num/den;
return (1.-x2)/(zval*(1.-zval));
}
double MEee2gZ2qq::MEV(double x1, double x2) {
// Vector part
double num = (x1+2.*d_rho_)*(x1+2.*d_rho_) + (x2+2.*d_rho_)*(x2+2.*d_rho_)
- 8.*d_rho_*(1.+2.*d_rho_);
double den = (1.+2.*d_rho_)*(1.-x1)*(1.-x2);
return (num/den - 2.*d_rho_/((1.-x1)*(1.-x1))
- 2*d_rho_/((1.-x2)*(1.-x2)))/d_v_;
}
double MEee2gZ2qq::PS(double x, double xbar) {
double u = 0.5*(1. + d_rho_ / (1.-xbar+d_rho_));
double z = u + (x - (2.-xbar)*u)/sqrt(xbar*xbar - 4.*d_rho_);
double brack = (1.+z*z)/(1.-z)- 2.*d_rho_/(1-xbar);
// interesting: the splitting function without the subtraction
// term. Actually gives a much worse approximation in the collinear
// limit. double brack = (1.+z*z)/(1.-z);
double den = (1.-xbar)*sqrt(xbar*xbar - 4.*d_rho_);
return brack/den;
}
pair<Energy,ShowerInteraction>
MEee2gZ2qq::generateHard(RealEmissionProcessPtr born,
vector<Lorentz5Momentum> & emmision,
unsigned int & iemit, unsigned int & ispect,
bool applyVeto,ShowerInteraction inter) {
vector<ShowerInteraction> interactions;
if(inter==ShowerInteraction::Both) {
interactions.push_back(ShowerInteraction::QED);
interactions.push_back(ShowerInteraction::QCD);
}
else
interactions.push_back(inter);
// incoming particles
tPPtr em = born->bornIncoming()[0];
tPPtr ep = born->bornIncoming()[1];
if(em->id()<0) swap(em,ep);
// outgoing particles
tPPtr qk = born->bornOutgoing()[0];
tPPtr qb = born->bornOutgoing()[1];
if(qk->id()<0) swap(qk,qb);
// extract the momenta
loMomenta_.clear();
loMomenta_.push_back(em->momentum());
loMomenta_.push_back(ep->momentum());
loMomenta_.push_back(qk->momentum());
loMomenta_.push_back(qb->momentum());
// and ParticleData objects
partons_.resize(5);
partons_[0]=em->dataPtr();
partons_[1]=ep->dataPtr();
partons_[2]=qk->dataPtr();
partons_[3]=qb->dataPtr();
partons_[4]=cPDPtr();
// boost from lab to CMS frame with outgoing particles
// along the z axis
LorentzRotation eventFrame( ( loMomenta_[2] + loMomenta_[3] ).findBoostToCM() );
Lorentz5Momentum spectator = eventFrame*loMomenta_[2];
eventFrame.rotateZ( -spectator.phi() );
eventFrame.rotateY( -spectator.theta() );
eventFrame.invert();
// mass of the final-state system
Energy2 M2 = (loMomenta_[2]+loMomenta_[3]).m2();
Energy M = sqrt(M2);
double mu1 = loMomenta_[2].mass()/M;
double mu2 = loMomenta_[3].mass()/M;
double mu12 = sqr(mu1), mu22 = sqr(mu2);
double lambda = sqrt(1.+sqr(mu12)+sqr(mu22)-2.*mu12-2.*mu22-2.*mu12*mu22);
// max pT
Energy pTmax = 0.5*sqrt(M2)*
(1.-sqr(loMomenta_[2].mass()+loMomenta_[3].mass())/M2);
// max y
if ( pTmax < pTminQED_ && pTmax < pTminQCD_ ) return make_pair(ZERO,ShowerInteraction::QCD);
vector<Energy> pTemit;
vector<vector<Lorentz5Momentum> > emittedMomenta;;
vector<unsigned int> iemitter,ispectator;
for(unsigned int iinter=0;iinter<interactions.size();++iinter) {
Energy pTmin(ZERO);
double a,ymax;
if(interactions[iinter]==ShowerInteraction::QCD) {
pTmin = pTminQCD_;
ymax = acosh(pTmax/pTmin);
partons_[4] = gluon_;
// prefactor for the overestimate of the Sudakov
a = 4./3.*alphaQCD_->overestimateValue()/Constants::twopi*
2.*ymax*preFactor_;
}
else {
pTmin = pTminQED_;
ymax = acosh(pTmax/pTmin);
partons_[4] = gamma_;
a = alphaQED_->overestimateValue()/Constants::twopi*
2.*ymax*preFactor_*sqr(double(mePartonData()[2]->iCharge())/3.);
}
// variables for the emission
Energy pT[2];
double y[2],phi[2],x3[2],x1[2][2],x2[2][2];
double contrib[2][2];
// storage of the real emission momenta
vector<Lorentz5Momentum> realMomenta[2][2]=
{{vector<Lorentz5Momentum>(5),vector<Lorentz5Momentum>(5)},
{vector<Lorentz5Momentum>(5),vector<Lorentz5Momentum>(5)}};
for(unsigned int ix=0;ix<2;++ix)
for(unsigned int iy=0;iy<2;++iy)
for(unsigned int iz=0;iz<2;++iz)
realMomenta[ix][iy][iz] = loMomenta_[iz];
// generate the emission
for(unsigned int ix=0;ix<2;++ix) {
if(ix==1) {
swap(mu1 ,mu2 );
swap(mu12,mu22);
}
pT[ix] = pTmax;
y [ix] = 0.;
bool reject = true;
do {
// generate pT
pT[ix] *= pow(UseRandom::rnd(),1./a);
if(pT[ix]<pTmin) {
pT[ix] = -GeV;
break;
}
// generate y
y[ix] = -ymax+2.*UseRandom::rnd()*ymax;
// generate phi
phi[ix] = UseRandom::rnd()*Constants::twopi;
// calculate x3 and check in allowed region
x3[ix] = 2.*pT[ix]*cosh(y[ix])/M;
if(x3[ix] < 0. || x3[ix] > 1. -sqr( mu1 + mu2 ) ) continue;
// find the possible solutions for x1
double xT2 = sqr(2./M*pT[ix]);
double root = (-sqr(x3[ix])+xT2)*
(xT2*mu22+2.*x3[ix]-sqr(mu12)+2.*mu22+2.*mu12-sqr(x3[ix])-1.
+2.*mu12*mu22-sqr(mu22)-2.*mu22*x3[ix]-2.*mu12*x3[ix]);
double c1=2.*sqr(x3[ix])-4.*mu22-6.*x3[ix]+4.*mu12-xT2*x3[ix]
+2.*xT2-2.*mu12*x3[ix]+2.*mu22*x3[ix]+4.;
if(root<0.) continue;
x1[ix][0] = 1./(4.-4.*x3[ix]+xT2)*(c1-2.*sqrt(root));
x1[ix][1] = 1./(4.-4.*x3[ix]+xT2)*(c1+2.*sqrt(root));
// change sign of y if 2nd particle emits
if(ix==1) y[ix] *=-1.;
// loop over the solutions
for(unsigned int iy=0;iy<2;++iy) {
contrib[ix][iy]=0.;
// check x1 value allowed
if(x1[ix][iy]<2.*mu1||x1[ix][iy]>1.+mu12-mu22) continue;
// calculate x2 value and check allowed
x2[ix][iy] = 2.-x3[ix]-x1[ix][iy];
double root = max(0.,sqr(x1[ix][iy])-4.*mu12);
root = sqrt(root);
double x2min = 1.+mu22-mu12
-0.5*(1.-x1[ix][iy]+mu12-mu22)/(1.-x1[ix][iy]+mu12)*(x1[ix][iy]-2.*mu12+root);
double x2max = 1.+mu22-mu12
-0.5*(1.-x1[ix][iy]+mu12-mu22)/(1.-x1[ix][iy]+mu12)*(x1[ix][iy]-2.*mu12-root);
if(x2[ix][iy]<x2min||x2[ix][iy]>x2max) continue;
// check the z components
double z1 = sqr(x1[ix][iy])-4.*mu12-xT2;
- if(z1<0. && z1>-1e-12) z1 = 0.;
+ if(z1<0. && z1>-1e-10) z1 = 0.;
assert(z1>=0.);
z1 = sqrt(z1);
double z2 = sqr(x2[ix][iy])-4.*mu22;
if(z2<0. && z2>-1e-12) z2 = 0.;
assert(z2>=0.);
z2 = -sqrt(z2);
double z3 = pT[ix]*sinh(y[ix])*2./M;
if(ix==1) z3 *=-1.;
if(abs(-z1+z2+z3)<1e-9) z1 *= -1.;
if(abs(z1+z2+z3)>1e-5) continue;
// if using as an ME correction the veto
if(applyVeto) {
double xb = x1[ix][iy], xc = x2[ix][iy];
double b = mu12, c = mu22;
double r = 0.5*(1.+b/(1.+c-xc));
double z1 = r + (xb-(2.-xc)*r)/sqrt(sqr(xc)-4.*c);
double kt1 = (1.-b+c-xc)/z1/(1.-z1);
r = 0.5*(1.+c/(1.+b-xb));
double z2 = r + (xc-(2.-xb)*r)/sqrt(sqr(xb)-4.*b);
double kt2 = (1.-c+b-xb)/z2/(1.-z2);
if(ix==1) {
swap(z1 ,z2);
swap(kt1,kt2);
}
// veto the shower region
if( kt1 < d_kt1_ || kt2 < d_kt2_ ) continue;
}
// construct the momenta
realMomenta[ix][iy][4] =
Lorentz5Momentum(pT[ix]*cos(phi[ix]),pT[ix]*sin(phi[ix]),
pT[ix]*sinh(y[ix]) ,pT[ix]*cosh(y[ix]),ZERO);
if(ix==0) {
realMomenta[ix][iy][2] =
Lorentz5Momentum(-pT[ix]*cos(phi[ix]),-pT[ix]*sin(phi[ix]),
z1*0.5*M,x1[ix][iy]*0.5*M,M*mu1);
realMomenta[ix][iy][3] =
Lorentz5Momentum(ZERO,ZERO, z2*0.5*M,x2[ix][iy]*0.5*M,M*mu2);
}
else {
realMomenta[ix][iy][2] =
Lorentz5Momentum(ZERO,ZERO,-z2*0.5*M,x2[ix][iy]*0.5*M,M*mu2);
realMomenta[ix][iy][3] =
Lorentz5Momentum(-pT[ix]*cos(phi[ix]),-pT[ix]*sin(phi[ix]),
-z1*0.5*M,x1[ix][iy]*0.5*M,M*mu1);
}
// boost the momenta back to the lab
for(unsigned int iz=2;iz<5;++iz)
realMomenta[ix][iy][iz] *= eventFrame;
// jacobian and prefactors for the weight
Energy J = M/sqrt(xT2)*abs(-x1[ix][iy]*x2[ix][iy]+2.*mu22*x1[ix][iy]
+x2[ix][iy]+x2[ix][iy]*mu12+mu22*x2[ix][iy]
-sqr(x2[ix][iy]))
/pow(sqr(x2[ix][iy])-4.*mu22,1.5);
// prefactors etc
contrib[ix][iy] = 0.5*pT[ix]/J/preFactor_/lambda;
// matrix element piece
contrib[ix][iy] *= meRatio(partons_,realMomenta[ix][iy],
ix,interactions[iinter],false);
// coupling piece
if(interactions[iinter]==ShowerInteraction::QCD)
contrib[ix][iy] *= alphaQCD_->ratio(sqr(pT[ix]));
else
contrib[ix][iy] *= alphaQED_->ratio(sqr(pT[ix]));
}
if(contrib[ix][0]+contrib[ix][1]>1.) {
ostringstream s;
s << "MEee2gZ2qq::generateHardest weight for channel " << ix
<< "is " << contrib[ix][0]+contrib[ix][1]
<< " which is greater than 1";
generator()->logWarning( Exception(s.str(), Exception::warning) );
}
reject = UseRandom::rnd() > contrib[ix][0] + contrib[ix][1];
}
while (reject);
if(pT[ix]<pTmin)
pT[ix] = -GeV;
}
// pt of emission
if(pT[0]<ZERO && pT[1]<ZERO) {
pTemit.push_back(-GeV);
emittedMomenta.push_back(vector<Lorentz5Momentum>());
iemitter .push_back(0);
ispectator.push_back(0);
continue;
}
// now pick the emission with highest pT
vector<Lorentz5Momentum> emission;
if(pT[0]>pT[1]) {
iemitter .push_back(2);
ispectator.push_back(3);
pTemit.push_back(pT[0]);
if(UseRandom::rnd()<contrib[0][0]/(contrib[0][0]+contrib[0][1]))
emission = realMomenta[0][0];
else
emission = realMomenta[0][1];
}
else {
iemitter .push_back(3);
ispectator.push_back(2);
pTemit.push_back(pT[1]);
if(UseRandom::rnd()<contrib[1][0]/(contrib[1][0]+contrib[1][1]))
emission = realMomenta[1][0];
else
emission = realMomenta[1][1];
}
emittedMomenta.push_back(emission);
}
// select the type of emission
int iselect=-1;
pTmax = ZERO;
for(unsigned int ix=0;ix<interactions.size();++ix) {
if(pTemit[ix]>pTmax) {
iselect = ix;
pTmax = pTemit[ix];
}
}
// no emission return
if(iselect<0) {
return make_pair(ZERO,ShowerInteraction::QCD);
}
partons_[4] = interactions[iselect]==ShowerInteraction::QCD ? gluon_ : gamma_;
iemit = iemitter[iselect];
ispect = ispectator[iselect];
emmision = emittedMomenta[iselect];
// return pT of emission
return make_pair(pTmax,interactions[iselect]);
}
RealEmissionProcessPtr MEee2gZ2qq::generateHardest(RealEmissionProcessPtr born,
ShowerInteraction inter) {
return calculateRealEmission(born,false,inter);
}
double MEee2gZ2qq::meRatio(vector<cPDPtr> partons,
vector<Lorentz5Momentum> momenta,
unsigned int iemitter,
ShowerInteraction inter,
bool subtract) const {
Lorentz5Momentum q = momenta[2]+momenta[3]+momenta[4];
Energy2 Q2=q.m2();
Energy2 lambda = sqrt((Q2-sqr(momenta[2].mass()+momenta[3].mass()))*
(Q2-sqr(momenta[2].mass()-momenta[3].mass())));
InvEnergy2 D[2];
double lome[2];
for(unsigned int iemit=0;iemit<2;++iemit) {
unsigned int ispect = iemit==0 ? 1 : 0;
Energy2 pipj = momenta[4 ] * momenta[2+iemit ];
Energy2 pipk = momenta[4 ] * momenta[2+ispect];
Energy2 pjpk = momenta[2+iemit] * momenta[2+ispect];
double y = pipj/(pipj+pipk+pjpk);
double z = pipk/( pipk+pjpk);
Energy mij = sqrt(2.*pipj+sqr(momenta[2+iemit].mass()));
Energy2 lamB = sqrt((Q2-sqr(mij+momenta[2+ispect].mass()))*
(Q2-sqr(mij-momenta[2+ispect].mass())));
Energy2 Qpk = q*momenta[2+ispect];
Lorentz5Momentum pkt =
lambda/lamB*(momenta[2+ispect]-Qpk/Q2*q)
+0.5/Q2*(Q2+sqr(momenta[2+ispect].mass())-sqr(momenta[2+ispect].mass()))*q;
Lorentz5Momentum pijt =
q-pkt;
double muj = momenta[2+iemit ].mass()/sqrt(Q2);
double muk = momenta[2+ispect].mass()/sqrt(Q2);
double vt = sqrt((1.-sqr(muj+muk))*(1.-sqr(muj-muk)))/(1.-sqr(muj)-sqr(muk));
double v = sqr(2.*sqr(muk)+(1.-sqr(muj)-sqr(muk))*(1.-y))-4.*sqr(muk);
if(v<=0.) return 0.;
v = sqrt(v)/(1.-y)/(1.-sqr(muj)-sqr(muk));
// dipole term
D[iemit] = 0.5/pipj*(2./(1.-(1.-z)*(1.-y))
-vt/v*(2.-z+sqr(momenta[2+iemit].mass())/pipj));
// matrix element
vector<Lorentz5Momentum> lomom(4);
lomom[0] = momenta[0];
lomom[1] = momenta[1];
if(iemit==0) {
lomom[2] = pijt;
lomom[3] = pkt ;
}
else {
lomom[3] = pijt;
lomom[2] = pkt ;
}
lome[iemit] = loME(partons,lomom,false)/3.;
}
InvEnergy2 ratio = realME(partons,momenta,inter)
*abs(D[iemitter])/(abs(D[0]*lome[0])+abs(D[1]*lome[1]));
double output = Q2*ratio;
if(subtract) output -= 2.*Q2*D[iemitter];
return output;
}
double MEee2gZ2qq::loME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta,
bool first) const {
// compute the spinors
vector<SpinorWaveFunction> fin,aout;
vector<SpinorBarWaveFunction> ain,fout;
SpinorWaveFunction ein (momenta[0],partons[0],incoming);
SpinorBarWaveFunction pin (momenta[1],partons[1],incoming);
SpinorBarWaveFunction qkout(momenta[2],partons[2],outgoing);
SpinorWaveFunction qbout(momenta[3],partons[3],outgoing);
for(unsigned int ix=0;ix<2;++ix) {
ein.reset(ix) ;
fin.push_back( ein );
pin.reset(ix) ;
ain.push_back( pin );
qkout.reset(ix);
fout.push_back(qkout);
qbout.reset(ix);
aout.push_back(qbout);
}
// compute the matrix element
double me,lastCont,lastBW;
HelicityME(fin,ain,fout,aout,me,lastCont,lastBW);
// save the components
if(first) {
DVector save;
save.push_back(lastCont);
save.push_back(lastBW);
meInfo(save);
}
// return the answer
return me;
}
InvEnergy2 MEee2gZ2qq::realME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta,
ShowerInteraction inter) const {
// compute the spinors
vector<SpinorWaveFunction> fin,aout;
vector<SpinorBarWaveFunction> ain,fout;
vector<VectorWaveFunction> gout;
SpinorWaveFunction ein (momenta[0],partons[0],incoming);
SpinorBarWaveFunction pin (momenta[1],partons[1],incoming);
SpinorBarWaveFunction qkout(momenta[2],partons[2],outgoing);
SpinorWaveFunction qbout(momenta[3],partons[3],outgoing);
VectorWaveFunction gluon(momenta[4],partons[4],outgoing);
for(unsigned int ix=0;ix<2;++ix) {
ein.reset(ix) ;
fin.push_back( ein );
pin.reset(ix) ;
ain.push_back( pin );
qkout.reset(ix);
fout.push_back(qkout);
qbout.reset(ix);
aout.push_back(qbout);
gluon.reset(2*ix);
gout.push_back(gluon);
}
AbstractFFVVertexPtr vertex = inter == ShowerInteraction::QCD ?
FFGVertex_ : FFPVertex_;
vector<Complex> diag(4,0.);
ProductionMatrixElement output(PDT::Spin1Half,PDT::Spin1Half,
PDT::Spin1Half,PDT::Spin1Half,
PDT::Spin1);
double total(0.);
for(unsigned int inhel1=0;inhel1<2;++inhel1) {
for(unsigned int inhel2=0;inhel2<2;++inhel2) {
// intermediate Z
VectorWaveFunction interZ =
FFZVertex_->evaluate(scale(),1,Z0_,fin[inhel1],ain[inhel2]);
// intermediate photon
VectorWaveFunction interG =
FFPVertex_->evaluate(scale(),1,gamma_,fin[inhel1],ain[inhel2]);
for(unsigned int outhel1=0;outhel1<2;++outhel1) {
for(unsigned int outhel2=0;outhel2<2;++outhel2) {
for(unsigned int outhel3=0;outhel3<2;++outhel3) {
SpinorBarWaveFunction off1 =
vertex->evaluate(scale(),3,partons[2]->CC(),fout[outhel1],gout[outhel3]);
diag[0] = FFZVertex_->evaluate(scale(),aout[outhel2],off1,interZ);
diag[1] = FFPVertex_->evaluate(scale(),aout[outhel2],off1,interG);
SpinorWaveFunction off2 =
vertex->evaluate(scale(),3,partons[3]->CC(),aout[outhel2],gout[outhel3]);
diag[2] = FFZVertex_->evaluate(scale(),off2,fout[outhel1],interZ);
diag[3] = FFPVertex_->evaluate(scale(),off2,fout[outhel1],interG);
// sum of diagrams
Complex sum = std::accumulate(diag.begin(),diag.end(),Complex(0.));
// matrix element
output(inhel1,inhel2,outhel1,outhel2,outhel3)=sum;
// me2
total += norm(sum);
}
}
}
}
}
// spin average
total *= 0.25;
tcPolarizedBeamPDPtr beam[2] =
{dynamic_ptr_cast<tcPolarizedBeamPDPtr>(partons[0]),
dynamic_ptr_cast<tcPolarizedBeamPDPtr>(partons[1])};
if( beam[0] || beam[1] ) {
RhoDMatrix rho[2] =
{beam[0] ? beam[0]->rhoMatrix() : RhoDMatrix(mePartonData()[0]->iSpin()),
beam[1] ? beam[1]->rhoMatrix() : RhoDMatrix(mePartonData()[1]->iSpin())};
total = output.average(rho[0],rho[1]);
}
// divide out the coupling
total /= norm(vertex->norm());
// and charge (if needed)
if(inter==ShowerInteraction::QED)
total /= sqr(double(mePartonData()[2]->iCharge())/3.);
// return the total
return total*UnitRemoval::InvE2;
}
diff --git a/MatrixElement/Lepton/MEee2gZ2qq.h b/MatrixElement/Lepton/MEee2gZ2qq.h
--- a/MatrixElement/Lepton/MEee2gZ2qq.h
+++ b/MatrixElement/Lepton/MEee2gZ2qq.h
@@ -1,516 +1,516 @@
// -*- C++ -*-
//
// MEee2gZ2qq.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEee2gZ2qq_H
#define HERWIG_MEee2gZ2qq_H
//
// This is the declaration of the MEee2gZ2qq class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/Rebinder.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h"
#include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEee2gZ2qq class implements the matrix element
* for \f$e^+e^-\to Z/\gamma \to q\bar{q}\f$ including spin correlations.
* The class includes greater control over the type of quark produced than is available
* in the corresponding matrix element from ThePEG, in addition to spin correlations.
*
* @see \ref MEee2gZ2qqInterfaces "The interfaces"
* defined for MEee2gZ2qq.
*/
class MEee2gZ2qq: public HwMEBase {
public:
/**
* The default constructor.
*/
MEee2gZ2qq() : minflav_(1), maxflav_(5), massopt_(1),
spinCorrelations_(true),
pTminQED_(GeV), pTminQCD_(GeV),
preFactor_(6.)
{}
/**
* Members for hard corrections to the emission of QCD radiation
*/
//@{
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return FSR;}
/**
* Has an old fashioned ME correction
*/
virtual bool hasMECorrection() {return true;}
/**
* Initialize the ME correction
*/
virtual void initializeMECorrection(RealEmissionProcessPtr, double &,
double & );
/**
* Apply the hard matrix element correction to a given hard process or decay
*/
virtual RealEmissionProcessPtr applyHardMatrixElementCorrection(RealEmissionProcessPtr);
/**
* Apply the soft matrix element correction
* @param parent The initial particle in the current branching
* @param progenitor The progenitor particle of the jet
* @param fs Whether the emission is initial or final-state
* @param highestpT The highest pT so far in the shower
* @param ids ids of the particles produced in the branching
* @param z The momentum fraction of the branching
* @param scale the evolution scale of the branching
* @param pT The transverse momentum of the branching
* @return If true the emission should be vetoed
*/
virtual bool softMatrixElementVeto(PPtr parent,
PPtr progenitor,
const bool & fs,
const Energy & highestpT,
const vector<tcPDPtr> & ids,
const double & z,
const Energy & scale,
const Energy & pT);
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,ShowerInteraction);
//@}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
protected:
/**
* Calculate the matrix element for \f$e^+e^-\to q \bar{q}\f$.
* @param partons The incoming and outgoing particles
* @param momenta The momenta of the incoming and outgoing particles
* @param first Whether or not to calculate the spin correlations
*/
double loME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta,
bool first) const;
/**
* Member to calculate the matrix element
* @param fin Spinors for incoming fermion
* @param ain Spinors for incoming antifermion
* @param fout Spinors for outgoing fermion
* @param aout Spinors for outgong antifermion
* @param me Spin summed Matrix element
* @param cont The continuum piece of the matrix element
* @param BW The Z piece of the matrix element
*/
ProductionMatrixElement HelicityME(vector<SpinorWaveFunction> & fin,
vector<SpinorBarWaveFunction> & ain,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
double & me,
double & cont,
double & BW ) const;
/**
* The ratio of the matrix element for one additional jet over the
* leading order result. In practice
* \f[\frac{\hat{s}|\overline{\mathcal{M}}|^2_2|D_{\rm emit}|}{4\pi C_F\alpha_S|\overline{\mathcal{M}}|^2_3\left(|D_{\rm emit}|+|D_{\rm spect}|\right)}\f]
* is returned where \f$\|\overline{\mathcal{M}}|^2\f$ is
* the spin and colour summed/averaged matrix element.
* @param partons The incoming and outgoing particles
* @param momenta The momenta of the incoming and outgoing particles
* @param iemitter Whether the quark or antiquark is regardede as the emitter
* @param inter The type of interaction
* @param subtract Whether or not to subtract the relevant dipole term
*/
double meRatio(vector<cPDPtr> partons,
vector<Lorentz5Momentum> momenta,
unsigned int iemitter,
ShowerInteraction inter,
bool subtract =false) const;
/**
* Calculate the matrix element for \f$e^-e^-\to q \bar q g\f$.
* @param partons The incoming and outgoing particles
* @param momenta The momenta of the incoming and outgoing particles
* @param inter The type of interaction
*/
InvEnergy2 realME(const vector<cPDPtr> & partons,
const vector<Lorentz5Momentum> & momenta,
ShowerInteraction inter) const;
private:
/**
* Generate the momenta for a hard configuration
*/
pair<Energy,ShowerInteraction>
generateHard(RealEmissionProcessPtr,
vector<Lorentz5Momentum> & emission,
unsigned int & iemit, unsigned int & ispect,
bool applyVeto,ShowerInteraction);
/**
* Calculate the reall emission
*/
RealEmissionProcessPtr calculateRealEmission(RealEmissionProcessPtr born, bool veto,
ShowerInteraction inter);
/**
* Calculate \f$\tilde{\kappa}\f$.
*/
double getKfromX(double, double);
/**
* Vector and axial vector parts of the matrix element
*/
//@{
/**
* Vector part of the matrix element
*/
double MEV(double, double);
/**
* The matrix element, given \f$x_1\f$, \f$x_2\f$.
* @param x1 \f$x_1\f$
* @param x2 \f$x_2\f$
*/
double PS(double x1, double x2);
//@}
protected:
/**
* Pointer to the fermion-antifermion Z vertex
*/
AbstractFFVVertexPtr FFZVertex() const {return FFZVertex_;}
/**
* Pointer to the fermion-antifermion photon vertex
*/
AbstractFFVVertexPtr FFPVertex() const {return FFPVertex_;}
/**
* Pointer to the particle data object for the Z
*/
PDPtr Z0() const {return Z0_;}
/**
* Pointer to the particle data object for the photon
*/
PDPtr gamma() const {return gamma_;}
/**
* Pointer to the particle data object for the gluon
*/
PDPtr gluon() const {return gluon_;}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2gZ2qq & operator=(const MEee2gZ2qq &);
+ MEee2gZ2qq & operator=(const MEee2gZ2qq &) = delete;
private:
/**
* Parameters controlling the leading-order process
*/
//@{
/**
* The minimum PDG of the quarks to be produced
*/
int minflav_;
/**
* The maximum PDG of the quarks to be produced
*/
int maxflav_;
/**
* Option for the treatment of the top quark mass
*/
unsigned int massopt_;
//@}
/**
* Pointers to the vertices
*/
//@{
/**
* Pointer to the fermion-antifermion Z vertex
*/
AbstractFFVVertexPtr FFZVertex_;
/**
* Pointer to the fermion-antifermion photon vertex
*/
AbstractFFVVertexPtr FFPVertex_;
/**
* Pointer to the fermion-antifermion photon vertex
*/
AbstractFFVVertexPtr FFGVertex_;
//@}
/**
* Switch on/off the helivity vertex construction
*/
bool spinCorrelations_;
/**
* Pointer to the ParticleData objects
*/
//@{
/**
* Pointer to the particle data object for the Z
*/
PDPtr Z0_;
/**
* Pointer to the particle data object for the photon
*/
PDPtr gamma_;
/**
* Pointer to the particle data object for the gluon
*/
PDPtr gluon_;
//@}
/**
* CM energy
*/
Energy d_Q_;
/**
* Quark mass
*/
Energy d_m_;
/**
* The rho parameter
*/
double d_rho_;
/**
* The v parameter
*/
double d_v_;
/**
* The initial kappa-tilde values for radiation from the quark
*/
double d_kt1_;
/**
* The initial kappa-tilde values for radiation from the antiquark
*/
double d_kt2_;
/**
* Cut-off parameter
*/
static const double EPS_;
/**
* Pointer to the strong coupling
*/
ShowerAlphaPtr alphaQCD_;
/**
* Pointer to the EM coupling
*/
ShowerAlphaPtr alphaQED_;
private:
/**
* Variables for the POWHEG style corrections
*/
//@{
/**
* The cut off on pt for QED, assuming massless quarks.
*/
Energy pTminQED_;
/**
* The cut off on pt for QCD, assuming massless quarks.
*/
Energy pTminQCD_;
/**
* Overestimate for the prefactor
*/
double preFactor_;
/**
* ParticleData objects for the partons
*/
vector<cPDPtr> partons_;
/**
* Momenta of the leading-order partons
*/
vector<Lorentz5Momentum> loMomenta_;
//@}
};
}
#endif /* HERWIG_MEee2gZ2qq_H */
diff --git a/MatrixElement/Lepton/Makefile.am b/MatrixElement/Lepton/Makefile.am
--- a/MatrixElement/Lepton/Makefile.am
+++ b/MatrixElement/Lepton/Makefile.am
@@ -1,10 +1,10 @@
pkglib_LTLIBRARIES = HwMELepton.la
HwMELepton_la_SOURCES = \
MEee2gZ2qq.h MEee2gZ2qq.cc\
MEee2gZ2ll.h MEee2gZ2ll.cc\
MEee2ZH.h MEee2ZH.cc\
MEee2HiggsVBF.h MEee2HiggsVBF.cc \
MEee2VV.h MEee2VV.cc \
MEee2VectorMeson.h MEee2VectorMeson.cc \
MEee2Higgs2SM.h MEee2Higgs2SM.cc
-HwMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:1:0
+HwMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:0:0
diff --git a/MatrixElement/MEfftoVH.h b/MatrixElement/MEfftoVH.h
--- a/MatrixElement/MEfftoVH.h
+++ b/MatrixElement/MEfftoVH.h
@@ -1,309 +1,309 @@
// -*- C++ -*-
#ifndef HERWIG_MEfftoVH_H
#define HERWIG_MEfftoVH_H
//
// This is the declaration of the MEfftoVH class.
//
#include "DrellYanBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "Herwig/PDT/GenericMassGenerator.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEfftoVH class is the base class for \f$f\bar{f}\to VH\f$ processes.
* This base class handles the phase-space integration while
* the inheriting classes implement the matrix element
*
* @see \ref MEfftoVHInterfaces "The interfaces"
* defined for MEfftoVH.
*/
class MEfftoVH: public DrellYanBase {
public:
/**
* The default constructor.
*/
MEfftoVH() : _shapeopt(2), _maxflavour(5), _mh(), _wh() {}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$f\bar{f}\to V h^0\to f'\bar{f'} h^0\f$.
* @param fin Spinors for incoming fermion
* @param ain Spinors for incoming antifermion
* @param fout Spinors for incoming fermion
* @param aout Spinors for incoming antifermion
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double helicityME(vector<SpinorWaveFunction> & fin ,
vector<SpinorBarWaveFunction> & ain ,
vector<SpinorBarWaveFunction> & fout,
vector<SpinorWaveFunction> & aout,
bool me) const;
/**
* Access to the vector ParticleData objects
*/
//@{
/**
* Access to the \f$W^+\f$ data
*/
PDPtr WPlus() const { return _wplus; }
/**
* Access to the \f$W^-\f$ data
*/
PDPtr WMinus() const { return _wminus; }
/**
* Access to the \f$Z^0\f$ data
*/
PDPtr Z0() const { return _z0; }
/**
* Access to the higgs data
*/
PDPtr higgs() const { return _higgs; }
/**
* Set the higgs data
*/
void higgs(PDPtr in) {_higgs =in;}
//@}
/**
* Set the pointer to the vector-vector-Higgs vertex
*/
void setWWHVertex(AbstractVVSVertexPtr in) {
_vertexWWH = in;
}
/**
* Set the line shape treatment
*/
void lineShape(unsigned int in) {_shapeopt=in;}
/**
* Maximum flavour of the incoming partons
*/
unsigned int maxFlavour() const {return _maxflavour;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEfftoVH & operator=(const MEfftoVH &);
+ MEfftoVH & operator=(const MEfftoVH &) = delete;
private:
/**
* Defines the Higgs resonance shape
*/
unsigned int _shapeopt;
/**
* The allowed flavours of the incoming quarks
*/
unsigned int _maxflavour;
/**
* The intermediate vector bosons
*/
//@{
/**
* \f$W^+\f$
*/
PDPtr _wplus;
/**
* \f$W^-\f$
*/
PDPtr _wminus;
/**
* \f$Z^0\f$
*/
PDPtr _z0;
/**
* The higgs bosom
*/
PDPtr _higgs;
//@}
/**
* The vertices for the calculation of the matrix element
*/
//@{
/**
* Vertex for fermion-fermion-W
*/
AbstractFFVVertexPtr _vertexFFW;
/**
* Vertex for fermion-fermion-Z
*/
AbstractFFVVertexPtr _vertexFFZ;
/**
* Vertex for vector-vector-Higgs
*/
AbstractVVSVertexPtr _vertexWWH;
//@}
/**
* On-shell mass for the higgs
*/
Energy _mh;
/**
* On-shell width for the higgs
*/
Energy _wh;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr _hmass;
/**
* Matrix element for spin correlations
*/
ProductionMatrixElement _me;
};
}
#endif /* HERWIG_MEfftoVH_H */
diff --git a/MatrixElement/MEfftoffH.h b/MatrixElement/MEfftoffH.h
--- a/MatrixElement/MEfftoffH.h
+++ b/MatrixElement/MEfftoffH.h
@@ -1,349 +1,349 @@
// -*- C++ -*-
#ifndef HERWIG_MEfftoffH_H
#define HERWIG_MEfftoffH_H
//
// This is the declaration of the MEfftoffH class.
//
#include "HwMEBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "Herwig/PDT/GenericMassGenerator.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEfftoffH class is the base class for vector boson fusion type
* processes in Herwig.
*
* @see \ref MEfftoffHInterfaces "The interfaces"
* defined for MEfftoffH.
*/
class MEfftoffH: public HwMEBase {
public:
/**
* The default constructor.
*/
MEfftoffH() : _shapeopt(2), _maxflavour(5), _minflavour(1), _process(0),
_mh(), _wh(), _swap(false) {}
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Construct the vertex of spin correlations.
*/
virtual void constructVertex(tSubProPtr);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Matrix element for \f$ff\to h^0\to ff h^0\f$.
* @param f1 Spinors for first incoming fermion
* @param f2 Spinors for second incoming fermion
* @param a1 Spinors for first outgoing fermion
* @param a2 Spinors for second outgoing fermion
* @param swap1 Whether or not to swap the order for the first fermion line
* @param swap2 Whether or not to swap the order for the second fermion line
* @param me Whether or not to calculate the matrix element for spin correlations
*/
double helicityME(vector<SpinorWaveFunction> & f1 ,
vector<SpinorWaveFunction> & f2 ,
vector<SpinorBarWaveFunction> & a1,
vector<SpinorBarWaveFunction> & a2,
bool swap1, bool swap2,
bool me) const;
/**
* Access to the vector ParticleData objects
*/
//@{
/**
* Access to the \f$W^+\f$ data
*/
PDPtr WPlus() const {return _wplus;}
/**
* Access to the \f$W^-\f$ data
*/
PDPtr WMinus() const {return _wminus;}
/**
* Access to the \f$Z^0\f$ data
*/
PDPtr Z0() const {return _z0;}
/**
* Access to the Higgs boson
*/
PDPtr higgs() const {return _higgs;}
/**
* Set the Higgs boson
*/
void higgs(PDPtr in) {_higgs=in;}
//@}
/**
* Set the pointer to the vector-vector-Higgs vertex
*/
void setWWHVertex(AbstractVVSVertexPtr in) {
_vertexWWH = in;
}
/**
* Set the line shape treatment
*/
void lineShape(unsigned int in) {_shapeopt=in;}
/**
* Which process to generate
*/
unsigned int process() const {return _process;}
/**
* Whether momenta are swapped
*/
bool swapOrder() {return _swap;}
/**
* Which process to generate
*/
void process(unsigned int in) {_process = in;}
/**
* Maximum flavour of the incoming partons
*/
unsigned int maxFlavour() const {return _maxflavour;}
/**
* Minimum flavour of the incoming partons
*/
unsigned int minFlavour() const {return _minflavour;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEfftoffH & operator=(const MEfftoffH &);
+ MEfftoffH & operator=(const MEfftoffH &) = delete;
private:
/**
* Defines the Higgs resonance shape
*/
unsigned int _shapeopt;
/**
* Maximum flavour of the quarks involved
*/
unsigned int _maxflavour;
/**
* Minimum flavour of the quarks involved
*/
unsigned int _minflavour;
/**
* Whether to include $WW$ and $ZZ$ processes or both
*/
unsigned int _process;
/**
* The intermediate vector bosons
*/
//@{
/**
* \f$W^+\f$
*/
PDPtr _wplus;
/**
* \f$W^-\f$
*/
PDPtr _wminus;
/**
* \f$Z^0\f$
*/
PDPtr _z0;
/**
* Higgs boson
*/
PDPtr _higgs;
//@}
/**
* The vertices for the calculation of the matrix element
*/
//@{
/**
* Vertex for fermion-fermion-W
*/
AbstractFFVVertexPtr _vertexFFW;
/**
* Vertex for fermion-fermion-Z
*/
AbstractFFVVertexPtr _vertexFFZ;
/**
* Vertex for vector-vector-Higgs
*/
AbstractVVSVertexPtr _vertexWWH;
//@}
/**
* On-shell mass for the higgs
*/
Energy _mh;
/**
* On-shell width for the higgs
*/
Energy _wh;
/**
* The mass generator for the Higgs
*/
GenericMassGeneratorPtr _hmass;
/**
* Matrix element for spin correlations
*/
mutable ProductionMatrixElement _me;
/**
* if order swaped
*/
bool _swap;
};
}
#endif /* HERWIG_MEfftoffH_H */
diff --git a/MatrixElement/Matchbox/Base/MatchboxAmplitude.h b/MatrixElement/Matchbox/Base/MatchboxAmplitude.h
--- a/MatrixElement/Matchbox/Base/MatchboxAmplitude.h
+++ b/MatrixElement/Matchbox/Base/MatchboxAmplitude.h
@@ -1,714 +1,714 @@
// -*- C++ -*-
//
// MatchboxAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MatchboxAmplitude_H
#define HERWIG_MatchboxAmplitude_H
//
// This is the declaration of the MatchboxAmplitude class.
//
#include "ThePEG/MatrixElement/Amplitude.h"
#include "ThePEG/Handlers/LastXCombInfo.h"
#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
#include "Herwig/MatrixElement/Matchbox/Utility/SpinCorrelationTensor.h"
#include "Herwig/MatrixElement/Matchbox/Utility/LastMatchboxXCombInfo.h"
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxXComb.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Process information with coupling order
*/
struct Process {
PDVector legs;
unsigned int orderInAlphaS;
unsigned int orderInAlphaEW;
Process()
: orderInAlphaS(0), orderInAlphaEW(0) {}
Process(const PDVector& p,
unsigned int oas,
unsigned int oae)
: legs(p), orderInAlphaS(oas), orderInAlphaEW(oae) {}
bool operator==(const Process& other) const {
return
legs == other.legs &&
orderInAlphaS == other.orderInAlphaS &&
orderInAlphaEW == other.orderInAlphaEW;
}
bool operator<(const Process& other) const {
if ( orderInAlphaS != other.orderInAlphaS )
return orderInAlphaS < other.orderInAlphaS;
if ( orderInAlphaEW != other.orderInAlphaEW )
return orderInAlphaEW < other.orderInAlphaEW;
return legs < other.legs;
}
void persistentOutput(PersistentOStream & os) const {
os << legs << orderInAlphaS << orderInAlphaEW;
}
void persistentInput(PersistentIStream & is) {
is >> legs >> orderInAlphaS >> orderInAlphaEW;
}
};
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Enumerate the type of calculation required
*/
namespace ProcessType {
enum Types {
treeME2 = 0,
colourCorrelatedME2,
spinColourCorrelatedME2,
oneLoopInterference,
loopInducedME2,
spinCorrelatedME2
};
}
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxAmplitude is the base class for amplitude
* implementations inside Matchbox.
*
* @see \ref MatchboxAmplitudeInterfaces "The interfaces"
* defined for MatchboxAmplitude.
*/
class MatchboxAmplitude:
public Amplitude,
public LastXCombInfo<StandardXComb>,
public LastMatchboxXCombInfo {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitude();
/**
* The destructor.
*/
virtual ~MatchboxAmplitude();
//@}
public:
/**
* Return the amplitude. Needs to be implemented from
* ThePEG::Amplitude but is actually ill-defined, as colours of the
* external particles are not specified. To this extent, this
* implementation just asserts.
*/
virtual Complex value(const tcPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
const vector<int> & helicities);
/**
* Return the factory which produced this matrix element
*/
Ptr<MatchboxFactory>::tptr factory() const;
/** @name Subprocess information */
//@{
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector& p,
Ptr<MatchboxFactory>::tptr,
bool) const { return canHandle(p); }
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const { return false; }
/**
* Return the number of random numbers required to evaluate this
* amplitude at a fixed phase space point.
*/
virtual int nDimAdditional() const { return 0; }
/**
* Return a ME instance appropriate for this amplitude and the given
* subprocesses
*/
virtual Ptr<MatchboxMEBase>::ptr makeME(const PDVector&) const;
/**
* Set the (tree-level) order in \f$g_S\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGs(unsigned int) {}
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const = 0;
/**
* Set the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGem(unsigned int) {}
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const = 0;
/**
* Return the Herwig StandardModel object
*/
Ptr<StandardModel>::tcptr standardModel() {
if ( !hwStandardModel() )
hwStandardModel(dynamic_ptr_cast<Ptr<StandardModel>::tcptr>(HandlerBase::standardModel()));
return hwStandardModel();
}
/**
* Return true, if this amplitude already includes averaging over
* incoming parton's quantum numbers.
*/
virtual bool hasInitialAverage() const { return false; }
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
virtual bool hasFinalStateSymmetry() const { return false; }
/**
* Return true, if this amplitude is handled by a BLHA one-loop provider
*/
virtual bool isOLPTree() const { return false; }
/**
* Return true, if this amplitude is handled by a BLHA one-loop provider
*/
virtual bool isOLPLoop() const { return false; }
/**
* Return true, if colour and spin correlated matrix elements should
* be ordered from the OLP
*/
virtual bool needsOLPCorrelators() const { return true; }
/**
* Write the order file header
*/
virtual void olpOrderFileHeader(ostream&) const;
/**
* Write the order file process list
*/
virtual void olpOrderFileProcesses(ostream&,
const map<pair<Process,int>,int>& procs) const;
/**
* Start the one loop provider, if appropriate, giving order and
* contract files
*/
virtual void signOLP(const string&, const string&) { }
/**
* Start the one loop provider, if appropriate
*/
virtual void startOLP(const string&, int& status) { status = -1; }
/**
* Start the one loop provider, if appropriate. This default
* implementation writes an BLHA 2.0 order file and starts the OLP
*/
virtual bool startOLP(const map<pair<Process,int>,int>& procs);
/**
* Return true, if this amplitude needs to initialize an external
* code.
*/
virtual bool isExternal() const { return false; }
/**
* Initialize this amplitude
*/
virtual bool initializeExternal() { return false; }
/**
* Return a generic process id for the given process
*/
virtual int externalId(const cPDVector&) { return 0; }
/**
* Return the map with masses to be used for amplitude evaluation
*/
const map<long,Energy>& reshuffleMasses() const { return theReshuffleMasses; }
/**
* Check if reshuffling is needed at all
*/
void checkReshuffling(Ptr<MatchboxPhasespace>::tptr);
/**
* Return true, if this amplitude makes use of amplitudeMomenta
*/
virtual bool hasAmplitudeMomenta() const { return false; }
//@}
/** @name Colour basis. */
//@{
/**
* Return the colour basis.
*/
virtual Ptr<ColourBasis>::tptr colourBasis() const { return theColourBasis; }
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const {
return colourBasis() ? colourBasis()->haveColourFlows() : false;
}
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
*/
virtual Selector<const ColourLines *> colourGeometries(tcDiagPtr diag) const;
/**
* Return an ordering identifier for the current subprocess and
* colour absis tensor index.
*/
const string& colourOrderingString(size_t id) const;
/**
* Return an ordering identifier for the current subprocess and
* colour absis tensor index.
*/
const set<vector<size_t> >& colourOrdering(size_t id) const;
//@}
/** @name Phasespace point, crossing and helicities */
//@{
/**
* Set the xcomb object.
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Return the momentum as crossed appropriate for this amplitude.
*/
Lorentz5Momentum amplitudeMomentum(int) const;
/**
* Perform a normal ordering of external legs and fill the
* crossing information as. This default implementation sorts
* lexicographically in (abs(colour)/spin/abs(charge)), putting pairs
* of particles/anti-particles where possible.
*/
virtual void fillCrossingMap(size_t shift = 0);
/**
* Generate the helicity combinations.
*/
virtual set<vector<int> > generateHelicities() const;
/**
* Return the helicity combination of the physical process in the
* conventions used by the spin correlation algorithm.
*/
virtual vector<unsigned int> physicalHelicities(const vector<int>&) const;
//@}
/** @name Tree-level amplitudes */
//@{
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Return the matrix element squared.
*/
virtual double me2() const;
/**
* Return the colour charge of a given leg
*/
double colourCharge(tcPDPtr) const;
/**
* Return the large-N charge of a given leg
*/
double largeNColourCharge(tcPDPtr) const;
/**
* Return the largeN matrix element squared.
*/
virtual double largeNME2(Ptr<ColourBasis>::tptr largeNBasis) const;
/**
* Return the colour correlated matrix element.
*/
virtual double colourCorrelatedME2(pair<int,int> ij) const;
/**
* Return the large-N colour correlated matrix element.
*/
virtual double largeNColourCorrelatedME2(pair<int,int> ij,
Ptr<ColourBasis>::tptr largeNBasis) const;
/**
* Return true if trivial colour configuration.
*/
bool trivialColourLegs() const { return theTrivialColourLegs; }
/**
* Return true, if this amplitude is capable of consistently filling
* the rho matrices for the spin correllations
*/
virtual bool canFillRhoMatrix() const { return false; }
/**
* Return a positive helicity polarization vector for a gluon of
* momentum p (with reference vector n) to be used when evaluating
* spin correlations.
*/
virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
const Lorentz5Momentum& n,
int id = -1) const;
/**
* Return the colour and spin correlated matrix element.
*/
virtual double spinColourCorrelatedME2(pair<int,int> emitterSpectator,
const SpinCorrelationTensor& c) const;
/**
* Return the spin correlated matrix element.
*/
virtual double spinCorrelatedME2(pair<int,int> emitterSpectator,
const SpinCorrelationTensor& c) const;
/**
* Return true, if tree-level contributions will be evaluated at amplitude level.
*/
virtual bool treeAmplitudes() const { return true; }
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&) { return 0.; }
//@}
/** @name One-loop amplitudes */
//@{
/**
* Return the one-loop amplitude, if applicable.
*/
virtual Ptr<MatchboxAmplitude>::tptr oneLoopAmplitude() const {
return Ptr<MatchboxAmplitude>::tptr();
}
/**
* Diasble one-loop functionality if not needed.
*/
virtual void disableOneLoop() {}
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Return true, if this amplitude only provides
* one-loop (QCD) corrections.
*/
virtual bool onlyOneLoop() const { return false; }
/**
* Return true, if one-loop contributions will be evaluated at amplitude level.
*/
virtual bool oneLoopAmplitudes() const { return true; }
/**
* Return true, if one loop corrections have been calculated in
* dimensional reduction. Otherwise conventional dimensional
* regularization is assumed. Note that renormalization is always
* assumed to be MSbar.
*/
virtual bool isDR() const { return false; }
/**
* Return true, if the amplitude is DRbar renormalized, otherwise
* MSbar is assumed.
*/
virtual bool isDRbar() const { return true; }
/**
* Return true, if one loop corrections are given in the conventions
* of the integrated dipoles.
*/
virtual bool isCS() const { return false; }
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return false; }
/**
* Return true, if one loop corrections are given in the conventions
* of everything expanded.
*/
virtual bool isExpanded() const { return false; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return 0.*GeV2; }
/**
* Indicate that this amplitude is running alphas by itself.
*/
virtual bool hasRunningAlphaS() const { return false; }
/**
* Indicate that this amplitude is running alphaew by itself.
*/
virtual bool hasRunningAlphaEW() const { return false; }
/**
* If defined, return the coefficient of the pole in epsilon^2
*/
virtual double oneLoopDoublePole() const { return 0.; }
/**
* If defined, return the coefficient of the pole in epsilon
*/
virtual double oneLoopSinglePole() const { return 0.; }
/**
* Calculate the one-loop amplitudes for the phasespace point
* stored in lastXComb, if provided.
*/
virtual void prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Return the one-loop/tree interference.
*/
virtual double oneLoopInterference() const;
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t, const vector<int>&) { return 0.; }
//@}
/** @name Caching and helpers to setup amplitude objects. */
//@{
/**
* Flush all cashes.
*/
virtual void flushCaches() {}
/**
* Clone this amplitude.
*/
Ptr<MatchboxAmplitude>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<MatchboxAmplitude>::ptr>(clone());
}
/**
* Clone the dependencies, using a given prefix.
*/
virtual void cloneDependencies(const std::string& prefix="" , bool slim=false);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* Recursively generate helicities
*/
void doGenerateHelicities(set<vector<int> >& res,
vector<int>& current,
size_t pos) const;
/**
* The colour basis implementation to be used.
*/
Ptr<ColourBasis>::ptr theColourBasis;
/**
* The number of points after which helicity combinations wil be
* cleaned up
*/
int theCleanupAfter;
/**
* The number of points that are calculated before a certain
* helicity is excluded. Needed in pp->V
*/
int treeLevelHelicityPoints;
/**
* The number of points that are calculated before a certain
* helicity is excluded. Needed in pp->V
*/
int oneLoopHelicityPoints;
/**
* The map with masses to be used for amplitude evaluation
*/
map<long,Energy> theReshuffleMasses;
/**
* True if trivial colour configuration.
*/
bool theTrivialColourLegs;
/**
* A command to fill the reshuffle mass map
*/
string doReshuffle(string);
/**
* A command to fill the reshuffle mass map
*/
string doMassless(string);
/**
* A command to fill the reshuffle mass map
*/
string doOnShell(string);
/**
* Clear the reshuffling map
*/
string doClearReshuffling(string);
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitude & operator=(const MatchboxAmplitude &);
+ MatchboxAmplitude & operator=(const MatchboxAmplitude &) = delete;
};
inline PersistentOStream& operator<<(PersistentOStream& os,
const Process& h) {
h.persistentOutput(os);
return os;
}
inline PersistentIStream& operator>>(PersistentIStream& is,
Process& h) {
h.persistentInput(is);
return is;
}
}
#endif /* HERWIG_MatchboxAmplitude_H */
diff --git a/MatrixElement/Matchbox/Base/MatchboxHybridAmplitude.h b/MatrixElement/Matchbox/Base/MatchboxHybridAmplitude.h
--- a/MatrixElement/Matchbox/Base/MatchboxHybridAmplitude.h
+++ b/MatrixElement/Matchbox/Base/MatchboxHybridAmplitude.h
@@ -1,637 +1,637 @@
// -*- C++ -*-
//
// MatchboxHybridAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxHybridAmplitude_H
#define Herwig_MatchboxHybridAmplitude_H
//
// This is the declaration of the MatchboxHybridAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxHybridAmplitude unifies two amplitude objects to
* provide tree and one-loop matrix elements.
*
* @see \ref MatchboxHybridAmplitudeInterfaces "The interfaces"
* defined for MatchboxHybridAmplitude.
*/
class MatchboxHybridAmplitude: public Herwig::MatchboxAmplitude {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxHybridAmplitude();
/**
* The destructor.
*/
virtual ~MatchboxHybridAmplitude();
//@}
public:
/**
* Return the amplitude object to provide tree-level amplitudes.
*/
Ptr<MatchboxAmplitude>::tptr treeLevelAmplitude() const { return theTreeLevelAmplitude; }
/**
* Set the amplitude object to provide tree-level amplitudes.
*/
void treeLevelAmplitude(Ptr<MatchboxAmplitude>::tptr amp) { theTreeLevelAmplitude = amp; }
/**
* Return the amplitude object to provide one-loop amplitudes.
*/
virtual Ptr<MatchboxAmplitude>::tptr oneLoopAmplitude() const { return theOneLoopAmplitude; }
/**
* Set the amplitude object to provide one-loop amplitudes.
*/
void oneLoopAmplitude(Ptr<MatchboxAmplitude>::tptr amp) { theOneLoopAmplitude = amp; }
/**
* Return true, if the two amplitude objects can be used in a
* consistent way.
*/
bool isConsistent() const;
public:
/** @name Subprocess information */
//@{
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector& p,
Ptr<MatchboxFactory>::tptr f,
bool virt) const;
/**
* Return the number of random numbers required to evaluate this
* amplitude at a fixed phase space point.
*/
virtual int nDimAdditional() const {
if ( !oneLoopAmplitude() )
return treeLevelAmplitude()->nDimAdditional();
return
treeLevelAmplitude()->nDimAdditional() ?
treeLevelAmplitude()->nDimAdditional() :
oneLoopAmplitude()->nDimAdditional();
}
/**
* Return a ME instance appropriate for this amplitude and the given
* subprocesses
*/
virtual Ptr<MatchboxMEBase>::ptr makeME(const PDVector& p) const {
return treeLevelAmplitude()->makeME(p);
}
/**
* Set the (tree-level) order in \f$g_S\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGs(unsigned int n) {
treeLevelAmplitude()->orderInGs(n);
if ( oneLoopAmplitude() )
oneLoopAmplitude()->orderInGs(n);
}
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const {
return treeLevelAmplitude()->orderInGs();
}
/**
* Set the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGem(unsigned int n) {
treeLevelAmplitude()->orderInGem(n);
if ( oneLoopAmplitude() )
oneLoopAmplitude()->orderInGem(n);
}
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const {
return treeLevelAmplitude()->orderInGem();
}
/**
* Return true, if this amplitude already includes averaging over
* incoming parton's quantum numbers.
*/
virtual bool hasInitialAverage() const {
return treeLevelAmplitude()->hasInitialAverage();
}
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
virtual bool hasFinalStateSymmetry() const {
return treeLevelAmplitude()->hasFinalStateSymmetry();
}
/**
* Return true, if this amplitude is handled by a BLHA one-loop provider
*/
virtual bool isOLPTree() const { return false; }
/**
* Return true, if this amplitude is handled by a BLHA one-loop provider
*/
virtual bool isOLPLoop() const {
if ( !oneLoopAmplitude() )
return false;
return oneLoopAmplitude()->isOLPLoop();
}
/**
* Return true, if colour and spin correlated matrix elements should
* be ordered from the OLP
*/
virtual bool needsOLPCorrelators() const {
return theUseOLPCorrelators;
}
/**
* Start the one loop provider, if appropriate. This default
* implementation writes an BLHA 2.0 order file and starts the OLP
*/
virtual bool startOLP(const map<pair<Process,int>,int>& procs) {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->startOLP(procs);
}
/**
* Return true, if this amplitude needs to initialize an external
* code.
*/
virtual bool isExternal() const {
return treeLevelAmplitude()->isExternal();
}
/**
* Initialize this amplitude
*/
virtual bool initializeExternal() {
return treeLevelAmplitude()->initializeExternal();
}
/**
* Return a generic process id for the given process
*/
virtual int externalId(const cPDVector& proc) {
return treeLevelAmplitude()->externalId(proc);
}
//@}
/** @name Colour basis. */
//@{
/**
* Return the colour basis.
*/
virtual Ptr<ColourBasis>::tptr colourBasis() const {
return treeLevelAmplitude()->colourBasis();
}
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const {
return treeLevelAmplitude()->haveColourFlows();
}
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
*/
virtual Selector<const ColourLines *> colourGeometries(tcDiagPtr diag) const {
return treeLevelAmplitude()->colourGeometries(diag);
}
//@}
/** @name Phasespace point, crossing and helicities */
//@{
/**
* Set the xcomb object.
*/
virtual void setXComb(tStdXCombPtr xc) {
treeLevelAmplitude()->setXComb(xc);
if ( oneLoopAmplitude() )
oneLoopAmplitude()->setXComb(xc);
lastMatchboxXComb(xc);
}
/**
* Perform a normal ordering of external legs and fill the
* crossing information as. This default implementation sorts
* lexicographically in (abs(colour)/spin/abs(charge)), putting pairs
* of particles/anti-particles where possible.
*/
virtual void fillCrossingMap(size_t shift = 0) {
treeLevelAmplitude()->fillCrossingMap(shift);
}
//@}
/** @name Tree-level amplitudes */
//@{
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Return the matrix element squared.
*/
virtual double me2() const {
return treeLevelAmplitude()->me2();
}
/**
* Return the largeN matrix element squared.
*/
virtual double largeNME2(Ptr<ColourBasis>::tptr largeNBasis) const {
return treeLevelAmplitude()->largeNME2(largeNBasis);
}
/**
* Return the colour correlated matrix element.
*/
virtual double colourCorrelatedME2(pair<int,int> ij) const {
return
theUseOLPCorrelators ?
oneLoopAmplitude()->colourCorrelatedME2(ij) :
treeLevelAmplitude()->colourCorrelatedME2(ij);
}
/**
* Return the large-N colour correlated matrix element.
*/
virtual double largeNColourCorrelatedME2(pair<int,int> ij,
Ptr<ColourBasis>::tptr largeNBasis) const {
return treeLevelAmplitude()->largeNColourCorrelatedME2(ij,largeNBasis);
}
/**
* Return a positive helicity polarization vector for a gluon of
* momentum p (with reference vector n) to be used when evaluating
* spin correlations.
*/
virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
const Lorentz5Momentum& n,
int id = -1) const {
return
theUseOLPCorrelators ?
oneLoopAmplitude()->plusPolarization(p,n,id) :
treeLevelAmplitude()->plusPolarization(p,n,id);
}
/**
* Return the colour and spin correlated matrix element.
*/
virtual double spinColourCorrelatedME2(pair<int,int> emitterSpectator,
const SpinCorrelationTensor& c) const {
return
theUseOLPCorrelators ?
oneLoopAmplitude()->spinColourCorrelatedME2(emitterSpectator,c) :
treeLevelAmplitude()->spinColourCorrelatedME2(emitterSpectator,c);
}
/**
* Return the spin correlated matrix element.
*/
virtual double spinCorrelatedME2(pair<int,int> emitterSpectator,
const SpinCorrelationTensor& c) const {
return
theUseOLPCorrelators ?
oneLoopAmplitude()->spinCorrelatedME2(emitterSpectator,c) :
treeLevelAmplitude()->spinCorrelatedME2(emitterSpectator,c);
}
/**
* Return true, if this amplitude is capable of consistently filling
* the rho matrices for the spin correllations
*/
virtual bool canFillRhoMatrix() const {
return treeLevelAmplitude()->canFillRhoMatrix();
}
/**
* Return the helicity combination of the physical process in the
* conventions used by the spin correlation algorithm.
*/
virtual vector<unsigned int> physicalHelicities(const vector<int>& hel) const {
return treeLevelAmplitude()->physicalHelicities(hel);
}
/**
* Return true, if tree-level contributions will be evaluated at amplitude level.
*/
virtual bool treeAmplitudes() const {
return treeLevelAmplitude()->treeAmplitudes();
}
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t a, const vector<int>& hel, Complex& largeN) {
return treeLevelAmplitude()->evaluate(a,hel,largeN);
}
//@}
/** @name One-loop amplitudes */
//@{
/**
* Diasble one-loop functionality if not needed.
*/
virtual void disableOneLoop() { oneLoopAmplitude(Ptr<MatchboxAmplitude>::ptr()); }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return oneLoopAmplitude(); }
/**
* Return true, if this amplitude only provides
* one-loop (QCD) corrections.
*/
virtual bool onlyOneLoop() const { return false; }
/**
* Return true, if one-loop contributions will be evaluated at amplitude level.
*/
virtual bool oneLoopAmplitudes() const {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->oneLoopAmplitudes();
}
/**
* Return true, if the amplitude is DRbar renormalized, otherwise
* MSbar is assumed.
*/
virtual bool isDRbar() const {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->isDRbar();
}
/**
* Return true, if one loop corrections have been calculated in
* dimensional reduction. Otherwise conventional dimensional
* regularization is assumed. Note that renormalization is always
* assumed to be MSbar.
*/
virtual bool isDR() const {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->isDR();
}
/**
* Return true, if one loop corrections are given in the conventions
* of the integrated dipoles.
*/
virtual bool isCS() const {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->isCS();
}
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->isBDK();
}
/**
* Return true, if one loop corrections are given in the conventions
* of everything expanded.
*/
virtual bool isExpanded() const {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->isExpanded();
}
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->mu2();
}
/**
* Adjust the virtual symmetry factor conventions to the tree level
* one
*/
double symmetryRatio() const;
/**
* Indicate that this amplitude is running alphas by itself.
*/
virtual bool hasRunningAlphaS() const {
return treeLevelAmplitude()->hasRunningAlphaS();
}
/**
* Indicate that this amplitude is running alphaew by itself.
*/
virtual bool hasRunningAlphaEW() const {
return treeLevelAmplitude()->hasRunningAlphaEW();
}
/**
* If defined, return the coefficient of the pole in epsilon^2
*/
virtual double oneLoopDoublePole() const {
assert(oneLoopAmplitude());
return symmetryRatio()*oneLoopAmplitude()->oneLoopDoublePole();
}
/**
* If defined, return the coefficient of the pole in epsilon
*/
virtual double oneLoopSinglePole() const {
assert(oneLoopAmplitude());
return symmetryRatio()*oneLoopAmplitude()->oneLoopSinglePole();
}
/**
* Calculate the one-loop amplitudes for the phasespace point
* stored in lastXComb, if provided.
*/
virtual void prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Return the one-loop/tree interference.
*/
virtual double oneLoopInterference() const {
assert(oneLoopAmplitude());
return symmetryRatio()*oneLoopAmplitude()->oneLoopInterference();
}
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t a, const vector<int>& hel) {
assert(oneLoopAmplitude());
return oneLoopAmplitude()->evaluateOneLoop(a,hel);
}
//@}
/** @name Caching and helpers to setup amplitude objects. */
//@{
/**
* Flush all cashes.
*/
virtual void flushCaches() {
treeLevelAmplitude()->flushCaches();
if ( oneLoopAmplitude() )
oneLoopAmplitude()->flushCaches();
}
/**
* Clone the dependencies, using a given prefix.
*/
virtual void cloneDependencies(const std::string& prefix= "" , bool slim=false);
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The amplitude object to provide tree-level amplitudes.
*/
Ptr<MatchboxAmplitude>::ptr theTreeLevelAmplitude;
/**
* The amplitude object to provide one-loop amplitudes.
*/
Ptr<MatchboxAmplitude>::ptr theOneLoopAmplitude;
/**
* True, if correlators should be used from the OLP amplitude
*/
bool theUseOLPCorrelators;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxHybridAmplitude & operator=(const MatchboxHybridAmplitude &);
+ MatchboxHybridAmplitude & operator=(const MatchboxHybridAmplitude &) = delete;
};
}
#endif /* Herwig_MatchboxHybridAmplitude_H */
diff --git a/MatrixElement/Matchbox/Base/MatchboxMEBase.h b/MatrixElement/Matchbox/Base/MatchboxMEBase.h
--- a/MatrixElement/Matchbox/Base/MatchboxMEBase.h
+++ b/MatrixElement/Matchbox/Base/MatchboxMEBase.h
@@ -1,1211 +1,1211 @@
// -*- C++ -*-
//
// MatchboxMEBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MatchboxMEBase_H
#define HERWIG_MatchboxMEBase_H
//
// This is the declaration of the MatchboxMEBase class.
//
#include "ThePEG/MatrixElement/MEBase.h"
#include "Herwig/MatrixElement/Matchbox/Utility/SpinCorrelationTensor.h"
#include "Herwig/MatrixElement/Matchbox/Utility/Tree2toNGenerator.h"
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
#include "Herwig/MatrixElement/Matchbox/Utility/ProcessData.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxReweightBase.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
#include "Herwig/MatrixElement/Matchbox/Base/MergerBase.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
#include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
#include "Herwig/MatrixElement/Matchbox/Utility/LastMatchboxXCombInfo.h"
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxXComb.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxMEBase is the base class for matrix elements
* in the context of the matchbox NLO interface.
*
* @see \ref MatchboxMEBaseInterfaces "The interfaces"
* defined for MatchboxMEBase.
*/
class MatchboxMEBase:
public MEBase, public LastMatchboxXCombInfo {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxMEBase();
/**
* The destructor.
*/
virtual ~MatchboxMEBase();
//@}
public:
/**
* Return the factory which produced this matrix element
*/
Ptr<MatchboxFactory>::tptr factory() const;
/** @name Subprocess and diagram information. */
//@{
/**
* Return the subprocess.
*/
const Process& subProcess() const { return theSubprocess; }
/**
* Access the subprocess.
*/
Process& subProcess() { return theSubprocess; }
/**
* Return the diagram generator.
*/
Ptr<Tree2toNGenerator>::tptr diagramGenerator() const;
/**
* Return the process data.
*/
Ptr<ProcessData>::tptr processData() const;
/**
* Return true, if this matrix element does not want to
* make use of mirroring processes; in this case all
* possible partonic subprocesses with a fixed assignment
* of incoming particles need to be provided through the diagrams
* added with the add(...) method.
*/
virtual bool noMirror () const { return true; }
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
using MEBase::getDiagrams;
/**
* With the information previously supplied with the
* setKinematics(...) method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector &) const;
using MEBase::diagrams;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Return true, if this amplitude is capable of consistently filling
* the rho matrices for the spin correllations
*/
virtual bool canFillRhoMatrix() const {
if ( matchboxAmplitude() )
return matchboxAmplitude()->canFillRhoMatrix();
return false;
}
/**
* construct the spin information for the interaction
*/
virtual void constructVertex(tSubProPtr) {}
/**
* construct the spin information for the interaction
*/
virtual void constructVertex(tSubProPtr sub, const ColourLines* cl);
/**
* Return the order in \f$\alpha_S\f$ in which this matrix element
* is given.
*/
virtual unsigned int orderInAlphaS() const;
using MEBase::orderInAlphaS;
/**
* Return the order in \f$\alpha_{EM}\f$ in which this matrix
* element is given. Returns 0.
*/
virtual unsigned int orderInAlphaEW() const;
using MEBase::orderInAlphaEW;
/**
* Return true, if this amplitude already includes averaging over
* incoming parton's quantum numbers.
*/
virtual bool hasInitialAverage() const {
return matchboxAmplitude() ? matchboxAmplitude()->hasInitialAverage() : false;
}
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
virtual bool hasFinalStateSymmetry() const {
return matchboxAmplitude() ? matchboxAmplitude()->hasFinalStateSymmetry() : false;
}
/**
* Return the number of light flavours, this matrix
* element is calculated for.
*/
virtual unsigned int getNLight() const;
/**
* Return the vector that contains the PDG ids of
* the light flavours, which are contained in the
* jet particle group.
*/
virtual vector<long> getNLightJetVec() const;
/**
* Return the vector that contains the PDG ids of
* the heavy flavours, which are contained in the
* jet particle group.
*/
virtual vector<long> getNHeavyJetVec() const;
/**
* Return the vector that contains the PDG ids of
* the light flavours, which are contained in the
* proton particle group.
*/
virtual vector<long> getNLightProtonVec() const;
/**
* Return true, if this matrix element is handled by a BLHA one-loop provider
*/
virtual bool isOLPTree() const {
return matchboxAmplitude() ? matchboxAmplitude()->isOLPTree() : false;
}
/**
* Return true, if this matrix element is handled by a BLHA one-loop provider
*/
virtual bool isOLPLoop() const {
return matchboxAmplitude() ? matchboxAmplitude()->isOLPLoop() : false;
}
/**
* Return true, if colour and spin correlated matrix elements should
* be ordered from the OLP
*/
virtual bool needsOLPCorrelators() const {
return matchboxAmplitude() ? matchboxAmplitude()->needsOLPCorrelators() : true;
}
/**
* Return the process index, if this is an OLP handled matrix element
*/
const vector<int>& olpProcess() const { return theOLPProcess; }
/**
* Set the process index, if this is an OLP handled matrix element
*/
void olpProcess(int pType, int id) {
if ( theOLPProcess.empty() )
theOLPProcess.resize(5,0);
theOLPProcess[pType] = id;
}
/**
* Return true, if this is a real emission matrix element which does
* not require colour correlators.
*/
bool noCorrelations() const {
return theNoCorrelations;
}
/**
* Indicate that this is a real emission matrix element which does
* not require colour correlators.
*/
void needsNoCorrelations() {
theNoCorrelations = true;
}
/**
* Indicate that this is a virtual matrix element which does
* require colour correlators.
*/
void needsCorrelations() {
theNoCorrelations = false;
}
//@}
/** @name Phasespace generation */
//@{
/**
* Return the phase space generator to be used.
*/
Ptr<MatchboxPhasespace>::tptr phasespace() const { return thePhasespace; }
/**
* Set the phase space generator to be used.
*/
void phasespace(Ptr<MatchboxPhasespace>::ptr ps) { thePhasespace = ps; }
/**
* Set the XComb object to be used in the next call to
* generateKinematics() and dSigHatDR().
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Return true, if the XComb steering this matrix element
* should keep track of the random numbers used to generate
* the last phase space point
*/
virtual bool keepRandomNumbers() const { return true; }
/**
* Generate incoming parton momenta. This default
* implementation performs the standard mapping
* from x1,x2 -> tau,y making 1/tau flat; incoming
* parton momenta are stored in meMomenta()[0,1],
* only massless partons are supported so far;
* return the Jacobian of the mapping
*/
double generateIncomingPartons(const double* r1, const double* r2);
/**
* Generate internal degrees of freedom given nDim() uniform random
* numbers in the interval ]0,1[. To help the phase space generator,
* the 'dSigHatDR' should be a smooth function of these numbers,
* although this is not strictly necessary. The return value should
* be true of the generation succeeded. If so the generated momenta
* should be stored in the meMomenta() vector. Derived classes
* must call this method once internal degrees of freedom are setup
* and finally return the result of this method.
*/
virtual bool generateKinematics(const double * r);
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* Clear the information previously provided by a call to
* setKinematics(...).
*/
virtual void clearKinematics();
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* The number of internal degrees of freedom used in the matrix
* element for generating a Born phase space point
*/
virtual int nDimBorn() const;
/**
* Return true, if this matrix element will generate momenta for the
* incoming partons itself. The matrix element is required to store
* the incoming parton momenta in meMomenta()[0,1]. No mapping in
* tau and y is performed by the PartonExtractor object, if a
* derived class returns true here. The phase space jacobian is to
* include a factor 1/(x1 x2).
*/
virtual bool haveX1X2() const {
return
(phasespace() ? phasespace()->haveX1X2() : false) ||
diagrams().front()->partons().size() == 3;
}
/**
* Return true, if this matrix element expects
* the incoming partons in their center-of-mass system
*/
virtual bool wantCMS() const {
return
(phasespace() ? phasespace()->wantCMS() : true) &&
diagrams().front()->partons().size() != 3; }
/**
* Return the meMomenta as generated at the last
* phase space point.
*/
const vector<Lorentz5Momentum>& lastMEMomenta() const { return meMomenta(); }
/**
* Access the meMomenta.
*/
vector<Lorentz5Momentum>& lastMEMomenta() { return meMomenta(); }
/**
* leg size
*/
int legsize() const {return int(meMomenta().size());}
//@}
/** @name Scale choices, couplings and PDFs */
//@{
/**
* Set the scale choice object
*/
void scaleChoice(Ptr<MatchboxScaleChoice>::ptr sc) { theScaleChoice = sc; }
/**
* Return the scale choice object
*/
Ptr<MatchboxScaleChoice>::tptr scaleChoice() const { return theScaleChoice; }
/**
* Set scales and alphaS
*/
void setScale(Energy2 ren=ZERO,Energy2 fac=ZERO) const;
/**
* Indicate that this matrix element is running alphas by itself.
*/
virtual bool hasRunningAlphaS() const {
if ( matchboxAmplitude() )
return matchboxAmplitude()->hasRunningAlphaS();
return false;
}
/**
* Indicate that this matrix element is running alphaew by itself.
*/
virtual bool hasRunningAlphaEW() const {
if ( matchboxAmplitude() )
return matchboxAmplitude()->hasRunningAlphaEW();
return false;
}
/**
* Return the scale associated with the phase space point provided
* by the last call to setKinematics().
*/
virtual Energy2 scale() const { return lastScale(); }
/**
* Return the renormalization scale for the last generated phasespace point.
*/
virtual Energy2 factorizationScale() const;
/**
* Get the factorization scale factor
*/
virtual double factorizationScaleFactor() const;
/**
* Get the factorization scale factor
*/
virtual double facFac() const{return factorizationScaleFactor();}
/**
* Return the (QCD) renormalization scale for the last generated phasespace point.
*/
virtual Energy2 renormalizationScale() const;
/**
* Get the renormalization scale factor
*/
virtual double renormalizationScaleFactor() const;
/**
* Get the renormalization scale factor
*/
virtual double renFac() const{return renormalizationScaleFactor();}
/**
* Return the QED renormalization scale for the last generated phasespace point.
*/
virtual Energy2 renormalizationScaleQED() const;
/**
* Return the shower scale for the last generated phasespace point.
*/
virtual Energy2 showerScale() const;
/**
* Set veto scales on the particles at the given
* SubProcess which has been generated using this
* matrix element.
*/
virtual void setVetoScales(tSubProPtr) const;
/**
* Return true, if fixed couplings are used.
*/
bool fixedCouplings() const;
/**
* Return true, if fixed couplings are used.
*/
bool fixedQEDCouplings() const;
/**
* Return the value of \f$\alpha_S\f$ associated with the phase
* space point provided by the last call to setKinematics(). This
* versions returns SM().alphaS(scale()).
*/
virtual double alphaS() const { return lastAlphaS(); }
/**
* Return the value of \f$\alpha_EM\f$ associated with the phase
* space point provided by the last call to setKinematics(). This
* versions returns SM().alphaEM(scale()).
*/
virtual double alphaEM() const { return lastAlphaEM(); }
/**
* Return true, if this matrix element provides the PDF
* weight for the first incoming parton itself.
*/
virtual bool havePDFWeight1() const;
/**
* Return true, if this matrix element provides the PDF
* weight for the second incoming parton itself.
*/
virtual bool havePDFWeight2() const;
/**
* Set the PDF weight.
*/
void getPDFWeight(Energy2 factorizationScale = ZERO) const;
/**
* Supply the PDF weight for the first incoming parton.
*/
double pdf1(Energy2 factorizationScale = ZERO,
double xEx = 1., double xFactor = 1.) const;
/**
* Supply the PDF weight for the second incoming parton.
*/
double pdf2(Energy2 factorizationScale = ZERO,
double xEx = 1., double xFactor = 1.) const;
//@}
/** @name Amplitude information and matrix element evaluation */
//@{
/**
* Return the amplitude.
*/
Ptr<MatchboxAmplitude>::tptr matchboxAmplitude() const { return theAmplitude; }
/**
* Set the amplitude.
*/
void matchboxAmplitude(Ptr<MatchboxAmplitude>::ptr amp) { theAmplitude = amp; }
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double largeNME2(Ptr<ColourBasis>::tptr largeNBasis) const;
/**
* Return the symmetry factor for identical final state particles.
*/
virtual double finalStateSymmetry() const;
/**
* Return the normalizing factor for the matrix element averaged
* over quantum numbers and including running couplings.
*/
double me2Norm(unsigned int addAlphaS = 0) const;
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Same prefactor for all dSigHat
**/
CrossSection prefactor()const;
/**
* Born part of the cross section
**/
CrossSection dSigHatDRB() const ;
/**
* Virtual corrections of the cross section
**/
CrossSection dSigHatDRV() const ;
/**
* Insertion operators of the cross section
**/
CrossSection dSigHatDRI() const ;
/**
* If diffAlpha is not 1 and the matrix element has insertion operators
* this routine adds the difference between the insertion operator calculated
* with an alpha-Parameter to the insertion operator without alpha-parameter.
*/
CrossSection dSigHatDRAlphaDiff(double alpha) const ;
//@}
/** @name One-loop corrections */
//@{
/**
* Return the one-loop/tree interference.
*/
virtual double oneLoopInterference() const;
/**
* Return true, if this matrix element is capable of calculating
* one-loop (QCD) corrections.
*/
virtual bool haveOneLoop() const;
/**
* Return true, if this matrix element only provides
* one-loop (QCD) corrections.
*/
virtual bool onlyOneLoop() const;
/**
* Return true, if the amplitude is DRbar renormalized, otherwise
* MSbar is assumed.
*/
virtual bool isDRbar() const;
/**
* Return true, if one loop corrections have been calculated in
* dimensional reduction. Otherwise conventional dimensional
* regularization is assumed. Note that renormalization is always
* assumed to be MSbar.
*/
virtual bool isDR() const;
/**
* Return true, if one loop corrections are given in the conventions
* of the integrated dipoles.
*/
virtual bool isCS() const;
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const;
/**
* Return true, if one loop corrections are given in the conventions
* of everything expanded.
*/
virtual bool isExpanded() const;
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const;
/**
* If defined, return the coefficient of the pole in epsilon^2
*/
virtual double oneLoopDoublePole() const;
/**
* If defined, return the coefficient of the pole in epsilon
*/
virtual double oneLoopSinglePole() const;
/**
* Return true, if cancellationn of epsilon poles should be checked.
*/
bool checkPoles() const;
/**
* Simple histogram for accuracy checks
*/
struct AccuracyHistogram {
/**
* The lower bound
*/
double lower;
/**
* The upper bound
*/
double upper;
/**
* The bins, indexed by upper bound.
*/
map<double,double> bins;
/**
* The number of points of same sign
*/
unsigned long sameSign;
/**
* The number of points of opposite sign
*/
unsigned long oppositeSign;
/**
* The number of points being nan or inf
*/
unsigned long nans;
/**
* The overflow
*/
unsigned long overflow;
/**
* The underflow
*/
unsigned long underflow;
/**
* Constructor
*/
AccuracyHistogram(double low = -40.,
double up = 0.,
unsigned int nbins = 80);
/**
* Book two values to be checked for numerical compatibility
*/
void book(double a, double b);
/**
* Write to file.
*/
void dump(const std::string& folder, const std::string& prefix,
const cPDVector& proc) const;
/**
* Write to persistent ostream
*/
void persistentOutput(PersistentOStream&) const;
/**
* Read from persistent istream
*/
void persistentInput(PersistentIStream&);
};
/**
* Perform the check of epsilon pole cancellation.
*/
void logPoles() const;
/**
* Return the virtual corrections
*/
const vector<Ptr<MatchboxInsertionOperator>::ptr>& virtuals() const {
return theVirtuals;
}
/**
* Return the virtual corrections
*/
vector<Ptr<MatchboxInsertionOperator>::ptr>& virtuals() {
return theVirtuals;
}
/**
* Instruct this matrix element to include one-loop corrections
*/
void doOneLoop() { theOneLoop = true; }
/**
* Instruct this matrix element not to include one-loop corrections
*/
void noOneLoop() { theOneLoop = false; }
/**
* Return true, if this matrix element includes one-loop corrections
*/
bool oneLoop() const { return theOneLoop; }
/**
* Instruct this matrix element to include one-loop corrections but
* no Born contributions
*/
void doOneLoopNoBorn() { theOneLoop = true; theOneLoopNoBorn = true; }
void noOneLoopNoBorn() { theOneLoop = false; theOneLoopNoBorn = false; }
/**
* Return true, if this matrix element includes one-loop corrections
* but no Born contributions
*/
bool oneLoopNoBorn() const { return theOneLoopNoBorn || onlyOneLoop(); }
/**
* Instruct this matrix element to include one-loop corrections but
* no actual loop contributions
*/
void doOneLoopNoLoops() { theOneLoop = true; theOneLoopNoLoops = true; }
/**
* Return true, if this matrix element includes one-loop corrections
* but no actual loop contributions
*/
bool oneLoopNoLoops() const { return theOneLoopNoLoops; }
//@}
/** @name Dipole subtraction */
//@{
/**
* If this matrix element is considered a real
* emission matrix element, return all subtraction
* dipoles needed given a set of subtraction terms
* and underlying Born matrix elements to choose
* from.
*/
vector<Ptr<SubtractionDipole>::ptr>
getDipoles(const vector<Ptr<SubtractionDipole>::ptr>&,
const vector<Ptr<MatchboxMEBase>::ptr>&,bool slim=false) const;
/**
* If this matrix element is considered a real emission matrix
* element, but actually neglecting a subclass of the contributing
* diagrams, return true if the given emitter-emission-spectator
* configuration should not be considered when setting up
* subtraction dipoles.
*/
virtual bool noDipole(int,int,int) const { return false; }
/**
* If this matrix element is considered an underlying Born matrix
* element in the context of a subtracted real emission, but
* actually neglecting a subclass of the contributing diagrams,
* return true if the given emitter-spectator configuration
* should not be considered when setting up subtraction dipoles.
*/
virtual bool noDipole(int,int) const { return false; }
/**
* Return the colour correlated matrix element squared with
* respect to the given two partons as appearing in mePartonData(),
* suitably scaled by sHat() to give a dimension-less number.
*/
virtual double colourCorrelatedME2(pair<int,int>) const;
/**
* Return the colour correlated matrix element squared in the
* large-N approximation with respect to the given two partons as
* appearing in mePartonData(), suitably scaled by sHat() to give a
* dimension-less number.
*/
virtual double largeNColourCorrelatedME2(pair<int,int> ij,
Ptr<ColourBasis>::tptr largeNBasis) const;
/**
* Return the colour and spin correlated matrix element squared for
* the gluon indexed by the first argument using the given
* correlation tensor.
*/
virtual double spinColourCorrelatedME2(pair<int,int> emitterSpectator,
const SpinCorrelationTensor& c) const;
/**
* Return the spin correlated matrix element squared for
* the vector boson indexed by the first argument using the given
* correlation tensor.
*/
virtual double spinCorrelatedME2(pair<int,int> emitterSpectator,
const SpinCorrelationTensor& c) const;
//@}
/** @name Caching and diagnostic information */
//@{
/**
* Inform this matrix element that a new phase space
* point is about to be generated, so all caches should
* be flushed.
*/
virtual void flushCaches();
/**
* Return true, if verbose
*/
bool verbose() const;
/**
* Return true, if verbose
*/
bool initVerbose() const;
/**
* Dump the setup to an ostream
*/
void print(ostream&) const;
/**
* Print debug information on the last event
*/
virtual void printLastEvent(ostream&) const;
/**
* Write out diagnostic information for
* generateKinematics
*/
void logGenerateKinematics(const double * r) const;
/**
* Write out diagnostic information for
* setting scales
*/
void logSetScale() const;
/**
* Write out diagnostic information for
* pdf evaluation
*/
void logPDFWeight() const;
/**
* Write out diagnostic information for
* me2 evaluation
*/
void logME2() const;
/**
* Write out diagnostic information
* for dsigdr evaluation
*/
void logDSigHatDR() const;
//@}
/** @name Reweight objects */
//@{
/**
* Insert a reweight object
*/
void addReweight(Ptr<MatchboxReweightBase>::ptr rw) { theReweights.push_back(rw); }
/**
* Return the reweights
*/
const vector<Ptr<MatchboxReweightBase>::ptr>& reweights() const { return theReweights; }
/**
* Access the reweights
*/
vector<Ptr<MatchboxReweightBase>::ptr>& reweights() { return theReweights; }
/**
* Return the theMerger.
*/
const MergerBasePtr merger() const;
/**
* Return the theMerger.
*/
MergerBasePtr merger() ;
/**
* Set the theMerger.
*/
void merger(MergerBasePtr v);
//@}
/** @name Methods used to setup MatchboxMEBase objects */
//@{
/**
* Return true if this object needs to be initialized before all
* other objects (except those for which this function also returns
* true). This default version always returns false, but subclasses
* may override it to return true.
*/
virtual bool preInitialize() const { return true; }
/**
* Clone this matrix element.
*/
Ptr<MatchboxMEBase>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<MatchboxMEBase>::ptr>(clone());
}
/**
* Clone the dependencies, using a given prefix.
*/
void cloneDependencies(const std::string& prefix = "",bool slim = false );
/**
* Prepare an xcomb
*/
void prepareXComb(MatchboxXCombData&) const;
/**
* For the given event generation setup return a xcomb object
* appropriate to this matrix element.
*/
virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair & inc,
tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
const PBPair & newPartonBins, tCutsPtr newCuts,
const DiagramVector & newDiagrams, bool mir,
const PartonPairVec& allPBins,
tStdXCombPtr newHead = tStdXCombPtr(),
tMEPtr newME = tMEPtr());
/**
* For the given event generation setup return a dependent xcomb object
* appropriate to this matrix element.
*/
virtual StdXCombPtr makeXComb(tStdXCombPtr newHead,
const PBPair & newPartonBins,
const DiagramVector & newDiagrams,
tMEPtr newME = tMEPtr());
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The phase space generator to be used.
*/
Ptr<MatchboxPhasespace>::ptr thePhasespace;
/**
* The amplitude to be used
*/
Ptr<MatchboxAmplitude>::ptr theAmplitude;
/**
* The scale choice object
*/
Ptr<MatchboxScaleChoice>::ptr theScaleChoice;
/**
* The virtual corrections.
*/
vector<Ptr<MatchboxInsertionOperator>::ptr> theVirtuals;
/**
* A vector of reweight objects the sum of which
* should be applied to reweight this matrix element
*/
vector<Ptr<MatchboxReweightBase>::ptr> theReweights;
private:
/**
* The subprocess to be considered.
*/
Process theSubprocess;
/**
* True, if this matrix element includes one-loop corrections
*/
bool theOneLoop;
/**
* True, if this matrix element includes one-loop corrections
* but no Born contributions
*/
bool theOneLoopNoBorn;
/**
* True, if this matrix element includes one-loop corrections
* but no actual loop contributions (e.g. finite collinear terms)
*/
bool theOneLoopNoLoops;
/**
* The process index, if this is an OLP handled matrix element
*/
vector<int> theOLPProcess;
/**
* Histograms of epsilon^2 pole cancellation
*/
mutable map<cPDVector,AccuracyHistogram> epsilonSquarePoleHistograms;
/**
* Histograms of epsilon pole cancellation
*/
mutable map<cPDVector,AccuracyHistogram> epsilonPoleHistograms;
/**
* True, if this is a real emission matrix element which does
* not require colour correlators.
*/
bool theNoCorrelations;
/**
* Flag which pdfs should be included.
*/
mutable pair<bool,bool> theHavePDFs;
/**
* True, if already checked for which PDFs to include.
*/
mutable bool checkedPDFs;
/**
* The merging helper to be used.
* Only the head ME has a pointer to this helper.
*/
MergerBasePtr theMerger;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxMEBase & operator=(const MatchboxMEBase &);
+ MatchboxMEBase & operator=(const MatchboxMEBase &) = delete;
};
inline PersistentOStream& operator<<(PersistentOStream& os,
const MatchboxMEBase::AccuracyHistogram& h) {
h.persistentOutput(os);
return os;
}
inline PersistentIStream& operator>>(PersistentIStream& is,
MatchboxMEBase::AccuracyHistogram& h) {
h.persistentInput(is);
return is;
}
}
#endif /* HERWIG_MatchboxMEBase_H */
diff --git a/MatrixElement/Matchbox/Base/MatchboxOLPME.h b/MatrixElement/Matchbox/Base/MatchboxOLPME.h
--- a/MatrixElement/Matchbox/Base/MatchboxOLPME.h
+++ b/MatrixElement/Matchbox/Base/MatchboxOLPME.h
@@ -1,332 +1,332 @@
// -*- C++ -*-
//
// MatchboxOLPME.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxOLPME_H
#define Herwig_MatchboxOLPME_H
//
// This is the declaration of the MatchboxOLPME class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxOLPME implements OLP interfaces.
*/
class MatchboxOLPME: public MatchboxAmplitude {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxOLPME();
/**
* The destructor.
*/
virtual ~MatchboxOLPME();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector& p,
Ptr<MatchboxFactory>::tptr,
bool) const;
/**
* Set the (tree-level) order in \f$g_S\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGs(unsigned int ogs) { theOrderInGs = ogs; }
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return theOrderInGs; }
/**
* Set the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGem(unsigned int oge) { theOrderInGem = oge; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return theOrderInGem; }
/**
* Return true, if this amplitude is handled by a BLHA one-loop provider
*/
virtual bool isOLPTree() const { return true; }
/**
* Return true, if this amplitude is handled by a BLHA one-loop provider
*/
virtual bool isOLPLoop() const { return true; }
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const { return false; }
/**
* Set the xcomb object.
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr) {}
/**
* Return the matrix element squared.
*/
virtual double me2() const;
/**
* Return the colour correlated matrix element.
*/
virtual double colourCorrelatedME2(pair<int,int> ij) const;
/**
* Return the large-N colour correlated matrix element.
*/
virtual double largeNColourCorrelatedME2(pair<int,int>,
Ptr<ColourBasis>::tptr) const;
/**
* Return the largeN matrix element squared.
*/
virtual double largeNME2(Ptr<ColourBasis>::tptr largeNBasis) const;
/**
* Return the colour and spin correlated matrix element.
*/
virtual double spinColourCorrelatedME2(pair<int,int> ij,
const SpinCorrelationTensor& c) const;
/**
* Return the spin correlated matrix element.
*/
virtual double spinCorrelatedME2(pair<int,int> ij,
const SpinCorrelationTensor& c) const;
/**
* Return true, if tree-level contributions will be evaluated at amplitude level.
*/
virtual bool treeAmplitudes() const { return false; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Return true, if this amplitude only provides
* one-loop (QCD) corrections.
*/
virtual bool onlyOneLoop() const { return false; }
/**
* Return true, if one-loop contributions will be evaluated at amplitude level.
*/
virtual bool oneLoopAmplitudes() const { return false; }
/**
* Return true, if one loop corrections are given in the conventions
* of everything expanded.
*/
virtual bool isExpanded() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const;
/**
* Indicate that this amplitude is running alphas by itself.
*/
virtual bool hasRunningAlphaS() const;
/**
* Indicate that this amplitude is running alphaew by itself.
*/
virtual bool hasRunningAlphaEW() const;
/**
* If defined, return the coefficient of the pole in epsilon^2
*/
virtual double oneLoopDoublePole() const;
/**
* If defined, return the coefficient of the pole in epsilon
*/
virtual double oneLoopSinglePole() const;
/**
* Calculate the one-loop amplitudes for the phasespace point
* stored in lastXComb, if provided.
*/
virtual void prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr) {}
/**
* Return the one-loop/tree interference.
*/
virtual double oneLoopInterference() const;
public:
/**
* Call OLP_EvalSubProcess and fill in the results
*/
virtual void evalSubProcess() const = 0;
/**
* Fill in results for the given colour correlator
*/
virtual void evalColourCorrelator(pair<int,int> ij) const = 0;
/**
* Fill in results for the given colour/spin correlator
*/
virtual void evalSpinColourCorrelator(pair<int,int> ij) const = 0;
/**
* Fill in results for the given spin correlator; may not be supported
*/
virtual void evalSpinCorrelator(pair<int,int> ij) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
/**
* Set an optional contract file name to be used
*/
static string& optionalContractFile() {
static string s = "";
return s;
}
/**
* Indicate that the OLP has been started
*/
static bool& didStartOLP() {
static bool f = false;
return f;
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxOLPME & operator=(const MatchboxOLPME &);
+ MatchboxOLPME & operator=(const MatchboxOLPME &) = delete;
/**
* The (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
unsigned int theOrderInGs;
/**
* The (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
unsigned int theOrderInGem;
/**
* Set the value of the dimensional regularization parameter
* to the value of the renormalization scale
*/
bool theSetMuToMuR;
/**
* Use the running alpha_s instead of the reference alpha_s.
* This also sets hasRunningAlphaS() to true.
*/
bool theUseRunningAlphaS;
/**
* Use the running alpha_ew instead of the reference alpha_ew.
* This also sets hasRunningAlphaEW() to true.
*/
bool theUseRunningAlphaEW;
};
}
#endif /* Herwig_MatchboxOLPME_H */
diff --git a/MatrixElement/Matchbox/Base/MatchboxReweightBase.h b/MatrixElement/Matchbox/Base/MatchboxReweightBase.h
--- a/MatrixElement/Matchbox/Base/MatchboxReweightBase.h
+++ b/MatrixElement/Matchbox/Base/MatchboxReweightBase.h
@@ -1,146 +1,146 @@
// -*- C++ -*-
//
// MatchboxReweightBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MatchboxReweightBase_H
#define HERWIG_MatchboxReweightBase_H
//
// This is the declaration of the MatchboxReweightBase class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxReweightBase is the base class
* for reweighting MatchboxMEBase matrix elements
* as |M|^2 ( w_1 + ... + w_n )
*
*/
class MatchboxReweightBase: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxReweightBase();
/**
* The destructor.
*/
virtual ~MatchboxReweightBase();
//@}
public:
/**
* Clone this reweight.
*/
Ptr<MatchboxReweightBase>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<MatchboxReweightBase>::ptr>(clone());
}
/**
* Clone the dependencies, using a given prefix.
*/
virtual void cloneDependencies(const std::string& prefix = "");
/**
* Set the XComb object.
*/
virtual void setXComb(tStdXCombPtr) = 0;
/**
* Return true, if applies to the process in the xcomb.
*/
virtual bool apply() const = 0;
/**
* Inform this matrix element that a new phase space
* point is about to be generated, so all caches should
* be flushed.
*/
virtual void flushCaches() = 0;
/**
* Evaluate the reweight.
*/
virtual double evaluate() const = 0;
/**
* Set veto scales on the particles at the given
* SubProcess which has been generated using this
* matrix element.
*/
virtual void setVetoScales(tSubProPtr) const {}
public:
/**
* Dump the setup to an ostream
*/
virtual void print(ostream&) const {}
/**
* Print debug information on the last event
*/
virtual void printLastEvent(ostream&) const {}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxReweightBase & operator=(const MatchboxReweightBase &);
+ MatchboxReweightBase & operator=(const MatchboxReweightBase &) = delete;
};
}
#endif /* HERWIG_MatchboxReweightBase_H */
diff --git a/MatrixElement/Matchbox/Base/SubtractedME.h b/MatrixElement/Matchbox/Base/SubtractedME.h
--- a/MatrixElement/Matchbox/Base/SubtractedME.h
+++ b/MatrixElement/Matchbox/Base/SubtractedME.h
@@ -1,528 +1,528 @@
// -*- C++ -*-
//
// SubtractedME.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SubtractedME_H
#define HERWIG_SubtractedME_H
//
// This is the declaration of the SubtractedME class.
//
#include "ThePEG/MatrixElement/MEGroup.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
#include "Herwig/MatrixElement/Matchbox/Utility/LastMatchboxXCombInfo.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief SubtractedME represents a subtracted real emission matrix element.
*
* @see \ref SubtractedMEInterfaces "The interfaces"
* defined for SubtractedME.
*/
class SubtractedME:
public MEGroup,
public LastMatchboxXCombInfo {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
SubtractedME();
/**
* The destructor.
*/
virtual ~SubtractedME();
//@}
public:
/**
* Return the factory which produced this matrix element
*/
Ptr<MatchboxFactory>::tcptr factory() const;
/** @name Phasespace and subprocess information */
//@{
/**
* For the given event generation setup return an xcomb object
* appropriate to this matrix element.
*/
virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair & inc,
tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
const PBPair & newPartonBins, tCutsPtr newCuts,
const DiagramVector & newDiagrams, bool mir,
const PartonPairVec& allPBins,
tStdXCombPtr newHead = tStdXCombPtr(),
tMEPtr newME = tMEPtr());
/**
* Set the XComb object to be used in the next call to
* generateKinematics() and dSigHatDR().
*/
virtual void setXComb(tStdXCombPtr);
/**
* Return true, if the same additional random numbers
* should be presented to any of the dependent
* matrix elements.
*/
virtual bool uniformAdditional() const { return true; }
/**
* Return true, if the XComb steering this matrix element
* should keep track of the random numbers used to generate
* the last phase space point
*/
virtual bool keepRandomNumbers() const { return true; }
/**
* Given a process from the head matrix element,
* return a list of diagrams which should be considered for
* the given dependent matrix element.
*/
virtual MEBase::DiagramVector dependentDiagrams(const cPDVector& proc,
tMEPtr depME) const;
/**
* Return true, if SubProcessGroups should be
* setup from this MEGroup. If not, a single SubProcess
* is constructed from the data provided by the
* head matrix element.
*/
virtual bool subProcessGroups() const;
/**
* Return true, if one of the dependent subprocesses should be
* constructed in place of the one driven by the head matrix element
* or a full subprocess group.
*/
virtual bool selectDependentSubProcess() const { return false; }
/**
* Fill the projectors object of xcombs to choose subprocesses
* different than the one currently integrated.
*/
virtual void fillProjectors();
/**
* Return true, if projectors will be used
*/
virtual bool willProject() const {
return virtualShowerSubtraction() || loopSimSubtraction();
}
/**
* Return true, if this MEGroup will reweight the contributing cross
* sections.
*/
virtual bool groupReweighted() const {
return showerApproximation();
}
/**
* Reweight the head cross section
*/
virtual double reweightHead(const vector<tStdXCombPtr>&);
/**
* Reweight the dependent cross section
*/
virtual double reweightDependent(tStdXCombPtr, const vector<tStdXCombPtr>&);
/**
* Switch on or off that scales should be calculated from real emission kinematics
*/
void doRealEmissionScales();
//@}
/** @name Methods relevant to matching */
//@{
/**
* Inform this matrix element that a new phase space
* point is about to be generated, so all caches should
* be flushed.
*/
virtual void flushCaches() {
MEGroup::flushCaches();
if ( showerApproximation() )
showerApproximation()->resetBelowCutoff();
}
/**
* Return the shower approximation.
*/
Ptr<ShowerApproximation>::tptr showerApproximation() const;
/**
* Indicate that the shower real emission contribution should be subtracted.
*/
void doRealShowerSubtraction();
/**
* Return true, if the shower real emission contribution should be subtracted.
*/
bool realShowerSubtraction() const { return theRealShowerSubtraction; }
/**
* Indicate that the shower virtual contribution should be subtracted.
*/
void doVirtualShowerSubtraction();
/**
* Return true, if the shower virtual contribution should be subtracted.
*/
bool virtualShowerSubtraction() const { return theVirtualShowerSubtraction; }
/**
* Indicate that the loopsim matched virtual contribution should be subtracted.
*/
void doLoopSimSubtraction();
/**
* Return true, if the loopsim matched virtual contribution should be subtracted.
*/
bool loopSimSubtraction() const { return theLoopSimSubtraction; }
//@}
/** @name Matrix element and dipole information */
//@{
/**
* Return the subtraction dipoles.
*/
vector<Ptr<SubtractionDipole>::ptr> dipoles();
/**
* Return the underlying born matrix elements.
*/
const vector<Ptr<MatchboxMEBase>::ptr>& borns() const;
/**
* Access the underlying born matrix elements,
* overriding the ones contained in the factory object.
*/
void setBorns(const vector<Ptr<MatchboxMEBase>::ptr>& newBorns) { theBorns = newBorns; }
/**
* Build up dipoles needed.
*/
void getDipoles();
/**
* Clone all dipoles.
*/
void cloneDipoles(const string& prefix = "");
/**
* Clone the real emission matrix element.
*/
void cloneRealME(const string& prefix = "");
/**
* Clone all dependencies.
*/
void cloneDependencies(const string& prefix = "") {
cloneDipoles(prefix);
cloneRealME(prefix);
}
/**
* Return all dipoles matching the given Born process
*/
vector<Ptr<SubtractionDipole>::ptr> splitDipoles(const cPDVector&);
//@}
/** @name Veto scale settings */
//@{
/**
* Set veto scales on the particles at the given
* SubProcess which has been generated using this
* matrix element.
*/
virtual void setVetoScales(tSubProPtr) const;
//@}
/** @name Diagnostic information */
//@{
/**
* Dump the setup to an ostream
*/
void print(ostream&) const;
/**
* Collect information on the last evaluated phasespace
* point for verification or debugging purposes. This
* only called, if the StdXCombGroup did accumulate
* a non-zero cross section from this ME group.
*/
virtual void lastEventStatistics();
/**
* Print debug information on the last event
*/
void printLastEvent(ostream&) const;
/**
* Check the subtraction for the last event
*/
void lastEventSubtraction();
/**
* Return true, if verbose
*/
bool verbose() const;
/**
* Return true, if verbose
*/
bool initVerbose() const;
//@}
/** @name Setup of Subtracted ME objects */
//@{
/**
* Return true if this object needs to be initialized before all
* other objects (except those for which this function also returns
* true). This default version always returns false, but subclasses
* may override it to return true.
*/
virtual bool preInitialize() const { return true; }
/**
* Simple envelope histogram to keep track of subtraction
*/
struct SubtractionHistogram {
/**
* The lower bound
*/
double lower;
/**
* The bins, indexed by upper bound.
*/
map<double,pair<double,double> > bins;
/**
* Constructor
*/
SubtractionHistogram(double low = 0.001,
double up = 10.,
unsigned int nbins = 100);
/**
* Book an event.
*/
void book(double inv, double diff) {
map<double,pair<double,double> >::iterator b =
bins.upper_bound(inv);
if ( b == bins.end() ) return;
b->second.first = min(b->second.first,diff);
b->second.second = max(b->second.second,diff);
}
/**
* Write to file given name and invariant.
*/
void dump(const std::string& prefix,
const int& plottype,
const bool& scatterplot,
const cPDVector& proc,
int i, int j) const;
/**
* Write to persistent ostream
*/
void persistentOutput(PersistentOStream&) const;
/**
* Read from persistent istream
*/
void persistentInput(PersistentIStream&);
};
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The underlying born matrix elements, overriding the ones
* contained in the factory object.
*/
vector<Ptr<MatchboxMEBase>::ptr> theBorns;
/**
* Pointer to the head real emission ME casted to a MatchboxMEBase
* object.
*/
Ptr<MatchboxMEBase>::ptr theReal;
/**
* Define the key for the collinear subtraction data.
*/
typedef pair<cPDVector,pair<size_t, size_t> > CollinearSubtractionIndex;
/**
* subtraction data for collinear limits.
*/
map<CollinearSubtractionIndex,SubtractionHistogram> collinearHistograms;
/**
* names of files to which subtraction data is written for all phase space points individually
*/
map<CollinearSubtractionIndex,string> fnamesCollinearSubtraction;
/**
* Define the key for the soft subtraction data.
*/
typedef pair<cPDVector,size_t> SoftSubtractionIndex;
/**
* subtraction data for soft limits.
*/
map<SoftSubtractionIndex,SubtractionHistogram> softHistograms;
/**
* names of files to which subtraction data is written for all phase space points individually
*/
map<SoftSubtractionIndex,string> fnamesSoftSubtraction;
/**
* True, if the shower real emission contribution should be subtracted.
*/
bool theRealShowerSubtraction;
/**
* True, if the shower virtual contribution should be subtracted.
*/
bool theVirtualShowerSubtraction;
/**
* True, if the loopsim matched virtual contribution should be subtracted.
*/
bool theLoopSimSubtraction;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SubtractedME & operator=(const SubtractedME &);
+ SubtractedME & operator=(const SubtractedME &) = delete;
};
inline PersistentOStream& operator<<(PersistentOStream& os,
const SubtractedME::SubtractionHistogram& h) {
h.persistentOutput(os);
return os;
}
inline PersistentIStream& operator>>(PersistentIStream& is,
SubtractedME::SubtractionHistogram& h) {
h.persistentInput(is);
return is;
}
}
#endif /* HERWIG_SubtractedME_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am b/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am
@@ -1,72 +1,72 @@
pkglib_LTLIBRARIES = HwMatchboxBuiltin.la
HwMatchboxBuiltin_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 4:1:0
+$(AM_LDFLAGS) -module -version-info 5:0:0
nodist_HwMatchboxBuiltin_la_SOURCES = \
Amplitudes__all.cc
BUILT_SOURCES = Amplitudes__all.cc
CLEANFILES = Amplitudes__all.cc
Amplitudes__all.cc : $(DIR_H_FILES) $(DIR_CC_FILES) Makefile
@echo "Concatenating .cc files into $@"
@$(top_srcdir)/cat_with_cpplines $(DIR_CC_FILES) > $@
EXTRA_DIST = $(ALL_H_FILES) $(ALL_CC_FILES)
DIR_H_FILES = $(addprefix $(srcdir)/,$(ALL_H_FILES))
ALL_H_FILES = \
MatchboxCurrents.h \
MatchboxZGammaAmplitude.h \
MatchboxAmplitudellbarqqbargg.h \
MatchboxAmplitudellbarqqbarg.h \
MatchboxAmplitudellbarqqbar.h \
MatchboxAmplitudellbarqqbarqqbar.h \
MatchboxAmplitudelnuqqbargg.h \
MatchboxAmplitudelnuqqbarg.h \
MatchboxAmplitudelnuqqbar.h \
MatchboxAmplitudelnuqqbarqqbar.h \
MatchboxAmplitudehbbbarg.h \
MatchboxAmplitudehbbbar.h \
MatchboxAmplitudehggg.h \
MatchboxAmplitudehgg.h \
MatchboxAmplitudehqqbarg.h \
MatchboxAmplitudeqqbarttbar.h \
MatchboxAmplitudeqqbarttbarg.h \
MatchboxAmplitudeggttbar.h \
MatchboxAmplitudeggttbarg.h \
HelAmps_sm.h \
Parameters_sm.h \
MG_qqx2ttx.h \
MG_qqx2ttxg.h \
MG_gg2ttx.h \
MG_gg2ttxg.h
DIR_CC_FILES = $(addprefix $(srcdir)/,$(ALL_CC_FILES))
ALL_CC_FILES = \
MatchboxCurrents.cc \
MatchboxZGammaAmplitude.cc \
MatchboxAmplitudellbarqqbar.cc \
MatchboxAmplitudellbarqqbarg.cc \
MatchboxAmplitudellbarqqbargg.cc \
MatchboxAmplitudellbarqqbarqqbar.cc \
MatchboxAmplitudelnuqqbar.cc \
MatchboxAmplitudelnuqqbarg.cc \
MatchboxAmplitudelnuqqbargg.cc \
MatchboxAmplitudelnuqqbarqqbar.cc \
MatchboxAmplitudehbbbar.cc \
MatchboxAmplitudehbbbarg.cc \
MatchboxAmplitudehgg.cc \
MatchboxAmplitudehggg.cc \
MatchboxAmplitudehqqbarg.cc \
MatchboxAmplitudeqqbarttbar.cc \
MatchboxAmplitudeqqbarttbarg.cc \
MatchboxAmplitudeggttbar.cc \
MatchboxAmplitudeggttbarg.cc \
HelAmps_sm.cc \
Parameters_sm.cc \
MG_qqx2ttx.cc \
MG_qqx2ttxg.cc \
MG_gg2ttx.cc \
MG_gg2ttxg.cc
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbar.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbar.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbar.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbar.h
@@ -1,201 +1,201 @@
// -*- C++ -*-
//
// MatchboxAmplitudeggttbar.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudeggttbar_H
#define Herwig_MatchboxAmplitudeggttbar_H
//
// This is the declaration of the MatchboxAmplitudeggttbar class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "MG_gg2ttx.h"
#include "HelAmps_sm.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Alix Wilcock
*
* \brief MatchboxAmplitudeggttbar
*/
class MatchboxAmplitudeggttbar:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudeggttbar();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudeggttbar();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const {return 2; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 0; }
/**
* Return true, if this amplitude will not require colour correlations.
*/
virtual bool noCorrelations() const { return false; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudeggttbar & operator=(const MatchboxAmplitudeggttbar &);
+ MatchboxAmplitudeggttbar & operator=(const MatchboxAmplitudeggttbar &) = delete;
/**
* Containers for external particle momenta
*/
double mom0 [4];
double mom1 [4];
double mom2 [4];
double mom3 [4];
/**
* Fill MGParams_ with Herwig values of parameters
*/
void setupParams(map<string, double> & MGParams);
/**
* Stores parameters needed in MG_process
*/
map<string,double> MGParams_;
};
}
#endif /* Herwig_MatchboxAmplitudeggttbar_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbarg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbarg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbarg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeggttbarg.h
@@ -1,202 +1,202 @@
// -*- C++ -*-
//
// MatchboxAmplitudeggttbarg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudeggttbarg_H
#define Herwig_MatchboxAmplitudeggttbarg_H
//
// This is the declaration of the MatchboxAmplitudeggttbarg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "MG_gg2ttxg.h"
#include "HelAmps_sm.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Alix Wilcock
*
* \brief MatchboxAmplitudeggttbarg
*/
class MatchboxAmplitudeggttbarg:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudeggttbarg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudeggttbarg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const {return 3; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 0; }
/**
* Return true, if this amplitude will not require colour correlations.
*/
virtual bool noCorrelations() const { return true; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudeggttbarg & operator=(const MatchboxAmplitudeggttbarg &);
+ MatchboxAmplitudeggttbarg & operator=(const MatchboxAmplitudeggttbarg &) = delete;
/**
* Containers for external particle momenta
*/
double mom0 [4];
double mom1 [4];
double mom2 [4];
double mom3 [4];
double mom4 [4];
/**
* Fill MGParams_ with Herwig values of parameters
*/
void setupParams(map<string, double> & MGParams);
/**
* Stores parameters needed in MG_process
*/
map<string,double> MGParams_;
};
}
#endif /* Herwig_MatchboxAmplitudeggttbarg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbar.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbar.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbar.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbar.h
@@ -1,208 +1,208 @@
// -*- C++ -*-
//
// MatchboxAmplitudebbbarh.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudehbbbar_H
#define Herwig_MatchboxAmplitudehbbbar_H
//
// This is the declaration of the MatchboxAmplitudehbbbar class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
*
*
* \brief MatchboxAmplitudehbbbar
*/
class MatchboxAmplitudehbbbar:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudehbbbar();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudehbbbar();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 0; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 1; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/*
* The interfaced up quark mass
*/
Energy interfaceUMass;
/*
* The interfaced down quark mass
*/
Energy interfaceDMass;
/*
* The interfaced strange quark mass
*/
Energy interfaceSMass;
/*
* The interfaced charm quark mass
*/
Energy interfaceCMass;
/*
* The interfaced bottom quark mass
*/
Energy interfaceBMass;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudehbbbar & operator=(const MatchboxAmplitudehbbbar &);
+ MatchboxAmplitudehbbbar & operator=(const MatchboxAmplitudehbbbar &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudehbbbar_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbarg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbarg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbarg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehbbbarg.h
@@ -1,208 +1,208 @@
// -*- C++ -*-
//
// MatchboxAmplitudehbbbarg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudehbbbarg_H
#define Herwig_MatchboxAmplitudehbbbarg_H
//
// This is the declaration of the MatchboxAmplitudehbbbarg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
*
*
* \brief MatchboxAmplitudehbbbarg
*/
class MatchboxAmplitudehbbbarg:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudehbbbarg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudehbbbarg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 1; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 1; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
//virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/*
* The interfaced up quark mass
*/
Energy interfaceUMass;
/*
* The interfaced down quark mass
*/
Energy interfaceDMass;
/*
* The interfaced strange quark mass
*/
Energy interfaceSMass;
/*
* The interfaced charm quark mass
*/
Energy interfaceCMass;
/*
* The interfaced bottom quark mass
*/
Energy interfaceBMass;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudehbbbarg & operator=(const MatchboxAmplitudehbbbarg &);
+ MatchboxAmplitudehbbbarg & operator=(const MatchboxAmplitudehbbbarg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudehbbbarg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehgg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehgg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehgg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehgg.h
@@ -1,190 +1,190 @@
// -*- C++ -*-
//
// MatchboxAmplitudehgg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudehgg_H
#define Herwig_MatchboxAmplitudehgg_H
//
// This is the declaration of the MatchboxAmplitudehgg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Benedikt Zimmermann
*
* \brief MatchboxAmplitudehgg
*/
class MatchboxAmplitudehgg:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudehgg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudehgg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 2; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 1; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/*
* The interfaced THooftMass
*/
Energy interfaceTHooft;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudehgg & operator=(const MatchboxAmplitudehgg &);
+ MatchboxAmplitudehgg & operator=(const MatchboxAmplitudehgg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudehgg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehggg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehggg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehggg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehggg.h
@@ -1,191 +1,191 @@
// -*- C++ -*-
//
// MatchboxAmplitudehggg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudehggg_H
#define Herwig_MatchboxAmplitudehggg_H
//
// This is the declaration of the MatchboxAmplitudehggg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Benedikt Zimmermann
*
* \brief MatchboxAmplitudehggg
*/
class MatchboxAmplitudehggg:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudehggg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudehggg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 3; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 1; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
//virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/*
* The interfaced THooftMass
*/
Energy interfaceTHooft;
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudehggg & operator=(const MatchboxAmplitudehggg &);
+ MatchboxAmplitudehggg & operator=(const MatchboxAmplitudehggg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudehggg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehqqbarg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehqqbarg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehqqbarg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudehqqbarg.h
@@ -1,189 +1,189 @@
// -*- C++ -*-
//
// MatchboxAmplitudehqqbarg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudehqqbarg_H
#define Herwig_MatchboxAmplitudehqqbarg_H
//
// This is the declaration of the MatchboxAmplitudehqqbarg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Benedikt Zimmermann
*
* \brief MatchboxAmplitudehqqbarg
*/
class MatchboxAmplitudehqqbarg:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudehqqbarg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudehqqbarg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 3; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 1; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
//virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/*
* The interfaced THooftMass
*/
Energy interfaceTHooft;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudehqqbarg & operator=(const MatchboxAmplitudehqqbarg &);
+ MatchboxAmplitudehqqbarg & operator=(const MatchboxAmplitudehqqbarg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudehqqbarg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbar.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbar.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbar.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbar.h
@@ -1,186 +1,186 @@
// -*- C++ -*-
//
// MatchboxAmplitudellbarqqbar.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudellbarqqbar_H
#define Herwig_MatchboxAmplitudellbarqqbar_H
//
// This is the declaration of the MatchboxAmplitudellbarqqbar class.
//
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxAmplitudellbarqqbar
*/
class MatchboxAmplitudellbarqqbar:
public MatchboxZGammaAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudellbarqqbar();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudellbarqqbar();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 0; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true if one loop corrections are given in the conventions of everything expanded - this is currently the only convention available in DipoleMIOperator.cc
*/
virtual bool isExpanded() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxZGammaAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudellbarqqbar & operator=(const MatchboxAmplitudellbarqqbar &);
+ MatchboxAmplitudellbarqqbar & operator=(const MatchboxAmplitudellbarqqbar &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudellbarqqbar_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarg.h
@@ -1,187 +1,187 @@
// -*- C++ -*-
//
// MatchboxAmplitudellbarqqbarg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudellbarqqbarg_H
#define Herwig_MatchboxAmplitudellbarqqbarg_H
//
// This is the declaration of the MatchboxAmplitudellbarqqbarg class.
//
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxAmplitudellbarqqbarg
*/
class MatchboxAmplitudellbarqqbarg:
public MatchboxZGammaAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudellbarqqbarg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudellbarqqbarg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 1; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxZGammaAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudellbarqqbarg & operator=(const MatchboxAmplitudellbarqqbarg &);
+ MatchboxAmplitudellbarqqbarg & operator=(const MatchboxAmplitudellbarqqbarg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudellbarqqbarg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbargg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbargg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbargg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbargg.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// MatchboxAmplitudellbarqqbargg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudellbarqqbargg_H
#define Herwig_MatchboxAmplitudellbarqqbargg_H
//
// This is the declaration of the MatchboxAmplitudellbarqqbargg class.
//
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxAmplitudellbarqqbargg
*/
class MatchboxAmplitudellbarqqbargg:
public MatchboxZGammaAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudellbarqqbargg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudellbarqqbargg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 2; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxZGammaAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudellbarqqbargg & operator=(const MatchboxAmplitudellbarqqbargg &);
+ MatchboxAmplitudellbarqqbargg & operator=(const MatchboxAmplitudellbarqqbargg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudellbarqqbargg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarqqbar.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarqqbar.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarqqbar.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudellbarqqbarqqbar.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// MatchboxAmplitudellbarqqbarqqbar.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudellbarqqbarqqbar_H
#define Herwig_MatchboxAmplitudellbarqqbarqqbar_H
//
// This is the declaration of the MatchboxAmplitudellbarqqbarqqbar class.
//
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxAmplitudellbarqqbarqqbar
*/
class MatchboxAmplitudellbarqqbarqqbar:
public MatchboxZGammaAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudellbarqqbarqqbar();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudellbarqqbarqqbar();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 2; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxZGammaAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudellbarqqbarqqbar & operator=(const MatchboxAmplitudellbarqqbarqqbar &);
+ MatchboxAmplitudellbarqqbarqqbar & operator=(const MatchboxAmplitudellbarqqbarqqbar &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudellbarqqbarqqbar_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbar.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbar.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbar.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbar.h
@@ -1,185 +1,185 @@
// -*- C++ -*-
//
// MatchboxAmplitudelnuqqbar.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudelnuqqbar_H
#define Herwig_MatchboxAmplitudelnuqqbar_H
//
// This is the declaration of the MatchboxAmplitudelnuqqbar class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/MatrixElement/Matchbox/Utility/SU2Helper.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Thomas Schuh
*
* \brief MatchboxAmplitudelnuqqbar
*/
class MatchboxAmplitudelnuqqbar: public MatchboxAmplitude, public MatchboxCurrents {
public:
/**
* The default constructor.
*/
MatchboxAmplitudelnuqqbar();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudelnuqqbar();
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 0; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
private:
/**
* True, if a diagonal CKM matrix should be assumed. This ignores
* the CKM object of the StandardModel.
*/
bool theDiagonal;
/**
* The ckm.
*/
vector< vector<Complex> > theCKM;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudelnuqqbar & operator=(const MatchboxAmplitudelnuqqbar &);
+ MatchboxAmplitudelnuqqbar & operator=(const MatchboxAmplitudelnuqqbar &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudelnuqqbar_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarg.h
@@ -1,185 +1,185 @@
// -*- C++ -*-
//
// MatchboxAmplitudelnuqqbarg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudelnuqqbarg_H
#define Herwig_MatchboxAmplitudelnuqqbarg_H
//
// This is the declaration of the MatchboxAmplitudelnuqqbarg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/MatrixElement/Matchbox/Utility/SU2Helper.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Thomas Schuh
*
* \brief MatchboxAmplitudelnuqqbarg
*/
class MatchboxAmplitudelnuqqbarg: public MatchboxAmplitude, public MatchboxCurrents {
public:
/**
* The default constructor.
*/
MatchboxAmplitudelnuqqbarg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudelnuqqbarg();
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 1; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluateOneLoop(size_t, const vector<int>&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
private:
/**
* True, if a diagonal CKM matrix should be assumed. This ignores
* the CKM object of the StandardModel.
*/
bool theDiagonal;
/**
* The ckm.
*/
vector< vector<Complex> > theCKM;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudelnuqqbarg & operator=(const MatchboxAmplitudelnuqqbarg &);
+ MatchboxAmplitudelnuqqbarg & operator=(const MatchboxAmplitudelnuqqbarg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudelnuqqbarg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbargg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbargg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbargg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbargg.h
@@ -1,179 +1,179 @@
// -*- C++ -*-
//
// MatchboxAmplitudelnuqqbargg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudelnuqqbargg_H
#define Herwig_MatchboxAmplitudelnuqqbargg_H
//
// This is the declaration of the MatchboxAmplitudelnuqqbargg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/MatrixElement/Matchbox/Utility/SU2Helper.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Thomas Schuh
*
* \brief MatchboxAmplitudelnuqqbargg
*/
class MatchboxAmplitudelnuqqbargg: public MatchboxAmplitude, public MatchboxCurrents {
public:
/**
* The default constructor.
*/
MatchboxAmplitudelnuqqbargg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudelnuqqbargg();
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 2; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
private:
/**
* True, if a diagonal CKM matrix should be assumed. This ignores
* the CKM object of the StandardModel.
*/
bool theDiagonal;
/**
* The ckm.
*/
vector< vector<Complex> > theCKM;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudelnuqqbargg & operator=(const MatchboxAmplitudelnuqqbargg &);
+ MatchboxAmplitudelnuqqbargg & operator=(const MatchboxAmplitudelnuqqbargg &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudelnuqqbargg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarqqbar.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarqqbar.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarqqbar.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudelnuqqbarqqbar.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
//
// MatchboxAmplitudelnuqqbarqqbar.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudelnuqqbarqqbar_H
#define Herwig_MatchboxAmplitudelnuqqbarqqbar_H
//
// This is the declaration of the MatchboxAmplitudelnuqqbarqqbar class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "Herwig/MatrixElement/Matchbox/Utility/SU2Helper.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Thomas Schuh
*
* \brief MatchboxAmplitudelnuqqbarqqbar
*/
class MatchboxAmplitudelnuqqbarqqbar: public MatchboxAmplitude, public MatchboxCurrents {
public:
/**
* The default constructor.
*/
MatchboxAmplitudelnuqqbarqqbar();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudelnuqqbarqqbar();
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return 2; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 2; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isBDK() const { return true; }
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
private:
/**
* True, if a diagonal CKM matrix should be assumed. This ignores
* the CKM object of the StandardModel.
*/
bool theDiagonal;
/**
* The ckm.
*/
vector< vector<Complex> > theCKM;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudelnuqqbarqqbar & operator=(const MatchboxAmplitudelnuqqbarqqbar &);
+ MatchboxAmplitudelnuqqbarqqbar & operator=(const MatchboxAmplitudelnuqqbarqqbar &) = delete;
};
}
#endif /* Herwig_MatchboxAmplitudelnuqqbarqqbar_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbar.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbar.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbar.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbar.h
@@ -1,201 +1,201 @@
// -*- C++ -*-
//
// MatchboxAmplitudeqqbarttbar.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudeqqbarttbar_H
#define Herwig_MatchboxAmplitudeqqbarttbar_H
//
// This is the declaration of the MatchboxAmplitudeqqbarttbar class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "MG_qqx2ttx.h"
#include "HelAmps_sm.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Alix Wilcock
*
* \brief MatchboxAmplitudeqqbarttbar
*/
class MatchboxAmplitudeqqbarttbar:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudeqqbarttbar();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudeqqbarttbar();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const {return 2; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 0; }
/**
* Return true, if this amplitude will not require colour correlations.
*/
virtual bool noCorrelations() const { return false; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudeqqbarttbar & operator=(const MatchboxAmplitudeqqbarttbar &);
+ MatchboxAmplitudeqqbarttbar & operator=(const MatchboxAmplitudeqqbarttbar &) = delete;
/**
* Containers for external particle momenta
*/
double mom0 [4];
double mom1 [4];
double mom2 [4];
double mom3 [4];
/**
* Fill MGParams_ with Herwig values of parameters
*/
void setupParams(map<string, double> & MGParams);
/**
* Stores parameters needed in MG_process
*/
map<string,double> MGParams_;
};
}
#endif /* Herwig_MatchboxAmplitudeqqbarttbar_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbarg.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbarg.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbarg.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxAmplitudeqqbarttbarg.h
@@ -1,202 +1,202 @@
// -*- C++ -*-
//
// MatchboxAmplitudeqqbarttbarg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxAmplitudeqqbarttbarg_H
#define Herwig_MatchboxAmplitudeqqbarttbarg_H
//
// This is the declaration of the MatchboxAmplitudeqqbarttbarg class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "MG_qqx2ttxg.h"
#include "HelAmps_sm.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Alix Wilcock
*
* \brief MatchboxAmplitudeqqbarttbarg
*/
class MatchboxAmplitudeqqbarttbarg:
public MatchboxAmplitude, public MatchboxCurrents {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxAmplitudeqqbarttbarg();
/**
* The destructor.
*/
virtual ~MatchboxAmplitudeqqbarttbarg();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&) const;
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const {return 3; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return 0; }
/**
* Return true, if this amplitude will not require colour correlations.
*/
virtual bool noCorrelations() const { return true; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return false; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return lastSHat(); }
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxCurrents::reset();
MatchboxAmplitude::flushCaches();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxAmplitudeqqbarttbarg & operator=(const MatchboxAmplitudeqqbarttbarg &);
+ MatchboxAmplitudeqqbarttbarg & operator=(const MatchboxAmplitudeqqbarttbarg &) = delete;
/**
* Containers for external particle momenta
*/
double mom0 [4];
double mom1 [4];
double mom2 [4];
double mom3 [4];
double mom4 [4];
/**
* Fill MGParams_ with Herwig values of parameters
*/
void setupParams(map<string, double> & MGParams);
/**
* Stores parameters needed in MG_process
*/
map<string,double> MGParams_;
};
}
#endif /* Herwig_MatchboxAmplitudeqqbarttbarg_H */
diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h
--- a/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h
+++ b/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxZGammaAmplitude.h
@@ -1,109 +1,109 @@
// -*- C++ -*-
//
// MatchboxZGammaAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxZGammaAmplitude_H
#define Herwig_MatchboxZGammaAmplitude_H
//
// This is the declaration of the MatchboxZGammaAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the MatchboxZGammaAmplitude class.
*
* @see \ref MatchboxZGammaAmplitudeInterfaces "The interfaces"
* defined for MatchboxZGammaAmplitude.
*/
class MatchboxZGammaAmplitude: public MatchboxAmplitude {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxZGammaAmplitude();
/**
* The destructor.
*/
virtual ~MatchboxZGammaAmplitude();
//@}
public:
/**
* Return true, if the Z contribution should be taken into account
*/
bool includeZ() const { return theIncludeZ; }
/**
* Return true, if the gamma contribution should be taken into account
*/
bool includeGamma() const { return theIncludeGamma; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxZGammaAmplitude & operator=(const MatchboxZGammaAmplitude &);
+ MatchboxZGammaAmplitude & operator=(const MatchboxZGammaAmplitude &) = delete;
/**
* True, if the Z contribution should be taken into account
*/
bool theIncludeZ;
/**
* True, if the gamma contribution should be taken into account
*/
bool theIncludeGamma;
};
}
#endif /* Herwig_MatchboxZGammaAmplitude_H */
diff --git a/MatrixElement/Matchbox/CVolver/ColourFlowBasis.h b/MatrixElement/Matchbox/CVolver/ColourFlowBasis.h
--- a/MatrixElement/Matchbox/CVolver/ColourFlowBasis.h
+++ b/MatrixElement/Matchbox/CVolver/ColourFlowBasis.h
@@ -1,211 +1,211 @@
// -*- C++ -*-
//
// ColourFlowBasis.h is a part of CVolver
// Copyright (C) 2013-2017 Simon Platzer, The Herwig Collaboration
//
// CVolver is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef CVOLVER_ColourFlowBasis_H
#define CVOLVER_ColourFlowBasis_H
//
// This is the declaration of the ColourFlowBasis class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
#include "ColourFlows.h"
namespace CVolver {
using namespace ThePEG;
using namespace Herwig;
/**
* Specify particle data traits for ThePEG
*/
template<>
struct ParticleDataTraits<ThePEG::PDT::Colour> {
/**
* Return true, if singlet
*/
static bool isSinglet(const ThePEG::PDT::Colour& pd) {
return pd == PDT::Colour0;
}
/**
* Return true, if anti-fundamental
*/
static bool isAntiFundamental(const ThePEG::PDT::Colour& pd) {
return pd == PDT::Colour3bar;
}
/**
* Return true, if fundamental
*/
static bool isFundamental(const ThePEG::PDT::Colour& pd) {
return pd == PDT::Colour3;
}
/**
* Return true, if adjoint
*/
static bool isAdjoint(const ThePEG::PDT::Colour& pd) {
return pd == PDT::Colour8;
}
};
/**
* ColourFlowBasis implements the colour flow basis.
*
* @see \ref ColourFlowBasisInterfaces "The interfaces"
* defined for ColourFlowBasis.
*/
class ColourFlowBasis: public Herwig::ColourBasis {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ColourFlowBasis();
/**
* The destructor.
*/
virtual ~ColourFlowBasis();
//@}
public:
/**
* Clear this colour basis
*/
virtual void clear();
/**
* Return a map of basis tensor indices to vectors identifying a
* certain ordering corresponding to the given colour structure. May
* not be supported by all colour basis implementations.
*/
virtual map<size_t,vector<vector<size_t> > > basisList(const vector<PDT::Colour>&) const;
/**
* Prepare the basis for the normal ordered legs and return the
* dimensionality of the basis.
*/
virtual size_t prepareBasis(const vector<PDT::Colour>&);
/**
* Gather any implementation dependend details when reading a basis
*/
virtual void readBasisDetails(const vector<PDT::Colour>&);
/**
* Return the scalar product of basis tensors labelled a and b in
* the basis used for the given normal ordered legs.
*/
virtual double scalarProduct(size_t a, size_t b,
const vector<PDT::Colour>& abBasis) const;
/**
* Return the matrix element of a colour charge
* <c_{n+1,a}|T_i|c_{n,b}> between basis tensors a and b, with
* respect to aBasis and bBasis
*/
virtual double tMatrixElement(size_t i, size_t a, size_t b,
const vector<PDT::Colour>& aBasis,
const vector<PDT::Colour>& bBasis) const;
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const { return true; }
/**
* Return true, if a large-N colour connection exists for the
* given external legs and basis tensor.
*/
virtual bool colourConnected(const cPDVector&,
const vector<PDT::Colour>&,
const pair<int,bool>&,
const pair<int,bool>&,
size_t) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Map colour signatures to colour crossings
*/
map<vector<PDT::Colour>,ColourFlowCrossing> theCrossings;
/**
* Colour flows indexed by basis size; note this is a unique
* assignment
*/
map<size_t,vector<ColourFlow> > theFlows;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ColourFlowBasis & operator=(const ColourFlowBasis &);
+ ColourFlowBasis & operator=(const ColourFlowBasis &) = delete;
};
}
#endif /* CVOLVER_ColourFlowBasis_H */
diff --git a/MatrixElement/Matchbox/CVolver/Makefile.am b/MatrixElement/Matchbox/CVolver/Makefile.am
--- a/MatrixElement/Matchbox/CVolver/Makefile.am
+++ b/MatrixElement/Matchbox/CVolver/Makefile.am
@@ -1,9 +1,9 @@
pkglib_LTLIBRARIES = HwCVolver.la
-HwCVolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0
+HwCVolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
HwCVolver_la_SOURCES = \
ColourFlowBasis.cc \
ColourFlows.cc \
ColourFlowBasis.h \
ColourFlows.h
diff --git a/MatrixElement/Matchbox/ColorFull/Makefile.am b/MatrixElement/Matchbox/ColorFull/Makefile.am
--- a/MatrixElement/Matchbox/ColorFull/Makefile.am
+++ b/MatrixElement/Matchbox/ColorFull/Makefile.am
@@ -1,35 +1,35 @@
pkglib_LTLIBRARIES = HwColorFull.la
-HwColorFull_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0
+HwColorFull_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
HwColorFull_la_SOURCES = \
Col_amp.cc \
Col_amp.h \
Col_basis.cc \
Col_basis.h \
Col_functions.cc \
Col_functions.h \
Col_str.cc \
Col_str.h \
Monomial.cc \
Monomial.h \
Orthogonal_basis.cc \
Orthogonal_basis.h \
parameters.h \
Poly_matr.cc \
Poly_matr.h \
Polynomial.cc \
Polynomial.h \
Poly_vec.cc \
Poly_vec.h \
Quark_line.cc \
Quark_line.h \
Trace_basis.cc \
TraceBasis.cc \
Trace_basis.h \
TraceBasis.h \
Trace_type_basis.cc \
Trace_type_basis.h \
Tree_level_gluon_basis.cc \
Tree_level_gluon_basis.h \
types.h
diff --git a/MatrixElement/Matchbox/ColorFull/TraceBasis.h b/MatrixElement/Matchbox/ColorFull/TraceBasis.h
--- a/MatrixElement/Matchbox/ColorFull/TraceBasis.h
+++ b/MatrixElement/Matchbox/ColorFull/TraceBasis.h
@@ -1,179 +1,179 @@
// -*- C++ -*-
//
// TraceBasis.h is a part of ColorFull
// Copyright (C) 2010-2011 Simon Platzer & Malin Sjodahl
//
// ColorFull is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef COLORFULL_TraceBasis_H
#define COLORFULL_TraceBasis_H
//
// This is the declaration of the TraceBasis class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
#include "Trace_basis.h"
namespace ColorFull {
using namespace ThePEG;
using namespace Herwig;
/**
* TraceBasis implements the trace colour basis.
*
* @see \ref TraceBasisInterfaces "The interfaces"
* defined for TraceBasis.
*/
class TraceBasis: public Herwig::ColourBasis {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
TraceBasis();
/**
* The destructor.
*/
virtual ~TraceBasis();
//@}
public:
/**
* Clear this colour basis
*/
virtual void clear();
/**
* Return a map of basis tensor indices to vectors identifying a
* certain ordering corresponding to the given colour structure. May
* not be supported by all colour basis implementations.
*/
virtual map<size_t,vector<vector<size_t> > > basisList(const vector<PDT::Colour>&) const;
/**
* Prepare the basis for the normal ordered legs and return the
* dimensionality of the basis.
*/
virtual size_t prepareBasis(const vector<PDT::Colour>&);
/**
* Gather any implementation dependend details when reading a basis
*/
virtual void readBasisDetails(const vector<PDT::Colour>&);
/**
* Return the scalar product of basis tensors labelled a and b in
* the basis used for the given normal ordered legs.
*/
virtual double scalarProduct(size_t a, size_t b,
const vector<PDT::Colour>& abBasis) const;
/**
* Return the matrix element of a colour charge
* <c_{n+1,a}|T_i|c_{n,b}> between basis tensors a and b, with
* respect to aBasis and bBasis
*/
virtual double tMatrixElement(size_t i, size_t a, size_t b,
const vector<PDT::Colour>& aBasis,
const vector<PDT::Colour>& bBasis) const;
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const { return true; }
/**
* Return true, if a large-N colour connection exists for the
* given external legs and basis tensor.
*/
virtual bool colourConnected(const cPDVector&,
const vector<PDT::Colour>&,
const pair<int,bool>&,
const pair<int,bool>&,
size_t) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The color functions object to be used
*/
mutable Col_functions colorFunctions;
/**
* Map legs to known basis vectors.
*/
mutable map<vector<PDT::Colour>,Trace_basis> theBasisMap;
/**
* Memorize scalar product intermediate results.
*/
mutable map<string,Polynomial> theScalarProducts;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TraceBasis & operator=(const TraceBasis &);
+ TraceBasis & operator=(const TraceBasis &) = delete;
};
}
#endif /* COLORFULL_TraceBasis_H */
diff --git a/MatrixElement/Matchbox/Cuts/FrixionePhotonSeparationCut.h b/MatrixElement/Matchbox/Cuts/FrixionePhotonSeparationCut.h
--- a/MatrixElement/Matchbox/Cuts/FrixionePhotonSeparationCut.h
+++ b/MatrixElement/Matchbox/Cuts/FrixionePhotonSeparationCut.h
@@ -1,149 +1,149 @@
// -*- C++ -*-
//
// FrixionePhotonSeparationCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_FrixionePhotonSeparationCut_H
#define Herwig_FrixionePhotonSeparationCut_H
//
// This is the declaration of the FrixionePhotonSeparationCut class.
//
#include "ThePEG/Cuts/MultiCutBase.h"
#include "ThePEG/PDT/MatcherBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Michael Rauch
*
* \brief This class implements a cut on legoplot and rapidity separation
*
* @see \ref FrixionePhotonSeparationCutInterfaces "The interfaces"
* defined for FrixionePhotonSeparationCut.
*/
class FrixionePhotonSeparationCut: public MultiCutBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FrixionePhotonSeparationCut() : theDeltaZero(0.0), theExponentn(1.0), theEfficiency(0.0), theCutType(1) {}
//@}
public:
/** @name Overridden virtual functions defined in the base class. */
//@{
/**
* Return true if a pair of particles with type \a pitype and \a
* pjtype and momenta \a pi and \a pj respectively passes the
* cuts. \a inci and \a inj indicates if the corresponding particles
* are incoming.
*/
virtual bool passCuts(tcCutsPtr, const tcPDVector & ptype,
const vector<LorentzMomentum> & p) const;
//@}
/**
* Describe the currently active cuts in the log file.
*/
virtual void describe() const;
/**
* Return the matcher for particles to isolate on.
*/
Ptr<MatcherBase>::tptr matcher() const { return theMatcher; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The maximal legoplot separation where partons are included in the criterium
*/
double theDeltaZero;
/**
* The exponent n of the algorithm
*/
double theExponentn;
/**
* The efficiency epsilon of the algorithm
*/
double theEfficiency;
/**
* The cut type of the algorithm
*/
int theCutType;
/**
* A matcher for particles to isolate on.
*/
Ptr<MatcherBase>::ptr theMatcher;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FrixionePhotonSeparationCut & operator=(const FrixionePhotonSeparationCut &);
+ FrixionePhotonSeparationCut & operator=(const FrixionePhotonSeparationCut &) = delete;
};
}
#endif /* Herwig_FrixionePhotonSeparationCut_H */
diff --git a/MatrixElement/Matchbox/Cuts/IdentifiedParticleCut.h b/MatrixElement/Matchbox/Cuts/IdentifiedParticleCut.h
--- a/MatrixElement/Matchbox/Cuts/IdentifiedParticleCut.h
+++ b/MatrixElement/Matchbox/Cuts/IdentifiedParticleCut.h
@@ -1,194 +1,194 @@
// -*- C++ -*-
//
// IdentifiedParticleCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_IdentifiedParticleCut_H
#define Herwig_IdentifiedParticleCut_H
//
// This is the declaration of the IdentifiedParticleCut class.
//
#include "ThePEG/Cuts/OneCutBase.h"
#include "ThePEG/PDT/MatcherBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IdentifiedParticleCut implements cuts on single momenta.
*
* @see \ref IdentifiedParticleCutInterfaces "The interfaces"
* defined for IdentifiedParticleCut.
*/
class IdentifiedParticleCut: public OneCutBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IdentifiedParticleCut();
/**
* The destructor.
*/
virtual ~IdentifiedParticleCut();
//@}
public:
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return the minimum allowed value of the transverse momentum of an
* outgoing parton.
*/
virtual Energy minKT(tcPDPtr) const { return ZERO; }
/**
* Return the minimum allowed pseudo-rapidity of an outgoing parton
* of the given type. The pseudo-rapidity is measured in the lab
* system.
*/
virtual double minEta(tcPDPtr) const { return -Constants::MaxRapidity; }
/**
* Return the maximum allowed pseudo-rapidity of an outgoing parton
* of the given type. The pseudo-rapidity is measured in the lab
* system.
*/
virtual double maxEta(tcPDPtr) const { return Constants::MaxRapidity; }
/**
* Return true if a particle with type \a ptype and momentum \a p
* passes the cuts. The \a parent contains information about the
* kinematics of the hard sub-process.
*/
virtual bool passCuts(tcCutsPtr parent,
tcPDPtr ptype, LorentzMomentum p) const;
/**
* Describe the currently active cuts in the log file.
*/
virtual void describe() const;
//@}
public:
/**
* Return the minimum pt.
*/
Energy ptMin() const { return thePtMin; }
/**
* Return the maximum pt.
*/
Energy ptMax() const { return thePtMax; }
/**
* Return the rapidity ranges.
*/
const vector<pair<double,double> >& yRanges() const { return theYRanges; }
/**
* Return the matcher for particles to cut on.
*/
Ptr<MatcherBase>::tptr matcher() const { return theMatcher; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Command to insert a rapidity range
*/
string doYRange(string);
/**
* The minimum pt.
*/
Energy thePtMin;
/**
* The maximum pt.
*/
Energy thePtMax;
/**
* The rapidity ranges.
*/
vector<pair<double,double> > theYRanges;
/**
* A matcher for particles to cut on.
*/
Ptr<MatcherBase>::ptr theMatcher;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IdentifiedParticleCut & operator=(const IdentifiedParticleCut &);
+ IdentifiedParticleCut & operator=(const IdentifiedParticleCut &) = delete;
};
}
#endif /* Herwig_IdentifiedParticleCut_H */
diff --git a/MatrixElement/Matchbox/Cuts/InvariantMassCut.h b/MatrixElement/Matchbox/Cuts/InvariantMassCut.h
--- a/MatrixElement/Matchbox/Cuts/InvariantMassCut.h
+++ b/MatrixElement/Matchbox/Cuts/InvariantMassCut.h
@@ -1,228 +1,228 @@
// -*- C++ -*-
//
// InvariantMassCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_InvariantMassCut_H
#define Herwig_InvariantMassCut_H
//
// This is the declaration of the InvariantMassCut class.
//
#include "ThePEG/Cuts/TwoCutBase.h"
#include "ThePEG/PDT/MatcherBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Michael Rauch
*
* \brief This class implements a cut on the invariant mass
*
* @see \ref InvariantMassCutInterfaces "The interfaces"
* defined for InvariantMassCut.
*/
class InvariantMassCut: public TwoCutBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
InvariantMassCut() :
theMinMass(0*GeV), theMaxMass(Constants::MaxEnergy),
theSameFlavourOnly(false), theOppositeSignOnly(false) {}
//@}
public:
/** @name Overridden virtual functions defined in the base class. */
//@{
/**
* Return true if a pair of particles with type \a pitype and \a
* pjtype and momenta \a pi and \a pj respectively passes the
* cuts. \a inci and \a inj indicates if the corresponding particles
* are incoming.
*/
virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
LorentzMomentum pi, LorentzMomentum pj,
bool inci = false, bool incj = false) const;
/**
* Return the minimum allowed squared invariant mass of two outgoing
* partons of type \a pi and \a pj.
*/
virtual Energy2 minSij(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the negative of the squared
* invariant mass of an incoming parton of type \a pi and an
* outgoing parton of type \a po.
*/
virtual Energy2 minTij(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of \f$\Delta
* R_{ij}=\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ of two
* outgoing partons of type \a pi and \a pj.
*/
virtual double minDeltaR(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the longitudinally invariant
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$\min(p_{\perp i}, p_{\perp
* j})\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ for two outgoing
* partons, or simply \f$p_{\perp i}\f$ or \f$p_{\perp j}\f$ for a
* single outgoing parton. Returns 0 if both partons are incoming. A
* null pointer indicates an incoming parton, hence the type of the
* incoming parton is irrelevant.
*/
virtual Energy minKTClus(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the Durham
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$2\min(E_j^2, E_j^2)(1-\cos\theta_{ij})/\hat{s}\f$ for two
* outgoing partons.
*/
virtual double minDurham(tcPDPtr , tcPDPtr ) const { return ZERO; }
//@}
/**
* Describe the currently active cuts in the log file.
*/
virtual void describe() const;
public:
/**
* Return the minimal allowed invariant mass
*/
Energy minMass() const { return theMinMass; }
/**
* Return the maximal allowed invariant mass
*/
Energy maxMass() const { return theMaxMass; }
/**
* Return whether cut acts on same-flavour fermions only
*/
bool sameFlavourOnly() const { return theSameFlavourOnly; }
/**
* Return whether cut acts on opposite-sign fermions only
*/
bool oppositeSignOnly() const { return theOppositeSignOnly; }
/**
* Return the matchers for a pair of particles to cut on.
* Only a pair of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::tptr firstMatcher() const { return theFirstMatcher; }
Ptr<MatcherBase>::tptr secondMatcher() const { return theSecondMatcher; }
protected:
/**
* Return the family of the given PDG id number.
*/
int family(long id) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The minimal allowed mass cut value
*/
Energy theMinMass;
/**
* The maximal allowed mass cut value
*/
Energy theMaxMass;
/**
* Whether the cut is active on same-flavour fermions only
* (ignored for pairs not consisting of two fermions)
*/
bool theSameFlavourOnly;
/**
* Whether the cut is active on opposite-sign fermions only
* (ignored for pairs not consisting of two fermions)
*/
bool theOppositeSignOnly;
/**
* Matchers for a pair of particles to cut on. Only a pair
* of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::ptr theFirstMatcher;
Ptr<MatcherBase>::ptr theSecondMatcher;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- InvariantMassCut & operator=(const InvariantMassCut &);
+ InvariantMassCut & operator=(const InvariantMassCut &) = delete;
};
}
#endif /* Herwig_InvariantMassCut_H */
diff --git a/MatrixElement/Matchbox/Cuts/Makefile.am b/MatrixElement/Matchbox/Cuts/Makefile.am
--- a/MatrixElement/Matchbox/Cuts/Makefile.am
+++ b/MatrixElement/Matchbox/Cuts/Makefile.am
@@ -1,36 +1,36 @@
pkglib_LTLIBRARIES = HwMatchboxCuts.la
HwMatchboxCuts_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 3:0:0
+$(AM_LDFLAGS) -module -version-info 4:0:0
nodist_HwMatchboxCuts_la_SOURCES = \
Cuts__all.cc
BUILT_SOURCES = Cuts__all.cc
CLEANFILES = Cuts__all.cc
Cuts__all.cc : $(DIR_H_FILES) $(DIR_CC_FILES) Makefile
@echo "Concatenating .cc files into $@"
@$(top_srcdir)/cat_with_cpplines $(DIR_CC_FILES) > $@
EXTRA_DIST = $(ALL_H_FILES) $(ALL_CC_FILES)
DIR_H_FILES = $(addprefix $(srcdir)/,$(ALL_H_FILES))
ALL_H_FILES = \
IdentifiedParticleCut.h \
MatchboxDeltaRCut.h \
MissingPtCut.h \
FrixionePhotonSeparationCut.h \
InvariantMassCut.h \
PairPtCut.h \
PairRapidityCut.h
DIR_CC_FILES = $(addprefix $(srcdir)/,$(ALL_CC_FILES))
ALL_CC_FILES = \
IdentifiedParticleCut.cc \
MatchboxDeltaRCut.cc \
MissingPtCut.cc \
FrixionePhotonSeparationCut.cc \
InvariantMassCut.cc \
PairPtCut.cc \
PairRapidityCut.cc
diff --git a/MatrixElement/Matchbox/Cuts/MatchboxDeltaRCut.h b/MatrixElement/Matchbox/Cuts/MatchboxDeltaRCut.h
--- a/MatrixElement/Matchbox/Cuts/MatchboxDeltaRCut.h
+++ b/MatrixElement/Matchbox/Cuts/MatchboxDeltaRCut.h
@@ -1,233 +1,233 @@
// -*- C++ -*-
//
// MatchboxDeltaRCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxDeltaRCut_H
#define Herwig_MatchboxDeltaRCut_H
//
// This is the declaration of the MatchboxDeltaRCut class.
//
#include "ThePEG/Cuts/TwoCutBase.h"
#include "ThePEG/PDT/MatcherBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Christian Reuschle
*
* \brief MatchboxDeltaRCut implements cuts related to the separation in the legoplot plane
*
* @see \ref MatchboxDeltaRCutInterfaces "The interfaces"
* defined for MatchboxDeltaRCut.
*/
class MatchboxDeltaRCut: public TwoCutBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxDeltaRCut();
/**
* The destructor.
*/
virtual ~MatchboxDeltaRCut();
//@}
public:
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return the minimum allowed value of the longitudinally invariant
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$\min(p_{\perp i}, p_{\perp
* j})\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ for two outgoing
* partons, or simply \f$p_{\perp i}\f$ or \f$p_{\perp j}\f$ for a
* single outgoing parton. Returns 0 if both partons are incoming. A
* null pointer indicates an incoming parton, hence the type of the
* incoming parton is irrelevant.
*/
virtual Energy minDeltaMeasureCuts(tcPDPtr , tcPDPtr ) const { return ZERO; }
// virtual Energy minDeltaMeasureCuts(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
/**
* Return the minimum allowed value of the longitudinally invariant
* \f$k_\perp\f$-algorithms distance measure. Returns ZERO.
*/
virtual Energy minKTClus(tcPDPtr , tcPDPtr ) const { return ZERO; }
// virtual Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
/**
* Return the minimum allowed squared invariant mass of two outgoing
* partons of type \a pi and \a pj. Returns zero.
*/
virtual Energy2 minSij(tcPDPtr , tcPDPtr ) const { return ZERO; }
// virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
/**
* Return the minimum allowed value of the negative of the squared
* invariant mass of an incoming parton of type \a pi and an
* outgoing parton of type \a po. Returns zero.
*/
virtual Energy2 minTij(tcPDPtr , tcPDPtr ) const { return ZERO; }
// virtual Energy2 minTij(tcPDPtr pi, tcPDPtr po) const { return ZERO; }
/**
* Return the minimum allowed value of \f$\Delta
* R_{ij}=\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ of two
* outgoing partons of type \a pi and \a pj. Returns zero.
*/
virtual double minDeltaR(tcPDPtr , tcPDPtr ) const { return ZERO; }
// virtual double minDeltaR(tcPDPtr pi, tcPDPtr pj) const { return ZERO; }
/**
* Return the minimum allowed value of the Durham
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$2\min(E_j^2, E_j^2)(1-\cos\theta_{ij})/\hat{s}\f$ for two
* outgoing partons. Returns zero.
*/
virtual double minDurham(tcPDPtr , tcPDPtr ) const { return 0.0; }
// virtual double minDurham(tcPDPtr pi, tcPDPtr pj) const { return 0.0; }
/**
* Return true if a pair of particles with type \a pitype and \a
* pjtype and momenta \a pi and \a pj respectively passes the
* cuts. \a inci and \a inj indicates if the corresponding particles
* are incoming.
*/
virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
LorentzMomentum pi, LorentzMomentum pj,
bool inci = false, bool incj = false) const;
/**
* Describe the currently active cuts in the log file.
*/
virtual void describe() const;
//@}
public:
/**
* Return the minimum and maximum allowed legoplot separation
*/
double deltaRMin() const { return theDeltaRMin; }
double deltaRMax() const { return theDeltaRMax; }
/**
* Return the minimum and maximum allowed rapidity separation
*/
double deltaYMin() const { return theDeltaYMin; }
double deltaYMax() const { return theDeltaYMax; }
/**
* Return the minimum and maximum allowed azimuthal separation
*/
double deltaPhiMin() const { return theDeltaPhiMin; }
double deltaPhiMax() const { return theDeltaPhiMax; }
/**
* Return the matchers for a pair of particles to cut on. Only a pair
* of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::tptr firstMatcher() const { return theFirstMatcher; }
Ptr<MatcherBase>::tptr secondMatcher() const { return theSecondMatcher; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The minimum and maximum allowed legoplot separation
*/
double theDeltaRMin;
double theDeltaRMax;
/**
* The minimum and maximum allowed rapidity separation
*/
double theDeltaYMin;
double theDeltaYMax;
/**
* The minimum and maximum allowed azimuthal separation
*/
double theDeltaPhiMin;
double theDeltaPhiMax;
/**
* Matchers for a pair of particles to cut on. Only a pair
* of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::ptr theFirstMatcher;
Ptr<MatcherBase>::ptr theSecondMatcher;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxDeltaRCut & operator=(const MatchboxDeltaRCut &);
+ MatchboxDeltaRCut & operator=(const MatchboxDeltaRCut &) = delete;
};
}
#endif /* Herwig_MatchboxDeltaRCut_H */
diff --git a/MatrixElement/Matchbox/Cuts/MissingPtCut.h b/MatrixElement/Matchbox/Cuts/MissingPtCut.h
--- a/MatrixElement/Matchbox/Cuts/MissingPtCut.h
+++ b/MatrixElement/Matchbox/Cuts/MissingPtCut.h
@@ -1,188 +1,188 @@
// -*- C++ -*-
//
// MissingPtCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MissingPtCut_H
#define Herwig_MissingPtCut_H
//
// This is the declaration of the MissingPtCut class.
//
#include "ThePEG/Cuts/MultiCutBase.h"
#include "ThePEG/PDT/MatcherBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Christian Reuschle
*
* \brief MissingPtCut implements a cut on the total missing transverse momentum of a set of outgoing particles, i.e. for now the total transverse momentum of all outgoing neutrinos in an event.
*
* @see \ref MissingPtCutInterfaces "The interfaces"
* defined for MissingPtCut.
*/
class MissingPtCut: public MultiCutBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MissingPtCut();
/**
* The destructor.
*/
virtual ~MissingPtCut();
//@}
public:
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return the minimum allowed value of the squared invariant mass of
* a set of outgoing partons of the given types. Typically used to
* cut off the tails of the mass of a resonance for efficiency.
*/
virtual Energy2 minS(const tcPDVector) const { return ZERO; }
/**
* Return the maximum allowed value of the squared invariant mass of
* a set of outgoing partons of the given types. Typically used to
* cut off the tails of the mass of a resonance for efficiency.
*/
virtual Energy2 maxS(const tcPDVector) const { return Constants::MaxEnergy2; }
/**
* Return true if a set of outgoing particles with type \a ptype
* and corresponding momenta \a p passes the cuts.
*/
virtual bool passCuts(tcCutsPtr parent, const tcPDVector & ptype,
const vector<LorentzMomentum> & p) const;
/**
* Describe the currently active cuts in the log file.
*/
virtual void describe() const;
/**
* Return the matcher for particles to cut on.
*/
Ptr<MatcherBase>::tptr matcher() const { return theMatcher; }
//@}
public:
/**
* Return the PDG codes of those particles that cannot be detected
*/
const vector<int>& invisibleParticles() const { return theInvisibleParticles; }
/**
* Command to insert the PDG code of a particle that cannot be detected
*/
string doInvisibleParticles(string);
/**
* Return the minimum missing pt.
*/
Energy ptMissMin() const { return thePtMissMin; }
/**
* Return the maximum missing pt.
*/
Energy ptMissMax() const { return thePtMissMax; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The PDG codes of those particles that cannot be detected
*/
vector<int> theInvisibleParticles;
/**
* The minimum missing pt.
*/
Energy thePtMissMin;
/**
* The maximum missing pt.
*/
Energy thePtMissMax;
/**
* A matcher for particles to cut on.
*/
Ptr<MatcherBase>::ptr theMatcher;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MissingPtCut & operator=(const MissingPtCut &);
+ MissingPtCut & operator=(const MissingPtCut &) = delete;
};
}
#endif /* Herwig_MissingPtCut_H */
diff --git a/MatrixElement/Matchbox/Cuts/PairPtCut.h b/MatrixElement/Matchbox/Cuts/PairPtCut.h
--- a/MatrixElement/Matchbox/Cuts/PairPtCut.h
+++ b/MatrixElement/Matchbox/Cuts/PairPtCut.h
@@ -1,229 +1,229 @@
// -*- C++ -*-
//
// PairPtCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_PairPtCut_H
#define Herwig_PairPtCut_H
//
// This is the declaration of the PairPtCut class.
//
#include "ThePEG/Cuts/TwoCutBase.h"
#include "ThePEG/PDT/MatcherBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Christian Reuschle
*
* \brief This class implements a cut on the transverse momentum of a pair of particles
*
* @see \ref PairPtCutInterfaces "The interfaces"
* defined for PairPtCut.
*/
class PairPtCut: public TwoCutBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
PairPtCut() :
theMinPt(0*GeV), theMaxPt(Constants::MaxEnergy),
theSameFlavourOnly(false), theOppositeSignOnly(false) {}
//@}
public:
/** @name Overridden virtual functions defined in the base class. */
//@{
/**
* Return true if a pair of particles with type \a pitype and \a
* pjtype and momenta \a pi and \a pj respectively passes the
* cuts. \a inci and \a inj indicates if the corresponding particles
* are incoming.
*/
virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
LorentzMomentum pi, LorentzMomentum pj,
bool inci = false, bool incj = false) const;
/**
* Return the minimum allowed squared invariant mass of two outgoing
* partons of type \a pi and \a pj.
*/
virtual Energy2 minSij(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the negative of the squared
* invariant mass of an incoming parton of type \a pi and an
* outgoing parton of type \a po.
*/
virtual Energy2 minTij(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of \f$\Delta
* R_{ij}=\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ of two
* outgoing partons of type \a pi and \a pj.
*/
virtual double minDeltaR(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the longitudinally invariant
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$\min(p_{\perp i}, p_{\perp
* j})\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ for two outgoing
* partons, or simply \f$p_{\perp i}\f$ or \f$p_{\perp j}\f$ for a
* single outgoing parton. Returns 0 if both partons are incoming. A
* null pointer indicates an incoming parton, hence the type of the
* incoming parton is irrelevant.
*/
virtual Energy minKTClus(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the Durham
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$2\min(E_j^2, E_j^2)(1-\cos\theta_{ij})/\hat{s}\f$ for two
* outgoing partons.
*/
virtual double minDurham(tcPDPtr , tcPDPtr ) const { return ZERO; }
//@}
/**
* Describe the currently active cuts in the log file.
*/
virtual void describe() const;
public:
/**
* Return the minimal allowed pair pT
*/
Energy minPt() const { return theMinPt; }
/**
* Return the maximal allowed pair pT
*/
Energy maxPt() const { return theMaxPt; }
/**
* Return whether cut acts on same-flavour fermions only
*/
bool sameFlavourOnly() const { return theSameFlavourOnly; }
/**
* Return whether cut acts on opposite-sign fermions only
*/
bool oppositeSignOnly() const { return theOppositeSignOnly; }
/**
* Return the matchers for a pair of particles to cut on.
* Only a pair of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::tptr firstMatcher() const { return theFirstMatcher; }
Ptr<MatcherBase>::tptr secondMatcher() const { return theSecondMatcher; }
protected:
/**
* Return the family of the given PDG id number.
*/
int family(long id) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The minimal allowed pT cut value
*/
Energy theMinPt;
/**
* The maximal allowed pT cut value
*/
Energy theMaxPt;
/**
* Whether the cut is active on same-flavour fermions only
* (ignored for pairs not consisting of two fermions)
*/
bool theSameFlavourOnly;
/**
* Whether the cut is active on opposite-sign fermions only
* (ignored for pairs not consisting of two fermions)
*/
bool theOppositeSignOnly;
/**
* Matchers for a pair of particles to cut on. Only a pair
* of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::ptr theFirstMatcher;
Ptr<MatcherBase>::ptr theSecondMatcher;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PairPtCut & operator=(const PairPtCut &);
+ PairPtCut & operator=(const PairPtCut &) = delete;
};
}
#endif /* Herwig_PairPtCut_H */
diff --git a/MatrixElement/Matchbox/Cuts/PairRapidityCut.h b/MatrixElement/Matchbox/Cuts/PairRapidityCut.h
--- a/MatrixElement/Matchbox/Cuts/PairRapidityCut.h
+++ b/MatrixElement/Matchbox/Cuts/PairRapidityCut.h
@@ -1,242 +1,242 @@
// -*- C++ -*-
//
// PairRapidityCut.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_PairRapidityCut_H
#define Herwig_PairRapidityCut_H
//
// This is the declaration of the PairRapidityCut class.
//
#include "ThePEG/Cuts/TwoCutBase.h"
#include "ThePEG/PDT/MatcherBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Christian Reuschle
*
* \brief This class implements a cut on the rapidity of a pair of particles
*
* @see \ref PairRapidityCutInterfaces "The interfaces"
* defined for PairRapidityCut.
*/
class PairRapidityCut: public TwoCutBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
PairRapidityCut();
/**
* The destructor.
*/
virtual ~PairRapidityCut();
//@}
public:
/** @name Overridden virtual functions defined in the base class. */
//@{
/**
* Return true if a pair of particles with type \a pitype and \a
* pjtype and momenta \a pi and \a pj respectively passes the
* cuts. \a inci and \a inj indicates if the corresponding particles
* are incoming.
*/
virtual bool passCuts(tcCutsPtr parent, tcPDPtr pitype, tcPDPtr pjtype,
LorentzMomentum pi, LorentzMomentum pj,
bool inci = false, bool incj = false) const;
/**
* Return the minimum allowed squared invariant mass of two outgoing
* partons of type \a pi and \a pj.
*/
virtual Energy2 minSij(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the negative of the squared
* invariant mass of an incoming parton of type \a pi and an
* outgoing parton of type \a po.
*/
virtual Energy2 minTij(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of \f$\Delta
* R_{ij}=\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ of two
* outgoing partons of type \a pi and \a pj.
*/
virtual double minDeltaR(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the longitudinally invariant
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$\min(p_{\perp i}, p_{\perp
* j})\sqrt{\Delta\eta_{ij}^2+\Delta\phi_{ij}^2}\f$ for two outgoing
* partons, or simply \f$p_{\perp i}\f$ or \f$p_{\perp j}\f$ for a
* single outgoing parton. Returns 0 if both partons are incoming. A
* null pointer indicates an incoming parton, hence the type of the
* incoming parton is irrelevant.
*/
virtual Energy minKTClus(tcPDPtr , tcPDPtr ) const { return ZERO; }
/**
* Return the minimum allowed value of the Durham
* \f$k_\perp\f$-algorithms distance measure. This is defined as
* \f$2\min(E_j^2, E_j^2)(1-\cos\theta_{ij})/\hat{s}\f$ for two
* outgoing partons.
*/
virtual double minDurham(tcPDPtr , tcPDPtr ) const { return ZERO; }
//@}
/**
* Describe the currently active cuts in the log file.
*/
virtual void describe() const;
public:
// /**
// * Return the minimal allowed rapidity
// */
// double minRapidity() const { return theMinRapidity; }
//
// /**
// * Return the maximal allowed rapidity
// */
// double maxRapidity() const { return theMaxRapidity; }
/**
* Return the rapidity ranges.
*/
const vector<pair<double,double> >& yRanges() const { return theYRanges; }
/**
* Return whether cut acts on same-flavour fermions only
*/
bool sameFlavourOnly() const { return theSameFlavourOnly; }
/**
* Return whether cut acts on opposite-sign fermions only
*/
bool oppositeSignOnly() const { return theOppositeSignOnly; }
/**
* Return the matchers for a pair of particles to cut on.
* Only a pair of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::tptr firstMatcher() const { return theFirstMatcher; }
Ptr<MatcherBase>::tptr secondMatcher() const { return theSecondMatcher; }
protected:
/**
* Return the family of the given PDG id number.
*/
int family(long id) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Command to insert a rapidity range
*/
string doYRange(string);
/**
* The rapidity ranges.
*/
vector<pair<double,double> > theYRanges;
/**
* Whether to use pseudo rapidity instead of rapidity
*/
bool thePseudo;
/**
* Whether the cut is active on same-flavour fermions only
* (ignored for pairs not consisting of two fermions)
*/
bool theSameFlavourOnly;
/**
* Whether the cut is active on opposite-sign fermions only
* (ignored for pairs not consisting of two fermions)
*/
bool theOppositeSignOnly;
/**
* Matchers for a pair of particles to cut on. Only a pair
* of particles, matching these objects, will be affected.
*/
Ptr<MatcherBase>::ptr theFirstMatcher;
Ptr<MatcherBase>::ptr theSecondMatcher;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PairRapidityCut & operator=(const PairRapidityCut &);
+ PairRapidityCut & operator=(const PairRapidityCut &) = delete;
};
}
#endif /* Herwig_PairRapidityCut_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FFMggxDipole.h b/MatrixElement/Matchbox/Dipoles/FFMggxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FFMggxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FFMggxDipole.h
@@ -1,166 +1,166 @@
// -*- C++ -*-
//
// FFMggxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFMggxDipole_H
#define HERWIG_FFMggxDipole_H
//
// This is the declaration of the FFMggxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Martin Stoll
*
* \brief FFMggxDipole implements the D_{g,g;k} subtraction dipole.
*
*/
class FFMggxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMggxDipole();
/**
* The destructor.
*/
virtual ~FFMggxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return true; }
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMggxDipole & operator=(const FFMggxDipole &);
+ FFMggxDipole & operator=(const FFMggxDipole &) = delete;
};
}
#endif /* HERWIG_FFMggxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FFMqgxDipole.h b/MatrixElement/Matchbox/Dipoles/FFMqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FFMqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FFMqgxDipole.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
//
// FFMqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFMqgxDipole_H
#define HERWIG_FFMqgxDipole_H
//
// This is the declaration of the FFMqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Martin Stoll, Christian Reuschle
*
* \brief FFMqgxDipole implements the D_{Q,g;k} subtraction dipole,
* as well as the D_{gluino,g;k} subtraction dipole.
*
*/
class FFMqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMqgxDipole();
/**
* The destructor.
*/
virtual ~FFMqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 3;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMqgxDipole & operator=(const FFMqgxDipole &);
+ FFMqgxDipole & operator=(const FFMqgxDipole &) = delete;
};
}
#endif /* HERWIG_FFMqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FFMqqxDipole.h b/MatrixElement/Matchbox/Dipoles/FFMqqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FFMqqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FFMqqxDipole.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// FFMqqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFMqqxDipole_H
#define HERWIG_FFMqqxDipole_H
//
// This is the declaration of the FFMqqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Martin Stoll
*
* \brief FFMqqxDipole implements the D_{q,qbar;k} subtraction dipole.
*
*/
class FFMqqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMqqxDipole();
/**
* The destructor.
*/
virtual ~FFMqqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emitter]->id() + partons[emission]->id() == 0;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 1;}
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return true; }
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMqqxDipole & operator=(const FFMqqxDipole &);
+ FFMqqxDipole & operator=(const FFMqqxDipole &) = delete;
};
}
#endif /* HERWIG_FFMqqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FFMsqgxDipole.h b/MatrixElement/Matchbox/Dipoles/FFMsqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FFMsqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FFMsqgxDipole.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
//
// FFMsqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFMsqgxDipole_H
#define HERWIG_FFMsqgxDipole_H
//
// This is the declaration of the FFMsqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Alexandra Wilcock, Christian Reuschle
*
* \brief FFMsqgxDipole implements the D_{sq,g;k} subtraction dipole.
*
*/
class FFMsqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMsqgxDipole();
/**
* The destructor.
*/
virtual ~FFMsqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return
emitter > 1 &&
(abs(abs(partons[emitter]->id()) - 1000000) < 7 || abs(abs(partons[emitter]->id()) - 2000000) < 7);
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 3;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMsqgxDipole & operator=(const FFMsqgxDipole &);
+ FFMsqgxDipole & operator=(const FFMsqgxDipole &) = delete;
};
}
#endif /* HERWIG_FFMsqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FFggxDipole.h b/MatrixElement/Matchbox/Dipoles/FFggxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FFggxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FFggxDipole.h
@@ -1,167 +1,167 @@
// -*- C++ -*-
//
// FFggxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFggxDipole_H
#define HERWIG_FFggxDipole_H
//
// This is the declaration of the FFggxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FFggxDipole implements the D_{g,g;k} subtraction dipole.
*
*/
class FFggxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFggxDipole();
/**
* The destructor.
*/
virtual ~FFggxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return true; }
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFggxDipole & operator=(const FFggxDipole &);
+ FFggxDipole & operator=(const FFggxDipole &) = delete;
};
}
#endif /* HERWIG_FFggxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FFqgxDipole.h b/MatrixElement/Matchbox/Dipoles/FFqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FFqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FFqgxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// FFqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFqgxDipole_H
#define HERWIG_FFqgxDipole_H
//
// This is the declaration of the FFqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FFqgxDipole implements the D_{q,g;k} subtraction dipole.
*
*/
class FFqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFqgxDipole();
/**
* The destructor.
*/
virtual ~FFqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 3;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFqgxDipole & operator=(const FFqgxDipole &);
+ FFqgxDipole & operator=(const FFqgxDipole &) = delete;
};
}
#endif /* HERWIG_FFqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FFqqxDipole.h b/MatrixElement/Matchbox/Dipoles/FFqqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FFqqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FFqqxDipole.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// FFqqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFqqxDipole_H
#define HERWIG_FFqqxDipole_H
//
// This is the declaration of the FFqqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FFqqxDipole implements the D_{q,qbar;k} subtraction dipole.
*
*/
class FFqqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFqqxDipole();
/**
* The destructor.
*/
virtual ~FFqqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emitter]->id() + partons[emission]->id() == 0;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 1;}
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return true; }
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFqqxDipole & operator=(const FFqqxDipole &);
+ FFqqxDipole & operator=(const FFqqxDipole &) = delete;
};
}
#endif /* HERWIG_FFqqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FIMqgxDipole.h b/MatrixElement/Matchbox/Dipoles/FIMqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FIMqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FIMqgxDipole.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
//
// FIMqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIMqgxDipole_H
#define HERWIG_FIMqgxDipole_H
//
// This is the declaration of the FIMqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Chrstian Reuschle
*
* \brief FIMqgxDipole implements the D_{Q,g}^a subtraction dipole,
* as well as the D_{gluino,g}^a subtraction dipole.
*
*/
class FIMqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMqgxDipole();
/**
* The destructor.
*/
virtual ~FIMqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 3;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMqgxDipole & operator=(const FIMqgxDipole &);
+ FIMqgxDipole & operator=(const FIMqgxDipole &) = delete;
};
}
#endif /* HERWIG_FIMqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FIMqqxDipole.h b/MatrixElement/Matchbox/Dipoles/FIMqqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FIMqqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FIMqqxDipole.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// FIMqqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIMqqxDipole_H
#define HERWIG_FIMqqxDipole_H
//
// This is the declaration of the FIMqqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FIMqqxDipole implements the D_{q,qbar}^a subtraction dipole.
*
*/
class FIMqqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMqqxDipole();
/**
* The destructor.
*/
virtual ~FIMqqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emitter]->id() + partons[emission]->id() == 0;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 1;}
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return true; }
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMqqxDipole & operator=(const FIMqqxDipole &);
+ FIMqqxDipole & operator=(const FIMqqxDipole &) = delete;
};
}
#endif /* HERWIG_FIMqqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FIMsqgxDipole.h b/MatrixElement/Matchbox/Dipoles/FIMsqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FIMsqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FIMsqgxDipole.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
//
// FIMsqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIMsqgxDipole_H
#define HERWIG_FIMsqgxDipole_H
//
// This is the declaration of the FIMsqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Alexandra Wilcock, Christian Reuschle
*
* \brief FIMsqgxDipole implements the D_{sq,g}^a subtraction dipole.
*
*/
class FIMsqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMsqgxDipole();
/**
* The destructor.
*/
virtual ~FIMsqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return
emitter > 1 &&
(abs(abs(partons[emitter]->id()) - 1000000) < 7 || abs(abs(partons[emitter]->id()) - 2000000) < 7);
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 3;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMsqgxDipole & operator=(const FIMsqgxDipole &);
+ FIMsqgxDipole & operator=(const FIMsqgxDipole &) = delete;
};
}
#endif /* HERWIG_FIMsqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FIggxDipole.h b/MatrixElement/Matchbox/Dipoles/FIggxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FIggxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FIggxDipole.h
@@ -1,166 +1,166 @@
// -*- C++ -*-
//
// FIggxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIggxDipole_H
#define HERWIG_FIggxDipole_H
//
// This is the declaration of the FIggxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FIggxDipole implements the D_{g,g}^a subtraction dipole.
*
*/
class FIggxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIggxDipole();
/**
* The destructor.
*/
virtual ~FIggxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return true; }
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIggxDipole & operator=(const FIggxDipole &);
+ FIggxDipole & operator=(const FIggxDipole &) = delete;
};
}
#endif /* HERWIG_FIggxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FIqgxDipole.h b/MatrixElement/Matchbox/Dipoles/FIqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FIqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FIqgxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// FIqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIqgxDipole_H
#define HERWIG_FIqgxDipole_H
//
// This is the declaration of the FIqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FIqgxDipole implements the D_{q,g}^a subtraction dipole.
*
*/
class FIqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIqgxDipole();
/**
* The destructor.
*/
virtual ~FIqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 3;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIqgxDipole & operator=(const FIqgxDipole &);
+ FIqgxDipole & operator=(const FIqgxDipole &) = delete;
};
}
#endif /* HERWIG_FIqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/FIqqxDipole.h b/MatrixElement/Matchbox/Dipoles/FIqqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/FIqqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/FIqqxDipole.h
@@ -1,168 +1,168 @@
// -*- C++ -*-
//
// FIqqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIqqxDipole_H
#define HERWIG_FIqqxDipole_H
//
// This is the declaration of the FIqqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FIqqxDipole implements the D_{q,qbar}^a subtraction dipole.
*
*/
class FIqqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIqqxDipole();
/**
* The destructor.
*/
virtual ~FIqqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter > 1 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emitter]->id() + partons[emission]->id() == 0;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 1;}
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return true; }
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIqqxDipole & operator=(const FIqqxDipole &);
+ FIqqxDipole & operator=(const FIqqxDipole &) = delete;
};
}
#endif /* HERWIG_FIqqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFMggxDipole.h b/MatrixElement/Matchbox/Dipoles/IFMggxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFMggxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFMggxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IFMggxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFMggxDipole_H
#define HERWIG_IFMggxDipole_H
//
// This is the declaration of the IFMggxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFMggxDipole implements the D^{g,g}_k subtraction dipole.
*
*/
class IFMggxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMggxDipole();
/**
* The destructor.
*/
virtual ~IFMggxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMggxDipole & operator=(const IFMggxDipole &);
+ IFMggxDipole & operator=(const IFMggxDipole &) = delete;
};
}
#endif /* HERWIG_IFMggxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFMgqxDipole.h b/MatrixElement/Matchbox/Dipoles/IFMgqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFMgqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFMgqxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IFMgqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFMgqxDipole_H
#define HERWIG_IFMgqxDipole_H
//
// This is the declaration of the IFMgqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFMgqxDipole implements the D_k^{g,q} subtraction dipole.
*
*/
class IFMgqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMgqxDipole();
/**
* The destructor.
*/
virtual ~IFMgqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && abs(partons[emission]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 2;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMgqxDipole & operator=(const IFMgqxDipole &);
+ IFMgqxDipole & operator=(const IFMgqxDipole &) = delete;
};
}
#endif /* HERWIG_IFMgqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFMqgxDipole.h b/MatrixElement/Matchbox/Dipoles/IFMqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFMqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFMqgxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IFMqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFMqgxDipole_H
#define HERWIG_IFMqgxDipole_H
//
// This is the declaration of the IFMqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFMqgxDipole implements the D^{q,g}_k subtraction dipole
*
*/
class IFMqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMqgxDipole();
/**
* The destructor.
*/
virtual ~IFMqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMqgxDipole & operator=(const IFMqgxDipole &);
+ IFMqgxDipole & operator=(const IFMqgxDipole &) = delete;
};
}
#endif /* HERWIG_IFMqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFMqqxDipole.h b/MatrixElement/Matchbox/Dipoles/IFMqqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFMqqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFMqqxDipole.h
@@ -1,162 +1,162 @@
// -*- C++ -*-
//
// IFMqqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFMqqxDipole_H
#define HERWIG_IFMqqxDipole_H
//
// This is the declaration of the IFMqqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFMqqxDipole implements the D^{q,qbar}_k subtraction dipole.
*
*/
class IFMqqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMqqxDipole();
/**
* The destructor.
*/
virtual ~IFMqqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emitter]->id() == partons[emission]->id();
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 2;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMqqxDipole & operator=(const IFMqqxDipole &);
+ IFMqqxDipole & operator=(const IFMqqxDipole &) = delete;
};
}
#endif /* HERWIG_IFMqqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFggxDipole.h b/MatrixElement/Matchbox/Dipoles/IFggxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFggxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFggxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IFggxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFggxDipole_H
#define HERWIG_IFggxDipole_H
//
// This is the declaration of the IFggxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFggxDipole implements the D^{g,g}_k subtraction dipole.
*
*/
class IFggxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFggxDipole();
/**
* The destructor.
*/
virtual ~IFggxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFggxDipole & operator=(const IFggxDipole &);
+ IFggxDipole & operator=(const IFggxDipole &) = delete;
};
}
#endif /* HERWIG_IFggxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFgqxDipole.h b/MatrixElement/Matchbox/Dipoles/IFgqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFgqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFgqxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IFgqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFgqxDipole_H
#define HERWIG_IFgqxDipole_H
//
// This is the declaration of the IFgqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFgqxDipole implements the D_k^{g,q} subtraction dipole.
*
*/
class IFgqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFgqxDipole();
/**
* The destructor.
*/
virtual ~IFgqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && abs(partons[emission]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 2;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFgqxDipole & operator=(const IFgqxDipole &);
+ IFgqxDipole & operator=(const IFgqxDipole &) = delete;
};
}
#endif /* HERWIG_IFgqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFqgxDipole.h b/MatrixElement/Matchbox/Dipoles/IFqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFqgxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IFqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFqgxDipole_H
#define HERWIG_IFqgxDipole_H
//
// This is the declaration of the IFqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFqgxDipole implements the D^{q,g}_k subtraction dipole
*
*/
class IFqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFqgxDipole();
/**
* The destructor.
*/
virtual ~IFqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFqgxDipole & operator=(const IFqgxDipole &);
+ IFqgxDipole & operator=(const IFqgxDipole &) = delete;
};
}
#endif /* HERWIG_IFqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IFqqxDipole.h b/MatrixElement/Matchbox/Dipoles/IFqqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IFqqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IFqqxDipole.h
@@ -1,162 +1,162 @@
// -*- C++ -*-
//
// IFqqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFqqxDipole_H
#define HERWIG_IFqqxDipole_H
//
// This is the declaration of the IFqqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFqqxDipole implements the D^{q,qbar}_k subtraction dipole.
*
*/
class IFqqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFqqxDipole();
/**
* The destructor.
*/
virtual ~IFqqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emitter]->id() == partons[emission]->id();
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator > 1 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 2;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFqqxDipole & operator=(const IFqqxDipole &);
+ IFqqxDipole & operator=(const IFqqxDipole &) = delete;
};
}
#endif /* HERWIG_IFqqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IIggxDipole.h b/MatrixElement/Matchbox/Dipoles/IIggxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IIggxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IIggxDipole.h
@@ -1,159 +1,159 @@
// -*- C++ -*-
//
// IIggxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IIggxDipole_H
#define HERWIG_IIggxDipole_H
//
// This is the declaration of the IIggxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IIggxDipole implements the D^{g,g;b} subtraction dipole.
*
*/
class IIggxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIggxDipole();
/**
* The destructor.
*/
virtual ~IIggxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIggxDipole & operator=(const IIggxDipole &);
+ IIggxDipole & operator=(const IIggxDipole &) = delete;
};
}
#endif /* HERWIG_IIggxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IIgqxDipole.h b/MatrixElement/Matchbox/Dipoles/IIgqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IIgqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IIgqxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IIgqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IIgqxDipole_H
#define HERWIG_IIgqxDipole_H
//
// This is the declaration of the IIgqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IIgqxDipole implements the D^{g,q,k} subtraction dipole
*
*/
class IIgqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIgqxDipole();
/**
* The destructor.
*/
virtual ~IIgqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && partons[emitter]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && abs(partons[emission]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
* N.B. not the perturbative result chosen to improve sampling
*/
virtual int samplingZ() const {return 2;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIgqxDipole & operator=(const IIgqxDipole &);
+ IIgqxDipole & operator=(const IIgqxDipole &) = delete;
};
}
#endif /* HERWIG_IIgqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IIqgxDipole.h b/MatrixElement/Matchbox/Dipoles/IIqgxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IIqgxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IIqgxDipole.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// IIqgxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IIqgxDipole_H
#define HERWIG_IIqgxDipole_H
//
// This is the declaration of the IIqgxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IIqgxDipole implements the D^{q,g;b} subtraction dipole
*
*/
class IIqgxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIqgxDipole();
/**
* The destructor.
*/
virtual ~IIqgxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return canHandleEmitter(partons,emitter) && partons[emission]->id() == ParticleID::g;
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIqgxDipole & operator=(const IIqgxDipole &);
+ IIqgxDipole & operator=(const IIqgxDipole &) = delete;
};
}
#endif /* HERWIG_IIqgxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/IIqqxDipole.h b/MatrixElement/Matchbox/Dipoles/IIqqxDipole.h
--- a/MatrixElement/Matchbox/Dipoles/IIqqxDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/IIqqxDipole.h
@@ -1,162 +1,162 @@
// -*- C++ -*-
//
// IIqqxDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IIqqxDipole_H
#define HERWIG_IIqqxDipole_H
//
// This is the declaration of the IIqqxDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IIqqxDipole implements the D^{q,qbar;b} subtraction dipole.
*
*/
class IIqqxDipole: public SubtractionDipole {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIqqxDipole();
/**
* The destructor.
*/
virtual ~IIqqxDipole();
//@}
public:
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const {
return emitter < 2 && abs(partons[emitter]->id()) < 7;
}
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const {
return
canHandleEmitter(partons,emitter) &&
partons[emitter]->id() == partons[emission]->id();
}
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const {
return spectator < 2 && partons[spectator]->coloured();
}
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const;
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 2;}
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
*/
virtual double me2() const;
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIqqxDipole & operator=(const IIqqxDipole &);
+ IIqqxDipole & operator=(const IIqqxDipole &) = delete;
};
}
#endif /* HERWIG_IIqqxDipole_H */
diff --git a/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h b/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h
--- a/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h
+++ b/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h
@@ -1,1255 +1,1255 @@
// -*- C++ -*-
//
// SubtractionDipole.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SubtractionDipole_H
#define HERWIG_SubtractionDipole_H
//
// This is the declaration of the SubtractionDipole class.
//
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.fh"
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.fh"
#include "ThePEG/MatrixElement/MEBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief SubtractionDipole represents a dipole subtraction
* term in the formalism of Catani and Seymour.
*
*/
class SubtractionDipole:
public MEBase, public LastMatchboxXCombInfo {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
SubtractionDipole();
/**
* The destructor.
*/
virtual ~SubtractionDipole();
//@}
public:
/**
* Return the factory which produced this matrix element
*/
Ptr<MatchboxFactory>::tptr factory() const;
/** @name Subprocess and diagram information. */
//@{
/**
* A helpre struct to communicate diagram merging and remapping
* information
*/
struct MergeInfo {
/**
* The merged emitter
*/
int emitter;
/**
* The Born diagram
*/
Ptr<Tree2toNDiagram>::ptr diagram;
/**
* The merging map
*/
map<int,int> mergeLegs;
};
/**
* Return true, if this dipole can possibly handle the indicated
* emitter.
*/
virtual bool canHandleEmitter(const cPDVector& partons, int emitter) const = 0;
/**
* Return true, if this dipole can possibly handle the indicated
* splitting.
*/
virtual bool canHandleSplitting(const cPDVector& partons, int emitter, int emission) const = 0;
/**
* Return true, if this dipole can possibly handle the indicated
* spectator.
*/
virtual bool canHandleSpectator(const cPDVector& partons, int spectator) const = 0;
/**
* Return true, if this dipole applies to the selected
* configuration.
*/
virtual bool canHandle(const cPDVector& partons,
int emitter, int emission, int spectator) const = 0;
/**
* Return true, if this dipole is symmetric with respect to emitter
* and emission.
*/
virtual bool isSymmetric() const { return false; }
/**
* If this is a dependent matrix element in a ME group, return true,
* if it applies to the process set in lastXComb()
*/
virtual bool apply() const { return theApply; }
/**
* Clear the bookkeeping
*/
void clearBookkeeping();
/**
* Setup bookkeeping maps.
*/
void setupBookkeeping(const map<Ptr<DiagramBase>::ptr,MergeInfo>& mergeInfo,bool slim);
/**
* Get bookkeeping information for the given
* real emission diagram
*/
void subtractionBookkeeping();
/**
* Determine bookkeeping information for
* the underlying Born process supplied through
* the lastHeadXComb() object.
*/
void splittingBookkeeping();
/**
* For the given event generation setup return a xcomb object
* appropriate to this matrix element.
*/
virtual StdXCombPtr makeXComb(Energy newMaxEnergy, const cPDPair & inc,
tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
const PBPair & newPartonBins, tCutsPtr newCuts,
const DiagramVector & newDiagrams, bool mir,
const PartonPairVec& allPBins,
tStdXCombPtr newHead = tStdXCombPtr(),
tMEPtr newME = tMEPtr());
/**
* For the given event generation setup return a dependent xcomb object
* appropriate to this matrix element.
*/
virtual StdXCombPtr makeXComb(tStdXCombPtr newHead,
const PBPair & newPartonBins,
const DiagramVector & newDiagrams,
tMEPtr newME = tMEPtr());
/**
* Create a dependent xcomb object for the underlying
* Born process, given a XComb driving the real emission
*/
StdXCombPtr makeBornXComb(tStdXCombPtr realXC);
/**
* Create dependent xcomb objects for the real emission process,
* given a XComb driving the underlying Born
*/
vector<StdXCombPtr> makeRealXCombs(tStdXCombPtr bornXC);
/**
* Return true, if bookkeeping did not find a non-trivial setup.
*/
bool empty() const { return theSplittingMap.empty()&&theMergingMap.empty(); }
/**
* Return the emitter as referred to by the real emission
* matrix element.
*/
int realEmitter() const { return theRealEmitter; }
/**
* Set the emitter as referred to by the real emission
* matrix element.
*/
void realEmitter(int id) { theRealEmitter = id; }
/**
* Return the emission as referred to by the real emission
* matrix element.
*/
int realEmission() const { return theRealEmission; }
/**
* Set the emission as referred to by the real emission
* matrix element.
*/
void realEmission(int id) { theRealEmission = id; }
/**
* Return the spectator as referred to by the real emission
* matrix element.
*/
int realSpectator() const { return theRealSpectator; }
/**
* Set the spectator as referred to by the real emission
* matrix element.
*/
void realSpectator(int id) { theRealSpectator = id; }
/**
* Return the emitter as referred to by the underlying
* Born process.
*/
int bornEmitter() const { return theBornEmitter; }
/**
* Set the emitter as referred to by the underlying
* Born process.
*/
void bornEmitter(int id) { theBornEmitter = id; }
/**
* Return the spectator as referred to by the underlying
* Born process.
*/
int bornSpectator() const { return theBornSpectator; }
/**
* Set the spectator as referred to by the underlying
* Born process.
*/
void bornSpectator(int id) { theBornSpectator = id; }
/**
* Define the real emission key type
*/
typedef pair<pair<cPDVector,int>,pair<int,int> > RealEmissionKey;
/**
* Create a real emission key
*/
static RealEmissionKey realEmissionKey(const cPDVector& proc,
int em, int emm, int sp) {
return make_pair(make_pair(proc,emm),make_pair(em,sp));
}
/**
* Return the diagram of a real emission key
*/
static const cPDVector& process(const RealEmissionKey& key) {
return key.first.first;
}
/**
* Return the emission id of a real emission key
*/
static int emission(const RealEmissionKey& key) {
return key.first.second;
}
/**
* Return the emitter id of a real emission key
*/
static int emitter(const RealEmissionKey& key) {
return key.second.first;
}
/**
* Return the spectator id of a real emission key
*/
static int spectator(const RealEmissionKey& key) {
return key.second.second;
}
/**
* Define the underlying Born key type
*/
typedef pair<cPDVector,pair<int,int> > UnderlyingBornKey;
/**
* Create a underlying Born key
*/
static UnderlyingBornKey underlyingBornKey(const cPDVector& proc,
int em, int sp) {
return make_pair(proc,make_pair(em,sp));
}
/**
* Return the diagram of a underlying Born key
*/
static const cPDVector& process(const UnderlyingBornKey& key) {
return key.first;
}
/**
* Return the emitter id of a underlying Born key
*/
static int emitter(const UnderlyingBornKey& key) {
return key.second.first;
}
/**
* Return the spectator id of a underlying Born key
*/
static int spectator(const UnderlyingBornKey& key) {
return key.second.second;
}
/**
* Define real emission key and index dictionary
* for partons not involved in the given dipole.
*/
typedef pair<RealEmissionKey,map<int,int> > RealEmissionInfo;
/**
* Define underlying Born key and index dictionary
* for partons not involved in the given dipole.
*/
typedef pair<UnderlyingBornKey,map<int,int> > UnderlyingBornInfo;
/**
* Return the merging map
*/
const map<RealEmissionKey,UnderlyingBornInfo>& mergingMap() const { return theMergingMap; }
/**
* Return the splitting map
*/
const multimap<UnderlyingBornKey,RealEmissionInfo>& splittingMap() const { return theSplittingMap; }
/**
* Return the underlying Born diagrams to be considered
* for the given real emission process.
*/
const DiagramVector& underlyingBornDiagrams(const cPDVector& real) const;
/**
* Find the underlying Born diagram for the given real emission diagram
*/
tcDiagPtr underlyingBornDiagram(tcDiagPtr realDiag) const;
/**
* Return the real emission diagrams to be considered
* for the given Born process.
*/
const DiagramVector& realEmissionDiagrams(const cPDVector& born) const;
/**
* Find the real emission diagram for the given underlying Born diagram
*/
tcDiagPtr realEmissionDiagram(tcDiagPtr bornDiag) const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Return true, if this matrix element does not want to
* make use of mirroring processes; in this case all
* possible partonic subprocesses with a fixed assignment
* of incoming particles need to be provided through the diagrams
* added with the add(...) method.
*/
virtual bool noMirror () const { return true; }
/**
* With the information previously supplied with the
* setKinematics(...) method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* Select a ColpurLines geometry. The default version returns a
* colour geometry selected among the ones returned from
* colourGeometries(tcDiagPtr).
*/
virtual const ColourLines &
selectColourGeometry(tcDiagPtr diag) const;
/**
* Return the order in \f$\alpha_S\f$ in which this matrix element
* is given.
*/
virtual unsigned int orderInAlphaS() const { return realEmissionME()->orderInAlphaS(); }
/**
* Return the order in \f$\alpha_{EM}\f$ in which this matrix
* element is given. Returns 0.
*/
virtual unsigned int orderInAlphaEW() const { return underlyingBornME()->orderInAlphaEW(); }
//@}
/** @name Phasespace generation */
//@{
/**
* Set the XComb object to be used in the next call to
* generateKinematics() and dSigHatDR().
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Set the typed and momenta of the incoming and outgoing partons to
* be used in subsequent calls to me() and colourGeometries()
* according to the associated XComb object. If the function is
* overridden in a sub class the new function must call the base
* class one first.
*/
virtual void setKinematics();
/**
* Generate internal degrees of freedom given nDim() uniform random
* numbers in the interval ]0,1[. To help the phase space generator,
* the 'dSigHatDR' should be a smooth function of these numbers,
* although this is not strictly necessary. The return value should
* be true of the generation succeeded. If so the generated momenta
* should be stored in the meMomenta() vector.
*/
virtual bool generateKinematics(const double * r);
/**
* The number of internal degreed of freedom used in the matrix
* element. This default version returns 0;
*/
virtual int nDim() const;
/**
* Return true, if this matrix element expects
* the incoming partons in their center-of-mass system
*/
virtual bool wantCMS () const { return realEmissionME()->wantCMS(); }
/**
* Clear the information previously provided by a call to
* setKinematics(...).
*/
virtual void clearKinematics();
/**
* If this is a dependent matrix element in a ME group, return true,
* if cuts should be ignored.
*/
virtual bool ignoreCuts() const { return theIgnoreCuts; }
/**
* Indicate that cuts should be ignored
*/
void doIgnoreCuts(bool is = true) { theIgnoreCuts = is; }
//@}
/** @name Tilde kinematics */
//@{
/**
* Return the TildeKinematics object used
*/
Ptr<TildeKinematics>::tcptr tildeKinematics() const { return theTildeKinematics; }
/**
* Set the TildeKinematics object used
*/
void tildeKinematics(Ptr<TildeKinematics>::tptr);
/**
* Generate the tilde kinematics from real emission
* kinematics accessible through the XComb's
* head object and store it in meMomenta(). This default
* implemenation uses the tildeKinematics() object.
*/
virtual bool generateTildeKinematics();
/**
* Return the InvertedTildeKinematics object used
*/
Ptr<InvertedTildeKinematics>::tcptr invertedTildeKinematics() const { return theInvertedTildeKinematics; }
/**
* Set the InvertedTildeKinematics object used
*/
void invertedTildeKinematics(Ptr<InvertedTildeKinematics>::tptr);
/**
* Return the number of additional random numbers
* needed to generate real emission kinematics off
* the tilde kinematics previously supplied through
* the XComb object. This default implementation
* returns invertedTildeKinematics()->nDimRadiation()
*/
virtual int nDimRadiation() const;
/**
* Generate the real emission kinematics
* off the Born kinematics accessible through the XComb's
* head object and store it in meMomenta(); store
* the single particle phasespace in units of lastHeadXComb()->lastSHat()
* in jacobian(). This default
* implemenation uses the invertedTildeKinematics() object
*/
virtual bool generateRadiationKinematics(const double *);
/**
* Set a pt cut when splitting
*/
void ptCut(Energy cut);
/**
* Return the relevant dipole scale
*/
Energy lastDipoleScale() const {
return splitting() ? theLastSplittingScale : theLastSubtractionScale;
}
/**
* Return the relevant pt
*/
Energy lastPt() const {
return splitting() ? theLastSplittingPt : theLastSubtractionPt;
}
/**
* Return the relevant momentum fractions
*/
double lastZ() const {
return splitting() ? theLastSplittingZ : theLastSubtractionZ;
}
/**
* Return true, if this dipole acts in splitting mode.
*/
bool splitting() const { return theSplitting; }
/**
* Switch on splitting mode for this dipole.
*/
void doSplitting() { theSplitting = true; }
/**
* Switch off splitting mode for this dipole.
*/
void doSubtraction() { theSplitting = false; }
/**
* Return the subtraction parameters.
*/
const vector<double>& subtractionParameters() const { return theSubtractionParameters; }
/**
* Access the subtraction parameters.
*/
vector<double>& subtractionParameters() { return theSubtractionParameters; }
/**
* Return the shower hard scale encountered
*/
Energy showerHardScale() const { return theShowerHardScale; }
/**
* Set the shower hard scale encountered
*/
void showerHardScale(Energy s) { theShowerHardScale = s; }
/**
* Return the shower evolution scale encountered
*/
Energy showerScale() const { return theShowerScale; }
/**
* Set the shower evolution scale encountered
*/
void showerScale(Energy s) { theShowerScale = s; }
/**
* Return the shower splitting variables encountered
*/
const vector<double>& showerParameters() const { return theShowerParameters; }
/**
* Access the shower splitting variables encountered
*/
vector<double>& showerParameters() { return theShowerParameters; }
/**
* Return true, if this configuration is in the shower phase space
*/
bool isInShowerPhasespace() const { return theIsInShowerPhasespace; }
/**
* Indicate whether this configuration is in the shower phase space
*/
void isInShowerPhasespace(bool yes) { theIsInShowerPhasespace = yes; }
/**
* Return true, if this configuration is above the shower infrared cutoff
*/
bool isAboveCutoff() const { return theIsAboveCutoff; }
/**
* Indicate whether this configuration is above the shower infrared cutoff
*/
void isAboveCutoff(bool yes) { theIsAboveCutoff = yes; }
//@}
/** @name Scale choices, couplings and PDFs */
//@{
/**
* Return true, if scales should be calculated from real emission kinematics
*/
bool realEmissionScales() const { return theRealEmissionScales; }
/**
* Switch on or off that scales should be calculated from real emission kinematics
*/
void doRealEmissionScales(bool on = true) { theRealEmissionScales = on; }
/**
* Return the scale associated with the phase space point provided
* by the last call to setKinematics().
*/
virtual Energy2 scale() const {
return realEmissionScales() ?
realEmissionME()->scale() :
underlyingBornME()->scale();
}
/**
* Return the value of \f$\alpha_S\f$ associated with the phase
* space point provided by the last call to setKinematics(). This
* versions returns SM().alphaS(scale()).
*/
virtual double alphaS() const {
return realEmissionScales() ?
realEmissionME()->alphaS() :
underlyingBornME()->alphaS();
}
/**
* Return the value of \f$\alpha_EM\f$ associated with the phase
* space point provided by the last call to setKinematics(). This
* versions returns SM().alphaEM(scale()).
*/
virtual double alphaEM() const {
return realEmissionScales() ?
realEmissionME()->alphaEM() :
underlyingBornME()->alphaEM();
}
/**
* Return true, if this matrix element provides the PDF
* weight for the first incoming parton itself.
*/
virtual bool havePDFWeight1() const { return realEmissionME()->havePDFWeight1(); }
/**
* Return true, if this matrix element provides the PDF
* weight for the second incoming parton itself.
*/
virtual bool havePDFWeight2() const { return realEmissionME()->havePDFWeight2(); }
/**
* How to sample the z-distribution.
* FlatZ = 1
* OneOverZ = 2
* OneOverOneMinusZ = 3
* OneOverZOneMinusZ = 4
*/
virtual int samplingZ() const {return 4;}
//@}
/** @name Matrix elements and evaluation */
//@{
/**
* Return the real emission matrix element
*/
Ptr<MatchboxMEBase>::tcptr realEmissionME() const {
return theRealEmissionME;
}
/**
* Return the real emission matrix element
*/
Ptr<MatchboxMEBase>::tptr realEmissionME() {
return theRealEmissionME;
}
/**
* Set the real emission matrix element
*/
void realEmissionME(Ptr<MatchboxMEBase>::tptr me) { theRealEmissionME = me; }
/**
* Return the underlying Born matrix element
*/
Ptr<MatchboxMEBase>::tcptr underlyingBornME() const {
return theUnderlyingBornME;
}
/**
* Return the underlying Born matrix element
*/
Ptr<MatchboxMEBase>::tptr underlyingBornME() {
return theUnderlyingBornME;
}
/**
* Set the underlying Born matrix element
*/
void underlyingBornME(Ptr<MatchboxMEBase>::tptr me) { theUnderlyingBornME = me; }
/**
* Set the dipoles which have been found along with this dipole
*/
void partnerDipoles(const vector<Ptr<SubtractionDipole>::tptr>& p) {
thePartners = p;
}
/**
* Return the dipoles which have been found along with this dipole
*/
const vector<Ptr<SubtractionDipole>::tptr>& partnerDipoles() const {
return thePartners;
}
/**
* Return the matrix element averaged over spin correlations.
*/
virtual double me2Avg(double ccme2) const = 0;
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR(Energy2 factorizationScale) const;
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const { return dSigHatDR(ZERO); }
/// calculate the general prefactor for merging.
CrossSection prefactor(Energy2 factorizationScale)const;
/**
* Calculate the parton shower approximation for this dipole.
**/
CrossSection ps(Energy2 factorizationScale,Ptr<ColourBasis>::tptr largeNBasis) const;
/**
* Calculate the dipole with clusterfsafe flag.
**/
CrossSection dip(Energy2 factorizationScale) const;
/**
* Calculate the dipole dSigDR and the parton shower approximation for this dipole.
**/
pair<CrossSection,CrossSection> dipandPs(Energy2 factorizationScale,Ptr<ColourBasis>::tptr largeNBasis) const;
//@}
/** @name Methods relevant to matching */
//@{
/**
* Set the shower approximation.
*/
void showerApproximation(Ptr<ShowerApproximation>::tptr app) {
theShowerApproximation = app;
}
/**
* Return the shower approximation.
*/
Ptr<ShowerApproximation>::tptr showerApproximation() const { return theShowerApproximation; }
/**
* Indicate that the shower real emission contribution should be subtracted.
*/
void doRealShowerSubtraction() { theRealShowerSubtraction = true; }
/**
* Return true, if the shower real emission contribution should be subtracted.
*/
bool realShowerSubtraction() const { return theRealShowerSubtraction; }
/**
* Indicate that the shower virtual contribution should be subtracted.
*/
void doVirtualShowerSubtraction() { theVirtualShowerSubtraction = true; }
/**
* Return true, if the shower virtual contribution should be subtracted.
*/
bool virtualShowerSubtraction() const { return theVirtualShowerSubtraction; }
/**
* Indicate that the loopsim matched virtual contribution should be subtracted.
*/
void doLoopSimSubtraction() { theLoopSimSubtraction = true; }
/**
* Return true, if the loopsim matched virtual contribution should be subtracted.
*/
bool loopSimSubtraction() const { return theLoopSimSubtraction; }
//@}
/** @name Caching and diagnostic information */
//@{
/**
* Inform this matrix element that a new phase space
* point is about to be generated, so all caches should
* be flushed.
*/
virtual void flushCaches();
/**
* Indicate that the subtraction is being tested.
*/
void doTestSubtraction() { theSubtractionTest = true; }
/**
* Return true, if the subtraction is being tested.
*/
bool testSubtraction() const { return theSubtractionTest; }
/**
* Return true, if verbose
*/
bool verbose() const { return realEmissionME()->verbose() || underlyingBornME()->verbose(); }
/**
* Dump the setup to an ostream
*/
void print(ostream&) const;
/**
* Print debug information on the last event
*/
virtual void printLastEvent(ostream&) const;
/**
* Write out diagnostic information for
* generateTildeKinematics
*/
void logGenerateTildeKinematics() const;
/**
* Write out diagnostic information for
* generateRadiationKinematics
*/
void logGenerateRadiationKinematics(const double * r) const;
/**
* Write out diagnostic information for
* me2 evaluation
*/
void logME2() const;
/**
* Write out diagnostic information
* for dsigdr evaluation
*/
void logDSigHatDR(double effectiveJac) const;
//@}
/** @name Reweight objects */
//@{
/**
* Insert a reweight object
*/
void addReweight(Ptr<MatchboxReweightBase>::ptr rw) { theReweights.push_back(rw); }
/**
* Return the reweight objects
*/
const vector<Ptr<MatchboxReweightBase>::ptr>& reweights() const { return theReweights; }
/**
* Access the reweight objects
*/
vector<Ptr<MatchboxReweightBase>::ptr>& reweights() { return theReweights; }
//@}
/** @name Methods used to setup SubtractionDipole objects */
//@{
/**
* Clone this dipole.
*/
Ptr<SubtractionDipole>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<SubtractionDipole>::ptr>(clone());
}
/**
* Clone the dependencies, using a given prefix.
*/
void cloneDependencies(const std::string& prefix = "", bool slim=false);
//@}
/** @name Methods required to setup the event record */
//@{
/**
* construct the spin information for the interaction
*/
virtual void constructVertex(tSubProPtr sub);
/**
* construct the spin information for the interaction
*/
virtual void constructVertex(tSubProPtr sub, const ColourLines* cl);
/**
* Comlete a SubProcess object using the internal degrees of freedom
* generated in the last generateKinematics() (and possible other
* degrees of freedom which was intergated over in dSigHatDR(). This
* default version does nothing. Will be made purely virtual in the
* future.
*/
virtual void generateSubCollision(SubProcess & sub);
/**
* Alpha parameter as in Nagy
* (http://arxiv.org/pdf/hep-ph/0307268v2.pdf) to restrict dipole
* phase space
*/
double alpha() const;
/*
* True if phase space point is above the alpha cut for this dipole.
*/
bool aboveAlpha() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* Wether or not this dipole acts in splitting mode.
*/
bool theSplitting;
/**
* True, if should apply to process in the xcomb.
*/
bool theApply;
/**
* True, if the subtraction is being tested.
*/
bool theSubtractionTest;
/**
* True if cuts should be ignored
*/
bool theIgnoreCuts;
/**
* The real emission matrix element to be considered
*/
Ptr<MatchboxMEBase>::ptr theRealEmissionME;
/**
* The underlying Born matrix element
*/
Ptr<MatchboxMEBase>::ptr theUnderlyingBornME;
/**
* The dipoles which have been found along with this dipole
*/
vector<Ptr<SubtractionDipole>::tptr> thePartners;
/**
* The TildeKinematics to be used.
*/
Ptr<TildeKinematics>::ptr theTildeKinematics;
/**
* The InvertedTildeKinematics to be used.
*/
Ptr<InvertedTildeKinematics>::ptr theInvertedTildeKinematics;
/**
* A vector of reweight objects the sum of which
* should be applied to reweight this dipole
*/
vector<Ptr<MatchboxReweightBase>::ptr> theReweights;
/**
* The emitter as referred to by the real emission
* matrix element.
*/
int theRealEmitter;
/**
* The emission as referred to by the real emission
* matrix element.
*/
int theRealEmission;
/**
* The spectator as referred to by the real emission
* matrix element.
*/
int theRealSpectator;
/**
* The subtraction parameters
*/
vector<double> theSubtractionParameters;
/**
* Map real emission diagrams to underlying Born diagrams
* and tilde emitter/spectator.
*/
map<RealEmissionKey,UnderlyingBornInfo> theMergingMap;
/**
* Map underlying Born diagrams and tilde emitter/spectator
* to real emission diagram containing the splitting.
*/
multimap<UnderlyingBornKey,RealEmissionInfo> theSplittingMap;
/**
* Map underlying Born diagrams to emitter/spectator pairs
*/
map<cPDVector,pair<int,int> > theIndexMap;
/**
* Map real emission processes to Born diagrams
*/
map<cPDVector,DiagramVector> theUnderlyingBornDiagrams;
/**
* Map Born processes to real emission diagrams
*/
map<cPDVector,DiagramVector> theRealEmissionDiagrams;
/**
* Map underlying Born diagrams to real emission diagrams.
*/
map<tcDiagPtr,tcDiagPtr> theBornToRealDiagrams;
/**
* Map real emission diagrams to underlying Born diagrams.
*/
map<tcDiagPtr,tcDiagPtr> theRealToBornDiagrams;
/**
* The last real emission key encountered
*/
RealEmissionKey lastRealEmissionKey;
/**
* The last underlying Born key encountered
*/
UnderlyingBornKey lastUnderlyingBornKey;
/**
* The last real emission info encountered
*/
multimap<UnderlyingBornKey,RealEmissionInfo>::const_iterator lastRealEmissionInfo;
/**
* The emitter as referred to by the underlying Born
* matrix element.
*/
int theBornEmitter;
/**
* The spectator as referred to by the underlying Born
* matrix element.
*/
int theBornSpectator;
/**
* The last scale as generated from the tilde mapping
*/
Energy theLastSubtractionScale;
/**
* The last scale as generated from the splitting mapping
*/
Energy theLastSplittingScale;
/**
* The last pt as generated from the tilde mapping
*/
Energy theLastSubtractionPt;
/**
* The last pt as generated from the splitting mapping
*/
Energy theLastSplittingPt;
/**
* The last z as generated from the tilde mapping
*/
double theLastSubtractionZ;
/**
* The last z as generated from the splitting mapping
*/
double theLastSplittingZ;
/**
* The shower approximation.
*/
Ptr<ShowerApproximation>::ptr theShowerApproximation;
/**
* True, if the shower real emission contribution should be subtracted.
*/
bool theRealShowerSubtraction;
/**
* True, if the shower virtual contribution should be subtracted.
*/
bool theVirtualShowerSubtraction;
/**
* True, if the loopsim matched virtual contribution should be subtracted.
*/
bool theLoopSimSubtraction;
/**
* True, if scales should be calculated from real emission kinematics
*/
bool theRealEmissionScales;
/**
* Return the shower hard scale encountered
*/
Energy theShowerHardScale;
/**
* The shower evolution scale encountered
*/
Energy theShowerScale;
/**
* The shower splitting variables encountered
*/
vector<double> theShowerParameters;
/**
* True, if this configuration is in the shower phase space
*/
bool theIsInShowerPhasespace;
/**
* True, if this configuration is above the shower infrared cutoff
*/
bool theIsAboveCutoff;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SubtractionDipole & operator=(const SubtractionDipole &);
+ SubtractionDipole & operator=(const SubtractionDipole &) = delete;
};
}
#endif /* HERWIG_SubtractionDipole_H */
diff --git a/MatrixElement/Matchbox/External/BLHAGeneric/GenericOLPAmplitude.h b/MatrixElement/Matchbox/External/BLHAGeneric/GenericOLPAmplitude.h
--- a/MatrixElement/Matchbox/External/BLHAGeneric/GenericOLPAmplitude.h
+++ b/MatrixElement/Matchbox/External/BLHAGeneric/GenericOLPAmplitude.h
@@ -1,141 +1,141 @@
// -*- C++ -*-
//
// GenericOLPAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_GenericOLPAmplitude_H
#define Herwig_GenericOLPAmplitude_H
//
// This is the declaration of the GenericOLPAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxOLPME.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief GenericOLPAmplitude implements OLP interfaces
*/
class GenericOLPAmplitude: public MatchboxOLPME {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
GenericOLPAmplitude();
/**
* The destructor.
*/
virtual ~GenericOLPAmplitude();
//@}
public:
/**
* Start the one loop provider, if appropriate, giving order and
* contract files
*/
virtual void signOLP(const string&, const string&);
/**
* Start the one loop provider, if appropriate
*/
virtual void startOLP(const string&, int& status);
/**
* Call OLP_EvalSubProcess and fill in the results
*/
virtual void evalSubProcess() const;
/**
* Fill in results for the given colour correlator
*/
virtual void evalColourCorrelator(pair<int,int> ij) const;
/**
* Return a positive helicity polarization vector for a gluon of
* momentum p (with reference vector n) to be used when evaluating
* spin correlations.
*/
virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
const Lorentz5Momentum& n,
int id = -1) const;
/**
* Fill in results for the given colour/spin correlator
*/
virtual void evalSpinColourCorrelator(pair<int,int> ij) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GenericOLPAmplitude & operator=(const GenericOLPAmplitude &);
+ GenericOLPAmplitude & operator=(const GenericOLPAmplitude &) = delete;
};
}
#endif /* Herwig_GenericOLPAmplitude_H */
diff --git a/MatrixElement/Matchbox/External/GoSam/GoSamAmplitude.h b/MatrixElement/Matchbox/External/GoSam/GoSamAmplitude.h
--- a/MatrixElement/Matchbox/External/GoSam/GoSamAmplitude.h
+++ b/MatrixElement/Matchbox/External/GoSam/GoSamAmplitude.h
@@ -1,329 +1,329 @@
// -*- C++ -*-
//
// GoSamAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_GoSamAmplitude_H
#define Herwig_GoSamAmplitude_H
//
// This is the declaration of the GoSamAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxOLPME.h"
#include "ThePEG/Utilities/DynamicLoader.h"
namespace Herwig {
using namespace ThePEG;
class gosamprocinfo{
public:
gosamprocinfo(){};
gosamprocinfo(int HID,int GID, string procstr,string typestr):
theHOlpId(HID),theGOlpId(GID),theProcstr(procstr),theTypestr(typestr){
}
~gosamprocinfo(){}
int HID() const {return theHOlpId;}
int GID() const {return theGOlpId;}
string Pstr() const {return theProcstr;}
string Tstr() const {return theTypestr;}
void setGID(int g){theGOlpId=g;}
void setOAs(int i){ orderAlphas=i;}
int orderAs(){return orderAlphas;}
void setOAew(int j){ orderAlphaew=j;}
int orderAew(){return orderAlphaew;}
private:
int theHOlpId;
int theGOlpId;
string theProcstr;
string theTypestr;
int orderAlphas;
int orderAlphaew;
public:
void persistentOutput(PersistentOStream & os) const{os<<theHOlpId<<theGOlpId<<theProcstr<<theTypestr<<orderAlphas<<orderAlphaew;}
void persistentInput(PersistentIStream &is) {is>>theHOlpId>>theGOlpId>>theProcstr>>theTypestr>>orderAlphas>>orderAlphaew;}
};
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief GoSamAmplitude implements an interface to GoSam
*/
class GoSamAmplitude: public MatchboxOLPME {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
GoSamAmplitude();
/**
* The destructor.
*/
virtual ~GoSamAmplitude();
//@}
public:
virtual void fillOrderFile(const map<pair<Process,int>,int>& procs, string OrderFileName);
virtual bool isCS() const { return false; }
virtual bool isExpanded() const { return true; }
virtual bool isBDK() const { return false; }
virtual bool isDR() const { return isitDR; }
virtual bool isDRbar() const {return false;}
/**
* Start the one loop provider, if appropriate, giving order and
* contract files
*/
virtual void signOLP(const string&, const string&);
virtual bool checkOLPContract(string contractFileName);
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
// virtual bool hasFinalStateSymmetry() const { return true; }
virtual bool hasFinalStateSymmetry() const { return false; }
virtual bool buildGoSam();
/**
* Start the one loop provider, if appropriate
*/
virtual void startOLP(const string&, int& status);
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
// virtual Energy2 mu2() const { return lastSHat(); }
/**
* Start the one loop provider, if appropriate. This default
* implementation writes an BLHA 2.0 order file and starts the OLP
*/
virtual bool startOLP(const map<pair<Process,int>,int>& procs);
/**
* Call OLP_EvalSubProcess and fill in the results
*/
void evalSubProcess() const;
/**
* Fill in results for the given colour correlator
*/
virtual void evalColourCorrelator(pair<int,int> ij) const;
/**
* Return a positive helicity polarization vector for a gluon of
* momentum p (with reference vector n) to be used when evaluating
* spin correlations.
*/
virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
const Lorentz5Momentum& n, int inc) const;
/**
* Fill in results for the given colour/spin correlator
*/
virtual void evalSpinColourCorrelator(pair<int,int> ij) const;
void getids() const;
int accuracyTargetNegExp() const { return theAccuracyTarget; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GoSamAmplitude & operator=(const GoSamAmplitude &);
+ GoSamAmplitude & operator=(const GoSamAmplitude &) = delete;
/**
* Store colour correlator results
*/
mutable vector<double> colourCorrelatorResults;
/**
* Store spin colour correlator results
*/
mutable vector<double> spinColourCorrelatorResults;
/**
* first is the olp id from herwig, second the answer from gosam
*/
mutable vector<int> idpair;
/**
* first is the olp id from herwig, second the amplitude type
*/
mutable vector<string> idtypepair;
/**
* Map to store all processes handled by this Amplitude
*/
map<int , gosamprocinfo > processmap;
mutable string gosamPathInterface;
mutable string gosamSetupInFileNameInterface;
mutable string gosamBuildScript;
mutable string gosamPath;
mutable string gosamSourcePath;
mutable string gosamInstallPath;
mutable string gosamSetupInFileName;
mutable string orderFileTitle;
mutable string contractFileTitle;
mutable string contractFileName;
mutable string orderFileName;
mutable string accuracyFileTitle;
mutable string accuracyFile;
int theAccuracyTarget;
bool theCodeExists;
bool theFormOpt;
bool theNinja;
bool theHiggsEff;
bool theMassiveLeptons;
int theLoopInducedOption;
bool isitDR;
mutable bool doneGoSamInit;
mutable bool doneGoSamInitRun;
/**
* The PDG codes of those quarks with mass
*/
vector<int> massiveParticles; //theMassiveParticles;
/**
* Method to create the setup.in file for GoSam
*/
void setupGoSamIn(string setupGoSamInFile);
protected:
/**
* Location of the installed executables
*/
string bindir_;
/**
* Location of the data files
*/
string pkgdatadir_;
/**
* Location of GOSAM
*/
string GoSamPrefix_;
}; // end "class GoSamAmplitude: public MatchboxOLPME"
inline PersistentOStream& operator<<(PersistentOStream& os, const gosamprocinfo& p) {
p.persistentOutput(os); return os;
}
inline PersistentIStream& operator>>(PersistentIStream& is, gosamprocinfo& p) {
p.persistentInput(is); return is;
}
} // end "namespace Herwig"
#endif /* Herwig_GoSamAmplitude_H */
diff --git a/MatrixElement/Matchbox/External/MadGraph/MadGraphAmplitude.h b/MatrixElement/Matchbox/External/MadGraph/MadGraphAmplitude.h
--- a/MatrixElement/Matchbox/External/MadGraph/MadGraphAmplitude.h
+++ b/MatrixElement/Matchbox/External/MadGraph/MadGraphAmplitude.h
@@ -1,381 +1,381 @@
// -*- C++ -*-
//
// MadGraphAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MadGraphAmplitude_H
#define Herwig_MadGraphAmplitude_H
//
// This is the declaration of the MadGraphAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Builtin/Amplitudes/MatchboxCurrents.h"
#include "ThePEG/Utilities/DynamicLoader.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Johannes Bellm, Simon Platzer
*
* \brief MadGraphAmplitude implements an interface to MadGraph
*/
class MadGraphAmplitude:
public MatchboxAmplitude {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MadGraphAmplitude();
/**
* The destructor.
*/
virtual ~MadGraphAmplitude();
//@}
public:
/**
* Return true, if this amplitude can handle the given process.
*/
virtual bool canHandle(const PDVector&,
Ptr<MatchboxFactory>::tptr,
bool) const;
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
virtual bool hasFinalStateSymmetry() const { return false; }
/**
* Set the (tree-level) order in \f$g_S\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGs(unsigned int ogs) { theOrderInGs = ogs; }
/**
* Return the (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGs() const { return theOrderInGs; }
/**
* Set the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element should be evaluated.
*/
virtual void orderInGem(unsigned int oge) { theOrderInGem = oge; }
/**
* Return the (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInGem() const { return theOrderInGem; }
/**
* Return true, if this amplitude is capable of calculating one-loop
* (QCD) corrections.
*/
virtual bool haveOneLoop() const { return true; }
/**
* Calculate the tree level amplitudes for the phasespace point
* stored in lastXComb.
*/
virtual void prepareAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Calculate the one-loop amplitudes for the phasespace point
* stored in lastXComb, if provided.
*/
virtual void prepareOneLoopAmplitudes(Ptr<MatchboxMEBase>::tcptr);
/**
* Evaluate the amplitude for the given colour tensor id and
* helicity assignment
*/
virtual Complex evaluate(size_t, const vector<int>&, Complex&);
/**
* Return true, if one-loop contributions will be evaluated at amplitude level.
*/
virtual bool oneLoopAmplitudes() const { return false; }
/**
* Return the one-loop/tree interference.
*/
virtual double oneLoopInterference() const;
void evaloneLoopInterference() const;
/**
* Return true, if one loop corrections are given in the conventions
* of BDK.
*/
virtual bool isCS() const { return false; }
virtual bool isExpanded() const { return true; }
virtual bool isBDK() const { return false; }
virtual bool isDR() const { return false; }
virtual bool isDRbar() const {return false;}
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
virtual Energy2 mu2() const { return sqr(91.18800000000*GeV);}
//virtual Energy2 mu2() const { return lastSHat(); }
virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
const Lorentz5Momentum& n,
int id = -1) const;
/**
* Return the colour and spin correlated matrix element.
*/
virtual double spinColourCorrelatedME2(pair<int,int> emitterSpectator,
const SpinCorrelationTensor& c) const;
/**
* Order process in MadGraph conventions
*/
vector<size_t> gluonsFirst(vector<size_t> i);
/**
* Flush all cashes.
*/
virtual void flushCaches() {
MatchboxAmplitude::flushCaches();
}
/**
* Return true, if this amplitude needs to initialize an external
* code.
*/
virtual bool isExternal() const { return true; }
/**
* Initialize this amplitude
*/
virtual bool initializeExternal();
/**
* Return a generic process id for the given process
*/
virtual int externalId(const cPDVector&);
/**
* Write out BornAmplitudes.dat and VirtualAmplitudes.dat,
* return true if new files are written.
*/
virtual bool writeAmplitudesDat();
/**
* CHeck if all amplitudes are in the Libary.
*/
virtual bool checkAmplitudes();
string mgProcLibPath();
/**
* Return true, if this amplitude is capable of consistently filling
* the rho matrices for the spin correllations
*/
virtual bool canFillRhoMatrix() const { return true; }
/**
* Return the helicity combination of the physical process in the
* conventions used by the spin correlation algorithm.
*/
virtual vector<unsigned int> physicalHelicities(const vector<int>&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* The (tree-level) order in \f$g_S\f$ in which this matrix
* element is given.
*/
unsigned int theOrderInGs;
/**
* The (tree-level) order in \f$g_{EM}\f$ in which this matrix
* element is given.
*/
unsigned int theOrderInGem;
/**
* The path for the process libraries.
*/
static string theProcessPath;
/**
* The path to generate amplitudes in.
*/
static string theMGmodel;
bool keepinputtopmass;
/**
* Initialize the given process
*/
void initProcess(const cPDVector&);
/**
* Storage for Amplitudes
*/
static vector<string> BornAmplitudes,VirtAmplitudes;
/**
* Helper for color and crossing handling
*/
mutable vector<int> colourindex, crossing;
/**
* Static Variables to handle initialization.
*/
static bool ranMadGraphInitializeExternal;
static bool initializedMad;
//@}
protected:
/**
* Location of the installed executables
*/
static string bindir_;
/**
* Location of the installed include files
*/
static string includedir_;
/**
* Location of the data files
*/
static string pkgdatadir_;
/**
* Location of MADGRAPH
*/
static string madgraphPrefix_;
/**
* Helper functions to make long strings static
*/
void setProcessPath(string );
string getProcessPath() const;
void setBinDir(string p);
string getBinDir() const;
void setDataDir(string p);
string getDataDir() const;
void setModel(string p);
string getModel() const;
void setMadgraphPrefix(string p);
string getMadgraphPrefix() const ;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MadGraphAmplitude & operator=(const MadGraphAmplitude &);
+ MadGraphAmplitude & operator=(const MadGraphAmplitude &) = delete;
};
}
#endif /* Herwig_MadGraphAmplitude_H */
diff --git a/MatrixElement/Matchbox/External/Makefile.am b/MatrixElement/Matchbox/External/Makefile.am
--- a/MatrixElement/Matchbox/External/Makefile.am
+++ b/MatrixElement/Matchbox/External/Makefile.am
@@ -1,95 +1,95 @@
SUBDIRS = BLHAGeneric VBFNLO NJet GoSam OpenLoops MadGraph
pkglib_LTLIBRARIES =
##############
if HAVE_GOSAM
pkglib_LTLIBRARIES += HwMatchboxGoSam.la
endif
HwMatchboxGoSam_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 14:1:0
+$(AM_LDFLAGS) -module -version-info 15:0:0
HwMatchboxGoSam_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DHERWIG_BINDIR="\"$(bindir)\"" \
-DHERWIG_PKGDATADIR="\"$(pkgdatadir)\"" \
-DGOSAM_PREFIX="\"$(GOSAMPREFIX)\""
HwMatchboxGoSam_la_SOURCES = \
GoSam/GoSamAmplitude.cc
###############
if HAVE_VBFNLO
pkglib_LTLIBRARIES += HwMatchboxVBFNLO.la
endif
-HwMatchboxVBFNLO_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:1:0
+HwMatchboxVBFNLO_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
HwMatchboxVBFNLO_la_CPPFLAGS = $(AM_CPPFLAGS)
HwMatchboxVBFNLO_la_CPPFLAGS += -I$(VBFNLOINCLUDE)
HwMatchboxVBFNLO_la_CPPFLAGS += -DVBFNLOLIB=$(VBFNLOLIB)
HwMatchboxVBFNLO_la_SOURCES = \
VBFNLO/VBFNLOAmplitude.cc \
VBFNLO/VBFNLOPhasespace.cc
###############
if HAVE_OPENLOOPS
pkglib_LTLIBRARIES += HwMatchboxOpenLoops.la
endif
HwMatchboxOpenLoops_la_SOURCES = \
OpenLoops/OpenLoopsAmplitude.cc
-HwMatchboxOpenLoops_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 13:1:0
+HwMatchboxOpenLoops_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 14:0:0
HwMatchboxOpenLoops_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DOPENLOOPSLIBS="\"$(OPENLOOPSLIBS)\"" \
-DOPENLOOPSPREFIX="\"$(OPENLOOPSPREFIX)\""
##############
if HAVE_NJET
pkglib_LTLIBRARIES += HwMatchboxNJet.la
endif
-HwMatchboxNJet_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 13:0:0
+HwMatchboxNJet_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 14:0:0
HwMatchboxNJet_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(NJETINCLUDEPATH) \
-DNJET_PREFIX="\"$(NJETPREFIX)\"" \
-DNJET_LIBS="\"$(NJETLIBPATH)\""
HwMatchboxNJet_la_SOURCES = \
NJet/NJetsAmplitude.cc
##############
if HAVE_MADGRAPH
pkglib_LTLIBRARIES += HwMatchboxMadGraph.la
endif
-HwMatchboxMadGraph_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:1:0
+HwMatchboxMadGraph_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
HwMatchboxMadGraph_la_SOURCES = \
MadGraph/MadGraphAmplitude.cc
HwMatchboxMadGraph_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DHERWIG_BINDIR="\"$(bindir)\"" \
-DHERWIG_INCLUDEDIR="\"$(includedir)\"" \
-DHERWIG_PKGDATADIR="\"$(pkgdatadir)\"" \
-DMADGRAPH_PREFIX="\"$(MADGRAPHPREFIX)\""
diff --git a/MatrixElement/Matchbox/External/NJet/NJetsAmplitude.h b/MatrixElement/Matchbox/External/NJet/NJetsAmplitude.h
--- a/MatrixElement/Matchbox/External/NJet/NJetsAmplitude.h
+++ b/MatrixElement/Matchbox/External/NJet/NJetsAmplitude.h
@@ -1,203 +1,203 @@
// -*- C++ -*-
//
// NJetsAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_NJetsAmplitude_H
#define Herwig_NJetsAmplitude_H
//
// This is the declaration of the NJetsAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxOLPME.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief NJetsAmplitude implements an interface to NJets
*/
class NJetsAmplitude: public MatchboxOLPME {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
NJetsAmplitude();
/**
* The destructor.
*/
virtual ~NJetsAmplitude();
//@}
public:
/**
* Return true, if this amplitude already includes averaging over
* incoming parton's quantum numbers.
*/
virtual bool hasInitialAverage() const { return false; }
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
virtual bool hasFinalStateSymmetry() const { return false; }
/**
* Start the one loop provider, if appropriate, giving order and
* contract files
*/
virtual void signOLP(const string&, const string&);
/**
* Start the one loop provider, if appropriate
*/
virtual void startOLP(const string&, int& status);
/**
* Start the one loop provider, if appropriate. This default
* implementation writes an BLHA 2.0 order file and starts the OLP
*/
virtual bool startOLP(const map<pair<Process,int>,int>& procs);
/**
* Call OLP_EvalSubProcess and fill in the results
*/
virtual void evalSubProcess() const;
/**
* Fill in results for the given colour correlator
*/
virtual void evalColourCorrelator(pair<int,int> ij) const;
/**
* Return a positive helicity polarization vector for a gluon of
* momentum p (with reference vector n) to be used when evaluating
* spin correlations.
*/
virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
const Lorentz5Momentum& n,
int id = -1) const;
/**
* Fill in results for the given colour/spin correlator
*/
virtual void evalSpinColourCorrelator(pair<int,int> ij) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NJetsAmplitude & operator=(const NJetsAmplitude &);
+ NJetsAmplitude & operator=(const NJetsAmplitude &) = delete;
/**
* Store colour correlator results
*/
mutable vector<double> colourCorrelatorResults;
/**
* Store spin colour correlator results
*/
mutable vector<double> spinColourCorrelatorResults;
/**
* Location of NJETs
*/
string NJetsPrefix_;
/**
* Location of NJET librarys
*/
string NJetsLibs_;
/**
* Load the NJET library
*/
void loadNJET();
};
}
#endif /* Herwig_NJetsAmplitude_H */
diff --git a/MatrixElement/Matchbox/External/OpenLoops/OpenLoopsAmplitude.h b/MatrixElement/Matchbox/External/OpenLoops/OpenLoopsAmplitude.h
--- a/MatrixElement/Matchbox/External/OpenLoops/OpenLoopsAmplitude.h
+++ b/MatrixElement/Matchbox/External/OpenLoops/OpenLoopsAmplitude.h
@@ -1,350 +1,350 @@
// -*- C++ -*-
//
// OpenLoopsAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_OpenLoopsAmplitude_H
#define Herwig_OpenLoopsAmplitude_H
//
// This is the declaration of the OpenLoopsAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxOLPME.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Johannes Bellm, Simon Platzer
*
* \brief Process information for OpenLoops
*/
class OpenLoopsProcInfo{
public:
/**
* Default constructor
*/
OpenLoopsProcInfo() {}
/**
* Construct giving data
*/
OpenLoopsProcInfo(int HID,int GID, string procstr,string typestr)
: theHOlpId(HID), theGOlpId(GID), theProcstr(procstr), theTypestr(typestr) {}
/**
* Document me
*/
int HID() const { return theHOlpId; }
/**
* Document me
*/
int GID() const { return theGOlpId; }
/**
* Document me
*/
const string& Pstr() const { return theProcstr; }
/**
* Document me
*/
const string& Tstr() const { return theTypestr; }
/**
* Document me
*/
void setGID(int g) { theGOlpId=g; }
/**
* Document me
*/
void setOAs(int i) { orderAlphas=i; }
/**
* Document me
*/
int orderAs() { return orderAlphas; }
private:
/**
* Document me
*/
int theHOlpId;
/**
* Document me
*/
int theGOlpId;
/**
* Document me
*/
string theProcstr;
/**
* Document me
*/
string theTypestr;
/**
* Document me
*/
int orderAlphas;
public:
/**
* Write to persistent stream
*/
void persistentOutput(PersistentOStream & os) const{
os << theHOlpId << theGOlpId << theProcstr << theTypestr << orderAlphas;
}
/**
* Read from persistent stream
*/
void persistentInput(PersistentIStream &is) {
is >> theHOlpId >> theGOlpId >> theProcstr >> theTypestr >> orderAlphas;
}
};
/**
* \ingroup Matchbox
* \author Johannes Bellm, Simon Platzer
*
* \brief OpenLoopsAmplitude implements an interface to OpenLoops
*/
class OpenLoopsAmplitude: public MatchboxOLPME {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
OpenLoopsAmplitude();
/**
* The destructor.
*/
virtual ~OpenLoopsAmplitude();
//@}
public:
virtual void fillOrderFile(const map<pair<Process,int>,int>& procs);
virtual bool isCS() const { return false; }
virtual bool isExpanded() const { return true; }
virtual bool isBDK() const { return false; }
//virtual bool isDR() const { return true; }
/**
* Start the one loop provider, if appropriate, giving order and
* contract files
*/
virtual bool checkOLPContract();
/**
* Start the one loop provider, if appropriate
*/
virtual void startOLP(const string&, int& status);
/**
* Return the value of the dimensional regularization
* parameter. Note that renormalization scale dependence is fully
* restored in DipoleIOperator.
*/
// virtual Energy2 mu2() const { return lastSHat(); }
/**
* Start the one loop provider, if appropriate. This default
* implementation writes an BLHA 2.0 order file and starts the OLP
*/
virtual bool startOLP(const map<pair<Process,int>,int>& procs);
/**
* Return true, if this amplitude already includes averaging over
* incoming parton's quantum numbers.
*/
virtual bool hasInitialAverage() const { return true; }
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
virtual bool hasFinalStateSymmetry() const { return true; }
/**
* Call OLP_EvalSubProcess and fill in the results
*/
void evalSubProcess() const;
/**
* Fill in results for the given colour correlator
*/
virtual void evalColourCorrelator(pair<int,int> ij) const;
/**
* Fill in results for the given colour/spin correlator
*/
virtual void evalSpinColourCorrelator(pair<int,int> ij) const;
/**
* Return the colour and spin correlated matrix element.
*/
virtual double spinColourCorrelatedME2(pair<int,int> ij,
const SpinCorrelationTensor& c) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
virtual void doinitrun();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- OpenLoopsAmplitude & operator=(const OpenLoopsAmplitude &);
+ OpenLoopsAmplitude & operator=(const OpenLoopsAmplitude &) = delete;
/**
* Store colour correlator results
*/
mutable vector<double> colourCorrelatorResults;
/**
* Store spin colour correlator results
*/
mutable vector<double> spinColourCorrelatorResults;
/**
* first is the olp id from herwig, second the answer from openloops
*/
static vector< int > idpair;
/**
* Helper map to store information in different procs.
*/
map<int , OpenLoopsProcInfo > processmap;
/**
* Interface for Higgs Effective
*/
bool theHiggsEff;
/**
* Complex Mass Scheme.
*/
bool use_cms;
/**
* Use of Collier Lib (arXiv:1604.06792), available since OpenLoops 1.3.0.
*/
bool theCollierLib=true;
/**
* parameter to set Phase space tolerance for massiv particles.
* Should not be used. Better: set Openloops:Massless 11
*/
int psp_tolerance;
/**
* Location of the OpenLoops libraries
*/
static string OpenLoopsLibs_;
/**
* Location of the OpenLoops
*/
static string OpenLoopsPrefix_;
/**
* Helper functions to make long strings static
*/
void setOpenLoopsLibs(string p);
string getOpenLoopsLibs() const;
void setOpenLoopsPrefix(string p);
string getOpenLoopsPrefix() const;
};
}
#endif /* Herwig_OpenLoopsAmplitude_H */
diff --git a/MatrixElement/Matchbox/External/VBFNLO/VBFNLOAmplitude.h b/MatrixElement/Matchbox/External/VBFNLO/VBFNLOAmplitude.h
--- a/MatrixElement/Matchbox/External/VBFNLO/VBFNLOAmplitude.h
+++ b/MatrixElement/Matchbox/External/VBFNLO/VBFNLOAmplitude.h
@@ -1,247 +1,247 @@
// -*- C++ -*-
//
// VBFNLOAmplitude.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_VBFNLOAmplitude_H
#define Herwig_VBFNLOAmplitude_H
//
// This is the declaration of the VBFNLOAmplitude class.
//
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxOLPME.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief VBFNLOAmplitude implements an interface to VBFNLO
*/
class VBFNLOAmplitude: public MatchboxOLPME {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
VBFNLOAmplitude();
/**
* The destructor.
*/
virtual ~VBFNLOAmplitude();
//@}
public:
/**
* Return true, if this amplitude already includes averaging over
* incoming parton's quantum numbers.
*/
virtual bool hasInitialAverage() const { return false; }
/**
* Return true, if this amplitude already includes symmetry factors
* for identical outgoing particles.
*/
virtual bool hasFinalStateSymmetry() const { return false; }
/**
* Set options
*/
virtual bool isCS() const { return false; }
virtual bool isExpanded() const { return true; }
virtual bool isBDK() const { return false; }
virtual bool isDR() const { return false; }
virtual bool isDRbar() const { return false; }
/**
* Request an additional random number if we are doing random helicity
* summation.
*/
virtual int nDimAdditional() const { return theRanHelSum?1:0; }
/**
* Set an OLP parameter (assuming real parameters only)
*/
void setOLPParameter(const string& name, double value) const;
/**
* Start the one loop provider, if appropriate, giving order and
* contract files
*/
virtual void signOLP(const string&, const string&);
/**
* Start the one loop provider, if appropriate
*/
virtual void startOLP(const string&, int& status);
/**
* Start the one loop provider, if appropriate. This default
* implementation writes an BLHA 2.0 order file and starts the OLP
*/
virtual bool startOLP(const map<pair<Process,int>,int>& procs);
/**
* Call OLP_EvalSubProcess and fill in the results
*/
virtual void evalSubProcess() const;
/**
* Fill in results for the given colour correlator
*/
virtual void evalColourCorrelator(pair<int,int> ij) const;
/**
* Return the large-N matrix element squared.
*/
virtual double largeNME2(Ptr<ColourBasis>::tptr) const;
/**
* Call OLP_EvalSubProcess in the large-N limit and fill in the results
*/
virtual void evalLargeNSubProcess(Ptr<ColourBasis>::tptr) const;
/**
* Return the large-N colour correlated matrix element.
*/
virtual double largeNColourCorrelatedME2(pair<int,int>,
Ptr<ColourBasis>::tptr) const;
/**
* Fill in results for the given large-N colour correlator
*/
virtual void evalLargeNColourCorrelator(pair<int,int> ij,
Ptr<ColourBasis>::tptr) const;
/**
* Return a positive helicity polarization vector for a gluon of
* momentum p (with reference vector n) to be used when evaluating
* spin correlations.
*/
virtual LorentzVector<Complex> plusPolarization(const Lorentz5Momentum& p,
const Lorentz5Momentum& n,
int id = -1) const;
/**
* Fill in results for the given colour/spin correlator
*/
virtual void evalSpinColourCorrelator(pair<int,int> ij) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VBFNLOAmplitude & operator=(const VBFNLOAmplitude &);
+ VBFNLOAmplitude & operator=(const VBFNLOAmplitude &) = delete;
/**
* Store colour correlator results
*/
mutable vector<double> colourCorrelatorResults;
/**
* Store spin colour correlator results
*/
mutable vector<double> spinColourCorrelatorResults;
/**
* Switch for random helicity summation
*/
bool theRanHelSum;
/**
* Switch for anomalous couplings
*/
bool theAnomCoupl;
protected:
/**
* Location of the VBFNLO library
*/
string VBFNLOlib_;
/**
* load the VBFNLO library
*/
void loadVBFNLO();
};
}
#endif /* Herwig_VBFNLOAmplitude_H */
diff --git a/MatrixElement/Matchbox/External/VBFNLO/VBFNLOPhasespace.h b/MatrixElement/Matchbox/External/VBFNLO/VBFNLOPhasespace.h
--- a/MatrixElement/Matchbox/External/VBFNLO/VBFNLOPhasespace.h
+++ b/MatrixElement/Matchbox/External/VBFNLO/VBFNLOPhasespace.h
@@ -1,230 +1,230 @@
// -*- C++ -*-
//
// VBFNLOPhasespace.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_VBFNLOPhasespace_H
#define Herwig_VBFNLOPhasespace_H
//
// This is the declaration of the VBFNLOPhasespace class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Michael Rauch
*
* \brief VBFNLOPhasespace is an interface to the internal phasespace generator
* of VBFNLO. It uses the information passed via the BLHA interface to obtain
* information on the required channels.
*
* @see \ref VBFNLOPhasespaceInterfaces "The interfaces"
* defined for VBFNLOPhasespace.
*/
class VBFNLOPhasespace: public MatchboxPhasespace {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
VBFNLOPhasespace();
/**
* The destructor.
*/
virtual ~VBFNLOPhasespace();
//@}
public:
/**
* Prepare a phase space generator for the given xcomb object.
*/
virtual void setXComb(tStdXCombPtr);
/**
* Generate a phase space point and return its weight.
*/
virtual double generateTwoToNKinematics(const double*,
vector<Lorentz5Momentum>& momenta);
/**
* Generate a phase space point and return its weight.
*/
virtual double generateKinematics(const double* random,
vector<Lorentz5Momentum>& momenta) {
return generateTwoToNKinematics(random,momenta);
}
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDimPhasespace(int nFinal) const;
/**
* Return true, if this phasespace generator will generate incoming
* partons itself.
*/
virtual bool haveX1X2() const { return true; }
/**
* Return true, if this phase space generator expects
* the incoming partons in their center-of-mass system
*/
virtual bool wantCMS() const { return false; }
/**
* Return true, if this phase space generator is invertible
*/
virtual bool isInvertible() const { return false; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* Last hadronic centre-of-mass energy, to update VBFNLO value only
* when this has changed.
*/
Energy lastSqrtS;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VBFNLOPhasespace & operator=(const VBFNLOPhasespace &);
+ VBFNLOPhasespace & operator=(const VBFNLOPhasespace &) = delete;
/**
* Whether or not we need to reshuffle.
*/
bool needToReshuffle;
protected:
/**
* Location of the VBFNLO library
*/
string VBFNLOlib_;
/**
* load the VBFNLO library
*/
void loadVBFNLO();
/**
* The function object defining the equation
* to be solved.
*/
struct ReshuffleEquation {
typedef double ArgType;
typedef Energy ValType;
static double aUnit() { return 1.; }
static Energy vUnit() { return 1.*GeV; }
Energy operator() (double xi) const;
Energy w;
cPDVector::const_iterator dataBegin;
cPDVector::const_iterator dataEnd;
vector<Lorentz5Momentum>::const_iterator momentaBegin;
vector<Lorentz5Momentum>::const_iterator momentaEnd;
ReshuffleEquation(Energy q,
cPDVector::const_iterator dBegin,
cPDVector::const_iterator dEnd,
vector<Lorentz5Momentum>::const_iterator mBegin,
vector<Lorentz5Momentum>::const_iterator mEnd)
: w(q),
dataBegin(dBegin), dataEnd(dEnd),
momentaBegin(mBegin),
momentaEnd(mEnd) {}
};
};
}
#endif /* Herwig_VBFNLOPhasespace_H */
diff --git a/MatrixElement/Matchbox/InsertionOperators/DipoleIOperator.h b/MatrixElement/Matchbox/InsertionOperators/DipoleIOperator.h
--- a/MatrixElement/Matchbox/InsertionOperators/DipoleIOperator.h
+++ b/MatrixElement/Matchbox/InsertionOperators/DipoleIOperator.h
@@ -1,211 +1,211 @@
// -*- C++ -*-
//
// DipoleIOperator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleIOperator_H
#define HERWIG_DipoleIOperator_H
//
// This is the declaration of the DipoleIOperator class.
//
#include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Christian Reuschle
*
* \brief DipoleIOperator implements the I(\epsilon)
* insertion operator.
*
*/
class DipoleIOperator: public MatchboxInsertionOperator {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleIOperator();
/**
* The destructor.
*/
virtual ~DipoleIOperator();
//@}
public:
/**
* Set the XComb object steering the Born matrix
* element this class represents virtual corrections to.
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Set parameters for new alpha parameter.
*/
virtual void setAlpha (double alpha)const;
/**
* Return true, if this virtual correction
* applies to the given process.
*/
virtual bool apply(const cPDVector&) const;
/**
* Return true, if contributions exist to
* the given parton.
*/
bool apply(tcPDPtr) const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the jet particle group.
*/
vector<int> NLightJetVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the jet particle group.
*/
vector<int> NHeavyJetVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NLightBornVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NHeavyBornVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the proton particle group.
*/
vector<int> NLightProtonVec() const;
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual double me2() const;
/**
* If defined, return the coefficient of the pole in epsilon^2
*/
virtual double oneLoopDoublePole() const;
/**
* If defined, return the coefficient of the pole in epsilon
*/
virtual double oneLoopSinglePole() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* C_A
*/
double CA;
/**
* C_F
*/
double CF;
/**
* \gamma_q
*/
double gammaQuark;
/**
* \gamma_g
*/
double gammaGluon;
/**
* \beta_0
*/
double betaZero;
/**
* K_q
*/
mutable double KQuark;
/**
* K_g
*/
mutable double KGluon;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleIOperator & operator=(const DipoleIOperator &);
+ DipoleIOperator & operator=(const DipoleIOperator &) = delete;
};
}
#endif /* HERWIG_DipoleIOperator_H */
diff --git a/MatrixElement/Matchbox/InsertionOperators/DipoleMIOperator.h b/MatrixElement/Matchbox/InsertionOperators/DipoleMIOperator.h
--- a/MatrixElement/Matchbox/InsertionOperators/DipoleMIOperator.h
+++ b/MatrixElement/Matchbox/InsertionOperators/DipoleMIOperator.h
@@ -1,270 +1,270 @@
// -*- C++ -*-
//
// DipoleMIOperator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleMIOperator_H
#define HERWIG_DipoleMIOperator_H
//
// This is the declaration of the DipoleMIOperator class.
//
#include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Daniel Rauch, Christian Reuschle,
* Martin Stoll
*
* \brief DipoleMIOperator implements the I(\epsilon)
* insertion operator for the massive case.
* DipoleMIOperator does only apply for expanded con-
* vention and also not for dimensional reduction.
*
*/
class DipoleMIOperator: public MatchboxInsertionOperator {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleMIOperator();
/**
* The destructor.
*/
virtual ~DipoleMIOperator();
//@}
public:
/**
* Set the XComb object steering the Born matrix
* element this class represents virtual corrections to.
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Return true, if this virtual correction
* applies to the given process.
*/
virtual bool apply(const cPDVector&) const;
/**
* Return true, if contributions exist to
* the given parton.
*/
bool apply(tcPDPtr) const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the jet particle group.
*/
vector<int> NLightJetVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the jet particle group.
*/
vector<int> NHeavyJetVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NLightBornVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NHeavyBornVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the proton particle group.
*/
vector<int> NLightProtonVec() const;
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual double me2() const;
/**
* If defined, return the coefficient of the pole in epsilon^2
*/
virtual double oneLoopDoublePole() const;
/**
* If defined, return the coefficient of the pole in epsilon
*/
virtual double oneLoopSinglePole() const;
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline T rootOfKallen (T a, T b, T c) const {
return sqrt( a*a + b*b + c*c - 2.*( a*b+a*c+b*c ) ); }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* C_A
*/
double CA;
/**
* C_F
*/
double CF;
/**
* \gamma_q
*/
double gammaQuark;
/**
* \gamma_g
*/
double gammaGluon;
/**
* \beta_0
* The Matchbox convention is \beta_0=\gamma_g. Often however,
* \beta_0 is defined in the literature as \beta_0=2*\gamma_g.
* Be aware of consistent usage!
* In the massive case (see hep-ph/0011222v3):
* \beta_0 = 11/3*C_A - 4/3*T_R*(N_f+N_F)
* with T_R=1/2, N_f the number of light flavours ,and N_F the
* number of heavy flavours, which originate in the splittings
* g->qqbar or g->QQbar.
* In our conventions, however:
* \beta_0 = 11/6*C_A - 2/3*T_R*(N_f+N_F)
* The "massive" \beta_0 applies as soon as we define massive
* flavours in the jet particle group. Be aware that some OLP
* might generically(!) use something like N_f=5 and N_F=1 in
* their definition of \beta_0!
*/
double betaZero;
/**
* K_q
*/
double KQuark;
/**
* K_g
*/
double KGluon;
private:
/**
* V_j, non-singular terms
*/
// double Vj(const ParticleData&, const ParticleData&, Energy2, double, bool=false) const;
double Vj(const ParticleData&, const ParticleData&, Energy2, double, double, int, bool=false) const;
/**
* V^{(s)}, double pole part in expanded convention.
*/
double VsDoublePole(const ParticleData&, const ParticleData&) const;
/**
* V^{(s)}, single pole part in expanded convention.
*/
double VsSinglePole(const ParticleData&, const ParticleData&, Energy2) const;
/**
* \Gamma_q, finite term
*/
double GammaQuark(const ParticleData&) const;
/**
* \Gamma_g, finite term
*/
double GammaGluon() const;
/**
* \Gamma_q, single pole term
*/
double GammaQuarkSinglePole(const ParticleData&) const;
/**
* \Gamma_g, single pole term
*/
double GammaGluonSinglePole() const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleMIOperator & operator=(const DipoleMIOperator &);
+ DipoleMIOperator & operator=(const DipoleMIOperator &) = delete;
};
}
#endif /* HERWIG_DipoleMIOperator_H */
diff --git a/MatrixElement/Matchbox/InsertionOperators/DipoleMPKOperator.h b/MatrixElement/Matchbox/InsertionOperators/DipoleMPKOperator.h
--- a/MatrixElement/Matchbox/InsertionOperators/DipoleMPKOperator.h
+++ b/MatrixElement/Matchbox/InsertionOperators/DipoleMPKOperator.h
@@ -1,483 +1,483 @@
// -*- C++ -*-
//
// DipoleMPKOperator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleMPKOperator_H
#define HERWIG_DipoleMPKOperator_H
//
// This is the declaration of the DipoleMPKOperator class.
//
#include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "ThePEG/PDF/PDF.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Daniel Rauch, Christian Reuschle,
* Johannes Bellm
*
* \brief DipoleMPKOperator implements the P+K
* insertion operator for the massive case.
* DipoleMPKOperator does not apply for dimen-
* sional reduction.
*
*/
class DipoleMPKOperator: public MatchboxInsertionOperator {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleMPKOperator();
/**
* The destructor.
*/
virtual ~DipoleMPKOperator();
//@}
public:
/**
* Set the XComb object steering the Born matrix
* element this class represents virtual corrections to.
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Return the number of additional random variables
* needed to calculate this virtual correction.
* We treat all integrations on equal footing.
*/
virtual int nDimAdditional() const { return 1; }
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the jet particle group.
*/
vector<int> NLightJetVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the jet particle group.
*/
vector<int> NHeavyJetVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NLightBornVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NHeavyBornVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the proton particle group.
*/
vector<int> NLightProtonVec() const;
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual double me2() const;
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual CrossSection dSigHatDR() const {
return sqr(hbarc) * me2() * lastBorn()->lastXComb().jacobian() / (2.*lastSHat());
}
public:
/**
* Return true, if contributions exist to
* the given parton.
*/
bool apply(tcPDPtr) const;
/**
* Return true, if contributions exist to
* the given parton.
*/
bool applyNotMassless(tcPDPtr) const;
/**
* Return true, if this virtual correction
* applies to the given process.
*/
virtual bool apply(const cPDVector&) const;
/**
* The initial-final contribution
* [1/(1-z)]_+ + \delta(1-z)
*/
double gammaSoft() const;
/**
* [(1/(1-z))*ln((1-z)/z)]_+
*/
double softLogByz(tcPDPtr p) const;
/**
* [(1/(1-z))*ln((1-z))]_+
*/
double softLog(tcPDPtr p) const;
/**
* The Kbar^{qq} contribution
*/
double KBarqq() const;
/**
* The Ktilde^{qq} contribution
*/
double KTildeqq() const;
/**
* The P^{qq} contribution
*/
double Pqq() const;
/**
* The Kbar^{qg} contribution
*/
double KBarqg() const;
/**
* The Ktilde^{qg} contribution
*/
double KTildeqg() const;
/**
* The P^{qg} contribution
*/
double Pqg() const;
/**
* The Kbar^{gq} contribution
*/
double KBargq() const;
/**
* The Ktilde^{gq} contribution
*/
double KTildegq() const;
/**
* The P^{gq} contribution
*/
double Pgq() const;
/**
* The Kbar^{gg} contribution
*/
double KBargg() const;
/**
* The Ktilde^{gg} contribution
*/
double KTildegg() const;
/**
* The P^{gg} contribution
*/
double Pgg() const;
//////////////////////////////////////
/**
* Kscript^{a,a'}_j terms with j=quark
*/
/**
* [J^a_{gQ}(z,\mu_Q^2)]_+
* a,a' = quark for later
* use of this function
* in Kscript^{qq}_q
*/
double Ja_gQplus(double muQ2) const;
/**
* [1/(1-z)]_+ * log( (2-z)/(2-z+\mu_Q^2) )
* a,a' = quark for later use of this function
* in Kscript^{qq}_q
*/
double gammaSoft2(double muQ2) const;
/**
* The Kscript^{qq}_q contribution
*/
double Kscriptqq_q(Energy2 sja, Energy2 mj2) const;
/**
* The Kscript^{qg}_q contribution
*/
double Kscriptqg_q(Energy2 sja, Energy2 mj2) const;
/**
* The Kscript^{gq}_q contribution
*/
double Kscriptgq_q() const;
/**
* The Kscript^{gg}_q contribution
*/
double Kscriptgg_q(Energy2 sja, Energy2 mj2) const;
/**
* The Kscriptbar^{qq}_q contribution (B.17)
*/
double Kscriptbarqq_q(Energy2 Qja2, Energy2 mj2) const;
/**
* The Kscriptbar^{qg}_q contribution (B.17)
*/
double Kscriptbarqg_q(Energy2 Qja2, Energy2 mj2) const;
/**
* The Kscriptbar^{gq}_q contribution (B.17)
*/
double Kscriptbargq_q() const;
/**
* The Kscriptbar^{gg}_q contribution (B.17)
*/
double Kscriptbargg_q(Energy2 Qja2, Energy2 mj2) const;
////////////////////////////
/**
* Kscript^{a,a'}_j terms with j=gluon
* The ones for a!=a' will return zero
*/
/**
* J^{a;NS}_{Q\bar{Q}}(\mu_Q^2)
* Not folded with 1/z*PDF(x/z)*\Theta(z-x)
*/
double JaNS_QQ(double muQ2) const;
/**
* [J^a_{Q\bar{Q}}(z,\mu_Q^2)]_{z_+}
*/
double Ja_QQzplus(double muQ2, int F, double zplus) const;
/**
* The Kscript^{qq}_g contribution
*/
// double Kscriptqq_g(Energy2 sja) const;
double Kscriptqq_g(Energy2 sja, double lambda) const;
/**
* The Kscript^{qg}_g contribution
*/
double Kscriptqg_g() const;
/**
* The Kscript^{gq}_g contribution
*/
double Kscriptgq_g() const;
/**
* The Kscript^{gg}_g contribution
* equals the Kscript^{qq}_g contribution
*/
// double Kscriptgg_g(Energy2 sja) const;
double Kscriptgg_g(Energy2 sja, double lambda) const;
/**
* The Kscriptbar^{qq}_g contribution (B.18)
*/
// double Kscriptbarqq_g(Energy2 Qja2) const;
double Kscriptbarqq_g(Energy2 Qja2, double lambda) const;
/**
* The Kscriptbar^{qg}_g contribution (B.18)
*/
double Kscriptbarqg_g() const;
/**
* The Kscriptbar^{gq}_g contribution (B.18)
*/
double Kscriptbargq_g() const;
/**
* The Kscriptbar^{gg}_g contribution (B.18)
*/
// double Kscriptbargg_g(Energy2 Qja2) const;
double Kscriptbargg_g(Energy2 Qja2, double lambda) const;
//////////////////////////////////////
/**
* Get all contributions for the indicated incoming parton.
*/
double sumParton(int id) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* C_A
*/
double CA;
/**
* C_F
*/
double CF;
/**
* \gamma_q
*/
double gammaQuark;
/**
* \gamma_g
*/
double gammaGluon;
/**
* K_q
*/
double KQuark;
/**
* K_g
*/
double KGluon;
/**
* The scale to be used.
*/
mutable Energy2 scale;
/**
* The PDF to be used.
*/
mutable tcPDFPtr pdf;
/**
* The incoming parton type considered.
*/
mutable tcPDPtr particle;
/**
* The x to be used.
*/
mutable double x;
/**
* The convolution variable to be used.
*/
mutable double z;
/**
* Cache PDFs evaluated at x, x/z and x/z_+,
* z_+ depends hereby on the masses of the heavy flavours,
* so, in contrast to the massless case, we need a vector
* of size 2+n_F(heavy) instead of the pair<double,double>
*/
mutable map<pair<tcPDFPtr,tcPDPtr>,vector<double> > pdfCache;
/**
* The currently considered incoming parton.
*/
mutable tcPDPtr parton;
/**
* Get a PDF value at x
*/
double PDFx(tcPDPtr) const;
/**
* Get a PDF value at x/z
*/
double PDFxByz(tcPDPtr) const;
//////////////////////////////////////
/**
* Get a PDF value at x/z_+
*/
double PDFxByzplus(tcPDPtr,int,double) const;
//////////////////////////////////////
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleMPKOperator & operator=(const DipoleMPKOperator &);
+ DipoleMPKOperator & operator=(const DipoleMPKOperator &) = delete;
};
}
#endif /* HERWIG_DipoleMPKOperator_H */
diff --git a/MatrixElement/Matchbox/InsertionOperators/DipolePKOperator.h b/MatrixElement/Matchbox/InsertionOperators/DipolePKOperator.h
--- a/MatrixElement/Matchbox/InsertionOperators/DipolePKOperator.h
+++ b/MatrixElement/Matchbox/InsertionOperators/DipolePKOperator.h
@@ -1,340 +1,340 @@
// -*- C++ -*-
//
// DipolePKOperator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipolePKOperator_H
#define HERWIG_DipolePKOperator_H
//
// This is the declaration of the DipolePKOperator class.
//
#include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "ThePEG/PDF/PDF.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Christian Reuschle
*
* \brief DipolePKOperator implements the P+K
* insertion operator.
*
*/
class DipolePKOperator: public MatchboxInsertionOperator {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipolePKOperator();
/**
* The destructor.
*/
virtual ~DipolePKOperator();
//@}
public:
/**
* Set the XComb object steering the Born matrix
* element this class represents virtual corrections to.
*/
virtual void setXComb(tStdXCombPtr xc);
/**
* Set parameters for new alpha parameter.
*/
virtual void setAlpha (double alpha)const;
/**
* Return the number of additional random variables
* needed to calculate this virtual correction.
* We treat all integrations on equal footing.
*/
virtual int nDimAdditional() const { return 1; }
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the jet particle group.
*/
vector<int> NLightJetVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the jet particle group.
*/
vector<int> NHeavyJetVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NLightBornVec() const;
/**
* Return a vector of PDG codes of the heavy flavours,
* which are contained in the associated Born sub-process.
*/
vector<int> NHeavyBornVec() const;
/**
* Return a vector of PDG codes of the light flavours,
* which are contained in the proton particle group.
*/
vector<int> NLightProtonVec() const;
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual double me2() const;
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual CrossSection dSigHatDR() const {
return sqr(hbarc) * me2() * lastBorn()->lastXComb().jacobian() / (2.*lastSHat());
}
public:
/**
* Return true, if contributions exist to
* the given parton.
*/
bool apply(tcPDPtr) const;
/**
* Return true, if this virtual correction
* applies to the given process.
*/
virtual bool apply(const cPDVector&) const;
/**
* The initial-final contribution
*/
double gammaSoft() const;
/**
* [(1/(1-z))*ln((1-z)/z)]_+
*/
double softLogByz(tcPDPtr p) const;
/**
* [(1/(1-z))*ln((1-z))]_+
*/
double softLog(tcPDPtr p) const;
/**
* The Kbar^{qq} contribution
*/
double KBarqq() const;
/**
* The Ktilde^{qq} contribution
*/
double KTildeqq() const;
/**
* The P^{qq} contribution
*/
double Pqq() const;
/**
* The Kbar^{qg} contribution
*/
double KBarqg() const;
/**
* The Ktilde^{qg} contribution
*/
double KTildeqg() const;
/**
* The P^{qg} contribution
*/
double Pqg() const;
/**
* The Kbar^{gq} contribution
*/
double KBargq() const;
/**
* The Ktilde^{gq} contribution
*/
double KTildegq() const;
/**
* The P^{gq} contribution
*/
double Pgq() const;
/**
* The Kbar^{gg} contribution
*/
double KBargg() const;
/**
* The Ktilde^{gg} contribution
*/
double KTildegg() const;
/**
* The P^{gg} contribution
*/
double Pgg() const;
/**
* Get all contributions for the indicated incoming parton.
*/
double sumParton(int id) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* C_A
*/
double CA;
/**
* C_F
*/
double CF;
/**
* \gamma_q
*/
double gammaQuark;
/**
* \gamma_g
*/
double gammaGluon;
/**
* K_q
*/
mutable double KQuark;
/**
* K_g
*/
mutable double KGluon;
/**
* The scale to be used.
*/
mutable Energy2 scale;
/**
* The PDF to be used.
*/
mutable tcPDFPtr pdf;
/**
* The incoming parton type considered.
*/
mutable tcPDPtr particle;
/**
* The x to be used.
*/
mutable double x;
/**
* The convolution variable to be used.
*/
mutable double z;
/**
* Cache PDFs evaluated at x and x/z
*/
mutable map<pair<tcPDFPtr,tcPDPtr>,pair<double,double> > pdfCache;
/**
* The currently considered incoming parton.
*/
mutable tcPDPtr parton;
/**
* Get a PDF value at x
*/
double PDFx(tcPDPtr) const;
/**
* Get a PDF value at x/z
*/
double PDFxByz(tcPDPtr) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipolePKOperator & operator=(const DipolePKOperator &);
+ DipolePKOperator & operator=(const DipolePKOperator &) = delete;
};
}
#endif /* HERWIG_DipolePKOperator_H */
diff --git a/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h b/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h
--- a/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h
+++ b/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.h
@@ -1,242 +1,242 @@
// -*- C++ -*-
//
// MatchboxInsertionOperator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MatchboxInsertionOperator_H
#define HERWIG_MatchboxInsertionOperator_H
//
// This is the declaration of the MatchboxInsertionOperator class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/Handlers/LastXCombInfo.h"
#include "Herwig/MatrixElement/Matchbox/InsertionOperators/MatchboxInsertionOperator.fh"
#include "Herwig/MatrixElement/Matchbox/Utility/LastMatchboxXCombInfo.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxInsertionOperator is the base class for insertion operators.
*
* @see \ref MatchboxInsertionOperatorInterfaces "The interfaces"
* defined for MatchboxInsertionOperator.
*/
class MatchboxInsertionOperator:
public HandlerBase,
public LastXCombInfo<StandardXComb>,
public LastMatchboxXCombInfo {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxInsertionOperator();
/**
* The destructor.
*/
virtual ~MatchboxInsertionOperator();
//@}
public:
/**
* Return the factory which produced this matrix element
*/
Ptr<MatchboxFactory>::tptr factory() const;
/** @name Process and phasespace information */
//@{
/**
* Return true, if this virtual correction
* applies to the given process.
*/
virtual bool apply(const cPDVector&) const = 0;
/**
* Return the Born matrix element this class represents
* virtual corrections to.
*/
Ptr<MatchboxMEBase>::tptr lastBorn() const ;
/**
* Set the XComb object steering the Born matrix
* element this class represents virtual corrections to.
*/
virtual void setXComb(tStdXCombPtr xc) {
theLastXComb = xc;
lastMatchboxXComb(xc);
}
/**
* Set parameters for new alpha parameter.
*/
virtual void setAlpha(double )const {assert(false);}
/**
* Return the number of additional random variables
* needed to calculate this virtual correction.
*/
virtual int nDimAdditional() const { return 0; }
//@}
/** @name Conventions */
//@{
/**
* Return true, if the amplitude is DRbar renormalized, otherwise
* MSbar is assumed.
*/
virtual bool isDRbar() const;
/**
* Return true, if this virtual correction
* has been calculated using dimensional reduction.
* CDR is assumed otherwise.
*/
virtual bool isDR() const;
/**
* Return true, if the virtual correction has been calculated in the
* dipole convention.
*/
virtual bool isCS() const;
/**
* Return true, if the virtual correction has been calculated in the
* BDK convention.
*/
virtual bool isBDK() const;
/**
* Return true, if the virtual correction has been calculated in the
* expanded convention.
*/
virtual bool isExpanded() const;
/**
* If defined, return the coefficient of the pole in epsilon^2
*/
virtual double oneLoopDoublePole() const { return 0.; }
/**
* If defined, return the coefficient of the pole in epsilon
*/
virtual double oneLoopSinglePole() const { return 0.; }
//@}
/** @name Evaluate the insertion operator */
//@{
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual double me2() const = 0;
/**
* Evaluate the finite virtual correction for the
* variables supplied through the Born XComb object
* and possible additional random numbers.
*/
virtual CrossSection dSigHatDR() const;
/**
* Evaluate the difference of dSigHatDR with and without alpha
* parameter.
*/
virtual CrossSection dSigHatDRAlphaDiff(double alpha) const{
setAlpha(alpha);
CrossSection res=dSigHatDR();
setAlpha(1.);
return res-dSigHatDR();
}
//@}
/** @name Caching and helpers to setup insertion operator objects. */
//@{
/**
* Inform this matrix element that a new phase space
* point is about to be generated, so all caches should
* be flushed.
*/
virtual void flushCaches() {}
/**
* Clone this insertion operator.
*/
Ptr<MatchboxInsertionOperator>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<MatchboxInsertionOperator>::ptr>(clone());
}
/**
* Clone the dependencies, using a given prefix.
*/
virtual void cloneDependencies(const std::string& prefix = "");
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxInsertionOperator & operator=(const MatchboxInsertionOperator &);
+ MatchboxInsertionOperator & operator=(const MatchboxInsertionOperator &) = delete;
};
}
#endif /* HERWIG_MatchboxInsertionOperator_H */
diff --git a/MatrixElement/Matchbox/MatchboxFactory.h b/MatrixElement/Matchbox/MatchboxFactory.h
--- a/MatrixElement/Matchbox/MatchboxFactory.h
+++ b/MatrixElement/Matchbox/MatchboxFactory.h
@@ -1,1305 +1,1305 @@
// -*- C++ -*-
//
// MatchboxFactory.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MatchboxFactory_H
#define HERWIG_MatchboxFactory_H
//
// This is the declaration of the MatchboxFactory class.
//
#include "ThePEG/Handlers/SubProcessHandler.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxAmplitude.h"
#include "Herwig/MatrixElement/Matchbox/Utility/Tree2toNGenerator.h"
#include "Herwig/MatrixElement/Matchbox/Utility/ProcessData.h"
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "Herwig/MatrixElement/Matchbox/Base/SubtractedME.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxFactory automatically sets up a NLO
* QCD calculation carried out in dipole subtraction.
*
* @see \ref MatchboxFactoryInterfaces "The interfaces"
* defined for MatchboxFactory.
*/
class MatchboxFactory: public SubProcessHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxFactory();
/**
* The destructor.
*/
virtual ~MatchboxFactory();
//@}
public:
/**
* Pointer to the current factory object
*/
static const Ptr<MatchboxFactory>::tptr currentFactory() {
assert(theCurrentFactory);
return theCurrentFactory;
}
private:
/**
* Pointer to the current factory object
*/
static Ptr<MatchboxFactory>::tptr theCurrentFactory;
public:
/**
* Flag to indicate that at least one MatchboxFactory object is in action
*/
static bool isMatchboxRun() {
return theIsMatchboxRun();
}
/** @name Process and diagram information */
//@{
/**
* Return the diagram generator.
*/
Ptr<Tree2toNGenerator>::tptr diagramGenerator() const { return theDiagramGenerator; }
/**
* Set the diagram generator.
*/
void diagramGenerator(Ptr<Tree2toNGenerator>::ptr dg) { theDiagramGenerator = dg; }
/**
* Return the process data.
*/
Ptr<ProcessData>::tptr processData() const { return theProcessData; }
/**
* Set the process data.
*/
void processData(Ptr<ProcessData>::ptr pd) { theProcessData = pd; }
/**
* Return the number of light flavours, this matrix
* element is calculated for.
*/
unsigned int nLight() const { return theNLight; }
/**
* Set the number of light flavours, this matrix
* element is calculated for.
*/
void nLight(unsigned int n) { theNLight = n; }
/**
* Return the vector that contains the PDG ids of
* the light flavours, which are contained in the
* jet particle group.
*/
vector<long> nLightJetVec() const { return theNLightJetVec; }
/**
* Set the elements of the vector that contains the PDG
* ids of the light flavours, which are contained in the
* jet particle group.
*/
void nLightJetVec(long n) { theNLightJetVec.push_back(n); }
/**
* Return the vector that contains the PDG ids of
* the heavy flavours, which are contained in the
* jet particle group.
*/
vector<long> nHeavyJetVec() const { return theNHeavyJetVec; }
/**
* Set the elements of the vector that contains the PDG
* ids of the heavy flavours, which are contained in the
* jet particle group.
*/
void nHeavyJetVec(long n) { theNHeavyJetVec.push_back(n); }
/**
* Return the vector that contains the PDG ids of
* the light flavours, which are contained in the
* proton particle group.
*/
vector<long> nLightProtonVec() const { return theNLightProtonVec; }
/**
* Set the elements of the vector that contains the PDG
* ids of the light flavours, which are contained in the
* proton particle group.
*/
void nLightProtonVec(long n) { theNLightProtonVec.push_back(n); }
/**
* Return the order in \f$\alpha_S\f$.
*/
unsigned int orderInAlphaS() const { return theOrderInAlphaS; }
/**
* Set the order in \f$\alpha_S\f$.
*/
void orderInAlphaS(unsigned int o) { theOrderInAlphaS = o; }
/**
* Return the order in \f$\alpha_{EM}\f$.
*/
unsigned int orderInAlphaEW() const { return theOrderInAlphaEW; }
/**
* Set the order in \f$\alpha_{EM}\f$.
*/
void orderInAlphaEW(unsigned int o) { theOrderInAlphaEW = o; }
/**
* The multiplicity of legs with virtual contributions.
*/
size_t highestVirt() const {return theHighestVirtualSize;}
/**
* Set the highest
**/
void setHighestVirt(size_t n){theHighestVirtualSize=n;}
/**
* Access the processes vector.
*/
const vector<vector<string> > getProcesses() const {return processes;}
/**
* Return true, if all processes up to a maximum order are considered
*/
bool allProcesses() const { return theAllProcesses; }
/**
* Switch on/off inclusino off all processes up to a maximum order
*/
void setAllProcesses(bool on = true) { theAllProcesses = on; }
/**
* Return true, if Born contributions should be included.
*/
bool bornContributions() const { return theBornContributions; }
/**
* Switch on or off Born contributions
*/
void setBornContributions(bool on = true) { theBornContributions = on; }
/**
* Return true, if virtual contributions should be included.
*/
bool virtualContributions() const { return theVirtualContributions; }
/**
* Switch on or off virtual contributions
*/
void setVirtualContributions(bool on = true) { theVirtualContributions = on; }
/**
* Produce matrix element corrections, but no NLO
*/
bool meCorrectionsOnly() const { return theMECorrectionsOnly; }
/**
* Switch to produce matrix element corrections, but no NLO
*/
void setMECorrectionsOnly(bool on = true) { theMECorrectionsOnly = on; }
/**
* Produce matrix element corrections, with LoopSim NLO
*/
bool loopSimCorrections() const { return theLoopSimCorrections; }
/**
* Switch to produce matrix element corrections, with LoopSim NLO
*/
void setLoopSimCorrections(bool on = true) { theLoopSimCorrections = on; }
/**
* Return true, if subtracted real emission contributions should be included.
*/
bool realContributions() const { return theRealContributions; }
/**
* Switch on or off subtracted real emission contributions
*/
void setRealContributions(bool on = true) { theRealContributions = on; }
/**
* Return true, if virtual contributions should be treated as independent subprocesses
*/
bool independentVirtuals() const { return theIndependentVirtuals; }
/**
* Switch on/off virtual contributions should be treated as independent subprocesses
*/
void setIndependentVirtuals(bool on = true) { theIndependentVirtuals = on; }
/**
* Return true, if PK operator contributions should be treated as independent subprocesses
*/
bool independentPKs() const { return theIndependentPKs; }
/**
* Switch on/off PK operator contributions should be treated as independent subprocesses
*/
void setIndependentPKs(bool on = true) { theIndependentPKs = on; }
/**
* Return true, if SubProcessGroups should be
* setup from this MEGroup. If not, a single SubProcess
* is constructed from the data provided by the
* head matrix element.
*/
virtual bool subProcessGroups() const { return !showerApproximation(); }
/**
* Return true, if subtraction scales should be caluclated from real emission kinematics
*/
bool realEmissionScales() const { return theRealEmissionScales; }
/**
* Switch on/off that subtraction scales should be caluclated from real emission kinematics
*/
void setRealEmissionScales(bool on = true) { theRealEmissionScales = on; }
/**
* Set the shower approximation.
*/
void showerApproximation(Ptr<ShowerApproximation>::tptr app) { theShowerApproximation = app; }
/**
* Return the shower approximation.
*/
Ptr<ShowerApproximation>::tptr showerApproximation() const { return theShowerApproximation; }
//@}
/** @name Phasespace generation and scale choice */
//@{
/**
* Return the phase space generator to be used.
*/
Ptr<MatchboxPhasespace>::tptr phasespace() const { return thePhasespace; }
/**
* Set the phase space generator to be used.
*/
void phasespace(Ptr<MatchboxPhasespace>::ptr ps) { thePhasespace = ps; }
/**
* Set the scale choice object
*/
void scaleChoice(Ptr<MatchboxScaleChoice>::ptr sc) { theScaleChoice = sc; }
/**
* Return the scale choice object
*/
Ptr<MatchboxScaleChoice>::tptr scaleChoice() const { return theScaleChoice; }
/**
* Get the factorization scale factor
*/
double factorizationScaleFactor() const { return theFactorizationScaleFactor; }
/**
* Set the factorization scale factor
*/
void factorizationScaleFactor(double f) { theFactorizationScaleFactor = f; }
/**
* Get the renormalization scale factor
*/
double renormalizationScaleFactor() const { return theRenormalizationScaleFactor; }
/**
* Set the renormalization scale factor
*/
void renormalizationScaleFactor(double f) { theRenormalizationScaleFactor = f; }
/**
* Return true, if fixed couplings are used.
*/
bool fixedCouplings() const { return theFixedCouplings; }
/**
* Switch on fixed couplings.
*/
void setFixedCouplings(bool on = true) { theFixedCouplings = on; }
/**
* Return true, if fixed couplings are used.
*/
bool fixedQEDCouplings() const { return theFixedQEDCouplings; }
/**
* Switch on fixed couplings.
*/
void setFixedQEDCouplings(bool on = true) { theFixedQEDCouplings = on; }
/**
* Return true, if veto scales should be set
* for the real emission
*/
bool vetoScales() const { return theVetoScales; }
/**
* Switch on setting veto scales
*/
void doVetoScales() { theVetoScales = true; }
/**
* Switch off setting veto scales
*/
void noVetoScales() { theVetoScales = true; }
//@}
/** @name Amplitudes and caching */
//@{
/**
* Return the amplitudes to be considered
*/
const vector<Ptr<MatchboxAmplitude>::ptr>& amplitudes() const { return theAmplitudes; }
/**
* Access the amplitudes to be considered
*/
vector<Ptr<MatchboxAmplitude>::ptr>& amplitudes() { return theAmplitudes; }
//@}
/** @name Matrix element objects. */
//@{
/**
* Return the Born matrix elements to be considered
*/
const vector<Ptr<MatchboxMEBase>::ptr>& bornMEs() const { return theBornMEs; }
/**
* Access the Born matrix elements to be considered
*/
vector<Ptr<MatchboxMEBase>::ptr>& bornMEs() { return theBornMEs; }
/**
* Return the loop induced matrix elements to be considered
*/
const vector<Ptr<MatchboxMEBase>::ptr>& loopInducedMEs() const { return theLoopInducedMEs; }
/**
* Access the loop induced matrix elements to be considered
*/
vector<Ptr<MatchboxMEBase>::ptr>& loopInducedMEs() { return theLoopInducedMEs; }
/**
* Return the processes to be ordered from an OLP
*/
const map<Ptr<MatchboxAmplitude>::tptr,
map<pair<Process,int>,int> >&
olpProcesses() const { return theOLPProcesses; }
/**
* Access the processes to be ordered from an OLP
*/
map<Ptr<MatchboxAmplitude>::tptr,
map<pair<Process,int>,int> >&
olpProcesses() { return theOLPProcesses; }
/**
* Order an OLP process and return its id
*/
int orderOLPProcess(const Process& p,
Ptr<MatchboxAmplitude>::tptr amp,
int type);
/**
* Return the amplitudes which need external initialization
*/
const set<Ptr<MatchboxAmplitude>::tptr>& externalAmplitudes() const {
return theExternalAmplitudes;
}
/**
* Access the amplitudes which need external initialization
*/
set<Ptr<MatchboxAmplitude>::tptr>& externalAmplitudes() {
return theExternalAmplitudes;
}
/**
* Return the virtual corrections to be considered
*/
const vector<Ptr<MatchboxInsertionOperator>::ptr>& virtuals() const { return theVirtuals; }
/**
* Access the virtual corrections to be considered
*/
vector<Ptr<MatchboxInsertionOperator>::ptr>& virtuals() { return theVirtuals; }
/**
* Return the produced NLO matrix elements
*/
const vector<Ptr<MatchboxMEBase>::ptr>& bornVirtualMEs() const { return theBornVirtualMEs; }
/**
* Access the produced NLO matrix elements
*/
vector<Ptr<MatchboxMEBase>::ptr>& bornVirtualMEs() { return theBornVirtualMEs; }
/**
* Return the real emission matrix elements to be considered
*/
const vector<Ptr<MatchboxMEBase>::ptr>& realEmissionMEs() const { return theRealEmissionMEs; }
/**
* Access the real emission matrix elements to be considered
*/
vector<Ptr<MatchboxMEBase>::ptr>& realEmissionMEs() { return theRealEmissionMEs; }
/**
* Return, which set of dipoles should be considered
*/
int dipoleSet() const { return theDipoleSet; }
/**
* Return, which set of dipoles should be considered
*/
void dipoleSet(int s) { theDipoleSet = s; }
/**
* Return the produced subtracted matrix elements
*/
const vector<Ptr<SubtractedME>::ptr>& subtractedMEs() const { return theSubtractedMEs; }
/**
* Access the produced subtracted matrix elements
*/
vector<Ptr<SubtractedME>::ptr>& subtractedMEs() { return theSubtractedMEs; }
/**
* Return the produced finite real emission matrix elements
*/
const vector<Ptr<MatchboxMEBase>::ptr>& finiteRealMEs() const { return theFiniteRealMEs; }
/**
* Access the produced finite real emission elements
*/
vector<Ptr<MatchboxMEBase>::ptr>& finiteRealMEs() { return theFiniteRealMEs; }
/**
* Return the map of Born processes to splitting dipoles
*/
const map<cPDVector,set<Ptr<SubtractionDipole>::ptr> >& splittingDipoles() const {
return theSplittingDipoles;
}
/**
* Identify a splitting channel
*/
struct SplittingChannel {
/**
* The Born XComb
*/
StdXCombPtr bornXComb;
/**
* The real XComb
*/
StdXCombPtr realXComb;
/**
* The set of tilde XCombs to consider for the real xcomb
*/
vector<StdXCombPtr> tildeXCombs;
/**
* The dipole in charge of the splitting
*/
Ptr<SubtractionDipole>::ptr dipole;
/**
* Dump the setup
*/
void print(ostream&) const;
};
/**
* Generate all splitting channels for the Born process handled by
* the given XComb
*/
list<SplittingChannel> getSplittingChannels(tStdXCombPtr xc) const;
/**
* Return the reweight objects for matrix elements
*/
const vector<ReweightPtr>& reweighters() const { return theReweighters; }
/**
* Access the reweight objects for matrix elements
*/
vector<ReweightPtr>& reweighters() { return theReweighters; }
/**
* Return the preweight objects for matrix elements
*/
const vector<ReweightPtr>& preweighters() const { return thePreweighters; }
/**
* Access the preweight objects for matrix elements
*/
vector<ReweightPtr>& preweighters() { return thePreweighters; }
//@}
/** @name Setup the matrix elements */
//@{
/**
* Return true if this object needs to be initialized before all
* other objects (except those for which this function also returns
* true). This default version always returns false, but subclasses
* may override it to return true.
*/
virtual bool preInitialize() const { return true; }
/**
* Prepare a matrix element.
*/
void prepareME(Ptr<MatchboxMEBase>::ptr);
/**
* Check consistency and switch to porduction mode.
*/
virtual void productionMode();
/**
* Setup everything
*/
virtual void setup();
/**
* The highest multiplicity of legs having virtual contributions.(needed for madgraph)
*/
size_t highestVirt(){return theHighestVirtualsize;}
//@}
/** @name Diagnostic information */
//@{
/**
* Return true, if verbose
*/
bool verbose() const { return theVerbose; }
/**
* Switch on diagnostic information.
*/
void setVerbose(bool on = true) { theVerbose = on; }
/**
* Return true, if verbose while initializing
*/
bool initVerbose() const { return theInitVerbose || verbose(); }
/**
* Switch on diagnostic information while initializing
*/
void setInitVerbose(bool on = true) { theInitVerbose = on; }
/**
* Dump the setup
*/
void print(ostream&) const;
/**
* Return the subtraction data prefix.
*/
const string& subtractionData() const { return theSubtractionData; }
/**
* Set the subtraction data prefix.
*/
void subtractionData(const string& s) { theSubtractionData = s; }
/**
* Return the subtraction plot type.
*/
const int& subtractionPlotType() const { return theSubtractionPlotType; }
/**
* Set the subtraction plot type.
*/
void subtractionPlotType(const int& t) { theSubtractionPlotType = t; }
/**
* Return whether subtraction data should be plotted for all phase space points individually
*/
const bool& subtractionScatterPlot() const { return theSubtractionScatterPlot; }
/**
* Set whether subtraction data should be plotted for all phase space points individually
*/
void subtractionScatterPlot(const bool& s) { theSubtractionScatterPlot = s; }
/**
* Return the pole data prefix.
*/
const string& poleData() const { return thePoleData; }
/**
* Set the pole data prefix.
*/
void poleData(const string& s) { thePoleData = s; }
/**
* Return true, if cancellationn of epsilon poles should be checked.
*/
bool checkPoles() const { return poleData() != ""; }
//@}
/** @name Process generation */
//@{
/**
* Return the particle groups.
*/
const map<string,PDVector>& particleGroups() const { return theParticleGroups; }
/**
* Access the particle groups.
*/
map<string,PDVector>& particleGroups() { return theParticleGroups; }
/**
* Return true, if the given particle is incoming
*/
bool isIncoming(cPDPtr p) const {
return theIncoming.find(p->id()) != theIncoming.end();
}
/**
* Return true, if spin correlation information should be provided, if possible.
*/
bool spinCorrelations() const { return theSpinCorrelations; }
/**
* Indicate that spin correlation information should be provided, if possible.
*/
void setSpinCorrelations(bool yes) { theSpinCorrelations = yes; }
//@}
/** @name Truncated qtilde shower information */
//@{
/**
* Return the subprocess of the real emission
*/
tSubProPtr hardTreeSubprocess() { return theHardtreeSubprocess; }
/**
* Set the subprocess of the real emission for use in calculating the shower hardtree
*/
void setHardTreeSubprocess(tSubProPtr hardTree) { theHardtreeSubprocess = hardTree; }
/**
* Return the born emitter
*/
int hardTreeEmitter() { return theHardtreeEmitter; }
/**
* Set the born emitter for use in calculating the shower hardtree
*/
void setHardTreeEmitter(int emitter) { theHardtreeEmitter = emitter; }
/**
* Return the born spectator
*/
int hardTreeSpectator() { return theHardtreeSpectator; }
/**
* Set the born spectator for use in calculating the shower hardtree
*/
void setHardTreeSpectator(int spectator) { theHardtreeSpectator = spectator; }
//@}
/** @name Data handling */
//@{
/**
* Return (and possibly create) a directory to contain amplitude
* information.
*/
const string& buildStorage();
/**
* Return (and possibly create) a directory to contain integration grid
* information.
*/
const string& runStorage();
/**
* alpha of http://arxiv.org/pdf/hep-ph/0307268v2.pdf to restrict
* dipole phase space
*/
double alphaParameter() const { return theAlphaParameter; }
/**
* set the alpha parameter (needed for massive PK-Operator)
*/
void setAlphaParameter(double a)const { theAlphaParameter = a; }
//@}
public:
/**
* Print a summary of the parameters used
*/
void summary(ostream&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* Flag to indicate that at least one MatchboxFactory object is in action
*/
static bool& theIsMatchboxRun();
/**
* The diagram generator.
*/
Ptr<Tree2toNGenerator>::ptr theDiagramGenerator;
/**
* The process data object to be used
*/
Ptr<ProcessData>::ptr theProcessData;
/**
* The number of light flavours, this matrix
* element is calculated for.
*/
unsigned int theNLight;
/**
* Vector with the PDG ids of the light quark flavours,
* which are contained in the jet particle group.
*/
vector<long> theNLightJetVec;
/**
* Vector with the PDG ids of the heavy quark flavours,
* which are contained in the jet particle group.
*/
vector<long> theNHeavyJetVec;
/**
* Vector with the PDG ids of the light quark flavours,
* which are contained in the proton particle group.
*/
vector<long> theNLightProtonVec;
/**
* The order in \f$\alpha_S\f$.
*/
unsigned int theOrderInAlphaS;
/**
* The order in \f$\alpha_{EM}\f$.
*/
unsigned int theOrderInAlphaEW;
/**
* The maximum number of legs with virtual corrections.
**/
unsigned int theHighestVirtualSize;
/**
* Switch on or off Born contributions
*/
bool theBornContributions;
/**
* Switch on or off virtual contributions
*/
bool theVirtualContributions;
/**
* Switch on or off subtracted real emission contributions should be included.
*/
bool theRealContributions;
/**
* True if virtual contributions should be treated as independent subprocesses
*/
bool theIndependentVirtuals;
/**
* True if PK operator contributions should be treated as independent subprocesses
*/
bool theIndependentPKs;
/**
* The phase space generator to be used.
*/
Ptr<MatchboxPhasespace>::ptr thePhasespace;
/**
* The scale choice object
*/
Ptr<MatchboxScaleChoice>::ptr theScaleChoice;
/**
* The factorization scale factor.
*/
double theFactorizationScaleFactor;
/**
* The renormalization scale factor.
*/
double theRenormalizationScaleFactor;
/**
* Use non-running couplings.
*/
bool theFixedCouplings;
/**
* Use non-running couplings.
*/
bool theFixedQEDCouplings;
/**
* True, if veto scales should be set
* for the real emission
*/
bool theVetoScales;
/**
* The amplitudes to be considered
*/
vector<Ptr<MatchboxAmplitude>::ptr> theAmplitudes;
/**
* The Born matrix elements to be considered
*/
vector<Ptr<MatchboxMEBase>::ptr> theBornMEs;
/**
* The loop induced matrix elements to be considered
*/
vector<Ptr<MatchboxMEBase>::ptr> theLoopInducedMEs;
/**
* The virtual corrections to be considered
*/
vector<Ptr<MatchboxInsertionOperator>::ptr> theVirtuals;
/**
* The real emission matrix elements to be considered
*/
vector<Ptr<MatchboxMEBase>::ptr> theRealEmissionMEs;
/**
* The produced NLO matrix elements
*/
vector<Ptr<MatchboxMEBase>::ptr> theBornVirtualMEs;
/**
* The produced subtracted matrix elements
*/
vector<Ptr<SubtractedME>::ptr> theSubtractedMEs;
/**
* The produced finite real emission matrix elements
*/
vector<Ptr<MatchboxMEBase>::ptr> theFiniteRealMEs;
/**
* Which set of dipoles should be considered
*/
int theDipoleSet;
/**
* Switch on or off verbosity
*/
bool theVerbose;
/**
* True, if verbose while initializing
*/
bool theInitVerbose;
/**
* Prefix for subtraction data
*/
string theSubtractionData;
/**
* Set the type of plot that is to be generated for subtraction checking
*/
int theSubtractionPlotType;
/**
* Set whether subtraction data should be plotted for all phase space points individually
*/
bool theSubtractionScatterPlot;
/**
* Prefix for pole data.
*/
string thePoleData;
/**
* Command to limit the real emission process to be considered.
*/
string doSingleRealProcess(string);
/**
* The real emission process to be included; if empty, all possible
* ones will be considered.
*/
vector<vector<string> > realEmissionProcesses;
/**
* Particle groups.
*/
map<string,PDVector> theParticleGroups;
/**
* Command to start a particle group.
*/
string startParticleGroup(string);
/**
* The name of the particle group currently edited.
*/
string particleGroupName;
/**
* The particle group currently edited.
*/
PDVector particleGroup;
/**
* Command to end a particle group.
*/
string endParticleGroup(string);
protected:
/**
* Parse a process description
*/
virtual vector<string> parseProcess(string);
private:
/**
* Command to set the process.
*/
string doProcess(string);
/**
* Command to set the process.
*/
string doLoopInducedProcess(string);
/**
* The process to consider in terms of particle groups.
*/
vector<vector<string> > processes;
/**
* The loop induced process to consider in terms of particle groups.
*/
vector<vector<string> > loopInducedProcesses;
/**
* Generate subprocesses.
*/
set<PDVector> makeSubProcesses(const vector<string>&) const;
public:
/**
* Generate matrix element objects for the given process.
*/
vector<Ptr<MatchboxMEBase>::ptr> makeMEs(const vector<string>&,
unsigned int orderas,
bool virt);
private:
/**
* The shower approximation.
*/
Ptr<ShowerApproximation>::ptr theShowerApproximation;
/**
* The map of Born processes to splitting dipoles
*/
map<cPDVector,set<Ptr<SubtractionDipole>::ptr> > theSplittingDipoles;
/**
* True, if subtraction scales should be caluclated from real emission kinematics
*/
bool theRealEmissionScales;
/**
* Consider all processes with order in couplings specifying the
* maximum order.
*/
bool theAllProcesses;
/**
* The processes to be ordered from an OLP
*/
map<Ptr<MatchboxAmplitude>::tptr,map<pair<Process,int>,int> > theOLPProcesses;
/**
* Amplitudes which need external initialization
*/
set<Ptr<MatchboxAmplitude>::tptr> theExternalAmplitudes;
/**
* Amplitudes to be selected on clashing responsibilities.
*/
vector<Ptr<MatchboxAmplitude>::ptr> theSelectedAmplitudes;
/**
* Amplitudes to be deselected on clashing responsibilities.
*/
vector<Ptr<MatchboxAmplitude>::ptr> theDeselectedAmplitudes;
/**
* Reweight objects for matrix elements
*/
vector<ReweightPtr> theReweighters;
/**
* Preweight objects for matrix elements
*/
vector<ReweightPtr> thePreweighters;
/**
* Produce matrix element corrections, but no NLO
*/
bool theMECorrectionsOnly;
/**
* The highest multiplicity of legs having virtual contributions.(needed for madgraph)
*/
int theHighestVirtualsize;
/**
* Produce matrix element corrections, with LoopSim NLO
*/
bool theLoopSimCorrections;
/**
* True, if the setup has already been run.
*/
bool ranSetup;
/**
* PDG ids of incoming particles
*/
set<long> theIncoming;
/**
* True, if first incoming partons originate from perturbative PDF
*/
bool theFirstPerturbativePDF;
/**
* True, if second incoming partons originate from perturbative PDF
*/
bool theSecondPerturbativePDF;
/**
* True, if this Factory is in production mode.
*/
bool inProductionMode;
/**
* The real emission subprocess used when calculating the hardtree
* in the truncated qtilde shower
*/
tSubProPtr theHardtreeSubprocess;
/**
* The born emitter used when calculating the hardtree in
* the truncated shower
*/
int theHardtreeEmitter;
/**
* The born spectator used when calculating the hardtree in
* the truncated shower
*/
int theHardtreeSpectator;
/**
* True, if spin correlation information should be provided, if possible.
*/
bool theSpinCorrelations;
/**
* The alpha parameter to be used for the dipole subtraction
* JB: The parameter is muatble, since we need to be able to change it
* while calculating the difference of IPK with and without alpha.
*/
mutable double theAlphaParameter;
/**
* Wether or not charge conservation should be enforced for the processes
* constructed.
*/
bool theEnforceChargeConservation;
/**
* Wether or not colour conservation should be enforced for the processes
* constructed.
*/
bool theEnforceColourConservation;
/**
* Wether or not lepton number conservation should be enforced for the processes
* constructed.
*/
bool theEnforceLeptonNumberConservation;
/**
* Wether or not quark number conservation should be enforced for the processes
* constructed.
*/
bool theEnforceQuarkNumberConservation;
/**
* Assume flavour diagonal lepton interactions
*/
bool theLeptonFlavourDiagonal;
/**
* Assume flavour diagonal quark interactions
*/
bool theQuarkFlavourDiagonal;
/**
* Command for production mode
*/
string doProductionMode(string) {
productionMode(); return "";
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxFactory & operator=(const MatchboxFactory &);
+ MatchboxFactory & operator=(const MatchboxFactory &) = delete;
};
}
#endif /* HERWIG_MatchboxFactory_H */
diff --git a/MatrixElement/Matchbox/Matching/DipoleMatching.h b/MatrixElement/Matchbox/Matching/DipoleMatching.h
--- a/MatrixElement/Matchbox/Matching/DipoleMatching.h
+++ b/MatrixElement/Matchbox/Matching/DipoleMatching.h
@@ -1,140 +1,140 @@
// -*- C++ -*-
//
// DipoleMatching.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_DipoleMatching_H
#define Herwig_DipoleMatching_H
//
// This is the declaration of the DipoleMatching class.
//
#include "Herwig/Shower/ShowerHandler.h"
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief DipoleMatching implements NLO matching with the dipole shower.
*
*/
class DipoleMatching: public Herwig::ShowerApproximation {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleMatching();
/**
* The destructor.
*/
virtual ~DipoleMatching();
//@}
public:
/**
* Return the shower approximation to the real emission cross
* section for the given pair of Born and real emission
* configurations.
*/
virtual CrossSection dSigHatDR() const;
/**
* Return the shower approximation splitting kernel for the given
* pair of Born and real emission configurations in units of the
* Born center of mass energy squared, and including a weight to
* project onto the splitting given by the dipole used.
*/
virtual double me2() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The shower handler to be used
*/
Ptr<ShowerHandler>::ptr theShowerHandler;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleMatching & operator=(const DipoleMatching &);
+ DipoleMatching & operator=(const DipoleMatching &) = delete;
};
}
#endif /* Herwig_DipoleMatching_H */
diff --git a/MatrixElement/Matchbox/Matching/HardScaleProfile.h b/MatrixElement/Matchbox/Matching/HardScaleProfile.h
--- a/MatrixElement/Matchbox/Matching/HardScaleProfile.h
+++ b/MatrixElement/Matchbox/Matching/HardScaleProfile.h
@@ -1,150 +1,150 @@
// -*- C++ -*-
//
// HardScaleProfile.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_HardScaleProfile_H
#define Herwig_HardScaleProfile_H
//
// This is the declaration of the HardScaleProfile class.
//
#include "ThePEG/Interface/Interfaced.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief HardScaleProfile is the base class for profile scales. A few
* standard choices are provided by this implementation.
*
*/
class HardScaleProfile: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
HardScaleProfile();
/**
* The destructor.
*/
virtual ~HardScaleProfile();
//@}
public:
/**
* Return a scale profile towards the hard scale
*/
virtual double hardScaleProfile(Energy hard, Energy soft) const;
/**
* Return true, if this hard scale profile requires an unrestricted
* radiation phase space.
*/
virtual bool unrestrictedPhasespace() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/**
* Enumerate the possible profiles
*/
enum ProfileTypes {
theta = 0,
/** hard theta cut */
resummation = 1,
/** `resummation' profile with quadratic interpolation */
hfact = 2
/** hfact profile */
};
/**
* A fixed hard scale to be used instead of the hard scale decided
* for the process in question.
*/
Energy theFixedHardScale;
/**
* A dimensionless width parameter setting the smearing size
* relative to the hard scale; this may have different
* interpretations depending on the profile type chosen.
*/
double theProfileRho;
/**
* The profile type to be used
*/
int theProfileType;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HardScaleProfile & operator=(const HardScaleProfile &);
+ HardScaleProfile & operator=(const HardScaleProfile &) = delete;
};
}
#endif /* Herwig_HardScaleProfile_H */
diff --git a/MatrixElement/Matchbox/Matching/MEMatching.h b/MatrixElement/Matchbox/Matching/MEMatching.h
--- a/MatrixElement/Matchbox/Matching/MEMatching.h
+++ b/MatrixElement/Matchbox/Matching/MEMatching.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
//
// MEMatching.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MEMatching_H
#define Herwig_MEMatching_H
//
// This is the declaration of the MEMatching class.
//
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MEMatching implements NLO matching with matrix element correction (aka Powheg).
*
*/
class MEMatching: public Herwig::ShowerApproximation {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MEMatching();
/**
* The destructor.
*/
virtual ~MEMatching();
//@}
public:
/**
* Return true, if this shower approximation will require a
* splitting generator
*/
virtual bool needsSplittingGenerator() const { return true; }
/**
* Return true, if this shower approximation will require
* H events
*/
virtual bool hasHEvents() const { return restrictPhasespace() || profileScales(); }
/**
* Return true, if this shower approximation will require
* a truncated parton shower
*/
virtual bool needsTruncatedShower() const { return theTruncatedShower; }
public:
/**
* Return the shower approximation to the real emission cross
* section for the given pair of Born and real emission
* configurations.
*/
virtual CrossSection dSigHatDR() const;
/**
* Return the shower approximation splitting kernel for the given
* pair of Born and real emission configurations in units of the
* Born center of mass energy squared, and including a weight to
* project onto the splitting given by the dipole used.
*/
virtual double me2() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEMatching & operator=(const MEMatching &);
+ MEMatching & operator=(const MEMatching &) = delete;
/**
* True, if a truncated parton shower should be generated
*/
bool theTruncatedShower;
};
}
#endif /* Herwig_MEMatching_H */
diff --git a/MatrixElement/Matchbox/Matching/Makefile.am b/MatrixElement/Matchbox/Matching/Makefile.am
--- a/MatrixElement/Matchbox/Matching/Makefile.am
+++ b/MatrixElement/Matchbox/Matching/Makefile.am
@@ -1,24 +1,24 @@
noinst_LTLIBRARIES = libHwMatchboxMatching.la
pkglib_LTLIBRARIES = HwQTildeMatching.la HwDipoleMatching.la
libHwMatchboxMatching_la_SOURCES = \
HardScaleProfile.h \
HardScaleProfile.cc \
ShowerApproximation.h \
ShowerApproximation.cc \
ShowerApproximationKernel.h \
ShowerApproximationKernel.cc \
ShowerApproximationGenerator.h \
ShowerApproximationGenerator.cc \
MEMatching.h \
MEMatching.cc
-HwQTildeMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0
+HwQTildeMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
HwQTildeMatching_la_SOURCES = \
QTildeMatching.h \
QTildeMatching.cc
-HwDipoleMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:1:0
+HwDipoleMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
HwDipoleMatching_la_SOURCES = \
DipoleMatching.h \
DipoleMatching.cc
diff --git a/MatrixElement/Matchbox/Matching/QTildeMatching.cc b/MatrixElement/Matchbox/Matching/QTildeMatching.cc
--- a/MatrixElement/Matchbox/Matching/QTildeMatching.cc
+++ b/MatrixElement/Matchbox/Matching/QTildeMatching.cc
@@ -1,538 +1,538 @@
// -*- C++ -*-
//
// QTildeMatching.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the QTildeMatching class.
//
#include "QTildeMatching.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
#include "Herwig/Shower/QTilde/Kinematics/KinematicHelpers.h"
using namespace Herwig;
QTildeMatching::QTildeMatching()
: theCorrectForXZMismatch(true) {}
QTildeMatching::~QTildeMatching() {}
IBPtr QTildeMatching::clone() const {
return new_ptr(*this);
}
IBPtr QTildeMatching::fullclone() const {
return new_ptr(*this);
}
void QTildeMatching::checkCutoff() {
if ( showerTildeKinematics() ) {
showerTildeKinematics()->
prepare(realCXComb(),bornCXComb());
showerTildeKinematics()->dipole(dipole());
showerTildeKinematics()->getShowerVariables();
}
}
void QTildeMatching::getShowerVariables() {
// already filled from checkCutoff in this case
if ( showerTildeKinematics() )
return;
// get the shower variables
calculateShowerVariables();
// check for the cutoff
dipole()->isAboveCutoff(isAboveCutoff());
// get the hard scale
dipole()->showerHardScale(hardScale());
// check for phase space
dipole()->isInShowerPhasespace(isInShowerPhasespace());
}
bool QTildeMatching::isInShowerPhasespace() const {
Energy qtildeHard = ZERO;
Energy qtilde = dipole()->showerScale();
assert(!dipole()->showerParameters().empty());
double z = dipole()->showerParameters()[0];
// FF
if ( dipole()->bornEmitter() > 1 && dipole()->bornSpectator() > 1 ) {
qtildeHard =
theQTildeFinder->
calculateFinalFinalScales(bornCXComb()->meMomenta()[dipole()->bornEmitter()],
bornCXComb()->meMomenta()[dipole()->bornSpectator()]).first;
}
// FI
if ( dipole()->bornEmitter() > 1 && dipole()->bornSpectator() < 2 ) {
qtildeHard =
theQTildeFinder->
calculateInitialFinalScales(bornCXComb()->meMomenta()[dipole()->bornSpectator()],
bornCXComb()->meMomenta()[dipole()->bornEmitter()],false).second;
}
// IF
if ( dipole()->bornEmitter() < 2 && dipole()->bornSpectator() > 1 ) {
qtildeHard =
theQTildeFinder->
calculateInitialFinalScales(bornCXComb()->meMomenta()[dipole()->bornEmitter()],
bornCXComb()->meMomenta()[dipole()->bornSpectator()],false).first;
if ( z < (dipole()->bornEmitter() == 0 ? bornCXComb()->lastX1() : bornCXComb()->lastX2()) )
return false;
}
// II
if ( dipole()->bornEmitter() < 2 && dipole()->bornSpectator() < 2 ) {
qtildeHard =
theQTildeFinder->
calculateInitialInitialScales(bornCXComb()->meMomenta()[dipole()->bornEmitter()],
bornCXComb()->meMomenta()[dipole()->bornSpectator()]).first;
if ( z < (dipole()->bornEmitter() == 0 ? bornCXComb()->lastX1() : bornCXComb()->lastX2()) )
return false;
}
Energy2 pt2 = ZERO;
const vector<Energy> & masses = theQTildeSudakov->virtualMasses({{
bornCXComb()->mePartonData()[dipole()->bornEmitter() ],
realCXComb()->mePartonData()[dipole()->realEmitter() ],
realCXComb()->mePartonData()[dipole()->realEmission()]
}});
const Energy2 m22 = sqr(masses[2]);
if ( dipole()->bornEmitter() > 1 ) {
const Energy2 m02 = sqr(masses[0]);
const Energy2 m12 = sqr(masses[1]);
- pt2 = QTildeKinematics::pT2_FSR(sqr(qtilde),z,m02,m12,m22);
+ pt2 = QTildeKinematics::pT2_FSR(sqr(qtilde),z,m02,m12,m22,m12,m22);
}
else {
pt2 = QTildeKinematics::pT2_ISR(sqr(qtilde),z,m22);
}
if ( pt2 < max(theQTildeSudakov->pT2min(),sqr(safeCut()) ))
return false;
bool hardVeto = restrictPhasespace() && sqrt(pt2) >= dipole()->showerHardScale();
return qtilde <= qtildeHard && !hardVeto;
}
bool QTildeMatching::isAboveCutoff() const {
Energy qtilde = dipole()->showerScale();
assert(!dipole()->showerParameters().empty());
double z = dipole()->showerParameters()[0];
const vector<Energy> & masses = theQTildeSudakov->virtualMasses({{
bornCXComb()->mePartonData()[dipole()->bornEmitter() ],
realCXComb()->mePartonData()[dipole()->realEmitter() ],
realCXComb()->mePartonData()[dipole()->realEmission()]
}});
const Energy2 m22 = sqr(masses[2]);
if ( dipole()->bornEmitter() > 1 ) {
const Energy2 m02 = sqr(masses[0]);
const Energy2 m12 = sqr(masses[1]);
- const Energy2 pt2 = QTildeKinematics::pT2_FSR(sqr(qtilde),z,m02,m12,m22);
+ const Energy2 pt2 = QTildeKinematics::pT2_FSR(sqr(qtilde),z,m02,m12,m22,m12,m22);
return pt2 >= max(theQTildeSudakov->pT2min(),sqr(safeCut()));
}
else {
const Energy2 pt2 = QTildeKinematics::pT2_ISR(sqr(qtilde),z,m22);
return pt2 >= max(theQTildeSudakov->pT2min(),sqr(safeCut()));
}
return false;
}
CrossSection QTildeMatching::dSigHatDR() const {
assert(!dipole()->showerParameters().empty());
pair<Energy2,double> vars =
make_pair(sqr(dipole()->showerScale()),
dipole()->showerParameters()[0]);
pair<int,int> ij(dipole()->bornEmitter(),
dipole()->bornSpectator());
double ccme2 =
dipole()->underlyingBornME()->largeNColourCorrelatedME2(ij,theLargeNBasis);
if(ccme2==0.)return 0.*nanobarn;
double lnme2=dipole()->underlyingBornME()->largeNME2(theLargeNBasis);
if(lnme2==0){
generator()->log() <<"\nQTildeMatching: ";
generator()->log() <<"\n largeNME2 is ZERO, while largeNColourCorrelatedME2 is not ZERO." ;
generator()->log() <<"\n This is too seriuos.\n" ;
generator()->log() << Exception::runerror;
}
ccme2 *=
dipole()->underlyingBornME()->me2() /lnme2;
Energy2 prop = ZERO;
if ( dipole()->bornEmitter() > 1 ) {
prop =
(realCXComb()->meMomenta()[dipole()->realEmitter()] +
realCXComb()->meMomenta()[dipole()->realEmission()]).m2()
- bornCXComb()->meMomenta()[dipole()->bornEmitter()].m2();
} else {
prop =
2.*vars.second*(realCXComb()->meMomenta()[dipole()->realEmitter()]*
realCXComb()->meMomenta()[dipole()->realEmission()]);
}
// note alphas included downstream from subtractionScaleWeight()
double xme2 = -8.*Constants::pi*ccme2*splitFn(vars)*realXComb()->lastSHat()/prop;
xme2 *=
pow(realCXComb()->lastSHat() / bornCXComb()->lastSHat(),
bornCXComb()->mePartonData().size()-4.);
double bornPDF = bornPDFWeight(dipole()->underlyingBornME()->lastScale());
if ( bornPDF == 0.0 )
return ZERO;
xme2 *= bornPDF;
xme2 *= dipole()->realEmissionME()->finalStateSymmetry() /
dipole()->underlyingBornME()->finalStateSymmetry();
// take care of mismatch between z and x as we are approaching the
// hard phase space boundary
// TODO get rid of this useless scale option business and simplify PDF handling in here
if ( dipole()->bornEmitter() < 2 && theCorrectForXZMismatch ) {
Energy2 emissionScale = ZERO;
if ( emissionScaleInSubtraction() == showerScale ) {
emissionScale = showerFactorizationScale();
} else if ( emissionScaleInSubtraction() == realScale ) {
emissionScale = dipole()->realEmissionME()->lastScale();
} else if ( emissionScaleInSubtraction() == bornScale ) {
emissionScale = dipole()->underlyingBornME()->lastScale();
}
double xzMismatch =
dipole()->subtractionParameters()[0] / dipole()->showerParameters()[0];
double realCorrectedPDF =
dipole()->bornEmitter() == 0 ?
dipole()->realEmissionME()->pdf1(emissionScale,theExtrapolationX,
xzMismatch) :
dipole()->realEmissionME()->pdf2(emissionScale,theExtrapolationX,
xzMismatch);
double realPDF =
dipole()->bornEmitter() == 0 ?
dipole()->realEmissionME()->pdf1(emissionScale,theExtrapolationX,1.0) :
dipole()->realEmissionME()->pdf2(emissionScale,theExtrapolationX,1.0);
if ( realPDF == 0.0 || realCorrectedPDF == 0.0 )
return ZERO;
xme2 *= realCorrectedPDF / realPDF;
}
Energy qtilde = sqrt(vars.first);
double z = vars.second;
Energy2 pt2 = ZERO;
const vector<Energy> & masses = theQTildeSudakov->virtualMasses({{
bornCXComb()->mePartonData()[dipole()->bornEmitter() ],
realCXComb()->mePartonData()[dipole()->realEmitter() ],
realCXComb()->mePartonData()[dipole()->realEmission()]
}});
const Energy2 m22 = sqr(masses[2]);
if ( dipole()->bornEmitter() > 1 ) {
const Energy2 m02 = sqr(masses[0]);
const Energy2 m12 = sqr(masses[1]);
- pt2 = QTildeKinematics::pT2_FSR(sqr(qtilde),z,m02,m12,m22);
+ pt2 = QTildeKinematics::pT2_FSR(sqr(qtilde),z,m02,m12,m22,m12,m22);
}
else {
pt2 = QTildeKinematics::pT2_ISR(sqr(qtilde),z,m22);
}
assert(pt2 >= ZERO);
if ( profileScales() )
xme2 *= profileScales()->hardScaleProfile(dipole()->showerHardScale(),sqrt(pt2));
CrossSection res =
sqr(hbarc) *
realXComb()->jacobian() *
subtractionScaleWeight() *
xme2 /
(2. * realXComb()->lastSHat());
return res;
}
double QTildeMatching::me2() const {
throw Exception() << "QTildeMatching::me2(): Not intented to use. Disable the ShowerApproximationGenerator."
<< Exception::runerror;
return 0.;
}
void QTildeMatching::calculateShowerVariables() const {
Lorentz5Momentum n;
Energy2 Q2 = ZERO;
const Lorentz5Momentum& pb = bornCXComb()->meMomenta()[dipole()->bornEmitter()];
const Lorentz5Momentum& pc = bornCXComb()->meMomenta()[dipole()->bornSpectator()];
if ( dipole()->bornEmitter() > 1 ) {
Q2 = (pb+pc).m2();
} else {
Q2 = -(pb-pc).m2();
}
if ( dipole()->bornEmitter() > 1 && dipole()->bornSpectator() > 1 ) {
double b = sqr(bornCXComb()->meMomenta()[dipole()->bornEmitter()].m())/Q2;
double c = sqr(bornCXComb()->meMomenta()[dipole()->bornSpectator()].m())/Q2;
double lambda = sqrt(1.+sqr(b)+sqr(c)-2.*b-2.*c-2.*b*c);
n = (1.-0.5*(1.-b+c-lambda))*pc - 0.5*(1.-b+c-lambda)*pb;
}
if ( dipole()->bornEmitter() > 1 && dipole()->bornSpectator() < 2 ) {
n = bornCXComb()->meMomenta()[dipole()->bornSpectator()];
}
if ( dipole()->bornEmitter() < 2 && dipole()->bornSpectator() > 1 ) {
double c = sqr(bornCXComb()->meMomenta()[dipole()->bornSpectator()].m())/Q2;
n = (1.+c)*pc - c*pb;
}
if ( dipole()->bornEmitter() < 2 && dipole()->bornSpectator() < 2 ) {
n = bornCXComb()->meMomenta()[dipole()->bornSpectator()];
}
// the light-cone condition is numerically not very stable, so we
// explicitly push it on the light-cone here
n.setMass(ZERO);
n.rescaleEnergy();
double z = 0.0;
if ( dipole()->bornEmitter() > 1 ) {
z = 1. -
(n*realCXComb()->meMomenta()[dipole()->realEmission()])/
(n*bornCXComb()->meMomenta()[dipole()->bornEmitter()]);
} else {
z = 1. -
(n*realCXComb()->meMomenta()[dipole()->realEmission()])/
(n*realCXComb()->meMomenta()[dipole()->realEmitter()]);
}
// allow small violations (numerical inaccuracies)
if ( z <= 0 && z >= -1e-6 ) {
z = std::numeric_limits<double>::epsilon();
} else if ( z >= 1 && z <= 1+1e-6 ) {
z = 1-std::numeric_limits<double>::epsilon();
}
Energy2 qtilde2 = ZERO;
Energy2 q2 = ZERO;
if ( dipole()->bornEmitter() > 1 ) {
q2 =
(realCXComb()->meMomenta()[dipole()->realEmitter()] + realCXComb()->meMomenta()[dipole()->realEmission()]).m2();
qtilde2 = (q2 - bornCXComb()->meMomenta()[dipole()->bornEmitter()].m2())/(z*(1.-z));
} else {
q2 =
-(realCXComb()->meMomenta()[dipole()->realEmitter()] - realCXComb()->meMomenta()[dipole()->realEmission()]).m2();
qtilde2 = (q2 + bornCXComb()->meMomenta()[dipole()->bornEmitter()].m2())/(1.-z);
}
if ( qtilde2 < ZERO ) {
qtilde2 = ZERO;
}
assert(qtilde2 >= ZERO && z > 0.0 && z < 1.0);
dipole()->showerScale(sqrt(qtilde2));
dipole()->showerParameters().resize(1);
dipole()->showerParameters()[0] = z;
}
double QTildeMatching::splitFn(const pair<Energy2,double>& vars) const {
const Energy2& qtilde2 = vars.first;
const double z = vars.second;
double Nc = SM().Nc();
// final state branching
if ( dipole()->bornEmitter() > 1 ) {
// final state quark quark branching
if ( abs(bornCXComb()->mePartonData()[dipole()->bornEmitter()]->id()) < 7 ) {
Energy m = bornCXComb()->mePartonData()[dipole()->bornEmitter()]->hardProcessMass();
return
((sqr(Nc)-1.)/(2.*Nc))*(1+sqr(z)-2.*sqr(m)/(z*qtilde2))/(1.-z);
}
// final state gluon branching
if ( bornCXComb()->mePartonData()[dipole()->bornEmitter()]->id() == ParticleID::g ) {
if ( realCXComb()->mePartonData()[dipole()->realEmission()]->id() == ParticleID::g ) {
// ATTENTION the factor 2 here is intentional as it cancels to the 1/2
// stemming from the large-N colour correlator
return 2.*Nc*(z/(1.-z)+(1.-z)/z+z*(1.-z));
}
if ( abs(realCXComb()->mePartonData()[dipole()->realEmission()]->id()) < 7 ) {
Energy m = realCXComb()->mePartonData()[dipole()->realEmission()]->hardProcessMass();
return (1./2.)*(1.-2.*z*(1.-z)+2.*sqr(m)/(z*(1.-z)*qtilde2));
}
}
// final state squark branching
if ((abs(bornCXComb()->mePartonData()[dipole()->bornEmitter()]->id()) > 1000000 &&
abs(bornCXComb()->mePartonData()[dipole()->bornEmitter()]->id()) < 1000007) ||
(abs(bornCXComb()->mePartonData()[dipole()->bornEmitter()]->id()) > 2000000 &&
abs(bornCXComb()->mePartonData()[dipole()->bornEmitter()]->id()) < 2000007)){
Energy m = bornCXComb()->mePartonData()[dipole()->bornEmitter()]->hardProcessMass();
return ((sqr(Nc)-1.)/Nc)*(z-sqr(m)/(z*qtilde2))/(1.-z);
}
// final state gluino branching
if (bornCXComb()->mePartonData()[dipole()->bornEmitter()]->id() == 1000021){
Energy m = bornCXComb()->mePartonData()[dipole()->bornEmitter()]->hardProcessMass();
return Nc*(1.+sqr(z)-2.*sqr(m)/(z*qtilde2))/(1.-z);
}
}
// initial state branching
if ( dipole()->bornEmitter() < 2 ) {
// g/g
if ( realCXComb()->mePartonData()[dipole()->realEmitter()]->id() == ParticleID::g &&
realCXComb()->mePartonData()[dipole()->realEmission()]->id() == ParticleID::g ) {
// see above for factor of 2
return 2.*Nc*(z/(1.-z)+(1.-z)/z+z*(1.-z));
}
// q/q
if ( abs(realCXComb()->mePartonData()[dipole()->realEmitter()]->id()) < 7 &&
realCXComb()->mePartonData()[dipole()->realEmission()]->id() == ParticleID::g ) {
return
((sqr(Nc)-1.)/(2.*Nc))*(1+sqr(z))/(1.-z);
}
// g/q
if ( realCXComb()->mePartonData()[dipole()->realEmitter()]->id() == ParticleID::g &&
abs(realCXComb()->mePartonData()[dipole()->realEmission()]->id()) < 7 ) {
return (1./2.)*(1.-2.*z*(1.-z));
}
// q/g
if ( abs(realCXComb()->mePartonData()[dipole()->realEmitter()]->id()) < 7 &&
abs(realCXComb()->mePartonData()[dipole()->realEmission()]->id()) < 7 ) {
return
((sqr(Nc)-1.)/(2.*Nc))*(1+sqr(1.-z))/z;
}
}
return 0.0;
}
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void QTildeMatching::doinit() {
assert(theShowerHandler && theQTildeFinder && theQTildeSudakov);
theShowerHandler->init();
theQTildeFinder->init();
theQTildeSudakov->init();
hardScaleFactor(theShowerHandler->hardScaleFactor());
factorizationScaleFactor(theShowerHandler->factorizationScaleFactor());
renormalizationScaleFactor(theShowerHandler->renormalizationScaleFactor());
profileScales(theShowerHandler->profileScales());
restrictPhasespace(theShowerHandler->restrictPhasespace());
hardScaleIsMuF(theShowerHandler->hardScaleIsMuF());
ShowerApproximation::doinit();
}
void QTildeMatching::doinitrun() {
assert(theShowerHandler && theQTildeFinder && theQTildeSudakov);
theShowerHandler->initrun();
theQTildeFinder->initrun();
theQTildeSudakov->initrun();
ShowerApproximation::doinitrun();
}
void QTildeMatching::persistentOutput(PersistentOStream & os) const {
os << theQTildeFinder << theQTildeSudakov
<< theShowerHandler << theCorrectForXZMismatch;
}
void QTildeMatching::persistentInput(PersistentIStream & is, int) {
is >> theQTildeFinder >> theQTildeSudakov
>> theShowerHandler >> theCorrectForXZMismatch;
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<QTildeMatching,Herwig::ShowerApproximation>
describeHerwigQTildeMatching("Herwig::QTildeMatching", "HwShower.so HwQTildeMatching.so");
void QTildeMatching::Init() {
static ClassDocumentation<QTildeMatching> documentation
("QTildeMatching implements NLO matching with the default shower.");
static Reference<QTildeMatching,PartnerFinder> interfaceQTildeFinder
("QTildeFinder",
"Set the partner finder to calculate hard scales.",
&QTildeMatching::theQTildeFinder, false, false, true, false, false);
interfaceQTildeFinder.rank(-1);
static Reference<QTildeMatching,SudakovFormFactor> interfaceQTildeSudakov
("QTildeSudakov",
"Set the partner finder to calculate hard scales.",
&QTildeMatching::theQTildeSudakov, false, false, true, false, false);
interfaceQTildeSudakov.rank(-1);
static Reference<QTildeMatching,ShowerHandler> interfaceShowerHandler
("ShowerHandler",
"The QTilde shower handler to use.",
&QTildeMatching::theShowerHandler, false, false, true, true, false);
interfaceShowerHandler.rank(-1);
static Switch<QTildeMatching,bool> interfaceCorrectForXZMismatch
("CorrectForXZMismatch",
"Correct for x/z mismatch near hard phase space boundary.",
&QTildeMatching::theCorrectForXZMismatch, true, false, false);
static SwitchOption interfaceCorrectForXZMismatchYes
(interfaceCorrectForXZMismatch,
"Yes",
"Include the correction factor.",
true);
static SwitchOption interfaceCorrectForXZMismatchNo
(interfaceCorrectForXZMismatch,
"No",
"Do not include the correction factor.",
false);
interfaceCorrectForXZMismatch.rank(-1);
}
diff --git a/MatrixElement/Matchbox/Matching/QTildeMatching.h b/MatrixElement/Matchbox/Matching/QTildeMatching.h
--- a/MatrixElement/Matchbox/Matching/QTildeMatching.h
+++ b/MatrixElement/Matchbox/Matching/QTildeMatching.h
@@ -1,201 +1,201 @@
// -*- C++ -*-
//
// QTildeMatching.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_QTildeMatching_H
#define Herwig_QTildeMatching_H
//
// This is the declaration of the QTildeMatching class.
//
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
#include "Herwig/Shower/ShowerHandler.h"
#include "Herwig/Shower/QTilde/Base/PartnerFinder.h"
#include "Herwig/Shower/QTilde/SplittingFunctions/SudakovFormFactor.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief QTildeMatching implements NLO matching with the default shower.
*
*/
class QTildeMatching: public Herwig::ShowerApproximation {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
QTildeMatching();
/**
* The destructor.
*/
virtual ~QTildeMatching();
//@}
public:
/**
* Return the shower approximation to the real emission cross
* section for the given pair of Born and real emission
* configurations.
*/
virtual CrossSection dSigHatDR() const;
/**
* Return the shower approximation splitting kernel for the given
* pair of Born and real emission configurations in units of the
* Born center of mass energy squared, and including a weight to
* project onto the splitting given by the dipole used.
*/
virtual double me2() const;
/**
* Determine if the configuration is below or above the cutoff.
*/
virtual void checkCutoff();
/**
* Determine all kinematic variables which are not provided by the
* dipole kinematics; store all shower variables in the respective
* dipole object for later use.
*/
virtual void getShowerVariables();
protected:
/**
* Return true, if the shower was able to generate an emission
* leading from the given Born to the given real emission process.
*/
virtual bool isInShowerPhasespace() const;
/**
* Return true, if the shower emission leading from the given Born
* to the given real emission process would have been generated
* above the shower's infrared cutoff.
*/
virtual bool isAboveCutoff() const;
/**
* Calculate qtilde^2 and z for the splitting considered
*/
void calculateShowerVariables() const;
/**
* Return the splitting function as a function of the kinematic
* variables
*/
double splitFn(const pair<Energy2,double>&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- QTildeMatching & operator=(const QTildeMatching &);
+ QTildeMatching & operator=(const QTildeMatching &) = delete;
/**
* The shower handler to be used
*/
Ptr<ShowerHandler>::ptr theShowerHandler;
/**
* The qtilde partner finder for calculating the hard scales
*/
Ptr<PartnerFinder>::ptr theQTildeFinder;
/**
* The qtilde Sudakov to access the cutoff
*/
Ptr<SudakovFormFactor>::ptr theQTildeSudakov;
/**
* True, if PDF weight should be corrected for z/x mismatch at the
* hard phase space boundary
*/
bool theCorrectForXZMismatch;
};
}
#endif /* Herwig_QTildeMatching_H */
diff --git a/MatrixElement/Matchbox/Matching/ShowerApproximation.h b/MatrixElement/Matchbox/Matching/ShowerApproximation.h
--- a/MatrixElement/Matchbox/Matching/ShowerApproximation.h
+++ b/MatrixElement/Matchbox/Matching/ShowerApproximation.h
@@ -1,691 +1,691 @@
// -*- C++ -*-
//
// ShowerApproximation.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_ShowerApproximation_H
#define Herwig_ShowerApproximation_H
//
// This is the declaration of the ShowerApproximation class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.fh"
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.fh"
#include "HardScaleProfile.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief ShowerApproximation describes the shower emission to be used
* in NLO matching.
*
*/
class ShowerApproximation: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ShowerApproximation();
/**
* The destructor.
*/
virtual ~ShowerApproximation();
//@}
public:
/**
* Return true, if this shower approximation will require a
* splitting generator
*/
virtual bool needsSplittingGenerator() const { return false; }
/**
* Return true, if this shower approximation will require
* H events
*/
virtual bool hasHEvents() const { return true; }
/**
* Return true, if this shower approximation will require tilde
* XCombs for the real phase space point generated
*/
virtual bool needsTildeXCombs() const { return false; }
/**
* Return true, if this shower approximation will require
* a truncated parton shower
*/
virtual bool needsTruncatedShower() const { return false; }
/**
* Return the tilde kinematics object returning the shower
* kinematics parametrization if different from the nominal dipole
* mappings.
*/
virtual Ptr<TildeKinematics>::tptr showerTildeKinematics() const;
/**
* Return the tilde kinematics object returning the shower
* kinematics parametrization if different from the nominal dipole
* mappings.
*/
virtual Ptr<InvertedTildeKinematics>::tptr showerInvertedTildeKinematics() const;
public:
/**
* Set the XComb object describing the Born process
*/
void setBornXComb(tStdXCombPtr xc) { theBornXComb = xc; }
/**
* Return the XComb object describing the Born process
*/
tStdXCombPtr bornXComb() const { return theBornXComb; }
/**
* Return the XComb object describing the Born process
*/
tcStdXCombPtr bornCXComb() const { return theBornXComb; }
/**
* Set the XComb object describing the real emission process
*/
void setRealXComb(tStdXCombPtr xc) { theRealXComb = xc; }
/**
* Return the XComb object describing the real emission process
*/
tStdXCombPtr realXComb() const { return theRealXComb; }
/**
* Return the XComb object describing the real emission process
*/
tcStdXCombPtr realCXComb() const { return theRealXComb; }
/**
* Set the tilde xcomb objects associated to the real xcomb
*/
void setTildeXCombs(const vector<StdXCombPtr>& xc) { theTildeXCombs = xc; }
/**
* Return the tilde xcomb objects associated to the real xcomb
*/
const vector<StdXCombPtr>& tildeXCombs() const { return theTildeXCombs; }
/**
* Set the dipole in charge for the emission
*/
void setDipole(Ptr<SubtractionDipole>::tptr);
/**
* Return the dipole in charge for the emission
*/
Ptr<SubtractionDipole>::tptr dipole() const;
/**
* Return true, if this matching is capable of spin correlations.
*/
virtual bool hasSpinCorrelations() const { return false; }
public:
/**
* Return true if one of the recently encountered configutations was
* below the infrared cutoff.
*/
bool belowCutoff() const { return theBelowCutoff; }
/**
* Indicate that one of the recently encountered configutations was
* below the infrared cutoff.
*/
void wasBelowCutoff() { theBelowCutoff = true; }
/**
* Reset the below cutoff flag.
*/
void resetBelowCutoff() { theBelowCutoff = false; }
/**
* Return the pt cut to be applied for final-final dipoles.
*/
Energy ffPtCut() const { return theFFPtCut; }
/**
* Return the pt cut to be applied for final-initial dipoles.
*/
Energy fiPtCut() const { return theFIPtCut; }
/**
* Return the pt cut to be applied for initial-initial dipoles.
*/
Energy iiPtCut() const { return theIIPtCut; }
/**
* Return the pt cut to be applied for initial-initial dipoles.
*/
Energy safeCut() const { return theSafeCut;}
/**
* Return the screening scale to be applied for final-final dipoles.
*/
Energy ffScreeningScale() const { return theFFScreeningScale; }
/**
* Return the screening scale to be applied for final-initial dipoles.
*/
Energy fiScreeningScale() const { return theFIScreeningScale; }
/**
* Return the screening scale to be applied for initial-initial dipoles.
*/
Energy iiScreeningScale() const { return theIIScreeningScale; }
/**
* Return the shower renormalization scale
*/
virtual Energy2 showerEmissionScale() const;
/**
* Return the shower renormalization scale
*/
Energy2 showerRenormalizationScale() const {
return sqr(renormalizationScaleFactor())*showerEmissionScale();
}
/**
* Return the shower factorization scale
*/
Energy2 showerFactorizationScale() const {
return sqr(factorizationScaleFactor())*showerEmissionScale();
}
/**
* Return the Born renormalization scale
*/
Energy2 bornRenormalizationScale() const;
/**
* Return the Born factorization scale
*/
Energy2 bornFactorizationScale() const;
/**
* Return the real emission renormalization scale
*/
Energy2 realRenormalizationScale() const;
/**
* Return the real emission factorization scale
*/
Energy2 realFactorizationScale() const;
/**
* Enumerate possible scale choices
*/
enum ScaleChoices {
bornScale = 0,
/** Use the born scales */
realScale = 1,
/** Use the real scales */
showerScale = 2
/** Use the shower scales */
};
/**
* Return the scale choice in the real emission cross section to be
* used in the matching subtraction.
*/
int realEmissionScaleInSubtraction() const { return theRealEmissionScaleInSubtraction; }
/**
* Return the scale choice in the born cross section to be
* used in the matching subtraction.
*/
int bornScaleInSubtraction() const { return theBornScaleInSubtraction; }
/**
* Return the scale choice in the emission contribution to be
* used in the matching subtraction.
*/
int emissionScaleInSubtraction() const { return theEmissionScaleInSubtraction; }
/**
* Return the scale choice in the real emission cross section to be
* used in the splitting.
*/
int realEmissionScaleInSplitting() const { return theRealEmissionScaleInSplitting; }
/**
* Return the scale choice in the born cross section to be
* used in the splitting.
*/
int bornScaleInSplitting() const { return theBornScaleInSplitting; }
/**
* Return the scale choice in the emission contribution to be
* used in the splitting.
*/
int emissionScaleInSplitting() const { return theEmissionScaleInSplitting; }
/**
* Return the scale weight
*/
double scaleWeight(int rScale, int bScale, int eScale) const;
/**
* Return the scale weight for the matching subtraction
*/
double subtractionScaleWeight() const {
return scaleWeight(realEmissionScaleInSubtraction(),
bornScaleInSubtraction(),
emissionScaleInSubtraction());
}
/**
* Return the scale weight for the splitting
*/
double splittingScaleWeight() const {
return scaleWeight(realEmissionScaleInSplitting(),
bornScaleInSplitting(),
emissionScaleInSplitting());
}
public:
/**
* Return true, if the phase space restrictions of the dipole shower should
* be applied.
*/
bool restrictPhasespace() const { return theRestrictPhasespace; }
/**
* Indicate that the phase space restrictions of the dipole shower should
* be applied.
*/
void restrictPhasespace(bool yes) { theRestrictPhasespace = yes; }
/**
* Return profile scales
*/
Ptr<HardScaleProfile>::tptr profileScales() const { return theHardScaleProfile; }
/**
* Set profile scales
*/
void profileScales(Ptr<HardScaleProfile>::ptr prof) { theHardScaleProfile = prof; }
/**
* Return true if maximum pt should be deduced from the factorization scale
*/
bool hardScaleIsMuF() const { return maxPtIsMuF; }
/**
* Indicate that maximum pt should be deduced from the factorization scale
*/
void hardScaleIsMuF(bool yes) { maxPtIsMuF = yes; }
/**
* Return the scale factor for the hard scale
*/
double hardScaleFactor() const { return theHardScaleFactor; }
/**
* Set the scale factor for the hard scale
*/
void hardScaleFactor(double f) { theHardScaleFactor = f; }
/**
* Get the factorization scale factor
*/
double factorizationScaleFactor() const { return theFactorizationScaleFactor; }
/**
* Get the renormalization scale factor
*/
double renormalizationScaleFactor() const { return theRenormalizationScaleFactor; }
/**
* Set the factorization scale factor
*/
void factorizationScaleFactor(double f) { theFactorizationScaleFactor = f; }
/**
* Set the renormalization scale factor
*/
void renormalizationScaleFactor(double f) { theRenormalizationScaleFactor = f; }
/**
* Determine if the configuration is below or above the cutoff.
*/
virtual void checkCutoff();
/**
* Determine all kinematic variables which are not provided by the
* dipole kinematics; store all shower variables in the respective
* dipole object for later use.
*/
virtual void getShowerVariables();
/**
* Return the shower approximation to the real emission cross
* section for the given pair of Born and real emission
* configurations.
*/
virtual CrossSection dSigHatDR() const = 0;
/**
* Return the shower approximation splitting kernel for the given
* pair of Born and real emission configurations in units of the
* Born center of mass energy squared, and including a weight to
* project onto the splitting given by the dipole used.
*/
virtual double me2() const = 0;
/**
* Return the Born PDF weight
*/
double bornPDFWeight(Energy2 muF) const;
/**
* Return the real emission PDF weight
*/
double realPDFWeight(Energy2 muF) const;
protected:
/**
* Return true, if the shower was able to generate an emission
* leading from the given Born to the given real emission process.
*/
virtual bool isInShowerPhasespace() const;
/**
* Return true, if the shower emission leading from the given Born
* to the given real emission process would have been generated
* above the shower's infrared cutoff.
*/
virtual bool isAboveCutoff() const;
/**
* Return the relevant hard scale
*/
virtual Energy hardScale() const;
/**
* Use the maximum available phase space for the momentum fraction
*/
void useOpenZ(bool yes) { theOpenZ = yes; }
/**
* Return true if the maximum available phase space should be used
* for the momentum fraction
*/
bool openZ() const { return theOpenZ; }
public:
/**
* Generate a weight for the given dipole channel
*/
virtual double channelWeight(int emitter, int emission,
int spectator, int bemitter) const;
/**
* Generate a normalized weight taking into account all channels
*/
virtual double channelWeight() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
public:
/**
* A large-N colour basis to be used when reproducing the shower
* kernels.
*/
Ptr<ColourBasis>::tptr largeNBasis() const { return theLargeNBasis; }
protected:
/**
* A large-N colour basis to be used when reproducing the shower
* kernels.
*/
Ptr<ColourBasis>::ptr theLargeNBasis;
/**
* Set the large-N basis
*/
void setLargeNBasis();
/**
* The x value from which on we extrapolate PDFs for numerically stable ratios.
*/
double theExtrapolationX;
private:
/**
* The XComb object describing the Born process
*/
tStdXCombPtr theBornXComb;
/**
* The XComb object describing the real emission process
*/
tStdXCombPtr theRealXComb;
/**
* The tilde xcomb objects associated to the real xcomb
*/
vector<StdXCombPtr> theTildeXCombs;
/**
* The dipole in charge for the emission
*/
Ptr<SubtractionDipole>::tptr theDipole;
/**
* True if one of the recently encountered configutations was below
* the infrared cutoff.
*/
bool theBelowCutoff;
/**
* The pt cut to be applied for final-final dipoles.
*/
Energy theFFPtCut;
/**
* An optional screening scale for final-final dipoles; see
* DipoleSplittingKernel
*/
Energy theFFScreeningScale;
/**
* The pt cut to be applied for final-initial dipoles.
*/
Energy theFIPtCut;
/**
* An optional screening scale for final-initial dipoles; see
* DipoleSplittingKernel
*/
Energy theFIScreeningScale;
/**
* The pt cut to be applied for initial-initial dipoles.
*/
Energy theIIPtCut;
/**
* An optional screening scale for initial-initial dipoles; see
* DipoleSplittingKernel
*/
Energy theIIScreeningScale;
/**
* The cut to be applied as an enhanced shower cutoff.
*/
Energy theSafeCut;
/**
* True, if the phase space restrictions of the dipole shower should
* be applied.
*/
bool theRestrictPhasespace;
/**
* The scale factor for the hard scale
*/
double theHardScaleFactor;
/**
* The scale factor for the renormalization scale
*/
double theRenormalizationScaleFactor;
/**
* The scale factor for the factorization scale
*/
double theFactorizationScaleFactor;
/**
* The scale choice in the real emission cross section to be
* used in the matching subtraction.
*/
int theRealEmissionScaleInSubtraction;
/**
* The scale choice in the born cross section to be
* used in the matching subtraction.
*/
int theBornScaleInSubtraction;
/**
* The scale choice in the emission contribution to be
* used in the matching subtraction.
*/
int theEmissionScaleInSubtraction;
/**
* The scale choice in the real emission cross section to be
* used in the splitting.
*/
int theRealEmissionScaleInSplitting;
/**
* The scale choice in the born cross section to be
* used in the splitting.
*/
int theBornScaleInSplitting;
/**
* The scale choice in the emission contribution to be
* used in the splitting.
*/
int theEmissionScaleInSplitting;
/**
* A freezing value for the renormalization scale
*/
Energy theRenormalizationScaleFreeze;
/**
* A freezing value for the factorization scale
*/
Energy theFactorizationScaleFreeze;
/**
* True if maximum pt should be deduced from the factorization scale
*/
bool maxPtIsMuF;
/**
* The profile scales
*/
Ptr<HardScaleProfile>::ptr theHardScaleProfile;
/**
* Use the maximum available phase space for the momentum fraction
*/
bool theOpenZ;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerApproximation & operator=(const ShowerApproximation &);
+ ShowerApproximation & operator=(const ShowerApproximation &) = delete;
};
}
#endif /* Herwig_ShowerApproximation_H */
diff --git a/MatrixElement/Matchbox/Matching/ShowerApproximationGenerator.h b/MatrixElement/Matchbox/Matching/ShowerApproximationGenerator.h
--- a/MatrixElement/Matchbox/Matching/ShowerApproximationGenerator.h
+++ b/MatrixElement/Matchbox/Matching/ShowerApproximationGenerator.h
@@ -1,251 +1,251 @@
// -*- C++ -*-
//
// ShowerApproximationGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_ShowerApproximationGenerator_H
#define Herwig_ShowerApproximationGenerator_H
//
// This is the declaration of the ShowerApproximationGenerator class.
//
#include "ThePEG/Handlers/StepHandler.h"
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximationKernel.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief ShowerApproximationGenerator generates emissions according to a
* shower approximation entering a NLO matching.
*
*/
class ShowerApproximationGenerator: public StepHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ShowerApproximationGenerator();
/**
* The destructor.
*/
virtual ~ShowerApproximationGenerator();
//@}
public:
/** @name Virtual functions required by the StepHandler class. */
//@{
/**
* The main function called by the EventHandler class to
* perform a step. Given the current state of an Event, this function
* performs the event generation step and includes the result in a new
* Step object int the Event record.
* @param eh the EventHandler in charge of the Event generation.
* @param tagged if not empty these are the only particles which should
* be considered by the StepHandler.
* @param hint a Hint object with possible information from previously
* performed steps.
* @throws Veto if the StepHandler requires the current step to be discarded.
* @throws Stop if the generation of the current Event should be stopped
* after this call.
* @throws Exception if something goes wrong.
*/
virtual void handle(EventHandler & eh, const tPVector & tagged,
const Hint & hint);
//@}
public:
/**
* Fill information on the Born process
*/
bool prepare(bool didproject);
/**
* Generate a Born phase space point while kernels are being
* presampled
*/
bool generate(const vector<double>&);
/**
* Restore information on the Born process
*/
void restore();
protected:
/**
* Generate a momentum fraction for the given parton species
*/
double generateFraction(tcPDPtr, double, double) const;
/**
* Invert the momentum fraction for the given parton species
*/
double invertFraction(tcPDPtr, double, double) const;
/**
* Return the pt cut to be applied for final-final dipoles.
*/
Energy ffPtCut() const { return theShowerApproximation->ffPtCut(); }
/**
* Return the pt cut to be applied for final-initial dipoles.
*/
Energy fiPtCut() const { return theShowerApproximation->fiPtCut(); }
/**
* Return the pt cut to be applied for initial-initial dipoles.
*/
Energy iiPtCut() const { return theShowerApproximation->iiPtCut(); }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The shower approximation to consider
*/
Ptr<ShowerApproximation>::ptr theShowerApproximation;
/**
* The (invertible) phase space generator to use
*/
Ptr<MatchboxPhasespace>::ptr thePhasespace;
/**
* Map hard processes to the respective kernels.
*/
map<cPDVector,set<Ptr<ShowerApproximationKernel>::ptr> > theKernelMap;
/**
* The number of points to presample this splitting generator.
*/
unsigned long thePresamplingPoints;
/**
* The maximum number of trials to generate a splitting.
*/
unsigned long theMaxTry;
/**
* Return the number of accepted points after which the grid should
* be frozen
*/
unsigned long theFreezeGrid;
/**
* The last external Born XComb dealt with
*/
tStdXCombPtr lastIncomingXComb;
// the next three are filled from the incoming xcomb in the prepare method
/**
* The last internal Born matrix element dealt with
*/
Ptr<MatchboxMEBase>::ptr theLastBornME;
/**
* The last Born phase space point
*/
vector<Lorentz5Momentum> theLastMomenta;
/**
* The last Born phase space point used while presampling
*/
vector<Lorentz5Momentum> theLastPresamplingMomenta;
/**
* The random numbers which have produced the last Born phase space
* point.
*/
vector<double> theLastRandomNumbers;
/**
* The last internal Born XComb dealt with
*/
tStdXCombPtr theLastBornXComb;
/**
* The last internal incoming partons dealt with
*/
PPair theLastPartons;
/**
* True, if sampler should apply compensation
*/
bool theDoCompensate;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerApproximationGenerator & operator=(const ShowerApproximationGenerator &);
+ ShowerApproximationGenerator & operator=(const ShowerApproximationGenerator &) = delete;
};
}
#endif /* Herwig_ShowerApproximationGenerator_H */
diff --git a/MatrixElement/Matchbox/Matching/ShowerApproximationKernel.h b/MatrixElement/Matchbox/Matching/ShowerApproximationKernel.h
--- a/MatrixElement/Matchbox/Matching/ShowerApproximationKernel.h
+++ b/MatrixElement/Matchbox/Matching/ShowerApproximationKernel.h
@@ -1,478 +1,478 @@
// -*- C++ -*-
//
// ShowerApproximationKernel.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_ShowerApproximationKernel_H
#define Herwig_ShowerApproximationKernel_H
//
// This is the declaration of the ShowerApproximationKernel class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
#include "Herwig/Sampling/exsample/exponential_generator.h"
namespace Herwig {
using namespace ThePEG;
class ShowerApproximationGenerator;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief ShowerApproximationKernel generates emissions according to a
* shower approximation entering a NLO matching.
*
*/
class ShowerApproximationKernel: public HandlerBase {
public:
/**
* Exception to communicate sampler maxtry events.
*/
struct MaxTryException {};
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ShowerApproximationKernel();
/**
* The destructor.
*/
virtual ~ShowerApproximationKernel();
//@}
public:
/**
* Set the XComb object describing the Born process
*/
void setBornXComb(tStdXCombPtr xc) { theBornXComb = xc; }
/**
* Return the XComb object describing the Born process
*/
tcStdXCombPtr bornCXComb() const { return theBornXComb; }
/**
* Return the XComb object describing the Born process
*/
tStdXCombPtr bornXComb() const { return theBornXComb; }
/**
* Set the XComb object describing the real emission process
*/
void setRealXComb(tStdXCombPtr xc) { theRealXComb = xc; }
/**
* Return the XComb object describing the real emission process
*/
tcStdXCombPtr realCXComb() const { return theRealXComb; }
/**
* Return the XComb object describing the real emission process
*/
tStdXCombPtr realXComb() const { return theRealXComb; }
/**
* Set the tilde xcomb objects associated to the real xcomb
*/
void setTildeXCombs(const vector<StdXCombPtr>& xc) { theTildeXCombs = xc; }
/**
* Return the tilde xcomb objects associated to the real xcomb
*/
const vector<StdXCombPtr>& tildeXCombs() const { return theTildeXCombs; }
/**
* Set the dipole in charge for the emission
*/
void setDipole(Ptr<SubtractionDipole>::tptr dip) { theDipole = dip; }
/**
* Return the dipole in charge for the emission
*/
Ptr<SubtractionDipole>::tptr dipole() const { return theDipole; }
/**
* Set the shower approximation.
*/
void showerApproximation(Ptr<ShowerApproximation>::tptr app) { theShowerApproximation = app; }
/**
* Return the shower approximation.
*/
Ptr<ShowerApproximation>::tptr showerApproximation() const { return theShowerApproximation; }
/**
* Set the shower approximation generator.
*/
void showerApproximationGenerator(Ptr<ShowerApproximationGenerator>::tptr);
/**
* Return the shower approximation generator.
*/
Ptr<ShowerApproximationGenerator>::tptr showerApproximationGenerator() const;
/**
* Generate the next emission
*/
double generate();
public:
/**
* Set a pt cut on the dipole to generate the radiation
*/
void ptCut(Energy pt) { dipole()->ptCut(pt); }
/**
* Return the number of random numbers
* needed to sample this kernel.
*/
int nDim() const {
return
nDimBorn() +
dipole()->nDimRadiation();
}
/**
* Return the number of random numbers
* needed to sample the Born process.
*/
int nDimBorn() const {
return bornCXComb()->lastRandomNumbers().size();
}
/**
* Flag, which variables are free variables.
*/
const vector<bool>& sampleFlags();
/**
* Return the support of the splitting kernel.
* The lower bound on the first variable is
* assumed to correspond to the cutoff on the
* evolution variable.
*/
const pair<vector<double>,vector<double> >& support();
/**
* Return the parameter point associated to the splitting
* previously supplied through fixParameters.
*/
const vector<double>& parameterPoint();
/**
* Indicate that presampling of this kernel
* will be performed in the next calls to
* evaluate until stopPresampling() is called.
*/
void startPresampling();
/**
* Indicate that presampling of this kernel
* is done until startPresampling() is called.
*/
void stopPresampling();
/**
* Indicate that a veto with the given kernel value and overestimate has occured.
*/
void veto(const vector<double>&, double, double) {
/** use born and real xcombs in here to figure out what we need to reweight;
it should have its kinematic variables completed at this step */
}
/**
* Indicate that an accept with the given kernel value and overestimate has occured.
*/
void accept(const vector<double>&, double, double) {
/** use born and real xcombs in here to figure out what we need to reweight;
it should have its kinematic variables completed at this step */
}
/**
* Return true, if currently being presampled
*/
bool presampling() const { return thePresampling; }
/**
* Return the number of points to presample this
* splitting generator.
*/
unsigned long presamplingPoints() const { return thePresamplingPoints; }
/**
* Return the maximum number of trials
* to generate a splitting.
*/
unsigned long maxtry() const { return theMaxTry; }
/**
* Return the number of accepted points after which the grid should
* be frozen
*/
unsigned long freezeGrid() const { return theFreezeGrid; }
/**
* Set the number of points to presample this
* splitting generator.
*/
void presamplingPoints(unsigned long p) { thePresamplingPoints = p; }
/**
* Set the maximum number of trials
* to generate a splitting.
*/
void maxtry(unsigned long p) { theMaxTry = p; }
/**
* Set the number of accepted points after which the grid should
* be frozen
*/
void freezeGrid(unsigned long n) { theFreezeGrid = n; }
/**
* Evalute the splitting kernel.
*/
double evaluate(const vector<double>&);
/**
* Return the index of the random number corresponding
* to the evolution variable.
*/
int evolutionVariable() const {
return
nDimBorn() +
(showerApproximation()->showerInvertedTildeKinematics() ?
showerApproximation()->showerInvertedTildeKinematics()->evolutionVariable() :
dipole()->invertedTildeKinematics()->evolutionVariable());
}
/**
* Return the cutoff on the evolution
* random number corresponding to the pt cut.
*/
double evolutionCutoff() const {
return
showerApproximation()->showerInvertedTildeKinematics() ?
showerApproximation()->showerInvertedTildeKinematics()->evolutionCutoff() :
dipole()->invertedTildeKinematics()->evolutionCutoff();
}
/**
* True, if sampler should apply compensation
*/
void doCompensate(bool yes = true) { theDoCompensate = yes; }
public:
/**@name Wrap to the exsample2 interface until this is finally cleaned up. */
//@{
inline const vector<bool>& variable_flags () {
return sampleFlags();
}
inline size_t evolution_variable () const { return evolutionVariable(); }
inline double evolution_cutoff () const {
return evolutionCutoff();
}
inline const vector<double>& parameter_point () {
return parameterPoint();
}
inline void start_presampling () {
startPresampling();
}
inline void stop_presampling () {
stopPresampling();
}
inline size_t dimension () const {
return nDim();
}
inline unsigned long presampling_points () const {
return presamplingPoints();
}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The dipole in charge of the emission
*/
Ptr<SubtractionDipole>::ptr theDipole;
/**
* The shower approximation to consider
*/
Ptr<ShowerApproximation>::ptr theShowerApproximation;
/**
* The XComb off which radiation will be generated
*/
StdXCombPtr theBornXComb;
/**
* The XComb describing the process after radiation
*/
StdXCombPtr theRealXComb;
/**
* The tilde xcomb objects associated to the real xcomb
*/
vector<StdXCombPtr> theTildeXCombs;
/**
* True, if currently being presampled
*/
bool thePresampling;
/**
* The number of points to presample this
* splitting generator.
*/
unsigned long thePresamplingPoints;
/**
* The maximum number of trials
* to generate a splitting.
*/
unsigned long theMaxTry;
/**
* Return the number of accepted points after which the grid should
* be frozen
*/
unsigned long theFreezeGrid;
/**
* The sampling flags
*/
vector<bool> theFlags;
/**
* The support.
*/
pair<vector<double>,vector<double> > theSupport;
/**
* The shower approximation generator.
*/
Ptr<ShowerApproximationGenerator>::tptr theShowerApproximationGenerator;
/**
* The last parameter point
*/
vector<double> theLastParameterPoint;
/**
* The last random numbers used for Born sampling
*/
vector<double> theLastBornPoint;
/**
* Define the Sudakov sampler
*/
typedef
exsample::exponential_generator<ShowerApproximationKernel,UseRandom>
ExponentialGenerator;
/**
* Define a pointer to the Sudakov sampler
*/
typedef
exsample::exponential_generator<ShowerApproximationKernel,UseRandom>*
ExponentialGeneratorPtr;
/**
* The Sudakov sampler
*/
ExponentialGeneratorPtr sampler;
/**
* True, if sampler should apply compensation
*/
bool theDoCompensate;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerApproximationKernel & operator=(const ShowerApproximationKernel &);
+ ShowerApproximationKernel & operator=(const ShowerApproximationKernel &) = delete;
};
}
#endif /* Herwig_ShowerApproximationKernel_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FFLightInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FFLightInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FFLightInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FFLightInvertedTildeKinematics.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
//
// FFLightInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFLightInvertedTildeKinematics_H
#define HERWIG_FFLightInvertedTildeKinematics_H
//
// This is the declaration of the FFLightInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FFLightInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class FFLightInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFLightInvertedTildeKinematics();
/**
* The destructor.
*/
virtual ~FFLightInvertedTildeKinematics();
//@}
public:
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFLightInvertedTildeKinematics & operator=(const FFLightInvertedTildeKinematics &);
+ FFLightInvertedTildeKinematics & operator=(const FFLightInvertedTildeKinematics &) = delete;
};
}
#endif /* HERWIG_FFLightInvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FFLightTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FFLightTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FFLightTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FFLightTildeKinematics.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
//
// FFLightTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFLightTildeKinematics_H
#define HERWIG_FFLightTildeKinematics_H
//
// This is the declaration of the FFLightTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FFLightTildeKinematics implements the 'tilde' kinematics for
* a final-final subtraction dipole.
*
*/
class FFLightTildeKinematics: public TildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFLightTildeKinematics();
/**
* The destructor.
*/
virtual ~FFLightTildeKinematics();
//@}
public:
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap();
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const ;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/*
* True if phase space point is above the alpha cut for this dipole.
*/
bool aboveAlpha() const {return dipole()->alpha()<subtractionParameters()[0];}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFLightTildeKinematics & operator=(const FFLightTildeKinematics &);
+ FFLightTildeKinematics & operator=(const FFLightTildeKinematics &) = delete;
};
}
#endif /* HERWIG_FFLightTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FFMassiveInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FFMassiveInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FFMassiveInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FFMassiveInvertedTildeKinematics.h
@@ -1,183 +1,183 @@
// -*- C++ -*-
//
// FFMassiveInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFMassiveInvertedTildeKinematics_H
#define HERWIG_FFMassiveInvertedTildeKinematics_H
//
// This is the declaration of the FFMassiveInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Stephen Webster
*
* \brief FFMassiveInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class FFMassiveInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMassiveInvertedTildeKinematics();
/**
* The destructor.
*/
virtual ~FFMassiveInvertedTildeKinematics();
//@}
public:
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
* Note that allowing parton masses these bounds may be too loose
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
/**
* For generated pt and z, check if this point is
* kinematically allowed
*/
/*virtual*/ bool ptzAllowed(pair<Energy,double> ptz, vector<double>* values ) const;
/**
* Generate pt and z
*/
virtual pair<Energy,double> generatePtZ(double& jac, const double * r, vector<double>* values) const;
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline T rootOfKallen (T a, T b, T c) const {
return sqrt( a*a + b*b + c*c - 2.*( a*b+a*c+b*c ) ); }
// TODO: remove in both
/**
* stolen from FFMassiveKinematics.h
* Perform a rotation on both momenta such that the first one will
* point along the (positive) z axis. Rotate back to the original
* reference frame by applying rotateUz(returnedVector) to each momentum.
*/
ThreeVector<double> rotateToZ (Lorentz5Momentum& pTarget, Lorentz5Momentum& p1) {
ThreeVector<double> oldAxis = pTarget.vect().unit();
double ct = oldAxis.z(); double st = sqrt( 1.-sqr(ct) ); // cos,sin(theta)
double cp = oldAxis.x()/st; double sp = oldAxis.y()/st; // cos,sin(phi)
pTarget.setZ( pTarget.vect().mag() ); pTarget.setX( 0.*GeV ); pTarget.setY( 0.*GeV );
Lorentz5Momentum p1old = p1;
p1.setX( sp*p1old.x() - cp*p1old.y() );
p1.setY( ct*cp*p1old.x() + ct*sp*p1old.y() - st*p1old.z() );
p1.setZ( st*cp*p1old.x() + st*sp*p1old.y() + ct*p1old.z() );
return oldAxis;
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMassiveInvertedTildeKinematics & operator=(const FFMassiveInvertedTildeKinematics &);
+ FFMassiveInvertedTildeKinematics & operator=(const FFMassiveInvertedTildeKinematics &) = delete;
/**
* Option to use the full jacobian, including the z->zprime jacobian.
**/
bool theFullJacobian;
};
}
#endif /* HERWIG_FFMassiveInvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FFMassiveTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FFMassiveTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FFMassiveTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FFMassiveTildeKinematics.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
//
// FFMassiveTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFMassiveTildeKinematics_H
#define HERWIG_FFMassiveTildeKinematics_H
//
// This is the declaration of the FFMassiveTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Stephen Webster
*
* \brief FFMassiveTildeKinematics implements the 'tilde' kinematics for
* a final-final subtraction dipole.
*
*/
class FFMassiveTildeKinematics: public TildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMassiveTildeKinematics();
/**
* The destructor.
*/
virtual ~FFMassiveTildeKinematics();
//@}
public:
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap();
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const ;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline T rootOfKallen (T a, T b, T c) const {
return sqrt( a*a + b*b + c*c - 2.*( a*b+a*c+b*c ) ); }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMassiveTildeKinematics & operator=(const FFMassiveTildeKinematics &);
+ FFMassiveTildeKinematics & operator=(const FFMassiveTildeKinematics &) = delete;
};
}
#endif /* HERWIG_FFMassiveTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FILightInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FILightInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FILightInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FILightInvertedTildeKinematics.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
//
// FILightInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FILightInvertedTildeKinematics_H
#define HERWIG_FILightInvertedTildeKinematics_H
//
// This is the declaration of the FILightInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FILightInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class FILightInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FILightInvertedTildeKinematics();
/**
* The destructor.
*/
virtual ~FILightInvertedTildeKinematics();
//@}
public:
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FILightInvertedTildeKinematics & operator=(const FILightInvertedTildeKinematics &);
+ FILightInvertedTildeKinematics & operator=(const FILightInvertedTildeKinematics &) = delete;
};
}
#endif /* HERWIG_FILightInvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FILightTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FILightTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FILightTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FILightTildeKinematics.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
//
// FILightTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FILightTildeKinematics_H
#define HERWIG_FILightTildeKinematics_H
//
// This is the declaration of the FILightTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FILightTildeKinematics implements the 'tilde' kinematics for
* a final-initial subtraction dipole.
*
*/
class FILightTildeKinematics: public TildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FILightTildeKinematics();
/**
* The destructor.
*/
virtual ~FILightTildeKinematics();
//@}
public:
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap();
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const ;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/*
* True if phase space point is above the alpha cut for this dipole.
*/
bool aboveAlpha() const {return dipole()->alpha()<1.-subtractionParameters()[0];}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FILightTildeKinematics & operator=(const FILightTildeKinematics &);
+ FILightTildeKinematics & operator=(const FILightTildeKinematics &) = delete;
};
}
#endif /* HERWIG_FILightTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FIMassiveInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FIMassiveInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FIMassiveInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FIMassiveInvertedTildeKinematics.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
//
// FIMassiveInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIMassiveInvertedTildeKinematics_H
#define HERWIG_FIMassiveInvertedTildeKinematics_H
//
// This is the declaration of the FIMassiveInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Martin Stoll
*
* \brief FIMassiveInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class FIMassiveInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMassiveInvertedTildeKinematics();
/**
* The destructor.
*/
virtual ~FIMassiveInvertedTildeKinematics();
//@}
public:
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline T rootOfKallen (T a, T b, T c) const {
return sqrt( a*a + b*b + c*c - 2.*( a*b+a*c+b*c ) ); }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMassiveInvertedTildeKinematics & operator=(const FIMassiveInvertedTildeKinematics &);
+ FIMassiveInvertedTildeKinematics & operator=(const FIMassiveInvertedTildeKinematics &) = delete;
};
}
#endif /* HERWIG_FIMassiveInvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FIMassiveTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/FIMassiveTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/FIMassiveTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/FIMassiveTildeKinematics.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
//
// FIMassiveTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIMassiveTildeKinematics_H
#define HERWIG_FIMassiveTildeKinematics_H
//
// This is the declaration of the FIMassiveTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Martin Stoll
*
* \brief FIMassiveTildeKinematics implements the 'tilde' kinematics for
* a final-initial subtraction dipole.
*
*/
class FIMassiveTildeKinematics: public TildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMassiveTildeKinematics();
/**
* The destructor.
*/
virtual ~FIMassiveTildeKinematics();
//@}
public:
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap();
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const ;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline T rootOfKallen (T a, T b, T c) const {
return sqrt( a*a + b*b + c*c - 2.*( a*b+a*c+b*c ) ); }
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMassiveTildeKinematics & operator=(const FIMassiveTildeKinematics &);
+ FIMassiveTildeKinematics & operator=(const FIMassiveTildeKinematics &) = delete;
};
}
#endif /* HERWIG_FIMassiveTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FlatInvertibleLabframePhasespace.h b/MatrixElement/Matchbox/Phasespace/FlatInvertibleLabframePhasespace.h
--- a/MatrixElement/Matchbox/Phasespace/FlatInvertibleLabframePhasespace.h
+++ b/MatrixElement/Matchbox/Phasespace/FlatInvertibleLabframePhasespace.h
@@ -1,152 +1,152 @@
// -*- C++ -*-
//
// FlatInvertiblePhasespaceLabFrame.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_FlatInvertibleLabframePhasespace_H
#define Herwig_FlatInvertibleLabframePhasespace_H
//
// This is the declaration of the FlatInvertibleLabframePhasespace class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/FlatInvertiblePhasespace.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Michael Rauch
*
* \brief FlatInvertibleLabframePhasespace implements flat, invertible phase space generation in the lab frame
*
*/
class FlatInvertibleLabframePhasespace: public FlatInvertiblePhasespace {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FlatInvertibleLabframePhasespace();
/**
* The destructor.
*/
virtual ~FlatInvertibleLabframePhasespace();
//@}
public:
/**
* Generate a phase space point and return its weight.
*/
virtual double generateTwoToNKinematics(const double*,
vector<Lorentz5Momentum>& momenta);
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDimPhasespace(int nFinal) const {
if ( nFinal == 1 )
return 3;
return 3*nFinal - 2;
}
public:
/**
* Return true, if this phasespace generator will generate incoming
* partons itself.
*/
virtual bool haveX1X2() const { return true; }
/**
* Return true, if this phase space generator expects
* the incoming partons in their center-of-mass system
*/
virtual bool wantCMS() const { return false; }
/**
* Invert the given phase space point to the random numbers which
* would have generated it.
*/
virtual double invertTwoToNKinematics(const vector<Lorentz5Momentum>& momenta,
double* r) const;
private:
/**
* True if SHat should be generated flat in log(SHat/S),
* false if SHat should be generated flat in SHat.
*/
bool theLogSHat;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FlatInvertibleLabframePhasespace & operator=(const FlatInvertibleLabframePhasespace &);
+ FlatInvertibleLabframePhasespace & operator=(const FlatInvertibleLabframePhasespace &) = delete;
};
}
#endif /* Herwig_FlatInvertiblePhasespace_H */
diff --git a/MatrixElement/Matchbox/Phasespace/FlatInvertiblePhasespace.h b/MatrixElement/Matchbox/Phasespace/FlatInvertiblePhasespace.h
--- a/MatrixElement/Matchbox/Phasespace/FlatInvertiblePhasespace.h
+++ b/MatrixElement/Matchbox/Phasespace/FlatInvertiblePhasespace.h
@@ -1,204 +1,204 @@
// -*- C++ -*-
//
// FlatInvertiblePhasespace.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_FlatInvertiblePhasespace_H
#define Herwig_FlatInvertiblePhasespace_H
//
// This is the declaration of the FlatInvertiblePhasespace class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief FlatInvertiblePhasespace implements flat, invertible phase space generation.
*
*/
class FlatInvertiblePhasespace: public MatchboxPhasespace {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FlatInvertiblePhasespace();
/**
* The destructor.
*/
virtual ~FlatInvertiblePhasespace();
//@}
public:
/**
* Generate a phase space point and return its weight.
*/
virtual double generateTwoToNKinematics(const double*,
vector<Lorentz5Momentum>& momenta);
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDimPhasespace(int nFinal) const {
if ( nFinal == 1 )
return 1;
return 3*nFinal - 4;
}
public:
/**
* Return true, if this phase space generator is invertible
*/
virtual bool isInvertible() const { return true; }
/**
* Invert the given phase space point to the random numbers which
* would have generated it.
*/
virtual double invertTwoToNKinematics(const vector<Lorentz5Momentum>& momenta,
double* r) const {
return invertKinematics(momenta,(momenta[0]+momenta[1]).m(),r);
}
private:
/**
* Solve v = (n+2) * u^(n+1) - (n+1) * u^(n+2) for u
*/
double bisect(double v, double n,
double target = -16., double maxLevel = 80.) const;
/**
* Return rho
*/
double rho(Energy M, Energy N, Energy m) const {
return sqrt((sqr(M)-sqr(N+m))*(sqr(M)-sqr(N-m)))/(8.*sqr(M));
}
/**
* Generate intermediate masses for a massless final state
*/
double generateIntermediates(vector<Energy>& K,
const double* r) const;
/**
* Invert intermediate masses for a massless final state
*/
double invertIntermediates(const vector<Energy>& K,
double* r) const;
/**
* Generate intermediate masses for a massive final state
*/
double generateIntermediates(vector<Energy>& M,
const vector<Energy>& m,
const double* r) const;
/**
* Invert intermediate masses for a massive final state
*/
double invertIntermediates(const vector<Energy>& M,
const vector<Energy>& m,
double* r) const;
/**
* Generate momenta in the CMS
*/
double generateKinematics(vector<Lorentz5Momentum>& P,
Energy Ecm,
const double* r) const;
/**
* Invert momenta in the CMS
*/
double invertKinematics(const vector<Lorentz5Momentum>& P,
Energy Ecm,
double* r) const;
/**
* Return the appropriate phase space weight,
* Eq. 11 in 1308.2922
* with the factor (2 pi)^4/(2 pi)^(3n) included
* and the SHat of the process divided out to have everything expressed in the units of the ThePEG conventions, i.e.
* without the Q^2 factor
*/
long double flatWeights(int n) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FlatInvertiblePhasespace & operator=(const FlatInvertiblePhasespace &);
+ FlatInvertiblePhasespace & operator=(const FlatInvertiblePhasespace &) = delete;
};
}
#endif /* Herwig_FlatInvertiblePhasespace_H */
diff --git a/MatrixElement/Matchbox/Phasespace/IFLightInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/IFLightInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/IFLightInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/IFLightInvertedTildeKinematics.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
//
// IFLightInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFLightInvertedTildeKinematics_H
#define HERWIG_IFLightInvertedTildeKinematics_H
//
// This is the declaration of the IFLightInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFLightInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class IFLightInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFLightInvertedTildeKinematics();
/**
* The destructor.
*/
virtual ~IFLightInvertedTildeKinematics();
//@}
public:
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFLightInvertedTildeKinematics & operator=(const IFLightInvertedTildeKinematics &);
+ IFLightInvertedTildeKinematics & operator=(const IFLightInvertedTildeKinematics &) = delete;
};
}
#endif /* HERWIG_IFLightInvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/IFLightTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/IFLightTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/IFLightTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/IFLightTildeKinematics.h
@@ -1,146 +1,146 @@
// -*- C++ -*-
//
// IFLightTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFLightTildeKinematics_H
#define HERWIG_IFLightTildeKinematics_H
//
// This is the declaration of the IFLightTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IFLightTildeKinematics implements the 'tilde' kinematics for
* a initial-final subtraction dipole.
*
*/
class IFLightTildeKinematics: public TildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFLightTildeKinematics();
/**
* The destructor.
*/
virtual ~IFLightTildeKinematics();
//@}
public:
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap();
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const ;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const;
/*
* True if phase space point is above the alpha cut for this dipole.
*/
bool aboveAlpha() const {return dipole()->alpha()<subtractionParameters()[1];}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFLightTildeKinematics & operator=(const IFLightTildeKinematics &);
+ IFLightTildeKinematics & operator=(const IFLightTildeKinematics &) = delete;
};
}
#endif /* HERWIG_IFLightTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/IFMassiveInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/IFMassiveInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/IFMassiveInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/IFMassiveInvertedTildeKinematics.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
//
// IFMassiveInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFMassiveInvertedTildeKinematics_H
#define HERWIG_IFMassiveInvertedTildeKinematics_H
//
// This is the declaration of the IFMassiveInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Martin Stoll
*
* \brief IFMassiveInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class IFMassiveInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMassiveInvertedTildeKinematics();
/**
* The destructor.
*/
virtual ~IFMassiveInvertedTildeKinematics();
//@}
public:
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMassiveInvertedTildeKinematics & operator=(const IFMassiveInvertedTildeKinematics &);
+ IFMassiveInvertedTildeKinematics & operator=(const IFMassiveInvertedTildeKinematics &) = delete;
};
}
#endif /* HERWIG_IFMassiveInvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/IFMassiveTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/IFMassiveTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/IFMassiveTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/IFMassiveTildeKinematics.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
//
// IFMassiveTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFMassiveTildeKinematics_H
#define HERWIG_IFMassiveTildeKinematics_H
//
// This is the declaration of the IFMassiveTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Martin Stoll
*
* \brief IFMassiveTildeKinematics implements the 'tilde' kinematics for
* a initial-final subtraction dipole.
*
*/
class IFMassiveTildeKinematics: public TildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMassiveTildeKinematics();
/**
* The destructor.
*/
virtual ~IFMassiveTildeKinematics();
//@}
public:
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap();
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const ;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMassiveTildeKinematics & operator=(const IFMassiveTildeKinematics &);
+ IFMassiveTildeKinematics & operator=(const IFMassiveTildeKinematics &) = delete;
};
}
#endif /* HERWIG_IFMassiveTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/IILightInvertedTildeKinematics.h
@@ -1,145 +1,145 @@
// -*- C++ -*-
//
// IILightInvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IILightInvertedTildeKinematics_H
#define HERWIG_IILightInvertedTildeKinematics_H
//
// This is the declaration of the IILightInvertedTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief IILightInvertedTildeKinematics inverts the final-final tilde
* kinematics.
*
*/
class IILightInvertedTildeKinematics: public Herwig::InvertedTildeKinematics {
public:
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *);
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const;
/**
* Return true, if this InvertedTildeKinematics object needs to transform
* all other particles in the process except the emitter, emission and spectator
*/
virtual bool doesTransform() const { return true; }
/**
* If this InvertedTildeKinematics object needs to transform all other particles
* in the process except the emitter, emission and spectator, return the transformed
* momentum.
*/
virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const {
return p-(2.*(KplusKtilde*p)/KplusKtilde2)*KplusKtilde+(2.*(Ktilde*p)/K2)*K;
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
Lorentz5Momentum K;
Energy2 K2;
Lorentz5Momentum Ktilde;
Lorentz5Momentum KplusKtilde;
Energy2 KplusKtilde2;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IILightInvertedTildeKinematics & operator=(const IILightInvertedTildeKinematics &);
+ IILightInvertedTildeKinematics & operator=(const IILightInvertedTildeKinematics &) = delete;
};
}
#endif /* HERWIG_IILightInvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/IILightTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/IILightTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/IILightTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/IILightTildeKinematics.h
@@ -1,171 +1,171 @@
// -*- C++ -*-
//
// IILightTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IILightTildeKinematics_H
#define HERWIG_IILightTildeKinematics_H
//
// This is the declaration of the IILightTildeKinematics class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/TildeKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \breif IILightTildeKinematics implements the 'tilde' kinematics for
* a initial-initial subtraction dipole.
*
*/
class IILightTildeKinematics: public TildeKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IILightTildeKinematics();
/**
* The destructor.
*/
virtual ~IILightTildeKinematics();
//@}
public:
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap();
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
//TODO: make this static?
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const ;
/**
* Given a pt, return the boundaries on z
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const;
/**
* Return true, if this TildeKinematics object needs to transform
* all other particles in the process except the emitter and spectator
*/
virtual bool doesTransform() const { return true; }
/**
* If this TildeKinematics object needs to transform all other particles
* in the process except the emitter and spectator, return the transformed
* momentum.
*/
virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const;
/*
* True if phase space point is above the alpha cut for this dipole.
*/
bool aboveAlpha() const {return dipole()->alpha()<subtractionParameters()[1];}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The K momentum used to transform the final state.
*/
Lorentz5Momentum K;
/**
* The Ktilde momentum used to transform the final state.
*/
Lorentz5Momentum Ktilde;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IILightTildeKinematics & operator=(const IILightTildeKinematics &);
+ IILightTildeKinematics & operator=(const IILightTildeKinematics &) = delete;
};
}
#endif /* HERWIG_IILightTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h b/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/InvertedTildeKinematics.h
@@ -1,450 +1,450 @@
// -*- C++ -*-
//
// InvertedTildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_InvertedTildeKinematics_H
#define HERWIG_InvertedTildeKinematics_H
//
// This is the declaration of the InvertedTildeKinematics class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief InvertedTildeKinematics is the base class for the inverted 'tilde'
* kinematics being used for subtraction terms in the
* formalism of Catani and Seymour.
*
*/
class InvertedTildeKinematics: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
InvertedTildeKinematics();
/**
* The destructor.
*/
virtual ~InvertedTildeKinematics();
//@}
public:
/** @name Access to kinematic quantities. */
//@{
/**
* Return the momentum of the emitter in the real emission process
*/
const Lorentz5Momentum& realEmitterMomentum() const { return theRealEmitterMomentum; }
/**
* Return the momentum of the emission in the real emission process
*/
const Lorentz5Momentum& realEmissionMomentum() const { return theRealEmissionMomentum; }
/**
* Return the momentum of the spectator in the real emission process
*/
const Lorentz5Momentum& realSpectatorMomentum() const { return theRealSpectatorMomentum; }
/**
* Return the momentum of the emitter in the underlying Born process
*/
const Lorentz5Momentum& bornEmitterMomentum() const {
return theBornXComb->meMomenta()[theDipole->bornEmitter()];
}
/**
* Return the momentum of the spectator in the underlying Born process
*/
const Lorentz5Momentum& bornSpectatorMomentum() const {
return theBornXComb->meMomenta()[theDipole->bornSpectator()];
}
/**
* Return the momentum fraction of the emitter
*/
double emitterX() const {
return
theDipole->bornEmitter() == 0 ?
theBornXComb->lastX1() :
theBornXComb->lastX2();
}
/**
* Return the momentum fraction of the spectator
*/
double spectatorX() const {
return
theDipole->bornSpectator() == 0 ?
theBornXComb->lastX1() :
theBornXComb->lastX2();
}
/**
* Return the vector of dimensionless variables calculated
*/
const vector<double>& subtractionParameters() const { return theDipole->subtractionParameters(); }
/**
* Return true, if this InvertedTildeKinematics object needs to transform
* all other particles in the process except the emitter, emission and spectator
*/
virtual bool doesTransform() const { return false; }
/**
* If this InvertedTildeKinematics object needs to transform all other particles
* in the process except the emitter, emission and spectator, return the transformed
* momentum.
*/
virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const { return p; }
/**
* Return the centre of mass energy for the underlying Born configuration
*/
Energy2 sHat() const { return theBornXComb->lastSHat(); }
//@}
public:
/**
* Clone this object
*/
Ptr<InvertedTildeKinematics>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<InvertedTildeKinematics>::ptr>(clone());
}
/** @name Access to process data. */
//@{
/**
* Prepare given a dipole, and XCombs describing the real emission
* and underlying Born processes, respectively.
*/
void prepare(tcStdXCombPtr newRealXComb,
tcStdXCombPtr newBornXComb) {
theRealXComb = newRealXComb; theBornXComb = newBornXComb;
}
/**
* Return the real xcomb
*/
tcStdXCombPtr realXComb() const { return theRealXComb; }
/**
* Return the Born xcomb
*/
tcStdXCombPtr bornXComb() const { return theBornXComb; }
/**
* Set the current dipole
*/
void dipole(Ptr<SubtractionDipole>::tptr dip) { theDipole = dip; }
/**
* Return the current dipole
*/
Ptr<SubtractionDipole>::tptr dipole() { return theDipole; }
/**
* Return the current dipole
*/
Ptr<SubtractionDipole>::tcptr dipole() const { return theDipole; }
/**
* Return the number of random numbers needed to generate
* a real emission configuration off the underlying Born
* configuration.
*/
virtual int nDimRadiation() const { return 3; }
/**
* Perform the mapping of the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the real
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap(const double *) = 0;
/**
* Set an optional cutoff on the emission's
* transverse momentum.
*/
void ptCut(Energy pt) { thePtCut = pt; }
/**
* Return the optional cutoff on the emission's
* transverse momentum.
*/
Energy ptCut() const { return thePtCut; }
/**
* Return the random number index
* corresponding to the evolution variable.
*/
virtual int evolutionVariable() const { return 0; }
/**
* Return the cutoff on the evolution
* random number corresponding to the pt cut.
*/
virtual double evolutionCutoff() const { return 0.0; }
/**
* Return the pt associated to the last generated splitting.
*/
virtual Energy lastPt() const = 0;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const = 0;
/**
* Return the relevant dipole scale
*/
virtual Energy lastScale() const;
/**
* Return the upper bound on pt
*/
virtual Energy ptMax() const = 0;
/**
* Given a pt and a hard pt, return the boundaries on z; if the hard
* pt is zero, ptMax() will be used.
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt = ZERO) const = 0;
/**
* Generate pt and z
*/
virtual pair<Energy,double> generatePtZ(double& jac, const double * r,
double power=1., vector<double>* values = NULL) const;
/**
* Return the single particle phase space weight in units
* of sHat() for the last selected configuration.
*/
double jacobian() const { return theJacobian; }
/**
* Return the particle type of the emitter in the real emission process
*/
cPDPtr realEmitterData() const {
return
(theDipole && theRealXComb) ?
theRealXComb->mePartonData()[theDipole->realEmitter()] :
cPDPtr();
}
/**
* Return the particle type of the emission in the real emission process
*/
cPDPtr realEmissionData() const {
return
(theDipole && theRealXComb) ?
theRealXComb->mePartonData()[theDipole->realEmission()] :
cPDPtr();
}
/**
* Return the particle type of the spectator in the real emission process
*/
cPDPtr realSpectatorData() const {
return
(theDipole && theRealXComb) ?
theRealXComb->mePartonData()[theDipole->realSpectator()] :
cPDPtr();
}
/**
* Return the particle type of the emitter in the underlying Born process
*/
cPDPtr bornEmitterData() const {
return
(theDipole && theBornXComb) ?
theBornXComb->mePartonData()[theDipole->bornEmitter()] :
cPDPtr();
}
/**
* Return the particle type of the spectator in the underlying Born process
*/
cPDPtr bornSpectatorData() const {
return
(theDipole && theBornXComb) ?
theBornXComb->mePartonData()[theDipole->bornSpectator()] :
cPDPtr();
}
//@}
protected:
/**
* Access the momentum of the emitter in the real emission process
*/
Lorentz5Momentum& realEmitterMomentum() { return theRealEmitterMomentum; }
/**
* Access the momentum of the emission in the real emission process
*/
Lorentz5Momentum& realEmissionMomentum() { return theRealEmissionMomentum; }
/**
* Access the momentum of the spectator in the real emission process
*/
Lorentz5Momentum& realSpectatorMomentum() { return theRealSpectatorMomentum; }
/**
* Access the vector of dimensionless variables calculated
*/
vector<double>& subtractionParameters() { return theDipole->subtractionParameters(); }
/**
* Set the single particle phase space weight in units
* of sHat() for the last selected configuration.
*/
void jacobian(double w) { theJacobian = w; }
/**
* Calculate a transverse momentum for the given momenta,
* invariant pt and azimuth.
*/
Lorentz5Momentum getKt(const Lorentz5Momentum& p1,
const Lorentz5Momentum& p2,
Energy pt,
double phi,
bool spacelike = false) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans);
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* The last dipole this InvertedTildeKinematics has been selected for
*/
Ptr<SubtractionDipole>::tptr theDipole;
/**
* The XComb object describing the real emission process
*/
tcStdXCombPtr theRealXComb;
/**
* The XComb object describing the underlying Born process
*/
tcStdXCombPtr theBornXComb;
/**
* The momentum of the emitter in the real emission process
*/
Lorentz5Momentum theRealEmitterMomentum;
/**
* The momentum of the emission in the real emission process
*/
Lorentz5Momentum theRealEmissionMomentum;
/**
* The momentum of the spectator in the real emission process
*/
Lorentz5Momentum theRealSpectatorMomentum;
/**
* Return the single particle phase space weight in units
* of sHat() for the last selected configuration.
*/
double theJacobian;
/**
* The optional cutoff on the emission's
* transverse momentum.
*/
Energy thePtCut;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- InvertedTildeKinematics & operator=(const InvertedTildeKinematics &);
+ InvertedTildeKinematics & operator=(const InvertedTildeKinematics &) = delete;
};
}
#endif /* HERWIG_InvertedTildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h b/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h
--- a/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h
+++ b/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h
@@ -1,366 +1,366 @@
// -*- C++ -*-
//
// MatchboxPhasespace.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MatchboxPhasespace_H
#define HERWIG_MatchboxPhasespace_H
//
// This is the declaration of the MatchboxPhasespace class.
//
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
#include "Herwig/MatrixElement/Matchbox/Utility/LastMatchboxXCombInfo.h"
#include "Herwig/MatrixElement/Matchbox/Utility/ProcessData.fh"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
#include "Herwig/MatrixElement/Matchbox/Phasespace/PhasespaceCouplings.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Wrap around a vector of random numbers to behave as a stream
* of those.
*/
struct StreamingRnd {
/**
* The random numbers
*/
const double* numbers;
/**
* The number of random numbers available.
*/
size_t nRnd;
/**
* Default constructor.
*/
StreamingRnd()
: numbers(0), nRnd(0) {}
/**
* Construct from random numbers.
*/
explicit StreamingRnd(const double* newNumbers,
size_t n)
: numbers(newNumbers), nRnd(n) {}
/**
* Return next random number
*/
inline double operator()() {
assert(numbers && nRnd > 0);
const double ret = numbers[0];
++numbers; --nRnd;
return ret;
}
};
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxPhasespace defines an abstract interface to a phase
* space generator.
*
*/
class MatchboxPhasespace:
public HandlerBase,
public LastXCombInfo<StandardXComb>,
public LastMatchboxXCombInfo {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxPhasespace();
/**
* The destructor.
*/
virtual ~MatchboxPhasespace();
//@}
public:
/**
* Set the XComb object steering the Born matrix
* element this class represents virtual corrections to.
*/
virtual void setXComb(tStdXCombPtr xc) {
theLastXComb = xc;
lastMatchboxXComb(xc);
}
/**
* Return the factory object
*/
Ptr<MatchboxFactory>::tcptr factory() const;
/**
* Return the process data object
*/
Ptr<ProcessData>::tptr processData() const;
/**
* Generate a phase space point and return its weight.
*/
virtual double generateKinematics(const double* r,
vector<Lorentz5Momentum>& momenta);
/**
* Generate a phase space point and return its weight.
*/
virtual double generateTwoToNKinematics(const double*,
vector<Lorentz5Momentum>& momenta) = 0;
/**
* Generate a 2 -> 1 phase space point and return its weight.
*/
virtual double generateTwoToOneKinematics(const double*,
vector<Lorentz5Momentum>& momenta);
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDim(const cPDVector&) const;
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDimPhasespace(int nFinal) const = 0;
/**
* Return true, if this phasespace generator will generate incoming
* partons itself.
*/
virtual bool haveX1X2() const { return false; }
/**
* Return true, if this phase space generator expects
* the incoming partons in their center-of-mass system
*/
virtual bool wantCMS() const { return true; }
/**
* True, if mass generators should be used instead of fixed masses
*/
bool useMassGenerators() const { return theUseMassGenerators; }
/**
* Fill a diagram selector for the last phase space point.
*/
virtual Selector<MEBase::DiagramIndex> selectDiagrams(const MEBase::DiagramVector&) const;
/**
* Return the momentum and weight appropriate to the given timelike
* branch of the diagram.
*/
pair<double,Lorentz5Momentum> timeLikeWeight(const Tree2toNDiagram& diag,
int branch, double flatCut) const;
/**
* Return the weight appropriate to the given spacelike branch of
* the diagram.
*/
double spaceLikeWeight(const Tree2toNDiagram& diag,
const Lorentz5Momentum& incoming,
int branch, double flatCut) const;
/**
* Return the weight appropriate to the given diagram.
*/
double diagramWeight(const Tree2toNDiagram& diag) const {
assert( !diagramWeights().empty() );
return diagramWeights().find(diag.id())->second;
}
/**
* Fill the diagram weights.
*/
void fillDiagramWeights(double flatCut = 0.0);
/**
* Clear the diagram weights.
*/
void clearDiagramWeights() {
diagramWeights().clear();
}
/**
* Clone this phase space generator.
*/
Ptr<MatchboxPhasespace>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<MatchboxPhasespace>::ptr>(clone());
}
/**
* Clone the dependencies, using a given prefix.
*/
virtual void cloneDependencies(const std::string& prefix = "");
public:
/**
* Return true, if this phase space generator is invertible
*/
virtual bool isInvertible() const { return false; }
/**
* Invert the given phase space point to the random numbers which
* would have generated it.
*/
virtual double invertKinematics(const vector<Lorentz5Momentum>& momenta,
double* r) const;
/**
* Invert the given phase space point to the random numbers which
* would have generated it.
*/
virtual double invertTwoToNKinematics(const vector<Lorentz5Momentum>&,
double*) const {
return 0.;
}
/**
* Invert the given 2 -> 1 phase space point to the random numbers which
* would have generated it.
*/
virtual double invertTwoToOneKinematics(const vector<Lorentz5Momentum>&, double*) const;
public:
/**
* Limit phasespace generation to a given collinear or soft limit.
*/
void singularLimit(size_t i, size_t j) {
if ( i > j )
swap(i,j);
singularLimits().insert(make_pair(i,j));
}
/**
* Return the last matched singular limit.
*/
const pair<size_t,size_t>& lastSingularIndices() const {
assert(lastSingularLimit() != singularLimits().end());
return *lastSingularLimit();
}
/**
* Return true, if constraints on phasespace generation have been met.
*/
bool matchConstraints(const vector<Lorentz5Momentum>& momenta);
protected:
/**
* Set a coupling for the given vertex; the convention is that all
* legs are outgoing, and all possible crossings will be taken care
* of. If not set, coupling weights default to one.
*/
void setCoupling(long a, long b, long c,
double coupling, bool includeCrossings = true);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* A cutoff below which a region is considered singular.
*/
Energy singularCutoff;
/**
* True, if mass generators should be used instead of fixed masses
*/
bool theUseMassGenerators;
/**
* Couplings to be used in diagram weighting
*/
Ptr<PhasespaceCouplings>::ptr theCouplings;
/**
* Interface function to setcoupling
*/
string doSetCoupling(string);
/**
* Interface function to setcoupling
*/
string doSetPhysicalCoupling(string);
/**
* The first id in a range of id's meant to denote fictitious
* 'ghost' particles to be used by the diagram generator
* in loop induced processes.
*/
int theLoopParticleIdMin;
/**
* The last id in a range of id's meant to denote fictitious
* 'ghost' particles to be used by the diagram generator
* in loop induced processes.
*/
int theLoopParticleIdMax;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxPhasespace & operator=(const MatchboxPhasespace &);
+ MatchboxPhasespace & operator=(const MatchboxPhasespace &) = delete;
};
}
#endif /* HERWIG_MatchboxPhasespace_H */
diff --git a/MatrixElement/Matchbox/Phasespace/MatchboxRambo.h b/MatrixElement/Matchbox/Phasespace/MatchboxRambo.h
--- a/MatrixElement/Matchbox/Phasespace/MatchboxRambo.h
+++ b/MatrixElement/Matchbox/Phasespace/MatchboxRambo.h
@@ -1,188 +1,188 @@
// -*- C++ -*-
//
// MatchboxRambo.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxRambo_H
#define Herwig_MatchboxRambo_H
//
// This is the declaration of the MatchboxRambo class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxRambo implements RAMBO phase space generation.
*
*/
class MatchboxRambo: public MatchboxPhasespace {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxRambo();
/**
* The destructor.
*/
virtual ~MatchboxRambo();
//@}
public:
/**
* Prepare a phase space generator for the given xcomb object.
*/
virtual void setXComb(tStdXCombPtr);
/**
* Generate a phase space point and return its weight.
*/
virtual double generateTwoToNKinematics(const double*,
vector<Lorentz5Momentum>& momenta);
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDimPhasespace(int nFinal) const {
if ( nFinal == 1 )
return 1;
return 4*nFinal;
}
protected:
/**
* The function object defining the equation
* to be solved.
*/
struct ReshuffleEquation {
typedef double ArgType;
typedef Energy ValType;
static double aUnit() { return 1.; }
static Energy vUnit() { return 1.*GeV; }
Energy operator() (double xi) const;
Energy w;
cPDVector::const_iterator dataBegin;
cPDVector::const_iterator dataEnd;
vector<Lorentz5Momentum>::const_iterator momentaBegin;
vector<Lorentz5Momentum>::const_iterator momentaEnd;
ReshuffleEquation(Energy q,
cPDVector::const_iterator dBegin,
cPDVector::const_iterator dEnd,
vector<Lorentz5Momentum>::const_iterator mBegin,
vector<Lorentz5Momentum>::const_iterator mEnd)
: w(q),
dataBegin(dBegin), dataEnd(dEnd),
momentaBegin(mBegin),
momentaEnd(mEnd) {}
};
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxRambo & operator=(const MatchboxRambo &);
+ MatchboxRambo & operator=(const MatchboxRambo &) = delete;
/**
* Whether or not we need to reshuffle.
*/
bool needToReshuffle;
/**
* True, if a reference sample of phasespace points should be
* generated.
*/
bool theMakeReferenceSample;
/**
* Map processes to streams for reference samples
*/
map<cPDVector,ofstream*> referenceSamples;
/**
* The stream to fill for the reference sample
*/
ofstream* referenceSample;
/**
* Write the generated point to the reference sample
*/
void dumpReference(const vector<Lorentz5Momentum>&, double) const;
};
}
#endif /* Herwig_MatchboxRambo_H */
diff --git a/MatrixElement/Matchbox/Phasespace/MatchboxReference.h b/MatrixElement/Matchbox/Phasespace/MatchboxReference.h
--- a/MatrixElement/Matchbox/Phasespace/MatchboxReference.h
+++ b/MatrixElement/Matchbox/Phasespace/MatchboxReference.h
@@ -1,140 +1,140 @@
// -*- C++ -*-
//
// MatchboxReference.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxReference_H
#define Herwig_MatchboxReference_H
//
// This is the declaration of the MatchboxReference class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxReference implements reference sample phase space generation.
*
*/
class MatchboxReference: public MatchboxPhasespace {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxReference();
/**
* The destructor.
*/
virtual ~MatchboxReference();
//@}
public:
/**
* Generate a phase space point and return its weight.
*/
virtual double generateTwoToNKinematics(const double*,
vector<Lorentz5Momentum>& momenta);
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDimPhasespace(int nFinal) const {
if ( nFinal == 1 )
return 1;
return 4*nFinal + 2;
}
/**
* Return true, if this phase space generator will generate incoming
* partons itself.
*/
virtual bool haveX1X2() const { return true; }
/**
* Return true, if this phase space generator expects
* the incoming partons in their center-of-mass system
*/
virtual bool wantCMS() const { return false; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxReference & operator=(const MatchboxReference &);
+ MatchboxReference & operator=(const MatchboxReference &) = delete;
/**
* Stream to read the reference samples.
*/
map<cPDVector,ifstream*> referenceSamples;
};
}
#endif /* Herwig_MatchboxReference_H */
diff --git a/MatrixElement/Matchbox/Phasespace/PhasespaceCouplings.h b/MatrixElement/Matchbox/Phasespace/PhasespaceCouplings.h
--- a/MatrixElement/Matchbox/Phasespace/PhasespaceCouplings.h
+++ b/MatrixElement/Matchbox/Phasespace/PhasespaceCouplings.h
@@ -1,139 +1,139 @@
// -*- C++ -*-
//
// PhasespaceCouplings.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_PhasespaceCouplings_H
#define Herwig_PhasespaceCouplings_H
//
// This is the declaration of the PhasespaceCouplings class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
namespace Herwig {
using namespace ThePEG;
typedef std::tuple<long,long,long> LTriple;
inline PersistentOStream& operator<<(PersistentOStream& os, const LTriple& t) {
os << std::get<0>(t) << std::get<1>(t) << std::get<2>(t);
return os;
}
inline PersistentIStream& operator>>(PersistentIStream& is, LTriple& t) {
is >> std::get<0>(t) >> std::get<1>(t) >> std::get<2>(t);
return is;
}
/**
*
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Store couplings for the phase space generator.
*
* @see \ref PhasespaceCouplingsInterfaces "The interfaces"
* defined for PhasespaceCouplings.
*/
class PhasespaceCouplings: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
PhasespaceCouplings();
/**
* The destructor.
*/
virtual ~PhasespaceCouplings();
//@}
public:
/**
* Couplings to be used in diagram weighting
*/
map<LTriple,double>& couplings() { return theCouplings; }
/**
* Couplings to be used in diagram weighting
*/
const map<LTriple,double>& couplings() const { return theCouplings; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Couplings to be used in diagram weighting
*/
map<LTriple,double> theCouplings;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PhasespaceCouplings & operator=(const PhasespaceCouplings &);
+ PhasespaceCouplings & operator=(const PhasespaceCouplings &) = delete;
};
}
#endif /* Herwig_PhasespaceCouplings_H */
diff --git a/MatrixElement/Matchbox/Phasespace/TildeKinematics.h b/MatrixElement/Matchbox/Phasespace/TildeKinematics.h
--- a/MatrixElement/Matchbox/Phasespace/TildeKinematics.h
+++ b/MatrixElement/Matchbox/Phasespace/TildeKinematics.h
@@ -1,384 +1,384 @@
// -*- C++ -*-
//
// TildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TildeKinematics_H
#define HERWIG_TildeKinematics_H
//
// This is the declaration of the TildeKinematics class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief TildeKinematics is the base class for the 'tilde'
* kinematics being used for subtraction terms in the
* formalism of Catani and Seymour.
*
*/
class TildeKinematics: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
TildeKinematics();
/**
* The destructor.
*/
virtual ~TildeKinematics();
//@}
public:
/**
* Clone this object
*/
Ptr<TildeKinematics>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<TildeKinematics>::ptr>(clone());
}
/** @name Access to kinematic quantities. */
//@{
/**
* Return the momentum of the emitter in the real emission process
*/
const Lorentz5Momentum& realEmitterMomentum() const {
return theRealXComb->meMomenta()[theDipole->realEmitter()];
}
/**
* Return the momentum of the emission in the real emission process
*/
const Lorentz5Momentum& realEmissionMomentum() const {
return theRealXComb->meMomenta()[theDipole->realEmission()];
}
/**
* Return the momentum of the spectator in the real emission process
*/
const Lorentz5Momentum& realSpectatorMomentum() const {
return theRealXComb->meMomenta()[theDipole->realSpectator()];
}
/**
* Return the momentum of the emitter in the underlying Born process
*/
const Lorentz5Momentum& bornEmitterMomentum() const { return theBornEmitterMomentum; }
/**
* Return the momentum of the spectator in the underlying Born process
*/
const Lorentz5Momentum& bornSpectatorMomentum() const { return theBornSpectatorMomentum; }
/**
* Return the vector of dimensionless variables calculated
*/
const vector<double>& subtractionParameters() const { return theDipole->subtractionParameters(); }
/**
* Return true, if this TildeKinematics object needs to transform
* all other particles in the process except the emitter and spectator
*/
virtual bool doesTransform() const { return false; }
/**
* If this TildeKinematics object needs to transform all other particles
* in the process except the emitter and spectator, return the transformed
* momentum.
*/
virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const { return p; }
//@}
/**
* If this tilde kinematics is implementing a mapping different from
* the baseline dipole mapping, determine the relevant shower
* parameters and check for phase space boundaries. Note that real
* emission kinematics only are available at this stage.
*/
virtual void getShowerVariables() const {}
/**
* If this tilde kinematics is implementing a mapping different from
* the baseline dipole mapping, return the ratio of phase space
* factorization Jacobians for this and the nominal dipole
* mapping. This is used for matching subtractions.
*/
virtual double jacobianRatio() const { return 1.; }
public:
/** @name Access to process data. */
//@{
/**
* Prepare given a dipole, and XCombs describing the real emission
* and underlying Born processes, respectively.
*/
void prepare(tcStdXCombPtr newRealXComb,
tcStdXCombPtr newBornXComb) {
theRealXComb = newRealXComb; theBornXComb = newBornXComb;
}
/**
* Set the current dipole
*/
void dipole(Ptr<SubtractionDipole>::tptr dip) { theDipole = dip; }
/**
* Return the current dipole
*/
Ptr<SubtractionDipole>::tptr dipole() { return theDipole; }
/**
* Return the current dipole
*/
Ptr<SubtractionDipole>::tcptr dipole() const { return theDipole; }
/**
* Perform the mapping to the tilde kinematics for the
* last selected process and store all dimensionless
* variables in the subtractionParameters() vector.
* Return false, if the calculation of the tilde
* kinematics was impossible for the selected configuration
* and true on success.
*/
virtual bool doMap() = 0;
/**
* Return the pt associated to the last merged splitting.
*/
virtual Energy lastPt() const = 0;
/**
* Return the pt associated to emitter emission and sppectator momentum.
*/
virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const =0 ;
/**
* Given a pt and a hard pt, return the boundaries on z;
*/
virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const = 0;
/**
* Return the momentum fraction associated to the last splitting.
*/
virtual double lastZ() const = 0;
/**
* Return the relevant dipole scale
*/
virtual Energy lastScale() const;
virtual bool aboveAlpha() const {
cerr<<"only implemented for light kinematics";
assert(false);
return false;
}
/**
* Return the particle type of the emitter in the real emission process
*/
cPDPtr realEmitterData() const {
return
(theDipole && theRealXComb) ?
theRealXComb->mePartonData()[theDipole->realEmitter()] :
cPDPtr();
}
/**
* Return the particle type of the emission in the real emission process
*/
cPDPtr realEmissionData() const {
return
(theDipole && theRealXComb) ?
theRealXComb->mePartonData()[theDipole->realEmission()] :
cPDPtr();
}
/**
* Return the particle type of the spectator in the real emission process
*/
cPDPtr realSpectatorData() const {
return
(theDipole && theRealXComb) ?
theRealXComb->mePartonData()[theDipole->realSpectator()] :
cPDPtr();
}
/**
* Return the particle type of the emitter in the underlying Born process
*/
cPDPtr bornEmitterData() const {
return
(theDipole && theBornXComb) ?
theBornXComb->mePartonData()[theDipole->bornEmitter()] :
cPDPtr();
}
/**
* Return the particle type of the spectator in the underlying Born process
*/
cPDPtr bornSpectatorData() const {
return
(theDipole && theBornXComb) ?
theBornXComb->mePartonData()[theDipole->bornSpectator()] :
cPDPtr();
}
//@}
protected:
/**
* Access the momentum of the emitter in the underlying Born process
*/
Lorentz5Momentum& bornEmitterMomentum() { return theBornEmitterMomentum; }
/**
* Access the momentum of the spectator in the underlying Born process
*/
Lorentz5Momentum& bornSpectatorMomentum() { return theBornSpectatorMomentum; }
/**
* Access the vector of dimensionless variables calculated
*/
vector<double>& subtractionParameters() { return theDipole->subtractionParameters(); }
public:
/**
* Return the momentum fraction of the emitter
*/
double emitterX() const {
return
theDipole->bornEmitter() == 0 ?
theBornXComb->lastX1() :
theBornXComb->lastX2();
}
/**
* Return the momentum fraction of the spectator
*/
double spectatorX() const {
return
theDipole->bornSpectator() == 0 ?
theBornXComb->lastX1() :
theBornXComb->lastX2();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans);
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* The last dipole this TildeKinematics has been selected for
*/
Ptr<SubtractionDipole>::tptr theDipole;
/**
* The XComb object describing the real emission process
*/
tcStdXCombPtr theRealXComb;
/**
* The XComb object describing the underlying Born process
*/
tcStdXCombPtr theBornXComb;
/**
* The momentum of the emitter in the underlying Born process
*/
Lorentz5Momentum theBornEmitterMomentum;
/**
* The momentum of the spectator in the underlying Born process
*/
Lorentz5Momentum theBornSpectatorMomentum;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TildeKinematics & operator=(const TildeKinematics &);
+ TildeKinematics & operator=(const TildeKinematics &) = delete;
};
}
#endif /* HERWIG_TildeKinematics_H */
diff --git a/MatrixElement/Matchbox/Phasespace/TreePhasespace.h b/MatrixElement/Matchbox/Phasespace/TreePhasespace.h
--- a/MatrixElement/Matchbox/Phasespace/TreePhasespace.h
+++ b/MatrixElement/Matchbox/Phasespace/TreePhasespace.h
@@ -1,217 +1,217 @@
// -*- C++ -*-
//
// TreePhasespace.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_TreePhasespace_H
#define Herwig_TreePhasespace_H
//
// This is the declaration of the TreePhasespace class.
//
#include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/TreePhasespaceChannels.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer, Ken Arnold
*
* \brief TreePhasespace is a multi-channel phase space generator
* adapting to singularity structures as determined from the matrix
* elements diagrams.
*
* @see \ref TreePhasespaceInterfaces "The interfaces"
* defined for TreePhasespace.
*/
class TreePhasespace: public MatchboxPhasespace {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
TreePhasespace();
/**
* The destructor.
*/
virtual ~TreePhasespace();
//@}
public:
/**
* Prepare a phase space generator for the given xcomb object.
*/
virtual void setXComb(tStdXCombPtr);
/**
* Generate a phase space point and return its weight.
*/
virtual double generateTwoToNKinematics(const double*,
vector<Lorentz5Momentum>& momenta);
/**
* Return the number of random numbers required to produce a given
* multiplicity final state.
*/
virtual int nDimPhasespace(int nFinal) const {
if ( nFinal == 1 )
return 1;
return 3*(nFinal - 1); // one additional number needed for channel selection
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The object storing channel maps
*/
Ptr<TreePhasespaceChannels>::ptr theChannelMap;
/**
* Map xcomb's to channel vectors indexed by diagram id.
*/
map<tStdXCombPtr,
map<Ptr<Tree2toNDiagram>::ptr,
pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> > >&
channelMap() { return theChannelMap->channelMap(); }
/**
* The currently active channels.
*/
map<tStdXCombPtr,
map<Ptr<Tree2toNDiagram>::ptr,
pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> > >::iterator
lastChannelsIterator;
/**
* The phase space info object to be used.
*/
PhasespaceHelpers::PhasespaceInfo lastPhasespaceInfo;
/**
* Parameter steering from which on propagator virtualities are
* sampled flat.
*/
double x0;
/**
* Parameter steering at which virtuality singularities of
* propagators are actually cut off.
*/
double xc;
/**
* Parameter steering from which on propagator virtualities are
* sampled flat.
*/
Energy M0;
/**
* Parameter steering at which virtuality singularities of
* propagators are actually cut off.
*/
Energy Mc;
/**
* Choose whether to also use mirrored phase space generation
*/
bool theIncludeMirrored;
/**
* Return the currently active channels.
*/
map<Ptr<Tree2toNDiagram>::ptr,
pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> >& lastChannels() {
return lastChannelsIterator->second;
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TreePhasespace & operator=(const TreePhasespace &);
+ TreePhasespace & operator=(const TreePhasespace &) = delete;
};
}
#endif /* Herwig_TreePhasespace_H */
diff --git a/MatrixElement/Matchbox/Phasespace/TreePhasespaceChannels.h b/MatrixElement/Matchbox/Phasespace/TreePhasespaceChannels.h
--- a/MatrixElement/Matchbox/Phasespace/TreePhasespaceChannels.h
+++ b/MatrixElement/Matchbox/Phasespace/TreePhasespaceChannels.h
@@ -1,128 +1,128 @@
// -*- C++ -*-
//
// TreePhasespaceChannels.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_TreePhasespaceChannels_H
#define Herwig_TreePhasespaceChannels_H
//
// This is the declaration of the TreePhasespaceChannels class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "Herwig/MatrixElement/Matchbox/Phasespace/PhasespaceHelpers.h"
namespace Herwig {
using namespace ThePEG;
/**
*
* \ingroup Matchbox
* \author Simon Platzer, Ken Arnold
*
* \brief Store channels for the tree phasespace.
*
* @see \ref TreePhasespaceChannelsInterfaces "The interfaces"
* defined for TreePhasespaceChannels.
*/
class TreePhasespaceChannels: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
TreePhasespaceChannels();
/**
* The destructor.
*/
virtual ~TreePhasespaceChannels();
//@}
public:
/**
* Access the channel map
*/
map<tStdXCombPtr,map<Ptr<Tree2toNDiagram>::ptr,pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> > >&
channelMap() { return theChannelMap; }
/**
* Return the channel map
*/
const map<tStdXCombPtr,map<Ptr<Tree2toNDiagram>::ptr,pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> > >&
channelMap() const { return theChannelMap; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Map xcomb's to channel vectors indexed by diagram id.
*/
map<tStdXCombPtr,map<Ptr<Tree2toNDiagram>::ptr,pair<PhasespaceHelpers::PhasespaceTree,PhasespaceHelpers::PhasespaceTree> > > theChannelMap;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TreePhasespaceChannels & operator=(const TreePhasespaceChannels &);
+ TreePhasespaceChannels & operator=(const TreePhasespaceChannels &) = delete;
};
}
#endif /* Herwig_TreePhasespaceChannels_H */
diff --git a/MatrixElement/Matchbox/Scales/Makefile.am b/MatrixElement/Matchbox/Scales/Makefile.am
--- a/MatrixElement/Matchbox/Scales/Makefile.am
+++ b/MatrixElement/Matchbox/Scales/Makefile.am
@@ -1,32 +1,32 @@
pkglib_LTLIBRARIES = HwMatchboxScales.la
-HwMatchboxScales_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:1:0
+HwMatchboxScales_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
HwMatchboxScales_la_SOURCES = \
MatchboxHtScale.h \
MatchboxLeptonMassScale.h \
MatchboxLeptonPtScale.h \
MatchboxParticlePtScale.h \
MatchboxPtScale.h \
MatchboxHtScale.cc \
MatchboxLeptonMassScale.cc \
MatchboxLeptonPtScale.cc \
MatchboxParticlePtScale.cc \
MatchboxPtScale.cc \
MatchboxSHatScale.h \
MatchboxSHatScale.cc \
MatchboxTopMassScale.h \
MatchboxTopMassScale.cc \
MatchboxTopMTScale.h \
MatchboxTopMTScale.cc \
MatchboxTopSumMTScale.h \
MatchboxTopSumMTScale.cc \
MatchboxTopMinMTScale.h \
MatchboxTopMinMTScale.cc \
MatchboxTriVecScales.h \
MatchboxTriVecScales.cc \
MatchboxTopLinearSumMTScale.h \
MatchboxTopLinearSumMTScale.cc \
MatchboxTopIndividualMTScale.h \
MatchboxTopIndividualMTScale.cc
diff --git a/MatrixElement/Matchbox/Scales/MatchboxHtScale.h b/MatrixElement/Matchbox/Scales/MatchboxHtScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxHtScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxHtScale.h
@@ -1,160 +1,160 @@
// -*- C++ -*-
//
// MatchboxHtScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxHtScale_H
#define Herwig_MatchboxHtScale_H
//
// This is the declaration of the MatchboxHtScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
#include "ThePEG/PDT/MatcherBase.h"
#include "ThePEG/Cuts/JetFinder.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxHtScale implements scale choices related to transverse momenta.
*
*/
class MatchboxHtScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxHtScale();
/**
* The destructor.
*/
virtual ~MatchboxHtScale();
//@}
public:
/**
* Return the renormalization scale. This default version returns
* shat.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale. This default version returns
* shat.
*/
virtual Energy2 factorizationScale() const;
protected:
/**
* Initialize potential weighting factors for the given final state
*/
virtual void initWeightFactors(const tcPDVector&, const vector<LorentzMomentum>&,
const Ptr<JetFinder>::ptr&) const {}
/**
* Return the jet pt weighting factor for the given jet
*/
virtual double jetPtWeight(const LorentzMomentum&) const { return 1.; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Reference to the jet finder
*/
Ptr<JetFinder>::ptr theJetFinder;
/**
* Include the transverse masses of the non-jet objects
*/
bool theIncludeMT;
/**
* An ovewrall scaling factor for the jet contribution
*/
double theHTFactor;
/**
* An ovewrall scaling factor for the non-jet contribution
*/
double theMTFactor;
/**
* We define jets as clustered objects with a minimum pT
*/
Energy theScalePtCut;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxHtScale & operator=(const MatchboxHtScale &);
+ MatchboxHtScale & operator=(const MatchboxHtScale &) = delete;
};
}
#endif /* Herwig_MatchboxHtScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxLeptonMassScale.h b/MatrixElement/Matchbox/Scales/MatchboxLeptonMassScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxLeptonMassScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxLeptonMassScale.h
@@ -1,123 +1,123 @@
// -*- C++ -*-
//
// MatchboxLeptonMassScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxLeptonMassScale_H
#define Herwig_MatchboxLeptonMassScale_H
//
// This is the declaration of the MatchboxLeptonMassScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxLeptonMassScale implements scale choices related
* to lepton pair invariant masses.
*
*/
class MatchboxLeptonMassScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxLeptonMassScale();
/**
* The destructor.
*/
virtual ~MatchboxLeptonMassScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
/**
* Return the QED renormalization scale.
*/
virtual Energy2 renormalizationScaleQED() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxLeptonMassScale & operator=(const MatchboxLeptonMassScale &);
+ MatchboxLeptonMassScale & operator=(const MatchboxLeptonMassScale &) = delete;
};
}
#endif /* Herwig_MatchboxLeptonMassScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxLeptonPtScale.h b/MatrixElement/Matchbox/Scales/MatchboxLeptonPtScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxLeptonPtScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxLeptonPtScale.h
@@ -1,123 +1,123 @@
// -*- C++ -*-
//
// MatchboxLeptonPtScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxLeptonPtScale_H
#define Herwig_MatchboxLeptonPtScale_H
//
// This is the declaration of the MatchboxLeptonPtScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxLeptonPtScale implements scale choices related
* to lepton pair transverse momenta.
*
*/
class MatchboxLeptonPtScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxLeptonPtScale();
/**
* The destructor.
*/
virtual ~MatchboxLeptonPtScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
/**
* Return the QED renormalization scale.
*/
virtual Energy2 renormalizationScaleQED() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxLeptonPtScale & operator=(const MatchboxLeptonPtScale &);
+ MatchboxLeptonPtScale & operator=(const MatchboxLeptonPtScale &) = delete;
};
}
#endif /* Herwig_MatchboxLeptonPtScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxParticlePtScale.h b/MatrixElement/Matchbox/Scales/MatchboxParticlePtScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxParticlePtScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxParticlePtScale.h
@@ -1,124 +1,124 @@
// -*- C++ -*-
//
// MatchboxParticlePtScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxParticlePtScale_H
#define Herwig_MatchboxParticlePtScale_H
//
// This is the declaration of the MatchboxParticlePtScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
#include "ThePEG/Cuts/JetFinder.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxParticlePtScale implements scale choices related to transverse momenta.
*
*/
class MatchboxParticlePtScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxParticlePtScale();
/**
* The destructor.
*/
virtual ~MatchboxParticlePtScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Reference to the matcher
*/
Ptr<MatcherBase>::ptr theMatcher;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxParticlePtScale & operator=(const MatchboxParticlePtScale &);
+ MatchboxParticlePtScale & operator=(const MatchboxParticlePtScale &) = delete;
};
}
#endif /* Herwig_MatchboxParticlePtScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxPtScale.h b/MatrixElement/Matchbox/Scales/MatchboxPtScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxPtScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxPtScale.h
@@ -1,124 +1,124 @@
// -*- C++ -*-
//
// MatchboxPtScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxPtScale_H
#define Herwig_MatchboxPtScale_H
//
// This is the declaration of the MatchboxPtScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
#include "ThePEG/Cuts/JetFinder.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxPtScale implements scale choices related to transverse momenta.
*
*/
class MatchboxPtScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxPtScale();
/**
* The destructor.
*/
virtual ~MatchboxPtScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Reference to the jet finder
*/
Ptr<JetFinder>::ptr theJetFinder;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxPtScale & operator=(const MatchboxPtScale &);
+ MatchboxPtScale & operator=(const MatchboxPtScale &) = delete;
};
}
#endif /* Herwig_MatchboxPtScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxSHatScale.h b/MatrixElement/Matchbox/Scales/MatchboxSHatScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxSHatScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxSHatScale.h
@@ -1,117 +1,117 @@
// -*- C++ -*-
//
// MatchboxSHatScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxSHatScale_H
#define Herwig_MatchboxSHatScale_H
//
// This is the declaration of the MatchboxSHatScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Christian Reuschle
*
* \brief MatchboxSHatScale implements lastSHat() as scale choice.
*
*/
class MatchboxSHatScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxSHatScale();
/**
* The destructor.
*/
virtual ~MatchboxSHatScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxSHatScale & operator=(const MatchboxSHatScale &);
+ MatchboxSHatScale & operator=(const MatchboxSHatScale &) = delete;
};
}
#endif /* Herwig_MatchboxSHatScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopIndividualMTScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopIndividualMTScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopIndividualMTScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopIndividualMTScale.h
@@ -1,141 +1,141 @@
// -*- C++ -*-
//
// MatchboxTopIndividualMTScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopIndividualMTScale_H
#define Herwig_MatchboxTopIndividualMTScale_H
//
// This is the declaration of the MatchboxTopIndividualMTScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Stephen Webster
*
* \brief MatchboxTopIndividualMTScale implements the scale as
* the transverse masses of the top quark in a top-pair process.
*
*/
class MatchboxTopIndividualMTScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopIndividualMTScale();
/**
* The destructor.
*/
virtual ~MatchboxTopIndividualMTScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
/**
* Return the shower hard scale.
*/
virtual Energy2 showerScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Switch to choose the definition of the shower hard scale.
*/
unsigned int theShowerScaleMode;
/**
* Multiplicative factor for the scale definition
*/
double theFactor;
/**
* Switch to choose which top quark/antiquak to use to
* compute the scale.
*/
unsigned int theTopOrAntitop;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxTopIndividualMTScale & operator=(const MatchboxTopIndividualMTScale &);
+ MatchboxTopIndividualMTScale & operator=(const MatchboxTopIndividualMTScale &) = delete;
};
}
#endif /* Herwig_MatchboxTopIndividualMTScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopLinearSumMTScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopLinearSumMTScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopLinearSumMTScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopLinearSumMTScale.h
@@ -1,136 +1,136 @@
// -*- C++ -*-
//
// MatchboxTopLinearSumMTScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopLinearSumMTScale_H
#define Herwig_MatchboxTopLinearSumMTScale_H
//
// This is the declaration of the MatchboxTopLinearSumMTScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Stephen Webster
*
* \brief MatchboxTopLinearSumMTScale implements the scale as the linear
* sum of the transverse masses of the top and antitop quarks in
* a top pair process.
*
*/
class MatchboxTopLinearSumMTScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopLinearSumMTScale();
/**
* The destructor.
*/
virtual ~MatchboxTopLinearSumMTScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
/**
* Return the shower hard scale.
*/
virtual Energy2 showerScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Switch to choose the definition of the shower hard scale.
*/
unsigned int theShowerScaleMode;
/**
* Multiplicative factor for the scale definition
**/
double theFactor;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxTopLinearSumMTScale & operator=(const MatchboxTopLinearSumMTScale &);
+ MatchboxTopLinearSumMTScale & operator=(const MatchboxTopLinearSumMTScale &) = delete;
};
}
#endif /* Herwig_MatchboxTopLinearSumMTScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h
@@ -1,130 +1,130 @@
// -*- C++ -*-
//
// MatchboxTopMTScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopMTScale_H
#define Herwig_MatchboxTopMTScale_H
//
// This is the declaration of the MatchboxTopMTScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Daniel Rauch
*
* \brief MatchboxTopMTScale implements a scale choice related to the average
* of the transverse masses of a top and antitop quark.
*
*/
class MatchboxTopMTScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopMTScale();
/**
* The destructor.
*/
virtual ~MatchboxTopMTScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
/**
* Return the shower hard scale.
*/
virtual Energy2 showerScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Switch to choose the definition of the shower hard scale.
*/
unsigned int theShowerScaleMode;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxTopMTScale & operator=(const MatchboxTopMTScale &);
+ MatchboxTopMTScale & operator=(const MatchboxTopMTScale &) = delete;
};
}
#endif /* Herwig_MatchboxTopMTScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h
@@ -1,130 +1,130 @@
// -*- C++ -*-
//
// MatchboxTopMassScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopMassScale_H
#define Herwig_MatchboxTopMassScale_H
//
// This is the declaration of the MatchboxTopMassScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Daniel Rauch
*
* \brief MatchboxTopMassScale implements a scale choice related to the invariant mass
* of the top-antitop quark pair.
*
*/
class MatchboxTopMassScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopMassScale();
/**
* The destructor.
*/
virtual ~MatchboxTopMassScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
/**
* Return the shower hard scale.
*/
virtual Energy2 showerScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Switch to choose the definition of the shower hard scale.
*/
unsigned int theShowerScaleMode;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxTopMassScale & operator=(const MatchboxTopMassScale &);
+ MatchboxTopMassScale & operator=(const MatchboxTopMassScale &) = delete;
};
}
#endif /* Herwig_MatchboxTopMassScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopMinMTScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopMinMTScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopMinMTScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopMinMTScale.h
@@ -1,120 +1,120 @@
// -*- C++ -*-
//
// MatchboxTopMinMTScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopMinMTScale_H
#define Herwig_MatchboxTopMinMTScale_H
//
// This is the declaration of the MatchboxTopMinMTScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Daniel Rauch
*
* \brief MatchboxTopMinMTScale implements a scale choice related to the quadratic
* sum of transverse masses of a top and antitop quark.
*
*/
class MatchboxTopMinMTScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopMinMTScale();
/**
* The destructor.
*/
virtual ~MatchboxTopMinMTScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxTopMinMTScale & operator=(const MatchboxTopMinMTScale &);
+ MatchboxTopMinMTScale & operator=(const MatchboxTopMinMTScale &) = delete;
};
}
#endif /* Herwig_MatchboxTopMinMTScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopSumMTScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopSumMTScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopSumMTScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopSumMTScale.h
@@ -1,120 +1,120 @@
// -*- C++ -*-
//
// MatchboxTopSumMTScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopSumMTScale_H
#define Herwig_MatchboxTopSumMTScale_H
//
// This is the declaration of the MatchboxTopSumMTScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Daniel Rauch
*
* \brief MatchboxTopSumMTScale implements a scale choice related to the quadratic
* sum of transverse masses of a top and antitop quark.
*
*/
class MatchboxTopSumMTScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopSumMTScale();
/**
* The destructor.
*/
virtual ~MatchboxTopSumMTScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxTopSumMTScale & operator=(const MatchboxTopSumMTScale &);
+ MatchboxTopSumMTScale & operator=(const MatchboxTopSumMTScale &) = delete;
};
}
#endif /* Herwig_MatchboxTopSumMTScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTriVecScales.h b/MatrixElement/Matchbox/Scales/MatchboxTriVecScales.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTriVecScales.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTriVecScales.h
@@ -1,135 +1,135 @@
// -*- C++ -*-
//
// MatchboxTriVecScales.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTriVecScales_H
#define Herwig_MatchboxTriVecScales_H
//
// This is the declaration of the MatchboxTriVecScales class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
#include "ThePEG/PDT/MatcherBase.h"
#include "ThePEG/Cuts/JetFinder.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Christian Reuschle
*
* \brief MatchboxTriVecScales implements scale choices related to transverse momenta and transverse energies
* in events with up to three vector bosons in the final state, plus additional jets, where the vector bosons
* are associated to lepton pairs of distinct families.
*
*/
class MatchboxTriVecScales: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTriVecScales();
/**
* The destructor.
*/
virtual ~MatchboxTriVecScales();
//@}
public:
/**
* Return the renormalization scale. This default version returns
* shat.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale. This default version returns
* shat.
*/
virtual Energy2 factorizationScale() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Reference to the jet finder
*/
Ptr<JetFinder>::ptr theJetFinder;
/**
* The scale choice to use.
*/
unsigned int theTriVecScaleChoice;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxTriVecScales & operator=(const MatchboxTriVecScales &);
+ MatchboxTriVecScales & operator=(const MatchboxTriVecScales &) = delete;
};
}
#endif /* Herwig_MatchboxTriVecScales_H */
diff --git a/MatrixElement/Matchbox/Tests/HardProcessAnalysis.h b/MatrixElement/Matchbox/Tests/HardProcessAnalysis.h
--- a/MatrixElement/Matchbox/Tests/HardProcessAnalysis.h
+++ b/MatrixElement/Matchbox/Tests/HardProcessAnalysis.h
@@ -1,257 +1,257 @@
// -*- C++ -*-
#ifndef Herwig_HardProcessAnalysis_H
#define Herwig_HardProcessAnalysis_H
//
// This is the declaration of the HardProcessAnalysis class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HardProcessAnalysis class.
*
* @see \ref HardProcessAnalysisInterfaces "The interfaces"
* defined for HardProcessAnalysis.
*/
class HardProcessAnalysis: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
HardProcessAnalysis();
/**
* The destructor.
*/
virtual ~HardProcessAnalysis();
//@}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
protected:
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HardProcessAnalysis & operator=(const HardProcessAnalysis &);
+ HardProcessAnalysis & operator=(const HardProcessAnalysis &) = delete;
/**
* Differential information per outgoing parton
*/
struct Histograms {
/**
* The constructor
*/
Histograms() {}
/**
* The constructor
*/
explicit Histograms(Energy ECM, unsigned int theNBins);
/**
* Analyse given momentum
*/
void fill(const Lorentz5Momentum& p, double weight);
/**
* Finalize given process id and cross section.
*/
void finalize(ostream& dat,
ostream& plot,
const string& subpro,
size_t legid,
double norm,
bool theUnitWeights);
/**
* Pt spectrum
*/
HistogramPtr transverse;
/**
* Rapidity distribution
*/
HistogramPtr rapidity;
/**
* Azimuthal angle distribution
*/
HistogramPtr phi;
};
/**
* Outgoing partons and x distributions
*/
struct AllHistograms {
/**
* Outgoing partons
*/
vector<Histograms> outgoing;
/**
* x1 distribution
*/
HistogramPtr x1;
/**
* x2 distribution
*/
HistogramPtr x2;
/**
* sqrt(shat) distribution
*/
HistogramPtr sshat;
/**
* y distribution
*/
HistogramPtr rapidity;
/**
* The sum of weights
*/
double sumWeights;
};
/**
* Histograms per subprocess
*/
map<vector<string>,AllHistograms> histogramData;
/**
* The total sum of weights
*/
double sumWeights;
/**
* Analyze a given final state
*/
void fill(PPair, ParticleVector, double);
/**
* The number of bins to use
*/
unsigned int theNBins;
/**
* True, if unit weights should be booked
*/
bool theUnitWeights;
/**
* True, if subprocesses should be distinguished by initial state
*/
bool theSplitInitialStates;
/**
* True, if partons should be handled as jets irrespective of flavour
*/
bool thePartonsAreJets;
};
}
#endif /* Herwig_HardProcessAnalysis_H */
diff --git a/MatrixElement/Matchbox/Tests/WeightAnalyzer.h b/MatrixElement/Matchbox/Tests/WeightAnalyzer.h
--- a/MatrixElement/Matchbox/Tests/WeightAnalyzer.h
+++ b/MatrixElement/Matchbox/Tests/WeightAnalyzer.h
@@ -1,216 +1,216 @@
// -*- C++ -*-
#ifndef Herwig_WeightAnalyzer_H
#define Herwig_WeightAnalyzer_H
//
// This is the declaration of the WeightAnalyzer class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the WeightAnalyzer class.
*
* @see \ref WeightAnalyzerInterfaces "The interfaces"
* defined for WeightAnalyzer.
*/
class WeightAnalyzer: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
WeightAnalyzer();
/**
* The destructor.
*/
virtual ~WeightAnalyzer();
//@}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
protected:
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The sum of weights
*/
double sumWeights;
/**
* The sum of positive weights
*/
double sumPositiveWeights;
/**
* The sum of negative weights
*/
double sumNegativeWeights;
/**
* The sum of weights calculated by subprocess group weights
*/
double sumGroupWeights;
/**
* The sum of positive weights calculated by subprocess group weights
*/
double sumPositiveGroupWeights;
/**
* The sum of negative weights calculated by subprocess group weights
*/
double sumNegativeGroupWeights;
/**
* The maximum deviation of the group weight sum from one
*/
double maxDeviationGroupWeight;
/**
* The maximum deviation of the event weight sum from the overall
* event weight
*/
double maxDeviationEventWeight;
/**
* Total number of positive weights
*/
double nPositiveWeights;
/**
* Total number of negative weights
*/
double nNegativeWeights;
/**
* The maximum postive weight
*/
double maxPositiveWeight;
/**
* The maximum absolute negative weight
*/
double maxNegativeWeight;
/**
* Histogram of positive weight occurences
*/
map<double,double> positiveWeightDistribution;
/**
* Histogram of negative weight occurences
*/
map<double,double> negativeWeightDistribution;
/**
* Gnuplot output
*/
bool gnuplot;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- WeightAnalyzer & operator=(const WeightAnalyzer &);
+ WeightAnalyzer & operator=(const WeightAnalyzer &) = delete;
};
}
#endif /* Herwig_WeightAnalyzer_H */
diff --git a/MatrixElement/Matchbox/Utility/AmplitudeCache.h b/MatrixElement/Matchbox/Utility/AmplitudeCache.h
--- a/MatrixElement/Matchbox/Utility/AmplitudeCache.h
+++ b/MatrixElement/Matchbox/Utility/AmplitudeCache.h
@@ -1,346 +1,346 @@
// -*- C++ -*-
//
// AmplitudeCache.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_AmplitudeCache_H
#define HERWIG_AmplitudeCache_H
#include "Herwig/MatrixElement/Matchbox/Utility/SpinorHelicity.h"
#include "ThePEG/Config/algorithm.h"
#include <array>
namespace Herwig {
using namespace ThePEG;
using std::array;
namespace SpinorHelicity {
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Caching for amplitudes using spinor helicity techniques.
*
*/
template<typename AmplitudeKey>
class AmplitudeCache {
typedef map<AmplitudeKey,pair<bool,Complex> > AmplitudeCacheMap;
typedef map<AmplitudeKey,pair<bool,LorentzVector<Complex> > > CurrentCacheMap;
/**
* Maximum N we can handle, SYM_N is storage size for a symmetric matrix of N * N elements
*/
enum { MAX_N = 7, SYM_N = MAX_N*(MAX_N+1)/2 };
/**
* The number of points
*/
int theNPoints;
/**
* The energy scale to obtain dimensionless
* quantities.
*/
mutable Energy theScale;
/**
* Masses indexed by partons
*/
mutable array<double,MAX_N> theMasses;
/**
* Momenta indexed by partons
*/
mutable array<LorentzMomentum,MAX_N> theMomenta;
/**
* Crossing signs indexed by partons
*/
mutable array<int,MAX_N> theCrossingSigns;
/**
* Plus spinors indexed by partons
*/
mutable array<PlusSpinor,MAX_N> thePlusSpinors;
/**
* Plus conjugate spinors indexed by partons
*/
mutable array<PlusConjugateSpinor,MAX_N> thePlusConjugateSpinors;
/**
* Invariants indexed by partons
*/
mutable array<double,SYM_N> theInvariants;
/**
* Flag products to be recalculated
*/
mutable array<bool,SYM_N> getInvariant;
/**
* Spinor products indexed by partons
*/
mutable array<Complex,SYM_N> thePlusProducts;
/**
* Flag products to be recalculated
*/
mutable array<bool,SYM_N> getPlusProduct;
/**
* Spinor currents indexed by partons
*/
mutable array<LorentzVector<Complex>,SYM_N> thePlusCurrents;
/**
* Flag currents to be recalculated
*/
mutable array<bool,SYM_N> getPlusCurrent;
/**
* Cache intermediate amplitudes by index
*/
mutable AmplitudeCacheMap theCachedAmplitudes;
/**
* The last query for a cached amplitude
*/
mutable typename AmplitudeCacheMap::iterator theLastAmplitude;
/**
* Cache intermediate currents by index
*/
mutable CurrentCacheMap theCachedCurrents;
/**
* The last query for a cached current
*/
mutable typename CurrentCacheMap::iterator theLastCurrent;
/**
* Helper function to index symmetric arrays, assumes i <= j.
* Usual indexing function (N*i + j) corrected by triangle number for i-th row.
*/
inline size_t idx(size_t i, size_t j) const {
return MAX_N * i - (i + 1) * i / 2 + j;
}
/**
* Helper to reset flags
*/
struct boolResetter {
void operator()(pair<const AmplitudeKey,pair<bool,Complex> >& flag) const {
flag.second.first = true;
}
void operator()(pair<const AmplitudeKey,pair<bool,LorentzVector<Complex> > >& flag) const {
flag.second.first = true;
}
};
public:
/**
* Constructor
*/
AmplitudeCache() : theNPoints(0) {}
/**
* Prepare for n-point amplitude
*/
void nPoints(int n);
/**
* Return the number of points
*/
int nPoints() const {
return theNPoints;
}
/**
* Set the energy scale to obtain dimensionless
* quantities and flag all quantities to be recalculated.
*/
void amplitudeScale(Energy s) const;
/**
* Set the momentum for the k'th parton
* and its associated mass.
*/
void momentum(int k, const LorentzMomentum& p,
bool getSpinors = true,
Energy mass = ZERO) const;
/**
* Reset flags
*/
void reset() const;
public:
/**
* Return the momentum for the k'th parton
*/
LorentzVector<double> momentum(int k) const { return theMomenta[k]/theScale; }
/**
* Get the energy scale to obtain dimensionless
* quantities and flag all quantities to be recalculated.
*/
Energy amplitudeScale() const { return theScale; }
/**
* Return the mass associated to the k'th parton
*/
double mass(int k) const { return theMasses[k]; }
/**
* Return the crossing sign for the
* i'th parton
*/
int crossingSign(int i) const { return theCrossingSigns[i]; }
/**
* Return the crossing sign for the
* i'th and j'th parton
*/
double crossingSign(int i, int j) const { return theCrossingSigns[i]*theCrossingSigns[j]; }
/**
* Return (ij)
*/
double invariant(int i, int j) const {
if ( i == j ) return 0.;
if ( i > j ) swap(i,j);
if ( getInvariant[idx(i,j)] ) {
getInvariant[idx(i,j)] = false;
theInvariants[idx(i,j)] = 2.*(momentum(i)*momentum(j));
}
return theInvariants[idx(i,j)];
}
/**
* Return <ij>
*/
Complex plusProduct(int i, int j) const {
if ( i== j )
return 0.;
bool swapij = (i > j);
if ( swapij )
swap(i,j);
if ( getPlusProduct[idx(i,j)] ) {
getPlusProduct[idx(i,j)] = false;
thePlusProducts[idx(i,j)] =
- PlusSpinorProduct(thePlusConjugateSpinors[i],
- thePlusSpinors[j]).eval() / theScale;
+ Complex(PlusSpinorProduct(thePlusConjugateSpinors[i],
+ thePlusSpinors[j]).eval() / theScale);
}
return swapij ? -thePlusProducts[idx(i,j)] : thePlusProducts[idx(i,j)];
}
/**
* Return [ij]
*/
Complex minusProduct(int i, int j) const {
if ( i== j )
return 0.;
return -crossingSign(i,j)*conj(plusProduct(i,j));
}
/**
* Return <i|\gamma^\mu|j]
*/
LorentzVector<Complex> plusCurrent(int i, int j) const {
bool swapij = (i > j);
if ( swapij )
swap(i,j);
if ( getPlusCurrent[idx(i,j)] ) {
getPlusCurrent[idx(i,j)] = false;
if ( i != j ) {
thePlusCurrents[idx(i,j)] =
PlusSpinorCurrent(thePlusConjugateSpinors[i],
MinusSpinor(theMomenta[j])).eval() / theScale;
} else {
thePlusCurrents[idx(i,j)] = 2.*momentum(i);
}
}
return swapij ? crossingSign(i,j)*thePlusCurrents[idx(i,j)].conjugate() : thePlusCurrents[idx(i,j)];
}
/**
* Return [i|\gamma^\mu|j>
*/
LorentzVector<Complex> minusCurrent(int i, int j) const {
return plusCurrent(j,i);
}
public:
/**
* Return true, if the given amplitude
* needs to be recalculated.
*/
bool getAmplitude(const AmplitudeKey& key) const {
static Complex czero;
if ( ( theLastAmplitude = theCachedAmplitudes.find(key) )
== theCachedAmplitudes.end() ) {
theLastAmplitude = theCachedAmplitudes.insert(make_pair(key,make_pair(true,czero))).first;
}
return theLastAmplitude->second.first;
}
/**
* Cache an amplitude
*/
void cacheAmplitude(Complex amp) const {
theLastAmplitude->second = make_pair(false,amp);
}
/**
* Return a cached amplitude
*/
const Complex& cachedAmplitude() const {
return theLastAmplitude->second.second;
}
/**
* Return true, if the given current
* needs to be recalculated.
*/
bool getCurrent(const AmplitudeKey& key) const {
static LorentzVector<Complex> czero;
if ( ( theLastCurrent = theCachedCurrents.find(key) )
== theCachedCurrents.end() ) {
theLastCurrent = theCachedCurrents.insert(make_pair(key,make_pair(true,czero))).first;
}
return theLastCurrent->second.first;
}
/**
* Cache an current
*/
void cacheCurrent(const LorentzVector<Complex>& curr) const {
theLastCurrent->second = make_pair(false,curr);
}
/**
* Return a cached current
*/
const LorentzVector<Complex>& cachedCurrent() const {
return theLastCurrent->second.second;
}
};
}
}
#include "AmplitudeCache.tcc"
#endif // HERWIG_AmplitudeCache_H
diff --git a/MatrixElement/Matchbox/Utility/ColourBasis.h b/MatrixElement/Matchbox/Utility/ColourBasis.h
--- a/MatrixElement/Matchbox/Utility/ColourBasis.h
+++ b/MatrixElement/Matchbox/Utility/ColourBasis.h
@@ -1,566 +1,566 @@
// -*- C++ -*-
//
// ColourBasis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ColourBasis_H
#define HERWIG_ColourBasis_H
//
// This is the declaration of the ColourBasis class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
#include "ThePEG/MatrixElement/MEBase.h"
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxXComb.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
#include <iterator>
namespace Herwig {
using std::iterator_traits;
using std::distance;
using namespace ThePEG;
using boost::numeric::ublas::matrix;
using boost::numeric::ublas::symmetric_matrix;
using boost::numeric::ublas::compressed_matrix;
using boost::numeric::ublas::upper;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief ColourBasis is an interface to a colour basis
* implementation.
*
*/
class ColourBasis: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ColourBasis();
/**
* The destructor.
*/
virtual ~ColourBasis();
//@}
public:
/**
* Return the factory which produced this matrix element
*/
Ptr<MatchboxFactory>::tptr factory() const;
/**
* Clone this colour basis.
*/
Ptr<ColourBasis>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<ColourBasis>::ptr>(clone());
}
/**
* Clear this colour basis
*/
virtual void clear();
/**
* Prepare for the given sub process and return the basis
* dimensionality.
*/
size_t prepare(const cPDVector&, bool);
/**
* Prepare for the given diagrams.
*/
size_t prepare(const MEBase::DiagramVector&, bool);
/**
* Return the index map.
*/
const map<cPDVector,map<size_t,size_t> >& indexMap() const { return theIndexMap; }
/**
* Return a map of basis tensor indices to vectors identifying a
* certain ordering corresponding to the given colour structure. May
* not be supported by all colour basis implementations.
*/
virtual map<size_t,vector<vector<size_t> > > basisList(const vector<PDT::Colour>&) const {
return map<size_t,vector<vector<size_t> > >();
}
/**
* Given a physical subprocess, a colour to amplitude label map and
* a basis tensor index, return an identifier of the ordering
* coresponding to the given colour structure. This will only return
* sensible results for colour bases which implement the basisList
* query.
*/
const string& orderingString(const cPDVector& sub,
const map<size_t,size_t>& colourToAmplitude,
size_t tensorId);
/**
* Given a physical subprocess, a colour to amplitude label map and
* a basis tensor index, return an identifier of the ordering
* coresponding to the given colour structure. This will only return
* sensible results for colour bases which implement the basisList
* query.
*/
const set<vector<size_t> >& ordering(const cPDVector& sub,
const map<size_t,size_t>& colourToAmplitude,
size_t tensorId, size_t shift = 0);
/**
* For the given subprocess and amplitude vectors
* calculate the amplitude squared.
*/
double me2(const cPDVector&, const map<vector<int>,CVector>&) const;
/**
* For the given subprocess and amplitude vectors
* calculate the interference.
*/
double interference(const cPDVector&,
const map<vector<int>,CVector>&,
const map<vector<int>,CVector>&) const;
/**
* For the given subprocess and amplitude vector
* calculate the colour correlated amplitude.
*/
double colourCorrelatedME2(const pair<size_t,size_t>&,
const cPDVector&,
const map<vector<int>,CVector>&) const;
/**
* For the given subprocess and amplitude vector
* calculate the amplitude squared.
*/
Complex interference(const cPDVector&,
const CVector&, const CVector&) const;
/**
* For the given subprocess and amplitude vector
* calculate the colour correlated amplitude.
*/
Complex colourCorrelatedInterference(const pair<size_t,size_t>&,
const cPDVector&,
const CVector&, const CVector&) const;
/**
* For the given subprocess and amplitude given as amp amp^\dagger
* calculate the amplitude squared.
*/
double me2(const cPDVector&, const matrix<Complex>&) const;
/**
* For the given subprocess and amplitude given as amp amp^\dagger
* calculate the colour correlated amplitude.
*/
double colourCorrelatedME2(const pair<size_t,size_t>&,
const cPDVector&,
const matrix<Complex>&) const;
/**
* Return the scalar product matrix for the given process.
*/
const symmetric_matrix<double,upper>& scalarProducts(const cPDVector&) const;
/**
* Return the matrix representation of a colour charge.
*/
const compressed_matrix<double>& charge(const cPDVector&, size_t) const;
/**
* Return the non-vanishing elements of a colour charge.
*/
const vector<pair<size_t,size_t> >& chargeNonZero(const cPDVector&, size_t) const;
/**
* Return the correlator matrix for the given process.
*/
const symmetric_matrix<double,upper>& correlator(const cPDVector&,
const pair<size_t,size_t>&) const;
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const { return false; }
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
*/
Selector<const ColourLines *> colourGeometries(tcDiagPtr diag,
const map<vector<int>,CVector>& amps);
/**
* Return the colour tensor used for the selected colour flow
*/
size_t tensorIdFromFlow(tcDiagPtr diag, const ColourLines * cl);
/**
* Match colour representation.
*/
struct matchRep {
PDT::Colour m;
matchRep(PDT::Colour n)
: m(n) {}
bool operator()(PDT::Colour c) const {
return c == m;
}
};
/**
* Return true, if this basis is running in large-N mode
*/
virtual bool largeN() const { return theLargeN; }
/**
* Switch to large n
*/
void doLargeN(bool yes = true) { theLargeN = yes; }
/**
* Convert particle data to colour information
*/
vector<PDT::Colour> projectColour(const cPDVector&) const;
/**
* Perform a normal ordering of the external legs. This default
* implementation assumes normal ordered legs as 3 3bar ... 3 3bar 8 ... 8
* while removing all non-coloured particles.
*/
virtual vector<PDT::Colour> normalOrder(const vector<PDT::Colour>&) const;
/**
* Determine the mapping of process to colour indices and return the
* normal ordered vector of colour indices
*/
vector<PDT::Colour> normalOrderMap(const cPDVector& sub);
/**
* Get the normal ordered legs
*/
const vector<PDT::Colour>& normalOrderedLegs(const cPDVector& sub) const;
/**
* Convert the legs to a string.
*/
string file(const vector<PDT::Colour>&) const;
/**
* Calculate T_i^\dagger X T_j
*/
void chargeProduct(const compressed_matrix<double>& ti,
const vector<pair<size_t,size_t> >& tiNonZero,
const symmetric_matrix<double,upper>& X,
const compressed_matrix<double>& tj,
const vector<pair<size_t,size_t> >& tjNonZero,
symmetric_matrix<double,upper>& result) const;
/**
* Calculate T_i X T_j^\dagger
*/
void chargeProductAdd(const compressed_matrix<double>& ti,
const vector<pair<size_t,size_t> >& tiNonZero,
const matrix<Complex>& X,
const compressed_matrix<double>& tj,
const vector<pair<size_t,size_t> >& tjNonZero,
matrix<Complex>& result,
double factor = 1.) const;
public:
/**
* Find a coloured path from a to b within the given diagram.
*/
static list<pair<int,bool> > colouredPath(pair<int,bool> a, pair<int,bool> b,
Ptr<Tree2toNDiagram>::tcptr);
/**
* Get all colour flows for the given diagram.
*/
static list<list<list<pair<int,bool> > > > colourFlows(Ptr<Tree2toNDiagram>::tcptr);
/**
* Convert a flow to a string representation appropriate for
* ColourLines
*/
static string cfstring(const list<list<pair<int,bool> > >&);
protected:
/**
* Prepare the basis for the normal ordered legs and return the
* dimensionality of the basis.
*/
virtual size_t prepareBasis(const vector<PDT::Colour>&) = 0;
/**
* Return the scalar product of basis tensors labelled a and b in
* the basis used for the given normal ordered legs.
*/
virtual double scalarProduct(size_t a, size_t b,
const vector<PDT::Colour>& abBasis) const = 0;
/**
* Return the matrix element of a colour charge
* <c_{n+1,a}|T_i|c_{n,b}> between basis tensors a and b, with
* respect to aBasis and bBasis
*/
virtual double tMatrixElement(size_t i, size_t a, size_t b,
const vector<PDT::Colour>& aBasis,
const vector<PDT::Colour>& bBasis) const = 0;
/**
* Return true, if a large-N colour connection exists for the
* given external legs and basis tensor.
*/
virtual bool colourConnected(const cPDVector&,
const vector<PDT::Colour>&,
const pair<int,bool>&,
const pair<int,bool>&,
size_t) const;
/**
* Return true, if a large-N colour connection exists for the
* given external legs and basis tensor.
*/
virtual bool colourConnected(const vector<PDT::Colour>&,
int, int, size_t) const {
return false;
}
/**
* Match up colour flows for given diagram to basis tensors.
*/
vector<string> makeFlows(Ptr<Tree2toNDiagram>::tcptr, size_t) const;
/**
* Return the colour line map.
*/
map<Ptr<Tree2toNDiagram>::tcptr,vector<ColourLines*> >&
colourLineMap();
/**
* Update the colour line map for a given diagram.
*/
void updateColourLines(Ptr<Tree2toNDiagram>::tcptr);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
typedef map<vector<PDT::Colour>,symmetric_matrix<double,upper> >
ScalarProductMap;
typedef map<vector<PDT::Colour>,map<size_t,compressed_matrix<double> > > ChargeMap;
typedef map<vector<PDT::Colour>,map<size_t,vector<pair<size_t,size_t > > > > ChargeNonZeroMap;
typedef map<vector<PDT::Colour>,map<pair<size_t,size_t>,symmetric_matrix<double,upper> > > CorrelatorMap;
/**
* True, if this basis is running in large-N mode
*/
bool theLargeN;
/**
* Map external legs to normal ordered versions
*/
map<cPDVector,vector<PDT::Colour> > theNormalOrderedLegs;
/**
* Index mappings to normal order from given leg assignments,
* indexed by the original leg assignment.
*/
map<cPDVector,map<size_t,size_t> > theIndexMap;
/**
* The scalar product matrix S_n = <c_{n,a}|c_{n,b}> , indexed
* by normal ordered leg assignments.
*/
ScalarProductMap theScalarProducts;
/**
* The colour charge matrices <c_{n+1,a}|T_i|c_{n,b}> indexed by
* the `n' normal ordered legs and the index i.
*/
ChargeMap theCharges;
/**
* The nonzero elements of the charge matrices.
*/
ChargeNonZeroMap theChargeNonZeros;
/**
* The correlator matrices T_i\cdot T_j -> T_i^\dagger S_{n+1} T_j
* with T_i = <c_{n+1,a}|T_i|c_{n,b}> indexed by the `n' basis
* normal ordered legs and indices i,j
*/
CorrelatorMap theCorrelators;
/**
* Map diagrams to colour flows indexed by basis tensor.
*/
map<Ptr<Tree2toNDiagram>::tcptr,vector<string> > theFlowMap;
/**
* Map diagrams to colour line objects.
*/
map<Ptr<Tree2toNDiagram>::tcptr,vector<ColourLines*> > theColourLineMap;
/**
* Store ordering identifiers
*/
map<cPDVector,map<size_t,string> > theOrderingStringIdentifiers;
/**
* Store ordering identifiers
*/
map<cPDVector,map<size_t,set<vector<size_t> > > > theOrderingIdentifiers;
/**
* Write out yet unknown basis computations.
*/
void writeBasis(const string& prefix = "") const;
/**
* Read in the basis computation which are supposed to be known.
*/
void readBasis();
/**
* Read in the basis computation which are supposed to be known.
*/
bool readBasis(const vector<PDT::Colour>&);
/**
* Gather any implementation dependend details when reading a basis
*/
virtual void readBasisDetails(const vector<PDT::Colour>&) {}
/**
* Write out symmetric matrices.
*/
void write(const symmetric_matrix<double,upper>&, ostream&) const;
/**
* Read in symmetric matrices.
*/
void read(symmetric_matrix<double,upper>&, istream&);
/**
* Write out compressed matrices.
*/
void write(const compressed_matrix<double>&, ostream&,
const vector<pair<size_t,size_t> >&) const;
/**
* Read in compressed matrices.
*/
void read(compressed_matrix<double>&, istream&,
vector<pair<size_t,size_t> >&);
/**
* True, if an attempt to read in basis information has been
* completed.
*/
bool didRead;
/**
* True, if an attempt to write out basis information has been
* completed.
*/
mutable bool didWrite;
/**
* Temporary storage.
*/
matrix<double> tmp;
/**
* The search path
*/
string theSearchPath;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ColourBasis & operator=(const ColourBasis &);
+ ColourBasis & operator=(const ColourBasis &) = delete;
};
}
#endif /* HERWIG_ColourBasis_H */
diff --git a/MatrixElement/Matchbox/Utility/MatchboxFactoryMatcher.h b/MatrixElement/Matchbox/Utility/MatchboxFactoryMatcher.h
--- a/MatrixElement/Matchbox/Utility/MatchboxFactoryMatcher.h
+++ b/MatrixElement/Matchbox/Utility/MatchboxFactoryMatcher.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
//
// MatchboxFactoryMatcher.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxFactoryMatcher_H
#define Herwig_MatchboxFactoryMatcher_H
//
// This is the declaration of the MatchboxFactoryMatcher class.
//
#include "ThePEG/PDT/MatcherBase.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxFactoryMatcher matches particles according to
* MatchboxFatory particle groups
*
* @see \ref MatchboxFactoryMatcherInterfaces "The interfaces"
* defined for MatchboxFactoryMatcher.
*/
class MatchboxFactoryMatcher: public ThePEG::MatcherBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxFactoryMatcher();
/**
* The destructor.
*/
virtual ~MatchboxFactoryMatcher();
//@}
public:
/**
* Check if a particle type meets the criteria.
*/
virtual bool check(const ParticleData &) const;
/**
* Specialized clone method for MatcherBase used by the
* Repository. A sub class must make sure that also the MatcherBase
* object corresponding to the complex conjugate of this is cloned.
*/
virtual PMPtr pmclone() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The particle group to be matched
*/
string theGroup;
/**
* The set of particle ids to be matched
*/
set<long> theIds;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxFactoryMatcher & operator=(const MatchboxFactoryMatcher &);
+ MatchboxFactoryMatcher & operator=(const MatchboxFactoryMatcher &) = delete;
};
}
#endif /* Herwig_MatchboxFactoryMatcher_H */
diff --git a/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h b/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h
--- a/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h
+++ b/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h
@@ -1,169 +1,169 @@
// -*- C++ -*-
//
// MatchboxScaleChoice.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxScaleChoice_H
#define Herwig_MatchboxScaleChoice_H
//
// This is the declaration of the MatchboxScaleChoice class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/Handlers/LastXCombInfo.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief MatchboxScaleChoice is the base class for scale choices
* within Matchbox.
*
*/
class MatchboxScaleChoice: public HandlerBase, public LastXCombInfo<StandardXComb> {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxScaleChoice();
/**
* The destructor.
*/
virtual ~MatchboxScaleChoice();
//@}
public:
/**
* Clone this scale choice.
*/
Ptr<MatchboxScaleChoice>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<MatchboxScaleChoice>::ptr>(clone());
}
/**
* Set the XComb object.
*/
virtual void setXComb(tStdXCombPtr xc) {
theLastXComb = xc;
}
/**
* Return the renormalization scale. This default version returns
* shat.
*/
virtual Energy2 renormalizationScale() const {
return theFixedScale == ZERO ? lastSHat() : sqr(theFixedScale);
}
/**
* Return the factorization scale. This default version returns
* shat.
*/
virtual Energy2 factorizationScale() const {
return theFixedScale == ZERO ? lastSHat() : sqr(theFixedScale);
}
/**
* Return the QED renormalization scale. This default version returns
* the Z mass squared.
*/
virtual Energy2 renormalizationScaleQED() const {
if ( theFixedQEDScale != ZERO )
return sqr(theFixedQEDScale);
Energy mZ = getParticleData(ParticleID::Z0)->hardProcessMass();
return mZ*mZ;
}
/**
* Return the shower hard scale. This default implementation returns the
* factorization scale.
*/
virtual Energy2 showerScale() const {
return factorizationScale();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* A fixed scale choice. If zero, shat will be used.
*/
Energy theFixedScale;
/**
* A fixed QED scale choice. If zero, shat will be used.
*/
Energy theFixedQEDScale;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxScaleChoice & operator=(const MatchboxScaleChoice &);
+ MatchboxScaleChoice & operator=(const MatchboxScaleChoice &) = delete;
};
}
#endif /* Herwig_MatchboxScaleChoice_H */
diff --git a/MatrixElement/Matchbox/Utility/MatchboxXComb.h b/MatrixElement/Matchbox/Utility/MatchboxXComb.h
--- a/MatrixElement/Matchbox/Utility/MatchboxXComb.h
+++ b/MatrixElement/Matchbox/Utility/MatchboxXComb.h
@@ -1,108 +1,108 @@
// -*- C++ -*-
//
// MatchboxXComb.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxXComb_H
#define Herwig_MatchboxXComb_H
//
// This is the declaration of the MatchboxXComb class.
//
#include "ThePEG/Handlers/StandardXComb.h"
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxXCombData.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Matchbox extensions to StandardXComb
*/
class MatchboxXComb: public StandardXComb, public MatchboxXCombData {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Standard constructor.
*/
MatchboxXComb(Energy newMaxEnergy, const cPDPair & inc,
tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
const PBPair & newPartonBins, tCutsPtr newCuts, tMEPtr newME,
const DiagramVector & newDiagrams, bool mir,
tStdXCombPtr newHead = tStdXCombPtr());
/**
* Constructor given a head xcomb.
*/
MatchboxXComb(tStdXCombPtr newHead,
const PBPair & newPartonBins, tMEPtr newME,
const DiagramVector & newDiagrams);
/**
* Default constructor.
*/
MatchboxXComb();
/**
* Destructor.
*/
virtual ~MatchboxXComb();
//@}
public:
/**
* Reset all saved data about last generated phasespace point;
*/
virtual void clean();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxXComb & operator=(const MatchboxXComb &);
+ MatchboxXComb & operator=(const MatchboxXComb &) = delete;
};
}
#endif /* Herwig_MatchboxXComb_H */
diff --git a/MatrixElement/Matchbox/Utility/MatchboxXCombData.h b/MatrixElement/Matchbox/Utility/MatchboxXCombData.h
--- a/MatrixElement/Matchbox/Utility/MatchboxXCombData.h
+++ b/MatrixElement/Matchbox/Utility/MatchboxXCombData.h
@@ -1,1107 +1,1107 @@
// -*- C++ -*-
//
// MatchboxXCombData.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxXCombData_H
#define Herwig_MatchboxXCombData_H
//
// This is the declaration of the MatchboxXCombData class.
//
// work around a Boost 1.64 bug where ublas headers would fail otherwise
#include <boost/version.hpp>
#if (BOOST_VERSION / 100 >= 1064)
#include <boost/serialization/array_wrapper.hpp>
#endif
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_sparse.hpp>
#include <boost/numeric/ublas/symmetric.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include "ThePEG/MatrixElement/MEBase.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.fh"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.fh"
#include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.fh"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/Persistency/PersistentOStream.fh"
#include "ThePEG/Persistency/PersistentIStream.fh"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Define complex vector from boost::uBLAS
*/
typedef boost::numeric::ublas::vector<Complex> CVector;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Define how amplitudes are stored
*/
typedef map<vector<int>,CVector> AmplitudeMap;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Define amplitude iterators
*/
typedef map<vector<int>,CVector>::iterator AmplitudeIterator;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Define amplitude const iterators
*/
typedef map<vector<int>,CVector>::const_iterator AmplitudeConstIterator;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Matchbox extensions to StandardXComb
*/
class MatchboxXCombData {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Standard constructor.
*/
explicit MatchboxXCombData(tMEPtr newME);
/**
* Default constructor.
*/
MatchboxXCombData();
/**
* Destructor.
*/
virtual ~MatchboxXCombData();
//@}
public:
/**
* Reset all cache flags
*/
void flushCaches();
public:
/**
* Get the factory
*/
Ptr<MatchboxFactory>::tcptr factory() const;
/**
* Get the matrix element; may return null
*/
Ptr<MatchboxMEBase>::tptr matchboxME() const;
/**
* Get the dipole; may return null
*/
Ptr<SubtractionDipole>::tptr subtractionDipole() const;
/**
* The crossing information as filled by the last call to
* fillCrossingMap()
*/
const vector<int>& crossingMap() const { return theCrossingMap; }
/**
* The crossing information as filled by the last call to
* fillCrossingMap()
*/
vector<int>& crossingMap() { return theCrossingMap; }
/**
* The colour crossing information as filled by the last call to
* fillCrossingMap()
*/
const map<size_t,size_t>& amplitudeToColourMap() const { return theAmplitudeToColourMap; }
/**
* The colour crossing information as filled by the last call to
* fillCrossingMap()
*/
map<size_t,size_t>& amplitudeToColourMap() { return theAmplitudeToColourMap; }
/**
* The colour crossing information as filled by the last call to
* fillCrossingMap()
*/
const map<size_t,size_t>& colourToAmplitudeMap() const { return theColourToAmplitudeMap; }
/**
* The colour crossing information as filled by the last call to
* fillCrossingMap()
*/
map<size_t,size_t>& colourToAmplitudeMap() { return theColourToAmplitudeMap; }
/**
* The crossing sign as filled by the last call to
* fillCrossingMap()
*/
double crossingSign() const { return theCrossingSign; }
/**
* The crossing sign as filled by the last call to
* fillCrossingMap()
*/
void crossingSign(double c) { theCrossingSign = c; }
/**
* The last renormalization scale
*/
Energy2 lastRenormalizationScale() const { return theLastRenormalizationScale; }
/**
* The last renormalization scale
*/
void lastRenormalizationScale(Energy2 lrs) { theLastRenormalizationScale = lrs; }
/**
* The amplitude parton data.
*/
const cPDVector& amplitudePartonData() const { return theAmplitudePartonData; }
/**
* The amplitude parton data.
*/
cPDVector& amplitudePartonData() { return theAmplitudePartonData; }
/**
* The crossed momenta
*/
const vector<Lorentz5Momentum>& amplitudeMomenta() const { return theAmplitudeMomenta; }
/**
* The crossed momenta
*/
vector<Lorentz5Momentum>& amplitudeMomenta() { return theAmplitudeMomenta; }
/**
* True, if the the tree level amplitudes need to be calculated
*/
bool calculateTreeAmplitudes() const { return theCalculateTreeAmplitudes; }
/**
* The amplitude values which have been contributing
* to the last call of prepareAmplitudes.
*/
const map<vector<int>,CVector>& lastAmplitudes() const { return theLastAmplitudes; }
/**
* True, if the the tree level amplitudes need to be calculated
*/
void haveTreeAmplitudes(bool f = true) { theCalculateTreeAmplitudes = !f; }
/**
* The amplitude values which have been contributing
* to the last call of prepareAmplitudes.
*/
map<vector<int>,CVector>& lastAmplitudes() { return theLastAmplitudes; }
/**
* The leading N amplitude values which have been
* contributing to the last call of prepareAmplitudes.
*/
const map<vector<int>,CVector>& lastLargeNAmplitudes() const { return theLastLargeNAmplitudes; }
/**
* The leading N amplitude values which have been
* contributing to the last call of prepareAmplitudes.
*/
map<vector<int>,CVector>& lastLargeNAmplitudes() { return theLastLargeNAmplitudes; }
/**
* True, if the the one-loop amplitudes need to be calculated
*/
bool calculateOneLoopAmplitudes() const { return theCalculateOneLoopAmplitudes; }
/**
* The one-loop amplitude values which have been contributing
* to the last call of prepareAmplitudes.
*/
const map<vector<int>,CVector>& lastOneLoopAmplitudes() const { return theLastOneLoopAmplitudes; }
/**
* True, if the the one-loop amplitudes need to be calculated
*/
void haveOneLoopAmplitudes(bool f = true) { theCalculateOneLoopAmplitudes = !f; }
/**
* The one-loop amplitude values which have been contributing
* to the last call of prepareAmplitudes.
*/
map<vector<int>,CVector>& lastOneLoopAmplitudes() { return theLastOneLoopAmplitudes; }
/**
* True, if the tree-level matrix element squared needs to be
* calculated.
*/
bool calculateTreeME2() const { return theCalculateTreeME2; }
/**
* The last tree-level matrix element squared
*/
double lastTreeME2() const { return theLastTreeME2; }
/**
* The last tree-level matrix element squared
*/
void lastTreeME2(double v) {
theLastTreeME2 = v; theCalculateTreeME2 = false;
}
/**
* True, if the tree-level matrix element squared needs to be
* calculated.
*/
bool calculateLargeNME2() const { return theCalculateLargeNME2; }
/**
* The last tree-level matrix element squared
*/
double lastLargeNME2() const { return theLastLargeNME2; }
/**
* The last tree-level matrix element squared
*/
void lastLargeNME2(double v) {
theLastLargeNME2 = v; theCalculateLargeNME2 = false;
}
/**
* True, if the one-loop/tree-level interference.
* be calculated.
*/
bool calculateOneLoopInterference() const { return theCalculateOneLoopInterference; }
/**
* The last one-loop/tree-level interference.
*/
double lastOneLoopInterference() const { return theLastOneLoopInterference; }
/**
* The last one-loop/tree-level interference.
*/
void lastOneLoopInterference(double v) {
theLastOneLoopInterference = v; theCalculateOneLoopInterference = false;
}
/**
* True, if the one-loop/tree-level interference.
* be calculated.
*/
bool calculateOneLoopPoles() const { return theCalculateOneLoopPoles; }
/**
* The last one-loop/tree-level interference.
*/
pair<double,double> lastOneLoopPoles() const { return theLastOneLoopPoles; }
/**
* The last one-loop/tree-level interference.
*/
void lastOneLoopPoles(pair<double,double> v) {
theLastOneLoopPoles = v; theCalculateOneLoopPoles = false;
}
/**
* True, if the indexed colour correlated matrix element needs to be
* calculated.
*/
bool calculateColourCorrelator(pair<int,int> ij) const {
if ( ij.first > ij.second )
swap(ij.first,ij.second);
map<pair<int,int>,bool>::const_iterator f =
theCalculateColourCorrelators.find(ij);
if ( f == theCalculateColourCorrelators.end() )
return true;
return f->second;
}
/**
* The colour correlated matrix element.
*/
double lastColourCorrelator(pair<int,int> ij) const {
if ( ij.first > ij.second )
swap(ij.first,ij.second);
map<pair<int,int>,double>::const_iterator v =
theColourCorrelators.find(ij);
if ( v == theColourCorrelators.end() )
return 0.;
return v->second;
}
/**
* The colour correlated matrix element.
*/
void lastColourCorrelator(pair<int,int> ij, double v) {
if ( ij.first > ij.second )
swap(ij.first,ij.second);
theColourCorrelators[ij] = v;
theCalculateColourCorrelators[ij] = false;
}
/**
* True, if the indexed large-N colour correlated matrix element needs to be
* calculated.
*/
bool calculateLargeNColourCorrelator(pair<int,int> ij) const {
if ( ij.first > ij.second )
swap(ij.first,ij.second);
map<pair<int,int>,bool>::const_iterator f =
theCalculateLargeNColourCorrelators.find(ij);
if ( f == theCalculateLargeNColourCorrelators.end() )
return true;
return f->second;
}
/**
* The large-N colour correlated matrix element.
*/
double lastLargeNColourCorrelator(pair<int,int> ij) const {
if ( ij.first > ij.second )
swap(ij.first,ij.second);
map<pair<int,int>,double>::const_iterator v =
theLargeNColourCorrelators.find(ij);
if ( v == theLargeNColourCorrelators.end() )
return 0.;
return v->second;
}
/**
* The large-N colour correlated matrix element.
*/
void lastLargeNColourCorrelator(pair<int,int> ij, double v) {
if ( ij.first > ij.second )
swap(ij.first,ij.second);
theLargeNColourCorrelators[ij] = v;
theCalculateLargeNColourCorrelators[ij] = false;
}
/**
* True, if the indexed colour/spin correlated matrix element needs to be
* calculated.
*/
bool calculateColourSpinCorrelator(const pair<int,int>& ij) const {
map<pair<int,int>,bool>::const_iterator f =
theCalculateColourSpinCorrelators.find(ij);
if ( f == theCalculateColourSpinCorrelators.end() )
return true;
return f->second;
}
/**
* The colour/spin correlated matrix element.
*/
Complex lastColourSpinCorrelator(const pair<int,int>& ij) const {
map<pair<int,int>,Complex>::const_iterator v =
theColourSpinCorrelators.find(ij);
if ( v == theColourSpinCorrelators.end() )
return 0.;
return v->second;
}
/**
* The colour/spin correlated matrix element.
*/
void lastColourSpinCorrelator(const pair<int,int>& ij, Complex v) {
theColourSpinCorrelators[ij] = v;
theCalculateColourSpinCorrelators[ij] = false;
}
/**
* True, if the indexed spin correlated matrix element needs to be
* calculated.
*/
bool calculateSpinCorrelator(const pair<int,int>& ij) const {
map<pair<int,int>,bool>::const_iterator f =
theCalculateSpinCorrelators.find(ij);
if ( f == theCalculateSpinCorrelators.end() )
return true;
return f->second;
}
/**
* The spin correlated matrix element.
*/
Complex lastSpinCorrelator(const pair<int,int>& ij) const {
map<pair<int,int>,Complex>::const_iterator v =
theSpinCorrelators.find(ij);
if ( v == theSpinCorrelators.end() )
return 0.;
return v->second;
}
/**
* The spin correlated matrix element.
*/
void lastSpinCorrelator(const pair<int,int>& ij, Complex v) {
theSpinCorrelators[ij] = v;
theCalculateSpinCorrelators[ij] = false;
}
/**
* Return the number of light flavours to be considered for this process.
*/
unsigned int nLight() const { return theNLight; }
/**
* Set the number of light flavours to be considered for this process.
*/
void nLight(unsigned int n) { theNLight = n; }
/**
* Return the vector that contains the PDG ids of
* the light flavours, which are contained in the
* jet particle group.
*/
vector<long> nLightJetVec() const { return theNLightJetVec; }
/**
* Set the elements of the vector that contains the PDG
* ids of the light flavours, which are contained in the
* jet particle group.
*/
void nLightJetVec(long n) { theNLightJetVec.push_back(n); }
/**
* Return the vector that contains the PDG ids of
* the heavy flavours, which are contained in the
* jet particle group.
*/
vector<long> nHeavyJetVec() const { return theNHeavyJetVec; }
/**
* Set the elements of the vector that contains the PDG
* ids of the heavy flavours, which are contained in the
* jet particle group.
*/
void nHeavyJetVec(long n) { theNHeavyJetVec.push_back(n); }
/**
* Return the vector that contains the PDG ids of
* the light flavours, which are contained in the
* proton particle group.
*/
vector<long> nLightProtonVec() const { return theNLightProtonVec; }
/**
* Set the elements of the vector that contains the PDG
* ids of the light flavours, which are contained in the
* proton particle group.
*/
void nLightProtonVec(long n) { theNLightProtonVec.push_back(n); }
/**
* Get the dimensionality of the colour basis for this process.
*/
size_t colourBasisDim() const { return theColourBasisDim; }
/**
* Set the dimensionality of the colour basis for this process.
*/
void colourBasisDim(size_t d) { theColourBasisDim = d; }
/**
* Return the number of degrees of freedom required by the phase space generator
*/
int nDimPhasespace() const { return theNDimPhasespace; }
/**
* Set the number of degrees of freedom required by the phase space generator
*/
void nDimPhasespace(int d) { theNDimPhasespace = d; }
/**
* Return the number of degrees of freedom required by the amplitude
*/
int nDimAmplitude() const { return theNDimAmplitude; }
/**
* Set the number of degrees of freedom required by the amplitude
*/
void nDimAmplitude(int d) { theNDimAmplitude = d; }
/**
* Return the number of degrees of freedom required by the insertion operators
*/
int nDimInsertions() const { return theNDimInsertions; }
/**
* Set the number of degrees of freedom required by the insertion operators
*/
void nDimInsertions(int d) { theNDimInsertions = d; }
/**
* Get the additional random numbers required by the amplitude
*/
const vector<double>& amplitudeRandomNumbers() const { return theAmplitudeRandomNumbers; }
/**
* Access the additional random numbers required by the amplitude
*/
vector<double>& amplitudeRandomNumbers() { return theAmplitudeRandomNumbers; }
/**
* Get the additional random numbers required by the insertion operator
*/
const vector<double>& insertionRandomNumbers() const { return theInsertionRandomNumbers; }
/**
* Access the additional random numbers required by the insertion operator
*/
vector<double>& insertionRandomNumbers() { return theInsertionRandomNumbers; }
/**
* Return the diagram weights indexed by diagram id.
*/
const map<int,double>& diagramWeights() const { return theDiagramWeights; }
/**
* Access the diagram weights indexed by diagram id.
*/
map<int,double>& diagramWeights() { return theDiagramWeights; }
/**
* Return the singular limits
*/
const set<pair<size_t,size_t> >& singularLimits() const { return theSingularLimits; }
/**
* Access the singular limits
*/
set<pair<size_t,size_t> >& singularLimits() { return theSingularLimits; }
/**
* Return the last matched singular limit.
*/
const set<pair<size_t,size_t> >::const_iterator& lastSingularLimit() const { return theLastSingularLimit; }
/**
* Access the last matched singular limit.
*/
set<pair<size_t,size_t> >::const_iterator& lastSingularLimit() { return theLastSingularLimit; }
/**
* Set the Herwig StandardModel object
*/
void hwStandardModel(Ptr<StandardModel>::tcptr sm) { theStandardModel = sm; }
/**
* Get the Herwig StandardModel object
*/
Ptr<StandardModel>::tcptr hwStandardModel() const { return theStandardModel; }
/**
* Return the symmetry factor
*/
double symmetryFactor() const { return theSymmetryFactor; }
/**
* Set the symmetry factor
*/
void symmetryFactor(double f) { theSymmetryFactor = f; }
/**
* Return the OLP process ids
*/
const vector<int>& olpId() const { return theOLPId; }
/**
* Set the OLP process ids
*/
void olpId(int pType, int id) {
if ( theOLPId.empty() )
theOLPId.resize(4,0);
theOLPId[pType] = id;
}
/**
* Set the OLP process ids
*/
void olpId(const vector<int>& id) {
theOLPId = id;
}
/**
* Return the olp momentum vector
*/
double* olpMomenta() { return theOLPMomenta; }
/**
* Fill the olp momentum vector
*/
void fillOLPMomenta(const vector<Lorentz5Momentum>& mm,
const cPDVector& mePartonData = cPDVector(),
const map<long,Energy>& reshuffleMap = map<long,Energy>());
/**
* Helper struct to define the reshuffling equation
*/
struct ReshuffleEquation {
ReshuffleEquation(Energy xq,
cPDVector::const_iterator xdBegin,
cPDVector::const_iterator xdEnd,
vector<Lorentz5Momentum>::const_iterator xmBegin,
const map<long,Energy>* xreshuffleMap)
: q(xq), dBegin(xdBegin), dEnd(xdEnd), mBegin(xmBegin),
reshuffleMap(xreshuffleMap) {}
typedef double ArgType;
typedef double ValType;
static double aUnit() { return 1.; }
static double vUnit() { return 1.; }
double operator() (double xi) const;
Energy q;
cPDVector::const_iterator dBegin;
cPDVector::const_iterator dEnd;
vector<Lorentz5Momentum>::const_iterator mBegin;
const map<long,Energy>* reshuffleMap;
};
/**
* Perform a reshuffling to the mass shells contained in the map
*/
void reshuffle(vector<Lorentz5Momentum>& momenta,
const cPDVector& mePartonData,
const map<long,Energy>& reshuffleMap) const;
/**
* Return a generic process id to communicate with external codes
*/
int externalId() const { return theExternalId; }
/**
* Set a generic process id to communicate with external codes
*/
void externalId(int id) { theExternalId = id; }
/**
* True if the process has been initialized
*/
bool initialized() const { return theInitialized; }
/**
* True if the process has been initialized
*/
void isInitialized(bool is = true) { theInitialized = is; }
/**
* Return the external momentum vector
*/
const vector<double*>& externalMomenta() const { return theExternalMomenta; }
/**
* Fill the external momentum vector
*/
void fillExternalMomenta(const vector<Lorentz5Momentum>&);
/**
* Caching for the external madgraph colour structures
*/
const map<vector<int>,vector < complex<double> > >& heljamp() const { return theHelJamp; }
/**
* Caching for the external madgraph colour structures (large N)
*/
const map<vector<int>,vector < complex<double> > >& helLNjamp() const { return theLNHelJamp; }
/**
* pushback the madgraph colour structures
*/
void pushheljamp(const vector<int>& hel, const complex<double>& jamp) { theHelJamp[hel].push_back(jamp); }
/**
* clear the madgraph colour structures
*/
void clearheljamp() { theHelJamp.clear(); }
/**
* pushback the madgraph colour structures (large N)
*/
void pushhelLNjamp(const vector<int>& hel, const complex<double>& jamp) { theLNHelJamp[hel].push_back(jamp); }
/**
* clear the madgraph colour structures (large N)
*/
void clearhelLNjamp() { theLNHelJamp.clear(); }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
/**
* Put a CVector to the persistent ostream
*/
static void putCVector(PersistentOStream&, const CVector&);
/**
* Get a CVector from the persistent istream
*/
static void getCVector(PersistentIStream&, CVector&);
/**
* Put an amplitude map to the persistent ostream
*/
static void putAmplitudeMap(PersistentOStream&, const map<vector<int>,CVector>&);
/**
* Get an amplitude map from the persistent istream
*/
static void getAmplitudeMap(PersistentIStream&, map<vector<int>,CVector>&);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxXCombData & operator=(const MatchboxXCombData &);
+ MatchboxXCombData & operator=(const MatchboxXCombData &) = delete;
private:
/**
* The matrix element
*/
Ptr<MatchboxMEBase>::tptr theMatchboxME;
/**
* The dipole
*/
Ptr<SubtractionDipole>::tptr theSubtractionDipole;
/**
* The crossing information as filled by the last call to
* fillCrossingMap()
*/
vector<int> theCrossingMap;
/**
* The colour crossing information as filled by the last call to
* fillCrossingMap()
*/
map<size_t,size_t> theAmplitudeToColourMap;
/**
* The colour crossing information as filled by the last call to
* fillCrossingMap()
*/
map<size_t,size_t> theColourToAmplitudeMap;
/**
* The crossing sign as filled by the last call to
* fillCrossingMap()
*/
double theCrossingSign;
/**
* The last renormalization scale
*/
Energy2 theLastRenormalizationScale;
/**
* The amplitude parton data.
*/
cPDVector theAmplitudePartonData;
/**
* The ccrossed momenta
*/
vector<Lorentz5Momentum> theAmplitudeMomenta;
/**
* True, if the the tree level amplitudes need to be calculated
*/
bool theCalculateTreeAmplitudes;
/**
* The amplitude values which have been contributing
* to the last call of prepareAmplitudes.
*/
map<vector<int>,CVector> theLastAmplitudes;
/**
* The leading N amplitude values which have been
* contributing to the last call of prepareAmplitudes.
*/
map<vector<int>,CVector> theLastLargeNAmplitudes;
/**
* True, if the the one-loop amplitudes need to be calculated
*/
bool theCalculateOneLoopAmplitudes;
/**
* The one-loop amplitude values which have been contributing
* to the last call of prepareAmplitudes.
*/
map<vector<int>,CVector> theLastOneLoopAmplitudes;
/**
* True, if the tree-level matrix element squared needs to be
* calculated.
*/
bool theCalculateTreeME2;
/**
* The last tree-level matrix element squared
*/
double theLastTreeME2;
/**
* True, if the tree-level matrix element squared needs to be
* calculated.
*/
bool theCalculateLargeNME2;
/**
* The last tree-level matrix element squared
*/
double theLastLargeNME2;
/**
* True, if the one-loop/tree-level interference.
* be calculated.
*/
bool theCalculateOneLoopInterference;
/**
* The last one-loop/tree-level interference.
*/
double theLastOneLoopInterference;
/**
* True, if the one-loop/tree-level interference.
* be calculated.
*/
bool theCalculateOneLoopPoles;
/**
* The last one-loop/tree-level interference.
*/
pair<double,double> theLastOneLoopPoles;
/**
* True, if the indexed colour correlated matrix element needs to be
* calculated.
*/
map<pair<int,int>,bool> theCalculateColourCorrelators;
/**
* The colour correlated matrix element.
*/
map<pair<int,int>,double> theColourCorrelators;
/**
* True, if the indexed large-N colour correlated matrix element needs to be
* calculated.
*/
map<pair<int,int>,bool> theCalculateLargeNColourCorrelators;
/**
* The large-N colour correlated matrix element.
*/
map<pair<int,int>,double> theLargeNColourCorrelators;
/**
* True, if the indexed colour/spin correlated matrix element needs to be
* calculated.
*/
map<pair<int,int>,bool> theCalculateColourSpinCorrelators;
/**
* The colour/spin correlated matrix element.
*/
map<pair<int,int>,Complex> theColourSpinCorrelators;
/**
* True, if the indexed spin correlated matrix element needs to be
* calculated.
*/
map<pair<int,int>,bool> theCalculateSpinCorrelators;
/**
* The spin correlated matrix element.
*/
map<pair<int,int>,Complex> theSpinCorrelators;
/**
* The number of light flavours to be considered for this process.
*/
static unsigned int theNLight;
/**
* Vector with the PDG ids of the light quark flavours,
* which are contained in the jet particle group.
*/
static vector<long> theNLightJetVec;
/**
* Vector with the PDG ids of the heavy quark flavours,
* which are contained in the jet particle group.
*/
static vector<long> theNHeavyJetVec;
/**
* Vector with the PDG ids of the light quark flavours,
* which are contained in the proton particle group.
*/
static vector<long> theNLightProtonVec;
/**
* The dimensionality of the colour basis for this process.
*/
size_t theColourBasisDim;
/**
* The number of degrees of freedom required by the phase space generator
*/
int theNDimPhasespace;
/**
* The number of degrees of freedom required by the amplitude
*/
int theNDimAmplitude;
/**
* The number of degrees of freedom required by the insertion operators
*/
int theNDimInsertions;
/**
* Additional random numbers required by the amplitude
*/
vector<double> theAmplitudeRandomNumbers;
/**
* Additional random numbers required by the insertion operator
*/
vector<double> theInsertionRandomNumbers;
/**
* The diagram weights indexed by diagram id.
*/
map<int,double> theDiagramWeights;
/**
* If not empty, the entries here serve to limit phasespace
* generation to the corresponding collinear limits, or soft limits
* if both pair entries are equal.
*/
set<pair<size_t,size_t> > theSingularLimits;
/**
* The last matched singular limit.
*/
set<pair<size_t,size_t> >::const_iterator theLastSingularLimit;
/**
* The Herwig StandardModel object
*/
Ptr<StandardModel>::tcptr theStandardModel;
/**
* The symmetry factor
*/
double theSymmetryFactor;
/**
* The OLP process id
*/
vector<int> theOLPId;
/**
* Return the olp momentum vector
*/
double* theOLPMomenta;
/**
* True, if olp momenta have been filled
*/
bool filledOLPMomenta;
/**
* A generic process id to communicate with external codes
*/
int theExternalId;
/**
* True if the process has been initialized
*/
bool theInitialized;
/**
* The external momenta
*/
vector<double*> theExternalMomenta;
/**
* True, if external momenta have been filled
*/
bool filledExternalMomenta;
/**
* caching of different colour structures (MadGraph-Interface)
*/
map<vector<int>,vector < complex<double> > > theHelJamp;
/**
* caching of different colour structures (MadGraph-Interface)
*/
map<vector<int>,vector < complex<double> > > theLNHelJamp;
};
}
#endif /* Herwig_MatchboxXCombData_H */
diff --git a/MatrixElement/Matchbox/Utility/MatchboxXCombGroup.h b/MatrixElement/Matchbox/Utility/MatchboxXCombGroup.h
--- a/MatrixElement/Matchbox/Utility/MatchboxXCombGroup.h
+++ b/MatrixElement/Matchbox/Utility/MatchboxXCombGroup.h
@@ -1,102 +1,102 @@
// -*- C++ -*-
//
// MatchboxXCombGroup.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxXCombGroup_H
#define Herwig_MatchboxXCombGroup_H
//
// This is the declaration of the MatchboxXCombGroup class.
//
#include "ThePEG/Handlers/StdXCombGroup.h"
#include "ThePEG/MatrixElement/MEGroup.h"
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxXCombData.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Matchbox extensions to StandardXComb
*/
class MatchboxXCombGroup: public StdXCombGroup, public MatchboxXCombData {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Standard constructor.
*/
MatchboxXCombGroup(Energy newMaxEnergy, const cPDPair & inc,
tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
const PBPair & newPartonBins, tCutsPtr newCuts, tMEGroupPtr newME,
const DiagramVector & newDiagrams, bool mir,
tStdXCombPtr newHead = tStdXCombPtr());
/**
* Default constructor.
*/
MatchboxXCombGroup();
/**
* Destructor.
*/
virtual ~MatchboxXCombGroup();
//@}
public:
/**
* Reset all saved data about last generated phasespace point;
*/
virtual void clean();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchboxXCombGroup & operator=(const MatchboxXCombGroup &);
+ MatchboxXCombGroup & operator=(const MatchboxXCombGroup &) = delete;
};
}
#endif /* Herwig_MatchboxXCombGroup_H */
diff --git a/MatrixElement/Matchbox/Utility/ProcessData.h b/MatrixElement/Matchbox/Utility/ProcessData.h
--- a/MatrixElement/Matchbox/Utility/ProcessData.h
+++ b/MatrixElement/Matchbox/Utility/ProcessData.h
@@ -1,169 +1,169 @@
// -*- C++ -*-
//
// ProcessData.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_ProcessData_H
#define Herwig_ProcessData_H
//
// This is the declaration of the ProcessData class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/MatrixElement/Matchbox/Utility/ProcessData.fh"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Provide storage for process data
*
* @see \ref ProcessDataInterfaces "The interfaces"
* defined for ProcessData.
*/
class ProcessData: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ProcessData();
/**
* The destructor.
*/
virtual ~ProcessData();
//@}
public:
/**
* Access diagrams contributing to a given subprocess
*/
map<PDVector,vector<Ptr<Tree2toNDiagram>::ptr> >& diagramMap() { return theDiagramMap; }
/**
* Return diagrams contributing to a given subprocess
*/
const map<PDVector,vector<Ptr<Tree2toNDiagram>::ptr> >& diagramMap() const { return theDiagramMap; }
/**
* Access colour flows contributing to a given diagram
*/
map<Ptr<Tree2toNDiagram>::tcptr,vector<ColourLines*> >& colourFlowMap() { return theColourFlowMap; }
/**
* Return colour flows contributing to a given diagram
*/
const map<Ptr<Tree2toNDiagram>::tcptr,vector<ColourLines*> >& colourFlowMap() const { return theColourFlowMap; }
/**
* Access the mass generators to be used for the given particles
*/
map<cPDPtr,tGenericMassGeneratorPtr>& massGenerators() { return theMassGenerators; }
/**
* Return the mass generators to be used for the given particles
*/
const map<cPDPtr,tGenericMassGeneratorPtr>& massGenerators() const { return theMassGenerators; }
/**
* Return the mass generator (or NULL)
*/
tGenericMassGeneratorPtr massGenerator(cPDPtr);
/**
* Fill the mass generators for the given process
*/
void fillMassGenerators(const PDVector&);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The diagrams contributing to a subprocess
*/
map<PDVector,vector<Ptr<Tree2toNDiagram>::ptr> > theDiagramMap;
/**
* Colour flows contributing to a given diagram
*/
map<Ptr<Tree2toNDiagram>::tcptr,vector<ColourLines*> > theColourFlowMap;
/**
* The mass generators to be used for the given particles
*/
map<cPDPtr,tGenericMassGeneratorPtr> theMassGenerators;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ProcessData & operator=(const ProcessData &);
+ ProcessData & operator=(const ProcessData &) = delete;
};
}
#endif /* Herwig_ProcessData_H */
diff --git a/MatrixElement/Matchbox/Utility/SimpleColourBasis.h b/MatrixElement/Matchbox/Utility/SimpleColourBasis.h
--- a/MatrixElement/Matchbox/Utility/SimpleColourBasis.h
+++ b/MatrixElement/Matchbox/Utility/SimpleColourBasis.h
@@ -1,189 +1,189 @@
// -*- C++ -*-
//
// SimpleColourBasis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_SimpleColourBasis_H
#define Herwig_SimpleColourBasis_H
//
// This is the declaration of the SimpleColourBasis class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief SimpleColourBasis implements the colour algebra needed for
* electroweak boson and electroweak boson + jet production at NLO. It
* mainly serves as an example for the general ColourBasis interface.
*
*/
class SimpleColourBasis: public ColourBasis {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
SimpleColourBasis();
/**
* The destructor.
*/
virtual ~SimpleColourBasis();
//@}
public:
/**
* Prepare the basis for the normal ordered legs and return the
* dimensionality of the basis.
*/
virtual size_t prepareBasis(const vector<PDT::Colour>&);
/**
* Return the scalar product of basis tensors labelled a and b in
* the basis used for the given normal ordered legs.
*/
virtual double scalarProduct(size_t a, size_t b,
const vector<PDT::Colour>& abBasis) const;
/**
* Return the matrix element of a colour charge
* <c_{n+1,a}|T_i|c_{n,b}> between basis tensors a and b, with
* respect to aBasis and bBasis
*/
virtual double tMatrixElement(size_t i, size_t a, size_t b,
const vector<PDT::Colour>& aBasis,
const vector<PDT::Colour>& bBasis) const;
/**
* Return true, if a large-N colour connection exists for the
* given external legs and basis tensor.
*/
virtual bool colourConnected(const cPDVector&,
const vector<PDT::Colour>&,
const pair<int,bool>&,
const pair<int,bool>&,
size_t) const;
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const { return true; }
/**
* Create ids for bases
*/
void makeIds() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* id for 88
*/
mutable vector<PDT::Colour> id88;
/**
* id for 33bar
*/
mutable vector<PDT::Colour> id33bar;
/**
* id for 888
*/
mutable vector<PDT::Colour> id888;
/**
* id for 33bar8
*/
mutable vector<PDT::Colour> id33bar8;
/**
* id for 8888
*/
mutable vector<PDT::Colour> id8888;
/**
* id for 33bar88
*/
mutable vector<PDT::Colour> id33bar88;
/**
* id for 33bar33bar
*/
mutable vector<PDT::Colour> id33bar33bar;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SimpleColourBasis & operator=(const SimpleColourBasis &);
+ SimpleColourBasis & operator=(const SimpleColourBasis &) = delete;
};
}
#endif /* Herwig_SimpleColourBasis_H */
diff --git a/MatrixElement/Matchbox/Utility/SimpleColourBasis2.h b/MatrixElement/Matchbox/Utility/SimpleColourBasis2.h
--- a/MatrixElement/Matchbox/Utility/SimpleColourBasis2.h
+++ b/MatrixElement/Matchbox/Utility/SimpleColourBasis2.h
@@ -1,211 +1,211 @@
// -*- C++ -*-
//
// SimpleColourBasis2.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_SimpleColourBasis2_H
#define Herwig_SimpleColourBasis2_H
//
// This is the declaration of the SimpleColourBasis2 class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief SimpleColourBasis2 implements the colour algebra needed for
* processes with four coloured legs at NLO. It mainly serves as an
* example for the general ColourBasis interface.
*
*/
class SimpleColourBasis2: public ColourBasis {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
SimpleColourBasis2();
/**
* The destructor.
*/
virtual ~SimpleColourBasis2();
//@}
public:
/**
* Prepare the basis for the normal ordered legs and return the
* dimensionality of the basis.
*/
virtual size_t prepareBasis(const vector<PDT::Colour>&);
/**
* Return the scalar product of basis tensors labelled a and b in
* the basis used for the given normal ordered legs.
*/
virtual double scalarProduct(size_t a, size_t b,
const vector<PDT::Colour>& abBasis) const;
/**
* Return the matrix element of a colour charge
* <c_{n+1,a}|T_i|c_{n,b}> between basis tensors a and b, with
* respect to aBasis and bBasis
*/
virtual double tMatrixElement(size_t i, size_t a, size_t b,
const vector<PDT::Colour>& aBasis,
const vector<PDT::Colour>& bBasis) const;
/**
* Return true, if a large-N colour connection exists for the
* given external legs and basis tensor.
*/
virtual bool colourConnected(const cPDVector&,
const vector<PDT::Colour>&,
const pair<int,bool>&,
const pair<int,bool>&,
size_t) const;
/**
* Return true, if the colour basis is capable of assigning colour
* flows.
*/
virtual bool haveColourFlows() const { return true; }
/**
* Create ids for bases
*/
void makeIds() const;
/**
* Return a map of basis tensor indices to vectors identifying a
* certain ordering corresponding to the given colour structure. May
* not be supported by all colour basis implementations.
*/
virtual map<size_t,vector<vector<size_t> > > basisList(const vector<PDT::Colour>&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* id for 88
*/
mutable vector<PDT::Colour> id88;
/**
* id for 33bar
*/
mutable vector<PDT::Colour> id33bar;
/**
* id for 888
*/
mutable vector<PDT::Colour> id888;
/**
* id for 33bar8
*/
mutable vector<PDT::Colour> id33bar8;
/**
* id for 8888
*/
mutable vector<PDT::Colour> id8888;
/**
* id for 33bar88
*/
mutable vector<PDT::Colour> id33bar88;
/**
* id for 33bar33bar
*/
mutable vector<PDT::Colour> id33bar33bar;
/**
* id for 88888
*/
mutable vector<PDT::Colour> id88888;
/**
* id for 33bar888
*/
mutable vector<PDT::Colour> id33bar888;
/**
* id for 33bar33bar8
*/
mutable vector<PDT::Colour> id33bar33bar8;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SimpleColourBasis2 & operator=(const SimpleColourBasis2 &);
+ SimpleColourBasis2 & operator=(const SimpleColourBasis2 &) = delete;
};
}
#endif /* Herwig_SimpleColourBasis2_H */
diff --git a/MatrixElement/Matchbox/Utility/Tree2toNGenerator.h b/MatrixElement/Matchbox/Utility/Tree2toNGenerator.h
--- a/MatrixElement/Matchbox/Utility/Tree2toNGenerator.h
+++ b/MatrixElement/Matchbox/Utility/Tree2toNGenerator.h
@@ -1,438 +1,438 @@
// -*- C++ -*-
//
// Tree2toNGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_Tree2toNGenerator_H
#define Herwig_Tree2toNGenerator_H
//
// This is the declaration of the Tree2toNGenerator class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief Generate Tree2toNDiagrams for a given process.
*
* @see \ref Tree2toNGeneratorInterfaces "The interfaces"
* defined for Tree2toNGenerator.
*/
class Tree2toNGenerator: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
Tree2toNGenerator();
/**
* The destructor.
*/
virtual ~Tree2toNGenerator();
//@}
public:
/**
* Generate all diagrams for the given process.
*/
vector<Ptr<Tree2toNDiagram>::ptr> generate(const PDVector&,
unsigned int orderInGs,
unsigned int orderInGem);
typedef vector<Ptr<Helicity::VertexBase>::ptr> VertexVector;
/**
* Access the vertices
*/
VertexVector& vertices() { return theVertices; }
/**
* Return the vertices
*/
const VertexVector& vertices() const { return theVertices; }
/**
* Access the particles to be excluded from internal lines
*/
PDVector& excludeInternal() { return theExcludeInternal; }
/**
* Return the particles to be excluded from internal lines
*/
const PDVector& excludeInternal() const { return theExcludeInternal; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* A node in internally used trees.
*/
struct Vertex {
/**
* The outgoing particles. If this is a spacelike node, the first
* child is considered the next spacelike (or second incoming)
* line. If children are empty, this is an external line.
*/
vector<Vertex> children;
/**
* The incoming line at this node.
*/
PDPtr parent;
/**
* True, if this is spacelike node.
*/
bool spacelike;
/**
* The external leg id.
*/
int externalId;
/**
* The parent diagram id.
*/
int parentId;
/**
* The default constructor.
*/
Vertex()
: spacelike(false), externalId(-1), parentId(-1) {}
/**
* Debug printout.
*/
void print(ostream& os, const string& prefix = "") const {
os << prefix << parent->PDGName()
<< "[" << (spacelike ? "s" : "t") << "] (";
if ( externalId < 0 )
os << "x)\n";
else
os << externalId << ")\n";
if ( !children.empty() ) {
os << prefix << "|__\n";
children[0].print(os,prefix + "| ");
os << prefix << "|__\n";
children[1].print(os,prefix + "| ");
}
}
/**
* Count the number of spacelike lines
*/
int nspace() const {
if ( children.empty() )
return 1;
int ret = 1;
ret += children[0].nspace();
return ret;
}
/**
* Update diagram returning a map of external ids to diagram id
* parents.
*/
void update(Tree2toNDiagram& diag,
map<int,pair<int,PDPtr> >& outgoing,
int& lastUsed) {
if ( externalId == 0 ) {
assert(lastUsed==0);
++lastUsed;
diag.operator,(parent);
children[0].parentId = lastUsed;
children[1].parentId = lastUsed;
children[0].update(diag,outgoing,lastUsed);
children[1].update(diag,outgoing,lastUsed);
for ( map<int,pair<int,PDPtr> >::iterator out =
outgoing.begin(); out != outgoing.end(); ++out ) {
diag.operator,(out->second.first);
diag.operator,(out->second.second);
}
return;
}
if ( spacelike ) {
++lastUsed;
diag.operator,(parent);
if ( externalId == 1 )
return;
children[0].parentId = lastUsed;
children[1].parentId = lastUsed;
children[0].update(diag,outgoing,lastUsed);
children[1].update(diag,outgoing,lastUsed);
return;
}
if ( children.empty() ) {
outgoing[externalId] =
make_pair(parentId,parent);
return;
}
diag.operator,(parentId);
diag.operator,(parent);
++lastUsed;
children[0].parentId = lastUsed;
children[1].parentId = lastUsed;
children[0].update(diag,outgoing,lastUsed);
children[1].update(diag,outgoing,lastUsed);
}
/**
* Generate a diagram of given id.
*/
Tree2toNDiagram generate(int id) {
int nsp = nspace();
Tree2toNDiagram res(nsp);
int diagid = 0;
map<int,pair<int,PDPtr> > out;
update(res,out,diagid);
res.operator,(-id);
return res;
}
};
/**
* For the given set of trees determine all allowed clusterings.
*/
list<vector<Vertex> > cluster(const vector<Vertex>& children,
unsigned int orderInGs,
unsigned int orderInGem) const;
/**
* For the given set of outgoing lines cluster recursively.
*/
list<vector<Vertex> > clusterAll(const list<vector<Vertex> >& current,
unsigned int orderInGs,
unsigned int orderInGem) const;
/**
* For the given set of outgoing lines cluster recursively.
*/
list<vector<Vertex> > clusterAll(const PDVector& external,
unsigned int orderInGs,
unsigned int orderInGem);
/**
* Helper for topology restrictions
*/
struct LineMatcher {
/**
* The group of lines to be considered
*/
set<tcPDPtr> particles;
/**
* The range allowed
*/
pair<int,int> range;
/**
* The current count
*/
int count;
/**
* Default constructor
*/
LineMatcher()
: range(0,0), count(0) {}
/**
* Construct given particles and a range
*/
LineMatcher(const PDVector& p,
const pair<int,int>& r)
: range(r), count(0) {
copy(p.begin(),p.end(),inserter(particles,particles.begin()));
}
/**
* Rebind the particle data pointers
*/
void rebind(Tree2toNGenerator* g) {
set<tcPDPtr> oldp = particles;
particles.clear();
for ( set<tcPDPtr>::const_iterator p = oldp.begin();
p != oldp.end(); ++p )
particles.insert(g->getParticleData((**p).id()));
}
/**
* Reset this matcher
*/
void reset() {
count = 0;
}
/**
* Count the given multiplicity
*/
void add(tcPDPtr p, int n) {
if ( particles.find(p) == particles.end() )
return;
count += n;
}
/**
* Ceck if restrictions are met
*/
bool check() const {
return
count >= range.first && count <= range.second;
}
};
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The vertices to be used.
*/
VertexVector theVertices;
/**
* The particles to be excluded from internal lines
*/
PDVector theExcludeInternal;
/**
* Maximum order in gs to consider.
*/
unsigned int maxOrderGs;
/**
* Maximum order in gem to consider.
*/
unsigned int maxOrderGem;
/**
* Wether or not the generator has been prepared
*/
bool prepared;
/**
* The vertices to be excluded.
*/
VertexVector theExcludeVertices;
/**
* Minimal and maximal occurences of spacelike internal lines
*/
vector<LineMatcher> spaceLikeAllowed;
/**
* Minimal and maximal occurences of timelike internal lines
*/
vector<LineMatcher> timeLikeAllowed;
/**
* The next particle for which internal lines need to be restricted
*/
PDVector theRestrictLines;
/**
* Command to set an allowed range of spacelike internal lines
*/
string doSpaceLikeRange(string);
/**
* Command to set an allowed range of timelike internal lines
*/
string doTimeLikeRange(string);
/**
* Command to clear the restrict lines container
*/
string doClearRestrictLines(string);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Tree2toNGenerator & operator=(const Tree2toNGenerator &);
+ Tree2toNGenerator & operator=(const Tree2toNGenerator &) = delete;
};
inline PersistentOStream& operator<<(PersistentOStream& os, const Tree2toNGenerator::LineMatcher& m) {
os << m.particles << m.range << m.count;
return os;
}
inline PersistentIStream& operator>>(PersistentIStream& is, Tree2toNGenerator::LineMatcher& m) {
is >> m.particles >> m.range >> m.count;
return is;
}
}
#endif /* Herwig_Tree2toNGenerator_H */
diff --git a/MatrixElement/Powheg/MEPP2GammaGammaPowheg.h b/MatrixElement/Powheg/MEPP2GammaGammaPowheg.h
--- a/MatrixElement/Powheg/MEPP2GammaGammaPowheg.h
+++ b/MatrixElement/Powheg/MEPP2GammaGammaPowheg.h
@@ -1,542 +1,542 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2GammaGammaPowheg_H
#define HERWIG_MEPP2GammaGammaPowheg_H
//
// This is the declaration of the MEPP2GammaGammaPowheg class.
//
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/MatrixElement/ProductionMatrixElement.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the MEPP2GammaGammaPowheg class.
*
* @see \ref MEPP2GammaGammaPowhegInterfaces "The interfaces"
* defined for MEPP2GammaGammaPowheg.
*/
class MEPP2GammaGammaPowheg: public HwMEBase {
enum DipoleType { IIQCD1=2, IIQCD2=4,
IFQED1=5, FIQED1=6, IFQED2=7, FIQED2=8 };
enum RadiationType {Subtraction,Hard,Shower};
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MEPP2GammaGammaPowheg();
//@}
/** @name Member functions for the generation of hard QCD radiation */
//@{
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return ISR;}
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction);
//@}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const;
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate of the full next-to-leading order weight
*/
virtual double NLOWeight() const;
/**
* Leading-order matrix element for \f$q\bar q\to \gamma\gamma\f$
*/
double loGammaGammaME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
bool first=false) const;
/**
* Leading-order matrix element for \f$qg\to \gamma q\f$
*/
double loGammaqME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
bool first=false) const;
/**
* Leading-order matrix element for \f$g\bar q\to \gamma \bar q\f$
*/
double loGammaqbarME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
bool first=false) const;
/**
* Leading-order matrix element for \f$q\bar q\to \gamma g\f$
*/
double loGammagME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
bool first=false) const;
/**
* Real emission matrix element for \f$q\bar q\to \gamma \gamma g\f$
*/
InvEnergy2 realGammaGammagME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
DipoleType dipole, RadiationType rad,
bool first=false) const;
/**
* Real emission matrix element for \f$qg\to \gamma \gamma q\f$
*/
InvEnergy2 realGammaGammaqME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
DipoleType dipole, RadiationType rad,
bool first=false) const;
/**
* Real emission matrix element for \f$g\bar q\to \gamma \gamma \bar q\f$
*/
InvEnergy2 realGammaGammaqbarME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta,
DipoleType dipole, RadiationType rad,
bool first=false) const;
/**
* The dipole subtractedvirtual contribution
*/
double subtractedVirtual() const;
/**
* Subtracted real contribution
*/
double subtractedReal(pair<double,double> x, double z,
double zJac, double oldqPDF, double newqPDF,
double newgPDF,bool order) const;
/**
* Calculate of the collinear counterterms
*/
//@{
/**
* Quark collinear counter term
*/
double collinearQuark(double x, Energy2 mu2, double jac, double z,
double oldPDF, double newPDF) const;
/**
* Gluon collinear counter term
*/
double collinearGluon(Energy2 mu2, double jac, double z,
double oldPDF, double newPDF) const;
//@}
/**
* The real matrix element divided by \f$2 g_S^2\f$, to be implemented in the
* inheriting classes.
* @param particles The ParticleData objects of the particles
* @param momenta The momenta of the particles
*/
double realME(const cPDVector & particles,
const vector<Lorentz5Momentum> & momenta) const;
/**
* Generate hard QCD emission
*/
RealEmissionProcessPtr hardQCDEmission(RealEmissionProcessPtr,
ParticleVector,
pair<double,double>);
/**
* Generate hard QED emission
*/
RealEmissionProcessPtr hardQEDEmission(RealEmissionProcessPtr,
ParticleVector,
pair<double,double>);
/**
* The supression function
*/
pair<double,double> supressionFunction(Energy pT,Energy scale) const {
if(supressionScale_==0) scale = lambda_;
Energy2 scale2 = sqr(scale), pT2 = sqr(pT);
switch( supressionFunction_ ) {
case 0:
return make_pair(1.,0.);
case 1:
if(pT < scale ) return make_pair(1.,0.);
else return make_pair(0.,1.);
case 2:
return make_pair(scale2/(pT2+scale2),pT2/(pT2+scale2));
default:
assert(false);
}
}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2GammaGammaPowheg & operator=(const MEPP2GammaGammaPowheg &);
+ MEPP2GammaGammaPowheg & operator=(const MEPP2GammaGammaPowheg &) = delete;
private:
/**
* Vertices
*/
//@{
/**
* FFPVertex
*/
AbstractFFVVertexPtr FFPvertex_;
/**
* FFGVertex
*/
AbstractFFVVertexPtr FFGvertex_;
//@}
/**
* Kinematic variables for the real radiation
*/
//@{
/**
* First variable
*/
mutable double zTilde_;
/**
* Second variable
*/
mutable double vTilde_;
/**
* Azimuthal angle
*/
mutable double phi_;
//@}
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int contrib_;
/**
* Power for sampling \f$x_p\f$
*/
double power_;
/**
* Pointer to the gluon ParticleData object
*/
tcPDPtr gluon_;
/**
* Processes
*/
unsigned int process_;
/**
* Processes
*/
unsigned int threeBodyProcess_;
/**
* Allowed flavours of the incoming quarks
*/
int maxflavour_;
/**
* Factor for \f$C_F\f$ dependent pieces
*/
mutable double CFfact_;
/**
* Factor for \f$T_R\f$ dependent pieces
*/
mutable double TRfact_;
/**
* Strong coupling
*/
mutable double alphaS_;
/**
* Use a fixed value of \f$\alpha_S\f$
*/
bool fixedAlphaS_;
/**
* Electromagnetic coupling
*/
mutable double alphaEM_;
/**
* Leading-order matrix element
*/
mutable double loME_;
/**
* The matrix element
*/
mutable ProductionMatrixElement me_;
/**
* the selected dipole
*/
mutable DipoleType dipole_;
/**
* Supression Function
*/
//@{
/**
* Choice of the supression function
*/
unsigned int supressionFunction_;
/**
* Choice for the scale in the supression function
*/
unsigned int supressionScale_;
/**
* Scalar for the supression function
*/
Energy lambda_;
//@}
/**
* Hard emission stuff
*/
//@{
/**
* Whether the quark is in the + or - z direction
*/
bool quarkplus_;
//@}
/**
* Properties of the incoming particles
*/
//@{
/**
* Pointers to the BeamParticleData objects
*/
vector<tcBeamPtr> beams_;
/**
* Pointers to the ParticleDataObjects for the partons
*/
vector<tcPDPtr> partons_;
//@}
/**
* Constants for the sampling. The distribution is assumed to have the
* form \f$\frac{c}{{\rm GeV}}\times\left(\frac{{\rm GeV}}{p_T}\right)^n\f$
*/
//@{
/**
* The prefactor, \f$c\f$ for the \f$q\bar{q}\f$ channel
*/
double preQCDqqbarq_;
/**
* The prefactor, \f$c\f$ for the \f$q\bar{q}\f$ channel
*/
double preQCDqqbarqbar_;
/**
* The prefactor, \f$c\f$ for the \f$qg\f$ channel
*/
double preQCDqg_;
/**
* The prefactor, \f$c\f$ for the \f$g\bar{q}\f$ channel
*/
double preQCDgqbar_;
double preQEDqqbarq_;
double preQEDqqbarqbar_;
double preQEDqgq_;
double preQEDgqbarqbar_;
/**
* The prefactors as a vector for easy use
*/
vector<double> prefactor_;
//@}
/**
* The transverse momentum of the jet
*/
Energy minpT_;
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr alphaQCD_;
/**
* Pointer to the object calculating the EM
*/
ShowerAlphaPtr alphaQED_;
/**
* Scale choice
*/
unsigned int scaleChoice_;
/**
* Scale factor
*/
double scalePreFactor_;
};
}
#endif /* HERWIG_MEPP2GammaGammaPowheg_H */
diff --git a/MatrixElement/Powheg/MEPP2HiggsPowheg.h b/MatrixElement/Powheg/MEPP2HiggsPowheg.h
--- a/MatrixElement/Powheg/MEPP2HiggsPowheg.h
+++ b/MatrixElement/Powheg/MEPP2HiggsPowheg.h
@@ -1,419 +1,419 @@
// -*- C++ -*-
//
// MEPP2HiggsPowheg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEPP2HiggsPowheg_H
#define HERWIG_MEPP2HiggsPowheg_H
//
// This is the declaration of the MEPP2HiggsPowheg class.
//
#include "Herwig/MatrixElement/Hadron/MEPP2Higgs.h"
#include "ThePEG/PDF/BeamParticleData.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The MEPP2HiggsPowheg class implements the matrix element for the process
* pp->Higgs with different Higgs shape prescriptions (see details in hep-ph/9505211)
* and the NLL corrected Higgs width (see details in the FORTRAN HERWIG manual).
*
* @see \ref MEPP2HiggsPowhegInterfaces "The interfaces"
* defined for MEPP2HiggsPowheg.
*/
class MEPP2HiggsPowheg: public MEPP2Higgs {
public:
/**
* The default constructor.
*/
MEPP2HiggsPowheg();
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Function to set the born variables.
*/
void get_born_variables() const;
/**
* Calculate the correction weight with which leading-order
* configurations are re-weighted.
*/
double NLOweight() const;
/**
* Invariant required for the evaluation of next-to-leading order
* quantities (Frixione et al. NPB.383 WZ production at colliders).
*/
Energy2 s(double xt, double y) const {
return p2_/x(xt,y);
}
/**
* Invariant required for the evaluation of next-to-leading order
* quantities (Frixione et al. NPB.383 WZ production at colliders).
*/
Energy2 tk(double xt, double y) const {
double x_xt_y(x(xt,y));
return -0.5*p2_/x_xt_y*(1.- x_xt_y)*(1.-y);
}
/**
* Invariant required for the evaluation of next-to-leading order
* quantities (Frixione et al. NPB.383 WZ production at colliders).
*/
Energy2 uk(double xt, double y) const {
double x_xt_y(x(xt,y));
return -0.5*p2_/x_xt_y*(1.- x_xt_y)*(1.+y);
}
/**
* Calculate the minimum of \f$x\f$.
*/
double xbar(double y) const;
/**
* Calculate auxiliary function of \f$\bar{x}(y)\f$, \f$\bar{\eta}(y)\f$.
*/
double etabar(double y) const;
/**
* Calculate the variable \f$x=p^{2}/s\f$ from the integration variables.
*/
double x(double xt, double y) const {
double x0(xbar(y));
return x0+(1.-x0)*xt;
}
/**
* Calculate the momentum fraction of the plus parton.
*/
double xp(double x, double y) const;
/**
* Calculate the momentum fraction of the minus parton.
*/
double xm(double x, double y) const;
/**
* Calculate the ratio of the NLO luminosity to the LO
* luminosity function for the \f$q\bar{q}\f$ initiated channel.
*/
double Lhat_ab(tcPDPtr a, tcPDPtr b, double x, double y) const;
/**
* Calculate the universal soft-virtual contribution to the NLO weight.
*/
double Vtilde_universal() const;
/**
* Function for calculation of the \f$gg\f$ initiated real
* contribution.
*/
double Ctilde_Ltilde_gg_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ctilde_Ltilde_qg_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
/**
* Function for calculation of the \f$gq\f$ initiated real
* contribution.
*/
double Ctilde_Ltilde_gq_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
/**
* The regular part of the virtual correction matrix element(s)
*/
double M_V_regular() const;
/**
* The matrix element q + qbar -> n + g times tk*uk
*/
Energy2 t_u_M_R_qqbar(double xt, double y) const;
/**
* The matrix element qbar + q -> n + g times tk*uk
*/
Energy2 t_u_M_R_qbarq(double xt, double y) const;
/**
* The matrix element g + g -> n + g times tk*uk
*/
Energy2 t_u_M_R_gg(double xt, double y) const;
/**
* The matrix element q + g -> n + q times tk*uk
*/
Energy2 t_u_M_R_qg(double xt, double y) const;
/**
* The matrix element g + q -> n + q times tk*uk
*/
Energy2 t_u_M_R_gq(double xt, double y) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Rtilde_Ltilde_qqbar_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
/**
* Function for calculation of the \f$\bar{q}q\f$ initiated real
* contribution.
*/
double Rtilde_Ltilde_qbarq_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
/**
* Function for calculation of the \f$qq\f$
* initiated real contribution.
*/
double Rtilde_Ltilde_gg_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Rtilde_Ltilde_qg_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
/**
* Function for calculation of the \f$gq\f$ initiated real
* contribution.
*/
double Rtilde_Ltilde_gq_on_x(tcPDPtr a,tcPDPtr b,double xt,double y) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2HiggsPowheg & operator=(const MEPP2HiggsPowheg &);
+ MEPP2HiggsPowheg & operator=(const MEPP2HiggsPowheg &) = delete;
private:
/**
* Parameters for the NLO weight
*/
//@{
/**
* The colour factors
*/
const double CF_ , CA_ , TR_;
/**
* Number of light flavours (in the beta function beta0_)
*/
const int nlf_;
/**
* (Proportional to) The beta function
*/
const double beta0_;
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int contrib_;
/**
* Whether to use a fixed or a running QCD coupling for the NLO weight
*/
unsigned int nlo_alphaS_opt_;
/**
* The value of alphaS to use for the nlo weight if nlo_alphaS_opt_=1
*/
double fixed_alphaS_;
//@}
/**
* Radiation variables
*/
//@{
/**
* The \f$\tilde{x}\f$ variable
*/
double xt_;
/**
* The \f$y\f$ angular variable
*/
double y_;
//@}
/**
* Values of the PDF's before radiation
*/
mutable double lo_lumi_;
/**
* The value of the leading order gg->H matrix element
*/
mutable double lo_ggME_;
/**
* The invariant mass of the lo final state.
*/
mutable Energy2 p2_ ;
/**
* The invariant mass of the lo final state.
*/
mutable Energy2 s2_ ;
/**
* The momentum fraction of the plus parton in the Born process
*/
mutable double xbp_;
/**
* The momentum fraction of the minus parton in the Born process
*/
mutable double xbm_;
/**
* The sqrt(1-xbp_)
*/
mutable double etabarp_;
/**
* The sqrt(1-xbm_)
*/
mutable double etabarm_;
/**
* The ParticleData object for the plus lo parton
*/
mutable tcPDPtr a_lo_;
/**
* The ParticleData object for the minus lo parton
*/
mutable tcPDPtr b_lo_;
/**
* The BeamParticleData object for the plus direction hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer hadron_A_;
/**
* The BeamParticleData object for the minus direction hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer hadron_B_;
/**
* The value of \f$\alpha_S\f$ used for the calculation
*/
mutable double alphaS_;
/**
* Selects a dynamic (sHat) or fixed factorization scale
*/
unsigned int scaleopt_;
/**
* The factorization scale
*/
Energy mu_F_;
/**
* The renormalization scale
*/
Energy mu_UV_;
/**
* Prefactor if variable scale used
*/
double scaleFact_;
};
}
#endif /* HERWIG_MEPP2HiggsPowheg_H */
diff --git a/MatrixElement/Powheg/MEPP2HiggsVBFPowheg.h b/MatrixElement/Powheg/MEPP2HiggsVBFPowheg.h
--- a/MatrixElement/Powheg/MEPP2HiggsVBFPowheg.h
+++ b/MatrixElement/Powheg/MEPP2HiggsVBFPowheg.h
@@ -1,267 +1,267 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2HiggsVBFPowheg_H
#define HERWIG_MEPP2HiggsVBFPowheg_H
//
// This is the declaration of the MEPP2HiggsVBFPowheg class.
//
#include "Herwig/MatrixElement/Hadron/MEPP2HiggsVBF.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the MEPP2HiggsVBFPowheg class.
*
* @see \ref MEPP2HiggsVBFPowhegInterfaces "The interfaces"
* defined for MEPP2HiggsVBFPowheg.
*/
class MEPP2HiggsVBFPowheg: public Herwig::MEPP2HiggsVBF {
public:
/**
* The default constructor.
*/
MEPP2HiggsVBFPowheg();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element squared differential in the variables
* given by the last call to generateKinematics().
*/
virtual CrossSection dSigHatDR() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* The NLO weight
*/
double NLOWeight() const;
/**
* Leading order matrix element
*/
Energy4 loMatrixElement(const Lorentz5Momentum &p1,
const Lorentz5Momentum &p2,
const Lorentz5Momentum &q1,
const Lorentz5Momentum &q2,
double G1, double G2) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2HiggsVBFPowheg & operator=(const MEPP2HiggsVBFPowheg &);
+ MEPP2HiggsVBFPowheg & operator=(const MEPP2HiggsVBFPowheg &) = delete;
private:
/**
* The Born variables
*/
//@{
/**
* \f$x_B\f$
*/
double _xB;
/**
* Partons
*/
tcPDPtr _partons[5];
mutable Energy2 _q2;
//@}
/**
* The radiative variables
*/
//@{
/**
* The \f$x_p\f$ or \f$z\f$ real integration variable
*/
double _xp;
/**
* The \f$z_p\f$ real integration variable
*/
double _zp;
/**
* The \f$fi\f$ real integration variable
*/
double _phi;
//@}
/**
* The variables to get the right boost
*/
//@{
/**
* LO momenta
*/
Lorentz5Momentum _loMomenta[4];
/**
* The transfered (virtual boson) momentum
*/
mutable Lorentz5Momentum _pa;
/**
* The incoming quark momentum
*/
mutable Lorentz5Momentum _pb;
/**
* The outgoing quark momentum
*/
Lorentz5Momentum _pc;
/**
* The incoming quark momentum
*/
Lorentz5Momentum _pbother;
/**
* The outgoing quark momentum
*/
Lorentz5Momentum _pcother;
//@}
/**
* Electroweak parameters
*/
//@{
/**
* The square of the Z mass
*/
Energy2 _mz2;
/**
* The square of the W mass
*/
Energy2 _mw2;
//@}
/**
* The first hadron
*/
tcBeamPtr _hadron;
/**
* Selects a dynamic or fixed factorization scale
*/
unsigned int scaleOpt_;
/**
* The factorization scale
*/
Energy muF_;
/**
* Prefactor if variable scale used
*/
double scaleFact_;
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int contrib_;
/**
* Power for sampling \f$x_p\f$
*/
double power_;
/**
* Jacobian for \f$x_p\f$ integral
*/
double jac_;
};
}
#endif /* HERWIG_MEPP2HiggsVBFPowheg_H */
diff --git a/MatrixElement/Powheg/MEPP2VVPowheg.h b/MatrixElement/Powheg/MEPP2VVPowheg.h
--- a/MatrixElement/Powheg/MEPP2VVPowheg.h
+++ b/MatrixElement/Powheg/MEPP2VVPowheg.h
@@ -1,832 +1,832 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2VVPowheg_H
#define HERWIG_MEPP2VVPowheg_H
//
// This is the declaration of the MEPP2VVPowheg class.
//
#include "Herwig/MatrixElement/Hadron/MEPP2VV.h"
#include "Herwig/MatrixElement/Powheg/VVKinematics.h"
#include "Herwig/Utilities/Maths.h"
#include "Herwig/Models/StandardModel/StandardCKM.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
using Math::ReLi2;
using Constants::pi;
/**
* Here is the documentation of the MEPP2VVPowheg class.
*
* @see \ref MEPP2VVPowhegInterfaces "The interfaces"
* defined for MEPP2VVPowheg.
*/
class MEPP2VVPowheg: public MEPP2VV {
public:
/**
* The default constructor.
*/
MEPP2VVPowheg();
/** @name Member functions for the generation of hard QCD radiation */
//@{
/**
* Has a POWHEG style correction
*/
virtual POWHEGType hasPOWHEGCorrection() {return ISR;}
/**
* Apply the POWHEG style correction
*/
virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr,
ShowerInteraction inter);
//@}
public:
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* This member check the collinear limits of the
* real emission matrix elements are equal to the
* appropriate combinations of Born ME's multiplied
* by the splitting functions.
*/
bool sanityCheck() const;
/**
* Return the CKM matrix elements.
*/
Complex CKM(int ix,int iy) const { return ckm_[ix][iy]; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
public:
/**
* Function to set the born variables.
*/
void getKinematics(double xt, double y, double theta2);
/**
* Calculate the correction weight with which leading-order
* configurations are re-weighted.
*/
double NLOweight() const;
/**
* Calculate the ratio of the NLO luminosity to the LO
* luminosity function for the \f$q\bar{q}\f$ initiated channel.
*/
double Lhat_ab(tcPDPtr a, tcPDPtr b, realVVKinematics Kinematics) const;
/**
* Calculate the universal soft-virtual contribution to the NLO weight.
*/
double Vtilde_universal(realVVKinematics S) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_Ltilde_qq_on_x(tcPDPtr a,tcPDPtr b,realVVKinematics C) const;
/**
* Function for calculation of the \f$gq\f$ initiated real
* contribution.
*/
double Ctilde_Ltilde_gq_on_x(tcPDPtr a,tcPDPtr b,realVVKinematics C) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Rtilde_Ltilde_qqb_on_x(tcPDPtr a,tcPDPtr b) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Rtilde_Ltilde_qg_on_x(tcPDPtr a,tcPDPtr b) const;
/**
* Function for calculation of the \f$gqb\f$ initiated real
* contribution.
*/
double Rtilde_Ltilde_gqb_on_x(tcPDPtr a,tcPDPtr b) const;
/**
* The regular part of the virtual correction matrix element(s).
* For WZ production this is given by Equation B.2 in NPB 383 (1992)
* 3-44 *** modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
double M_V_regular(realVVKinematics S) const;
/**
* Member variable to store the
* regular part of the virtual correction matrix element(s).
* For WZ production this is given by Equation B.2 in NPB 383 (1992)
* 3-44 *** modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
mutable double M_V_regular_;
/**
* The matrix element q + qb -> n + g times tk*uk
*/
Energy2 t_u_M_R_qqb(realVVKinematics R) const;
/**
* Member variable to store the matrix element q + qb -> n + g times tk*uk
*/
mutable Energy2 t_u_M_R_qqb_;
/**
* The matrix element q + g -> n + q times tk*uk
*/
Energy2 t_u_M_R_qg(realVVKinematics R) const;
/**
* Member variable to store the matrix element q + g -> n + q times tk*uk
*/
mutable Energy2 t_u_M_R_qg_;
/**
* The matrix element g + qb -> n + q times tk*uk
*/
Energy2 t_u_M_R_gqb(realVVKinematics R) const;
/**
* Member variable to store the matrix element g + qb -> n + q times tk*uk
*/
mutable Energy2 t_u_M_R_gqb_;
/**
* The matrix element q + qb -> n + g times (tk*uk)^2 - using helicity amplitudes
*/
Energy2 t_u_M_R_qqb_hel_amp(realVVKinematics R) const;
/**
* Member variable to store the
* matrix element q + qb -> n + g times (tk*uk)^2 - using helicity amplitudes
*/
mutable Energy2 t_u_M_R_qqb_hel_amp_;
/**
* The matrix element q + g -> n + q times (tk*uk)^2 - using helicity amplitudes
*/
Energy2 t_u_M_R_qg_hel_amp(realVVKinematics R) const;
/**
* Member variable to store the
* matrix element q + g -> n + q times (tk*uk)^2 - using helicity amplitudes
*/
mutable Energy2 t_u_M_R_qg_hel_amp_;
/**
* The matrix element g + qb -> n + qb times (tk*uk)^2 - using helicity amplitudes
*/
Energy2 t_u_M_R_gqb_hel_amp(realVVKinematics R) const;
/**
* Member variable to store the
* matrix element g + qb -> n + qb times (tk*uk)^2 - using helicity amplitudes
*/
mutable Energy2 t_u_M_R_gqb_hel_amp_;
/**
* The leading order matrix element - using helicity amplitudes
*/
double lo_me() const;
/**
* The Born matrix element as given in Equation 3.1 - 3.3 in NPB 383
* (1992) *** modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
double M_Born_WZ(bornVVKinematics B) const;
/**
* Member variable to store the
* Born matrix element as given in Equation 3.1 - 3.3 in NPB 383
* (1992) *** modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
mutable double M_Born_;
/**
* The Born matrix element as given in Equation 2.18 - 2.19 in NPB 357
* (1991) *** modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
double M_Born_ZZ(bornVVKinematics B) const;
/**
* M_V_regular_ZZ is the regular part of the one-loop ZZ matrix element
* exactly as defined in Eqs. B.1 & B.2 of NPB 357(1991)409-438 ***
* modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
double M_V_regular_ZZ(realVVKinematics S) const;
/**
* t_u_M_R_qqb_ZZ is the q + qb -> n + g times tk*uk real emission
* matrix element as defined in Eq. C.1 of NPB 357(1991)409-438 ***
* modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
Energy2 t_u_M_R_qqb_ZZ(realVVKinematics R) const;
/**
* The Born matrix element as given in Equation 3.2 - 3.8 in NPB 410
* (1993) *** modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
double M_Born_WW(bornVVKinematics B) const;
/**
* M_V_regular_WW is the regular part of the one-loop WW matrix element
* exactly as defined in Eqs. C.1 - C.7 of of NPB 410(1993)280-324 ***
* modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
double M_V_regular_WW(realVVKinematics S) const;
/**
* t_u_M_R_qqb_WW is the q + qb -> n + g times tk*uk real emission
* matrix element as defined in Eq. D.1-D.5 of NPB 410(1993)280-324 ***
* modulo a factor 1/(2s) ***, which is a flux factor that
* those authors absorb in the matrix element.
*/
Energy2 t_u_M_R_qqb_WW(realVVKinematics R) const;
/**
* Return the factorion scale squared.
*/
Energy2 mu_F2() const;
/**
* Return the renormalisation scale squared.
*/
Energy2 mu_UV2() const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2VVPowheg & operator=(const MEPP2VVPowheg &);
+ MEPP2VVPowheg & operator=(const MEPP2VVPowheg &) = delete;
private:
/**
* Parameters for the NLO weight
*/
//@{
/**
* Parameter to determine when to use limiting value of real emission
* matrix elements, to avoid rounding error issues.
*/
double tiny;
/**
* The BeamParticleData object for the plus and minus direction hadrons
*/
tcBeamPtr hadron_A_;
tcBeamPtr hadron_B_;
/**
* Born / virtual 2->2 kinematics.
*/
bornVVKinematics B_;
/**
* Soft limit of the 2->3 real emission kinematics.
*/
realVVKinematics S_;
/**
* Soft-collinear limit of the 2->3 kinematics (emission in +z direction).
*/
realVVKinematics SCp_;
/**
* The collinear limit of the 2->3 kinematics (emission in -z direction).
*/
realVVKinematics SCm_;
/**
* The collinear limit of the 2->3 kinematics (emission in +z direction).
*/
realVVKinematics Cp_;
/**
* The collinear limit of the 2->3 kinematics (emission in -z direction).
*/
realVVKinematics Cm_;
/**
* The resolved 2->3 real emission kinematics:
*/
realVVKinematics H_;
/**
* The ParticleData object for the plus and minus lo partons
*/
tcPDPtr ab_, bb_;
/**
* The ParticleData object for the quark and antiquark
* (which can be in a different order to ab_ and bb_).
*/
tcPDPtr quark_, antiquark_;
/**
* Values of the PDF's before radiation
*/
double lo_lumi_;
/**
* The value of the leading order qqbar->VV matrix element
*/
mutable double lo_me2_;
/**
* The CF_ colour factor
*/
double CF_;
/**
* The TR_ colour factor
*/
double TR_;
/**
* The number of colours
*/
double NC_;
/**
* The weak coupling and the sin (squared) of the Weinberg angle
*/
mutable double gW_, sin2ThetaW_;
/**
* The up and down, left handed, quark-boson couplings
*/
mutable double guL_, gdL_;
/**
* The up and down, right handed, quark-boson couplings (for WW & ZZ)
*/
mutable double guR_, gdR_;
/**
* The TGC coupling
*/
mutable double eZ_;
/**
* The TGC coupling squared. This is useful for debugging purposes
* when one wants to turn of t-channel * TGC interference contributions
* but leave the pure TGC contributions intact. It is also needed in
* order to transform WZ matrix elements into WW ones.
*/
mutable double eZ2_;
/**
* The CKM factor (Fij^2)
*/
mutable double Fij2_;
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int contrib_;
/**
* Whether to generate all channels contributions or just qqb or just
* qg+gqb contributions
*/
unsigned int channels_;
/**
* Whether to use a fixed or a running QCD coupling for the NLO weight
*/
unsigned int nlo_alphaS_opt_;
/**
* The value of alphaS to use for the nlo weight if nlo_alphaS_opt_=1
*/
double fixed_alphaS_;
/**
* Flag to remove or multiply in MCFM branching fractions for testing
*/
unsigned int removebr_;
/**
* Selects a dynamic (sHat) or fixed factorization scale
*/
unsigned int scaleopt_;
/**
* The factorization scale
*/
Energy mu_F_;
/**
* The renormalization scale
*/
Energy mu_UV_;
/**
* The pT of V1 in a radiative event in the lab frame (for scale setting only)
*/
Energy2 k1r_perp2_lab_;
/**
* The pT of V2 in a radiative event in the lab frame (for scale setting only)
*/
Energy2 k2r_perp2_lab_;
/**
* The ckm matrix elements (unsquared, to allow interference)
*/
vector< vector<Complex> > ckm_;
/**
* Option to impose helicity conservation on the real NLO ME's (greatly improves evaluation time).
*/
bool helicityConservation_;
/**
* The q + qb -> v1 + v2 + g helicity amplitudes
*/
mutable ProductionMatrixElement qqb_hel_amps_;
/**
* The q + g -> v1 + v2 + q helicity amplitudes
*/
mutable ProductionMatrixElement qg_hel_amps_;
/**
* The g + qb -> v1 + v2 + qb helicity amplitudes
*/
mutable ProductionMatrixElement gqb_hel_amps_;
//@}
/**
* The vertices
*/
//@{
/**
* The photon fermion-antifermion vertex
*/
AbstractFFVVertexPtr FFPvertex_;
/**
* The W fermion-antifermion vertex
*/
AbstractFFVVertexPtr FFWvertex_;
/**
* The Z fermion-antifermionvertex
*/
AbstractFFVVertexPtr FFZvertex_;
/**
* The triple electroweak gauge boson vertex
*/
AbstractVVVVertexPtr WWWvertex_;
/**
* The quark-antiquark gluon vertex
*/
AbstractFFVVertexPtr FFGvertex_;
//@}
/**
* The value of \f$\alpha_S\f$ used for the calculation
*/
mutable double alphaS_;
protected:
/**
* Returns the matrix element for a given type of process,
* rapidity of the jet \f$y_j\f$ and transverse momentum \f$p_T\f$
* @param emis_type the type of emission,
* (0 is \f$q\bar{q}\to Vg\f$, 1 is \f$qg\to Vq\f$ and 2 is \f$g\bar{q}\to V\bar{q}\f$)
* @param pT The transverse momentum of the jet
* @param R The object containing the kinematics
*/
double getResult(int emis_type, realVVKinematics R, Energy pT);
/**
* generates the hardest emission (yj,p)
* @param pnew The momenta of the new particles
* @param emissiontype The type of emission, as for getResult
* @return Whether not an emission was generated
*/
bool getEvent(vector<Lorentz5Momentum> & pnew,unsigned int & emissiontype);
/**
* sets the QCD, EW and PDF scales
* @param pT The pT of the current step in the veto algorithm
*/
void setTheScales(Energy pT);
/**
* The matrix element q + qb -> n + g times tk*uk
*/
Energy2 t_u_M_R_qqb_hel_amp(realVVKinematics R, bool getMatrix) const;
/**
* The matrix element q + g -> n + q times tk*uk
*/
Energy2 t_u_M_R_qg_hel_amp(realVVKinematics R, bool getMatrix) const;
/**
* The matrix element g + qb -> n + q times tk*uk
*/
Energy2 t_u_M_R_gqb_hel_amp(realVVKinematics R, bool getMatrix) const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
double lo_me(bool getMatrix) const;
/**
* Recalculate hard vertex to include spin correlations for radiative events.
*/
void recalculateVertex();
/**
* Member which selects a two body decay mode for each vector
* boson and distributes decay products isotropically
*/
bool isotropicDecayer();
/**
* The triangle function lambda(x,y,z)=sqrt(x^2+y^2+z^2-2*x*y-2*y*z-2*x*z)
*/
Energy2 triangleFn(Energy2,Energy2,Energy2);
private:
/**
* If this boolean is true the n+1 body helicity amplitudes will be
* used to calculate a hard vertex based on those kinematics for spin
* correlations in the decays.
*/
bool realMESpinCorrelations_;
/**
* The colour & spin averaged n-body (leading order) matrix element squared.
*/
double lo_me_;
/**
* The resolved 2->3 real emission kinematics.
*/
realVVKinematics R_;
/**
* This specifies the emitting configuration:
* 1: q + qbar -> V1 + V2 + g
* 2: q + g -> V1 + V2 + q
* 3: g + qbar -> V1 + V2 + qbar.
*/
unsigned int channel_;
/**
* Identifies the space-like mother of the branching
* as quark (+1) or antiquark (-1):
*/
int fermionNumberOfMother_;
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr showerAlphaS_;
/**
* Constants for the sampling. The distribution is assumed to have the
* form \f$\frac{c}{{\rm GeV}}\times\left(\frac{{\rm GeV}}{p_T}\right)^n\f$
*/
//@{
/**
* The power, \f$n\f$, for the sampling
*/
double power_;
/**
* The prefactor, \f$c\f$ for the \f$q\bar{q}\f$ channel
*/
double preqqbar_;
/**
* The prefactor, \f$c\f$ for the \f$qg\f$ channel
*/
double preqg_;
/**
* The prefactor, \f$c\f$ for the \f$g\bar{q}\f$ channel
*/
double pregqbar_;
/**
* The QCD beta function divided by 4pi, (11-2/3*nf)/4/pi, with nf = 5.
*/
double b0_;
/**
* The fundamental QCD scale in the one-loop alpha_{S} used for the crude
* (not the very crude) overestimate of the Sudakov exponent. The default
* value is set so such that alphaS(MZ), neglecting all flavour threshold
* effects i.e. MZ*exp(-1/2/b0_/alphaS(MZ)).
*/
Energy LambdaQCD_;
/**
* The prefactors as a vector for easy use
*/
vector<double> prefactor_;
//@}
/**
* Properties of the incoming particles
*/
//@{
/**
* Pointers to the ShowerProgenitor objects for the partons
*/
PPtr qProgenitor_;
PPtr qbProgenitor_;
/**
* Pointers to the Shower particle objects for the partons
*/
PPtr showerQuark_;
PPtr showerAntiquark_;
/**
* Pointers to the BeamParticleData objects
*/
tcBeamPtr qHadron_;
tcBeamPtr qbHadron_;
//@}
/**
* Properties of the boson and jets
*/
//@{
/**
* Pointers to the Shower particle objects for the partons
*/
PPtr gluon_;
PPtr V1_;
PPtr V2_;
vector<PPtr> children_;
/**
* Flag indicating if the q & qbar are flipped or not i.e. this
* is true if q enters from the -z direction in the lab frame.
*/
bool flipped_;
/**
* the rapidity of the jet
*/
double Yk_;
/**
* The transverse momentum of the jet
*/
Energy pT_;
//@}
/**
* The transverse momentum of the jet
*/
Energy min_pT_;
// Work out the scales we want to use in the matrix elements and the pdfs:
/**
* Scale for alpha_S: pT^2 of the diboson system.
*/
Energy2 QCDScale_;
/**
* Scale for real emission PDF:
*/
Energy2 PDFScale_;
/**
* Scale of electroweak vertices: mVV^2 the invariant mass of the diboson system.
*/
Energy2 EWScale_;
/**
* A matrix to hold the home-grown production matrix element
*/
mutable Complex productionMatrix_[3][3][3][3];
};
}
#endif /* HERWIG_MEPP2VVPowheg_H */
diff --git a/MatrixElement/Powheg/MEPP2WHPowheg.h b/MatrixElement/Powheg/MEPP2WHPowheg.h
--- a/MatrixElement/Powheg/MEPP2WHPowheg.h
+++ b/MatrixElement/Powheg/MEPP2WHPowheg.h
@@ -1,386 +1,386 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2WHPowheg_H
#define HERWIG_MEPP2WHPowheg_H
//
// This is the declaration of the MEPP2WHPowheg class.
//
#include "Herwig/MatrixElement/Hadron/MEPP2WH.h"
#include "ThePEG/PDF/BeamParticleData.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2WHPowheg class provides the next-to-leading order
* matrix elements for \f$W^\pm\f$ in assoication with a Higgs boson
* in the PoOWHEG scheme.
*
* @see \ref MEPP2WHPowhegInterfaces "The interfaces"
* defined for MEPP2WHPowheg.
*/
class MEPP2WHPowheg: public MEPP2WH {
public:
/**
* Default constructor
*/
MEPP2WHPowheg();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given 'nDim()' uniform
* random numbers in the interval ]0,1[. To help the phase space
* generator, the 'dSigHatDR()' should be a smooth function of these
* numbers, although this is not strictly necessary. Return
* false if the chosen points failed the kinematical cuts.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate the correction weight with which leading-order
* configurations are re-weighted.
*/
double NLOweight() const;
/**
* Calculate the variable \f$x=M_{B}^2/s\f$ from the integration variables.
*/
double x(double xt, double v) const;
/**
* Calculate the momentum fraction of the first parton.
*/
double x_a(double x, double v) const;
/**
* Calculate the momentum fraction of second parton.
*/
double x_b(double x, double v) const;
/**
* Calculate the minimum of \f$x\f$.
*/
double xbar(double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$qg\f$ initiated channel.
*/
double Ltilde_qg(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$g\bar{q}\f$ initiated channel.
*/
double Ltilde_gq(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$q\bar{q}\f$ initiated channel.
*/
double Ltilde_qq(double x, double v) const;
/**
* Calculate the soft-virtual contribution to the NLO weight.
*/
double Vtilde_qq() const;
/**
* Function for calculation of the \f$g\bar{q}\f$ and \f$g\bar{q}\f$
* initiated real contribution.
*/
double Ccalbar_qg(double x) const;
/**
* Function for calculation of the \f$qg\f$
* initiated real contribution.
*/
double Fcal_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_qq(double x, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ftilde_qg(double xt, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_gq(double xt, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_qq(double xt, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ctilde_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_qq(double x, double v) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2WHPowheg & operator=(const MEPP2WHPowheg &);
+ MEPP2WHPowheg & operator=(const MEPP2WHPowheg &) = delete;
private:
/**
* The momentum fraction of the first parton in the Born process
*/
mutable double _xb_a;
/**
* The momentum fraction of the second parton in the Born process
*/
mutable double _xb_b;
/**
* The ParticleData object for the first parton in the Born process
*/
mutable tcPDPtr _parton_a;
/**
* The ParticleData object for the second parton in the Born process
*/
mutable tcPDPtr _parton_b;
/**
* The BeamParticleData object for the first hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_A;
/**
* The BeamParticleData object for the second hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_B;
/**
* the ParticleData object for the gluon
*/
tcPDPtr _gluon;
/**
* The \f$T_R\f$ colour factor
*/
const double TR_;
/**
* The \f$C_F\f$ colour factor
*/
const double CF_;
/**
* The value of \f$\frac{\alpha_S}{2\pi}\f$ used for the calculation
*/
mutable double _alphaS2Pi;
/**
* The mass squared of the lepton pair
*/
mutable Energy2 _mll2;
/**
* The renormalization/factorization scale
*/
mutable Energy2 _mu2;
/**
* Parameters for the NLO weight
*/
//@{
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int _contrib;
/**
* Whether to use a fixed or a running QCD coupling for the NLO weight
*/
unsigned int _nlo_alphaS_opt;
/**
* The value of alphaS to use for the nlo weight if _nloalphaSopt=1
*/
double _fixed_alphaS;
/**
* The magnitude of the correction term to reduce the negative contribution
*/
double _a;
/**
* The power of the correction term to reduce the negative contribution
*/
double _p;
/**
* Cut-off for the correction function
*/
double _eps;
//@}
/**
* Choice of the scale
*/
//@{
/**
* Type of scale
*/
unsigned int _scaleopt;
/**
* Fixed scale if used
*/
Energy _fixedScale;
/**
* Prefactor if variable scale used
*/
double _scaleFact;
//@}
/**
* Radiation variables
*/
//@{
/**
* The \f$\tilde{x}\f$ variable
*/
double _xt;
/**
* The \f$v\f$ angular variable
*/
double _v;
//@}
/**
* Values of the PDF's before radiation
*/
//@{
/**
* For the quark
*/
mutable double _oldq;
/**
* For the antiquark
*/
mutable double _oldqbar;
//@}
};
}
#endif /* HERWIG_MEPP2WHPowheg_H */
diff --git a/MatrixElement/Powheg/MEPP2ZHPowheg.h b/MatrixElement/Powheg/MEPP2ZHPowheg.h
--- a/MatrixElement/Powheg/MEPP2ZHPowheg.h
+++ b/MatrixElement/Powheg/MEPP2ZHPowheg.h
@@ -1,384 +1,384 @@
// -*- C++ -*-
#ifndef HERWIG_MEPP2ZHPowheg_H
#define HERWIG_MEPP2ZHPowheg_H
//
// This is the declaration of the MEPP2ZHPowheg class.
//
#include "Herwig/MatrixElement/Hadron/MEPP2ZH.h"
#include "ThePEG/PDF/BeamParticleData.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEPP2ZHPowheg class implements the matrix element
* for \f$q\bar{q}\to Z^0h^0\f$.
*
* @see \ref MEPP2ZHPowhegInterfaces "The interfaces"
* defined for MEPP2ZHPowheg.
*/
class MEPP2ZHPowheg: public MEPP2ZH {
public:
/**
* The default constructor.
*/
MEPP2ZHPowheg();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given 'nDim()' uniform
* random numbers in the interval ]0,1[. To help the phase space
* generator, the 'dSigHatDR()' should be a smooth function of these
* numbers, although this is not strictly necessary. Return
* false if the chosen points failed the kinematical cuts.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate the correction weight with which leading-order
* configurations are re-weighted.
*/
double NLOweight() const;
/**
* Calculate the variable \f$x=M_{B}^2/s\f$ from the integration variables.
*/
double x(double xt, double v) const;
/**
* Calculate the momentum fraction of the first parton.
*/
double x_a(double x, double v) const;
/**
* Calculate the momentum fraction of second parton.
*/
double x_b(double x, double v) const;
/**
* Calculate the minimum of \f$x\f$.
*/
double xbar(double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$qg\f$ initiated channel.
*/
double Ltilde_qg(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$g\bar{q}\f$ initiated channel.
*/
double Ltilde_gq(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$q\bar{q}\f$ initiated channel.
*/
double Ltilde_qq(double x, double v) const;
/**
* Calculate the soft-virtual contribution to the NLO weight.
*/
double Vtilde_qq() const;
/**
* Function for calculation of the \f$g\bar{q}\f$ and \f$g\bar{q}\f$
* initiated real contribution.
*/
double Ccalbar_qg(double x) const;
/**
* Function for calculation of the \f$qg\f$
* initiated real contribution.
*/
double Fcal_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_qq(double x, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ftilde_qg(double xt, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_gq(double xt, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_qq(double xt, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ctilde_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_qq(double x, double v) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEPP2ZHPowheg & operator=(const MEPP2ZHPowheg &);
+ MEPP2ZHPowheg & operator=(const MEPP2ZHPowheg &) = delete;
private:
/**
* The momentum fraction of the first parton in the Born process
*/
mutable double _xb_a;
/**
* The momentum fraction of the second parton in the Born process
*/
mutable double _xb_b;
/**
* The ParticleData object for the first parton in the Born process
*/
mutable tcPDPtr _parton_a;
/**
* The ParticleData object for the second parton in the Born process
*/
mutable tcPDPtr _parton_b;
/**
* The BeamParticleData object for the first hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_A;
/**
* The BeamParticleData object for the second hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_B;
/**
* the ParticleData object for the gluon
*/
tcPDPtr _gluon;
/**
* The \f$T_R\f$ colour factor
*/
const double TR_;
/**
* The \f$C_F\f$ colour factor
*/
const double CF_;
/**
* The value of \f$\frac{\alpha_S}{2\pi}\f$ used for the calculation
*/
mutable double _alphaS2Pi;
/**
* The mass squared of the lepton pair
*/
mutable Energy2 _mll2;
/**
* The renormalization/factorization scale
*/
mutable Energy2 _mu2;
/**
* Parameters for the NLO weight
*/
//@{
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int _contrib;
/**
* Whether to use a fixed or a running QCD coupling for the NLO weight
*/
unsigned int _nlo_alphaS_opt;
/**
* The value of alphaS to use for the nlo weight if _nloalphaSopt=1
*/
double _fixed_alphaS;
/**
* The magnitude of the correction term to reduce the negative contribution
*/
double _a;
/**
* The power of the correction term to reduce the negative contribution
*/
double _p;
/**
* Cut-off for the correction function
*/
double _eps;
//@}
/**
* Choice of the scale
*/
//@{
/**
* Type of scale
*/
unsigned int _scaleopt;
/**
* Fixed scale if used
*/
Energy _fixedScale;
/**
* Prefactor if variable scale used
*/
double _scaleFact;
//@}
/**
* Radiation variables
*/
//@{
/**
* The \f$\tilde{x}\f$ variable
*/
double _xt;
/**
* The \f$v\f$ angular variable
*/
double _v;
//@}
/**
* Values of the PDF's before radiation
*/
//@{
/**
* For the quark
*/
mutable double _oldq;
/**
* For the antiquark
*/
mutable double _oldqbar;
//@}
};
}
#endif /* HERWIG_MEPP2ZHPowheg_H */
diff --git a/MatrixElement/Powheg/MEee2gZ2llPowheg.h b/MatrixElement/Powheg/MEee2gZ2llPowheg.h
--- a/MatrixElement/Powheg/MEee2gZ2llPowheg.h
+++ b/MatrixElement/Powheg/MEee2gZ2llPowheg.h
@@ -1,151 +1,151 @@
// -*- C++ -*-
#ifndef HERWIG_MEee2gZ2llPowheg_H
#define HERWIG_MEee2gZ2llPowheg_H
//
// This is the declaration of the MEee2gZ2llPowheg class.
//
#include "Herwig/MatrixElement/Lepton/MEee2gZ2ll.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the MEee2gZ2llPowheg class.
*
* @see \ref MEee2gZ2llPowhegInterfaces "The interfaces"
* defined for MEee2gZ2llPowheg.
*/
class MEee2gZ2llPowheg: public MEee2gZ2ll {
public:
/**
* The default constructor.
*/
MEee2gZ2llPowheg() : contrib_(1), zPow_(0.5), yPow_(0.9)
{}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2gZ2llPowheg & operator=(const MEee2gZ2llPowheg &);
+ MEee2gZ2llPowheg & operator=(const MEee2gZ2llPowheg &) = delete;
private:
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int contrib_;
/**
* Phase-space sampling for z
*/
double zPow_;
/**
* Phase-space sampling for y
*/
double yPow_;
/**
* Radiation variables
*/
//@{
/**
* The \f$\tilde{x}\f$ variable
*/
double z_;
/**
* The \f$y\f$ angular variable
*/
double y_;
/**
* The azimuth
*/
double phi_;
//@}
};
}
#endif /* HERWIG_MEee2gZ2llPowheg_H */
diff --git a/MatrixElement/Powheg/MEee2gZ2qqPowheg.h b/MatrixElement/Powheg/MEee2gZ2qqPowheg.h
--- a/MatrixElement/Powheg/MEee2gZ2qqPowheg.h
+++ b/MatrixElement/Powheg/MEee2gZ2qqPowheg.h
@@ -1,157 +1,157 @@
// -*- C++ -*-
#ifndef HERWIG_MEee2gZ2qqPowheg_H
#define HERWIG_MEee2gZ2qqPowheg_H
//
// This is the declaration of the MEee2gZ2qqPowheg class.
//
#include "Herwig/MatrixElement/Lepton/MEee2gZ2qq.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the MEee2gZ2qqPowheg class.
*
* @see \ref MEee2gZ2qqPowhegInterfaces "The interfaces"
* defined for MEee2gZ2qqPowheg.
*/
class MEee2gZ2qqPowheg: public MEee2gZ2qq {
public:
/**
* The default constructor.
*/
MEee2gZ2qqPowheg() : contrib_(1), corrections_(1),
zPow_(0.5), yPow_(0.9)
{}
public:
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
/**
* Generate internal degrees of freedom given nDim() uniform
* random numbers in the interval \f$ ]0,1[ \f$. To help the phase space
* generator, the dSigHatDR should be a smooth function of these
* numbers, although this is not strictly necessary.
* @param r a pointer to the first of nDim() consecutive random numbers.
* @return true if the generation succeeded, otherwise false.
*/
virtual bool generateKinematics(const double * r);
/**
* The number of internal degrees of freedom used in the matrix
* element.
*/
virtual int nDim() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEee2gZ2qqPowheg & operator=(const MEee2gZ2qqPowheg &);
+ MEee2gZ2qqPowheg & operator=(const MEee2gZ2qqPowheg &) = delete;
private:
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int contrib_;
/**
* Which corrections to included
*/
unsigned int corrections_;
/**
* Phase-space sampling for z
*/
double zPow_;
/**
* Phase-space sampling for y
*/
double yPow_;
/**
* Radiation variables
*/
//@{
/**
* The \f$\tilde{x}\f$ variable
*/
double z_;
/**
* The \f$y\f$ angular variable
*/
double y_;
/**
* The azimuth
*/
double phi_;
//@}
};
}
#endif /* HERWIG_MEee2gZ2qqPowheg_H */
diff --git a/MatrixElement/Powheg/MEqq2W2ffPowheg.h b/MatrixElement/Powheg/MEqq2W2ffPowheg.h
--- a/MatrixElement/Powheg/MEqq2W2ffPowheg.h
+++ b/MatrixElement/Powheg/MEqq2W2ffPowheg.h
@@ -1,373 +1,373 @@
// -*- C++ -*-
//
// MEqq2W2ffPowheg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEqq2W2ffPowheg_H
#define HERWIG_MEqq2W2ffPowheg_H
//
// This is the declaration of the MEqq2W2ffPowheg class.
//
#include "Herwig/MatrixElement/Hadron/MEqq2W2ff.h"
#include "ThePEG/PDF/BeamParticleData.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEqq2W2ffPowheg class implements the matrix element for \f$q\bar{q'}\to W^\pm\f$
* including the decay of the \f$W^\pm\f$ to Standard Model fermions.
*
* @see \ref MEqq2W2ffPowhegInterfaces "The interfaces"
* defined for MEqq2W2ffPowheg.
*/
class MEqq2W2ffPowheg: public MEqq2W2ff {
public:
/**
* The default constructor.
*/
MEqq2W2ffPowheg();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given 'nDim()' uniform
* random numbers in the interval ]0,1[. To help the phase space
* generator, the 'dSigHatDR()' should be a smooth function of these
* numbers, although this is not strictly necessary. Return
* false if the chosen points failed the kinematical cuts.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate the correction weight with which leading-order
* configurations are re-weighted.
*/
double NLOweight() const;
/**
* Calculate the variable \f$x=M_{B}^2/s\f$ from the integration variables.
*/
double x(double xt, double v) const;
/**
* Calculate the momentum fraction of the first parton.
*/
double x_a(double x, double v) const;
/**
* Calculate the momentum fraction of second parton.
*/
double x_b(double x, double v) const;
/**
* Calculate the minimum of \f$x\f$.
*/
double xbar(double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$qg\f$ initiated channel.
*/
double Ltilde_qg(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$g\bar{q}\f$ initiated channel.
*/
double Ltilde_gq(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$q\bar{q}\f$ initiated channel.
*/
double Ltilde_qq(double x, double v) const;
/**
* Calculate the soft-virtual contribution to the NLO weight.
*/
double Vtilde_qq() const;
/**
* Function for calculation of the \f$g\bar{q}\f$ and \f$g\bar{q}\f$
* initiated real contribution.
*/
double Ccalbar_qg(double x) const;
/**
* Function for calculation of the \f$qg\f$
* initiated real contribution.
*/
double Fcal_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_qq(double x, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ftilde_qg(double xt, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_gq(double xt, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_qq(double xt, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ctilde_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_qq(double x, double v) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEqq2W2ffPowheg & operator=(const MEqq2W2ffPowheg &);
+ MEqq2W2ffPowheg & operator=(const MEqq2W2ffPowheg &) = delete;
private:
/**
* The momentum fraction of the first parton in the Born process
*/
mutable double _xb_a;
/**
* The momentum fraction of the second parton in the Born process
*/
mutable double _xb_b;
/**
* The ParticleData object for the first parton in the Born process
*/
mutable tcPDPtr _parton_a;
/**
* The ParticleData object for the second parton in the Born process
*/
mutable tcPDPtr _parton_b;
/**
* The BeamParticleData object for the first hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_A;
/**
* The BeamParticleData object for the second hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_B;
/**
* the ParticleData object for the gluon
*/
tcPDPtr _gluon;
/**
* The \f$T_R\f$ colour factor
*/
const double TR_;
/**
* The \f$C_F\f$ colour factor
*/
const double CF_;
/**
* The value of \f$\frac{\alpha_S}{2\pi}\f$ used for the calculation
*/
mutable double _alphaS2Pi;
/**
* The mass squared of the lepton pair
*/
mutable Energy2 _mll2;
/**
* The renormalization/factorization scale
*/
mutable Energy2 _mu2;
/**
* Parameters for the NLO weight
*/
//@{
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int _contrib;
/**
* Whether to use a fixed or a running QCD coupling for the NLO weight
*/
unsigned int _nlo_alphaS_opt;
/**
* The value of alphaS to use for the nlo weight if _nloalphaSopt=1
*/
double _fixed_alphaS;
/**
* The magnitude of the correction term to reduce the negative contribution
*/
double _a;
/**
* The power of the correction term to reduce the negative contribution
*/
double _p;
/**
* Cut-off for the correction function
*/
double _eps;
//@}
/**
* Choice of the scale
*/
//@{
/**
* Type of scale
*/
unsigned int _scaleopt;
/**
* Fixed scale if used
*/
Energy _fixedScale;
/**
* Prefactor if variable scale used
*/
double _scaleFact;
//@}
/**
* Radiation variables
*/
//@{
/**
* The \f$\tilde{x}\f$ variable
*/
double _xt;
/**
* The \f$v\f$ angular variable
*/
double _v;
//@}
/**
* Values of the PDF's before radiation
*/
//@{
/**
* For the quark
*/
mutable double _oldq;
/**
* For the antiquark
*/
mutable double _oldqbar;
//@}
};
}
#endif /* HERWIG_MEqq2W2ffPowheg_H */
diff --git a/MatrixElement/Powheg/MEqq2gZ2ffPowheg.h b/MatrixElement/Powheg/MEqq2gZ2ffPowheg.h
--- a/MatrixElement/Powheg/MEqq2gZ2ffPowheg.h
+++ b/MatrixElement/Powheg/MEqq2gZ2ffPowheg.h
@@ -1,376 +1,376 @@
// -*- C++ -*-
//
// MEqq2gZ2ffPowheg.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MEqq2gZ2ffPowheg_H
#define HERWIG_MEqq2gZ2ffPowheg_H
//
// This is the declaration of the MEqq2gZ2ffPowheg class.
//
#include "Herwig/MatrixElement/Hadron/MEqq2gZ2ff.h"
#include "ThePEG/PDF/BeamParticleData.h"
namespace Herwig {
using namespace ThePEG;
/**
* The MEqq2gZ2ffPowheg class implements the products of Standard Model
* fermion antifermion pairs via the \f$Z^0\f$ resonance including
* photon interference terms.
*
* @see \ref MEqq2gZ2ffPowhegInterfaces "The interfaces"
* defined for MEqq2gZ2ffPowheg.
*/
class MEqq2gZ2ffPowheg: public MEqq2gZ2ff {
public:
/**
* The default constructor.
*/
MEqq2gZ2ffPowheg();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* The number of internal degreed of freedom used in the matrix
* element.
*/
virtual int nDim() const;
/**
* Generate internal degrees of freedom given 'nDim()' uniform
* random numbers in the interval ]0,1[. To help the phase space
* generator, the 'dSigHatDR()' should be a smooth function of these
* numbers, although this is not strictly necessary. Return
* false if the chosen points failed the kinematical cuts.
*/
virtual bool generateKinematics(const double * r);
/**
* Return the matrix element for the kinematical configuation
* previously provided by the last call to setKinematics(). Uses
* me().
*/
virtual CrossSection dSigHatDR() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate the correction weight with which leading-order
* configurations are re-weighted.
*/
double NLOweight() const;
/**
* Calculate the variable \f$x=M_{B}^2/s\f$ from the integration variables.
*/
double x(double xt, double v) const;
/**
* Calculate the momentum fraction of the first parton.
*/
double x_a(double x, double v) const;
/**
* Calculate the momentum fraction of the second parton.
*/
double x_b(double x, double v) const;
/**
* Calculate the minimum of \f$x\f$.
*/
double xbar(double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$qg\f$ initiated channel.
*/
double Ltilde_qg(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$g\bar{q}\f$ initiated channel.
*/
double Ltilde_gq(double x, double v) const;
/**
* Calculate the ratio of the radiative luminosity funcion to the
* Born luminosity function for the \f$q\bar{q}\f$ initiated channel.
*/
double Ltilde_qq(double x, double v) const;
/**
* Calculate the soft-virtual contribution to the NLO weight.
*/
double Vtilde_qq() const;
/**
* Function for calculation of the \f$qg\f$ and \f$g\bar{q}\f$ initiated real
* contributions.
*/
double Ccalbar_qg(double x) const;
/**
* Function for calculation of the \f$qg\f$
* initiated real contribution.
*/
double Fcal_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Fcal_qq(double x, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ftilde_qg(double xt, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_gq(double xt, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ftilde_qq(double xt, double v) const;
/**
* Function for calculation of the \f$qg\f$ initiated real
* contribution.
*/
double Ctilde_qg(double x, double v) const;
/**
* Function for calculation of the \f$g\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_gq(double x, double v) const;
/**
* Function for calculation of the \f$q\bar{q}\f$ initiated real
* contribution.
*/
double Ctilde_qq(double x, double v) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MEqq2gZ2ffPowheg & operator=(const MEqq2gZ2ffPowheg &);
+ MEqq2gZ2ffPowheg & operator=(const MEqq2gZ2ffPowheg &) = delete;
private:
/**
* The momentum fraction of the first parton in the Born process
*/
mutable double _xb_a;
/**
* The momentum fraction of the second parton in the Born process
*/
mutable double _xb_b;
/**
* The ParticleData object for the first parton in the Born process
*/
mutable tcPDPtr _parton_a;
/**
* The ParticleData object for the second parton in the Born process
*/
mutable tcPDPtr _parton_b;
/**
* The BeamParticleData object for the first hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_A;
/**
* The BeamParticleData object for the second hadron
*/
mutable Ptr<BeamParticleData>::transient_const_pointer _hadron_B;
/**
* the ParticleData object for the gluon
*/
tcPDPtr _gluon;
/**
* The \f$T_R\f$ colour factor
*/
const double TR_;
/**
* The \f$C_F\f$ colour factor
*/
const double CF_;
/**
* The value of \f$\frac{\alpha_S}{2\pi}\f$ used for the calculation
*/
mutable double _alphaS2Pi;
/**
* The mass squared of the lepton pair
*/
mutable Energy2 _mll2;
/**
* The renormalization/factorization scale
*/
mutable Energy2 _mu2;
/**
* Parameters for the NLO weight
*/
//@{
/**
* Whether to generate the positive, negative or leading order contribution
*/
unsigned int _contrib;
/**
* Whether to use a fixed or a running QCD coupling for the NLO weight
*/
unsigned int _nlo_alphaS_opt;
/**
* The value of alphaS to use for the nlo weight if _nloalphaSopt=1
*/
double _fixed_alphaS;
/**
* The magnitude of the correction term to reduce the negative contribution
*/
double _a;
/**
* The power of the correction term to reduce the negative contribution
*/
double _p;
/**
* Cut-off for the correction function
*/
double _eps;
//@}
/**
* Choice of the scale
*/
//@{
/**
* Type of scale
*/
unsigned int _scaleopt;
/**
* Fixed scale if used
*/
Energy _fixedScale;
/**
* Prefactor if variable scale used
*/
double _scaleFact;
//@}
/**
* Radiation variables
*/
//@{
/**
* The \f$\tilde{x}\f$ variable
*/
double _xt;
/**
* The \f$v\f$ angular variable
*/
double _v;
//@}
/**
* Values of the PDF's before radiation
*/
//@{
/**
* For the quark
*/
mutable double _oldq;
/**
* For the antiquark
*/
mutable double _oldqbar;
//@}
};
}
#endif /* HERWIG_MEqq2gZ2ffPowheg_H */
diff --git a/MatrixElement/Powheg/Makefile.am b/MatrixElement/Powheg/Makefile.am
--- a/MatrixElement/Powheg/Makefile.am
+++ b/MatrixElement/Powheg/Makefile.am
@@ -1,17 +1,17 @@
pkglib_LTLIBRARIES = HwPowhegMEHadron.la HwPowhegMELepton.la
-HwPowhegMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:0:0
+HwPowhegMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 9:0:0
HwPowhegMEHadron_la_SOURCES = \
MEqq2gZ2ffPowheg.cc MEqq2gZ2ffPowheg.h \
MEqq2W2ffPowheg.cc MEqq2W2ffPowheg.h \
MEPP2HiggsPowheg.cc MEPP2HiggsPowheg.h \
MEPP2WHPowheg.cc MEPP2WHPowheg.h \
MEPP2ZHPowheg.cc MEPP2ZHPowheg.h \
MEPP2VVPowheg.cc MEPP2VVPowheg.h \
VVKinematics.cc VVKinematics.h \
MEPP2GammaGammaPowheg.cc MEPP2GammaGammaPowheg.h \
MEPP2HiggsVBFPowheg.cc MEPP2HiggsVBFPowheg.h
-HwPowhegMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0
+HwPowhegMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0
HwPowhegMELepton_la_SOURCES = \
MEee2gZ2qqPowheg.cc MEee2gZ2qqPowheg.h \
MEee2gZ2llPowheg.cc MEee2gZ2llPowheg.h
diff --git a/MatrixElement/Reweighters/ReweightEW.h b/MatrixElement/Reweighters/ReweightEW.h
--- a/MatrixElement/Reweighters/ReweightEW.h
+++ b/MatrixElement/Reweighters/ReweightEW.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
#ifndef Herwig_ReweightEW_H
#define Herwig_ReweightEW_H
//
// This is the declaration of the ReweightEW class.
//
#include "ThePEG/MatrixElement/ReweightBase.h"
#include <array>
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the ReweightEW class.
*
* @see \ref ReweightEWInterfaces "The interfaces"
* defined for ReweightEW.
*/
class ReweightEW: public ReweightBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ReweightEW();
/**
* The destructor.
*/
virtual ~ReweightEW();
//@}
public:
/**
* Return the weight for the kinematical configuation provided by
* the assigned XComb object (in the LastXCombInfo base class).
*/
virtual double weight() const;
/**
* Return values of the last evaluation (double/doubles in GeV2)
*/
double lastS() const {return thelasts;}
double lastT() const {return thelastt;}
double lastK() const {return thelastk;}
void setSTK(double s, double t, double K);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The last s
*/
mutable double thelasts;
/**
* The last t
*/
mutable double thelastt;
/**
* The last K-factor
*/
mutable double thelastk;
/**
* The table of K factors to be read from file
*/
std::array<std::array<double,6>,40001> tab;
/**
* EW K factor filename
*/
string filename;
public:
/**
* Computation of K factors from table (s and t in GeV)
*/
double EWKFac(unsigned int f, double s, double t) const;
private:
/**
* initialize tables
*/
void inittable();
private:
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ReweightEW & operator=(const ReweightEW &);
+ ReweightEW & operator=(const ReweightEW &) = delete;
};
}
#endif /* Herwig_ReweightEW_H */
diff --git a/Models/ADD/ADDModel.h b/Models/ADD/ADDModel.h
--- a/Models/ADD/ADDModel.h
+++ b/Models/ADD/ADDModel.h
@@ -1,225 +1,225 @@
// -*- C++ -*-
//
// ADDModel.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModel_H
#define HERWIG_ADDModel_H
// This is the declaration of the ADDModel class.
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVTVertex.h"
#include "ADDModel.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup Models
*
* This is the class to be used instead of the Standard Model class for
* the ADD model.
*
* @see \ref ADDModelInterfaces "The interfaces"
* defined for ADDModel.
* @see StandardModel
* @see StandardModelBase
*
*/
class ADDModel: public BSMModel {
public:
/**
* The default constructor
*/
ADDModel() : delta_(2), mPlanckBar_(2.4e18*GeV),
md_(1000.*GeV), lambdaT_(1000.*GeV) {
useMe();
}
/**
* Number of extrac dimensions
*/
unsigned int delta() const {return delta_;}
/**
* The reduced Planck mass in 4d
*/
Energy MPlanckBar() const {return mPlanckBar_;}
/**
* The d-dimension Planck mass
*/
Energy MD() const {return md_;}
/**
* The cut-off for virtual gravition processes
*/
Energy LambdaT() const {return lambdaT_;}
/** @name Vertices */
//@{
/**
* Pointer to the object handling the \f$G\to f\bar{f}\f$ vertex.
*/
tAbstractFFTVertexPtr vertexFFGR() const {return FFGRVertex_;}
/**
* Pointer to the object handling the \f$G\to VV\f$ vertex.
*/
tAbstractVVTVertexPtr vertexVVGR() const {return VVGRVertex_;}
/**
* Pointer to the object handling the \f$G\to SS\f$ vertex.
*/
tAbstractSSTVertexPtr vertexSSGR() const {return SSGRVertex_;}
/**
* Pointer to the object handling the \f$G\to f\bar{f}g\f$ vertex.
*/
tAbstractFFVTVertexPtr vertexFFGGR() const {return FFGGRVertex_;}
/**
* Pointer to the object handling the \f$G\to f\bar{f}W^\pm/Z^0/\gamma\f$ vertex.
*/
tAbstractFFVTVertexPtr vertexFFWGR() const {return FFWGRVertex_;}
/**
* Pointer to the object handling the \f$G\to W^+W^-Z^0/\gamma\f$ vertex.
*/
tAbstractVVVTVertexPtr vertexWWWGR() const {return WWWGRVertex_;}
/**
* Pointer to the object handling the \f$G\to ggg\f$ vertex.
*/
tAbstractVVVTVertexPtr vertexGGGGR() const {return GGGGRVertex_;}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModel & operator=(const ADDModel &);
+ ADDModel & operator=(const ADDModel &) = delete;
private:
/**
* Number of extrac dimensions
*/
unsigned int delta_;
/**
* The reduced Planck mass in 4d
*/
Energy mPlanckBar_;
/**
* The d-dimension Planck mass
*/
Energy md_;
/**
* Cut-off parameter for virtual gravitons
*/
Energy lambdaT_;
/**
* Pointer to the object handling the \f$G\to f\bar{f}\f$ vertex.
*/
AbstractFFTVertexPtr FFGRVertex_;
/**
* Pointer to the object handling the \f$G\to VV\f$ vertex.
*/
AbstractVVTVertexPtr VVGRVertex_;
/**
* Pointer to the object handling the \f$G\to SS\f$ vertex.
*/
AbstractSSTVertexPtr SSGRVertex_;
/**
* Pointer to the object handling the \f$G\to f\bar{f}g\f$ vertex.
*/
AbstractFFVTVertexPtr FFGGRVertex_;
/**
* Pointer to the object handling the \f$G\to f\bar{f}W/Z^0\gamma\f$ vertex.
*/
AbstractFFVTVertexPtr FFWGRVertex_;
/**
* Pointer to the object handling the \f$G\to W^+W^-Z^0\gamma\f$ vertex.
*/
AbstractVVVTVertexPtr WWWGRVertex_;
/**
* Pointer to the object handling the \f$G\to ggg\f$ vertex.
*/
AbstractVVVTVertexPtr GGGGRVertex_;
};
}
#endif /* HERWIG_ADDModel_H */
diff --git a/Models/ADD/ADDModelFFGGRVertex.h b/Models/ADD/ADDModelFFGGRVertex.h
--- a/Models/ADD/ADDModelFFGGRVertex.h
+++ b/Models/ADD/ADDModelFFGGRVertex.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
//
// ADDModelFFGGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModelFFGGRVertex_H
#define HERWIG_ADDModelFFGGRVertex_H
//
// This is the declaration of the ADDModelFFGGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/FFVTVertex.h"
#include "ADDModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the fermion-antifermion-vector-graviton
* vertex for the Randell-Sundrum model
*
* @see FFVTVertex
* @see VertexBase
*/
class ADDModelFFGGRVertex: public FFVTVertex {
public:
/**
* Default constructor.
*/
ADDModelFFGGRVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Calculate the propagator for a diagram.
* @param iopt The option for the Breit-Wigner shape
* @param q2 The scale
* @param part The ParticleData pointer for the off-shell particle.
* @param mass The mass if not to be taken from the ParticleData object
* @param width The width if not to be taken from the ParticleData object
*/
virtual Complex propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass=-GeV, Energy width=-GeV);
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModelFFGGRVertex & operator=(const ADDModelFFGGRVertex &);
+ ADDModelFFGGRVertex & operator=(const ADDModelFFGGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the coupling/
*/
Complex couplast_;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 q2last_;
/**
* The graviton coupling.
*/
InvEnergy kappa_;
/**
* Mass ratio for the propagator
*/
Energy r_;
//@}
};
}
#endif /* HERWIG_ADDModelFFGGRVertex_H */
diff --git a/Models/ADD/ADDModelFFGRVertex.h b/Models/ADD/ADDModelFFGRVertex.h
--- a/Models/ADD/ADDModelFFGRVertex.h
+++ b/Models/ADD/ADDModelFFGRVertex.h
@@ -1,126 +1,126 @@
// -*- C++ -*-
//
// ADDModelFFGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModelFFGRVertex_H
#define HERWIG_ADDModelFFGRVertex_H
//
// This is the declaration of the ADDModelFFGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/FFTVertex.h"
#include "ADDModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the Randell-Sundrum model fermion-antifermion
* tensor vertex for helicity amplitude calculations
*
* @see FFTVertex
* @see VertexBase
*/
class ADDModelFFGRVertex: public FFTVertex {
public:
/**
* Default constructor.
*/
ADDModelFFGRVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Calculate the propagator for a diagram.
* @param iopt The option for the Breit-Wigner shape
* @param q2 The scale
* @param part The ParticleData pointer for the off-shell particle.
* @param mass The mass if not to be taken from the ParticleData object
* @param width The width if not to be taken from the ParticleData object
*/
virtual Complex propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass=-GeV, Energy width=-GeV);
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModelFFGRVertex & operator=(const ADDModelFFGRVertex &);
+ ADDModelFFGRVertex & operator=(const ADDModelFFGRVertex &) = delete;
/**
* The coupling.
*/
InvEnergy kappa_;
/**
* Mass ratio for the propagator
*/
Energy r_;
};
}
#endif /* HERWIG_ADDModelFFGRVertex_H */
diff --git a/Models/ADD/ADDModelFFWGRVertex.cc b/Models/ADD/ADDModelFFWGRVertex.cc
--- a/Models/ADD/ADDModelFFWGRVertex.cc
+++ b/Models/ADD/ADDModelFFWGRVertex.cc
@@ -1,199 +1,199 @@
// -*- C++ -*-
//
// ADDModelFFWGRVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ADDModelFFWGRVertex class.
//
#include "ADDModelFFWGRVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Models/StandardModel/StandardCKM.h"
using namespace Herwig;
using namespace ThePEG;
ADDModelFFWGRVertex::ADDModelFFWGRVertex()
: charge_(17,0.), gl_(17,0.), gr_(17,0.),
ckm_(3,vector<Complex>(3,0.0)), couplast_(0.),
q2last_(ZERO), kappa_(ZERO), r_(ZERO) {
orderInGem(2);
orderInGs (0);
colourStructure(ColourStructure::DELTA);
}
void ADDModelFFWGRVertex::doinit() {
for(int ix=1;ix<7;++ix) {
addToList(-ix,ix,22,39);
addToList(-ix,ix,23,39);
}
for(int ix=11;ix<17;++ix) {
addToList(-ix,ix,22,39);
addToList(-ix,ix,23,39);
}
// particles for outgoing W-
// quarks
for(int ix=1;ix<6;ix+=2) {
for(int iy=2;iy<7;iy+=2) {
addToList(-ix, iy, -24,39);
}
}
// leptons
for(int ix=11;ix<17;ix+=2) {
addToList(-ix, ix+1, -24,39);
}
// particles for outgoing W+
// quarks
for(int ix=2;ix<7;ix+=2) {
for(int iy=1;iy<6;iy+=2) {
addToList(-ix, iy, 24,39);
}
}
// leptons
for(int ix=11;ix<17;ix+=2) {
addToList(-ix-1, ix, 24,39);
}
FFVTVertex::doinit();
tcHwADDPtr hwADD=dynamic_ptr_cast<tcHwADDPtr>(generator()->standardModel());
if(!hwADD) throw Exception()
<< "Must have ADDModel in ADDModelFFWGRVertex::doinit()"
<< Exception::runerror;
double sw2 = sin2ThetaW();
double fact = 0.25/sqrt(sw2*(1.-sw2));
for(int ix=1;ix<4;++ix) {
charge_[2*ix-1] = hwADD->ed();
charge_[2*ix ] = hwADD->eu();
charge_[2*ix+9 ] = hwADD->ee();
charge_[2*ix+10] = hwADD->enu();
gl_[2*ix-1] = fact*(hwADD->vd() + hwADD->ad() );
gl_[2*ix ] = fact*(hwADD->vu() + hwADD->au() );
gl_[2*ix+9 ] = fact*(hwADD->ve() + hwADD->ae() );
gl_[2*ix+10] = fact*(hwADD->vnu() + hwADD->anu());
gr_[2*ix-1] = fact*(hwADD->vd() - hwADD->ad() );
gr_[2*ix ] = fact*(hwADD->vu() - hwADD->au() );
gr_[2*ix+9 ] = fact*(hwADD->ve() - hwADD->ae() );
gr_[2*ix+10] = fact*(hwADD->vnu() - hwADD->anu());
}
kappa_=2./hwADD->MPlanckBar();
r_ = sqr(hwADD->LambdaT())/hwADD->MPlanckBar();
Ptr<CKMBase>::transient_pointer CKM = generator()->standardModel()->CKM();
// cast the CKM object to the HERWIG one
ThePEG::Ptr<Herwig::StandardCKM>::transient_const_pointer
hwCKM = ThePEG::dynamic_ptr_cast< ThePEG::Ptr<Herwig::StandardCKM>::
transient_const_pointer>(CKM);
if(hwCKM) {
vector< vector<Complex > > CKM;
CKM = hwCKM->getUnsquaredMatrix(generator()->standardModel()->families());
for(unsigned int ix=0;ix<3;++ix) {
for(unsigned int iy=0;iy<3;++iy) {
ckm_[ix][iy]=CKM[ix][iy];
}
}
}
else {
throw Exception() << "Must have access to the Herwig::StandardCKM object"
<< "for the CKM matrix in SMFFWVertex::doinit()"
<< Exception::runerror;
}
}
void ADDModelFFWGRVertex::persistentOutput(PersistentOStream & os) const {
os << charge_ << gl_ << gr_ << ounit(kappa_,InvGeV) << ckm_ << ounit(r_,GeV);
}
void ADDModelFFWGRVertex::persistentInput(PersistentIStream & is, int) {
is >> charge_ >> gl_ >> gr_ >> iunit(kappa_,InvGeV) >> ckm_ >> iunit(r_,GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<ADDModelFFWGRVertex,FFVTVertex>
describeHerwigADDModelFFWGRVertex("Herwig::ADDModelFFWGRVertex", "HwADDModel.so");
void ADDModelFFWGRVertex::Init() {
static ClassDocumentation<ADDModelFFWGRVertex> documentation
("The ADDModelFFWGRVertexxs class is the implementation"
" of the two fermion vector coupling for the ADD model.");
}
void ADDModelFFWGRVertex::setCoupling(Energy2 q2,tcPDPtr aa,tcPDPtr bb,
tcPDPtr cc, tcPDPtr) {
// work out the particles
int iferm= abs(aa->id());
int ibos = abs(cc->id());
Complex coup;
// overall factor
assert( ibos >= 22 && ibos <= 24 );
if( q2last_ != q2 || couplast_ == 0. ) {
couplast_ = electroMagneticCoupling(q2);
q2last_ = q2;
}
// photon
if(ibos==22) {
// alpha
- coup = UnitRemoval::E * kappa_ * couplast_;
+ coup = Complex(UnitRemoval::E * kappa_ * couplast_);
// _charge of particle
assert((iferm>=1 && iferm<=6)||(iferm>=11 &&iferm<=16));
coup *= charge_[iferm];
left (1.);
right(1.);
}
// Z boson
else if(ibos==23) {
- coup = UnitRemoval::E * kappa_ * couplast_;
+ coup = Complex(UnitRemoval::E * kappa_ * couplast_);
// _charge of particle
assert((iferm>=1 && iferm<=6)||(iferm>=11 &&iferm<=16));
left (gl_[iferm]);
right(gr_[iferm]);
}
else if(ibos==24) {
coup = Complex(UnitRemoval::E * kappa_ * couplast_) *
sqrt(0.5) / sqrt(sin2ThetaW());
// the left and right couplings
int iferm=abs(aa->id());
int ianti=abs(bb->id());
// quarks
if(iferm>=1 && iferm <=6) {
int iu,id;
// up type first
if(iferm%2==0) {
iu = iferm/2;
id = (ianti+1)/2;
}
// down type first
else {
iu = ianti/2;
id = (iferm+1)/2;
}
assert( iu>=1 && iu<=3 && id>=1 && id<=3);
left(ckm_[iu-1][id-1]);
right(0.);
}
// leptons
else if(iferm>=11 && iferm <=16) {
left(1.);
right(0.);
}
else
assert(false);
}
// set the coupling
norm(coup);
}
Complex ADDModelFFWGRVertex::propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass, Energy width) {
if(part->id()!=ParticleID::Graviton)
return VertexBase::propagator(iopt,q2,part,mass,width);
else
return Complex(4.*Constants::pi*UnitRemoval::E2/sqr(r_));
}
diff --git a/Models/ADD/ADDModelFFWGRVertex.h b/Models/ADD/ADDModelFFWGRVertex.h
--- a/Models/ADD/ADDModelFFWGRVertex.h
+++ b/Models/ADD/ADDModelFFWGRVertex.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
//
// ADDModelFFWGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModelFFWGRVertex_H
#define HERWIG_ADDModelFFWGRVertex_H
//
// This is the declaration of the ADDModelFFWGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/FFVTVertex.h"
#include "ADDModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the fermion-antifermion-vector-graviton
* vertex for the Randell-Sundrum model
*
* @see FFVTVertex
* @see VertexBase
*/
class ADDModelFFWGRVertex: public FFVTVertex {
public:
/**
* Default constructor.
*/
ADDModelFFWGRVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3, tcPDPtr part4);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Calculate the propagator for a diagram.
* @param iopt The option for the Breit-Wigner shape
* @param q2 The scale
* @param part The ParticleData pointer for the off-shell particle.
* @param mass The mass if not to be taken from the ParticleData object
* @param width The width if not to be taken from the ParticleData object
*/
virtual Complex propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass=-GeV, Energy width=-GeV);
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModelFFWGRVertex & operator=(const ADDModelFFWGRVertex &);
+ ADDModelFFWGRVertex & operator=(const ADDModelFFWGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The charges of the Standard Model fermions.
*/
vector<double> charge_;
/**
* The left couplings of the Standard Model fermions.
*/
vector<double> gl_;
/**
* The right couplings of the Standard Model fermions.
*/
vector<double> gr_;
/**
* The elements of the CKM matrix.
*/
vector<vector<Complex> > ckm_;
/**
* The last value of the coupling/
*/
Complex couplast_;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 q2last_;
/**
* The graviton coupling.
*/
InvEnergy kappa_;
/**
* Mass ratio for the propagator
*/
Energy r_;
//@}
};
}
#endif /* HERWIG_ADDModelFFWGRVertex_H */
diff --git a/Models/ADD/ADDModelGGGGRVertex.h b/Models/ADD/ADDModelGGGGRVertex.h
--- a/Models/ADD/ADDModelGGGGRVertex.h
+++ b/Models/ADD/ADDModelGGGGRVertex.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
//
// ADDModelGGGGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModelGGGGRVertex_H
#define HERWIG_ADDModelGGGGRVertex_H
//
// This is the declaration of the ADDModelGGGGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/VVVTVertex.h"
#include "ADDModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The ADDModelGGGGRVertex class is the implementation of the
* triple vector graviton couling in the ADD model.
* It inherits from VVVTVertex and implements the setCoupling member.
*
* @see VVVTVertex
* @see VertexBase
*/
class ADDModelGGGGRVertex: public VVVTVertex {
public:
/**
* Default constructor.
*/
ADDModelGGGGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Calculate the propagator for a diagram.
* @param iopt The option for the Breit-Wigner shape
* @param q2 The scale
* @param part The ParticleData pointer for the off-shell particle.
* @param mass The mass if not to be taken from the ParticleData object
* @param width The width if not to be taken from the ParticleData object
*/
virtual Complex propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass=-GeV, Energy width=-GeV);
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModelGGGGRVertex & operator=(const ADDModelGGGGRVertex &);
+ ADDModelGGGGRVertex & operator=(const ADDModelGGGGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The graviton coupling.
*/
InvEnergy kappa_;
/**
* Mass ratio for the propagator
*/
Energy r_;
/**
* The last value of the coupling/
*/
Complex couplast_;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 q2last_;
//@}
};
}
#endif /* HERWIG_ADDModelGGGGRVertex_H */
diff --git a/Models/ADD/ADDModelSSGRVertex.h b/Models/ADD/ADDModelSSGRVertex.h
--- a/Models/ADD/ADDModelSSGRVertex.h
+++ b/Models/ADD/ADDModelSSGRVertex.h
@@ -1,125 +1,125 @@
// -*- C++ -*-
//
// ADDModelSSGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModelSSGRVertex_H
#define HERWIG_ADDModelSSGRVertex_H
//
// This is the declaration of the ADDModelSSGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/SSTVertex.h"
#include "ADDModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The ADDModelSSGRVertex class is thew implementation of the graviton
* coupling to the Higgs in the ADDModel. It inherits from the SSTVertex
* and implements the setCoupling member
*
* @see SSTVertex
* @see VertexBase
*/
class ADDModelSSGRVertex: public SSTVertex {
public:
/**
* Default constructor.
*/
ADDModelSSGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Calculate the propagator for a diagram.
* @param iopt The option for the Breit-Wigner shape
* @param q2 The scale
* @param part The ParticleData pointer for the off-shell particle.
* @param mass The mass if not to be taken from the ParticleData object
* @param width The width if not to be taken from the ParticleData object
*/
virtual Complex propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass=-GeV, Energy width=-GeV);
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModelSSGRVertex & operator=(const ADDModelSSGRVertex &);
+ ADDModelSSGRVertex & operator=(const ADDModelSSGRVertex &) = delete;
/**
* Coupling.
*/
InvEnergy kappa_;
/**
* Mass ratio for the propagator
*/
Energy r_;
};
}
#endif /* HERWIG_ADDModelSSGRVertex_H */
diff --git a/Models/ADD/ADDModelVVGRVertex.h b/Models/ADD/ADDModelVVGRVertex.h
--- a/Models/ADD/ADDModelVVGRVertex.h
+++ b/Models/ADD/ADDModelVVGRVertex.h
@@ -1,124 +1,124 @@
// -*- C++ -*-
//
// ADDModelVVGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModelVVGRVertex_H
#define HERWIG_ADDModelVVGRVertex_H
//
// This is the declaration of the ADDModelVVGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/VVTVertex.h"
#include "ADDModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vector-vector-graviton vertex for
* the ADD model
*
* @see VVTVertex
* @see VertexBase
*/
class ADDModelVVGRVertex: public VVTVertex {
public:
/**
* Default constructor.
*/
ADDModelVVGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Calculate the propagator for a diagram.
* @param iopt The option for the Breit-Wigner shape
* @param q2 The scale
* @param part The ParticleData pointer for the off-shell particle.
* @param mass The mass if not to be taken from the ParticleData object
* @param width The width if not to be taken from the ParticleData object
*/
virtual Complex propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass=-GeV, Energy width=-GeV);
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModelVVGRVertex & operator=(const ADDModelVVGRVertex &);
+ ADDModelVVGRVertex & operator=(const ADDModelVVGRVertex &) = delete;
/**
* The coupling.
*/
InvEnergy kappa_;
/**
* Mass ratio for the propagator
*/
Energy r_;
};
}
#endif /* HERWIG_ADDModelVVGRVertex_H */
diff --git a/Models/ADD/ADDModelWWWGRVertex.h b/Models/ADD/ADDModelWWWGRVertex.h
--- a/Models/ADD/ADDModelWWWGRVertex.h
+++ b/Models/ADD/ADDModelWWWGRVertex.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
//
// ADDModelWWWGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ADDModelWWWGRVertex_H
#define HERWIG_ADDModelWWWGRVertex_H
//
// This is the declaration of the ADDModelWWWGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/VVVTVertex.h"
#include "ADDModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The ADDModelWWWGRVertex class is the implementation of the
* triple vector graviton couling in the ADD model.
* It inherits from VVVTVertex and implements the setCoupling member.
*
* @see VVVTVertex
* @see VertexBase
*/
class ADDModelWWWGRVertex: public VVVTVertex {
public:
/**
* Default constructor.
*/
ADDModelWWWGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Calculate the propagator for a diagram.
* @param iopt The option for the Breit-Wigner shape
* @param q2 The scale
* @param part The ParticleData pointer for the off-shell particle.
* @param mass The mass if not to be taken from the ParticleData object
* @param width The width if not to be taken from the ParticleData object
*/
virtual Complex propagator(int iopt, Energy2 q2,tcPDPtr part,
Energy mass=-GeV, Energy width=-GeV);
private:
/**
* Private and non-existent assignment operator.
*/
- ADDModelWWWGRVertex & operator=(const ADDModelWWWGRVertex &);
+ ADDModelWWWGRVertex & operator=(const ADDModelWWWGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The graviton coupling.
*/
InvEnergy kappa_;
/**
* Mass ratio for the propagator
*/
Energy r_;
/**
* The last value of the coupling/
*/
Complex couplast_;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 q2last_;
/**
* The prefactor for the \f$Z\f$ vertex.
*/
double zfact_;
//@}
};
}
#endif /* HERWIG_ADDModelWWWGRVertex_H */
diff --git a/Models/ADD/GravitonMassGenerator.h b/Models/ADD/GravitonMassGenerator.h
--- a/Models/ADD/GravitonMassGenerator.h
+++ b/Models/ADD/GravitonMassGenerator.h
@@ -1,134 +1,134 @@
// -*- C++ -*-
#ifndef HERWIG_GravitonMassGenerator_H
#define HERWIG_GravitonMassGenerator_H
//
// This is the declaration of the GravitonMassGenerator class.
//
#include "Herwig/PDT/GenericMassGenerator.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the GravitonMassGenerator class.
*
* @see \ref GravitonMassGeneratorInterfaces "The interfaces"
* defined for GravitonMassGenerator.
*/
class GravitonMassGenerator: public GenericMassGenerator {
public:
/**
* The default constructor.
*/
GravitonMassGenerator();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Return a mass with the weight using the specified limits.
* @param part The particle data pointer of the particle.
* @param low The lower limit on the particle's mass.
* @param upp The upper limit on the particle's mass.
* @param wgt The weight for this mass.
* @param shape The type of shape to use
* @param r The random number used for the weight
* @return The mass of the particle instance.
*/
virtual Energy mass(double & wgt, const ParticleData & part,
const Energy low,const Energy upp, int shape,
double r=UseRandom::rnd()) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GravitonMassGenerator & operator=(const GravitonMassGenerator &);
+ GravitonMassGenerator & operator=(const GravitonMassGenerator &) = delete;
private:
/**
* prefactor
*/
double prefactor_;
/**
* Number of extra dimensions
*/
unsigned int delta_;
/**
* d-dimensional Planck mass
*/
Energy md_;
/**
* Minimum mass cut to avoid numerical problems
*/
Energy mMin_;
};
}
#endif /* HERWIG_GravitonMassGenerator_H */
diff --git a/Models/Feynrules/python/ufo2herwig b/Models/Feynrules/python/ufo2herwig
--- a/Models/Feynrules/python/ufo2herwig
+++ b/Models/Feynrules/python/ufo2herwig
@@ -1,437 +1,451 @@
#! /usr/bin/env python
from __future__ import division
import os, sys, pprint, argparse, re,copy
from string import strip, Template
# add path to the ufo conversion modules
modulepath = os.path.join("@PKGLIBDIR@",'python')
sys.path.append(modulepath)
from ufo2peg import *
# set up the option parser for command line input
parser = argparse.ArgumentParser(
description='Create Herwig model files from Feynrules UFO input.'
)
parser.add_argument(
'ufodir',
metavar='UFO_directory',
help='the UFO model directory'
)
parser.add_argument(
'-v', '--verbose',
action="store_true",
help="print verbose output"
)
parser.add_argument(
'-n','--name',
default="FRModel",
help="set custom nametag for the model"
)
parser.add_argument(
'--ignore-skipped',
action="store_true",
help="ignore skipped vertices and produce output anyway"
)
parser.add_argument(
'--split-model',
action="store_true",
help="Split the model file into pieces to improve compilation for models with many parameters"
)
parser.add_argument(
'--no-generic-loop-vertices',
action="store_true",
help="Don't include the automatically generated generic loop vertices for h->gg and h->gamma gamma"
)
parser.add_argument(
'--include-generic',
action="store_true",
help="Include support for generic spin structures (still experimental)"
)
parser.add_argument(
'--use-generic-for-tensors',
action="store_true",
help="Use the generic machinery for all tensor vertices (debugging only)"
)
parser.add_argument(
'--forbidden-particle-name',
action="append",
default=["eta","phi"],
help="Add particle names not allowed as names in UFO models to avoid conflicts with"+\
"Herwig internal particles, names will have _UFO appended"
)
# get the arguments
args = parser.parse_args()
# import the model
import imp
path,mod = os.path.split(os.path.abspath(args.ufodir))
FR = imp.load_module(mod,*imp.find_module(mod,[path]))
##################################################
##################################################
# get the Model name from the arguments
modelname = args.name
libname = modelname + '.so'
# define arrays and variables
#allplist = ""
parmdecls = []
parmgetters = []
parmconstr = []
doinit = []
paramstoreplace_ = []
paramstoreplace_expressions_ = []
# get external parameters for printing
parmsubs = dict( [ (p.name, p.value)
for p in FR.all_parameters
if p.nature == 'external' ] )
# evaluate python cmath
def evaluate(x):
import cmath
return eval(x,
{'cmath':cmath,
- 'complexconjugate':FR.function_library.complexconjugate},
+ 'complexconjugate':FR.function_library.complexconjugate,
+ 'im':FR.function_library.im,
+ 're':FR.function_library.re},
parmsubs)
## get internal params into arrays
internal = ( p for p in FR.all_parameters
if p.nature == 'internal' )
#paramstoreplaceEW_ = []
#paramstoreplaceEW_expressions_ = []
# calculate internal parameters
for p in internal:
parmsubs.update( { p.name : evaluate(p.value) } )
# if 'aS' in p.value and p.name != 'aS':
# paramstoreplace_.append(p.name)
# paramstoreplace_expressions_.append(p.value)
# if 'aEWM1' in p.value and p.name != 'aEWM1':
# paramstoreplaceEW_.append(p.name)
# paramstoreplaceEW_expressions_.append(p.value)
parmvalues=copy.copy(parmsubs)
# more arrays used for substitution in templates
paramsforstream = []
parmmodelconstr = []
# loop over parameters and fill in template stuff according to internal/external and complex/real
# WARNING: Complex external parameter input not tested!
if args.verbose:
print 'verbose mode on: printing all parameters'
print '-'*60
paramsstuff = ('name', 'expression', 'default value', 'nature')
pprint.pprint(paramsstuff)
interfacedecl_T = """\
static Parameter<{modelname}, {type}> interface{pname}
("{pname}",
"The interface for parameter {pname}",
&{modelname}::{pname}_, {value}, 0, 0,
false, false, Interface::nolimits);
"""
# sort out the couplings
couplingDefns = { "QED" : 99, "QCD" : 99 }
try :
for coupling in FR.all_orders:
name = coupling.name.upper()
couplingDefns[name]= coupling.expansion_order
except:
for coupling in FR.all_couplings:
for name,value in coupling.order.iteritems():
if(name not in couplingDefns) :
couplingDefns[name]=99
# sort out the particles
massnames = {}
widthnames = {}
for particle in FR.all_particles:
# skip ghosts and goldstones
if(isGhost(particle) or isGoldstone(particle)) :
continue
- if particle.mass != 'ZERO':
- massnames[particle.mass] = abs(particle.pdg_code)
+ if particle.mass != 'ZERO' and particle.mass.name != 'ZERO':
+ if(particle.mass in massnames) :
+ if(abs(particle.pdg_code) not in massnames[particle.mass]) :
+ massnames[particle.mass].append(abs(particle.pdg_code))
+ else :
+ massnames[particle.mass] = [abs(particle.pdg_code)]
- if particle.width != 'ZERO':
- widthnames[particle.width] = abs(particle.pdg_code)
+ if particle.width != 'ZERO' and particle.width.name != 'ZERO':
+ if(particle.width in widthnames) :
+ if(abs(particle.pdg_code) not in widthnames[particle.width]) :
+ widthnames[particle.width].append(abs(particle.pdg_code))
+ else :
+ widthnames[particle.width] = [abs(particle.pdg_code)]
interfaceDecls = []
modelparameters = {}
for p in FR.all_parameters:
value = parmsubs[p.name]
if p.type == 'real':
assert( value.imag < 1.0e-16 )
value = value.real
if p.nature == 'external':
if p not in massnames and p not in widthnames:
interfaceDecls.append(
interfacedecl_T.format(modelname=modelname,
pname=p.name,
value=value,
type=typemap(p.type))
)
else:
interfaceDecls.append('\n// no interface for %s. Use particle definition instead.\n' % p.name)
if hasattr(p,'lhablock'):
lhalabel = '{lhablock}_{lhacode}'.format( lhablock=p.lhablock.upper(), lhacode='_'.join(map(str,p.lhacode)) )
if p not in massnames and p not in widthnames:
parmmodelconstr.append('set %s:%s ${%s}' % (modelname, p.name, lhalabel))
else:
parmmodelconstr.append('# %s is taken from the particle setup' % p.name)
modelparameters[lhalabel] = value
parmsubs[p.name] = lhalabel
else:
if p not in massnames and p not in widthnames:
parmmodelconstr.append('set %s:%s %s' % (modelname, p.name, value))
else:
parmmodelconstr.append('# %s is taken from the particle setup' % p.name)
parmsubs[p.name] = value
if p not in massnames and p not in widthnames:
parmconstr.append('%s_(%s)' % (p.name, value))
else:
parmconstr.append('%s_()' % p.name)
else :
parmconstr.append('%s_()' % p.name)
parmsubs[p.name] = value
elif p.type == 'complex':
value = complex(value)
if p.nature == 'external':
#
# TODO: WE DO NOT HAVE COMPLEX INTERFACES IN THEPEG (yet?)
#
# interfaceDecls.append(
# interfacedecl_T.format(modelname=modelname,
# pname=p.name,
# value='Complex(%s,%s)'%(value.real,value.imag),
# type=typemap(p.type))
# )
#
# parmmodelconstr.append('set %s:%s (%s,%s)' % (modelname, p.name, value.real, value.imag))
parmconstr.append('%s_(%s,%s)' % (p.name, value.real, value.imag))
else :
parmconstr.append('%s_(%s,%s)' % (p.name, 0.,0.))
parmsubs[p.name] = value
else:
raise Exception('Unknown data type "%s".' % p.type)
parmdecls.append(' %s %s_;' % (typemap(p.type), p.name))
parmgetters.append(' %s %s() const { return %s_; }' % (typemap(p.type),p.name, p.name))
paramsforstream.append('%s_' % p.name)
expression, symbols = 'return %s_' % p.name, None
if p.nature != 'external':
expression, symbols = py2cpp(p.value)
text = add_brackets(expression, symbols)
text=text.replace('()()','()')
doinit.append(' %s_ = %s;' % (p.name, text) )
if p in massnames:
- doinit.append(' resetMass(%s,%s_ * GeV);' % (massnames[p], p.name) )
- elif p in widthnames:
- doinit.append(' getParticleData(%s)->width(%s_ * GeV);' % (widthnames[p], p.name) )
- doinit.append(' getParticleData(%s)->cTau (%s_ == 0.0 ? Length() : hbarc/(%s_*GeV));' % (widthnames[p], p.name, p.name) )
- doinit.append(' getParticleData(%s)->widthCut(10. * %s_ * GeV);' % (widthnames[p], p.name) )
+ for idCode in massnames[p] :
+ doinit.append(' resetMass(%s,%s_ * GeV);' % (idCode, p.name) )
+ if p in widthnames:
+ for idCode in widthnames[p] :
+ doinit.append(' getParticleData(%s)->width(%s_ * GeV);' % (idCode, p.name) )
+ doinit.append(' getParticleData(%s)->cTau (%s_ == 0.0 ? Length() : hbarc/(%s_*GeV));' % (idCode, p.name, p.name) )
+ doinit.append(' getParticleData(%s)->widthCut(10. * %s_ * GeV);' % (idCode, p.name) )
elif p.nature == 'external':
if p in massnames:
- doinit.append(' %s_ = getParticleData(%s)->mass() / GeV;' % (p.name, massnames[p]) )
- elif p in widthnames:
- doinit.append(' %s_ = getParticleData(%s)->width() / GeV;' % (p.name, widthnames[p]) )
+ for idCode in massnames[p] :
+ doinit.append(' %s_ = getParticleData(%s)->mass() / GeV;' % (p.name, idCode) )
+ if p in widthnames:
+ for idCode in widthnames[p] :
+ doinit.append(' %s_ = getParticleData(%s)->width() / GeV;' % (p.name, idCode) )
if args.verbose:
pprint.pprint((p.name,p.value, value, p.nature))
pcwriter = ParamCardWriter(FR.all_parameters)
paramcard_output = '\n'.join(pcwriter.output)
### special treatment
# if p.name == 'aS':
# expression = '0.25 * sqr(strongCoupling(q2)) / Constants::pi'
# elif p.name == 'aEWM1':
# expression = '4.0 * Constants::pi / sqr(electroMagneticCoupling(q2))'
# elif p.name == 'Gf':
# expression = 'generator()->standardModel()->fermiConstant() * GeV2'
paramconstructor=': '
for ncount in range(0,len(parmconstr)) :
paramconstructor += parmconstr[ncount]
if(ncount != len(parmconstr) -1) :
paramconstructor += ','
if(ncount%5 == 0 ) :
paramconstructor += "\n"
paramout=""
paramin =""
for ncount in range(0,len(paramsforstream)) :
if(ncount !=0 ) :
paramout += "<< " + paramsforstream[ncount]
paramin += ">> " + paramsforstream[ncount]
else :
paramout += paramsforstream[ncount]
paramin += paramsforstream[ncount]
if(ncount%5 == 0 ) :
paramout += "\n"
paramin += "\n"
parmtextsubs = { 'parmgetters' : '\n'.join(parmgetters),
'parmdecls' : '\n'.join(parmdecls),
'parmconstr' : paramconstructor,
'getters' : '',
'decls' : '',
'addVertex' : '',
'doinit' : '\n'.join(doinit),
'ostream' : paramout,
'istream' : paramin ,
'refs' : '',
'parmextinter': ''.join(interfaceDecls),
'ModelName': modelname,
'calcfunctions': '',
'param_card_data': paramcard_output
}
##################################################
##################################################
##################################################
# set up the conversion of the vertices
vertexConverter = VertexConverter(FR,parmvalues,couplingDefns)
vertexConverter.readArgs(args)
# convert the vertices
vertexConverter.convert()
cdefs=""
couplingOrders=""
ncount=2
for name,value in couplingDefns.iteritems() :
if(name=="QED") :
couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" %(name,1,value)
elif (name=="QCD") :
couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" %(name,2,value)
else :
ncount+=1
cdefs +=" const T %s = %s;\n" % (name,ncount)
couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" % (name,ncount,value)
# coupling definitions
couplingTemplate= """\
namespace ThePEG {{
namespace Helicity {{
namespace CouplingType {{
typedef unsigned T;
/**
* Enums for couplings
*/
{coup}
}}
}}
}}
"""
if(cdefs!="") :
cdefs = couplingTemplate.format(coup=cdefs)
parmtextsubs['couplings'] = cdefs
parmtextsubs['couplingOrders'] = couplingOrders
# particles
plist, names = thepeg_particles(FR,parmsubs,modelname,modelparameters,args.forbidden_particle_name)
particlelist = [
"# insert HPConstructor:Outgoing 0 /Herwig/{n}/Particles/{p}".format(n=modelname,p=p)
for p in names
]
# make the first one active to have something runnable in the example .in file
particlelist[0] = particlelist[0][2:]
particlelist = '\n'.join(particlelist)
modelfilesubs = { 'plist' : plist,
'vlist' : vertexConverter.get_vertices(libname),
'setcouplings': '\n'.join(parmmodelconstr),
'ModelName': modelname
}
# write the files from templates according to the above subs
if vertexConverter.should_print():
MODEL_HWIN = getTemplate('LHC-FR.in')
if(not args.split_model) :
MODEL_CC = [getTemplate('Model.cc')]
else :
MODEL_EXTRA_CC=getTemplate('Model6.cc')
extra_names=[]
extra_calcs=[]
parmtextsubs['doinit']=""
for i in range(0,len(doinit)) :
if( i%20 == 0 ) :
function_name = "initCalc" +str(int(i/20))
parmtextsubs['doinit'] += function_name +"();\n"
parmtextsubs['calcfunctions'] += "void " + function_name + "();\n"
extra_names.append(function_name)
extra_calcs.append("")
extra_calcs[-1] += doinit[i] + "\n"
for i in range(0,len(extra_names)) :
ccname = '%s_extra_%s.cc' % (modelname,i)
writeFile( ccname, MODEL_EXTRA_CC.substitute({'ModelName' : modelname,
'functionName' : extra_names[i],
'functionCalcs' : extra_calcs[i] }) )
MODEL_CC = [getTemplate('Model1.cc'),getTemplate('Model2.cc'),getTemplate('Model3.cc'),
getTemplate('Model4.cc'),getTemplate('Model5.cc')]
MODEL_H = getTemplate('Model.h')
print 'LENGTH',len(MODEL_CC)
MODELINFILE = getTemplate('FR.model')
writeFile( 'LHC-%s.in' % modelname,
MODEL_HWIN.substitute({ 'ModelName' : modelname,
'Particles' : particlelist })
)
modeltemplate = Template( MODELINFILE.substitute(modelfilesubs) )
writeFile( '%s.h' % modelname, MODEL_H.substitute(parmtextsubs) )
for i in range(0,len(MODEL_CC)) :
if(len(MODEL_CC)==1) :
ccname = '%s.cc' % modelname
else :
ccname = '%s.cc' % (modelname + str(i))
writeFile( ccname, MODEL_CC[i].substitute(parmtextsubs) )
writeFile( modelname +'.template', modeltemplate.template )
writeFile( modelname +'.model', modeltemplate.substitute( modelparameters ) )
# copy the Makefile-FR to current directory,
# replace with the modelname for compilation
with open(os.path.join(modulepath,'Makefile-FR'),'r') as orig:
with open('Makefile','w') as dest:
dest.write(orig.read().replace("FeynrulesModel.so", libname))
print 'finished generating model:\t', modelname
print 'model directory:\t\t', args.ufodir
print 'generated:\t\t\t', len(FR.all_vertices), 'vertices'
print '='*60
print 'library:\t\t\t', libname
print 'input file:\t\t\t', 'LHC-' + modelname +'.in'
print 'model file:\t\t\t', modelname +'.model'
print '='*60
print """\
To complete the installation, compile by typing "make".
An example input file is provided as LHC-FRModel.in,
you'll need to change the required particles in there.
"""
print 'DONE!'
print '='*60
diff --git a/Models/Feynrules/python/ufo2peg/check_lorentz.py b/Models/Feynrules/python/ufo2peg/check_lorentz.py
--- a/Models/Feynrules/python/ufo2peg/check_lorentz.py
+++ b/Models/Feynrules/python/ufo2peg/check_lorentz.py
@@ -1,864 +1,868 @@
import itertools,cmath,re
from .helpers import SkipThisVertex,extractAntiSymmetricIndices
from .converter import py2cpp
from .lorentzparser import parse_lorentz
import string,re
def compare(a,b) :
num=abs(a-b)
den=abs(a+b)
if(den == 0. and 1e-10) :
return True
return num/den<1e-10
def evaluate(x,model,parmsubs):
import cmath
return eval(x,
{'cmath':cmath,
'complexconjugate':model.function_library.complexconjugate},
parmsubs)
# ordering for EW VVV vertices (ordering not an issue as all same spin)
def VVVordering(vertex) :
pattern = "if((p1->id()==%s&&p2->id()==%s&&p3->id()==%s)"+\
"||(p1->id()==%s&&p2->id()==%s&&p3->id()==%s)||"+\
"(p1->id()==%s&&p2->id()==%s&&p3->id()==%s)) {norm(-norm());}"
ordering = pattern%(vertex.particles[1].pdg_code,
vertex.particles[0].pdg_code,
vertex.particles[2].pdg_code,
vertex.particles[0].pdg_code,
vertex.particles[2].pdg_code,
vertex.particles[1].pdg_code,
vertex.particles[2].pdg_code,
vertex.particles[1].pdg_code,
vertex.particles[0].pdg_code)
return ordering
def tensorCouplings(vertex,value,prefactors,L,lorentztag,pos,all_couplings,order) :
# split the structure into its different terms for analysis
ordering=""
structures = extractStructures(L)
if(lorentztag == 'SST') :
terms=[['P(1003,2)','P(2003,1)'],
['P(1003,1)','P(2003,2)'],
['P(-1,1)','P(-1,2)','Metric(1003,2003)'],
['Metric(1003,2003)']]
signs=[1.,1.,-1.,-1.]
new_couplings=[False]*len(terms)
elif(lorentztag == 'FFT' ) :
terms=[['P(2003,1)','Gamma(1003,2,1)'],
['P(2003,2)','Gamma(1003,2,1)'],
['P(1003,1)','Gamma(2003,2,1)'],
['P(1003,2)','Gamma(2003,2,1)'],
['P(-1,1)','Gamma(-1,2,1)','Metric(1003,2003)'],
['P(-1,2)','Gamma(-1,2,1)','Metric(1003,2003)'],
['Metric(1003,2003)']]
signs=[1.,-1.,1.,-1.,-0.5,0.5,1.]
new_couplings=[False]*3*len(terms)
elif(lorentztag == 'VVT' ) :
terms=[['P(-1,1)','P(-1,2)','Metric(1,2003)','Metric(2,1003)'], # from C term
['P(-1,1)','P(-1,2)','Metric(1,1003)','Metric(2,2003)'], # from C term
['P(-1,1)','P(-1,2)','Metric(1,2)','Metric(1003,2003)'], # from C term
['P(1,2)','P(2,1)','Metric(1003,2003)'], # from D term (sym)
['P(1,2)','P(2003,1)','Metric(2,1003)'], # 1st term
['P(1,2)','P(1003,1)','Metric(2,2003)'], # 1st swap
['P(2,1)','P(2003,2)','Metric(1,1003)'], # 2nd term
['P(2,1)','P(1003,2)','Metric(1,2003)'], # 2nd swap
['P(1003,2)','P(2003,1)','Metric(1,2)'], # 3rd term
['P(1003,1)','P(2003,2)','Metric(1,2)'], # 3rd swap
['Metric(1,2003)','Metric(2,1003)'], # from mass term
['Metric(1,1003)','Metric(2,2003)'], # from mass term
['Metric(1,2)','Metric(1003,2003)'], # from mass term
['P(1,1)','P(2,1)','Metric(1003,2003)'], # gauge terms
['P(1,2)','P(2,2)','Metric(1003,2003)'], # gauge terms
['P(1,1)','P(2,2)','Metric(1003,2003)'], # gauge terms
['P(1003,1)','P(1,1)','Metric(2,2003)'], # gauge terms
['P(1003,2)','P(2,2)','Metric(1,2003)'], # gauge terms
['P(2003,1)','P(1,1)','Metric(2,1003)'], # gauge terms
['P(2003,2)','P(2,2)','Metric(1,1003)'], # gauge terms
]
signs=[1.,1.,-1.,1.,-1.,-1.,-1.,-1.,1.,1.,1.,1.,-1.,1.,1.,0.25,-1.,-1.,-1.,-1.]
new_couplings=[False]*len(terms)
elif(lorentztag == 'FFVT' ) :
terms = [['Gamma(2004,2,1)','Metric(3,1004)'],
['Gamma(1004,2,1)','Metric(3,2004)'],
['Gamma(3,2,1)','Metric(1004,2004)'],
['Gamma(2004,2,-1)','Metric(3,1004)'],
['Gamma(1004,2,-1)','Metric(3,2004)'],
['Gamma(3,2,-1)','Metric(1004,2004)']]
signs=[1.,1.,-0.5,1.,1.,-0.5]
new_couplings=[False]*3*len(terms)
elif(lorentztag == 'VVVT' ) :
# the F(mu nu,rho sigma lambda) terms first
terms = [['P(2004,2)','Metric(1,1004)','Metric(2,3)'],['P(2004,3)','Metric(1,1004)','Metric(2,3)'],
['P(1004,2)','Metric(1,2004)','Metric(2,3)'],['P(1004,3)','Metric(1,2004)','Metric(2,3)'],
['P(2004,3)','Metric(1,3)','Metric(2,1004)'],['P(2004,1)','Metric(1,3)','Metric(2,1004)'],
['P(1004,3)','Metric(1,3)','Metric(2,2004)'],['P(1004,1)','Metric(1,3)','Metric(2,2004)'],
['P(2004,1)','Metric(1,2)','Metric(3,1004)'],['P(2004,2)','Metric(1,2)','Metric(3,1004)'],
['P(1004,1)','Metric(1,2)','Metric(3,2004)'],['P(1004,2)','Metric(1,2)','Metric(3,2004)'],
['P(3,1)','Metric(1,2004)','Metric(2,1004)'],['P(3,2)','Metric(1,2004)','Metric(2,1004)'],
['P(3,1)','Metric(1,1004)','Metric(2,2004)'],['P(3,2)','Metric(1,1004)','Metric(2,2004)'],
['P(3,1)','Metric(1,2)','Metric(1004,2004)'],['P(3,2)','Metric(1,2)','Metric(1004,2004)'],
['P(2,3)','Metric(1,2004)','Metric(3,1004)'],['P(2,1)','Metric(1,2004)','Metric(3,1004)'],
['P(2,3)','Metric(1,1004)','Metric(3,2004)'],['P(2,1)','Metric(1,1004)','Metric(3,2004)'],
['P(2,3)','Metric(1,3)','Metric(1004,2004)'],['P(2,1)','Metric(1,3)','Metric(1004,2004)'],
['P(1,2)','Metric(2,2004)','Metric(3,1004)'],['P(1,3)','Metric(2,2004)','Metric(3,1004)'],
['P(1,2)','Metric(2,1004)','Metric(3,2004)'],['P(1,3)','Metric(2,1004)','Metric(3,2004)'],
['P(1,2)','Metric(2,3)','Metric(1004,2004)'],['P(1,3)','Metric(2,3)','Metric(1004,2004)']]
signs = [1.,-1.,1.,-1.,1.,-1.,1.,-1.,1.,-1.,1.,-1.,
1.,-1.,1.,-1.,-1.,1.,1.,-1.,1.,-1.,-1.,1.,1.,-1.,1.,-1.,-1.,1.]
new_couplings=[False]*len(terms)
l = lambda c: len(pos[c])
if l(8)!=3 :
ordering = VVVordering(vertex)
# unknown
else :
raise Exception('Unknown data type "%s".' % lorentztag)
iterm=0
try :
for term in terms:
for perm in itertools.permutations(term):
label = '*'.join(perm)
for istruct in range(0,len(structures)) :
if label in structures[istruct] :
reminder = structures[istruct].replace(label,'1.',1)
loc=iterm
if(reminder.find("ProjM")>=0) :
reminder=re.sub("\*ProjM\(.*,.\)","",reminder)
loc+=len(terms)
elif(reminder.find("ProjP")>=0) :
reminder=re.sub("\*ProjP\(.*,.\)","",reminder)
loc+=2*len(terms)
structures[istruct] = "Done"
val = eval(reminder, {'cmath':cmath} )*signs[iterm]
if(new_couplings[loc]) :
new_couplings[loc] += val
else :
new_couplings[loc] = val
iterm+=1
except :
SkipThisVertex()
# check we've handled all the terms
for val in structures:
if(val!="Done") :
raise SkipThisVertex()
# special for FFVT
if(lorentztag=="FFVT") :
t_couplings=new_couplings
new_couplings=[False]*9
for i in range(0,9) :
j = i+3*(i/3)
k = i+3+3*(i/3)
if( not t_couplings[j]) :
new_couplings[i] = t_couplings[k]
else :
new_couplings[i] = t_couplings[j]
# set the couplings
for icoup in range(0,len(new_couplings)) :
if(new_couplings[icoup]) :
new_couplings[icoup] = '(%s) * (%s) *(%s)' % (new_couplings[icoup],prefactors,value)
if(len(all_couplings)==0) :
all_couplings=new_couplings
else :
for icoup in range(0,len(new_couplings)) :
if(new_couplings[icoup] and all_couplings[icoup]) :
all_couplings[icoup] = '(%s) + (%s) ' % (new_couplings[icoup],all_couplings[icoup])
elif(new_couplings[icoup]) :
all_couplings[icoup] = new_couplings[icoup]
# return the results
return (ordering,all_couplings)
def processTensorCouplings(lorentztag,vertex,model,parmsubs,all_couplings,order) :
# check for fermion vertices (i.e. has L/R couplings)
fermions = "FF" in lorentztag
# test and process the values of the couplings
- tval = [False]*3
- value = [False]*3
+ tval = ["Unknown"]*3
+ value = ["Unknown"]*3
# loop over the colours
for icolor in range(0,len(all_couplings)) :
lmax = len(all_couplings[icolor])
if(fermions) : lmax /=3
# loop over the different terms
for ix in range(0,lmax) :
test = [False]*3
+ imax=3
# normal case
if( not fermions ) :
test[0] = all_couplings[icolor][ix]
+ imax=1
else :
# first case vector but no L/R couplings
if( not all_couplings[icolor][lmax+ix] and
not all_couplings[icolor][2*lmax+ix] ) :
test[0] = all_couplings[icolor][ix]
+ imax=1
# special for mass terms and massless particles
if(not all_couplings[icolor][ix]) :
code = abs(vertex.particles[order[0]-1].pdg_code)
- if(ix==6 and code ==12 or code ==14 or code==16) :
+ if(ix==6 and (code ==12 or code ==14 or code==16) ) :
continue
else :
raise SkipThisVertex()
# second case L/R couplings
elif( not all_couplings[icolor][ix] ) :
# L=R, replace with vector
if(all_couplings[icolor][lmax+ix] ==
all_couplings[icolor][2*lmax+ix]) :
test[0] = all_couplings[icolor][lmax+ix]
else :
test[1] = all_couplings[icolor][lmax+ix]
test[2] = all_couplings[icolor][2*lmax+ix]
else :
raise SkipThisVertex()
# special handling of mass terms
# scalar divide by m**2
if((ix==3 and lorentztag=="SST") or
( ix>=10 and ix<=12 and lorentztag=="VVT" )) :
for i in range(0,len(test)) :
if(test[i]) :
test[i] = '(%s)/%s**2' % (test[i],vertex.particles[order[0]-1].mass.value)
# fermions divide by 4*m
elif(ix==6 and lorentztag=="FFT" and
float(vertex.particles[order[0]-1].mass.value) != 0. ) :
for i in range(0,len(test)) :
if(test[i]) :
test[i] = '-(%s)/%s/4' % (test[i],vertex.particles[order[0]-1].mass.value)
# set values on first pass
- if(not tval[0] and not tval[1] and not tval[2]) :
+ if((tval[0]=="Unknown" and fermions ) or
+ (not fermions and tval[0]=="Unknown" and tval[1]=="Unknown" and tval[2]=="Unknown")) :
value = test
for i in range(0,len(test)) :
if(test[i]) : tval[i] = evaluate(test[i],model,parmsubs)
else :
- for i in range(0,len(test)) :
+ for i in range(0,imax) :
if(not test[i] and not tval[i]) :
continue
- if(not test[i] or not tval[i]) :
+ # special for vector gauge terms
+ if(lorentztag=="VVT" and ix>=13) :
+ continue
+ if(not test[i] or tval[i]=="Unknown") :
# special for mass terms and vectors
if(lorentztag=="VVT" and ix >=10 and ix <=12 and
float(vertex.particles[order[0]-1].mass.value) == 0. ) :
continue
- # special for vector gauge terms
- if(lorentztag=="VVT" and ix>=13) :
- continue
raise SkipThisVertex()
tval2 = evaluate(test[i],model,parmsubs)
if(abs(tval[i]-tval2)>1e-6) :
# special for fermion mass term if fermions massless
if(lorentztag=="FFT" and ix ==6 and tval2 == 0. and
float(vertex.particles[order[0]-1].mass.value) == 0. ) :
continue
raise SkipThisVertex()
# simple clean up
for i in range(0,len(value)):
if(value[i]) :
value[i] = value[i].replace("(1.0) * ","").replace(" * (1)","")
# put everything together
coup_left = 0.
coup_right = 0.
coup_norm = 0.
if(lorentztag == "SST" or lorentztag == "VVT" or
lorentztag == "VVVT" or lorentztag == "FFT" ) :
coup_norm = value[0]
if(value[1] or value[2]) :
raise SkipThisVertex()
elif(lorentztag=="FFVT") :
if(not value[1] and not value[2]) :
coup_norm = value[0]
coup_left = "1."
coup_right = "1."
elif(not value[0]) :
coup_norm = "1."
if(value[1] and value[2]) :
coup_left = value[1]
coup_right = value[2]
elif(value[1]) :
coup_left = value[1]
coup_right = "0."
elif(value[2]) :
coup_left = "0."
coup_right = value[2]
else :
raise SkipThisVertex()
else :
raise SkipThisVertex()
else :
raise SkipThisVertex()
# return the answer
return (coup_left,coup_right,coup_norm)
def extractStructures(L) :
structure1 = L.structure.split()
structures =[]
sign=''
for struct in structure1 :
if(struct=='+') :
continue
elif(struct=='-') :
sign='-'
else :
structures.append(sign+struct.strip())
sign=''
return structures
def changeSign(sign1,sign2) :
if((sign1=="+" and sign2=="+") or\
(sign1=="-" and sign2=="-")) :
return "+"
else :
return "-"
def epsilonOrder(eps) :
terms,sign = extractAntiSymmetricIndices(eps,"Epsilon(")
return (sign,"Epsilon(%s,%s,%s,%s)" % (terms[0],terms[1],terms[2],terms[3]))
def VVSEpsilon(couplings,struct) :
if(struct.find("Epsilon")<0) :
return
fact=""
sign="+"
if(struct[-1]==")") :
fact=struct.split("(")[0]
if(fact.find("Epsilon")>=0) :
fact=""
else :
struct=struct.split("(",1)[1][:-1]
if(fact[0]=="-") :
sign="-"
fact=fact[1:]
split = struct.split("*")
# find the epsilon
eps=""
for piece in split :
if(piece.find("Epsilon")>=0) :
eps=piece
split.remove(piece)
break
# and any prefactors
for piece in split :
if(piece.find("P(")<0) :
split.remove(piece)
if(piece[0]=="+" or piece[0]=="-") :
sign=changeSign(sign,piece[0])
piece=piece[1:]
if(fact=="") :
fact=piece
else :
fact = "( %s ) * ( %s )" % (fact , piece)
# now sort out the momenta
for piece in split :
terms=piece.split(",")
terms[0]=terms[0].strip("P(")
terms[1]=terms[1].strip(")")
eps=eps.replace(terms[0],"P%s"%terms[1])
(nsign,eps)=epsilonOrder(eps)
if(nsign>0) : sign=changeSign(sign,"-")
if(fact=="") : fact="1."
if(eps!="Epsilon(1,2,P1,P2)") :
return
if(couplings[6]==0.) :
couplings[6] = "( %s%s )" % (sign,fact)
else :
couplings[6] = "( %s ) + ( %s%s )" % (couplings[6],sign,fact)
def scalarVectorCouplings(value,prefactors,L,lorentztag,all_couplings,order) :
# set up the types of term we are looking for
if(lorentztag=="VVS") :
couplings=[0.,0.,0.,0.,0.,0.,0.]
terms=[['P(-1,%s)' % order[0],
'P(-1,%s)' % order[1],
'Metric(%s,%s)' %(order[0],order[1])],
['P(1,%s)' % order[0],
'P(2,%s)' % order[0]],
['P(1,%s)' % order[0],
'P(2,%s)' % order[1]],
['P(1,%s)' % order[1],
'P(2,%s)' % order[0]],
['P(1,%s)' % order[1],
'P(2,%s)' % order[1]],
['Metric(%s,%s)'%(order[0],order[1])]]
elif(lorentztag=="VVSS") :
couplings=[0.]
terms=[['Metric(%s,%s)' % (order[0],order[1])]]
elif(lorentztag=="VSS"):
couplings=[0.,0.]
terms=[['P(%s,%s)' % (order[0],order[2])],
['P(%s,%s)' % (order[0],order[1])]]
# extract the lorentz structures
structures = extractStructures(L)
# handle the scalar couplings
itype=-1
try :
for term in terms:
itype+=1
for perm in itertools.permutations(term):
label = '*'.join(perm)
for istruct in range(0,len(structures)) :
if label in structures[istruct] :
reminder = structures[istruct].replace(label,'1.',1)
couplings[itype]+=eval(reminder, {'cmath':cmath} )
structures[istruct]='Done'
except :
raise SkipThisVertex()
# special for VVS and epsilon
# handle the pseudoscalar couplings
for struct in structures :
if(struct != "Done" ) :
if(lorentztag=="VVS") :
VVSEpsilon(couplings,struct)
else :
raise SkipThisVertex()
# put it all together
if(len(all_couplings)==0) :
for ic in range(0,len(couplings)) :
if(couplings[ic]!=0.) :
all_couplings.append('(%s) * (%s) * (%s)' % (prefactors,value,couplings[ic]))
else :
all_couplings.append(False)
else :
for ic in range(0,len(couplings)) :
if(couplings[ic]!=0. and all_couplings[ic]) :
all_couplings[ic] = '(%s) * (%s) * (%s) + (%s) ' % (prefactors,value,
couplings[ic],all_couplings[ic])
elif(couplings[ic]!=0) :
all_couplings[ic] = '(%s) * (%s) * (%s) ' % (prefactors,value,couplings[ic])
return all_couplings
def processScalarVectorCouplings(lorentztag,vertex,model,parmsubs,all_couplings,header,order) :
# check the values
tval = [False]*len(all_couplings[0])
value =[False]*len(all_couplings[0])
for icolor in range(0,len(all_couplings)) :
for ix in range(0,len(all_couplings[icolor])) :
if(not value[ix]) :
value[ix] = all_couplings[icolor][ix]
if(value[ix] and not tval[ix]) :
tval[ix] = evaluate(value[ix],model,parmsubs)
elif(value[ix]) :
tval2 = evaluate(all_couplings[icolor][0],model,parmsubs)
if(abs(tval[ix]-tval2)>1e-6) :
raise SkipThisVertex()
append = ""
symbols = set()
coup_norm=0.
if(lorentztag=="VVS") :
if(not value[0] and not value[1] and not value[2] and \
not value[3] and not value[4] and not value[6] and value[5]) :
coup_norm=value[5]
else :
for ix in range(0,len(value)) :
if(value[ix]) :
value[ix], sym = py2cpp(value[ix])
symbols |= sym
else :
value[ix]=0.
lorentztag = 'GeneralVVS'
header="kinematics(true);"
# g_mu,nv piece of coupling
if(value[5]!=0.) :
append +='a00( %s + Complex(( %s )* GeV2/invariant(1,2)));\n' % ( value[0],value[5])
else :
append +='a00( %s );\n' % value[0]
# other couplings
append += 'a11( %s );\n a12( %s );\n a21( %s );\n a22( %s );\n aEp( %s );\n' % \
( value[1],value[2],value[3],value[4],value[6] )
coup_norm="1."
elif(lorentztag=="VVSS") :
coup_norm = value[0]
elif(lorentztag=="VSS") :
if(abs(tval[0]+tval[1])>1e-6) :
for ix in range(0,len(value)) :
if(value[ix]) :
value[ix], sym = py2cpp(value[ix])
symbols |= sym
else :
value[ix]=0.
coup_norm = "1."
append = 'if(p2->id()==%s) { a( %s ); b( %s);}\n else { a( %s ); b( %s);}' \
% (vertex.particles[order[1]-1].pdg_code,
value[0],value[1],value[1],value[0])
else :
coup_norm = value[1]
append = 'if(p2->id()!=%s){norm(-norm());}' \
% vertex.particles[order[1]-1].pdg_code
# return the answer
return (coup_norm,append,lorentztag,header,symbols)
def getIndices(term) :
if(term[0:2]=="P(") :
indices = term.strip(")").strip("P(").split(",")
mom = int(indices[1])
index = int(indices[0])
return (True,mom,index)
else :
return (False,0,0)
def lorentzScalar(vertex,L) :
dotProduct = """(invariant( i[{i1}], i[{i2}] )/GeV2)"""
structures=L.structure.split()
output="("
for struct in structures:
if(struct=="+" or struct=="-") :
output+=struct
continue
structure = struct.split("*")
worked = False
mom=-1
newTerm=""
while True :
term = structure[-1]
structure.pop()
(momentum,mom,index) = getIndices(term)
if( not momentum) : break
# look for the matching momenta
for term in structure :
(momentum,mom2,index2) = getIndices(term)
if(index2==index) :
structure.remove(term)
dot = dotProduct.format(i1=mom-1,i2=mom2-1)
if(newTerm=="") :
newTerm = dot
else :
newTerm = " ( %s) * ( %s ) " % (newTerm,dot)
if(len(structure)==0) :
worked = True
break
if(not worked) :
return False
else :
output+=newTerm
output+=")"
return output
kinematicsline = """\
long id [3]={{{id1},{id2},{id3}}};
long id2[3]={{p1->id(),p2->id(),p3->id()}};
unsigned int i[3];
for(unsigned int ix=0;ix<3;++ix) {{
for(unsigned int iy=0;iy<3;++iy) {{
if(id[ix]==id2[iy]) {{
i[ix] = iy;
id2[iy]=0;
break;
}}
}}
}}
double hw_kine1 = {kine};
"""
kinematicsline2 = """\
long id [4]={{{id1},{id2},{id3},{id4}}};
long id2[4]={{p1->id(),p2->id(),p3->id(),p4->id()}};
unsigned int i[4];
for(unsigned int ix=0;ix<4;++ix) {{
for(unsigned int iy=0;iy<4;++iy) {{
if(id[ix]==id2[iy]) {{
i[ix] = iy;
id2[iy]=0;
break;
}}
}}
}}
double hw_kine1 = {kine};
"""
kinematicsline3 ="""\
double hw_kine{i} = {kine};
"""
def scalarCouplings(vertex,value,prefactors,L,lorentztag,
all_couplings,prepend,header) :
try :
val = int(L.structure)
except :
output = lorentzScalar(vertex,L)
if( not output ) :
raise SkipThisVertex()
else :
if(prepend=="") :
if(lorentztag=="SSS") :
# order doesn't matter here, all same spin
prepend = kinematicsline.format(id1=vertex.particles[0].pdg_code,
id2=vertex.particles[1].pdg_code,
id3=vertex.particles[2].pdg_code,
kine=output)
else :
# order doesn't matter here, all same spin
prepend = kinematicsline2.format(id1=vertex.particles[0].pdg_code,
id2=vertex.particles[1].pdg_code,
id3=vertex.particles[2].pdg_code,
id4=vertex.particles[3].pdg_code,
kine=output)
value = "(%s) *(hw_kine1)" % value
else :
osplit=prepend.split("\n")
i=-1
while osplit[i]=="":
i=i-1
ikin=int(osplit[i].split("=")[0].replace("double hw_kine",""))+1
prepend +=kinematicsline3.format(kine=output,i=ikin)
value = "(%s) *(hw_kine%s)" % (value,ikin)
header="kinematics(true);"
if(len(all_couplings)==0) :
all_couplings.append('(%s) * (%s)' % (prefactors,value))
else :
all_couplings[0] = '(%s) * (%s) + (%s)' % (prefactors,value,all_couplings[0])
return (prepend, header,all_couplings)
def processScalarCouplings(model,parmsubs,all_couplings) :
tval = False
value = False
for icolor in range(0,len(all_couplings)) :
if(len(all_couplings[icolor])!=1) :
raise SkipThisVertex()
if(not value) :
value = all_couplings[icolor][0]
m = re.findall('hw_kine[0-9]*', all_couplings[icolor][0])
if m:
for kine in m:
# bizarre number for checks, must be a better option
parmsubs[kine] = 987654321.
if(not tval) :
tval = evaluate(value,model,parmsubs)
else :
tval2 = evaluate(all_couplings[icolor][0],model,parmsubs)
if(abs(tval[i]-tval2)>1e-6) :
raise SkipThisVertex()
# cleanup and return the answer
return value.replace("(1.0) * ","").replace(" * (1)","")
def vectorCouplings(vertex,value,prefactors,L,lorentztag,pos,
all_couplings,append,qcd,order) :
structures=extractStructures(L)
terms=[]
signs=[]
if(lorentztag=="VVV") :
terms=[['P(%s,%s)' % (order[2],order[0]),'Metric(%s,%s)' % (order[0],order[1])],
['P(%s,%s)' % (order[2],order[1]),'Metric(%s,%s)' % (order[0],order[1])],
['P(%s,%s)' % (order[1],order[0]),'Metric(%s,%s)' % (order[0],order[2])],
['P(%s,%s)' % (order[1],order[2]),'Metric(%s,%s)' % (order[0],order[2])],
['P(%s,%s)' % (order[0],order[1]),'Metric(%s,%s)' % (order[1],order[2])],
['P(%s,%s)' % (order[0],order[2]),'Metric(%s,%s)' % (order[1],order[2])]]
signs=[1.,-1.,-1.,1.,1.,-1.]
elif(lorentztag=="VVVV") :
terms=[['Metric(%s,%s)' % (order[0],order[3]),'Metric(%s,%s)' % (order[1],order[2])],
['Metric(%s,%s)' % (order[0],order[2]),'Metric(%s,%s)' % (order[1],order[3])],
['Metric(%s,%s)' % (order[0],order[1]),'Metric(%s,%s)' % (order[2],order[3])]]
signs=[1.,1.,1.]
elif(lorentztag=="VVVS") :
terms=[['P(%s,%s)' % (order[2],order[0]),'Metric(%s,%s)' % (order[0],order[1])],
['P(%s,%s)' % (order[2],order[1]),'Metric(%s,%s)' % (order[0],order[1])],
['P(%s,%s)' % (order[1],order[0]),'Metric(%s,%s)' % (order[0],order[2])],
['P(%s,%s)' % (order[1],order[2]),'Metric(%s,%s)' % (order[0],order[2])],
['P(%s,%s)' % (order[0],order[1]),'Metric(%s,%s)' % (order[1],order[2])],
['P(%s,%s)' % (order[0],order[2]),'Metric(%s,%s)' % (order[1],order[2])],
['Epsilon(1,2,3,-1)','P(-1,1)'],['Epsilon(1,2,3,-1)','P(-1,2)'],
['Epsilon(1,2,3,-1)','P(-1,3)']]
signs=[1.,-1.,-1.,1.,1.,-1.,1.,1.,1.]
# extract the couplings
new_couplings = [False]*len(terms)
iterm=0
try :
for term in terms:
for perm in itertools.permutations(term):
label = '*'.join(perm)
for istruct in range(0,len(structures)) :
if label in structures[istruct] :
reminder = structures[istruct].replace(label,'1.',1)
structures[istruct] = "Done"
val = eval(reminder, {'cmath':cmath} )*signs[iterm]
if(new_couplings[iterm]) :
new_couplings[iterm] += val
else :
new_couplings[iterm] = val
iterm += 1
except :
raise SkipThisVertex()
# check we've handled all the terms
for val in structures:
if(val!="Done") :
raise SkipThisVertex()
# set the couplings
for icoup in range(0,len(new_couplings)) :
if(new_couplings[icoup]) :
new_couplings[icoup] = '(%s) * (%s) *(%s)' % (new_couplings[icoup],prefactors,value)
if(len(all_couplings)==0) :
all_couplings=new_couplings
else :
for icoup in range(0,len(new_couplings)) :
if(new_couplings[icoup] and all_couplings[icoup]) :
all_couplings[icoup] = '(%s) * (%s) *(%s) + (%s) ' % (new_couplings[icoup],prefactors,value,all_couplings[icoup])
elif(new_couplings[icoup]) :
all_couplings[icoup] = new_couplings[icoup]
# ordering for VVV type vertices
if(len(pos[8]) != 3 and (lorentztag=="VVV" or lorentztag=="VVVS")) :
append = VVVordering(vertex)
return all_couplings,append
def processVectorCouplings(lorentztag,vertex,model,parmsubs,all_couplings,append,header) :
value = False
tval = False
if(lorentztag=="VVV") :
for icolor in range(0,len(all_couplings)) :
# loop over the different terms
for ix in range(0,len(all_couplings[icolor])) :
if(not value) :
value = all_couplings[icolor][ix]
tval = evaluate(value,model,parmsubs)
else :
tval2 = evaluate(all_couplings[icolor][ix],model,parmsubs)
if(abs(tval-tval2)>1e-6) :
raise SkipThisVertex()
elif(lorentztag=="VVVV") :
order=[]
colours = vertex.color
if(len(colours)==1) :
tval=[]
for i in range(0,3) :
tval.append(evaluate(all_couplings[0][i],model,parmsubs))
if(compare(tval[2],-2.*tval[1]) and
compare(tval[2],-2.*tval[0]) ) :
order=[0,1,2,3]
value = "0.5*(%s)" % all_couplings[0][2]
elif(compare(tval[1],-2.*tval[2]) and
compare(tval[1],-2.*tval[0]) ) :
order=[0,2,1,3]
value = "0.5*(%s)" % all_couplings[0][1]
elif(compare(tval[0],-2.*tval[2]) and
compare(tval[0],-2.*tval[1]) ) :
order=[0,3,1,2]
value = "0.5*(%s)" % all_couplings[0][0]
else:
raise SkipThisVertex()
pattern = \
"bool done[4]={false,false,false,false};\n" + \
" tcPDPtr part[4]={p1,p2,p3,p4};\n" + \
" unsigned int iorder[4]={0,0,0,0};\n" + \
" for(unsigned int ix=0;ix<4;++ix) {\n" + \
" if(!done[0] && part[ix]->id()==%s) {done[0]=true; iorder[%s] = ix; continue;}\n" + \
" if(!done[1] && part[ix]->id()==%s) {done[1]=true; iorder[%s] = ix; continue;}\n" + \
" if(!done[2] && part[ix]->id()==%s) {done[2]=true; iorder[%s] = ix; continue;}\n" + \
" if(!done[3] && part[ix]->id()==%s) {done[3]=true; iorder[%s] = ix; continue;}\n" + \
" }\n" + \
" setType(2);\n" + \
" setOrder(iorder[0],iorder[1],iorder[2],iorder[3]);"
# order doesn't matter here same spin
append = pattern % ( vertex.particles[0].pdg_code,order[0],
vertex.particles[1].pdg_code,order[1],
vertex.particles[2].pdg_code,order[2],
vertex.particles[3].pdg_code,order[3] )
else :
for icolor in range(0,len(all_couplings)) :
col=colours[icolor].split("*")
if(len(col)==2 and "f(" in col[0] and "f(" in col[1]) :
sign = 1
for i in range(0,2) :
col[i],stemp = extractAntiSymmetricIndices(col[i],"f(")
for ix in range(0,len(col[i])): col[i][ix]=int(col[i][ix])
sign *=stemp
if(col[0][0]>col[1][0]) : col[0],col[1] = col[1],col[0]
# first flow
if(col[0][0]==1 and col[0][1]==2 and col[1][0] ==3 and col[1][1] == 4) :
if(all_couplings[icolor][2] or not all_couplings[icolor][0] or
not all_couplings[icolor][1]) :
raise SkipThisVertex()
if(not value) :
value = all_couplings[icolor][1]
tval = evaluate(value,model,parmsubs)
tval2 = -evaluate(all_couplings[icolor][0],model,parmsubs)
tval3 = evaluate(all_couplings[icolor][1],model,parmsubs)
elif(col[0][0]==1 and col[0][1]==3 and col[1][0] ==2 and col[1][1] == 4) :
if(all_couplings[icolor][1] or not all_couplings[icolor][0] or
not all_couplings[icolor][2]) :
raise SkipThisVertex()
if(not value) :
value = all_couplings[icolor][2]
tval = evaluate(value,model,parmsubs)
tval2 = -evaluate(all_couplings[icolor][0],model,parmsubs)
tval3 = evaluate(all_couplings[icolor][2],model,parmsubs)
elif(col[0][0]==1 and col[0][1]==4 and col[1][0] ==2 and col[1][1] == 3) :
if(all_couplings[icolor][0] or not all_couplings[icolor][1] or
not all_couplings[icolor][2]) :
raise SkipThisVertex()
if(not value) :
value = all_couplings[icolor][2]
tval = evaluate(value,model,parmsubs)
tval2 = -evaluate(all_couplings[icolor][1],model,parmsubs)
tval3 = evaluate(all_couplings[icolor][2],model,parmsubs)
else :
raise SkipThisVertex()
if(abs(tval-tval2)>1e-6 or abs(tval-tval3)>1e-6 ) :
raise SkipThisVertex()
append = 'setType(1);\nsetOrder(0,1,2,3);'
else :
print 'unknown colour structure for VVVV vertex'
raise SkipThisVertex()
elif(lorentztag=="VVVS") :
try :
# two distinct cases 0-5 = , 6-8=
if(all_couplings[0][0]) :
imin=0
imax=6
header="scalar(true);"
else :
imin=6
imax=9
header="scalar(false);"
for icolor in range(0,len(all_couplings)) :
# loop over the different terms
for ix in range(imin,imax) :
if(not value) :
value = all_couplings[icolor][ix]
tval = evaluate(value,model,parmsubs)
else :
tval2 = evaluate(value,model,parmsubs)
if(abs(tval-tval2)>1e-6) :
raise SkipThisVertex()
except :
SkipThisVertex()
# cleanup and return the answer
value = value.replace("(1.0) * ","").replace(" * (1)","")
return (value,append,header)
def fermionCouplings(value,prefactors,L,all_couplings,order) :
new_couplings=[False,False]
try :
new_couplings[0],new_couplings[1] = parse_lorentz(L.structure)
except :
raise SkipThisVertex()
for i in range(0,2) :
if new_couplings[i]:
new_couplings[i] = '(%s) * (%s) * (%s)' % (prefactors,new_couplings[i],value)
if(len(all_couplings)==0) :
all_couplings=new_couplings
else :
for i in range(0,len(new_couplings)) :
if(new_couplings[i] and all_couplings[i]) :
all_couplings[i] = '(%s) + (%s) ' % (new_couplings[i],all_couplings[i])
elif(new_couplings[i]) :
all_couplings[i] = new_couplings[i]
return all_couplings
def processFermionCouplings(lorentztag,vertex,model,parmsubs,all_couplings,order) :
leftcontent = all_couplings[0][0] if all_couplings[0][0] else "0."
rightcontent = all_couplings[0][1] if all_couplings[0][1] else "0."
tval=[evaluate( leftcontent,model,parmsubs),
evaluate(rightcontent,model,parmsubs)]
for icolor in range(0,len(all_couplings)) :
# loop over the different terms
for ix in range(0,len(all_couplings[icolor])) :
tval2 = evaluate(all_couplings[icolor][ix],model,parmsubs) if all_couplings[icolor][ix] else 0.
if(abs(tval[ix]-tval2)>1e-6) :
raise SkipThisVertex()
normcontent = "1."
append=""
if lorentztag == 'FFV':
append = ('if(p1->id()!=%s) {Complex ltemp=left(), rtemp=right(); left(-rtemp); right(-ltemp);}'
% vertex.particles[order[0]-1].pdg_code)
return normcontent,leftcontent,rightcontent,append
def RSCouplings(value,prefactors,L,all_couplings,order) :
raise SkipThisVertex()
diff --git a/Models/Feynrules/python/ufo2peg/converter.py b/Models/Feynrules/python/ufo2peg/converter.py
--- a/Models/Feynrules/python/ufo2peg/converter.py
+++ b/Models/Feynrules/python/ufo2peg/converter.py
@@ -1,185 +1,193 @@
"""
AST visitor class to convert Python expressions into C++ as used by ThePEG
"""
import ast
convertHerwig=False
def py2cpp(expr,con=False):
"""Convert expr to C++ form. Wraps the converter class."""
global convertHerwig
convertHerwig=con
result = PyToCpp().parse(expr)
return result
class PyToCppException(Exception):
"""Base class for all PyToCpp exceptions."""
class PyToCpp(ast.NodeVisitor):
"""Convert Python math expressions into C++.
Returns a tuple (expr,syms):
expr -- C++-compatible expression
syms -- set of all free variables
Usage:
>>> expr = '3+2**a*b'
>>> PyToCpp().parse(expr)
('(3.0+(pow(2.0,a)*b))', set(['a', 'b']))
Note:
The converter is currently not generic, it relies on the
conventions of Feynrules' UFO format on the one hand and ThePEG's
C++ types on the other.
"""
def parse(self,expression):
"""Convert expression to C++ format."""
self.result = []
self.symbols = set()
expression=expression.replace("abs(","cmath.abs(")
tree = ast.parse(expression)
#print ast.dump(tree)
return self.visit(tree)
##################################
def visit_Module(self,node):
self.generic_visit(node)
return ''.join(self.result), self.symbols
def generic_visit(self,node):
typename = type(node).__name__
harmless = ['Module','Expr']
if typename not in harmless:
raise PyToCppException('Missing implementation for %s' % typename)
super(PyToCpp,self).generic_visit(node)
def visit_UnaryOp(self,node):
self.result.append('(')
self.visit(node.op)
self.visit(node.operand)
self.result.append(')')
def visit_BinOp(self,node):
if type(node.op) == type(ast.Pow()):
return self.pow_node(node)
self.result.append('(')
self.visit(node.left)
self.visit(node.op)
self.visit(node.right)
self.result.append(')')
def pow_node(self,node):
if is_square(node):
self.result.append('sqr(')
self.visit(node.left)
self.result.append(')')
else:
self.result.append('pow(')
self.visit(node.left)
self.result.append(',')
self.visit(node.right)
self.result.append(')')
def visit_Call(self,node):
if is_ii(node):
self.result.append('ii')
else:
self.visit(node.func)
self.result.append('(')
for a in node.args:
self.visit(a)
self.result.append(',')
if self.result[-1] == ',':
del self.result[-1]
self.result.append(')')
def visit_Attribute(self,node):
if node.value.id != 'cmath':
err = "Don't know how to convert %s module." % node.value.id
raise PyToCppException(err)
self.result.append(node.attr)
def visit_Num(self,node):
# some zeros are encoded as 0j
if node.n == 0: text = '0.0'
elif (node.n==complex("1j") ) :
text = "ii"
elif (node.n==complex("-1j") ) :
text = "-ii"
elif (node.n==complex("2j") ) :
text = "2.*ii"
else:
text = str(float(node.n))
self.result.append(text)
def visit_Name(self,node):
text = str(node.id)
if text == 'complex':
text = 'Complex'
elif text == 'complexconjugate':
text = 'conj'
+ elif text == 'im':
+ text = 'imag'
+ elif text == 're':
+ text = 'real'
+ elif text == 'max':
+ text = 'max'
+ elif text == 'min':
+ text = 'min'
elif convertHerwig :
if text == 'I' :
text = "ii"
elif ( text.find("UnitRemoval")==0) :
text = "%s::%s" % (text[:11],text[11:])
elif(text[0]=="P" or text[0]=="E" or text[0] == "V") :
if text[-1] in ["x","y","z","t"] :
text = "%s.%s()" % (text[0:-1],text[-1])
elif(text[0]=="R") :
text = "%s.%s()" % (text[:-3],text[-3:])
elif(text[0]=="s") :
text = "%s.%s()" % (text[:-2],text[-2:])
elif text not in []:
self.symbols.add(text)
self.result.append(text)
def visit_Mult(self,node):
self.result.append('*')
def visit_Add(self,node):
self.result.append('+')
def visit_Sub(self,node):
self.result.append('-')
def visit_USub(self,node):
self.result.append('-')
def visit_UAdd(self,node):
self.result.append('+')
def visit_Div(self,node):
self.result.append('/')
def visit_Pow(self,node):
err = "Shold never get here. BinaryOp catches Pow calls."
raise PyToCppException(err)
### Helpers
def is_square(node):
"""Check if a Pow object is just a square."""
try:
return node.right.n == 2.0
except:
return False
def is_ii(node):
"""Check if a Call object is just the imaginary unit."""
try:
return ( node.func.id == 'complex'
and node.args[0].n == 0
and node.args[1].n == 1 )
except:
return False
if __name__ == "__main__":
import doctest
doctest.testmod()
diff --git a/Models/General/BSMModel.h b/Models/General/BSMModel.h
--- a/Models/General/BSMModel.h
+++ b/Models/General/BSMModel.h
@@ -1,188 +1,188 @@
// -*- C++ -*-
#ifndef Herwig_BSMModel_H
#define Herwig_BSMModel_H
//
// This is the declaration of the BSMModel class.
//
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/Utilities/CFileLineReader.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the BSMModel class.
*
* @see \ref BSMModelInterfaces "The interfaces"
* defined for BSMModel.
*/
class BSMModel: public Herwig::StandardModel {
public:
/**
* The default constructor.
*/
BSMModel();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Get name of SLHA decay file
*/
const string & decayFile() const {return decayFile_;}
/**
* Set name of SLHA decay file
*/
void decayFile(string in) {decayFile_ = in;}
/**
* Read the decays
*/
void decayRead();
/**
* Read decaymodes from LHA file
* @param ifs input stream containg data
* @param decay string containing name of parent and value of total width
*/
void readDecay(CFileLineReader & ifs, string decay) const;
/**
* Create a DecayMode object in the repository
* @param tag The tag identifying the decay mode including the prefix
* 'decaymode'
* @param brat Branching ratio of this mode
*/
void createDecayMode(string tag, double brat) const;
/**
* Create a DecayMode object in the repository
* @param tag The tag identifying the decay mode including the prefix
* 'decaymode'
* @param brat Branching ratio of this mode
*/
vector<pair<double,string> > createWZDecayModes(string tag, double brat,
tcPDPtr boson,
Energy maxMass) const;
/**
* read the decays
*/
bool readDecays() const {return readDecays_;}
/**
* set the reading of the decays
*/
void readDecays(bool in) {readDecays_=in;}
/**
* Map of PDG ids from file to those used internally
*/
map<long,long> & idMap() {return idMap_;}
/**
* Get ParticleData object with Id mapping
*/
PDPtr getBSMParticleData(PID id) const {
map<long,long>::const_iterator it = idMap_.find(id);
if(it==idMap_.end())
return getParticleData(id);
else
return getParticleData(it->second);
}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
/**
* Overloaded function from Interfaced
*/
virtual bool preInitialize() const {
return true;
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BSMModel & operator=(const BSMModel &);
+ BSMModel & operator=(const BSMModel &) = delete;
private:
/**
* Name of the decay file
*/
string decayFile_;
/**
* Read the decays from the file
*/
bool readDecays_;
/**
* Whether or not to replace the top decay modes with those from
* the SLHA files
*/
bool topModesFromFile_;
/**
* Tolerance for branching ratios
*/
double tolerance_;
/**
* Map of ids from files to those used by Herwig
*/
map<long,long> idMap_;
/**
* Whether or not to allow the width of SM particles to be reset
*/
bool allowedToResetSMWidths_;
};
}
#endif /* Herwig_BSMModel_H */
diff --git a/Models/General/BSMWidthGenerator.h b/Models/General/BSMWidthGenerator.h
--- a/Models/General/BSMWidthGenerator.h
+++ b/Models/General/BSMWidthGenerator.h
@@ -1,125 +1,125 @@
// -*- C++ -*-
//
// BSMWidthGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_BSMWidthGenerator_H
#define HERWIG_BSMWidthGenerator_H
//
// This is the declaration of the BSMWidthGenerator class.
//
#include "Herwig/PDT/GenericWidthGenerator.h"
#include "Herwig/Decay/General/GeneralTwoBodyDecayer.fh"
#include "BSMWidthGenerator.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This class is designed to be able to calculate the running
* width for a BSM particle given the decay mode and partial width
* calculated from the decayer.
*
* @see \ref BSMWidthGeneratorInterfaces "The interfaces"
* defined for BSMWidthGenerator.
*/
class BSMWidthGenerator: public GenericWidthGenerator {
public:
/**
* The default constructor.
*/
BSMWidthGenerator() : theModes(0) {}
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Perform the set up for a mode in classes inheriting from this one
* @param mode The decay mode
* @param decayer The decayer for the mode.
* @param imode The number of the mode.
*/
virtual void setupMode(tcDMPtr mode, tDecayIntegratorPtr decayer,
unsigned int imode);
/**
* The \f$1\to2\f$ width for outgoing particles which can be off-shell.
* @param iloc The location of the mode in the list.
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @return The partial width.
*/
virtual Energy partial2BodyWidth(int iloc,Energy m0,Energy m1,Energy m2) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BSMWidthGenerator & operator=(const BSMWidthGenerator &);
+ BSMWidthGenerator & operator=(const BSMWidthGenerator &) = delete;
private:
/**
* A vector decay modes with their associated decayer
* cast to GeneralTwoBodyDecayer.
*/
vector<pair<tcDMPtr, tcGeneralTwoBodyDecayerPtr> > theModes;
};
/**
* An exception class to report an error.
*/
class BSMWidthException : public Exception {};
}
#endif /* HERWIG_BSMWidthGenerator_H */
diff --git a/Models/General/DecayConstructor.h b/Models/General/DecayConstructor.h
--- a/Models/General/DecayConstructor.h
+++ b/Models/General/DecayConstructor.h
@@ -1,167 +1,167 @@
// -*- C++ -*-
//
// DecayConstructor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DecayConstructor_H
#define HERWIG_DecayConstructor_H
//
// This is the declaration of the DecayConstructor class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "NBodyDecayConstructorBase.h"
#include "Herwig/Decay/Radiation/DecayRadiationGenerator.h"
#include "DecayConstructor.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The DecayConstructor class is an interfaced class that stores a
* vector of NBodyDecayConstructor objects and calls the appropriate
* function to create the decayers and decaymodes. There is also an interface
* to add decay mode tags of the form a->b,c,...; which will not
* be created.
*
* @see \ref DecayConstructorInterfaces "The interfaces"
* defined for DecayConstructor.
* @see Interfaced
*/
class DecayConstructor: public Interfaced {
public:
/**
* The default constructor.
*/
DecayConstructor() : NBodyDecayConstructors_(0),
_disableDMTags(0), _minBR(0.) {}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Function to create decayers
* @param particles vector of ParticleData pointers to particles contained
* in model
* @param minBR minimum branching ratio for modes
*/
void createDecayers(const vector<PDPtr> & particles, double minBR);
/**
* Check whether the decay mode given is one that should not be
* created
* @param tag The decay mode tag, a->b,c,d,...;
*/
bool disableDecayMode(string tag) const;
/**
* QED Generator
*/
DecayRadiationGeneratorPtr QEDGenerator() {return QEDGenerator_;}
/**
* Vector of references to the objects that will construct the N-Body
* decays.
*/
const vector<NBodyDecayConstructorBasePtr> & decayConstructors() {
return NBodyDecayConstructors_;
}
/**
* Get minimum branching ratio
*/
double minimumBR() const { return _minBR;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DecayConstructor & operator=(const DecayConstructor &);
+ DecayConstructor & operator=(const DecayConstructor &) = delete;
private:
/**
* Vector of references to the objects that will construct the N-Body
* decays.
*/
vector<NBodyDecayConstructorBasePtr> NBodyDecayConstructors_;
/**
* A list of DecayMode tags that are not to be created
*/
vector<string> _disableDMTags;
/**
* The decay radiation generator to use for QED radiation
*/
DecayRadiationGeneratorPtr QEDGenerator_;
/**
* Minimum allowed branching ratio
*/
double _minBR;
};
}
#endif /* HERWIG_DecayConstructor_H */
diff --git a/Models/General/FourBodyDecayConstructor.h b/Models/General/FourBodyDecayConstructor.h
--- a/Models/General/FourBodyDecayConstructor.h
+++ b/Models/General/FourBodyDecayConstructor.h
@@ -1,150 +1,150 @@
// -*- C++ -*-
#ifndef THEPEG_FourBodyDecayConstructor_H
#define THEPEG_FourBodyDecayConstructor_H
//
// This is the declaration of the FourBodyDecayConstructor class.
//
#include "NBodyDecayConstructorBase.h"
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "Herwig/Decay/General/GeneralFourBodyDecayer.fh"
#include "PrototypeVertex.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VertexBasePtr;
/**
* Here is the documentation of the FourBodyDecayConstructor class.
*
* @see \ref FourBodyDecayConstructorInterfaces "The interfaces"
* defined for FourBodyDecayConstructor.
*/
class FourBodyDecayConstructor: public NBodyDecayConstructorBase {
public:
/**
* The default constructor.
*/
FourBodyDecayConstructor() :
interOpt_(0), widthOpt_(1), particleType_(false) {}
/**
* Destructor
*/
~FourBodyDecayConstructor();
/**
* Function used to determine allowed decaymodes, to be implemented
* in derived class.
* @param particles vector of ParticleData pointers containing
* particles in model
*/
virtual void DecayList(const set<PDPtr> & particles);
/**
* Number of outgoing lines. Required for correct ordering.
*/
virtual unsigned int numBodies() const {return 4;}
/**
* Create a decay mode
*/
void createDecayMode(vector<NBDiagram> &,bool,double);
/**
* Create the decayer
* @param diagrams The diagrams for the decay
* @param inter Option for intermediates
*/
GeneralFourBodyDecayerPtr createDecayer(vector<NBDiagram> & diagrams,
bool inter, double symfac) const;
/**
* Contruct the classname and object name for the Decayer
* @param incoming The incoming particle
* @param outgoing The decay products
* @param objname a string containing the default path of the Decayer object
*/
string DecayerClassName(tcPDPtr incoming, const OrderedParticles & outgoing,
string & objname) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FourBodyDecayConstructor & operator=(const FourBodyDecayConstructor &);
+ FourBodyDecayConstructor & operator=(const FourBodyDecayConstructor &) = delete;
private:
/**
* Option for the inclusion of intermediates
*/
unsigned int interOpt_;
/**
* How to treat the widths of the intermediate particles
*/
unsigned int widthOpt_;
/**
* Particles to override the default list
*/
vector<PDPtr> particles_;
/**
* Types of particles
*/
bool particleType_;
};
}
#endif /* THEPEG_FourBodyDecayConstructor_H */
diff --git a/Models/General/GenericHGGVertex.h b/Models/General/GenericHGGVertex.h
--- a/Models/General/GenericHGGVertex.h
+++ b/Models/General/GenericHGGVertex.h
@@ -1,202 +1,202 @@
// -*- C++ -*-
#ifndef Herwig_GenericHGGVertex_H
#define Herwig_GenericHGGVertex_H
//
// This is the declaration of the GenericHGGVertex class.
//
#include "VVSLoopVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Utilities/EnumIO.h"
#include "ThePEG/PDT/ParticleData.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The GenericHGGVertex class implements the coupling of the Higgs boson to gluons
* in a generic model using the other vertices coupling the Higgs boson
* to coloured particles.
*
* @see \ref GenericHGGVertexInterfaces "The interfaces"
* defined for GenericHGGVertex.
*/
class GenericHGGVertex: public VVSLoopVertex {
public:
/**
* Struct to store the stuff needed for the vertices
*/
struct Interaction {
/**
* Constructor
*/
Interaction(PDPtr in_particle=PDPtr(),SSSVertexPtr in_scalar=SSSVertexPtr(),
FFSVertexPtr in_fermion=FFSVertexPtr())
: particle(in_particle), scalar(in_scalar), fermion(in_fermion)
{}
/**
* The particle
*/
PDPtr particle;
/**
* The scalar vertex
*/
SSSVertexPtr scalar;
/**
* The fermion vertex
*/
FFSVertexPtr fermion;
};
public:
/**
* The default constructor.
*/
GenericHGGVertex();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to first particle
*@param part3 ParticleData pointer to first particle
*/
virtual void setCoupling (Energy2 q2, tcPDPtr part1, tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GenericHGGVertex & operator=(const GenericHGGVertex &);
+ GenericHGGVertex & operator=(const GenericHGGVertex &) = delete;
private:
/**
* Initialize the vertex
*/
void initializeVertex();
private:
/**
* The bosons to consider as particles
*/
vector<PDPtr> bosons_;
/**
* Has it been set up?
*/
bool setup_;
/**
* The vertices to use
*/
map<cPDPtr,vector<Interaction> > vertices_;
/**
* The scale \f$q^2\f$ at which coupling was last evaluated
*/
Energy2 q2Last_;
/**
* Last value of the coupling calculated
*/
Complex coupLast_;
/**
* Lasst id of the boson
*/
long idLast_;
/**
* The model for running masses
*/
tcHwSMPtr model_;
};
/**
* Persistent output of the Interaction struct
*/
inline PersistentOStream & operator<<(PersistentOStream & os,
const GenericHGGVertex::Interaction & x) {
os << x.particle << x.scalar << x.fermion;
return os;
}
/**
* Persistent input of the Interaction struct
*/
inline PersistentIStream & operator>>(PersistentIStream & is,
GenericHGGVertex::Interaction & x) {
is >> x.particle >> x.scalar >> x.fermion;
return is;
}
}
#endif /* Herwig_GenericHGGVertex_H */
diff --git a/Models/General/GenericHPPVertex.h b/Models/General/GenericHPPVertex.h
--- a/Models/General/GenericHPPVertex.h
+++ b/Models/General/GenericHPPVertex.h
@@ -1,209 +1,209 @@
// -*- C++ -*-
#ifndef Herwig_GenericHPPVertex_H
#define Herwig_GenericHPPVertex_H
//
// This is the declaration of the GenericHPPVertex class.
//
#include "VVSLoopVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Utilities/EnumIO.h"
#include "ThePEG/PDT/ParticleData.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The GenericHPPVertex class implements the coupling of the Higgs boson to gluons
* in a generic model using the other vertices coupling the Higgs boson
* to coloured particles.
*
* @see \ref GenericHPPVertexInterfaces "The interfaces"
* defined for GenericHPPVertex.
*/
class GenericHPPVertex: public VVSLoopVertex {
public:
/**
* Struct to store the stuff needed for the vertices
*/
struct Interaction {
/**
* Constructor
*/
Interaction(PDPtr in_particle=PDPtr(),SSSVertexPtr in_scalar=SSSVertexPtr(),
FFSVertexPtr in_fermion=FFSVertexPtr(),
VVSVertexPtr in_vector=VVSVertexPtr())
: particle(in_particle), scalar(in_scalar), fermion(in_fermion), vector(in_vector)
{}
/**
* The particle
*/
PDPtr particle;
/**
* The scalar vertex
*/
SSSVertexPtr scalar;
/**
* The fermion vertex
*/
FFSVertexPtr fermion;
/**
* The vector vertex
*/
VVSVertexPtr vector;
};
public:
/**
* The default constructor.
*/
GenericHPPVertex();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to first particle
*@param part3 ParticleData pointer to first particle
*/
virtual void setCoupling (Energy2 q2, tcPDPtr part1, tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GenericHPPVertex & operator=(const GenericHPPVertex &);
+ GenericHPPVertex & operator=(const GenericHPPVertex &) = delete;
private:
/**
* Initialize the vertex
*/
void initializeVertex();
private:
/**
* The bosons to consider as particles
*/
vector<PDPtr> bosons_;
/**
* Has it been set up?
*/
bool setup_;
/**
* The vertices to use
*/
map<cPDPtr,vector<Interaction> > vertices_;
/**
* The scale \f$q^2\f$ at which coupling was last evaluated
*/
Energy2 q2Last_;
/**
* Last value of the coupling calculated
*/
Complex coupLast_;
/**
* Lasst id of the boson
*/
long idLast_;
/**
* The model for running masses
*/
tcHwSMPtr model_;
};
/**
* Persistent output of the Interaction struct
*/
inline PersistentOStream & operator<<(PersistentOStream & os,
const GenericHPPVertex::Interaction & x) {
os << x.particle << x.scalar << x.fermion << x.vector;
return os;
}
/**
* Persistent input of the Interaction struct
*/
inline PersistentIStream & operator>>(PersistentIStream & is,
GenericHPPVertex::Interaction & x) {
is >> x.particle >> x.scalar >> x.fermion >> x.vector;
return is;
}
}
#endif /* Herwig_GenericHPPVertex_H */
diff --git a/Models/General/HardProcessConstructor.h b/Models/General/HardProcessConstructor.h
--- a/Models/General/HardProcessConstructor.h
+++ b/Models/General/HardProcessConstructor.h
@@ -1,216 +1,216 @@
// -*- C++ -*-
#ifndef HERWIG_HardProcessConstructor_H
#define HERWIG_HardProcessConstructor_H
//
// This is the declaration of the HardProcessConstructor class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "HPDiagram.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/Handlers/SubProcessHandler.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Handlers/StandardEventHandler.h"
#include "Herwig/MatrixElement/General/GeneralHardME.h"
#include "HardProcessConstructor.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HardProcessConstructor class.
*
* @see \ref HardProcessConstructorInterfaces "The interfaces"
* defined for HardProcessConstructor.
*/
class HardProcessConstructor: public Interfaced {
public:
/** Vector of HPDiagrams. */
typedef vector<HPDiagram> HPDVector;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
HardProcessConstructor() : debug_(false) {}
//@}
/**
* The main function to create diagrams etc for the processes
*/
virtual void constructDiagrams() = 0;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** Functions to set up colour flows and matrix elements. */
//@{
/**
* Determine whether the ordering of the outgoing states is the same
* as the ordering in the matrix elements
* @param diag The diagram to question
*/
void fixFSOrder(HPDiagram & diag);
/**
* Assign a diagram to the appropriate colour flow(s).
* @param diag The diagram to assign
*/
void assignToCF(HPDiagram & diag);
/**
* Assign a $s$-channel diagram to the appropriate colour flow(s).
* @param diag The diagram to assign
*/
void sChannelCF(HPDiagram & diag);
/**
* Assign a $t$-channel diagram to the appropriate colour flow(s).
* @param diag The diagram to assign
*/
void tChannelCF(HPDiagram & diag);
/**
* Assign a $u$-channel diagram to the appropriate colour flow(s).
* @param diag The diagram to assign
*/
void uChannelCF(HPDiagram & diag);
/**
* Assign a $u$-channel diagram to the appropriate colour flow(s).
* @param diag The diagram to assign
*/
void fourPointCF(HPDiagram & diag);
//@}
/**
* Pointer to the model being used
*/
tHwSMPtr model() const {return model_;}
/**
* Pointer to the sub process handler
*/
tSubHdlPtr subProcess() const {return subProcess_;}
/**
* Whether to print the debug information with the matrix
* element. This is here solely so it can be passed to
* a matrix element that is created here.
*/
bool debug() const {return debug_;}
/**
* Get the correct colour factor matrix.
* @param extpart Vector of external ParticleData pointers
*/
GeneralHardME::ColourStructure colourFlow(const tcPDVector & extpart) const;
/**
* Search for a diagram that has already been created
* @param diagram The diagram to search for
* @param group The group of diagrams to search through
*/
bool duplicate(const HPDiagram & diagram,
const HPDVector & group) const;
/**
* check the order of a diagram
*/
bool checkOrder(const HPDiagram & diag) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HardProcessConstructor & operator=(const HardProcessConstructor &);
+ HardProcessConstructor & operator=(const HardProcessConstructor &) = delete;
private:
/**
* Pointer to the model being used
*/
tHwSMPtr model_;
/**
* Pointer to the sub process handler
*/
tSubHdlPtr subProcess_;
/**
* Whether to print the debug information with the matrix
* element. This is here solely so it can be passed to
* a matrix element that is created here.
*/
bool debug_;
};
namespace HPC_helper {
// Helper functor for find_if in duplicate function.
class SameIncomingAs {
public:
SameIncomingAs(tPDPair in) : a(in.first->id()), b(in.second->id()) {}
bool operator()(tPDPair ppair) const {
long id1(ppair.first->id()), id2(ppair.second->id());
return ( id1 == a && id2 == b ) || ( id1 == b && id2 == a );
}
private:
long a, b;
};
inline bool duplicateIncoming(tPDPair ppair,const vector<tPDPair> &incPairs) {
vector<tPDPair>::const_iterator it =
find_if( incPairs.begin(), incPairs.end(), SameIncomingAs(ppair) );
return it != incPairs.end();
}
}
}
#endif /* HERWIG_HardProcessConstructor_H */
diff --git a/Models/General/HiggsVBFProcessConstructor.h b/Models/General/HiggsVBFProcessConstructor.h
--- a/Models/General/HiggsVBFProcessConstructor.h
+++ b/Models/General/HiggsVBFProcessConstructor.h
@@ -1,112 +1,112 @@
// -*- C++ -*-
#ifndef HERWIG_HiggsVBFProcessConstructor_H
#define HERWIG_HiggsVBFProcessConstructor_H
//
// This is the declaration of the HiggsVBFProcessConstructor class.
//
#include "HardProcessConstructor.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HiggsVBFProcessConstructor class.
*
* @see \ref HiggsVBFProcessConstructorInterfaces "The interfaces"
* defined for HiggsVBFProcessConstructor.
*/
class HiggsVBFProcessConstructor: public HardProcessConstructor {
public:
/**
* The default constructor.
*/
HiggsVBFProcessConstructor();
/**
* Main function called to start constructing the diagrams for
* the 2->2 process
*/
void constructDiagrams();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
HiggsVBFProcessConstructor &
- operator=(const HiggsVBFProcessConstructor &);
+ operator=(const HiggsVBFProcessConstructor &) = delete;
private:
/**
* The outgoing higgs bosons
*/
PDVector _higgs;
/**
* Collision Type
*/
bool _type;
/**
* Treatment of the Higgs width
*/
unsigned int _shapeOpt;
/**
* which intermediates to include
*/
unsigned int _intermediates;
};
}
#endif /* HERWIG_HiggsVBFProcessConstructor_H */
diff --git a/Models/General/HiggsVectorBosonProcessConstructor.h b/Models/General/HiggsVectorBosonProcessConstructor.h
--- a/Models/General/HiggsVectorBosonProcessConstructor.h
+++ b/Models/General/HiggsVectorBosonProcessConstructor.h
@@ -1,118 +1,118 @@
// -*- C++ -*-
#ifndef HERWIG_HiggsVectorBosonProcessConstructor_H
#define HERWIG_HiggsVectorBosonProcessConstructor_H
//
// This is the declaration of the HiggsVectorBosonProcessConstructor class.
//
#include "HardProcessConstructor.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HiggsVectorBosonProcessConstructor class.
*
* @see \ref HiggsVectorBosonProcessConstructorInterfaces "The interfaces"
* defined for HiggsVectorBosonProcessConstructor.
*/
class HiggsVectorBosonProcessConstructor: public HardProcessConstructor {
public:
/**
* The default constructor.
*/
HiggsVectorBosonProcessConstructor();
/**
* Main function called to start constructing the diagrams for
* the 2->2 process
*/
void constructDiagrams();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
HiggsVectorBosonProcessConstructor &
- operator=(const HiggsVectorBosonProcessConstructor &);
+ operator=(const HiggsVectorBosonProcessConstructor &) = delete;
private:
/**
* The allowed outgoing vector bosons
*/
PDVector _vector;
/**
* The outgoing higgs bosons
*/
PDVector _higgs;
/**
* Collision Type
*/
bool _type;
/**
* Treatment of the Higgs width
*/
unsigned int _shapeOpt;
/**
* The shower coupling for the Matrix Element corrections
*/
ShowerAlphaPtr _alpha;
};
}
#endif /* HERWIG_HiggsVectorBosonProcessConstructor_H */
diff --git a/Models/General/ModelGenerator.cc b/Models/General/ModelGenerator.cc
--- a/Models/General/ModelGenerator.cc
+++ b/Models/General/ModelGenerator.cc
@@ -1,556 +1,556 @@
// -*- C++ -*-
//
// ModelGenerator.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ModelGenerator class.
//
#include "ModelGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Repository/CurrentGenerator.h"
#include "BSMWidthGenerator.h"
#include "Herwig/PDT/GenericMassGenerator.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "ThePEG/Repository/BaseRepository.h"
using namespace Herwig;
IBPtr ModelGenerator::clone() const {
return new_ptr(*this);
}
IBPtr ModelGenerator::fullclone() const {
return new_ptr(*this);
}
void ModelGenerator::persistentOutput(PersistentOStream & os) const {
os << hardProcessConstructors_ << _theDecayConstructor << particles_
<< offshell_ << Offsel_ << BRnorm_ << twoBodyOnly_ << howOffShell_
<< Npoints_ << Iorder_ << BWshape_ << brMin_ << decayOutput_;
}
void ModelGenerator::persistentInput(PersistentIStream & is, int) {
is >> hardProcessConstructors_ >> _theDecayConstructor >> particles_
>> offshell_ >> Offsel_ >> BRnorm_ >> twoBodyOnly_ >> howOffShell_
>> Npoints_ >> Iorder_ >> BWshape_ >> brMin_ >> decayOutput_;
}
// Static variable needed for the type description system in ThePEG.
DescribeClass<ModelGenerator,Interfaced>
describeThePEGModelGenerator("Herwig::ModelGenerator", "Herwig.so");
void ModelGenerator::Init() {
static ClassDocumentation<ModelGenerator> documentation
("This class controls the the use of BSM physics.",
"BSM physics was produced using the algorithm of "
"\\cite{Gigg:2007cr,Gigg:2008yc}",
"\\bibitem{Gigg:2007cr} M.~Gigg and P.~Richardson, \n"
"Eur.\\ Phys.\\ J.\\ C {\\bf 51} (2007) 989.\n"
"%%CITATION = EPHJA,C51,989;%%\n"
" %\\cite{Gigg:2008yc}\n"
"\\bibitem{Gigg:2008yc}\n"
" M.~A.~Gigg and P.~Richardson,\n"
" %``Simulation of Finite Width Effects in Physics Beyond the Standard Model,''\n"
" arXiv:0805.3037 [hep-ph].\n"
" %%CITATION = ARXIV:0805.3037;%%\n"
);
static RefVector<ModelGenerator,HardProcessConstructor>
interfaceHardProcessConstructors
("HardProcessConstructors",
"The objects to construct hard processes",
&ModelGenerator::hardProcessConstructors_, -1,
false, false, true, false, false);
static Reference<ModelGenerator,Herwig::DecayConstructor>
interfaceDecayConstructor
("DecayConstructor",
"Pointer to DecayConstructor helper class",
&ModelGenerator::_theDecayConstructor, false, false, true, false);
static RefVector<ModelGenerator,ThePEG::ParticleData> interfaceModelParticles
("DecayParticles",
"ParticleData pointers to the particles requiring spin correlation "
"decayers. If decay modes do not exist they will also be created.",
&ModelGenerator::particles_, -1, false, false, true, false);
static RefVector<ModelGenerator,ParticleData> interfaceOffshell
("Offshell",
"The particles to treat as off-shell",
&ModelGenerator::offshell_, -1, false, false, true, false);
static Switch<ModelGenerator,int> interfaceWhichOffshell
("WhichOffshell",
"A switch to determine which particles to create mass and width "
"generators for.",
&ModelGenerator::Offsel_, 0, false, false);
static SwitchOption interfaceWhichOffshellSelected
(interfaceWhichOffshell,
"Selected",
"Only create mass and width generators for the particles specified",
0);
static SwitchOption interfaceWhichOffshellAll
(interfaceWhichOffshell,
"All",
"Treat all particles specified in the DecayParticles "
"list as off-shell",
1);
static Switch<ModelGenerator,bool> interfaceBRNormalize
("BRNormalize",
"Whether to normalize the partial widths to BR*total width for an "
"on-shell particle",
&ModelGenerator::BRnorm_, true, false, false);
static SwitchOption interfaceBRNormalizeNormalize
(interfaceBRNormalize,
"Yes",
"Normalize the partial widths",
true);
static SwitchOption interfaceBRNormalizeNoNormalize
(interfaceBRNormalize,
"No",
"Do not normalize the partial widths",
false);
static Parameter<ModelGenerator,int> interfacePoints
("InterpolationPoints",
"Number of points to use for interpolation tables when needed",
&ModelGenerator::Npoints_, 10, 5, 1000,
false, false, true);
static Parameter<ModelGenerator,unsigned int>
interfaceInterpolationOrder
("InterpolationOrder", "The interpolation order for the tables",
&ModelGenerator::Iorder_, 1, 1, 5,
false, false, Interface::limited);
static Switch<ModelGenerator,int> interfaceBreitWignerShape
("BreitWignerShape",
"Controls the shape of the mass distribution generated",
&ModelGenerator::BWshape_, 0, false, false);
static SwitchOption interfaceBreitWignerShapeDefault
(interfaceBreitWignerShape,
"Default",
"Running width with q in numerator and denominator width factor",
0);
static SwitchOption interfaceBreitWignerShapeFixedWidth
(interfaceBreitWignerShape,
"FixedWidth",
"Use a fixed width",
1);
static SwitchOption interfaceBreitWignerShapeNoq
(interfaceBreitWignerShape,
"Noq",
"Use M rather than q in the numerator and denominator width factor",
2);
static SwitchOption interfaceBreitWignerShapeNoNumerator
(interfaceBreitWignerShape,
"NoNumerator",
"Neglect the numerator factors",
3);
static Switch<ModelGenerator,bool> interfaceTwoBodyOnly
("TwoBodyOnly",
"Whether to use only two-body or all modes in the running width calculation",
&ModelGenerator::twoBodyOnly_, false, false, false);
static SwitchOption interfaceTwoBodyOnlyYes
(interfaceTwoBodyOnly,
"Yes",
"Only use two-body modes",
true);
static SwitchOption interfaceTwoBodyOnlyNo
(interfaceTwoBodyOnly,
"No",
"Use all modes",
false);
static Parameter<ModelGenerator,double> interfaceMinimumBR
("MinimumBR",
"The minimum branching fraction to include",
&ModelGenerator::brMin_, 1e-6, 0.0, 1.0,
false, false, Interface::limited);
static Switch<ModelGenerator,unsigned int> interfaceDecayOutput
("DecayOutput",
"Option to control the output of the decay mode information",
&ModelGenerator::decayOutput_, 1, false, false);
static SwitchOption interfaceDecayOutputNone
(interfaceDecayOutput,
"None",
"No output",
0);
static SwitchOption interfaceDecayOutputPlain
(interfaceDecayOutput,
"Plain",
"Default plain text output",
1);
static SwitchOption interfaceDecayOutputSLHA
(interfaceDecayOutput,
"SLHA",
"Output in the Susy Les Houches Accord format",
2);
static Parameter<ModelGenerator,double> interfaceMinimumWidthFraction
("MinimumWidthFraction",
"Minimum fraction of the particle's mass the width can be"
" for the off-shell treatment.",
&ModelGenerator::minWidth_, 1e-6, 1e-15, 1.,
false, false, Interface::limited);
static Parameter<ModelGenerator,double> interfaceHowMuchOffShell
("HowMuchOffShell",
"The multiple of the particle's width by which it is allowed to be off-shell",
&ModelGenerator::howOffShell_, 5., 0.0, 100.,
false, false, Interface::limited);
}
namespace {
/// Helper function for sorting by mass
inline bool massIsLess(tcPDPtr a, tcPDPtr b) {
return a->mass() < b->mass();
}
// Helper function to find minimum possible mass of a particle
inline Energy minimumMass(tcPDPtr parent) {
Energy output(Constants::MaxEnergy);
for(set<tDMPtr>::const_iterator dit = parent->decayModes().begin();
dit != parent->decayModes().end(); ++dit) {
Energy outMass(ZERO);
for(unsigned int ix=0;ix<(**dit).orderedProducts().size();++ix) {
outMass += (**dit).orderedProducts()[ix]->massMin();
}
output = min(output,outMass);
}
return output;
}
}
void ModelGenerator::doinit() {
useMe();
Interfaced::doinit();
// make sure the model is initialized
Ptr<Herwig::StandardModel>::pointer model
= dynamic_ptr_cast<Ptr<Herwig::StandardModel>::pointer>(generator()->standardModel());
model->init();
// and the vertices
for(size_t iv = 0; iv < model->numberOfVertices(); ++iv)
model->vertex(iv)->init();
// uniq and sort DecayParticles list by mass
set<PDPtr> tmp(particles_.begin(),particles_.end());
particles_.assign(tmp.begin(),tmp.end());
sort(particles_.begin(),particles_.end(),massIsLess);
//create decayers and decaymodes (if necessary)
if( _theDecayConstructor ) {
_theDecayConstructor->init();
_theDecayConstructor->createDecayers(particles_,brMin_);
}
// write out decays with spin correlations
ostream & os = CurrentGenerator::current().misc();
ofstream ofs;
if ( decayOutput_ > 1 ) {
string filename
= CurrentGenerator::current().filename() + "-BR.spc";
ofs.open(filename.c_str());
}
if(decayOutput_!=0) {
if(decayOutput_==1) {
os << "# The decay modes listed below will have spin\n"
<< "# correlations included when they are generated.\n#\n#";
}
else {
ofs << "# Herwig decay tables in SUSY Les Houches accord format\n";
ofs << "Block DCINFO # Program information\n";
ofs << "1 Herwig # Decay Calculator\n";
ofs << "2 " << generator()->strategy()->versionstring()
<< " # Version number\n";
}
}
//create mass and width generators for the requested particles
set<PDPtr> offShell;
if( Offsel_ == 0 ) offShell = set<PDPtr>(offshell_.begin() ,offshell_.end() );
else offShell = set<PDPtr>(particles_.begin(),particles_.end());
for(PDVector::iterator pit = particles_.begin();
pit != particles_.end(); ++pit) {
tPDPtr parent = *pit;
// Check decays for ones where quarks cannot be put on constituent
// mass-shell
checkDecays(parent);
parent->reset();
// Now switch off the modes if needed
for(DecaySet::const_iterator it=parent->decayModes().begin();
it!=parent->decayModes().end();++it) {
if( _theDecayConstructor->disableDecayMode((**it).tag()) ) {
DMPtr mode = *it;
generator()->preinitInterface(mode, "Active", "set", "No");
if(mode->CC()) {
DMPtr CCmode = mode->CC();
generator()->preinitInterface(CCmode, "Active", "set", "No");
}
}
}
parent->update();
if( parent->CC() ) parent->CC()->synchronize();
if( parent->decaySelector().empty() ) {
parent->stable(true);
parent->width(ZERO);
parent->widthCut(ZERO);
parent->massGenerator(tGenericMassGeneratorPtr());
parent->widthGenerator(tGenericWidthGeneratorPtr());
}
else {
if(parent->mass()*minWidth_>parent->width()) {
parent->massGenerator(tGenericMassGeneratorPtr());
parent->widthGenerator(tGenericWidthGeneratorPtr());
}
else {
if( offShell.find(*pit) != offShell.end() ) {
createWidthGenerator(*pit);
}
else {
parent->massGenerator(tGenericMassGeneratorPtr());
parent->widthGenerator(tGenericWidthGeneratorPtr());
}
}
}
// set the offshellness
Energy minMass = minimumMass(parent);
Energy offShellNess = howOffShell_*parent->width();
if(minMass>parent->mass()-offShellNess) {
offShellNess = parent->mass()-minMass;
}
parent->widthCut(offShellNess);
if( parent->massGenerator() ) {
parent->massGenerator()->reset();
if(decayOutput_==1)
os << "# " <<parent->PDGName() << " will be considered off-shell.\n#\n";
}
if( parent->widthGenerator() ) parent->widthGenerator()->reset();
}
// loop again to initialise mass and width generators
// switch off modes and write output
for(PDVector::iterator pit = particles_.begin();
pit != particles_.end(); ++pit) {
tPDPtr parent = *pit;
if(parent->widthGenerator())
parent->widthGenerator()->init();
if(parent->massGenerator())
parent->massGenerator()->init();
// output the modes if needed
if( !parent->decaySelector().empty() ) {
if ( decayOutput_ == 2 )
writeDecayModes(ofs, parent);
else
writeDecayModes(os, parent);
}
}
//Now construct hard processes given that we know which
//objects have running widths
for(unsigned int ix=0;ix<hardProcessConstructors_.size();++ix) {
hardProcessConstructors_[ix]->init();
hardProcessConstructors_[ix]->constructDiagrams();
}
}
void ModelGenerator::checkDecays(PDPtr parent) {
if( parent->stable() ) {
if(parent->coloured())
cerr << "Warning: No decays for coloured particle " << parent->PDGName() << "\n\n"
<< "have been calcluated in BSM model.\n"
<< "This may cause problems in the hadronization phase.\n"
<< "You may have forgotten to switch on the decay mode calculation using\n"
<< " set TwoBodyDC:CreateDecayModes Yes\n"
<< " set ThreeBodyDC:CreateDecayModes Yes\n"
<< " set WeakDecayConstructor:CreateDecayModes Yes\n"
<< "or the decays of this particle are missing from your\n"
<< "input spectrum and decay file in the SLHA format.\n\n";
return;
}
DecaySet::iterator dit = parent->decayModes().begin();
DecaySet::iterator dend = parent->decayModes().end();
Energy oldwidth(parent->width()), newwidth(ZERO);
bool rescalebrat(false);
double brsum(0.);
for(; dit != dend; ++dit ) {
if( !(**dit).on() ) continue;
Energy release((**dit).parent()->mass());
tPDVector::const_iterator pit = (**dit).orderedProducts().begin();
tPDVector::const_iterator pend =(**dit).orderedProducts().end();
for( ; pit != pend; ++pit ) {
release -= (**pit).constituentMass();
}
if( (**dit).brat() < brMin_ || release < ZERO ) {
if( release < ZERO )
cerr << "Warning: The shower cannot be generated using this decay "
<< (**dit).tag() << " because it is too close to threshold.\nIt "
<< "will be switched off and the branching fractions of the "
<< "remaining modes rescaled.\n";
rescalebrat = true;
generator()->preinitInterface(*dit, "Active", "set", "No");
generator()->preinitInterface(*dit, "BranchingRatio",
"set", "0.0");
DecayIntegratorPtr decayer = dynamic_ptr_cast<DecayIntegratorPtr>((**dit).decayer());
if(decayer) {
generator()->preinitInterface(decayer->fullName(), "Initialize", "set","0");
}
}
else {
brsum += (**dit).brat();
newwidth += (**dit).brat()*oldwidth;
}
}
// if no modes left set stable
if(newwidth==ZERO) {
parent->stable(true);
parent->width(ZERO);
parent->widthCut(ZERO);
parent->massGenerator(tGenericMassGeneratorPtr());
parent->widthGenerator(tGenericWidthGeneratorPtr());
}
// otherwise rescale if needed
else if( ( rescalebrat || abs(brsum - 1.) > 1e-12 ) && !parent->decayModes().empty()) {
dit = parent->decayModes().begin();
dend = parent->decayModes().end();
double factor = oldwidth/newwidth;
brsum = 0.;
for( ; dit != dend; ++dit ) {
if( !(**dit).on() ) continue;
double newbrat = ((**dit).brat())*factor;
brsum += newbrat;
ostringstream brf;
brf << setprecision(13) << newbrat;
generator()->preinitInterface(*dit, "BranchingRatio",
"set", brf.str());
}
parent->width(newwidth);
if( newwidth > ZERO ) parent->cTau(hbarc/newwidth);
}
}
namespace {
struct DecayModeOrdering {
- bool operator()(tcDMPtr m1, tcDMPtr m2) {
+ bool operator()(tcDMPtr m1, tcDMPtr m2) const {
if(m1->brat()!=m2->brat()) {
return m1->brat()>m2->brat();
}
else {
if(m1->products().size()==m2->products().size()) {
ParticleMSet::const_iterator it1=m1->products().begin();
ParticleMSet::const_iterator it2=m2->products().begin();
do {
if((**it1).id()!=(**it2).id()) {
return (**it1).id()>(**it2).id();
}
++it1;
++it2;
}
while(it1!=m1->products().end()&&
it2!=m2->products().end());
assert(false);
}
else
return m1->products().size()<m2->products().size();
}
return false;
}
};
}
void ModelGenerator::writeDecayModes(ostream & os, tcPDPtr parent) const {
if(decayOutput_==0) return;
set<tcDMPtr,DecayModeOrdering> modes(parent->decayModes().begin(),
parent->decayModes().end());
if(decayOutput_==1) {
os << " Parent: " << parent->PDGName() << " Mass (GeV): "
<< parent->mass()/GeV << " Total Width (GeV): "
<< parent->width()/GeV << endl;
os << std::left << std::setw(40) << '#'
<< std::left << std::setw(20) << "Partial Width/GeV"
<< std::left << std::setw(20) << "BR" << "Yes/No\n";
for(set<tcDMPtr,DecayModeOrdering>::iterator dit=modes.begin();
dit!=modes.end();++dit)
os << std::left << std::setw(40) << (**dit).tag()
<< std::left << std::setw(20) << (**dit).brat()*parent->width()/GeV
<< std::left << std::setw(20) << (**dit).brat()
<< ((**dit).on() ? "Yes" : "No" ) << '\n';
os << "#\n#";
}
else if(decayOutput_==2) {
os << "# \t PDG \t Width\n";
os << "DECAY\t" << parent->id() << "\t" << parent->width()/GeV << "\t # " << parent->PDGName() << "\n";
for(set<tcDMPtr,DecayModeOrdering>::iterator dit=modes.begin();
dit!=modes.end();++dit) {
os << "\t" << std::left << std::setw(10)
<< (**dit).brat() << "\t" << (**dit).orderedProducts().size()
<< "\t";
for(unsigned int ix=0;ix<(**dit).orderedProducts().size();++ix)
os << std::right << std::setw(10)
<< (**dit).orderedProducts()[ix]->id() ;
for(unsigned int ix=(**dit).orderedProducts().size();ix<4;++ix)
os << "\t";
os << "# " << (**dit).tag() << "\n";
}
}
}
void ModelGenerator::createWidthGenerator(tPDPtr p) {
string wn = p->fullName() + string("-WGen");
string mn = p->fullName() + string("-MGen");
GenericMassGeneratorPtr mgen = dynamic_ptr_cast<GenericMassGeneratorPtr>
(generator()->preinitCreate("Herwig::GenericMassGenerator", mn));
BSMWidthGeneratorPtr wgen = dynamic_ptr_cast<BSMWidthGeneratorPtr>
(generator()->preinitCreate("Herwig::BSMWidthGenerator", wn));
//set the particle interface
mgen->particle(p);
wgen->particle(p);
//set the generator interfaces in the ParticleData object
generator()->preinitInterface(p, "Mass_generator","set", mn);
generator()->preinitInterface(p, "Width_generator","set", wn);
//allow the branching fraction of this particle type to vary
p->variableRatio(true);
if( p->CC() ) p->CC()->variableRatio(true);
//initialize the generators
generator()->preinitInterface(mgen, "Initialize", "set", "Yes");
generator()->preinitInterface(wgen, "Initialize", "set", "Yes");
string norm = BRnorm_ ? "Yes" : "No";
generator()->preinitInterface(wgen, "BRNormalize", "set", norm);
string twob = twoBodyOnly_ ? "Yes" : "No";
generator()->preinitInterface(wgen, "TwoBodyOnly", "set", twob);
ostringstream os;
os << Npoints_;
generator()->preinitInterface(wgen, "Points", "set", os.str());
os.str("");
os << Iorder_;
generator()->preinitInterface(wgen, "InterpolationOrder", "set",
os.str());
os.str("");
os << BWshape_;
generator()->preinitInterface(mgen, "BreitWignerShape", "set",
os.str());
}
diff --git a/Models/General/ModelGenerator.h b/Models/General/ModelGenerator.h
--- a/Models/General/ModelGenerator.h
+++ b/Models/General/ModelGenerator.h
@@ -1,219 +1,219 @@
// -*- C++ -*-
//
// ModelGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ModelGenerator_H
#define HERWIG_ModelGenerator_H
//
// This is the declaration of the ModelGenerator class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "DecayConstructor.h"
#include "HardProcessConstructor.h"
#include "ModelGenerator.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This class is designed to store the particles in some model and
* then call the appropriate function to setup the model
*
* @see \ref ModelGeneratorInterfaces "The interfaces"
* defined for ModelGenerator.
* @see Interfaced
*/
class ModelGenerator: public Interfaced {
public:
/**
* The default constructor.
*/
ModelGenerator() : particles_(0), offshell_(0),
Offsel_(0), BRnorm_(true),
Npoints_(10), Iorder_(1),
BWshape_(0), brMin_(1e-6), twoBodyOnly_(false),
decayOutput_(1), minWidth_(1e-6),
howOffShell_(5.) {}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Overloaded function from Interfaced
*/
virtual bool preInitialize() const {
return true;
}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ModelGenerator & operator=(const ModelGenerator &);
+ ModelGenerator & operator=(const ModelGenerator &) = delete;
private:
/**
* Check the decay modes a given particle type. This checks whether
* the decay has quarks in the final state and that they can be put on
* mass-shell during the shower.
* @param parent The parent particle
*/
void checkDecays(PDPtr parent);
/**
* Write out the spectrum of masses and decay modes
*/
void writeDecayModes(ostream & ofs, tcPDPtr parent) const;
/**
* Create mass and width generators to simulate off-shell effects
* @param p A pointer to the ParticleData object to create
* the width and mass generators for.
*/
void createWidthGenerator(tPDPtr p);
private:
/**
* Pointer to the TwoToTwoProcessConstructor
*/
vector<HPConstructorPtr> hardProcessConstructors_;
/**
* Pointer to DecayConstructor
*/
DecayConstructorPtr _theDecayConstructor;
/**
* Vector of ParticleData pointer
*/
PDVector particles_;
/** @name Width and Mass Generator variables. */
//@{
/**
* The particles to create MassGenerator and WidthGenerators
*/
PDVector offshell_;
/**
* Which particles to treat as off-shell. 1 treats all particles in
* particles_ vector as off-shell, 0 allows selection via
* offshell_ vector.
*/
int Offsel_;
/**
* Whether to normalise the partial widths to BR*Total width for
* an on-shell particle
*/
bool BRnorm_;
/**
* The number of points to include in the interpolation table
*/
int Npoints_;
/**
* The order for the interpolation
*/
unsigned int Iorder_;
/**
* The shape of the Breit-Wigner used in the mass generation
*/
int BWshape_;
/**
* The minimum branching ratio to use
*/
double brMin_;
/**
* Whether to use only two-body or all modes for running width
*/
bool twoBodyOnly_;
//@}
/**
* Option for the outputs of the decays to a file
*/
unsigned int decayOutput_;
/**
* Minimum fraction of particle's mass width can be for off-shell
* treatment
*/
double minWidth_;
/**
* How much a particle is allowed to be offshell
*/
double howOffShell_;
};
}
#endif /* HERWIG_ModelGenerator_H */
diff --git a/Models/General/NBodyDecayConstructorBase.h b/Models/General/NBodyDecayConstructorBase.h
--- a/Models/General/NBodyDecayConstructorBase.h
+++ b/Models/General/NBodyDecayConstructorBase.h
@@ -1,340 +1,340 @@
// -*- C++ -*-
//
// NBodyDecayConstructorBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_NBodyDecayConstructorBase_H
#define HERWIG_NBodyDecayConstructorBase_H
//
// This is the declaration of the NBodyDecayConstructorBase class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/Utilities/Exception.h"
#include "ThePEG/PDT/ParticleData.h"
#include "NBodyDecayConstructorBase.fh"
#include "PrototypeVertex.h"
#include "DecayConstructor.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This is the base class for NBodyDecayConstructors. An N-body
* decay constructor should inherit from this and implement the
* DecayList virtual funtcion to create the decays and decayers.
*
* @see \ref NBodyDecayConstructorBaseInterfaces "The interfaces"
* defined for NBodyDecayConstructor.
*/
class NBodyDecayConstructorBase: public Interfaced {
public:
/**
* The default constructor.
*/
NBodyDecayConstructorBase() :
init_(true),iteration_(1), points_(1000), info_(false),
createModes_(true), removeOnShell_(1), excludeEffective_(true),
minReleaseFraction_(1e-3), maxBoson_(1), maxList_(1),
includeTopOnShell_(false ), removeFlavourChangingVertices_(false),
removeSmallVertices_(false), minVertexNorm_(1e-8)
{}
/**
* Function used to determine allowed decaymodes, to be implemented
* in derived class.
* @param particles vector of ParticleData pointers containing
* particles in model
*/
virtual void DecayList(const set<PDPtr> & particles);
/**
* Number of outgoing lines. Required for correct ordering.
*/
virtual unsigned int numBodies() const = 0;
/**
* Set the pointer to the DecayConstrcutor
*/
void decayConstructor(tDecayConstructorPtr d) {
decayConstructor_ = d;
}
/**
* Remove flavour changing vertices ?
*/
bool removeFlavourChangingVertices() const {
return removeFlavourChangingVertices_;
}
/**
* Remove small vertices ?
*/
bool removeSmallVertices() const {
return removeSmallVertices_;
}
/**
* Minimum norm for vertex removal
*/
double minVertexNorm() const {
return minVertexNorm_;
}
protected:
/**
* Method to set up the decay mode, should be overidden in inheriting class
*/
virtual void createDecayMode(vector<NBDiagram> & mode,
bool possibleOnShell,
double symfac);
/**
* Set the branching ratio of this mode. This requires
* calculating a new width for the decaying particle and reweighting
* the current branching fractions.
* @param dm The decaymode for which to set the branching ratio
* @param pwidth The calculated width of the mode
*/
void setBranchingRatio(tDMPtr dm, Energy pwidth);
/**
* Set the interfaces of the decayers depending on the flags stored.
* @param name Fullname of the decayer in the EventGenerator
* including the path
*/
void setDecayerInterfaces(string name) const;
/**
* Whether to initialize decayers or not
*/
bool initialize() const { return init_; }
/**
* Number of iterations if initializing (default 1)
*/
int iteration() const { return iteration_; }
/**
* Number of points to do in initialization
*/
int points() const { return points_; }
/**
* Whether to output information on the decayers
*/
bool info() const { return info_; }
/**
* Whether to create the DecayModes as well as the Decayer objects
*/
bool createDecayModes() const { return createModes_; }
/**
* Maximum number of electroweak gauge bosons
*/
unsigned int maximumGaugeBosons() const { return maxBoson_;}
/**
* Maximum number of particles from the list whose decays we are calculating
*/
unsigned int maximumList() const { return maxList_;}
/**
* Minimum energy release fraction
*/
double minimumReleaseFraction() const {return minReleaseFraction_;}
/**
* Get the pointer to the DecayConstructor object
*/
tDecayConstructorPtr decayConstructor() const {
return decayConstructor_;
}
/**
* Option for on-shell particles
*/
unsigned int removeOnShell() const { return removeOnShell_; }
/**
* Check if a vertex is excluded
*/
bool excluded(VertexBasePtr vertex) const {
// skip an effective vertex
if( excludeEffective_ &&
vertex->orderInAllCouplings() != int(vertex->getNpoint())-2)
return true;
// check if explicitly forbidden
return excludedVerticesSet_.find(vertex)!=excludedVerticesSet_.end();
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NBodyDecayConstructorBase & operator=(const NBodyDecayConstructorBase &);
+ NBodyDecayConstructorBase & operator=(const NBodyDecayConstructorBase &) = delete;
private:
/**
* Whether to initialize decayers or not
*/
bool init_;
/**
* Number of iterations if initializing (default 1)
*/
int iteration_;
/**
* Number of points to do in initialization
*/
int points_;
/**
* Whether to output information on the decayers
*/
bool info_;
/**
* Whether to create the DecayModes as well as the Decayer objects
*/
bool createModes_;
/**
* Whether or not to remove on-shell diagrams
*/
unsigned int removeOnShell_;
/**
* Excluded Vertices
*/
vector<VertexBasePtr> excludedVerticesVector_;
/**
* Excluded Vertices
*/
set<VertexBasePtr> excludedVerticesSet_;
/**
* Excluded Particles
*/
vector<PDPtr> excludedParticlesVector_;
/**
* Excluded Particles
*/
set<PDPtr> excludedParticlesSet_;
/**
* Whether or not to exclude effective vertices
*/
bool excludeEffective_;
/**
* A pointer to the DecayConstructor object
*/
tDecayConstructorPtr decayConstructor_;
/**
* The minimum energy release for a three-body decay as a
* fraction of the parent mass
*/
double minReleaseFraction_;
/**
* Maximum number of EW gauge bosons
*/
unsigned int maxBoson_;
/**
* Maximum number of particles from the decaying particle list
*/
unsigned int maxList_;
/**
* Include on-shell for \f$t\to b W\f$
*/
bool includeTopOnShell_;
/**
* Remove flavour changing vertices ?
*/
bool removeFlavourChangingVertices_;
/**
* Remove small vertices ?
*/
bool removeSmallVertices_;
/**
* Minimum norm for vertex removal
*/
double minVertexNorm_;
};
/** An Exception class that can be used by all inheriting classes to
* indicate a setup problem. */
class NBodyDecayConstructorError : public Exception {
public:
NBodyDecayConstructorError() : Exception() {}
NBodyDecayConstructorError(const string & str,
Severity sev) : Exception(str,sev)
{}
};
}
#endif /* HERWIG_NBodyDecayConstructorBase_H */
diff --git a/Models/General/PrototypeVertex.h b/Models/General/PrototypeVertex.h
--- a/Models/General/PrototypeVertex.h
+++ b/Models/General/PrototypeVertex.h
@@ -1,477 +1,477 @@
// -*- C++ -*-
//
// PrototypeVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PrototypeVertex_H
#define HERWIG_PrototypeVertex_H
#include <stack>
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Utilities/EnumIO.h"
#include "NBodyDecayConstructorBase.fh"
//
// This is the declaration of the PrototypeVertex class.
//
namespace Herwig {
using namespace ThePEG;
using Helicity::VertexBasePtr;
class PrototypeVertex;
ThePEG_DECLARE_POINTERS(Herwig::PrototypeVertex,PrototypeVertexPtr);
/** Pair of int,double */
typedef pair<unsigned int, double> CFPair;
/**
* A struct to order the particles in the same way as in the DecayModes
*/
struct ParticleOrdering {
/**
* Operator for the ordering
* @param p1 The first ParticleData object
* @param p2 The second ParticleData object
*/
- bool operator() (tcPDPtr p1, tcPDPtr p2) {
+ bool operator() (tcPDPtr p1, tcPDPtr p2) const {
return abs(p1->id()) > abs(p2->id()) ||
( abs(p1->id()) == abs(p2->id()) && p1->id() > p2->id() ) ||
( p1->id() == p2->id() && p1->fullName() > p2->fullName() );
}
};
/**
* A struct to order the particles in the same way as in the DecayMode's
*/
struct VertexOrdering {
/**
* Operator for the ordering
* @param p1 The first ParticleData object
* @param p2 The second ParticleData object
*/
bool operator() (const pair< tPDPtr, PrototypeVertexPtr > & p1,
const pair< tPDPtr, PrototypeVertexPtr > & p2) const {
return abs(p1.first->id()) > abs(p2.first->id()) ||
( abs(p1.first->id()) == abs(p2.first->id()) && p1.first->id() > p2.first->id() ) ||
( p1.first->id() == p2.first->id() && p1.first->fullName() > p2.first->fullName() );
}
};
typedef multiset<pair< tPDPtr, PrototypeVertexPtr >,VertexOrdering > OrderedVertices;
/**
* A set of ParticleData objects ordered as for the DecayMode's
*/
typedef multiset<PDPtr,ParticleOrdering> OrderedParticles;
/**
* Storage of a potenital n-body decay
*/
class PrototypeVertex : public Base {
public:
/**
* Default Constructor
*/
PrototypeVertex() : npart(0), possibleOnShell(false) {}
/**
* Constructor
*/
PrototypeVertex(tPDPtr in, OrderedVertices out,
VertexBasePtr v, int n) :
incoming(in), outgoing(out), vertex(v), npart(n),
possibleOnShell(false) {}
/**
* Incoming particle
*/
tPDPtr incoming;
/**
* Outgoing particles
*/
OrderedVertices outgoing;
/**
* The vertex for the interaction
*/
VertexBasePtr vertex;
/**
* The parent of the vertex
*/
tPrototypeVertexPtr parent;
/**
* Number of particles
*/
unsigned int npart;
/**
* Outgoing particles
*/
mutable OrderedParticles outPart;
/**
* Can have on-shell intermediates
*/
bool possibleOnShell;
/**
* Increment the number of particles
*/
void incrementN(int in) {
npart += in;
if(parent) parent->incrementN(in);
}
/**
* Mass of the incoming particle
*/
Energy incomingMass() {
return incoming->mass();
}
/**
* Total mass of all the outgoing particles
*/
Energy outgoingMass() {
Energy mass(ZERO);
for(OrderedVertices::const_iterator it = outgoing.begin();
it!=outgoing.end();++it) {
mass += it->second ?
it->second->outgoingMass() : it->first->mass();
}
return mass;
}
/**
* Total constituent mass of all the outgoing particles
*/
Energy outgoingConstituentMass() {
Energy mass(ZERO);
for(OrderedVertices::const_iterator it = outgoing.begin();
it!=outgoing.end();++it) {
mass += it->second ?
it->second->outgoingConstituentMass() : it->first->constituentMass();
}
return mass;
}
/**
* Check the external particles
*/
bool checkExternal(bool first=true) {
if(outPart.empty()) setOutgoing();
if(first&&outPart.find(incoming)!=outPart.end()) return false;
bool output = true;
for(OrderedVertices::const_iterator it = outgoing.begin();
it!=outgoing.end();++it) {
if(it->second&& !it->second->checkExternal(false)) output = false;
}
return output;
}
/**
* Set the outgoing particles
*/
void setOutgoing() const {
assert(outPart.empty());
for(OrderedVertices::const_iterator it = outgoing.begin();
it!=outgoing.end();++it) {
if(it->second) {
it->second->setOutgoing();
outPart.insert(it->second->outPart.begin(),
it->second->outPart.end());
}
else
outPart.insert(it->first);
}
}
/**
* Are there potential on-shell intermediates?
*/
bool canBeOnShell(unsigned int opt,Energy maxMass,bool first);
/**
* Check if same external particles
*/
bool sameDecay(const PrototypeVertex & x) const;
/**
* Create a \f$1\to2\f$ prototype
*/
static void createPrototypes(tPDPtr inpart, VertexBasePtr vertex,
std::stack<PrototypeVertexPtr> & prototypes,
NBodyDecayConstructorBasePtr decayCon);
/**
* Expand the prototypes by adding more legs
*/
static void expandPrototypes(PrototypeVertexPtr proto, VertexBasePtr vertex,
std::stack<PrototypeVertexPtr> & prototypes,
const set<PDPtr> & excluded,
NBodyDecayConstructorBasePtr decayCon);
/**
* Copy the whole structure with a new branching
*/
static PrototypeVertexPtr replicateTree(PrototypeVertexPtr parent,
PrototypeVertexPtr oldChild,
PrototypeVertexPtr & newChild);
};
/**
* Output to a stream
*/
inline ostream & operator<<(ostream & os, const PrototypeVertex & diag) {
os << diag.incoming->PDGName() << " -> ";
bool seq=false;
for(OrderedVertices::const_iterator it = diag.outgoing.begin();
it!=diag.outgoing.end();++it) {
os << it->first->PDGName() << " ";
if(it->second) seq = true;
}
os << " decays via "
<< diag.vertex->fullName() << " in a "
<< diag.npart << "-body decay\n";
if(!seq) return os;
os << "Followed by\n";
for(OrderedVertices::const_iterator it = diag.outgoing.begin();
it!=diag.outgoing.end();++it) {
if(it->second) os << *it->second;
}
return os;
}
/**
* Test whether two diagrams are identical.
*/
inline bool operator==(const PrototypeVertex & x, const PrototypeVertex & y) {
if(x.incoming != y.incoming) return false;
if(x.vertex != y.vertex) return false;
if(x.npart != y.npart) return false;
if(x.outgoing.empty()&&y.outgoing.empty()) return true;
if(x.outgoing.size() != y.outgoing.size()) return false;
OrderedVertices::const_iterator xt = x.outgoing.begin();
OrderedVertices::const_iterator yt = y.outgoing.begin();
while(xt!=x.outgoing.end()) {
if(xt->first != yt->first) return false;
// special for identical particles
OrderedVertices::const_iterator lxt = x.outgoing.lower_bound(*xt);
OrderedVertices::const_iterator uxt = x.outgoing.upper_bound(*xt);
--uxt;
// just one particle
if(lxt==uxt) {
if(xt->second && yt->second) {
if(*(xt->second)==*(yt->second)) {
++xt;
++yt;
continue;
}
else return false;
}
else if(xt->second || yt->second)
return false;
++xt;
++yt;
}
// identical particles
else {
++uxt;
OrderedVertices::const_iterator lyt = y.outgoing.lower_bound(*xt);
OrderedVertices::const_iterator uyt = y.outgoing.upper_bound(*xt);
unsigned int nx=0;
for(OrderedVertices::const_iterator ixt=lxt;ixt!=uxt;++ixt) {++nx;}
unsigned int ny=0;
for(OrderedVertices::const_iterator iyt=lyt;iyt!=uyt;++iyt) {++ny;}
if(nx!=ny) return false;
vector<bool> matched(ny,false);
for(OrderedVertices::const_iterator ixt=lxt;ixt!=uxt;++ixt) {
bool found = false;
unsigned int iy=0;
for(OrderedVertices::const_iterator iyt=lyt;iyt!=uyt;++iyt) {
if(matched[iy]) {
++iy;
continue;
}
if( (!ixt->second &&!iyt->second) ||
( ixt->second&&iyt->second &&
*(ixt->second)==*(iyt->second)) ) {
matched[iy] = true;
found = true;
break;
}
++iy;
}
if(!found) return false;
}
xt=uxt;
yt=uyt;
}
}
return true;
}
/**
* A simple vertex for the N-body diagram
*/
struct NBVertex {
/**
* Constructor taking a prototype vertex as the arguments
*/
NBVertex(PrototypeVertexPtr proto = PrototypeVertexPtr() );
/**
* Incoming particle
*/
tPDPtr incoming;
/**
* Outgoing particles
*/
mutable OrderedParticles outgoing;
/**
* The vertices
*/
list<pair<PDPtr,NBVertex> > vertices;
/**
* The vertex
*/
VertexBasePtr vertex;
};
/**
* The NBDiagram struct contains information about a \f$1\to n\f$ decay
* that has been automatically generated.
*/
struct NBDiagram : public NBVertex {
/**
* Constructor taking a prototype vertex as the arguments*/
NBDiagram(PrototypeVertexPtr proto=PrototypeVertexPtr());
/**
* The type of channel
*/
vector<unsigned int> channelType;
/** Store colour flow at \f$N_c=3\f$ information */
mutable vector<CFPair> colourFlow;
/** Store colour flow at \f$N_c=\infty\f$ information */
mutable vector<CFPair> largeNcColourFlow;
};
/**
* Output operator to allow the structure to be persistently written
* @param os The output stream
* @param x The NBVertex
*/
inline PersistentOStream & operator<<(PersistentOStream & os,
const NBVertex & x) {
os << x.incoming << x.outgoing << x.vertices << x.vertex;
return os;
}
/**
* Input operator to allow persistently written data to be read in
* @param is The input stream
* @param x The NBVertex
*/
inline PersistentIStream & operator>>(PersistentIStream & is,
NBVertex & x) {
is >> x.incoming >> x.outgoing >> x.vertices >> x.vertex;
return is;
}
/**
* Output operator to allow the structure to be persistently written
* @param os The output stream
* @param x The NBDiagram
*/
inline PersistentOStream & operator<<(PersistentOStream & os,
const NBDiagram & x) {
os << x.incoming << x.channelType << x.outgoing << x.vertices << x.vertex
<< x.colourFlow << x.largeNcColourFlow;
return os;
}
/**
* Input operator to allow persistently written data to be read in
* @param is The input stream
* @param x The NBDiagram
*/
inline PersistentIStream & operator>>(PersistentIStream & is,
NBDiagram & x) {
is >> x.incoming >> x.channelType >> x.outgoing >> x.vertices >> x.vertex
>> x.colourFlow >> x.largeNcColourFlow;
return is;
}
/**
* Output a NBVertex to a stream
*/
inline ostream & operator<<(ostream & os, const NBVertex & vertex) {
os << vertex.incoming->PDGName() << " -> ";
bool seq=false;
for(list<pair<PDPtr,NBVertex> >::const_iterator it=vertex.vertices.begin();
it!=vertex.vertices.end();++it) {
os << it->first->PDGName() << " ";
if(it->second.incoming) seq = true;
}
os << "via vertex " << vertex.vertex->fullName() << "\n";
if(!seq) return os;
os << "Followed by\n";
for(list<pair<PDPtr,NBVertex> >::const_iterator it=vertex.vertices.begin();
it!=vertex.vertices.end();++it) {
if(it->second.incoming) os << it->second;
}
return os;
}
/**
* Output a NBDiagram to a stream
*/
inline ostream & operator<<(ostream & os, const NBDiagram & diag) {
os << diag.incoming->PDGName() << " -> ";
for(OrderedParticles::const_iterator it=diag.outgoing.begin();
it!=diag.outgoing.end();++it) {
os << (**it).PDGName() << " ";
}
os << " has order ";
for(unsigned int ix=0;ix<diag.channelType.size();++ix)
os << diag.channelType[ix] << " ";
os << "\n";
os << "First decay " << diag.incoming->PDGName() << " -> ";
bool seq=false;
for(list<pair<PDPtr,NBVertex> >::const_iterator it=diag.vertices.begin();
it!=diag.vertices.end();++it) {
os << it->first->PDGName() << " ";
if(it->second.incoming) seq = true;
}
os << "via vertex " << diag.vertex->fullName() << "\n";
if(!seq) return os;
os << "Followed by\n";
for(list<pair<PDPtr,NBVertex> >::const_iterator it=diag.vertices.begin();
it!=diag.vertices.end();++it) {
if(it->second.incoming) os << it->second;
}
return os;
}
}
#endif /* HERWIG_PrototypeVertex_H */
diff --git a/Models/General/QQHiggsProcessConstructor.h b/Models/General/QQHiggsProcessConstructor.h
--- a/Models/General/QQHiggsProcessConstructor.h
+++ b/Models/General/QQHiggsProcessConstructor.h
@@ -1,111 +1,111 @@
// -*- C++ -*-
#ifndef HERWIG_QQHiggsProcessConstructor_H
#define HERWIG_QQHiggsProcessConstructor_H
//
// This is the declaration of the QQHiggsProcessConstructor class.
//
#include "HardProcessConstructor.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the QQHiggsProcessConstructor class.
*
* @see \ref QQHiggsProcessConstructorInterfaces "The interfaces"
* defined for QQHiggsProcessConstructor.
*/
class QQHiggsProcessConstructor: public HardProcessConstructor {
public:
/**
* The default constructor.
*/
QQHiggsProcessConstructor();
/**
* Main function called to start constructing the diagrams for
* the 2->2 process
*/
void constructDiagrams();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- QQHiggsProcessConstructor & operator=(const QQHiggsProcessConstructor &);
+ QQHiggsProcessConstructor & operator=(const QQHiggsProcessConstructor &) = delete;
private:
/**
* Which partonic processes to include
*/
unsigned int _process;
/**
* Which outgoing quark flavours to include
*/
unsigned int _quarkFlavour;
/**
* The outgoing higgs bosons
*/
PDVector _higgs;
/**
* Treatment of the Higgs width
*/
unsigned int _shapeOpt;
};
}
#endif /* HERWIG_QQHiggsProcessConstructor_H */
diff --git a/Models/General/ResonantProcessConstructor.h b/Models/General/ResonantProcessConstructor.h
--- a/Models/General/ResonantProcessConstructor.h
+++ b/Models/General/ResonantProcessConstructor.h
@@ -1,211 +1,211 @@
// -*- C++ -*-
//
// ResonantProcessConstructor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ResonantProcessConstructor_H
#define HERWIG_ResonantProcessConstructor_H
//
// This is the declaration of the ResonantProcessConstructor class.
//
#include "HardProcessConstructor.h"
#include "ThePEG/Utilities/Exception.h"
#include "ResonantProcessConstructor.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This class is designed to construct the diagrams for resonant processes
* using a provdided set of particles as interemdiates.
*
* @see \ref ResonantProcessConstructorInterfaces "The interfaces"
* defined for ResonantProcessConstructor.
* @see HardProcessConstructor
*/
class ResonantProcessConstructor: public HardProcessConstructor {
public:
/** Set of ParticleData pointers */
typedef set<tPDPtr> tPDSet;
/** Nested vector of doubles. */
typedef vector<vector<double> > CFMatrix;
/** Enumeration for the direction */
enum direction {incoming, outgoing};
public:
/**
* The default constructor.
*/
ResonantProcessConstructor() :
processOption_(0), scaleChoice_(1), scaleFactor_(1.),
incoming_(0), intermediates_(0),
outgoing_(0), diagrams_(0)
{}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* The main function to create the resonant diagrams
*/
void constructDiagrams() ;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard HardProcessConstructor functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Utility function to help second vertex
*/
void constructVertex2(IDPair in, VertexBasePtr vertex,
PDPtr partc);
/**
* Function to create the appropriate diagrams
*/
void makeResonantDiagram(IDPair in, PDPtr offshell, long outa,
long outb, VBPair vertices);
/**
* Given a vertex and 2 particle id's find the possible states
* that can be the 3rd external particle
* @param vertex Pointer to the vertex
* @param part1 id of first particle
* @param d1 direction of particle one
* @param part2 id of other particle
* @param d2 direction of particle two
* @param d3 required direction of 3rd state (default = outgoing)
* @return container of third particles
*/
tPDSet search(VertexBasePtr vertex, long part1, direction d1,
long part2, direction d2, direction d3 = outgoing);
/**
* Return the pair of outgoing particles from the list
*/
IDPair find(long part, const PDVector & out) const;
/**
* Create a matrix element from the given resonant process diagram
*/
void createMatrixElement(const HPDiagram & diag) const;
/**
* Create the correct classname and objectname for a matrix element
*/
string MEClassname(const tcPDVector & extpart, tcPDPtr inter,
string & objname) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ResonantProcessConstructor & operator=(const ResonantProcessConstructor &);
+ ResonantProcessConstructor & operator=(const ResonantProcessConstructor &) = delete;
private:
/**
* Which types of processes to generate
*/
unsigned int processOption_;
/**
* Scale choice
*/
unsigned int scaleChoice_;
/**
* Prefactor for the scale calculation
*/
double scaleFactor_;
/**
* Storage for the required intermediate particles
*/
vector<PDPtr> incoming_;
/**
* Storage for the required intermediate particles
*/
vector<PDPtr> intermediates_;
/**
* Storage for the required intermediate particles
*/
vector<PDPtr> outgoing_;
/**
* Storage for the diagrams
*/
vector<HPDiagram> diagrams_;
};
/** Exception class indicating setup problem. */
class RPConstructorError : public Exception {};
}
#endif /* HERWIG_ResonantProcessConstructor_H */
diff --git a/Models/General/ThreeBodyDecayConstructor.h b/Models/General/ThreeBodyDecayConstructor.h
--- a/Models/General/ThreeBodyDecayConstructor.h
+++ b/Models/General/ThreeBodyDecayConstructor.h
@@ -1,167 +1,167 @@
// -*- C++ -*-
#ifndef HERWIG_ThreeBodyDecayConstructor_H
#define HERWIG_ThreeBodyDecayConstructor_H
//
// This is the declaration of the ThreeBodyDecayConstructor class.
//
#include "NBodyDecayConstructorBase.h"
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "TBDiagram.h"
#include "PrototypeVertex.h"
#include "Herwig/Decay/General/GeneralThreeBodyDecayer.fh"
namespace Herwig {
using namespace ThePEG;
using Helicity::VertexBasePtr;
/**
* The ThreeBodyDecayConstructor class inherits from the dummy base class
* NBodyDecayConstructorBase and implements the necessary functions in
* order to create the 3 body decaymodes for a given set of vertices
* stored in a Model class.
*
* @see \ref ThreeBodyDecayConstructorInterfaces "The interfaces"
* defined for ThreeBodyDecayConstructor.
* @see NBodyDecayConstructor
*/
class ThreeBodyDecayConstructor: public NBodyDecayConstructorBase {
public:
/**
* The default constructor.
*/
ThreeBodyDecayConstructor() :
includeIntermediatePhotons_(false),
interOpt_(0), widthOpt_(1), weakMassCut_(-GeV),
intOpt_(1), relErr_(1e-2) {}
/**
* Function used to determine allowed decaymodes, to be implemented
* in derived class.
*@param part vector of ParticleData pointers containing particles in model
*/
virtual void DecayList(const set<PDPtr> & part);
/**
* Number of outgoing lines. Required for correct ordering.
*/
virtual unsigned int numBodies() const { return 3; }
protected:
/**
* Create the decayer
* @param diagrams The diagrams for the decay
* @param inter Option for intermediates
*/
GeneralThreeBodyDecayerPtr createDecayer(vector<TBDiagram> & diagrams,
bool inter,double symfac) const;
/**
* Contruct the classname and object name for the Decayer
* @param incoming The incoming particle
* @param outgoing The decay products
* @param objname a string containing the default path of the Decayer object
*/
string DecayerClassName(tcPDPtr incoming, const OrderedParticles & outgoing,
string & objname) const;
/**
* Create the DecayMode from the diagrams
* @param diagrams The diagrams
* @param inter Option for intermediates
*/
virtual void createDecayMode(vector<NBDiagram> & mode,
bool possibleOnShell,
double symfac);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ThreeBodyDecayConstructor & operator=(const ThreeBodyDecayConstructor &);
+ ThreeBodyDecayConstructor & operator=(const ThreeBodyDecayConstructor &) = delete;
private:
/**
* Option for intermediate photons
*/
bool includeIntermediatePhotons_;
/**
* Option for the inclusion of intermediates
*/
unsigned int interOpt_;
/**
* How to treat the widths of the intermediate particles
*/
unsigned int widthOpt_;
/**
* Cut off or decays via the weak current
*/
Energy weakMassCut_;
/**
* Option for the integration to get the partial width
*/
unsigned int intOpt_;
/**
* Relative error for partial width integration
*/
double relErr_;
};
}
#endif /* HERWIG_ThreeBodyDecayConstructor_H */
diff --git a/Models/General/TwoBodyDecayConstructor.h b/Models/General/TwoBodyDecayConstructor.h
--- a/Models/General/TwoBodyDecayConstructor.h
+++ b/Models/General/TwoBodyDecayConstructor.h
@@ -1,177 +1,177 @@
// -*- C++ -*-
//
// TwoBodyDecayConstructor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TwoBodyDecayConstructor_H
#define HERWIG_TwoBodyDecayConstructor_H
//
// This is the declaration of the TwoBodyDecayConstructor class.
//
#include "NBodyDecayConstructorBase.h"
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "Herwig/Decay/General/GeneralTwoBodyDecayer.fh"
#include "Herwig/Shower/ShowerAlpha.h"
#include "TwoBodyDecay.h"
namespace Herwig {
using namespace ThePEG;
using Helicity::VertexBasePtr;
using Helicity::tVertexBasePtr;
/**
* The TwoBodyDecayConstructor class inherits from the dummy base class
* NBodyDecayConstructorBase and implements the necessary functions in
* order to create the 2 body decay modes for a given set of vertices
* stored in a Model class.
*
* @see \ref TwoBodyDecayConstructorInterfaces "The interfaces"
* defined for TwoBodyDecayConstructor.
* @see NBodyDecayConstructor
**/
class TwoBodyDecayConstructor: public NBodyDecayConstructorBase {
public:
/**
* The default constructor.
*/
TwoBodyDecayConstructor() : inter_(ShowerInteraction::Both) {
radiationVertices_[ShowerInteraction::QCD] = map<tPDPtr,VertexBasePtr>();
radiationVertices_[ShowerInteraction::QED] = map<tPDPtr,VertexBasePtr>();
}
/**
* Function used to determine allowed decaymodes
*@param part vector of ParticleData pointers containing particles in model
*/
virtual void DecayList(const set<PDPtr> & part);
/**
* Number of outgoing lines. Required for correct ordering.
*/
virtual unsigned int numBodies() const { return 2; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TwoBodyDecayConstructor & operator=(const TwoBodyDecayConstructor &);
+ TwoBodyDecayConstructor & operator=(const TwoBodyDecayConstructor &) = delete;
private:
/** @name Functions to create decayers and decaymodes. */
//@{
/**
* Function to create decays
* @param inpart Incoming particle
* @param vert The vertex to create decays for
* @param ilist Which list to search
* @param iv Row number in _theExistingDecayers member
* @return A vector a decay modes
*/
void createModes(tPDPtr inpart, VertexBasePtr vert,
unsigned int ilist,
multiset<TwoBodyDecay> & modes);
/**
* Function to create decayer for specific vertex
* @param decay decay mode for this decay
* member variable
*/
GeneralTwoBodyDecayerPtr createDecayer(TwoBodyDecay decay,
vector<VertexBasePtr> );
/**
* Create decay mode(s) from given part and decay modes
* @param decays The vector of decay modes
* @param decayer The decayer responsible for this decay
*/
void createDecayMode(multiset<TwoBodyDecay> & decays);
//@}
/**
* Get the vertex for QED/QCD radiation
*/
VertexBasePtr radiationVertex(tPDPtr particle,ShowerInteraction inter,
tPDPair children = tPDPair ());
private:
/**
* Map of particles and the vertices which generate their QCD
* radiation
*/
map<ShowerInteraction,map<tPDPtr,VertexBasePtr> > radiationVertices_;
/**
* Default choice for the strong coupling object for hard QCD radiation
*/
ShowerAlphaPtr alphaQCD_;
/**
* Default choice for the strong coupling object for hard QED radiation
*/
ShowerAlphaPtr alphaQED_;
/**
* Which type of corrections to the decays to include
*/
ShowerInteraction inter_;
};
}
#endif /* HERWIG_TwoBodyDecayConstructor_H */
diff --git a/Models/General/TwoToTwoProcessConstructor.h b/Models/General/TwoToTwoProcessConstructor.h
--- a/Models/General/TwoToTwoProcessConstructor.h
+++ b/Models/General/TwoToTwoProcessConstructor.h
@@ -1,313 +1,313 @@
// -*- C++ -*-
//
// TwoToTwoProcessConstructor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TwoToTwoProcessConstructor_H
#define HERWIG_TwoToTwoProcessConstructor_H
//
// This is the declaration of the TwoToTwoProcessConstructor class.
//
#include "HardProcessConstructor.h"
#include "ThePEG/Utilities/Exception.h"
#include "TwoToTwoProcessConstructor.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The TwoToTwoProcessConstructor is designed to construct the diagrams that are
* possible for a given set of incoming and outgoing particles.
*
* @see \ref TwoToTwoProcessConstructorInterfaces "The interfaces"
* defined for TwoToTwoProcessConstructor.
* @see HardProcessConstructor
*/
class TwoToTwoProcessConstructor: public HardProcessConstructor {
public:
/** Set of ParticleData pointers */
typedef set<tPDPtr> tPDSet;
/** Map of HPDiagrams. */
typedef multimap<HPDiagram, HPDiagram> HPDMap;
/** Enumeration for the direction */
enum direction {incoming, outgoing};
public:
/**
* The default constructor.
*/
TwoToTwoProcessConstructor();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Main function called to start constructing the diagrams for
* the 2->2 process
*/
void constructDiagrams();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard HardProcessConstructor functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TwoToTwoProcessConstructor & operator=(const TwoToTwoProcessConstructor &);
+ TwoToTwoProcessConstructor & operator=(const TwoToTwoProcessConstructor &) = delete;
private:
/** Functions to create the diagrams.*/
//@{
/**
* Given a vertex and 2 particle id's find the possible states
* that can be the 3rd external particle
* @param vertex Pointer to the vertex
* @param part1 id of first particle
* @param d1 direction of particle one
* @param part2 id of other particle
* @param d2 direction of particle two
* @param d3 required direction of 3rd state (default = outgoing)
* @return container of third particles
*/
tPDSet search(VertexBasePtr vertex, long part1, direction d1,
long part2, direction d2, direction d3 = outgoing);
/**
* Given a vertex and 3 particle id's find the possible states
* that can be the 4th external particle
* @param vertex Pointer to the vertex
* @param part1 id of first particle
* @param d1 direction of particle one
* @param part2 id of second particle
* @param d2 direction of particle two
* @param part3 id of third particle
* @param d3 direction of particle three
* @param d4 Required direction of fourth state (default = outgoing)
* @return container of fourth particles
*/
tPDSet search(VertexBasePtr vertex, long part1, direction d1, long part2,
direction d2, long part3, direction d3,
direction d4 = outgoing);
/**
* Create the resonance diagrams.
* @param inpp The incoming pair of particles.
* @param fs A possible final state.
* @param vertex The possible interaction vertex for the incoming pair
*/
void createSChannels(tcPDPair inpp, long fs, tVertexBasePtr vertex);
/**
* Create the scattering diagrams.
* @param inpp The incoming pair of particles.
* @param fs A possible final state.
* @param vertex The first vertex
*/
void createTChannels(tPDPair inpp, long fs, tVertexBasePtr vertex);
/**
* Populate the diagram structure
* @param in Pair of incoming particle id's
* @param out1 first outgoing particle
* @param out2 set of second outgoing particles
* @param inter pointer to particle data for intermediate
* @param chan the channel type
* @param vertices pair of vertices for the diagram
* @param order The order
*/
void makeDiagrams(IDPair in, long out1, const tPDSet & out2, PDPtr inter,
HPDiagram::Channel chan, VBPair vertices, BPair order);
/**
* Create diagrams from 4 point vertices
* @param parta id of first incoming particle
* @param partb id of second incoming particle
* @param partc id of first outgoing particle
* @param vert pointer to the vertex
*/
void makeFourPointDiagrams(long parta,long partb,long partc,
VertexBasePtr vert);
/**
* Create the matrix element that will calculate me2() for this
* process
* @param process vector of HardPrcoessDiagrams structs that store
* the information about the diagrams
*/
void createMatrixElement(const HPDVector & process) const;
//@}
/**
* Contruct the classname and object name for the matrix element
* @param extpart vector containing incoming and outgoing particle data pointers
* @param objname a string containing the default path of the ME object
*/
string MEClassname(const vector<tcPDPtr> & extpart,
string & objname) const;
private:
/**
* Required initial state particles
*/
PDVector incoming_;
/**
* Pairs of particles for initial state, ordered by spin or id.
* If both are of differing spin then lowest is first and if the spin is
* equal the particle goes first then the anti-particle. This is setup
* in the doinit() member.
*/
vector<tPDPair> incPairs_;
/**
* Required final state particles
*/
PDVector outgoing_;
/**
* Number of incoming particles
*/
unsigned int Nout_;
/**
* Number of vertices in the model
*/
unsigned int nv_;
/**
* The vertices
*/
vector<VertexBasePtr> vertices_;
/**
* Store the configuration of the diagrams
*/
HPDVector processes_;
/**
* Whether to include all diagrams or just those with strong
* coupling in them
*/
bool allDiagrams_;
/**
* Which types of processes to generate
*/
unsigned int processOption_;
/**
* Option for the scales
*/
unsigned int scaleChoice_;
/**
* Prefactor for the scale calculation
*/
double scaleFactor_;
/**
* Option to exclude certain intermediates
*/
vector<PDPtr> excluded_;
/**
* Option to exclude certain external particles
*/
vector<PDPtr> excludedExternal_;
/**
* Excluded Vertices
*/
vector<VertexBasePtr> excludedVertexVector_;
/**
* Excluded Vertices
*/
set<VertexBasePtr> excludedVertexSet_;
};
/** Exception class indicating setup problem. */
class TwoToTwoProcessConstructorError : public Exception {
public:
/**
* Exception for error handling
* @param str Error message
* @param sev Severity
*/
TwoToTwoProcessConstructorError(const string & str, Severity sev)
: Exception(str,sev) {}
};
}
#endif /* HERWIG_TwoToTwoProcessConstructor_H */
diff --git a/Models/General/VVSLoopVertex.h b/Models/General/VVSLoopVertex.h
--- a/Models/General/VVSLoopVertex.h
+++ b/Models/General/VVSLoopVertex.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
#ifndef HERWIG_VVSLoopVertex_H
#define HERWIG_VVSLoopVertex_H
// // This is the declaration of the VVSLoopVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/GeneralVVSVertex.h"
#include "VVSLoopVertex.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The <code>VVSLoopVertex</code> is designed to
* calculate the coefficents for the terms in the
* Passarino-Veltman tensor reduction scheme. A vertex
* class should inherit from this and implement it's own
* setCoupling member from which the VVSLoopVertex
* setCoupling member is called.
*/
class VVSLoopVertex: public Helicity::GeneralVVSVertex {
public:
/**
* The default constructor.
*/
VVSLoopVertex() : masses(0), type(0), couplings(0), Npart_(0), loopToolsInit_(false) {
kinematics(true);
}
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to first particle
*@param part3 ParticleData pointer to first particle
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
protected:
/**
* Vector of loop masses
*/
vector<Energy> masses;
/**
* Vector of loop types
*/
vector<PDT::Spin> type;
/**
* The left and right couplings for a fermion loop
*/
vector<pair<Complex, Complex> > couplings;
/**
* Set the number of particles in the loop
*/
void setNParticles(unsigned int npart) { Npart_ = npart; }
/**
* Is loopTools initialized
*/
bool loopToolsInitialized() { return loopToolsInit_; }
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VVSLoopVertex & operator=(const VVSLoopVertex &);
+ VVSLoopVertex & operator=(const VVSLoopVertex &) = delete;
private:
/**
* The number of particles in the loop
*/
unsigned int Npart_;
/**
* Loop tools initialised ?
*/
bool loopToolsInit_;
};
}
#endif /* HERWIG_VVSLoopVertex_H */
diff --git a/Models/General/WeakCurrentDecayConstructor.h b/Models/General/WeakCurrentDecayConstructor.h
--- a/Models/General/WeakCurrentDecayConstructor.h
+++ b/Models/General/WeakCurrentDecayConstructor.h
@@ -1,196 +1,196 @@
// -*- C++ -*-
//
// WeakCurrentDecayConstructor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_WeakCurrentDecayConstructor_H
#define HERWIG_WeakCurrentDecayConstructor_H
//
// This is the declaration of the WeakCurrentDecayConstructor class.
//
#include "NBodyDecayConstructorBase.h"
#include "ThePEG/Helicity/Vertex/VertexBase.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Decay/General/GeneralCurrentDecayer.fh"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "Herwig/Decay/WeakCurrents/WeakDecayCurrent.h"
#include "Herwig/Decay/General/GeneralCurrentDecayer.h"
#include "TwoBodyDecay.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the WeakCurrentDecayConstructor class.
*
* @see \ref WeakCurrentDecayConstructorInterfaces "The interfaces"
* defined for WeakCurrentDecayConstructor.
*/
class WeakCurrentDecayConstructor: public NBodyDecayConstructorBase {
public:
/**
* The default constructor.
*/
WeakCurrentDecayConstructor() : _masscut(5.*GeV) {}
/**
* Function used to determine allowed decaymodes, to be implemented
* in derived class.
*@param part vector of ParticleData pointers containing particles in model
*/
virtual void DecayList(const set<PDPtr> & part);
/**
* Number of outgoing lines. Required for correct ordering (do this one last)
*/
virtual unsigned int numBodies() const { return 1000; }
/**
* Cut off
*/
Energy massCut() const { return _masscut;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/** @name Functions to create decayers and decaymodes. */
//@{
/**
* Function to create decays
* @param inpart Incoming particle
* @param vert The vertex to create decays for
* @param ilist Which list to search
* @param iv Row number in _theExistingDecayers member
* @return vector of ParticleData ptrs
*/
vector<TwoBodyDecay>
createModes(const PDPtr inpart,const VertexBasePtr vert,
unsigned int ilist);
/**
* Function to create decayer for specific vertex
* @param vert Pointer to vertex
* @param icol Integer referring to the colmun in _theExistingDecayers
* @param ivert Integer referring to the row in _theExistingDecayers
* member variable
*/
GeneralCurrentDecayerPtr createDecayer(PDPtr in, PDPtr out1,
vector<tPDPtr> outCurrent,
VertexBasePtr vertex,
WeakDecayCurrentPtr current);
/**
* Create decay mode(s) from given part and decay modes
* @param inpart pointer to incoming particle
* @param decays list of allowed interactions
* @param decayer The decayer responsible for this decay
*/
void createDecayMode(vector<TwoBodyDecay> & decays);
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- WeakCurrentDecayConstructor & operator=(const WeakCurrentDecayConstructor &);
+ WeakCurrentDecayConstructor & operator=(const WeakCurrentDecayConstructor &) = delete;
private:
/**
* Model Pointer
*/
Ptr<Herwig::StandardModel>::pointer _theModel;
/**
* Cut-off on the mass difference
*/
Energy _masscut;
/**
* Tags for the modes
*/
vector<string> decayTags_;
/**
* Particles for the mode
*/
vector<vector<tPDPtr> > particles_;
/**
* Normalisation
*/
vector<double> _norm;
/**
* The current for the mode
*/
vector<WeakDecayCurrentPtr> _current;
};
}
#endif /* HERWIG_WeakCurrentDecayConstructor_H */
diff --git a/Models/LH/LHFFGVertex.h b/Models/LH/LHFFGVertex.h
--- a/Models/LH/LHFFGVertex.h
+++ b/Models/LH/LHFFGVertex.h
@@ -1,103 +1,103 @@
// -*- C++ -*-
#ifndef HERWIG_LHFFGVertex_H
#define HERWIG_LHFFGVertex_H
//
// This is the declaration of the LHFFGVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHFFGVertex class implements the couplings of the
* quarks and additional heavy top to the gluon in the Little Higgs
* model.
*/
class LHFFGVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHFFGVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHFFGVertex & operator=(const LHFFGVertex &);
+ LHFFGVertex & operator=(const LHFFGVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the strong coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_LHFFGVertex_H */
diff --git a/Models/LH/LHFFHVertex.cc b/Models/LH/LHFFHVertex.cc
--- a/Models/LH/LHFFHVertex.cc
+++ b/Models/LH/LHFFHVertex.cc
@@ -1,289 +1,289 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the LHFFHVertex class.
//
#include "LHFFHVertex.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
void LHFFHVertex::persistentOutput(PersistentOStream & os) const {
os << ounit(_coup,1./GeV) << _model;
}
void LHFFHVertex::persistentInput(PersistentIStream & is, int) {
is >> iunit(_coup,1./GeV) >> _model;
}
// Static variable needed for the type description system in ThePEG.
DescribeClass<LHFFHVertex,FFSVertex>
describeHerwigLHFFHVertex("Herwig::LHFFHVertex", "HwLHModel.so");
void LHFFHVertex::Init() {
static ClassDocumentation<LHFFHVertex> documentation
("The LHFFHVertex class implements the interaction of the fermions"
" and the Higgs bosons in the Little Higgs model");
}
LHFFHVertex::LHFFHVertex()
: _q2last(0.*GeV2) {
orderInGem(1);
orderInGs(0);
_masslast[0] = 0.*GeV;
_masslast[1] = 0.*GeV;
_idlast[0] = 0;
_idlast[1] = 0;
colourStructure(ColourStructure::DELTA);
}
void LHFFHVertex::doinit() {
// SM like higgs
for (int ix=1;ix<=6;++ix) {
addToList( -ix, ix, 25);
}
addToList( -6, 8, 25);
addToList( -8, 6, 25);
addToList( -8, 8, 25);
for(int ix=11;ix<16;ix+=2) {
addToList( -ix, ix, 25);
}
// phi0
for (int ix=1;ix<=6;++ix) {
addToList( -ix, ix, 35);
}
addToList( -6, 8, 35);
addToList( -8, 6, 35);
for(int ix=11;ix<16;ix+=2) {
addToList( -ix, ix, 35);
}
// phiP
for (int ix=1;ix<=6;++ix) {
addToList( -ix, ix, 36);
}
addToList( -6, 8, 36);
addToList( -8, 6, 36);
for(int ix=11;ix<16;ix+=2) {
addToList( -ix, ix, 36);
}
// phi +/-
for(int ix=1;ix<6;ix+=2) {
addToList( -ix-1, ix, 37);
addToList( -ix , ix+1, -37);
}
addToList( -8 , 5, 37);
addToList( -5 , 8, -37);
for(int ix=11;ix<16;ix+=2) {
addToList( -ix-1, ix, 37);
addToList( -ix , ix+1, -37);
}
_model =
dynamic_ptr_cast<cLHModelPtr>(generator()->standardModel());
if(!_model) throw InitException() << "Must be using the LHModel "
<< " in LHFFPVertex::doinit()"
<< Exception::runerror;
_coup.resize(11);
Energy v = _model->vev();
double s0 = _model->sinTheta0();
double sP = _model->sinThetaP();
double sPlus = _model->sinThetaPlus();
double s02 = sqr(s0);
double vf = _model->vev()/_model->f();
double xL = sqr(_model->lambda1())/(sqr(_model->lambda1())+sqr(_model->lambda2()));
double xR = sqr(_model->lambda1())/sqrt(sqr(_model->lambda1())+sqr(_model->lambda2()));
Energy mT = getParticleData(8)->mass();
// lightest higgs couplings
// coupling of light SM fermions
_coup[0] = (1.-0.5*s02+vf*s0/sqrt(2.)-2./3.*sqr(vf))/v;
// couplings to top quark
_coup[1] = (1.-0.5*s02+vf*s0/sqrt(2.)-2./3.*sqr(vf)+sqr(vf)*xL*(1.+xL))/v;
// couplings to the T quark
_coup[2] =-xR*(1.+xL)*vf/mT;
// couplings to tT
_coup[3] = xR/mT;
_coup[4] = vf/v*(1.+xL);
// phi 0
// light particles
_coup[5] = sqrt(0.5)/v*(vf-sqrt(2.)*s0);
// mixed
_coup[6] = sqrt(0.5)/v*(vf-sqrt(2.)*s0)*_model->lambda1()/_model->lambda2();
// phi P
_coup[7] = Complex(0.,1.)*sqrt(0.5)/v*(vf-sqrt(2.)*sP);
_coup[8] = Complex(0.,1.)*sqrt(0.5)/v*(vf-sqrt(2.)*sP)*_model->lambda1()/_model->lambda2();
// phi +/-
_coup[9] = -sqrt(0.5)/v*(vf-2.*sPlus);
_coup[9] = -sqrt(0.5)/v*(vf-2.*sPlus)*_model->lambda1()/_model->lambda2();
FFSVertex::doinit();
}
void LHFFHVertex::setCoupling(Energy2 q2,tcPDPtr a,tcPDPtr b, tcPDPtr c) {
int iferm=abs(a->id());
int ianti=abs(b->id());
// left and right couplings set to one
left (1.);
right(1.);
// first the overall normalisation
if(q2!=_q2last||_idlast[0]!=iferm||_idlast[1]!=ianti) {
_q2last = q2;
_idlast[0] = iferm;
if(_idlast[0]==8) _idlast[0]=6;
assert((_idlast[0]>=1 && _idlast[0]<=6 ) ||
(_idlast[0]>=11 && _idlast[0]<=16));
if(iferm==_idlast[0])
_masslast[0] = _model->mass(q2,a);
else
_masslast[0] = _model->mass(q2,getParticleData(ParticleID::t));
_idlast[1] = ianti;
if(_idlast[1]==8) _idlast[1]=6;
assert((_idlast[1]>=1 && _idlast[1]<=6 ) ||
(_idlast[1]>=11 && _idlast[1]<=16));
if(_idlast[0]!=_idlast[1]) {
if(ianti==_idlast[1])
_masslast[1] = _model->mass(q2,a);
else
_masslast[1] = _model->mass(q2,getParticleData(ParticleID::t));
}
else {
_masslast[1] = _masslast[0];
}
}
// SM like higgs
if(c->id()==ParticleID::h0) {
if(iferm==ianti) {
if((iferm>=1 && iferm<=5 ) ||
(iferm>=11 && iferm<=16)) {
norm(-Complex(_coup[0]*_masslast[0]));
}
else if(iferm==6) {
norm(-Complex(_coup[1]*_masslast[0]));
}
else if(iferm==8) {
norm(-Complex(_coup[2]*a->mass()));
}
else assert(false);
}
else {
assert( (iferm == 6 && ianti == 8 ) ||
(ianti == 6 && iferm == 8 ));
Complex cleft,cright;
if(iferm==6) {
- cleft = -_coup[3]*b->mass();
- cright = -_coup[4]*_masslast[0];
+ cleft = Complex(-_coup[3]*b->mass());
+ cright = Complex(-_coup[4]*_masslast[0]);
}
else {
- cleft = -_coup[3]*a->mass();
- cright = -_coup[4]*_masslast[0];
+ cleft = Complex(-_coup[3]*a->mass());
+ cright = Complex(-_coup[4]*_masslast[0]);
}
if(b->id()==ParticleID::tbar || c->id()==ParticleID::tbar) {
cright = conj(cleft);
cleft = 0.;
}
left (cleft );
right(cright);
norm(1.);
}
}
else if(c->id()==ParticleID::H0) {
if(iferm==ianti) {
if((iferm>=1 && iferm<=6 ) ||
(iferm>=11 && iferm<=16)) {
norm(-Complex(_coup[5]*_masslast[0]));
}
else assert(false);
}
else {
assert( (iferm == 6 && ianti == 8 ) ||
(iferm == 8 && ianti == 6 ) );
Complex cleft = Complex(_coup[6]*_masslast[0]);
Complex cright = 0.;
if(b->id()==ParticleID::tbar || c->id()==ParticleID::tbar) {
cright = conj(cleft);
cleft = 0.;
}
left (cleft );
right(cright);
norm(1.);
}
}
else if(c->id()==ParticleID::A0) {
left(-1.);
right(1.);
if(iferm==ianti) {
if((iferm>=1 && iferm<=6 ) ||
(iferm>=11 && iferm<=16)) {
if(iferm%2==0)
norm(-Complex( _coup[7]*_masslast[0]));
else
norm(-Complex(-_coup[7]*_masslast[0]));
}
else assert(false);
}
else {
assert( (iferm == 6 && ianti == 8 ) ||
(iferm == 8 && ianti == 6 ));
Complex cleft = Complex(_coup[8]*_masslast[0]);
Complex cright = 0.;
if(b->id()==ParticleID::tbar || c->id()==ParticleID::tbar) {
cright = conj(cleft);
cleft = 0.;
}
left (cleft );
right(cright);
norm(1.);
}
}
else if(c->id()==ParticleID::Hplus) {
norm(1.);
Complex cleft(0.),cright(0.);
if(iferm%2==0) {
if(iferm==ParticleID::t) {
- cleft = _masslast[0]*_coup[ 9];
+ cleft = Complex(_masslast[0]*_coup[ 9]);
}
else {
- cleft = _masslast[0]*_coup[10];
- cright = _masslast[1]*_coup[10];
+ cleft = Complex(_masslast[0]*_coup[10]);
+ cright = Complex(_masslast[1]*_coup[10]);
}
}
else {
if(ianti==ParticleID::t) {
- cleft = _masslast[1]*_coup[ 9];
+ cleft = Complex(_masslast[1]*_coup[ 9]);
}
else {
- cleft = _masslast[1]*_coup[10];
- cright = _masslast[0]*_coup[10];
+ cleft = Complex(_masslast[1]*_coup[10]);
+ cright = Complex(_masslast[0]*_coup[10]);
}
}
left ( cleft);
right(cright);
}
else if(c->id()==ParticleID::Hminus) {
norm(1.);
Complex cleft(0.),cright(0.);
if(iferm%2==0) {
if(iferm==ParticleID::t) {
- cright = _masslast[0]*_coup[ 9];
+ cright = Complex(_masslast[0]*_coup[ 9]);
}
else {
- cright = _masslast[0]*_coup[10];
- cleft = _masslast[1]*_coup[10];
+ cright = Complex(_masslast[0]*_coup[10]);
+ cleft = Complex(_masslast[1]*_coup[10]);
}
}
else {
if(ianti==ParticleID::t) {
- cright = _masslast[1]*_coup[ 9];
+ cright = Complex(_masslast[1]*_coup[ 9]);
}
else {
- cright = _masslast[1]*_coup[10];
- cleft = _masslast[0]*_coup[10];
+ cright = Complex(_masslast[1]*_coup[10]);
+ cleft = Complex(_masslast[0]*_coup[10]);
}
}
left ( cleft);
right(cright);
}
}
diff --git a/Models/LH/LHFFHVertex.h b/Models/LH/LHFFHVertex.h
--- a/Models/LH/LHFFHVertex.h
+++ b/Models/LH/LHFFHVertex.h
@@ -1,133 +1,133 @@
// -*- C++ -*-
#ifndef HERWIG_LHFFHVertex_H
#define HERWIG_LHFFHVertex_H
//
// This is the declaration of the LHFFHVertex class.
//
#include "LHModel.h"
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHFFHVertex class implements the couplings of the fermions to
* the Higgs bosons of the Little Higgs model.
*/
class LHFFHVertex: public Helicity::FFSVertex {
public:
/**
* The default constructor.
*/
LHFFHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param ioff Which particle is off-shell
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHFFHVertex & operator=(const LHFFHVertex &);
+ LHFFHVertex & operator=(const LHFFHVertex &) = delete;
private:
/**
* Pointer to the SM object.
*/
tcLHModelPtr _model;
/**
* Storage of the couplings.
*/
//@{
/**
* The PDG code of the last fermion the coupling was evaluated for.
*/
int _idlast[2];
/**
* The last \f$q^2\f$ the coupling was evaluated at.
*/
Energy2 _q2last;
/**
* The mass of the last fermion for which the coupling was evaluated.
*/
Energy _masslast[2];
/**
* The factors for the individual interactions
*/
vector<complex<InvEnergy> > _coup;
//@}
};
}
#endif /* HERWIG_LHFFHVertex_H */
diff --git a/Models/LH/LHFFPVertex.h b/Models/LH/LHFFPVertex.h
--- a/Models/LH/LHFFPVertex.h
+++ b/Models/LH/LHFFPVertex.h
@@ -1,135 +1,135 @@
// -*- C++ -*-
#ifndef HERWIG_LHFFPVertex_H
#define HERWIG_LHFFPVertex_H
//
// This is the declaration of the LHFFPVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "LHModel.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHFFPVertex class implements the couplings of the fermions,
* both of the Standard Model and the additional heavy top to the
* photon and \f$A_H\f$ bosons in the Little Higgs model.
*/
class LHFFPVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHFFPVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHFFPVertex & operator=(const LHFFPVertex &);
+ LHFFPVertex & operator=(const LHFFPVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The charge of the Standard Model fermions.
*/
vector<double> _charge;
/**
* The last value of the coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* Left couplings for the heavy photon
*/
vector<double> _gl;
/**
* Right couplings for the heavy photon
*/
vector<double> _gr;
//@}
};
}
#endif /* HERWIG_LHFFPVertex_H */
diff --git a/Models/LH/LHFFWVertex.h b/Models/LH/LHFFWVertex.h
--- a/Models/LH/LHFFWVertex.h
+++ b/Models/LH/LHFFWVertex.h
@@ -1,155 +1,155 @@
// -*- C++ -*-
#ifndef HERWIG_LHFFWVertex_H
#define HERWIG_LHFFWVertex_H
//
// This is the declaration of the LHFFWVertex class.
//
#include "LHModel.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHFFWVertex class implements the couplings of the fermions, both of
* the Standard Model and the additional heavy top, to the \f$W^\pm\f$ and
* \f$W_H^\pm\f$ bosons in the Little Higgs model.
*/
class LHFFWVertex: public ThePEG::Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHFFWVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHFFWVertex & operator=(const LHFFWVertex &);
+ LHFFWVertex & operator=(const LHFFWVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The elements of the CKM matrix.
*/
vector<vector<Complex> > _ckm;
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* The correction factor for the Standard Model pieces
*/
double _corrL;
/**
* The correction factor for the heavy W
*/
double _corrH;
/**
* The correction factor for the top quark pieces for the SM W
*/
double _tcorrL;
/**
* The correction factor for the top quark pieces for the heavy W
*/
double _tcorrH;
/**
* The correction factor for the coupling of the heavy top and SM W
*/
double _tHcorrL;
/**
* The correction factor for the coupling of the heavy top and the heavy W
*/
double _tHcorrH;
//@}
};
}
#endif /* HERWIG_LHFFWVertex_H */
diff --git a/Models/LH/LHFFZVertex.h b/Models/LH/LHFFZVertex.h
--- a/Models/LH/LHFFZVertex.h
+++ b/Models/LH/LHFFZVertex.h
@@ -1,137 +1,137 @@
// -*- C++ -*-
#ifndef HERWIG_LHFFZVertex_H
#define HERWIG_LHFFZVertex_H
//
// This is the declaration of the LHFFZVertex class.
//
#include "LHModel.h"
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
/**
* The LHFFZVertex class implements the couplings of the fermion,
* both of the Standard Model and the additional heavy top to the
* \f$Z^0\f$ and \f$Z_H\f$ bosons in the Little Higgs model.
*/
class LHFFZVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHFFZVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHFFZVertex & operator=(const LHFFZVertex &);
+ LHFFZVertex & operator=(const LHFFZVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The left couplings of the Standard Model fermions to the Z.
*/
vector<double> _gl;
/**
* The right couplings of the Standard Model fermions to the Z.
*/
vector<double> _gr;
/**
* The left couplings of the Standard Model fermions to the heavy Z.
*/
vector<double> _glH;
/**
* The right couplings of the Standard Model fermions to the heavy Z.
*/
vector<double> _grH;
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_LHFFZVertex_H */
diff --git a/Models/LH/LHModel.h b/Models/LH/LHModel.h
--- a/Models/LH/LHModel.h
+++ b/Models/LH/LHModel.h
@@ -1,289 +1,289 @@
// -*- C++ -*-
#ifndef HERWIG_LHModel_H
#define HERWIG_LHModel_H
//
// This is the declaration of the LHModel class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSSVertex.h"
#include "LHModel.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The LHModel class is the main class for the implementation of the Little Higgs model in Herwig.
* In inherits from the StandardModel class and implements the calcuation of the couplings
* and masses in the Little Higgs model and storage of the additional couplings.
*
* @see \ref LHModelInterfaces "The interfaces"
* defined for LHModel.
*/
class LHModel: public BSMModel {
public:
/**
* The default constructor.
*/
LHModel();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Access to the parameters of the model
*/
//@{
/**
* The \f$\lambda_1\f$ top Yukawa coupling
*/
double lambda1() const {return _lambda1;}
/**
* The \f$\lambda_2\f$ top Yukawa coupling
*/
double lambda2() const {return _lambda2;}
/**
* The sine of the \f$\theta\f$ mixing angle
*/
double sinTheta() const {return _s;}
/**
* The cosine of the \f$\theta\f$ mixing angle
*/
double cosTheta() const {return _c;}
/**
* The sine of the \f$\theta'\f$ mixing angle
*/
double sinThetaPrime() const {return _sp;}
/**
* The cosine of the \f$\theta'\f$ mixing angle
*/
double cosThetaPrime() const {return _cp;}
/**
* The sine of the Higgs mixing angle
*/
double sinTheta0() const {return _s0;}
/**
* The cosine of the Higgs mixing angle
*/
double cosTheta0() const {return _c0;}
/**
* The sine of the pseudoscalar Higgs mixing angle
*/
double sinThetaP() const {return _sP;}
/**
* The cosine of the pseudoscalar Higgs mixing angle
*/
double cosThetaP() const {return _cP;}
/**
* The sine of the charged Higgs mixing angle
*/
double sinThetaPlus() const {return _sPlus;}
/**
* The cosine of the charged Higgs mixing angle
*/
double cosThetaPlus() const {return _cPlus;}
/**
* The vacuum expection value
*/
Energy vev() const {return _v;}
/**
* The vacuum expection value
*/
Energy vevPrime() const {return _v*_vacratio;}
/**
* The \f$f\f$ scale of the non-linear \f$\sigma\f$-model
*/
Energy f() const {return _f;}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHModel & operator=(const LHModel &);
+ LHModel & operator=(const LHModel &) = delete;
private:
/**
* Parameters for the model
*/
//@{
/**
* The value of \f$\cot\theta\f$ for the mixing with the \f$g\f$ coupling
*/
double _cott;
/**
* The value of \f$\tan\theta'\f$ for the mixing with the \f$g'\f$ coupling
*/
double _tantp;
/**
* The vacuum expection valve
*/
Energy _v;
/**
* The ratio \f$\lambda_2/\lambda_1\f$
*/
double _lamratio;
/**
* The mass of the lightest Higgs boson
*/
Energy _mH;
/**
* The ratio of the vacuum exception values \f$v'/v\f$
*/
double _vacratio;
/**
* The scale for the non-linear \f$\sigma\f$-model
*/
Energy _f;
/**
* The top Yukawa couplings
*/
double _lambda1,_lambda2;
/**
* The sine of the \f$\theta\f$ mixing angle
*/
double _s;
/**
* The cosine of the \f$\theta\f$ mixing angle
*/
double _c;
/**
* The sine of the \f$\theta'\f$ mixing angle
*/
double _sp;
/**
* The cosine of the \f$\theta'\f$ mixing angle
*/
double _cp;
/**
* The sine of the Higgs mixing angle
*/
double _s0;
/**
* The cosine of the Higgs mixing angle
*/
double _c0;
/**
* The sine of the pseudoscalar Higgs mixing angle
*/
double _sP;
/**
* The cosine of the pseudoscalar Higgs mixing angle
*/
double _cP;
/**
* The sine of the charged Higgs mixing angle
*/
double _sPlus;
/**
* The cosine of the charged Higgs mixing angle
*/
double _cPlus;
//@}
/**
* Additional vertices
*/
//@{
/**
* WHH Vertex
*/
AbstractVSSVertexPtr WHHVertex_;
//@}
};
}
#endif /* HERWIG_LHModel_H */
diff --git a/Models/LH/LHWHHVertex.h b/Models/LH/LHWHHVertex.h
--- a/Models/LH/LHWHHVertex.h
+++ b/Models/LH/LHWHHVertex.h
@@ -1,118 +1,118 @@
// -*- C++ -*-
#ifndef HERWIG_LHWHHVertex_H
#define HERWIG_LHWHHVertex_H
//
// This is the declaration of the LHWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHWHHVertex class implements the coupling of an electroweak gauge
* boson to a pair of Higgs bosons in the Little Higgs model.
*/
class LHWHHVertex: public Helicity::VSSVertex {
public:
/**
* The default constructor.
*/
LHWHHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHWHHVertex & operator=(const LHWHHVertex &);
+ LHWHHVertex & operator=(const LHWHHVertex &) = delete;
private:
/**
* The value of the coupling when last evaluated
*/
Complex couplast_;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 q2last_;
/**
* Couplings
*/
vector<Complex> coup_;
};
}
#endif /* HERWIG_LHWHHVertex_H */
diff --git a/Models/LH/LHWWHHVertex.h b/Models/LH/LHWWHHVertex.h
--- a/Models/LH/LHWWHHVertex.h
+++ b/Models/LH/LHWWHHVertex.h
@@ -1,121 +1,121 @@
// -*- C++ -*-
#ifndef HERWIG_LHWWHHVertex_H
#define HERWIG_LHWWHHVertex_H
//
// This is the declaration of the LHWWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHWWHHVertex class implements the coupling of a pair of
* electroweak gauge bosons and a pair of Higgs bosons in the Little Higgs model.
*/
class LHWWHHVertex: public Helicity::VVSSVertex {
public:
/**
* The default constructor.
*/
LHWWHHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHWWHHVertex & operator=(const LHWWHHVertex &);
+ LHWWHHVertex & operator=(const LHWWHHVertex &) = delete;
private:
/**
* The value of the coupling when last evaluated
*/
Complex couplast_;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 q2last_;
/**
* Couplings
*/
vector<Complex> coup_;
};
}
#endif /* HERWIG_LHWWHHVertex_H */
diff --git a/Models/LH/LHWWHVertex.h b/Models/LH/LHWWHVertex.h
--- a/Models/LH/LHWWHVertex.h
+++ b/Models/LH/LHWWHVertex.h
@@ -1,127 +1,127 @@
// -*- C++ -*-
#ifndef HERWIG_LHWWHVertex_H
#define HERWIG_LHWWHVertex_H
//
// This is the declaration of the LHWWHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
#include "LHModel.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHWWHVertex class implements the couplings of two electroweak
* gauge bosons to a Higgs boson in the Little Higgs model including the additional
* heavy photon, Z and W bosons in the model and the triplet Higgs bosons.
*/
class LHWWHVertex: public Helicity::VVSVertex {
public:
/**
* The default constructor.
*/
LHWWHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHWWHVertex & operator=(const LHWWHVertex &);
+ LHWWHVertex & operator=(const LHWWHVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* Couplings for the different interactions
*/
vector<Energy> _coup;
//@}
};
}
#endif /* HERWIG_LHWWHVertex_H */
diff --git a/Models/LH/LHWWWVertex.h b/Models/LH/LHWWWVertex.h
--- a/Models/LH/LHWWWVertex.h
+++ b/Models/LH/LHWWWVertex.h
@@ -1,131 +1,131 @@
// -*- C++ -*-
#ifndef HERWIG_LHWWWVertex_H
#define HERWIG_LHWWWVertex_H
//
// This is the declaration of the LHWWWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "LHModel.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::Direction;
/**
* The LHWWWVertex class implements the triple boson coupling in the Little
* Higgs model for the electroweak bosons of the Standard Model and the
* additional \f$A_H\f$, \f$Z_H\f$ and \f$W_H^\pm\f$ bosons.
*/
class LHWWWVertex: public Helicity::VVVVertex {
public:
/**
* The default constructor.
*/
inline LHWWWVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param d1 The direction for the first particle.
* @param d2 The direction for the second particle.
* @param d3 The direction for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHWWWVertex & operator=(const LHWWWVertex &);
+ LHWWWVertex & operator=(const LHWWWVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The correction factors for the different interacting particles
*/
vector<double> _corr;
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_LHWWWVertex_H */
diff --git a/Models/LH/LHWWWWVertex.h b/Models/LH/LHWWWWVertex.h
--- a/Models/LH/LHWWWWVertex.h
+++ b/Models/LH/LHWWWWVertex.h
@@ -1,126 +1,126 @@
// -*- C++ -*-
#ifndef HERWIG_LHWWWWVertex_H
#define HERWIG_LHWWWWVertex_H
//
// This is the declaration of the LHWWWWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVVertex.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The LHWWWWVertex class implements the quartic self-couplings of electroweak
* gauge bosons in the Little Higgs model.
*/
class LHWWWWVertex: public VVVVVertex {
public:
/**
* The default constructor.
*/
LHWWWWVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHWWWWVertex & operator=(const LHWWWWVertex &);
+ LHWWWWVertex & operator=(const LHWWWWVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* Couplings for the different bosons
*/
vector<double> _coup;
//@}
};
}
#endif /* HERWIG_LHWWWWVertex_H */
diff --git a/Models/LHTP/LHTPFFGVertex.h b/Models/LHTP/LHTPFFGVertex.h
--- a/Models/LHTP/LHTPFFGVertex.h
+++ b/Models/LHTP/LHTPFFGVertex.h
@@ -1,103 +1,103 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPFFGVertex_H
#define HERWIG_LHTPFFGVertex_H
//
// This is the declaration of the LHTPFFGVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHTPFFGVertex class implements the coupling of the
* gluon to the coloured fermions, the SM quarks, the extra top-like quark
* and the T-parity odd quarks of the Little Higgs model with T-parity.
*/
class LHTPFFGVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHTPFFGVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPFFGVertex & operator=(const LHTPFFGVertex &);
+ LHTPFFGVertex & operator=(const LHTPFFGVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the strong coupling calculated.
*/
Complex coupLast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2Last_;
//@}
};
}
#endif /* HERWIG_LHTPFFGVertex_H */
diff --git a/Models/LHTP/LHTPFFHVertex.cc b/Models/LHTP/LHTPFFHVertex.cc
--- a/Models/LHTP/LHTPFFHVertex.cc
+++ b/Models/LHTP/LHTPFFHVertex.cc
@@ -1,388 +1,388 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the LHTPFFHVertex class.
//
#include "LHTPFFHVertex.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
void LHTPFFHVertex::persistentOutput(PersistentOStream & os) const {
os << ounit(cL_,1./GeV) << ounit(cR_,1./GeV) << model_;
}
void LHTPFFHVertex::persistentInput(PersistentIStream & is, int) {
is >> iunit(cL_,1./GeV) >> iunit(cR_,1./GeV) >> model_;
}
// Static variable needed for the type description system in ThePEG.
DescribeClass<LHTPFFHVertex,FFSVertex>
describeHerwigLHTPFFHVertex("Herwig::LHTPFFHVertex", "HwLHTPModel.so");
void LHTPFFHVertex::Init() {
static ClassDocumentation<LHTPFFHVertex> documentation
("The LHTPFFHVertex class implements the interaction of the fermions"
" and the Higgs bosons in the Little Higgs model with T-parity");
}
LHTPFFHVertex::LHTPFFHVertex()
: q2Last_(ZERO) {
orderInGem(1);
orderInGs(0);
massLast_[0] = 0.*GeV;
massLast_[1] = 0.*GeV;
idLast_[0] = 0;
idLast_[1] = 0;
colourStructure(ColourStructure::DELTA);
}
void LHTPFFHVertex::doinit() {
// SM like higgs
addToList( -3, 3, 25);
addToList( -4, 4, 25);
addToList( -5, 5, 25);
addToList( -6, 6, 25);
addToList( -6, 8, 25);
addToList( -8, 6, 25);
addToList( -8, 8, 25);
addToList( -13, 13, 25);
addToList( -15, 15, 25);
addToList( -4000002, 4000002, 25);
addToList( -4000004, 4000004, 25);
addToList( -4000006, 4000006, 25);
addToList( -4000012, 4000012, 25);
addToList( -4000014, 4000014, 25);
addToList( -4000016, 4000016, 25);
// phi0
addToList( -3 , 4000003, 35);
addToList( -4 , 4000004, 35);
addToList( -5 , 4000005, 35);
addToList( -4000003, 3, 35);
addToList( -4000004, 4, 35);
addToList( -4000005, 5, 35);
addToList( -6 , 4000006, 35);
addToList( -8 , 4000006, 35);
addToList( -4000006, 6, 35);
addToList( -4000006, 8, 35);
// phiP
addToList( -2 , 4000002, 36);
addToList( -3 , 4000003, 36);
addToList( -4 , 4000004, 36);
addToList( -5 , 4000005, 36);
addToList( -4000002, 2, 36);
addToList( -4000003, 3, 36);
addToList( -4000004, 4, 36);
addToList( -4000005, 5, 36);
addToList( -12 , 4000012, 36);
addToList( -14 , 4000014, 36);
addToList( -16 , 4000016, 36);
addToList( -4000012, 12, 36);
addToList( -4000014, 14, 36);
addToList( -4000016, 16, 36);
addToList( -6 , 4000006, 36);
addToList( -6 , 4000008, 36);
addToList( -8 , 4000006, 36);
addToList( -8 , 4000008, 36);
addToList( -4000006, 6, 36);
addToList( -4000008, 6, 36);
addToList( -4000006, 8, 36);
addToList( -4000008, 8, 36);
// phi +/-
addToList( -1 , 4000002, -37);
addToList( -3 , 4000004, -37);
addToList( -5 , 4000006, -37);
addToList( -4000001, 2, -37);
addToList( -4000003, 4, -37);
addToList( -4000005, 6, -37);
addToList( -4000005, 8, -37);
addToList( -4000002, 1, 37);
addToList( -4000004, 3, 37);
addToList( -4000006, 5, 37);
addToList( -2 , 4000001, 37);
addToList( -4 , 4000003, 37);
addToList( -6 , 4000005, 37);
addToList( -8 , 4000005, 37);
addToList( -11 , 4000012, -37);
addToList( -13 , 4000014, -37);
addToList( -15 , 4000016, -37);
addToList( -4000011, 12, -37);
addToList( -4000013, 14, -37);
addToList( -4000015, 16, -37);
addToList( -4000012, 11 , 37);
addToList( -4000014, 13 , 37);
addToList( -4000016, 15 , 37);
addToList( -12, 4000011, 37);
addToList( -14, 4000013, 37);
addToList( -16, 4000015, 37);
model_ =
dynamic_ptr_cast<cLHTPModelPtr>(generator()->standardModel());
if(!model_) throw InitException() << "Must be using the LHModel "
<< " in LHFFPVertex::doinit()"
<< Exception::runerror;
cL_ .resize(18);
cR_ .resize(18);
Energy v = model_->vev();
Energy f = model_->f();
double vf = model_->vev()/model_->f();
double sa = model_->sinAlpha();
double ca = model_->cosAlpha();
// lightest higgs couplings
// coupling of light SM fermions
cL_[0] = cR_[0] = 1./v;
// couplings to top quarks
cL_[1] = cR_[1] = sa*ca/f;
cL_[2] = -sa/ca/v;
cR_[2] = sqr(ca)*vf/v;
// couplings to T-odd quarks
cL_[3] = cR_[3] = 0.5*sqrt(0.5)/f*model_->kappaQuark();
// couplings to T-odd leptons
cL_[4] = cR_[4] = 0.5*sqrt(0.5)/f*model_->kappaLepton();
// Phi0
// quark, T-odd quark
cL_[5] = sqrt(0.5)/f;
cR_[5] = ZERO;
// and top quarks
cL_[6] = sqrt(0.5)*model_->cosThetaR()/f/ca;
cR_[6] = ZERO;
cL_[7] = sqrt(0.5)*model_->sinThetaR()/f/ca;
cR_[7] = ZERO;
// PhiP
// quark, T-odd quark
cL_[8] = vf/f*model_->kappaQuark()/12;
cR_[8] = sqrt(0.5)/f;
// lepton, T-odd lepton
cL_[9] = vf/f*model_->kappaLepton()/12;
cR_[9] = ZERO;
// top, T_-
cL_[10] = model_->cosThetaR()*sqrt(2.)*vf/f/ca/3;
cR_[10] = ZERO;
cL_[11] = model_->sinThetaR()*sqrt(2.)*vf/f/ca/3;
cR_[11] = ZERO;
// top, t_-
cL_[12] = model_->cosThetaL()*vf/f/12.*model_->kappaQuark();
cR_[12] = model_->cosThetaR()*sqrt(0.5)/f/ca;
cL_[13] = model_->sinThetaL()*vf/f/12.*model_->kappaQuark();
cR_[13] = model_->sinThetaR()*sqrt(0.5)/f/ca;
// Phi +/-
cL_[14] = vf/f*model_->kappaLepton()/24.;
cR_[14] = ZERO;
// quark T-odd quark
cL_[15] = vf/f*model_->kappaQuark() /24.;
cR_[15] =-vf*sqrt(0.5)/v;
cL_[16] = model_->cosThetaL()*vf/f*model_->kappaQuark() /24.;
cR_[16] =-model_->cosThetaR()*vf*sqrt(0.5)/v/ca;
cL_[17] = model_->sinThetaL()*vf/f*model_->kappaQuark() /24.;
cR_[17] =-model_->sinThetaR()*vf*sqrt(0.5)/v/ca;
FFSVertex::doinit();
}
void LHTPFFHVertex::setCoupling(Energy2 q2,tcPDPtr a,tcPDPtr b, tcPDPtr c) {
norm(1.);
int iferm=abs(a->id());
int ianti=abs(b->id());
// int ihigg=abs(c->id());
// left and right couplings set to one
// SM like higgs
if(c->id()==ParticleID::h0) {
// to SM fermions and T
if(iferm<=16&&ianti<=16) {
// running masses
if(q2!=q2Last_||idLast_[0]!=iferm||idLast_[1]!=ianti) {
q2Last_ = q2;
idLast_[0] = iferm;
assert((idLast_[0]>=1 && idLast_[0]<=8 ) ||
(idLast_[0]>=11 && idLast_[0]<=16));
if(idLast_[0]!=8)
massLast_[0] = model_->mass(q2,a);
else
massLast_[0] = model_->mass(q2,getParticleData(ParticleID::t));
idLast_[1] = ianti;
assert((idLast_[1]>=1 && idLast_[1]<=8 ) ||
(idLast_[1]>=11 && idLast_[1]<=16));
if(idLast_[0]!=idLast_[1]) {
if(idLast_[1]!=8)
massLast_[1] = model_->mass(q2,a);
else
massLast_[1] = model_->mass(q2,getParticleData(ParticleID::t));
}
else {
massLast_[1] = massLast_[0];
}
}
if(iferm<6||iferm>8) {
left (-Complex(cL_[0]*massLast_[0]));
right(-Complex(cR_[0]*massLast_[0]));
}
else {
if(iferm==8&&ianti==8) {
left ( Complex(cL_[1]*massLast_[0]));
right( Complex(cR_[1]*massLast_[0]));
}
else {
if(a->id()==ParticleID::tbar||b->id()==ParticleID::tbar) {
left (-Complex(cL_[2]*massLast_[0]));
right(-Complex(cR_[2]*massLast_[0]));
}
else {
left (-Complex(cR_[2]*massLast_[0]));
right(-Complex(cL_[2]*massLast_[0]));
}
}
}
}
else {
if(iferm<=4000006) {
left ( Complex(cL_[3]*model_->vev()));
right( Complex(cR_[3]*model_->vev()));
}
else {
left ( Complex(cL_[4]*model_->vev()));
right( Complex(cR_[4]*model_->vev()));
}
}
}
// Phi0
else if(c->id()==ParticleID::H0 ||
c->id()==ParticleID::A0) {
tcPDPtr ferm = a;
if(iferm>4000000) {
swap(iferm,ianti);
ferm = b;
}
if(q2!=q2Last_||idLast_[0]!=iferm) {
q2Last_ = q2;
idLast_[0] = iferm;
assert((idLast_[0]>=1 && idLast_[0]<=8 ) ||
(idLast_[0]>=11 && idLast_[0]<=16));
if(idLast_[0]!=8)
massLast_[0] = model_->mass(q2,ferm);
else
massLast_[0] = model_->mass(q2,getParticleData(ParticleID::t));
}
if(c->id()==ParticleID::H0 ) {
unsigned int iloc = 5;
if(iferm==6) iloc = 6;
else if(iferm==8) iloc = 7;
if( (a->id()>=1&&a->id()<=8) || (b->id()>=1&&b->id()<=8) ) {
left ( Complex(cR_[iloc]*massLast_[0]));
right( Complex(cL_[iloc]*massLast_[0]));
}
else {
left ( Complex(cL_[iloc]*massLast_[0]));
right( Complex(cR_[iloc]*massLast_[0]));
}
}
// PhiP
else if(c->id()==ParticleID::A0) {
if(iferm<=5) {
if( (a->id()>=1&&a->id()<=5) || (b->id()>=1&&b->id()<=5) ) {
if(iferm%2==0) {
right(Complex(0., 1.)*model_->vev()*cL_[8]);
left (Complex(0.,-1.)*massLast_[0] *cR_[8]);
}
else {
right(Complex(ZERO));
left (Complex(0., 1.)*massLast_[0] *cR_[8]);
}
}
else {
if(iferm%2==0) {
left (Complex(0.,-1.)*model_->vev()*cL_[8]);
right(Complex(0., 1.)*massLast_[0] *cR_[8]);
}
else {
left (Complex(ZERO));
right(Complex(0.,-1.)*massLast_[0] *cR_[8]);
}
}
}
else if(iferm>=12) {
if( (a->id()>=11&&a->id()<=16) || (b->id()>=11&&b->id()<=16) ) {
right(Complex(0., 1.)*model_->vev()*cL_[9]);
left (Complex(0.,-1.)*massLast_[0] *cR_[9]);
}
else {
right(Complex(0.,-1.)*massLast_[0] *cR_[9]);
left (Complex(0., 1.)*model_->vev()*cL_[9]);
}
}
else {
if(ianti==4000008) {
unsigned int iloc = (iferm+14)/2;
if( (a->id()==6||a->id()==8) || (b->id()==6||b->id()==8) ) {
left (Complex(0., 1.)*massLast_[0]*cR_[iloc]);
right(Complex(0., 1.)*massLast_[0]*cL_[iloc]);
}
else {
left (Complex(0.,-1.)*massLast_[0]*cL_[iloc]);
right(Complex(0.,-1.)*massLast_[0]*cR_[iloc]);
}
}
else {
unsigned int iloc = (iferm+18)/2;
if( (a->id()==6||a->id()==8) || (b->id()==6||b->id()==8) ) {
left (Complex(0., 1.)*model_->vev()*cL_[iloc]);
right(Complex(0.,-1.)*massLast_[0] *cR_[iloc]);
}
else {
left (Complex(0., 1.)*massLast_[0] *cR_[iloc]);
right(Complex(0.,-1.)*model_->vev()*cL_[iloc]);
}
}
}
}
}
else if(abs(c->id())==ParticleID::Hplus) {
tcPDPtr ferm = a;
if(iferm>4000000) {
swap(iferm,ianti);
ferm = b;
}
if(q2!=q2Last_||idLast_[0]!=iferm) {
q2Last_ = q2;
idLast_[0] = iferm;
assert((idLast_[0]>=1 && idLast_[0]<=8 ) ||
(idLast_[0]>=11 && idLast_[0]<=16));
if(idLast_[0]!=8)
massLast_[0] = model_->mass(q2,ferm);
else
massLast_[0] = model_->mass(q2,getParticleData(ParticleID::t));
}
Complex cleft(0.),cright(0.);
// lepton and T-odd lepton
if(iferm>=11&&iferm<=16) {
- cright = cR_[14]*massLast_[0];
- cleft = cL_[14]*model_->vev();
+ cright = Complex(cR_[14]*massLast_[0]);
+ cleft = Complex(cL_[14]*model_->vev());
}
else if(iferm>=1&&iferm<=6) {
- cright = cR_[15]*massLast_[0];
- cleft = cL_[15]*model_->vev();
+ cright = Complex(cR_[15]*massLast_[0]);
+ cleft = Complex(cL_[15]*model_->vev());
}
else if(iferm==6) {
- cright = cR_[16]*massLast_[0];
- cleft = cL_[16]*model_->vev();
+ cright = Complex(cR_[16]*massLast_[0]);
+ cleft = Complex(cL_[16]*model_->vev());
}
else if(iferm==8) {
- cright = cR_[17]*massLast_[0];
- cleft = cL_[17]*model_->vev();
+ cright = Complex(cR_[17]*massLast_[0]);
+ cleft = Complex(cL_[17]*model_->vev());
}
if((a->id()>=1&&a->id()<=16) ||(b->id()>=1&&b->id()<=16) ) {
swap(cleft,cright);
cleft *= -1.;
cright *= -1.;
}
if(c->id()==ParticleID::Hminus) {
cleft *= -1.;
cright *= -1.;
}
left (cleft );
right(cright);
}
}
diff --git a/Models/LHTP/LHTPFFHVertex.h b/Models/LHTP/LHTPFFHVertex.h
--- a/Models/LHTP/LHTPFFHVertex.h
+++ b/Models/LHTP/LHTPFFHVertex.h
@@ -1,143 +1,143 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPFFHVertex_H
#define HERWIG_LHTPFFHVertex_H
//
// This is the declaration of the LHTPFFHVertex class.
//
#include "LHTPModel.h"
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHTPFFHVertex class implements the couplings of the fermions to
* the Higgs bosons of the Little Higgs model with T-parity.
*/
class LHTPFFHVertex: public Helicity::FFSVertex {
public:
/**
* The default constructor.
*/
LHTPFFHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param ioff Which particle is off-shell
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPFFHVertex & operator=(const LHTPFFHVertex &);
+ LHTPFFHVertex & operator=(const LHTPFFHVertex &) = delete;
private:
/**
* Pointer to the SM object.
*/
tcLHTPModelPtr model_;
/**
* Storage of the couplings.
*/
//@{
/**
* The PDG code of the last fermion the coupling was evaluated for.
*/
int idLast_[2];
/**
* The last \f$q^2\f$ the coupling was evaluated at.
*/
Energy2 q2Last_;
/**
* The mass of the last fermion for which the coupling was evaluated.
*/
Energy massLast_[2];
/**
* The factors for the individual interactions
*/
vector<complex<InvEnergy> > coup_;
/**
* Left coupling
*/
vector<complex<InvEnergy> > cL_;
/**
* Right coupling
*/
vector<complex<InvEnergy> > cR_;
//@}
};
}
#endif /* HERWIG_LHTPFFHVertex_H */
diff --git a/Models/LHTP/LHTPFFPVertex.h b/Models/LHTP/LHTPFFPVertex.h
--- a/Models/LHTP/LHTPFFPVertex.h
+++ b/Models/LHTP/LHTPFFPVertex.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPFFPVertex_H
#define HERWIG_LHTPFFPVertex_H
//
// This is the declaration of the LHTPFFPVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHTPFFPVertex class implements the couplings of the photon
* and its heavy partner \f$A_H\f$ in the Little Higgs model with T-parity.
*/
class LHTPFFPVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHTPFFPVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPFFPVertex & operator=(const LHTPFFPVertex &);
+ LHTPFFPVertex & operator=(const LHTPFFPVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The charge of the Standard Model fermions.
*/
vector<double> charge_;
/**
* The last value of the coupling calculated.
*/
Complex coupLast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2Last_;
//@}
/**
* Couplings of the fermion and T-fermions to the \f$A_H\f$
*/
//@{
/**
* Coupling of \f$dd_-A_H\f$
*/
double coupd_;
/**
* Coupling of \f$uu_-A_H\f$
*/
double coupu_;
/**
* Coupling of \f$ee_-A_H\f$
*/
double coupe_;
/**
* Coupling of \f$\nu\nu_-A_H\f$
*/
double coupnu_;
/**
* Coupling of heavy top
*/
double TPreFactor_;
/**
* Left mixings
*/
double sL_,cL_;
/**
* Right mixings
*/
double sR_,cR_;
//@}
};
}
#endif /* HERWIG_LHTPFFPVertex_H */
diff --git a/Models/LHTP/LHTPFFWVertex.h b/Models/LHTP/LHTPFFWVertex.h
--- a/Models/LHTP/LHTPFFWVertex.h
+++ b/Models/LHTP/LHTPFFWVertex.h
@@ -1,128 +1,128 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPFFWVertex_H
#define HERWIG_LHTPFFWVertex_H
//
// This is the declaration of the LHTPFFWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHTPFFWVertex class implements the coupling of the \f$W^\pm\f$
* and \f$W^\pm_H\f$ bosons of the Little Higgs model with T-parity to fermions.
* For simplicity the coupling are assumed to be flavour diagonal.
*/
class LHTPFFWVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHTPFFWVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPFFWVertex & operator=(const LHTPFFWVertex &);
+ LHTPFFWVertex & operator=(const LHTPFFWVertex &) = delete;
private:
/**
* @name Storage of the couplings.
*/
//@{
/**
* Left mixings
*/
double sL_,cL_;
/**
* The elements of the CKM matrix.
*/
vector<vector<Complex> > ckm_;
/**
* The last value of the electroweak coupling calculated.
*/
Complex coupLast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2Last_;
//@}
};
}
#endif /* HERWIG_LHTPFFWVertex_H */
diff --git a/Models/LHTP/LHTPFFZVertex.h b/Models/LHTP/LHTPFFZVertex.h
--- a/Models/LHTP/LHTPFFZVertex.h
+++ b/Models/LHTP/LHTPFFZVertex.h
@@ -1,171 +1,171 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPFFZVertex_H
#define HERWIG_LHTPFFZVertex_H
//
// This is the declaration of the LHTPFFZVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHTPFFZVertex class implements the couples of the \f$Z^0\f$
* boson and its heavy partner to the fermions in the Little Higgs
* model with T-parity.
*/
class LHTPFFZVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
LHTPFFZVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPFFZVertex & operator=(const LHTPFFZVertex &);
+ LHTPFFZVertex & operator=(const LHTPFFZVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The left couplings of the Standard Model fermions.
*/
vector<double> gl_;
/**
* The right couplings of the Standard Model fermions.
*/
vector<double> gr_;
/**
* The left couplings to the Z for the extended top sector
*/
vector<double> tl_;
/**
* The right couplings to the Z for the extended top sector
*/
vector<double> tr_;
/**
* Coupling of \f$dd_-Z_H\f$
*/
double coupd_;
/**
* Coupling of \f$uu_-Z_H\f$
*/
double coupu_;
/**
* Coupling of \f$ee_-Z_H\f$
*/
double coupe_;
/**
* Coupling of \f$\nu\nu_-Z_H\f$
*/
double coupnu_;
/**
* Left mixings
*/
double sL_,cL_;
/**
* Right mixings
*/
double sR_,cR_;
/**
* The last value of the electroweak coupling calculated.
*/
Complex coupLast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2Last_;
//@}
};
}
#endif /* HERWIG_LHTPFFZVertex_H */
diff --git a/Models/LHTP/LHTPHHHVertex.h b/Models/LHTP/LHTPHHHVertex.h
--- a/Models/LHTP/LHTPHHHVertex.h
+++ b/Models/LHTP/LHTPHHHVertex.h
@@ -1,120 +1,120 @@
// -*- C++ -*-
#ifndef Herwig_LHTPHHHVertex_H
#define Herwig_LHTPHHHVertex_H
//
// This is the declaration of the LHTPHHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The LHTPHHHVertex class implements the triple Higgs boson interactions
* in the Little Higgs model
* with T-parity.
*/
class LHTPHHHVertex : public SSSVertex {
public:
/**
* The default constructor.
*/
LHTPHHHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPHHHVertex & operator=(const LHTPHHHVertex &);
+ LHTPHHHVertex & operator=(const LHTPHHHVertex &) = delete;
private:
/**
* ratio of masses
*/
Energy ratio_;
/**
* The last value of the electroweak coupling calculated.
*/
Complex coupLast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2Last_;
};
}
#endif /* Herwig_LHTPHHHVertex_H */
diff --git a/Models/LHTP/LHTPModel.h b/Models/LHTP/LHTPModel.h
--- a/Models/LHTP/LHTPModel.h
+++ b/Models/LHTP/LHTPModel.h
@@ -1,302 +1,302 @@
// -*- C++ -*-
#ifndef THEPEG_LHTPModel_H
#define THEPEG_LHTPModel_H
//
// This is the declaration of the LHTPModel class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "LHTPModel.fh"
namespace Herwig {
/**
* The LHTPModel class is the main class for the
* implementation of the Little Higgs model with T-parity
*
* @see \ref LHTPModelInterfaces "The interfaces"
* defined for LHTPModel.
*/
class LHTPModel: public BSMModel {
public:
/**
* The default constructor.
*/
LHTPModel();
/**
* Access to the parameters of the model
*/
//@{
/**
* The vacuum expection value
*/
Energy vev() const { return v_; }
/**
* The \f$f\f$ scale of the non-linear \f$\sigma\f$-model
*/
Energy f() const { return f_; }
/**
* \f$\sin\alpha\f$
*/
double sinAlpha() const { return salpha_; }
/**
* \f$\cos\alpha\f$
*/
double cosAlpha() const { return calpha_; }
/**
* \f$\sin\beta\f$
*/
double sinBeta() const { return sbeta_; }
/**
* \f$\cos\beta\f$
*/
double cosBeta() const { return cbeta_; }
/**
* \f$\sin\theta_H\f$
*/
double sinThetaH() const { return sthetaH_; }
/**
* \f$\cos\theta_H\f$
*/
double cosThetaH() const { return cthetaH_; }
/**
* \f$\sin\theta_L\f$
*/
double sinThetaL() const { return sL_;}
/**
* \f$\cos\theta_L\f$
*/
double cosThetaL() const { return cL_;}
/**
* \f$\sin\theta_R\f$
*/
double sinThetaR() const { return sR_;}
/**
* \f$\cos\theta_R\f$
*/
double cosThetaR() const { return cR_;}
//@}
/**
* Yukwawa for T-odd fermions
*/
//@{
/**
* The \f$\kappa_q\f$ parameter which controls the properties of the
* T-odd quarks
*/
double kappaQuark() const { return kappaQuark_;}
/**
* The \f$\kappa_\ell\f$ parameter which controls the properties of the
* T-odd leptons
*/
double kappaLepton() const { return kappaLepton_;}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Calculate the mixing in the top sector of the model
* and the masses of the T-odd and T-even heavy tops
* The mixings are calculated by solving Eqns 2.22 and 2.24 of hep-ph/0506042
* for \f$\lambda_1$ and \f$\lambda_2\f$ given the input value of \f$\sin\alpha\f$
* and the top mass.
*/
void topMixing(Energy & MTp, Energy & MTm);
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPModel & operator=(const LHTPModel &);
+ LHTPModel & operator=(const LHTPModel &) = delete;
private:
/**
* The constant for the non-linear \f$\sigma\f$ model
*/
Energy f_;
/**
* @name The mixing in the top quark sector
*/
//@{
/**
* \f$\sin\alpha\f$, taken as an input
*/
double salpha_;
/**
* \f$\cos\alpha\f$
*/
double calpha_;
/**
* \f$\sin\beta\f$
*/
double sbeta_;
/**
* \f$\cos\beta\f$
*/
double cbeta_;
//@}
/**
* @name Mixing of the heavy photon and Z
*/
//@{
/**
* \f$\sin\theta_H\f$
*/
double sthetaH_;
/**
* \f$\cos\theta_H\f$
*/
double cthetaH_;
//@}
/**
* @name Mixings in the top sector
*/
//@{
/**
* \f$\sin\theta_L\f$
*/
double sL_;
/**
* \f$\cos\theta_L\f$
*/
double cL_;
/**
* \f$\sin\theta_R\f$
*/
double sR_;
/**
* \f$\cos\theta_R\f$
*/
double cR_;
//@}
/**
* The \f$\kappa_q\f$ parameter which controls the properties of the
* T-odd quarks
*/
double kappaQuark_;
/**
* The \f$\kappa_\ell\f$ parameter which controls the properties of the
* T-odd leptons
*/
double kappaLepton_;
/**
* The mass of the Standard Model higgs
*/
Energy mh_;
/**
* The vacuum expection valve
*/
Energy v_;
/**
* The \f$g\f$ coupling
*/
double g_;
/**
* the \f$g'\f$ coupling
*/
double gp_;
/**
* Method for evaluating the masses
*/
bool approximate_;
/**
* WHH Vertex
*/
AbstractVSSVertexPtr WHHVertex_;
};
}
#endif /* THEPEG_LHTPModel_H */
diff --git a/Models/LHTP/LHTPWHHVertex.h b/Models/LHTP/LHTPWHHVertex.h
--- a/Models/LHTP/LHTPWHHVertex.h
+++ b/Models/LHTP/LHTPWHHVertex.h
@@ -1,118 +1,118 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPWHHVertex_H
#define HERWIG_LHTPWHHVertex_H
//
// This is the declaration of the LHTPWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LHTPWHHVertex class implements the coupling of an electroweak gauge
* boson to a pair of Higgs bosons in the Little Higgs model with T-parity.
*/
class LHTPWHHVertex: public Helicity::VSSVertex {
public:
/**
* The default constructor.
*/
LHTPWHHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPWHHVertex & operator=(const LHTPWHHVertex &);
+ LHTPWHHVertex & operator=(const LHTPWHHVertex &) = delete;
private:
/**
* The value of the coupling when last evaluated
*/
Complex coupLast_;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 q2Last_;
/**
* Couplings
*/
vector<Complex> coup_;
};
}
#endif /* HERWIG_LHTPWHHVertex_H */
diff --git a/Models/LHTP/LHTPWWHVertex.h b/Models/LHTP/LHTPWWHVertex.h
--- a/Models/LHTP/LHTPWWHVertex.h
+++ b/Models/LHTP/LHTPWWHVertex.h
@@ -1,127 +1,127 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPWWHVertex_H
#define HERWIG_LHTPWWHVertex_H
//
// This is the declaration of the LHTPWWHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The LittleHiggsWWHVertex class implements the couplings of two electroweak
* gauge bosons to a Higgs boson in the Little Higgs model with T-parity
* including the additional
* heavy photon, Z and W bosons in the model and the triplet Higgs bosons.
*/
class LHTPWWHVertex: public Helicity::VVSVertex {
public:
/**
* The default constructor.
*/
LHTPWWHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPWWHVertex & operator=(const LHTPWWHVertex &);
+ LHTPWWHVertex & operator=(const LHTPWWHVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex coupLast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2Last_;
/**
* Couplings for the different interactions
*/
vector<Energy> coup_;
//@}
};
}
#endif /* HERWIG_LHTPWWHVertex_H */
diff --git a/Models/LHTP/LHTPWWWVertex.h b/Models/LHTP/LHTPWWWVertex.h
--- a/Models/LHTP/LHTPWWWVertex.h
+++ b/Models/LHTP/LHTPWWWVertex.h
@@ -1,123 +1,123 @@
// -*- C++ -*-
#ifndef HERWIG_LHTPWWWVertex_H
#define HERWIG_LHTPWWWVertex_H
//
// This is the declaration of the LHTPWWWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
using ThePEG::Helicity::Direction;
/**
* This is the coupling of vector bosons to each other in the
* Littlest Higgs model with T-parity. It inherits from the
* Standard Model WWW vertex to use its setCoupling member
* for the SM gauge boson self-couplings.
*/
class LHTPWWWVertex: public VVVVertex {
public:
/**
* The default constructor.
*/
LHTPWWWVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param a The ParticleData pointer for the first particle.
* @param b The ParticleData pointer for the second particle.
* @param c The ParticleData pointer for the third particle.
* @param d1 The direction for the first particle.
* @param d2 The direction for the second particle.
* @param d3 The direction for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr a,tcPDPtr b,tcPDPtr c);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LHTPWWWVertex & operator=(const LHTPWWWVertex &);
+ LHTPWWWVertex & operator=(const LHTPWWWVertex &) = delete;
private:
/**
* The value of the coupling when it was last evaluated.
*/
Complex coupLast_;
/**
* The scale where the coulpling was last evaluated
*/
Energy2 q2Last_;
/**
* The couplings for the various possible interactions
*/
vector<double> couplings_;
};
}
#endif /* HERWIG_LHTPWWWVertex_H */
diff --git a/Models/Leptoquarks/LeptoquarkModel.h b/Models/Leptoquarks/LeptoquarkModel.h
--- a/Models/Leptoquarks/LeptoquarkModel.h
+++ b/Models/Leptoquarks/LeptoquarkModel.h
@@ -1,315 +1,315 @@
// -*- C++ -*-
#ifndef HERWIG_LeptoquarkModel_H
#define HERWIG_LeptoquarkModel_H
//
// This is the declaration of the LeptoquarkModel class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSSVertex.h"
#include "LeptoquarkModel.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* Here is the documentation of the LeptoquarkModel class.
*
* @see \ref LeptoquarkModelInterfaces "The interfaces"
* defined for LeptoquarkModel.
*/
class LeptoquarkModel: public BSMModel {
public:
/**
* The default constructor.
*/
LeptoquarkModel();
/** @name Vertices */
//@{
/**
* Pointer to the object handling S0S0barg vertex.
*/
tAbstractVSSVertexPtr vertexSLQSLQG() const {return _theSLQSLQGVertex;}
/**
* Pointer to the object handling the S0S0bargg vertex.
*/
tAbstractVVSSVertexPtr vertexSLQSLQGG() const {return _theSLQSLQGGVertex;}
/**
* Pointer to the object handling the S0ql vertex.
*/
tAbstractFFSVertexPtr vertexSLQFF() const {return _theSLQFFVertex;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Return the overall fermion coupling
*/
double cfermion() const {return _CouplFF;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (S0)
*/
double cleft() const {return _leftcoup;}
/**
* Return the coupling of the leptoquark to right-handed leptons + left-handed quarks (S0)
*/
double cright() const {return _rightcoup;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (S1 triplet)
*/
double cleft1() const {return _leftcoup1;}
/**
* Return the coupling of the leptoquark to right-handed leptons
* + left-handed quarks (~S0)
*/
double crighttilde() const {return _rightcouptilde;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (S1/2)
*/
double cleft12() const {return _leftcoup12;}
/**
* Return the coupling of the leptoquark to right-handed leptons + left-handed quarks (S1/2)
*/
double cright12() const {return _rightcoup12;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (S1/2)
*/
double cleft12tilde() const {return _leftcoup12t;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (S0)
*/
double dcleft() const {return _dleftcoup;}
/**
* Return the coupling of the leptoquark to right-handed leptons + left-handed quarks (dS0)
*/
double dcright() const {return _drightcoup;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (dS1 triplet)
*/
double dcleft1() const {return _dleftcoup1;}
/**
* Return the coupling of the leptoquark to right-handed leptons
* + left-handed quarks (~dS0)
*/
double dcrighttilde() const {return _drightcouptilde;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (dS1/2)
*/
double dcleft12() const {return _dleftcoup12;}
/**
* Return the coupling of the leptoquark to right-handed leptons + left-handed quarks (dS1/2)
*/
double dcright12() const {return _drightcoup12;}
/**
* Return the coupling of the leptoquark to left-handed leptons + right-handed quarks (dS1/2)
*/
double dcleft12tilde() const {return _dleftcoup12t;}
/**
* Suppression scale for derivatively coupled scalar leptoquarks
*/
Energy fscale() const {return _derivscalef;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- LeptoquarkModel & operator=(const LeptoquarkModel &);
+ LeptoquarkModel & operator=(const LeptoquarkModel &) = delete;
/**
* Pointer to the object handling the G to SLQ SLQ vertex.
*/
AbstractVSSVertexPtr _theSLQSLQGVertex;
/**
* Pointer to the object handling the GG to SLQ SLQ vertex.
*/
AbstractVVSSVertexPtr _theSLQSLQGGVertex;
/**
* Pointer to the object handling the SLQ to FF vertex.
*/
AbstractFFSVertexPtr _theSLQFFVertex;
/**
* Overall coupling to fermions
*/
double _CouplFF;
/**
* Overall coupling to left-handed leptons (S0)
*/
double _leftcoup;
/**
* Overall coupling to right-handed leptons (S0)
*/
double _rightcoup;
/**
* Overall coupling to left-handed leptons (~S0)
*/
double _rightcouptilde;
/**
* Overall coupling to left-handed leptons (S1 triplet)
*/
double _leftcoup1;
/**
* Overall coupling to left-handed leptons (S1/2)
*/
double _leftcoup12;
/**
* Overall coupling to right-handed leptons (S1/2)
*/
double _rightcoup12;
/**
* Overall coupling to left-handed leptons (~S1/2)
*/
double _leftcoup12t;
/**
* Overall coupling to left-handed leptons (dS0)
*/
double _dleftcoup;
/**
* Overall coupling to right-handed leptons (dS0)
*/
double _drightcoup;
/**
* Overall coupling to left-handed leptons (~dS0)
*/
double _drightcouptilde;
/**
* Overall coupling to left-handed leptons (dS1 triplet)
*/
double _dleftcoup1;
/**
* Overall coupling to left-handed leptons (dS1/2)
*/
double _dleftcoup12;
/**
* Overall coupling to right-handed leptons (dS1/2)
*/
double _drightcoup12;
/**
* Overall coupling to left-handed leptons (~dS1/2)
*/
double _dleftcoup12t;
/**
* Suppression scale for derivatively coupled scalar leptoquarks, f
*/
Energy _derivscalef;
};
}
#endif /* HERWIG_LeptoquarkModel_H */
diff --git a/Models/Leptoquarks/LeptoquarkModelSLQFFVertex.h b/Models/Leptoquarks/LeptoquarkModelSLQFFVertex.h
--- a/Models/Leptoquarks/LeptoquarkModelSLQFFVertex.h
+++ b/Models/Leptoquarks/LeptoquarkModelSLQFFVertex.h
@@ -1,246 +1,246 @@
// -*- C++ -*-
//
// LeptoquarkModelSLQFFVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LeptoquarkModelSLQFFVertex_H
#define HERWIG_LeptoquarkModelSLQFFVertex_H
//
// This is the declaration of the LeptoquarkModelSLQFFVertex class.
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "Herwig/Models/Leptoquarks/LeptoquarkModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vertex coupling the Standard Model Higgs
* to the Standard Model fermions for helicity amplitude calculations
*
* @see FFSVertex
* @see VertexBase
*/
class LeptoquarkModelSLQFFVertex: public FFSVertex {
public:
/**
* Default constructor.
*/
LeptoquarkModelSLQFFVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- LeptoquarkModelSLQFFVertex & operator=(const LeptoquarkModelSLQFFVertex &);
+ LeptoquarkModelSLQFFVertex & operator=(const LeptoquarkModelSLQFFVertex &) = delete;
/**
* Pointer to the model object.
*/
tcSMPtr _theModel;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* Overall coupling to fermions
*/
double _CFF;
/**
* Overall coupling to left-handed leptons
*/
//double _cL;
Complex _cL;
/**
* Overall coupling to right-handed leptons
*/
// double _cR;
Complex _cR;
/**
* Overall coupling to left-handed leptons for S0
*/
// double _cL0;
Complex _cL0;
/**
* Overall coupling to right-handed leptons for S0
*/
// double _cR0;
Complex _cR0;
/**
* Overall coupling to right-handed leptons for ~S0
*/
// double _cR0t;
Complex _cR0t;
/**
* Overall coupling to left-handed leptons for ~S1 triplet
*/
// double _cL1;
Complex _cL1;
/**
* Overall coupling to left-handed leptons for S1/2 triplet
*/
// double _cL12;
Complex _cL12;
/**
* Overall coupling to right-handed leptons for S1/2 triplet
*/
// double _cR12;
Complex _cR12;
/**
* Overall coupling to left-handed leptons for ~S1/2 triplet
*/
// double _cL12t;
Complex _cL12t;
/**
* Overall coupling to left-handed leptons
*/
//double _dcL;
Complex _dcL;
/**
* Overall coupling to right-handed leptons
*/
// double _dcR;
Complex _dcR;
/**
* Overall coupling to left-handed leptons for dS0
*/
// double _dcL0;
Complex _dcL0;
/**
* Overall coupling to right-handed leptons for dS0
*/
// double _dcR0;
Complex _dcR0;
/**
* Overall coupling to right-handed leptons for ~dS0
*/
double _dcR0t;
/**
* Overall coupling to left-handed leptons for ~dS1 triplet
*/
double _dcL1;
/**
* Overall coupling to left-handed leptons for dS1/2 triplet
*/
//double _dcL12;
Complex _dcL12;
/**
* Overall coupling to right-handed leptons for dS1/2 triplet
*/
//double _dcR12;
Complex _dcR12;
/**
* Overall coupling to left-handed leptons for ~dS1/2 triplet
*/
// double _dcL12t;
Complex _dcL12t;
/**
* Suppression scale for derivatively coupled scalar leptoquarks
*/
Energy _derivscale;
//@}
};
}
#endif /* HERWIG_LeptoquarkModelSLQFFVertex_H */
diff --git a/Models/Leptoquarks/LeptoquarkModelSLQSLQGGVertex.h b/Models/Leptoquarks/LeptoquarkModelSLQSLQGGVertex.h
--- a/Models/Leptoquarks/LeptoquarkModelSLQSLQGGVertex.h
+++ b/Models/Leptoquarks/LeptoquarkModelSLQSLQGGVertex.h
@@ -1,101 +1,101 @@
// -*- C++ -*-
//
// LeptoquarkModelSLQSLQGGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LeptoquarkModelSLQSLQGGVertex_H
#define HERWIG_LeptoquarkModelSLQSLQGGVertex_H
//
// This is the declaration of the LeptoquarkModelSLQSLQGGVertex class.
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
#include "Herwig/Models/Leptoquarks/LeptoquarkModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The LeptoquarkModelSLQSLQGGVertex class is the implementation of the gluon
* gluon coupling to pairs of scalar leptoquarks in the LeptoquarkModel. It inherits from the VVSSVertex
* and implements the setCoupling member
*
* @see VVSSVertex
* @see VertexBase
*/
class LeptoquarkModelSLQSLQGGVertex: public VVSSVertex {
public:
/**
* Default constructor.
*/
LeptoquarkModelSLQSLQGGVertex();
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3, tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- LeptoquarkModelSLQSLQGGVertex & operator=(const LeptoquarkModelSLQSLQGGVertex &);
+ LeptoquarkModelSLQSLQGGVertex & operator=(const LeptoquarkModelSLQSLQGGVertex &) = delete;
/**
* The energy at which the coupling was last evaluated
*/
Energy2 q2last_;
/**
* The coupling when it was last evaluated
*/
Complex couplast_;
};
}
#endif /* HERWIG_LeptoquarkModelSLQSLQGGVertex_H */
diff --git a/Models/Leptoquarks/LeptoquarkModelSLQSLQGVertex.h b/Models/Leptoquarks/LeptoquarkModelSLQSLQGVertex.h
--- a/Models/Leptoquarks/LeptoquarkModelSLQSLQGVertex.h
+++ b/Models/Leptoquarks/LeptoquarkModelSLQSLQGVertex.h
@@ -1,99 +1,99 @@
// -*- C++ -*-
//
// LeptoquarkModelSLQSLQGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_LeptoquarkModelSLQSLQGVertex_H
#define HERWIG_LeptoquarkModelSLQSLQGVertex_H
//
// This is the declaration of the LeptoquarkModelSLQSLQGVertex class.
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "Herwig/Models/Leptoquarks/LeptoquarkModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The LeptoquarkModelSLQSLQGVertex class is the implementation of the gluon
* coupling to pairs of scalar leptoquarks in the LeptoquarkModel. It inherits from the VSSVertex
* and implements the setCoupling member
*
* @see VSSVertex
* @see VertexBase
*/
class LeptoquarkModelSLQSLQGVertex: public VSSVertex {
public:
/**
* Default constructor.
*/
LeptoquarkModelSLQSLQGVertex();
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- LeptoquarkModelSLQSLQGVertex & operator=(const LeptoquarkModelSLQSLQGVertex &);
+ LeptoquarkModelSLQSLQGVertex & operator=(const LeptoquarkModelSLQSLQGVertex &) = delete;
/**
* The energy at which the coupling was last evaluated
*/
Energy2 q2last_;
/**
* The coupling when it was last evaluated
*/
Complex couplast_;
};
}
#endif /* HERWIG_LeptoquarkModelSLQSLQGVertex_H */
diff --git a/Models/Makefile.am b/Models/Makefile.am
--- a/Models/Makefile.am
+++ b/Models/Makefile.am
@@ -1,181 +1,181 @@
SUBDIRS = RSModel StandardModel General Susy UED Zprime \
Transplanckian ADD Leptoquarks Sextet TTbAsymm \
LH LHTP Feynrules
noinst_LTLIBRARIES = libHwStandardModel.la
nodist_libHwStandardModel_la_SOURCES = \
StandardModel/SM__all.cc
libHwStandardModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/StandardModel
noinst_LTLIBRARIES += libHwModelGenerator.la
nodist_libHwModelGenerator_la_SOURCES = \
General/ModelGenerator__all.cc
libHwModelGenerator_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/General
if WANT_BSM
pkglib_LTLIBRARIES = \
HwRSModel.la \
HwUED.la \
HwSusy.la \
HwNMSSM.la \
HwRPV.la \
HwZprimeModel.la \
HwTransplanck.la \
HwADDModel.la \
HwLeptoquarkModel.la \
HwSextetModel.la \
HwTTbAModel.la \
HwLHModel.la \
HwLHTPModel.la
endif
#############
HwRSModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:0:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwRSModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/RSModel
nodist_HwRSModel_la_SOURCES = \
RSModel/RS__all.cc
#############
HwUED_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 10:1:0
+$(AM_LDFLAGS) -module -version-info 11:0:0
HwUED_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/UED
nodist_HwUED_la_SOURCES = \
UED/UED__all.cc
#############
HwSusy_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 13:2:0
+$(AM_LDFLAGS) -module -version-info 14:0:0
HwSusy_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Susy
nodist_HwSusy_la_SOURCES = \
Susy/Susy__all.cc
#############
HwNMSSM_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 5:0:0
+$(AM_LDFLAGS) -module -version-info 6:0:0
HwNMSSM_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Susy/NMSSM
nodist_HwNMSSM_la_SOURCES = \
Susy/NMSSM/NMSSM__all.cc
#############
HwRPV_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 3:0:0
+$(AM_LDFLAGS) -module -version-info 4:0:0
HwRPV_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Susy/RPV
nodist_HwRPV_la_SOURCES = \
Susy/RPV/RPV__all.cc
#############
HwZprimeModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 3:0:0
+$(AM_LDFLAGS) -module -version-info 4:0:0
HwZprimeModel_la_SOURCES = \
Zprime/ZprimeModel.cc Zprime/ZprimeModelZPQQVertex.cc
#############
HwTransplanck_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 4:1:0
+$(AM_LDFLAGS) -module -version-info 5:0:0
HwTransplanck_la_SOURCES = \
Transplanckian/METRP2to2.cc
#############
HwADDModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 4:0:0
+$(AM_LDFLAGS) -module -version-info 5:0:0
HwADDModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/ADD
nodist_HwADDModel_la_SOURCES = \
ADD/ADD__all.cc
#############
HwLeptoquarkModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 5:0:0
+$(AM_LDFLAGS) -module -version-info 6:0:0
HwLeptoquarkModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Leptoquarks
nodist_HwLeptoquarkModel_la_SOURCES = \
Leptoquarks/Leptoquark__all.cc
#############
HwSextetModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 3:0:0
+$(AM_LDFLAGS) -module -version-info 4:0:0
HwSextetModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/Sextet
nodist_HwSextetModel_la_SOURCES = \
Sextet/Sextet__all.cc
#############
HwTTbAModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 3:0:0
+$(AM_LDFLAGS) -module -version-info 4:0:0
HwTTbAModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/TTbAsymm
nodist_HwTTbAModel_la_SOURCES = \
TTbAsymm/TTbA__all.cc
#############
HwLHModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 5:0:0
+$(AM_LDFLAGS) -module -version-info 6:0:0
HwLHModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) -I$(srcdir)/LH
nodist_HwLHModel_la_SOURCES = \
LH/LH__all.cc
#############
HwLHTPModel_la_LDFLAGS = \
-$(AM_LDFLAGS) -module -version-info 5:0:0
+$(AM_LDFLAGS) -module -version-info 6:0:0
HwLHTPModel_la_LIBADD = \
$(GSLLIBS)
HwLHTPModel_la_CPPFLAGS = \
$(AM_CPPFLAGS) $(GSLINCLUDE) -I$(srcdir)/LHTP
nodist_HwLHTPModel_la_SOURCES = \
LHTP/LHTP__all.cc
#############
diff --git a/Models/RSModel/RSModel.h b/Models/RSModel/RSModel.h
--- a/Models/RSModel/RSModel.h
+++ b/Models/RSModel/RSModel.h
@@ -1,195 +1,195 @@
// -*- C++ -*-
//
// RSModel.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModel_H
#define HERWIG_RSModel_H
// This is the declaration of the RSModel class.
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVTVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVTVertex.h"
#include "RSModel.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup Models
*
* This is the class to be used instead of the Standard Model class for
* the Randell Sundrum model.
*
* @see \ref RSModelInterfaces "The interfaces"
* defined for RSModel.
* @see StandardModel
* @see StandardModelBase
*
*/
class RSModel: public BSMModel {
public:
/**
* The default constructor
*/
RSModel(): Lambda_pi_(10000*GeV) {
useMe();
}
/**
* Return the gravition coupling
*/
Energy lambda_pi() const {return Lambda_pi_;}
/** @name Vertices */
//@{
/**
* Pointer to the object handling the \f$G\to f\bar{f}\f$ vertex.
*/
tAbstractFFTVertexPtr vertexFFGR() const {return FFGRVertex_;}
/**
* Pointer to the object handling the \f$G\to VV\f$ vertex.
*/
tAbstractVVTVertexPtr vertexVVGR() const {return VVGRVertex_;}
/**
* Pointer to the object handling the \f$G\to SS\f$ vertex.
*/
tAbstractSSTVertexPtr vertexSSGR() const {return SSGRVertex_;}
/**
* Pointer to the object handling the \f$G\to f\bar{f}g\f$ vertex.
*/
tAbstractFFVTVertexPtr vertexFFGGR() const {return FFGGRVertex_;}
/**
* Pointer to the object handling the \f$G\to f\bar{f}W^\pm/Z^0/\gamma\f$ vertex.
*/
tAbstractFFVTVertexPtr vertexFFWGR() const {return FFWGRVertex_;}
/**
* Pointer to the object handling the \f$G\to W^+W^-Z^0/\gamma\f$ vertex.
*/
tAbstractVVVTVertexPtr vertexWWWGR() const {return WWWGRVertex_;}
/**
* Pointer to the object handling the \f$G\to ggg\f$ vertex.
*/
tAbstractVVVTVertexPtr vertexGGGGR() const {return GGGGRVertex_;}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- RSModel & operator=(const RSModel &);
+ RSModel & operator=(const RSModel &) = delete;
private:
/**
* Coupling of the graviton
*/
Energy Lambda_pi_;
/**
* Pointer to the object handling the \f$G\to f\bar{f}\f$ vertex.
*/
AbstractFFTVertexPtr FFGRVertex_;
/**
* Pointer to the object handling the \f$G\to VV\f$ vertex.
*/
AbstractVVTVertexPtr VVGRVertex_;
/**
* Pointer to the object handling the \f$G\to SS\f$ vertex.
*/
AbstractSSTVertexPtr SSGRVertex_;
/**
* Pointer to the object handling the \f$G\to f\bar{f}g\f$ vertex.
*/
AbstractFFVTVertexPtr FFGGRVertex_;
/**
* Pointer to the object handling the \f$G\to f\bar{f}W/Z^0\gamma\f$ vertex.
*/
AbstractFFVTVertexPtr FFWGRVertex_;
/**
* Pointer to the object handling the \f$G\to W^+W^-Z^0\gamma\f$ vertex.
*/
AbstractVVVTVertexPtr WWWGRVertex_;
/**
* Pointer to the object handling the \f$G\to ggg\f$ vertex.
*/
AbstractVVVTVertexPtr GGGGRVertex_;
};
}
#endif /* HERWIG_RSModel_H */
diff --git a/Models/RSModel/RSModelFFGGRVertex.h b/Models/RSModel/RSModelFFGGRVertex.h
--- a/Models/RSModel/RSModelFFGGRVertex.h
+++ b/Models/RSModel/RSModelFFGGRVertex.h
@@ -1,128 +1,128 @@
// -*- C++ -*-
//
// RSModelFFGGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModelFFGGRVertex_H
#define HERWIG_RSModelFFGGRVertex_H
//
// This is the declaration of the RSModelFFGGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/FFVTVertex.h"
#include "RSModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the fermion-antifermion-vector-graviton
* vertex for the Randell-Sundrum model
*
* @see FFVTVertex
* @see VertexBase
*/
class RSModelFFGGRVertex: public FFVTVertex {
public:
/**
* Default constructor.
*/
RSModelFFGGRVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3, tcPDPtr part4);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- RSModelFFGGRVertex & operator=(const RSModelFFGGRVertex &);
+ RSModelFFGGRVertex & operator=(const RSModelFFGGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the coupling/
*/
Complex couplast_;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 q2last_;
/**
* The graviton coupling.
*/
InvEnergy kappa_;
//@}
};
}
#endif /* HERWIG_RSModelFFGGRVertex_H */
diff --git a/Models/RSModel/RSModelFFGRVertex.h b/Models/RSModel/RSModelFFGRVertex.h
--- a/Models/RSModel/RSModelFFGRVertex.h
+++ b/Models/RSModel/RSModelFFGRVertex.h
@@ -1,113 +1,113 @@
// -*- C++ -*-
//
// RSModelFFGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModelFFGRVertex_H
#define HERWIG_RSModelFFGRVertex_H
//
// This is the declaration of the RSModelFFGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/FFTVertex.h"
#include "RSModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the Randell-Sundrum model fermion-antifermion
* tensor vertex for helicity amplitude calculations
*
* @see FFTVertex
* @see VertexBase
*/
class RSModelFFGRVertex: public FFTVertex {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
RSModelFFGRVertex();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- RSModelFFGRVertex & operator=(const RSModelFFGRVertex &);
+ RSModelFFGRVertex & operator=(const RSModelFFGRVertex &) = delete;
/**
* The coupling.
*/
InvEnergy kappa_;
};
}
#endif /* HERWIG_RSModelFFGRVertex_H */
diff --git a/Models/RSModel/RSModelFFWGRVertex.cc b/Models/RSModel/RSModelFFWGRVertex.cc
--- a/Models/RSModel/RSModelFFWGRVertex.cc
+++ b/Models/RSModel/RSModelFFWGRVertex.cc
@@ -1,191 +1,191 @@
// -*- C++ -*-
//
// RSModelFFWGRVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the RSModelFFWGRVertex class.
//
#include "RSModelFFWGRVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Models/StandardModel/StandardCKM.h"
using namespace Herwig;
using namespace ThePEG;
RSModelFFWGRVertex::RSModelFFWGRVertex()
: charge_(17,0.), gl_(17,0.), gr_(17,0.),
ckm_(3,vector<Complex>(3,0.0)),
couplast_(0.), q2last_(ZERO), kappa_(ZERO) {
orderInGem(2);
orderInGs (0);
colourStructure(ColourStructure::DELTA);
}
void RSModelFFWGRVertex::doinit() {
for(int ix=11;ix<17;++ix) {
addToList(-ix,ix,22,39);
addToList(-ix,ix,23,39);
}
for(int ix=1;ix<7;++ix) {
addToList(-ix,ix,22,39);
addToList(-ix,ix,23,39);
}
// particles for outgoing W-
// quarks
for(int ix=1;ix<6;ix+=2) {
for(int iy=2;iy<7;iy+=2) {
addToList(-ix, iy, -24,39);
}
}
// leptons
for(int ix=11;ix<17;ix+=2) {
addToList(-ix, ix+1, -24,39);
}
// particles for outgoing W+
// quarks
for(int ix=2;ix<7;ix+=2) {
for(int iy=1;iy<6;iy+=2) {
addToList(-ix, iy, 24,39);
}
}
// leptons
for(int ix=11;ix<17;ix+=2) {
addToList(-ix-1, ix, 24,39);
}
FFVTVertex::doinit();
tcHwRSPtr hwRS=dynamic_ptr_cast<tcHwRSPtr>(generator()->standardModel());
if(!hwRS) throw Exception()
<< "Must have RSModel in RSModelFFWGRVertex::doinit()"
<< Exception::runerror;
double sw2 = sin2ThetaW();
double fact = 0.25/sqrt(sw2*(1.-sw2));
for(int ix=1;ix<4;++ix) {
charge_[2*ix-1] = hwRS->ed();
charge_[2*ix ] = hwRS->eu();
charge_[2*ix+9 ] = hwRS->ee();
charge_[2*ix+10] = hwRS->enu();
gl_[2*ix-1] = fact*(hwRS->vd() + hwRS->ad() );
gl_[2*ix ] = fact*(hwRS->vu() + hwRS->au() );
gl_[2*ix+9 ] = fact*(hwRS->ve() + hwRS->ae() );
gl_[2*ix+10] = fact*(hwRS->vnu() + hwRS->anu());
gr_[2*ix-1] = fact*(hwRS->vd() - hwRS->ad() );
gr_[2*ix ] = fact*(hwRS->vu() - hwRS->au() );
gr_[2*ix+9 ] = fact*(hwRS->ve() - hwRS->ae() );
gr_[2*ix+10] = fact*(hwRS->vnu() - hwRS->anu());
}
kappa_ = 2./hwRS->lambda_pi();
Ptr<CKMBase>::transient_pointer CKM = generator()->standardModel()->CKM();
// cast the CKM object to the HERWIG one
ThePEG::Ptr<Herwig::StandardCKM>::transient_const_pointer
hwCKM = ThePEG::dynamic_ptr_cast< ThePEG::Ptr<Herwig::StandardCKM>::
transient_const_pointer>(CKM);
if(hwCKM) {
vector< vector<Complex > > CKM;
CKM = hwCKM->getUnsquaredMatrix(generator()->standardModel()->families());
for(unsigned int ix=0;ix<3;++ix) {
for(unsigned int iy=0;iy<3;++iy) {
ckm_[ix][iy]=CKM[ix][iy];
}
}
}
else {
throw Exception() << "Must have access to the Herwig::StandardCKM object"
<< "for the CKM matrix in SMFFWVertex::doinit()"
<< Exception::runerror;
}
}
void RSModelFFWGRVertex::persistentOutput(PersistentOStream & os) const {
os << charge_ << gl_ << gr_ << ounit(kappa_,InvGeV) << ckm_;
}
void RSModelFFWGRVertex::persistentInput(PersistentIStream & is, int) {
is >> charge_ >> gl_ >> gr_ >> iunit(kappa_,InvGeV) >> ckm_;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<RSModelFFWGRVertex,FFVTVertex>
describeHerwigRSModelFFWGRVertex("Herwig::RSModelFFWGRVertex", "HwRSModel.so");
void RSModelFFWGRVertex::Init() {
static ClassDocumentation<RSModelFFWGRVertex> documentation
("The RSModelFFWGRVertexxs class is the implementation"
" of the two fermion vector coupling for the RS model.");
}
// FFWGR coupling
void RSModelFFWGRVertex::setCoupling(Energy2 q2,tcPDPtr aa,tcPDPtr bb,
tcPDPtr cc, tcPDPtr) {
// work out the particles
int iferm= abs(aa->id());
int ibos = abs(cc->id());
Complex coup;
// overall factor
assert( ibos >= 22 && ibos <= 24 );
if( q2last_ != q2 || couplast_ == 0. ) {
couplast_ = electroMagneticCoupling(q2);
q2last_ = q2;
}
// photon
if(ibos==22) {
// alpha
- coup = UnitRemoval::E * kappa_ * couplast_;
+ coup = Complex(UnitRemoval::E * kappa_ * couplast_);
// _charge of particle
assert((iferm>=1 && iferm<=6)||(iferm>=11 &&iferm<=16));
coup *= charge_[iferm];
left (1.);
right(1.);
}
// Z boson
else if(ibos==23) {
- coup = UnitRemoval::E * kappa_ * couplast_;
+ coup = Complex(UnitRemoval::E * kappa_ * couplast_);
// _charge of particle
assert((iferm>=1 && iferm<=6)||(iferm>=11 &&iferm<=16));
left (gl_[iferm]);
right(gr_[iferm]);
}
else if(ibos==24) {
coup = Complex(UnitRemoval::E * kappa_ * couplast_) *
sqrt(0.5) / sqrt(sin2ThetaW());
// the left and right couplings
int iferm=abs(aa->id());
int ianti=abs(bb->id());
// quarks
if(iferm>=1 && iferm <=6) {
int iu,id;
// up type first
if(iferm%2==0) {
iu = iferm/2;
id = (ianti+1)/2;
}
// down type first
else {
iu = ianti/2;
id = (iferm+1)/2;
}
assert( iu>=1 && iu<=3 && id>=1 && id<=3);
left(ckm_[iu-1][id-1]);
right(0.);
}
// leptons
else if(iferm>=11 && iferm <=16) {
left(1.);
right(0.);
}
else
assert(false);
}
// set the coupling
norm(coup);
}
diff --git a/Models/RSModel/RSModelFFWGRVertex.h b/Models/RSModel/RSModelFFWGRVertex.h
--- a/Models/RSModel/RSModelFFWGRVertex.h
+++ b/Models/RSModel/RSModelFFWGRVertex.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
//
// RSModelFFWGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModelFFWGRVertex_H
#define HERWIG_RSModelFFWGRVertex_H
//
// This is the declaration of the RSModelFFWGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/FFVTVertex.h"
#include "RSModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the fermion-antifermion-vector-graviton
* vertex for the Randell-Sundrum model
*
* @see FFVTVertex
* @see VertexBase
*/
class RSModelFFWGRVertex: public FFVTVertex {
public:
/**
* Default constructor.
*/
RSModelFFWGRVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3, tcPDPtr part4);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- RSModelFFWGRVertex & operator=(const RSModelFFWGRVertex &);
+ RSModelFFWGRVertex & operator=(const RSModelFFWGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The charges of the Standard Model fermions.
*/
vector<double> charge_;
/**
* The left couplings of the Standard Model fermions.
*/
vector<double> gl_;
/**
* The right couplings of the Standard Model fermions.
*/
vector<double> gr_;
/**
* The elements of the CKM matrix.
*/
vector<vector<Complex> > ckm_;
/**
* The last value of the coupling/
*/
Complex couplast_;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 q2last_;
/**
* The graviton coupling.
*/
InvEnergy kappa_;
//@}
};
}
#endif /* HERWIG_RSModelFFWGRVertex_H */
diff --git a/Models/RSModel/RSModelGGGGRVertex.h b/Models/RSModel/RSModelGGGGRVertex.h
--- a/Models/RSModel/RSModelGGGGRVertex.h
+++ b/Models/RSModel/RSModelGGGGRVertex.h
@@ -1,127 +1,127 @@
// -*- C++ -*-
//
// RSModelGGGGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModelGGGGRVertex_H
#define HERWIG_RSModelGGGGRVertex_H
//
// This is the declaration of the RSModelGGGGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/VVVTVertex.h"
#include "RSModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The RSModelGGGGRVertex class is the implementation of the
* triple vector graviton couling in the RS model.
* It inherits from VVVTVertex and implements the setCoupling member.
*
* @see VVVTVertex
* @see VertexBase
*/
class RSModelGGGGRVertex: public VVVTVertex {
public:
/**
* Default constructor.
*/
RSModelGGGGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- RSModelGGGGRVertex & operator=(const RSModelGGGGRVertex &);
+ RSModelGGGGRVertex & operator=(const RSModelGGGGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The graviton coupling.
*/
InvEnergy kappa_;
/**
* The last value of the coupling/
*/
Complex _couplast;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_RSModelGGGGRVertex_H */
diff --git a/Models/RSModel/RSModelSSGRVertex.h b/Models/RSModel/RSModelSSGRVertex.h
--- a/Models/RSModel/RSModelSSGRVertex.h
+++ b/Models/RSModel/RSModelSSGRVertex.h
@@ -1,109 +1,109 @@
// -*- C++ -*-
//
// RSModelSSGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModelSSGRVertex_H
#define HERWIG_RSModelSSGRVertex_H
//
// This is the declaration of the RSModelSSGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/SSTVertex.h"
#include "RSModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The RSModelSSGRVertex class is thew implementation of the graviton
* coupling to the Higgs in the RSModel. It inherits from the SSTVertex
* and implements the setCoupling member
*
* @see SSTVertex
* @see VertexBase
*/
class RSModelSSGRVertex: public SSTVertex {
public:
/**
* Default constructor.
*/
RSModelSSGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- RSModelSSGRVertex & operator=(const RSModelSSGRVertex &);
+ RSModelSSGRVertex & operator=(const RSModelSSGRVertex &) = delete;
/**
* Coupling.
*/
InvEnergy kappa_;
};
}
#endif /* HERWIG_RSModelSSGRVertex_H */
diff --git a/Models/RSModel/RSModelVVGRVertex.h b/Models/RSModel/RSModelVVGRVertex.h
--- a/Models/RSModel/RSModelVVGRVertex.h
+++ b/Models/RSModel/RSModelVVGRVertex.h
@@ -1,108 +1,108 @@
// -*- C++ -*-
//
// RSModelVVGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModelVVGRVertex_H
#define HERWIG_RSModelVVGRVertex_H
//
// This is the declaration of the RSModelVVGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/VVTVertex.h"
#include "RSModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vector-vector-graviton vertex for
* the RS model
*
* @see VVTVertex
* @see VertexBase
*/
class RSModelVVGRVertex: public VVTVertex {
public:
/**
* Default constructor.
*/
RSModelVVGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- RSModelVVGRVertex & operator=(const RSModelVVGRVertex &);
+ RSModelVVGRVertex & operator=(const RSModelVVGRVertex &) = delete;
/**
* The coupling.
*/
InvEnergy kappa_;
};
}
#endif /* HERWIG_RSModelVVGRVertex_H */
diff --git a/Models/RSModel/RSModelWWWGRVertex.h b/Models/RSModel/RSModelWWWGRVertex.h
--- a/Models/RSModel/RSModelWWWGRVertex.h
+++ b/Models/RSModel/RSModelWWWGRVertex.h
@@ -1,132 +1,132 @@
// -*- C++ -*-
//
// RSModelWWWGRVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RSModelWWWGRVertex_H
#define HERWIG_RSModelWWWGRVertex_H
//
// This is the declaration of the RSModelWWWGRVertex class.
#include "ThePEG/Helicity/Vertex/Tensor/VVVTVertex.h"
#include "RSModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The RSModelWWWGRVertex class is the implementation of the
* triple vector graviton couling in the RS model.
* It inherits from VVVTVertex and implements the setCoupling member.
*
* @see VVVTVertex
* @see VertexBase
*/
class RSModelWWWGRVertex: public VVVTVertex {
public:
/**
* Default constructor.
*/
RSModelWWWGRVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the foruth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- RSModelWWWGRVertex & operator=(const RSModelWWWGRVertex &);
+ RSModelWWWGRVertex & operator=(const RSModelWWWGRVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The graviton coupling.
*/
InvEnergy kappa_;
/**
* The last value of the coupling/
*/
Complex _couplast;
/**
* The last value of the scale, \f$q^2\f$.
*/
Energy2 _q2last;
/**
* The prefactor for the \f$Z\f$ vertex.
*/
double _zfact;
//@}
};
}
#endif /* HERWIG_RSModelWWWGRVertex_H */
diff --git a/Models/Sextet/SextetFFSVertex.h b/Models/Sextet/SextetFFSVertex.h
--- a/Models/Sextet/SextetFFSVertex.h
+++ b/Models/Sextet/SextetFFSVertex.h
@@ -1,140 +1,140 @@
// -*- C++ -*-
#ifndef HERWIG_SextetFFSVertex_H
#define HERWIG_SextetFFSVertex_H
//
// This is the declaration of the SextetFFSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetFFSVertex class.
*
* @see \ref SextetFFSVertexInterfaces "The interfaces"
* defined for SextetFFSVertex.
*/
class SextetFFSVertex: public Helicity::FFSVertex {
public:
/**
* The default constructor.
*/
SextetFFSVertex() {
colourStructure(ColourStructure::SU3K6);
}
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetFFSVertex & operator=(const SextetFFSVertex &);
+ SextetFFSVertex & operator=(const SextetFFSVertex &) = delete;
private:
/**
* The various couplings
*/
//@{
/**
* The \f$SU(2)\f$ quark-doublet coupling to \f$\Phi_{6,1,1/3}\f$
*/
vector<double> g1L_;
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,1/3}\f$
*/
vector<double> g1R_;
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,-2/3}\f$
*/
vector<double> g1pR_;
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,4/3}\f$
*/
vector<double> g1ppR_;
/**
* Coupling to \f$\Phi_{6,3,1/3}\f$
*/
vector<double> g3L_;
//@}
};
}
#endif /* HERWIG_SextetFFSVertex_H */
diff --git a/Models/Sextet/SextetFFVVertex.h b/Models/Sextet/SextetFFVVertex.h
--- a/Models/Sextet/SextetFFVVertex.h
+++ b/Models/Sextet/SextetFFVVertex.h
@@ -1,126 +1,126 @@
// -*- C++ -*-
#ifndef HERWIG_SextetFFVVertex_H
#define HERWIG_SextetFFVVertex_H
//
// This is the declaration of the SextetFFVVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetFFVVertex class.
*
* @see \ref SextetFFVVertexInterfaces "The interfaces"
* defined for SextetFFVVertex.
*/
class SextetFFVVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
SextetFFVVertex() {
colourStructure(ColourStructure::SU3K6);
}
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetFFVVertex & operator=(const SextetFFVVertex &);
+ SextetFFVVertex & operator=(const SextetFFVVertex &) = delete;
private:
/**
* The various couplings
*/
//@{
/**
* The \f$SU(2)\f$ quark-doublet coupling to \f$\Phi_{6,2,-1/6}\f$
*/
vector<double> g2_;
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,2,5/6}\f$
*/
vector<double> g2p_;
//@}
};
}
#endif /* HERWIG_SextetFFVVertex_H */
diff --git a/Models/Sextet/SextetGGSSVertex.h b/Models/Sextet/SextetGGSSVertex.h
--- a/Models/Sextet/SextetGGSSVertex.h
+++ b/Models/Sextet/SextetGGSSVertex.h
@@ -1,103 +1,103 @@
// -*- C++ -*-
#ifndef HERWIG_SextetGGSSVertex_H
#define HERWIG_SextetGGSSVertex_H
//
// This is the declaration of the SextetGGSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetGGSSVertex class.
*
* @see \ref SextetGGSSVertexInterfaces "The interfaces"
* defined for SextetGGSSVertex.
*/
class SextetGGSSVertex: public Helicity::VVSSVertex {
public:
/**
* The default constructor.
*/
SextetGGSSVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3,tcPDPtr part4);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetGGSSVertex & operator=(const SextetGGSSVertex &);
+ SextetGGSSVertex & operator=(const SextetGGSSVertex &) = delete;
private:
/**
* The energy at which the coupling was last evaluated
*/
Energy2 q2last_;
/**
* The coupling when it was last evaluated
*/
Complex couplast_;
};
}
#endif /* HERWIG_SextetGGSSVertex_H */
diff --git a/Models/Sextet/SextetGGVVVertex.h b/Models/Sextet/SextetGGVVVertex.h
--- a/Models/Sextet/SextetGGVVVertex.h
+++ b/Models/Sextet/SextetGGVVVertex.h
@@ -1,104 +1,104 @@
// -*- C++ -*-
#ifndef HERWIG_SextetGGVVVertex_H
#define HERWIG_SextetGGVVVertex_H
//
// This is the declaration of the SextetGGVVVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetGGVVVertex class.
*
* @see \ref SextetGGVVVertexInterfaces "The interfaces"
* defined for SextetGGVVVertex.
*/
class SextetGGVVVertex: public Helicity::VVVVVertex {
public:
/**
* The default constructor.
*/
SextetGGVVVertex() {
colourStructure(ColourStructure::SU3TT6);
}
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*@param part4 The fourth interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3, tcPDPtr part4);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetGGVVVertex & operator=(const SextetGGVVVertex &);
+ SextetGGVVVertex & operator=(const SextetGGVVVertex &) = delete;
private:
/**
* The scale at which the coupling was last evaluated
*/
Energy2 q2Last_;
/**
* The value of the coupling when it was last evaluated
*/
Complex coupLast_;
};
}
#endif /* HERWIG_SextetGGVVVertex_H */
diff --git a/Models/Sextet/SextetGSSVertex.h b/Models/Sextet/SextetGSSVertex.h
--- a/Models/Sextet/SextetGSSVertex.h
+++ b/Models/Sextet/SextetGSSVertex.h
@@ -1,104 +1,104 @@
// -*- C++ -*-
#ifndef HERWIG_SextetGSSVertex_H
#define HERWIG_SextetGSSVertex_H
//
// This is the declaration of the SextetGSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetGSSVertex class.
*
* @see \ref SextetGSSVertexInterfaces "The interfaces"
* defined for SextetGSSVertex.
*/
class SextetGSSVertex: public Helicity::VSSVertex {
public:
/**
* The default constructor.
*/
SextetGSSVertex() {
colourStructure(ColourStructure::SU3T6);
}
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetGSSVertex & operator=(const SextetGSSVertex &);
+ SextetGSSVertex & operator=(const SextetGSSVertex &) = delete;
private:
/**
* Store the value of the coupling when last evaluated
*/
Complex coupLast_;
/**
* Store the scale at which coupling was last evaluated
*/
Energy2 q2Last_;
};
}
#endif /* HERWIG_SextetGSSVertex_H */
diff --git a/Models/Sextet/SextetGVVVertex.h b/Models/Sextet/SextetGVVVertex.h
--- a/Models/Sextet/SextetGVVVertex.h
+++ b/Models/Sextet/SextetGVVVertex.h
@@ -1,102 +1,102 @@
// -*- C++ -*-
#ifndef THEPEG_SextetGVVVertex_H
#define THEPEG_SextetGVVVertex_H
//
// This is the declaration of the SextetGVVVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetGVVVertex class.
*
* @see \ref SextetGVVVertexInterfaces "The interfaces"
* defined for SextetGVVVertex.
*/
class SextetGVVVertex: public Helicity::VVVVertex {
public:
/**
* The default constructor.
*/
SextetGVVVertex() {
colourStructure(ColourStructure::SU3T6);
}
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetGVVVertex & operator=(const SextetGVVVertex &);
+ SextetGVVVertex & operator=(const SextetGVVVertex &) = delete;
private:
/**
* Store the value of the coupling when last evaluated
*/
Complex coupLast_;
/**
* Store the scale at which coupling was last evaluated
*/
Energy2 q2Last_;
};
}
#endif /* THEPEG_SextetGVVVertex_H */
diff --git a/Models/Sextet/SextetModel.h b/Models/Sextet/SextetModel.h
--- a/Models/Sextet/SextetModel.h
+++ b/Models/Sextet/SextetModel.h
@@ -1,320 +1,320 @@
// -*- C++ -*-
#ifndef HERWIG_SextetModel_H
#define HERWIG_SextetModel_H
//
// This is the declaration of the SextetModel class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSSVertex.h"
#include "SextetModel.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Models
*
* This class is used instead of the StandardModel class for the
*
*
* @see \ref SextetModelInterfaces "The interfaces"
* defined for SextetModel.
*/
class SextetModel: public BSMModel {
public:
/**
* The default constructor.
*/
SextetModel() : g1L_(3,0.), g1R_(3,0.), g1pR_(3,0.), g1ppR_(3,0.),
g2_(3,0.), g2p_(3,0.), g3L_(3,0.),
enableScalarSingletY43_(false),enableScalarSingletY13_(false),
enableScalarSingletY23_(false),enableScalarTripletY13_(false),
enableVectorDoubletY16_(false),enableVectorDoubletY56_(false) {
useMe();
}
/**
* Access to the couplings
*/
//@{
/**
* The \f$SU(2)\f$ quark-doublet coupling to \f$\Phi_{6,1,1/3}\f$
*/
const vector<double> & g1L() const {return g1L_;}
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,1/3}\f$
*/
const vector<double> & g1R() const {return g1R_;}
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,-2/3}\f$
*/
const vector<double> & g1pR() const {return g1pR_;}
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,4/3}\f$
*/
const vector<double> & g1ppR() const {return g1ppR_;}
/**
* The coupling to \f$V^\mu_{6,2,-1/6}\f$
*/
const vector<double> & g2() const {return g2_;}
/**
* The coupling to \f$V^\mu_{6,2,5/6}\f$
*/
const vector<double> & g2p() const {return g2p_;}
/**
* Coupling to \f$\Phi_{6,3,1/3}\f$
*/
const vector<double> & g3L() const {return g3L_;}
//@}
/**
* Switches to decide which particles to include
*/
//@{
/**
* Scalar Singlet \f$Y = 4/3\f$
*/
bool ScalarSingletY43Enabled() const {return enableScalarSingletY43_;}
/**
* Scalar Singlet \f$Y = -1/3\f$
*/
bool ScalarSingletY13Enabled() const {return enableScalarSingletY13_;}
/**
* Scalar Singlet \f$Y = -2/3\f$
*/
bool ScalarSingletY23Enabled() const {return enableScalarSingletY23_;}
/**
* Scalar Triplet \f$Y = 1/3\f$
*/
bool ScalarTripletY13Enabled() const {return enableScalarTripletY13_;}
/**
* Vector Doublet \f$Y = -1/6\f$
*/
bool VectorDoubletY16Enabled() const {return enableVectorDoubletY16_;}
/**
* Vector Doublet \f$Y = 5/6\f$
*/
bool VectorDoubletY56Enabled() const {return enableVectorDoubletY56_;}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Member to implement the command to enable particular diquarks
*/
string doEnable(string command);
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetModel & operator=(const SextetModel &);
+ SextetModel & operator=(const SextetModel &) = delete;
private:
/**
* Pointers to the vertex objects
*/
//@{
/**
* Pointer to the object handling the strong coupling of a
* vector sextet to one gluon
*/
AbstractVVVVertexPtr GVVVertex_;
/**
* Pointer to the object handling the EM coupling of a
* vector sextet to one photon
*/
AbstractVVVVertexPtr PVVVertex_;
/**
* Pointer to the object handling the strong coupling of a
* vector sextet to two gluons
*/
AbstractVVVVVertexPtr VVVVVertex_;
/**
* Pointer to the object handling the strong coupling of a
* scalar sextet to one gluon
*/
AbstractVSSVertexPtr GSSVertex_;
/**
* Pointer to the object handling the EM coupling of a
* scalar sextet to one photon
*/
AbstractVSSVertexPtr PSSVertex_;
/**
* Pointer to the object handling the strong coupling of a
* scalar sextet to two gluons
*/
AbstractVVSSVertexPtr VVSSVertex_;
/**
* Pointer to the object handling the coupling of two quarks
* to a vector sextet
*/
AbstractFFVVertexPtr FFVVertex_;
/**
* Pointer to the object handling the coupling of two quarks
* to a scalar sextet
*/
AbstractFFSVertexPtr FFSVertex_;
//@}
/**
* Couplings
*/
//@{
/**
* The \f$SU(2)\f$ quark-doublet coupling to \f$\Phi_{6,1,1/3}\f$
*/
vector<double> g1L_;
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,1/3}\f$
*/
vector<double> g1R_;
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,-2/3}\f$
*/
vector<double> g1pR_;
/**
* The \f$SU(2)\f$ singlet coupling to \f$\Phi_{6,1,4/3}\f$
*/
vector<double> g1ppR_;
/**
* The coupling to \f$V^\mu_{6,2,-1/6}\f$
*/
vector<double> g2_;
/**
* The coupling to \f$V^\mu_{6,2,5/6}\f$
*/
vector<double> g2p_;
/**
* Coupling to \f$\Phi_{6,3,1/3}\f$
*/
vector<double> g3L_;
//@}
/**
* Switches to decide which particles to include
*/
//@{
/**
* Scalar Singlet \f$Y = 4/3\f$
*/
bool enableScalarSingletY43_;
/**
* Scalar Singlet \f$Y = -1/3\f$
*/
bool enableScalarSingletY13_;
/**
* Scalar Singlet \f$Y = -2/3\f$
*/
bool enableScalarSingletY23_;
/**
* Scalar Triplet \f$Y = 1/3\f$
*/
bool enableScalarTripletY13_;
/**
* Vector Doublet \f$Y = -1/6\f$
*/
bool enableVectorDoubletY16_;
/**
* Vector Doublet \f$Y = 5/6\f$
*/
bool enableVectorDoubletY56_;
//@}
};
}
#endif /* HERWIG_SextetModel_H */
diff --git a/Models/Sextet/SextetPSSVertex.h b/Models/Sextet/SextetPSSVertex.h
--- a/Models/Sextet/SextetPSSVertex.h
+++ b/Models/Sextet/SextetPSSVertex.h
@@ -1,104 +1,104 @@
// -*- C++ -*-
#ifndef HERWIG_SextetPSSVertex_H
#define HERWIG_SextetPSSVertex_H
//
// This is the declaration of the SextetPSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetPSSVertex class.
*
* @see \ref SextetPSSVertexInterfaces "The interfaces"
* defined for SextetPSSVertex.
*/
class SextetPSSVertex: public Helicity::VSSVertex {
public:
/**
* The default constructor.
*/
SextetPSSVertex() {
colourStructure(ColourStructure::DELTA);
}
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetPSSVertex & operator=(const SextetPSSVertex &);
+ SextetPSSVertex & operator=(const SextetPSSVertex &) = delete;
private:
/**
* Store the value of the coupling when last evaluated
*/
Complex coupLast_;
/**
* Store the scale at which coupling was last evaluated
*/
Energy2 q2Last_;
};
}
#endif /* HERWIG_SextetPSSVertex_H */
diff --git a/Models/Sextet/SextetPVVVertex.h b/Models/Sextet/SextetPVVVertex.h
--- a/Models/Sextet/SextetPVVVertex.h
+++ b/Models/Sextet/SextetPVVVertex.h
@@ -1,102 +1,102 @@
// -*- C++ -*-
#ifndef THEPEG_SextetPVVVertex_H
#define THEPEG_SextetPVVVertex_H
//
// This is the declaration of the SextetPVVVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SextetPVVVertex class.
*
* @see \ref SextetPVVVertexInterfaces "The interfaces"
* defined for SextetPVVVertex.
*/
class SextetPVVVertex: public Helicity::VVVVertex {
public:
/**
* The default constructor.
*/
SextetPVVVertex() {
colourStructure(ColourStructure::DELTA);
}
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SextetPVVVertex & operator=(const SextetPVVVertex &);
+ SextetPVVVertex & operator=(const SextetPVVVertex &) = delete;
private:
/**
* Store the value of the coupling when last evaluated
*/
Complex coupLast_;
/**
* Store the scale at which coupling was last evaluated
*/
Energy2 q2Last_;
};
}
#endif /* THEPEG_SextetPVVVertex_H */
diff --git a/Models/StandardModel/AlphaEM.h b/Models/StandardModel/AlphaEM.h
--- a/Models/StandardModel/AlphaEM.h
+++ b/Models/StandardModel/AlphaEM.h
@@ -1,150 +1,150 @@
// -*- C++ -*-
//
// AlphaEM.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_AlphaEM_H
#define HERWIG_AlphaEM_H
//
// This is the declaration of the AlphaEM class.
//
#include "ThePEG/StandardModel/AlphaEMBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The AlphaEM class is an exact reimplementation of the electromagentic
* coupling in FORTRAN HERWIG and is mainly intended for testing.
* It uses that same hadronic parameterisation as in the ThePEG::SimpleEM
* but differs in the treatment of the top and leptonic contribution.
*
* @see \ref AlphaEMInterfaces "The interfaces"
* defined for AlphaEM.
*/
class AlphaEM: public AlphaEMBase {
public:
/**
* The default constructor.
*/
AlphaEM() : _me(),_mmu(),_mtau(), _mtop() {}
/**
* The \f$\alpha_{EM}\f$. Return the value of the coupling at a
* given \a scale using the given standard model object, \a sm.
*/
virtual double value(Energy2 scale, const StandardModelBase &) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* The real part of the photon self-energy
* @param ratio The ratio of the mass squared of the fermion to the scale squared,
* \f$m^2/Q^2\f$.
*/
double realPi(double ratio) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- AlphaEM & operator=(const AlphaEM &);
+ AlphaEM & operator=(const AlphaEM &) = delete;
private:
/**
* Masses of the Standard Model fermions we need for the
* self-energies
*/
//@{
/**
* Electron mass squared
*/
Energy2 _me;
/**
* Muon mass squared
*/
Energy2 _mmu;
/**
* Tau mass squared
*/
Energy2 _mtau;
/**
* Top mass squared
*/
Energy2 _mtop;
//@}
};
}
#endif /* HERWIG_AlphaEM_H */
diff --git a/Models/StandardModel/GenericSVVVertex.h b/Models/StandardModel/GenericSVVVertex.h
--- a/Models/StandardModel/GenericSVVVertex.h
+++ b/Models/StandardModel/GenericSVVVertex.h
@@ -1,126 +1,126 @@
// -*- C++ -*-
//
// GenericSVVVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GenericSVVVertex_H
#define HERWIG_GenericSVVVertex_H
//
// This is the declaration of the GenericSVVVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/GeneralVVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The <code>GenericSVVVertex</code> class implements the
* setCoupling member for the Standard Model effective
* vertex Higgs-gluon-gluon.
*/
class GenericSVVVertex: public Helicity::GeneralVVSVertex {
public:
/**
* The default constructor.
*/
GenericSVVVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to first particle
*@param part3 ParticleData pointer to first particle
*/
virtual void setCoupling (Energy2 q2, tcPDPtr part1, tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
string dopids(string in);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GenericSVVVertex & operator=(const GenericSVVVertex &);
+ GenericSVVVertex & operator=(const GenericSVVVertex &) = delete;
/**
* Storage of couplings
*/
//@{
/**
* The particle ids
*/
vector <int> pids;
/**
* The particle ids
*/
int oas,oaew;
};
}
// CLASSDOC OFF
#endif /* HERWIG_GenericSVVVertex_H */
diff --git a/Models/StandardModel/GenericVVVVertex.h b/Models/StandardModel/GenericVVVVertex.h
--- a/Models/StandardModel/GenericVVVVertex.h
+++ b/Models/StandardModel/GenericVVVVertex.h
@@ -1,126 +1,126 @@
// -*- C++ -*-
//
// GenericVVVVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GenericVVVVertex_H
#define HERWIG_GenericVVVVertex_H
//
// This is the declaration of the GenericSVVVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The <code>GenericVVVVertex</code> class implements the
* setCoupling member for the Standard Model effective
* vertex EWVector-gluon-gluon.
*/
class GenericVVVVertex: public Helicity::VVVVertex {
public:
/**
* The default constructor.
*/
GenericVVVVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to first particle
*@param part3 ParticleData pointer to first particle
*/
virtual void setCoupling (Energy2 q2, tcPDPtr part1, tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
string dopids(string in);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GenericVVVVertex & operator=(const GenericVVVVertex &);
+ GenericVVVVertex & operator=(const GenericVVVVertex &) = delete;
/**
* Storage of couplings
*/
//@{
/**
* The particle ids
*/
vector <int> pids;
/**
* The particle ids
*/
int oas,oaew;
};
}
// CLASSDOC OFF
#endif /* HERWIG_GenericVVVVertex_H */
diff --git a/Models/StandardModel/O2AlphaS.h b/Models/StandardModel/O2AlphaS.h
--- a/Models/StandardModel/O2AlphaS.h
+++ b/Models/StandardModel/O2AlphaS.h
@@ -1,170 +1,170 @@
// -*- C++ -*-
//
// O2AlphaS.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_O2AlphaS_H
#define HERWIG_O2AlphaS_H
//
// This is the declaration of the O2AlphaS class.
//
#include "ThePEG/StandardModel/AlphaSBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The O2AlphaS class is the implementation of the two-loop
* \f$\alpha_S\f$ in the same way as in FORTRAN HERWIG.
*
* The input value of \f$\Lambda_{\rm QCD}\f$ is in the \f$\bar{MS}\f$
* scheme and can either be converted to a Monte Carlo scheme, as in the
* FORTRAN program, or left in the \f$\bar{MS}\f$ scheme to evaluate
* the running coupling
*
* @see \ref O2AlphaSInterfaces "The interfaces"
* defined for O2AlphaS.
*/
class O2AlphaS: public AlphaSBase {
public:
/**
* The default constructor.
*/
O2AlphaS() : _lambdaQCD(180.*MeV), _bcoeff(6,0.0), _ccoeff(6,0.0),
_lambdas(7), _threshold(6), _match(6,0.0), _copt(0) {}
/** @name Virtual functions to override those in the base class */
//@{
/**
* The \f$\alpha_S\f$. Return the QCD coupling for a given \a scale
* using the given standard model object \a sm.
*/
virtual double value(Energy2 scale, const StandardModelBase & sm) const;
/**
* Return the flavour thresholds used. The returned vector contains
* (in position <code>i</code>) the scales when the active number of
* flavours changes from <code>i</code> to <code>i+1</code>.
*/
virtual vector<Energy2> flavourThresholds() const;
/**
* Return the \f$\Lambda_{QCD}\f$ used for different numbers of
* active flavours.
*/
virtual vector<Energy> LambdaQCDs() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- O2AlphaS & operator=(const O2AlphaS &);
+ O2AlphaS & operator=(const O2AlphaS &) = delete;
private:
/**
* The value of \f$\Lambda_{\rm QCD}\f$ 5-flavours
* in the \f$\bar{\rm MS}\f$ scheme
*/
Energy _lambdaQCD;
/**
* The values of the leading-order \f$\beta\f$-function coefficients
*/
vector<double> _bcoeff;
/**
* The values of the next-to-leading-order \f$\beta\f$-function coefficients
*/
vector<double> _ccoeff;
/**
* The values of \f$\Lambda_{\rm QCD}\f$ for the diffferent number of flavours
*/
vector<Energy> _lambdas;
/**
* The flavour thresholds
*/
vector<Energy> _threshold;
/**
* The constants for matching
*/
vector<double> _match;
/**
* Option for the coupling
*/
unsigned int _copt;
};
}
#endif /* HERWIG_O2AlphaS_H */
diff --git a/Models/StandardModel/RunningMass.h b/Models/StandardModel/RunningMass.h
--- a/Models/StandardModel/RunningMass.h
+++ b/Models/StandardModel/RunningMass.h
@@ -1,150 +1,150 @@
// -*- C++ -*-
//
// RunningMass.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RunningMass_H
#define HERWIG_RunningMass_H
//
// This is the declaration of the RunningMass class.
#include "RunningMassBase.h"
#include "StandardModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Models
*
* Implementation of the 1 or 2 loop QCD running mass.
*
* @see RunningMassBase
*/
class RunningMass: public RunningMassBase {
public:
/**
* Default constructor.
*/
RunningMass() : _theQCDOrder(1), _theMaxFlav(6), _lightOption(1), _heavyOption(0) {}
public:
/**
* Return the running mass for a given scale \f$q^2\f$ and particle type.
* @param q2 The scale \f$q^2\f$.
* @param part The ParticleData pointer
*/
virtual Energy value(Energy2 q2,tcPDPtr part) const;
/**
* Return the masses used.
*/
virtual vector<Energy> mass() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- RunningMass & operator=(const RunningMass &);
+ RunningMass & operator=(const RunningMass &) = delete;
private:
/**
* Order in alphaS.
*/
unsigned int _theQCDOrder;
/**
* The maximum number of flavours.
*/
unsigned int _theMaxFlav;
/**
* The power for the running mass calculation.
*/
vector<double> _thePower;
/**
* The coefficients for the running mass calculation.
*/
vector<double> _theCoefficient;
/**
* Pointer to the StandardModel object.
*/
tcSMPtr _theStandardModel;
/**
* Option to use pole masses for u,d,s
*/
unsigned int _lightOption;
/**
* Option to use pole masses for c,b
*/
unsigned int _heavyOption;
};
}
#endif /* HERWIG_RunningMass_H */
diff --git a/Models/StandardModel/RunningMassBase.h b/Models/StandardModel/RunningMassBase.h
--- a/Models/StandardModel/RunningMassBase.h
+++ b/Models/StandardModel/RunningMassBase.h
@@ -1,99 +1,99 @@
// -*- C++ -*-
//
// RunningMassBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_RunningMassBase_H
#define HERWIG_RunningMassBase_H
//
// This is the declaration of the RunningMassBase class.
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Models
*
* Base class for running mass calculations.
*/
class RunningMassBase: public Interfaced {
public:
/**
* Return the running mass for a given scale \f$q^2\f$ and particle type.
* @param q2 The scale \f$q^2\f$.
* @param part The ParticleData pointer
*/
virtual Energy value(Energy2 q2,tcPDPtr part) const = 0;
/**
* Return the masses used.
*/
virtual vector<Energy> mass() const = 0;
/**
* Return the \f$i\f$ th element of the mass array.
* @param i The element to return
*/
Energy massElement(unsigned int i) const {return _theMass[i];}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- RunningMassBase & operator=(const RunningMassBase &);
+ RunningMassBase & operator=(const RunningMassBase &) = delete;
private:
/**
* Flavour thresholds and the masses, set at initialization.
*/
vector<Energy> _theMass;
};
}
#endif /* HERWIG_RunningMassBase_H */
diff --git a/Models/StandardModel/SMFFGVertex.h b/Models/StandardModel/SMFFGVertex.h
--- a/Models/StandardModel/SMFFGVertex.h
+++ b/Models/StandardModel/SMFFGVertex.h
@@ -1,108 +1,108 @@
// -*- C++ -*-
//
// SMFFGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMFFGVertex_H
#define HERWIG_SMFFGVertex_H
//
// This is the declaration of the SMFFGVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the Standard Model quark-antiquark gluon vertex.
*
* @see FFVVertex
* @see VertexBase
*/
class SMFFGVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
SMFFGVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SMFFGVertex & operator=(const SMFFGVertex &);
+ SMFFGVertex & operator=(const SMFFGVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the strong coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_SMFFGVertex_H */
diff --git a/Models/StandardModel/SMFFHVertex.h b/Models/StandardModel/SMFFHVertex.h
--- a/Models/StandardModel/SMFFHVertex.h
+++ b/Models/StandardModel/SMFFHVertex.h
@@ -1,149 +1,149 @@
// -*- C++ -*-
//
// SMFFHVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMFFHVertex_H
#define HERWIG_SMFFHVertex_H
//
// This is the declaration of the SMFFHVertex class.
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vertex coupling the Standard Model Higgs
* to the Standard Model fermions for helicity amplitude calculations
*
* @see FFSVertex
* @see VertexBase
*/
class SMFFHVertex: public FFSVertex {
public:
/**
* Default constructor.
*/
SMFFHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- SMFFHVertex & operator=(const SMFFHVertex &);
+ SMFFHVertex & operator=(const SMFFHVertex &) = delete;
private:
/**
* Pointer to the SM object.
*/
tcHwSMPtr _theSM;
/**
* Storage of the couplings.
*/
//@{
/**
* Last evaluation of the coupling
*/
complex<InvEnergy> _couplast;
/**
* The PDG code of the last fermion the coupling was evaluated for.
*/
int _idlast;
/**
* The last \f$q^2\f$ the coupling was evaluated at.
*/
Energy2 _q2last;
/**
* The mass of the last fermion for which the coupling was evaluated.
*/
Energy _masslast;
/**
* The mass of the \f$W\f$ boson.
*/
Energy _mw;
/**
* A definite fermion flavour to couple to. All other flavours are ignored,
* if this is different from zero.
*/
int _fermion;
//@}
};
}
#endif /* HERWIG_SMFFHVertex_H */
diff --git a/Models/StandardModel/SMFFPVertex.h b/Models/StandardModel/SMFFPVertex.h
--- a/Models/StandardModel/SMFFPVertex.h
+++ b/Models/StandardModel/SMFFPVertex.h
@@ -1,125 +1,125 @@
// -*- C++ -*-
//
// SMFFPVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMFFPVertex_H
#define HERWIG_SMFFPVertex_H
//
// This is the declaration of the SMFFPVertex class.
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the Standard Model fermion-antifermion
* photon vertex.
*
* @see FFVVertex
* @see VertexBase
*/
class SMFFPVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
SMFFPVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- SMFFPVertex & operator=(const SMFFPVertex &);
+ SMFFPVertex & operator=(const SMFFPVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The charge of the Standard Model fermions.
*/
vector<double> _charge;
/**
* The last value of the coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_SMFFPVertex_H */
diff --git a/Models/StandardModel/SMFFWVertex.h b/Models/StandardModel/SMFFWVertex.h
--- a/Models/StandardModel/SMFFWVertex.h
+++ b/Models/StandardModel/SMFFWVertex.h
@@ -1,131 +1,131 @@
// -*- C++ -*-
//
// SMFFWVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMFFWVertex_H
#define HERWIG_SMFFWVertex_H
//
// This is the declaration of the SMFFWVertex class.
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the Standard model coupling
* of the W to the fermions.
*
* @see FFVVertex
* @see VertexBase
*/
class SMFFWVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
SMFFWVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- SMFFWVertex & operator=(const SMFFWVertex &);
+ SMFFWVertex & operator=(const SMFFWVertex &) = delete;
private:
/**
* True, if a diagonal CKM matrix should be assumed. This ignores
* the CKM object of the StandardModel.
*/
bool _diagonal;
/**
* Storage of the couplings.
*/
//@{
/**
* The elements of the CKM matrix.
*/
vector<vector<Complex> > _ckm;
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_SMFFWVertex_H */
diff --git a/Models/StandardModel/SMFFZVertex.h b/Models/StandardModel/SMFFZVertex.h
--- a/Models/StandardModel/SMFFZVertex.h
+++ b/Models/StandardModel/SMFFZVertex.h
@@ -1,131 +1,131 @@
// -*- C++ -*-
//
// SMFFZVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMFFZVertex_H
#define HERWIG_SMFFZVertex_H
//
// This is the declaration of the SMFFZVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the Standard Model
* fermion-antifermion Z vertex.
*
* @see FFVVertex
* @see VertexBase
*/
class SMFFZVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
SMFFZVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- SMFFZVertex & operator=(const SMFFZVertex &);
+ SMFFZVertex & operator=(const SMFFZVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The left couplings of the Standard Model fermions.
*/
vector<double> _gl;
/**
* The right couplings of the Standard Model fermions.
*/
vector<double> _gr;
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_SMFFZVertex_H */
diff --git a/Models/StandardModel/SMGGGGVertex.h b/Models/StandardModel/SMGGGGVertex.h
--- a/Models/StandardModel/SMGGGGVertex.h
+++ b/Models/StandardModel/SMGGGGVertex.h
@@ -1,108 +1,108 @@
// -*- C++ -*-
//
// SMGGGGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMGGGGVertex_H
#define HERWIG_SMGGGGVertex_H
//
// This is the declaration of the SMGGGGVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The SMGGGGVertex class is the implementation of the
* Standard Model quartic gluon vertex. It inherits from
* VVVVVertex and implements the setCoupling member.
*
* @see VVVVVertex
* @see VertexBase
*/
class SMGGGGVertex: public VVVVVertex {
public:
/**
* Default constructor.
*/
SMGGGGVertex();
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3,tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SMGGGGVertex & operator=(const SMGGGGVertex &);
+ SMGGGGVertex & operator=(const SMGGGGVertex &) = delete;
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the strong coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_SMGGGGVertex_H */
diff --git a/Models/StandardModel/SMGGGVertex.h b/Models/StandardModel/SMGGGVertex.h
--- a/Models/StandardModel/SMGGGVertex.h
+++ b/Models/StandardModel/SMGGGVertex.h
@@ -1,104 +1,104 @@
// -*- C++ -*-
//
// SMGGGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMGGGVertex_H
#define HERWIG_SMGGGVertex_H
//
// This is the declaration of the SMGGGVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::Direction;
/** \ingroup Helicity
*
* Implementation of the SM triple gluon vertex.
*
* @see VVVVertex
* @see VertexBase
*/
class SMGGGVertex : public Helicity::VVVVertex {
public:
/**
* Default constructor.
*/
SMGGGVertex();
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SMGGGVertex & operator=(const SMGGGVertex &);
+ SMGGGVertex & operator=(const SMGGGVertex &) = delete;
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the strong coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_SMGGGVertex_H */
diff --git a/Models/StandardModel/SMHGGVertex.h b/Models/StandardModel/SMHGGVertex.h
--- a/Models/StandardModel/SMHGGVertex.h
+++ b/Models/StandardModel/SMHGGVertex.h
@@ -1,163 +1,163 @@
// -*- C++ -*-
//
// SMHGGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMHGGVertex_H
#define HERWIG_SMHGGVertex_H
//
// This is the declaration of the SMHGGVertex class.
//
#include "Herwig/Models/General/VVSLoopVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/**
* The <code>SMHGGVertex</code> class implements the
* setCoupling member for the Standard Model effective
* vertex Higgs-gluon-gluon.
*/
class SMHGGVertex: public VVSLoopVertex {
public:
/**
* The default constructor.
*/
SMHGGVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to first particle
*@param part3 ParticleData pointer to first particle
*/
virtual void setCoupling (Energy2 q2, tcPDPtr part1, tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHGGVertex & operator=(const SMHGGVertex &);
+ SMHGGVertex & operator=(const SMHGGVertex &) = delete;
/**
* Storage of couplings
*/
//@{
/**
* Last value of the coupling calculated
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which coupling was last evaluated
*/
Energy2 _q2last;
//@}
/**
* Pointer to Standard Model object
*/
tcHwSMPtr _theSM;
/**
* Mass of W-boson for higgs coupling
*/
Energy _mw;
/**
* define quark mass scheme (fixed/running)
*/
unsigned int massopt;
/**
* The minimum flavour number in quark loops
*/
int _minloop;
/**
* The maximum flavour number in quark loops
*/
int _maxloop;
/**
* Loop calculations: A1 for spin-1/2 particles (see details in ``Higgs Hunter's Guide'')
*/
Complex Af(double labmda) const;
/**
* Loop calculations: W2 function (see details in NPB297,221)
*/
Complex W2(double lambda) const;
/**
* Switch between two representations of coefficients (_a00,_a11,_a12,_a21,_a22,_aEp):
* suitable for the simplified H-g-g and H-gamma-gamma vertices and
* suitable for the Passarino-Veltman tensor reduction scheme
*/
unsigned int _CoefRepresentation;
};
}
// CLASSDOC OFF
#endif /* HERWIG_SMHGGVertex_H */
diff --git a/Models/StandardModel/SMHHHVertex.h b/Models/StandardModel/SMHHHVertex.h
--- a/Models/StandardModel/SMHHHVertex.h
+++ b/Models/StandardModel/SMHHHVertex.h
@@ -1,123 +1,123 @@
// -*- C++ -*-
#ifndef HERWIG_SMHHHVertex_H
#define HERWIG_SMHHHVertex_H
//
// This is the declaration of the SMHHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* Here is the documentation of the SMHHHVertex class.
*
* @see \ref SMHHHVertexInterfaces "The interfaces"
* defined for SMHHHVertex.
*/
class SMHHHVertex: public SSSVertex {
public:
/**
* The default constructor.
*/
SMHHHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHHHVertex & operator=(const SMHHHVertex &);
+ SMHHHVertex & operator=(const SMHHHVertex &) = delete;
private:
/**
* ratio of masses
*/
Energy ratio_;
/**
* The last value of the electroweak coupling calculated.
*/
Complex couplast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2last_;
};
}
#endif /* HERWIG_SMHHHVertex_H */
diff --git a/Models/StandardModel/SMHPPVertex.cc b/Models/StandardModel/SMHPPVertex.cc
--- a/Models/StandardModel/SMHPPVertex.cc
+++ b/Models/StandardModel/SMHPPVertex.cc
@@ -1,286 +1,286 @@
// -*- C++ -*-
//
// SMHPPVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SMHPPVertex class.
//
#include "SMHPPVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/Looptools/clooptools.h"
using namespace Herwig;
using namespace ThePEG;
void SMHPPVertex::persistentOutput(PersistentOStream & os) const {
os << _theSM << ounit(_mw,GeV) << _massopt << _minloop << _maxloop
<< _CoefRepresentation;
}
void SMHPPVertex::persistentInput(PersistentIStream & is, int) {
is >> _theSM >> iunit(_mw, GeV) >> _massopt >> _minloop >> _maxloop
>> _CoefRepresentation;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<SMHPPVertex,VVSLoopVertex>
describeHerwigSMHPPVertex("Herwig::SMHPPVertex", "Herwig.so");
void SMHPPVertex::Init() {
static ClassDocumentation<SMHPPVertex> documentation
("This class implements the h0->gamma,gamma vertex.");
static Parameter<SMHPPVertex,int> interfaceMinQuarkInLoop
("MinQuarkInLoop",
"The minimum flavour of the quarks to include in the loops",
&SMHPPVertex::_minloop, 6, 1, 6,
false, false, Interface::limited);
static Parameter<SMHPPVertex,int> interfaceMaxQuarkInLoop
("MaxQuarkInLoop",
"The maximum flavour of the quarks to include in the loops",
&SMHPPVertex::_maxloop, 6, 1, 6,
false, false, Interface::limited);
static Switch<SMHPPVertex,unsigned int> interfaceMassOption
("LoopMassScheme",
"Switch for the treatment of the masses in the loops ",
&SMHPPVertex::_massopt, 2, false, false);
static SwitchOption interfaceHeavyMass
(interfaceMassOption,
"PoleMasses",
"The loop is calculcated with the pole quark masses",
1);
static SwitchOption interfaceNormalMass
(interfaceMassOption,
"RunningMasses",
"running quark masses are taken in the loop",
2);
static Switch<SMHPPVertex,unsigned int> interfaceScheme
("CoefficientScheme",
"Which scheme for the tensor coefficients is applied",
&SMHPPVertex::_CoefRepresentation, 1, false, false);
static SwitchOption interfaceSchemeSimplified
(interfaceScheme,
"Simplified",
"Represection suitable for the simplified the H-g-g and H-gamma-gamma vertices",
1);
static SwitchOption interfaceSchemeGeneral
(interfaceScheme,
"General",
"Represection suitable for the Passarino-Veltman tensor reduction scheme",
2);
}
void SMHPPVertex::setCoupling(Energy2 q2, tcPDPtr part2,
tcPDPtr part3, tcPDPtr part1) {
assert( part1->id() == ParticleID::h0 &&
part2->id() == ParticleID::gamma && part3->id() == ParticleID::gamma );
int Qminloop = _minloop;
int Qmaxloop = _maxloop;
if (_maxloop < _minloop) {
Qmaxloop=_minloop;
Qminloop=_maxloop;
}
switch (_CoefRepresentation) {
case 1: {
if(q2 != _q2last||_couplast==0.) {
double g = weakCoupling(q2);
double e2 = sqr(electroMagneticCoupling(q2));
_couplast = UnitRemoval::E * e2 * g / 8. / _mw/ sqr(Constants::pi);
_q2last = q2;
}
norm(_couplast);
Complex loop(0.);
// quark loops
for ( int i = Qminloop; i <= Qmaxloop; ++i ) {
tcPDPtr qrk = getParticleData(i);
Energy mass = (2 == _massopt) ? _theSM->mass(q2,qrk) : qrk->mass();
Charge charge = qrk->charge();
- loop += 3.*sqr(charge/ThePEG::Units::eplus) * Af(sqr(mass)/invariant(0,0));
+ loop += Complex(3.*sqr(charge/ThePEG::Units::eplus) * Af(sqr(mass)/invariant(0,0)));
}
// lepton loops
int Lminloop = 3; // still fixed value
int Lmaxloop = 3; // still fixed value
for (int i = Lminloop; i <= Lmaxloop; ++i) {
tcPDPtr lpt = getParticleData(9 + 2*i);
Energy mass = (2 == _massopt) ? _theSM->mass(q2,lpt) : lpt->mass();
Charge charge = lpt->charge();
- loop += sqr(charge/ThePEG::Units::eplus) * Af(sqr(mass)/invariant(0,0));
+ loop += Complex(sqr(charge/ThePEG::Units::eplus) * Af(sqr(mass)/invariant(0,0)));
}
// W loop
loop += Aw(sqr(_mw)/invariant(0,0));
a00(loop);
a11(0.0);
a12(0.0);
a21(-loop);
a22(0.0);
aEp(0.0);
break;
}
case 2: {
if(q2 != _q2last||_couplast==0.) {
Looptools::clearcache();
double e = electroMagneticCoupling(q2);
_couplast = pow(e,3)/sqrt(sin2ThetaW());
_q2last = q2;
}
norm(_couplast);
// quarks
int delta = Qmaxloop - Qminloop + 1;
type.resize(delta,PDT::SpinUnknown);
masses.resize(delta,ZERO);
for (int i = 0; i < delta; ++i) {
tcPDPtr q = getParticleData(_minloop+i);
type[i] = PDT::Spin1Half;
masses[i] = (2 == _massopt) ? _theSM->mass(q2,q) : q->mass();
double copl = -masses[i]*3.*sqr(q->iCharge()/3.)/_mw/2.;
couplings.push_back(make_pair(copl, copl));
}
// tau
type.push_back(PDT::Spin1Half);
tcPDPtr tau = getParticleData(ParticleID::tauminus);
masses.push_back(_theSM->mass(q2,tau));
double copl = -masses.back()*sqr(tau->iCharge()/3.)/_mw/2.;
couplings.push_back(make_pair(copl, copl));
// W
type.push_back(PDT::Spin1);
masses.push_back(_mw);
const double mw = UnitRemoval::InvE*_mw;
couplings.push_back(make_pair(mw,mw));
setNParticles(delta+2);
VVSLoopVertex::setCoupling(q2, part1, part2, part3);
break;
}
}
}
Complex SMHPPVertex::Af(const double tau) const {
return tau*(4. - W2(tau)*(1. - 4.*tau));
}
Complex SMHPPVertex::Aw(const double tau) const {
return 0.5*(-3.*W2(tau)*tau*(4.*tau - 2.) - 12.*tau - 2.);
}
Complex SMHPPVertex::W2(double lambda) const {
double pi = Constants::pi;
if (0.0 == lambda)
return 0.0;
if (lambda < 0.0)
return 4.*sqr(asinh(0.5*sqrt(-1./lambda)));
double root(0.5*sqrt(1./lambda));
Complex ac(0.);
// formulae from NPB297,221
if(root < 1.) {
ac = -sqr(asin(root));
}
else {
double ex = acosh(root);
ac = sqr(ex) - 0.25*sqr(pi) - pi*ex*Complex(0.,1.);
}
return 4.*ac;
}
SMHPPVertex::SMHPPVertex()
:_couplast(0.),_q2last(),_mw(),_massopt(1),
_minloop(6),_maxloop(6),_CoefRepresentation(1) {
orderInGs(0);
orderInGem(3);
colourStructure(ColourStructure::SINGLET);
}
// functions for loops for testing
// namespace {
// Complex F0(double tau) {
// Complex ft;
// if(tau>=1.)
// ft = sqr(asin(1./sqrt(tau)));
// else {
// double etap = 1.+sqrt(1.-tau);
// double etam = 1.-sqrt(1.-tau);
// ft = -0.25*sqr(log(etap/etam)-Constants::pi*Complex(0.,1.));
// }
// return tau*(1.-tau*ft);
// }
// Complex FHalf(double tau,double eta) {
// Complex ft;
// if(tau>=1.)
// ft = sqr(asin(1./sqrt(tau)));
// else {
// double etap = 1.+sqrt(1.-tau);
// double etam = 1.-sqrt(1.-tau);
// ft = -0.25*sqr(log(etap/etam)-Constants::pi*Complex(0.,1.));
// }
// return -2.*tau*(eta+(1.-tau*eta)*ft);
// }
// Complex F1(double tau) {
// Complex ft;
// if(tau>=1.)
// ft = sqr(asin(1./sqrt(tau)));
// else {
// double etap = 1.+sqrt(1.-tau);
// double etam = 1.-sqrt(1.-tau);
// ft = -0.25*sqr(log(etap/etam)-Constants::pi*Complex(0.,1.));
// }
// return 2.+3.*tau+3.*tau*(2.-tau)*ft;
// }
// }
void SMHPPVertex::doinit() {
//PDG codes for particles at vertices
addToList(22,22,25);
_theSM = dynamic_ptr_cast<tcHwSMPtr>(generator()->standardModel());
if( !_theSM )
throw InitException()
<< "SMHGGVertex::doinit() - The pointer to the SM object is null."
<< Exception::abortnow;
_mw = getParticleData(ThePEG::ParticleID::Wplus)->mass();
VVSLoopVertex::doinit();
// // code to test the partial width
// Energy mh = getParticleData(25)->mass();
// Complex I(0.);
// for(long ix=int(_minloop);ix<=int(_maxloop);++ix) {
// tcPDPtr qrk = getParticleData(ix);
// Energy mt = (2 == _massopt) ? _theSM->mass(sqr(mh),qrk) : qrk->mass();
// double tau = sqr(2.*mt/mh);
// I += 3.*sqr(double(qrk->iCharge())/3.)*FHalf(tau,1.);
// cerr << "testing half " << FHalf(tau,1) << " " << Af(0.25*tau) << "\n";
// }
// for(long ix=15;ix<=15;++ix) {
// tcPDPtr qrk = getParticleData(ix);
// Energy mt = (2 == _massopt) ? _theSM->mass(sqr(mh),qrk) : qrk->mass();
// double tau = sqr(2.*mt/mh);
// I += sqr(double(qrk->iCharge())/3.)*FHalf(tau,1.);
// }
// I += F1(sqr(2.*_mw/mh));
// Energy width = sqr(weakCoupling(sqr(mh))*sqr(electroMagneticCoupling(sqr(mh))))
// /1024./pow(Constants::pi,5)/16.*sqr(mh/_mw)*mh*std::norm(I);
// cerr << "testing anal " << width/GeV << "\n";
if(loopToolsInitialized()) Looptools::ltexi();
}
diff --git a/Models/StandardModel/SMHPPVertex.h b/Models/StandardModel/SMHPPVertex.h
--- a/Models/StandardModel/SMHPPVertex.h
+++ b/Models/StandardModel/SMHPPVertex.h
@@ -1,173 +1,173 @@
// -*- C++ -*-
//
// SMHPPVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMHPPVertex_H
#define HERWIG_SMHPPVertex_H
//
// This is the declaration of the SMHPPVertex class.
//
#include "Herwig/Models/General/VVSLoopVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/**
* The <code>SMHGGVertex</code> class implements the
* setCoupling member for the Standard Model effective
* vertex Higgs-gamma-gamma.
*/
class SMHPPVertex: public VVSLoopVertex {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
SMHPPVertex();
//@}
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to second particle
*@param part3 ParticleData pointer to third particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHPPVertex & operator=(const SMHPPVertex &);
+ SMHPPVertex & operator=(const SMHPPVertex &) = delete;
private:
/**
* Loop calculations: A1 for spin-1/2 particles (see details in ``Higgs Hunter's Guide'')
*/
Complex Af(const double lambda) const;
/**
* Loop calculations: A1 for spin-1 particles (see details in ``Higgs Hunter's Guide'')
*/
Complex Aw(const double lambda) const;
/**
* Loop calculations: W2 function (see details in NPB297,221)
*/
Complex W2(double lambda) const;
private:
/**
*Storage of couplings
*/
//@{
/**
* Last value of the coupling calculated
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which coupling was last evaluated
*/
Energy2 _q2last;
//@}
/**
* Pointer to Standard Model object
*/
tcHwSMPtr _theSM;
/**
* The mass of the \f$W\f$ boson.
*/
Energy _mw;
/**
* define quark mass scheme (fixed/running)
*/
unsigned int _massopt;
/**
* The minimum flavour number in quark loops
*/
int _minloop;
/**
* The maximum flavour number in quark loops
*/
int _maxloop;
/**
* Switch between two representations of coefficients (_a00,_a11,_a12,_a21,_a22,_aEp):
* suitable for the simplified H-g-g and H-gamma-gamma vertices and
* suitable for the Passarino-Veltman tensor reduction scheme
*/
unsigned int _CoefRepresentation;
};
}
#endif /* HERWIG_SMHPPVertex_H */
diff --git a/Models/StandardModel/SMHZPVertex.h b/Models/StandardModel/SMHZPVertex.h
--- a/Models/StandardModel/SMHZPVertex.h
+++ b/Models/StandardModel/SMHZPVertex.h
@@ -1,178 +1,178 @@
// -*- C++ -*-
#ifndef Herwig_SMHZPVertex_H
#define Herwig_SMHZPVertex_H
//
// This is the declaration of the SMHZPVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/GeneralVVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SMHZPVertex class.
*
* @see \ref SMHZPVertexInterfaces "The interfaces"
* defined for SMHZPVertex.
*/
class SMHZPVertex: public GeneralVVSVertex {
public:
/**
* The default constructor.
*/
SMHZPVertex();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param part1 ParticleData pointer to first particle
*@param part2 ParticleData pointer to second particle
*@param part3 ParticleData pointer to third particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHZPVertex & operator=(const SMHZPVertex &);
+ SMHZPVertex & operator=(const SMHZPVertex &) = delete;
private:
/**
* Functions for the loops from PLB 276 350
*/
//@{
/**
* The \f$I_1(\tau,\lambda)\f$ function from PLB 276 350
*/
Complex I1(double tau,double lambda) const;
/**
* The \f$I_2(\tau,\lambda)\f$ function from PLB 276 350
*/
Complex I2(double tau,double lambda) const;
/**
* The \f$f(\tau)\f$ function from PLB 276 350
*/
Complex f(double tau) const;
/**
* The \f$g(\tau)\f$ function from PLB 276 350
*/
Complex g(double tau) const;
//@}
private:
/**
*Storage of couplings
*/
//@{
/**
* Last value of the coupling calculated
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which coupling was last evaluated
*/
Energy2 _q2last;
//@}
/**
* Pointer to Standard Model object
*/
tcHwSMPtr _theSM;
/**
* The mass of the \f$W\f$ boson.
*/
Energy _mw;
/**
* The mass of the \f$Z^0\f$ boson.
*/
Energy _mz;
/**
* define quark mass scheme (fixed/running)
*/
unsigned int _massopt;
/**
* The minimum flavour number in quark loops
*/
int _minloop;
/**
* The maximum flavour number in quark loops
*/
int _maxloop;
};
}
#endif /* Herwig_SMHZPVertex_H */
diff --git a/Models/StandardModel/SMWWHHVertex.h b/Models/StandardModel/SMWWHHVertex.h
--- a/Models/StandardModel/SMWWHHVertex.h
+++ b/Models/StandardModel/SMWWHHVertex.h
@@ -1,122 +1,122 @@
// -*- C++ -*-
#ifndef HERWIG_SMWWHHVertex_H
#define HERWIG_SMWWHHVertex_H
//
// This is the declaration of the SMWWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SMWWHHVertex class.
*
* @see \ref SMWWHHVertexInterfaces "The interfaces"
* defined for SMWWHHVertex.
*/
class SMWWHHVertex: public Helicity::VVSSVertex {
public:
/**
* The default constructor.
*/
SMWWHHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMWWHHVertex & operator=(const SMWWHHVertex &);
+ SMWWHHVertex & operator=(const SMWWHHVertex &) = delete;
private:
/**
* ratio of masses
*/
double ratio_;
/**
* The last value of the electroweak coupling calculated.
*/
Complex couplast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2last_;
};
}
#endif /* HERWIG_SMWWHHVertex_H */
diff --git a/Models/StandardModel/SMWWHVertex.h b/Models/StandardModel/SMWWHVertex.h
--- a/Models/StandardModel/SMWWHVertex.h
+++ b/Models/StandardModel/SMWWHVertex.h
@@ -1,135 +1,136 @@
// -*- C++ -*-
//
// SMWWHVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMWWHVertex_H
#define HERWIG_SMWWHVertex_H
//
// This is the declaration of the SMWWHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The SMWWHVertex is the implementation of the
* coupling of two electroweak gauge bosons to the Higgs in the Standard
* Model. It inherits from VVSVertex and implements the setCoupling member.
*
* @see VVSVertex
* @see VertexBase
*/
class SMWWHVertex: public VVSVertex {
public:
/**
* Default constructor.
*/
SMWWHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
+ * Private and non-existent assignment operator.
*/
- SMWWHVertex & operator=(const SMWWHVertex &);
+ SMWWHVertex & operator=(const SMWWHVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* The mass of the \f$W\f$ boson.
*/
Energy _mw;
/**
* The factor for the \f$Z\f$ vertex.
*/
double _zfact;
//@}
};
}
#endif /* HERWIG_SMWWHVertex_H */
diff --git a/Models/StandardModel/SMWWWVertex.h b/Models/StandardModel/SMWWWVertex.h
--- a/Models/StandardModel/SMWWWVertex.h
+++ b/Models/StandardModel/SMWWWVertex.h
@@ -1,133 +1,133 @@
// -*- C++ -*-
//
// SMWWWVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMWWWVertex_H
#define HERWIG_SMWWWVertex_H
//
// This is the declaration of the SMWWWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::Direction;
/** \ingroup Helicity
*
* This is the implementation fo the vertex for the coupling of three
* standard Model electroweak bosons.
*
* @see VVVVertex
* @see VertexBase
*/
class SMWWWVertex: public Helicity::VVVVertex {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
SMWWWVertex();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SMWWWVertex & operator=(const SMWWWVertex &);
+ SMWWWVertex & operator=(const SMWWWVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The factor for the \f$Z\f$ vertex.
*/
double _zfact;
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
//@}
};
}
#endif /* HERWIG_SMWWWVertex_H */
diff --git a/Models/StandardModel/SMWWWWVertex.h b/Models/StandardModel/SMWWWWVertex.h
--- a/Models/StandardModel/SMWWWWVertex.h
+++ b/Models/StandardModel/SMWWWWVertex.h
@@ -1,165 +1,165 @@
// -*- C++ -*-
//
// SMWWWWVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMWWWWVertex_H
#define HERWIG_SMWWWWVertex_H
//
// This is the declaration of the SMWWWWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The SMWWWWVertex class is the implementation of the
* coupling of four electroweak gauge bosons in the SM.
* It inherits from VVVVVertex nad implements the setCoupling member.
*
* @see VVVVVVertex
* @see VertexBase
*/
class SMWWWWVertex: public VVVVVertex {
public:
/**
* Default constructor.
*/
SMWWWWVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3,
tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- SMWWWWVertex & operator=(const SMWWWWVertex &);
+ SMWWWWVertex & operator=(const SMWWWWVertex &) = delete;
/**
* Intermediate particles
*/
//@{
/**
* The ParticleData pointer for the photon
*/
tcPDPtr _gamma;
/**
* The ParticleData pointer for the \f$Z^0\f$ boson.
*/
tcPDPtr _Z0;
/**
* The ParticleData pointer for the \f$W^+\f$ boson.
*/
tcPDPtr _wplus;
/**
* The ParticleData pointer for the \f$W^-\f$ boson.
*/
tcPDPtr _wminus;
//@}
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* The factors for the different bosons.
*/
vector<double> _vfact;
/**
* \f$\sin^2\theta_W\f$.
*/
double _sw2;
/**
* \f$\cos^2\theta_W\f$.
*/
double _cw2;
//@}
};
}
#endif /* HERWIG_SMWWWWVertex_H */
diff --git a/Models/StandardModel/StandardCKM.h b/Models/StandardModel/StandardCKM.h
--- a/Models/StandardModel/StandardCKM.h
+++ b/Models/StandardModel/StandardCKM.h
@@ -1,127 +1,127 @@
// -*- C++ -*-
//
// StandardCKM.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_StandardCKM_H
#define HERWIG_StandardCKM_H
//
// This is the declaration of the StandardCKM class.
//
#include <ThePEG/Config/Complex.h>
#include <ThePEG/StandardModel/CKMBase.h>
// #include "StandardCKM.fh"
// #include "StandardCKM.xh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Models
*
* StandardCKM inherits from CKMBase and implements the standard
* parameterization of the CKM matrix in terms of three angles and
* a phase. It provides access to the unsquared matrix from helicity
* amplitude calculations.
*
* @see CKMBase
*/
class StandardCKM: public CKMBase {
public:
/**
* Default constructor.
*/
StandardCKM() : theta12(0.2262), theta13(0.0037), theta23(0.0413), delta(1.05)
{}
/**
* Return the matrix of squared CKM matrix elements. The returned
* matrix should be for \a nf families.
*/
virtual vector< vector<double> > getMatrix(unsigned int nf) const;
/**
* Return the matrix of CKM matrix elements. The returned
* matrix should be for \a nf families.
*/
virtual vector< vector<Complex> > getUnsquaredMatrix(unsigned int nf) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The \f$\theta_{12}\f$ angle.
*/
double theta12;
/**
* The \f$\theta_{13}\f$ angle.
*/
double theta13;
/**
* The \f$\theta_{23}\f$ angle.
*/
double theta23;
/**
* The \f$\delta\f$ angle describing the phase.
*/
double delta;
private:
/**
* Private and non-existent assignment operator.
*/
- StandardCKM & operator=(const StandardCKM &);
+ StandardCKM & operator=(const StandardCKM &) = delete;
};
}
#endif /* HERWIG_StandardCKM_H */
diff --git a/Models/StandardModel/StandardModel.h b/Models/StandardModel/StandardModel.h
--- a/Models/StandardModel/StandardModel.h
+++ b/Models/StandardModel/StandardModel.h
@@ -1,478 +1,478 @@
// -*- C++ -*-
//
// StandardModel.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_StandardModel_H
#define HERWIG_StandardModel_H
//
// This is the declaration of the StandardModel class.
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "Herwig/Models/StandardModel/RunningMassBase.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSSSVertex.h"
#include "Herwig/Models/General/ModelGenerator.fh"
#include "StandardModel.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup Models
*
* This is the Herwig StandardModel class which inherits from ThePEG
* Standard Model class and implements additional Standard Model couplings,
* access to vertices for helicity amplitude calculations etc.
*
* @see StandardModelBase
*/
class StandardModel: public StandardModelBase {
/**
* Some typedefs for the pointers.
*/
//@{
/**
* Pointer to the RunningMassBase object
*/
typedef Ptr<Herwig::RunningMassBase>::pointer runPtr;
/**
* Transient pointer to the RunningMassBase object
*/
typedef Ptr<Herwig::RunningMassBase>::transient_pointer trunPtr;
//@}
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor
*/
StandardModel();
/**
* Copy-constructor.
*/
StandardModel(const StandardModel &);
/**
* Destructor
*/
virtual ~StandardModel();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/**
* Should the default vertices be considered for generic diagrams
*/
virtual bool registerDefaultVertices() const { return true; }
public:
/**
* The left and right couplings of the Z^0 including sin and cos theta_W.
*/
//@{
/**
* The left-handed coupling of a neutrino
*/
double lnu() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(vnu()+anu());
}
/**
* The left-handed coupling of a charged lepton.
*/
double le() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(ve()+ae());
}
/**
* The left-handed coupling of an up type quark.
*/
double lu() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(vu()+au());
}
/**
* The left-handed coupling of a down type quark.
*/
double ld() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(vd()+ad());
}
/**
* The right-handed coupling of a neutrino
*/
double rnu() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(vnu()-anu());
}
/**
* The right-handed coupling of a charged lepton.
*/
double re() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(ve()-ae());
}
/**
* The right-handed coupling of an up type quark.
*/
double ru() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(vu()-au());
}
/**
* The right-handed coupling of a down type quark.
*/
double rd() const {
return 0.25/sqrt(sin2ThetaW()*(1.-sin2ThetaW()))*(vd()-ad());
}
//@}
/**
* Pointers to the objects handling the vertices.
*/
//@{
/**
* Pointer to the fermion-fermion-Z vertex
*/
virtual tAbstractFFVVertexPtr vertexFFZ() const {
return FFZVertex_;
}
/**
* Pointer to the fermion-fermion-photon vertex
*/
virtual tAbstractFFVVertexPtr vertexFFP() const {
return FFPVertex_;
}
/**
* Pointer to the fermion-fermion-gluon vertex
*/
virtual tAbstractFFVVertexPtr vertexFFG() const {
return FFGVertex_;
}
/**
* Pointer to the fermion-fermion-W vertex
*/
virtual tAbstractFFVVertexPtr vertexFFW() const {
return FFWVertex_;
}
/**
* Pointer to the fermion-fermion-Higgs vertex
*/
virtual tAbstractFFSVertexPtr vertexFFH() const {
return FFHVertex_;
}
/**
* Pointer to the triple gluon vertex
*/
virtual tAbstractVVVVertexPtr vertexGGG() const {
return GGGVertex_;
}
/**
* Pointer to the triple electroweak gauge boson vertex.
*/
virtual tAbstractVVVVertexPtr vertexWWW() const {
return WWWVertex_;
}
/**
* Pointer to the two electroweak gauge boson Higgs vertex.
*/
virtual tAbstractVVSVertexPtr vertexWWH() const {
return WWHVertex_;
}
/**
* Pointer to the quartic electroweak gauge boson vertex.
*/
virtual tAbstractVVVVVertexPtr vertexWWWW() const {
return WWWWVertex_;
}
/**
* Pointer to the quartic gluon vertex
*/
virtual tAbstractVVVVVertexPtr vertexGGGG() const {
return GGGGVertex_;
}
/**
* Pointer to the quartic gluon vertex
*/
virtual tAbstractVVSVertexPtr vertexHGG() const {
return HGGVertex_;
}
/**
* Pointer to the quartic gluon vertex
*/
virtual tAbstractVVSVertexPtr vertexHPP() const {
return HPPVertex_;
}
/**
* Pointer to the triple Higgs vertex
*/
virtual tAbstractSSSVertexPtr vertexHHH() const {
return HHHVertex_;
}
/**
* Pointer to the WWHH vertex
*/
virtual tAbstractVVSSVertexPtr vertexWWHH() const {
return WWHHVertex_;
}
/**
* Total number of vertices
*/
unsigned int numberOfVertices() const {
return vertexList_.size() + extraVertices_.size();
}
/**
* Access to a vertex from the list
*/
tVertexBasePtr vertex(size_t ix) const {
const size_t S = vertexList_.size();
if ( ix < S )
return vertexList_[ix];
else
return extraVertices_[ix - S];
}
//@}
/**
* Return the running mass for a given scale \f$q^2\f$ and particle type.
* @param scale The scale \f$q^2\f$.
* @param part The ParticleData object for the particle
*/
Energy mass(Energy2 scale,tcPDPtr part) const {
return runningMass_->value(scale,part);
}
/**
* Return a pointer to the object handling the running mass.
*/
trunPtr massPtr() const {
return runningMass_;
}
/**
* Set the couplings in the model
*/
const map<string,pair<unsigned int,int> > & couplings() const {
return couplings_;
}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Add a vertex to the list
*/
void addVertex(VertexBasePtr in) {
if ( in )
vertexList_.push_back(in);
}
/**
* Helper function to reset the mass of a ParticleData object
* in BSM models.
*/
void resetMass(long id, Energy mass,tPDPtr particle=tPDPtr());
protected:
/**
* Set the couplings in the model
*/
void setCouplings(string name,pair<unsigned int,int> vals) {
couplings_[name] = vals;
}
private:
/**
* Private and non-existent assignment operator.
*/
- StandardModel & operator=(const StandardModel &);
+ StandardModel & operator=(const StandardModel &) = delete;
private:
/**
* Pointers to the vertices for Standard Model helicity amplitude
* calculations.
*/
//@{
/**
* Pointer to the fermion-fermion-Z vertex
*/
AbstractFFVVertexPtr FFZVertex_;
/**
* Pointer to the fermion-fermion-photon vertex
*/
AbstractFFVVertexPtr FFPVertex_;
/**
* Pointer to the fermion-fermion-gluon vertex
*/
AbstractFFVVertexPtr FFGVertex_;
/**
* Pointer to the fermion-fermion-W vertex
*/
AbstractFFVVertexPtr FFWVertex_;
/**
* Pointer to the fermion-fermion-Higgs vertex
*/
AbstractFFSVertexPtr FFHVertex_;
/**
* Pointer to the two electroweak gauge boson Higgs vertex.
*/
AbstractVVSVertexPtr WWHVertex_;
/**
* Pointer to the triple gluon vertex
*/
AbstractVVVVertexPtr GGGVertex_;
/**
* Pointer to the triple electroweak gauge boson vertex.
*/
AbstractVVVVertexPtr WWWVertex_;
/**
* Pointer to the quartic gluon vertex
*/
AbstractVVVVVertexPtr GGGGVertex_;
/**
* Pointer to the quartic electroweak gauge boson vertex.
*/
AbstractVVVVVertexPtr WWWWVertex_;
/**
* Pointer to higgs-gluon-gluon vertex
*/
AbstractVVSVertexPtr HGGVertex_;
/**
* Pointer to higgs-gamma-gamma vertex
*/
AbstractVVSVertexPtr HPPVertex_;
/**
* Pointer to triple Higgs vertex
*/
AbstractSSSVertexPtr HHHVertex_;
/**
* Pointer to WWHH vertex
*/
AbstractVVSSVertexPtr WWHHVertex_;
/**
* Full list of vertices as a vector to allow searching
*/
vector<VertexBasePtr> vertexList_;
/**
* Additional vertices to be considered in automatic ME construction
*/
vector<VertexBasePtr> extraVertices_;
//@}
/**
* The running mass.
*/
runPtr runningMass_;
/**
* Pointer to ModelGenerator Class
*/
ModelGeneratorPtr modelGenerator_;
/**
* Couplings in the model
*/
map<string,pair<unsigned int,int> > couplings_;
};
}
#endif /* HERWIG_StandardModel_H */
diff --git a/Models/Susy/MSSM.h b/Models/Susy/MSSM.h
--- a/Models/Susy/MSSM.h
+++ b/Models/Susy/MSSM.h
@@ -1,274 +1,274 @@
// -*- C++ -*-
//
// MSSM.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MSSM_H
#define HERWIG_MSSM_H
//
// This is the declaration of the MSSM class.
//
#include "SusyBase.h"
#include "MSSM.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The MSSM class provides the main model class to replace the Standard Model
* when using the Minimal Supersymmetric Standard Model.
*
* @see \ref MSSMInterfaces "The interfaces"
* defined for MSSM.
*/
class MSSM: public SusyBase {
public:
/**
* Default constructor
*/
MSSM() : createDiagonalMixing_(false) {}
public:
/**
* Value of Higgs mixing angle \f$\alpha\f$.
*/
double higgsMixingAngle() const {return theAlpha;}
/**
* Value of up-type trilinear couplings
*/
const complex<Energy> & topTrilinear() const {return theAtop;}
/**
* Value of down-type trilinear couplings
*/
const complex<Energy> & bottomTrilinear() const {return theAbottom;}
/**
* Value of lepton trilinear couplings
*/
const complex<Energy> & tauTrilinear() const {return theAtau;}
/**
* The stop mixing matrix
*/
const MixingMatrixPtr & stopMix() const {return theStopMix;}
/**
* The sbottom chargino mixing matrix
*/
const MixingMatrixPtr & sbottomMix() const {return theSbotMix;}
/**
* The stau mixing matrix
*/
const MixingMatrixPtr & stauMix() const {return theStauMix;}
/**
* Mixing matrix for the neutral CP-even Higgs bosons
*/
const MixingMatrixPtr & CPevenHiggsMix() const {return theHiggsMix;}
/**
* Mixing matrix for the neutral CP-odd Higgs bosons
*/
const MixingMatrixPtr & CPoddHiggsMix() const {
return HiggsAMix_;
}
/**
* Mixing matrix for the charged Higgs bosons
*/
const MixingMatrixPtr & ChargedHiggsMix() const {
return HiggsPMix_;
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Create the mixing matrices for the model
*/
virtual void createMixingMatrices();
/**
* Extract the parameters from the input blocks
*/
virtual void extractParameters(bool checkModel=true);
/**
* Adjust row of Mixing Matrix if a negative mass occurs in LHA file
* @param id The PDG code of the particle with a negative mass
*/
virtual void adjustMixingMatrix(long id);
/**
* Mixing matrix for the neutral CP-even Higgs bosons
*/
void CPevenHiggsMix(MixingMatrixPtr in) {theHiggsMix = in;}
/**
* Mixing matrix for the neutral CP-odd Higgs bosons
*/
void CPoddHiggsMix(MixingMatrixPtr in) {HiggsAMix_ = in;}
/**
* Mixing matrix for the charged Higgs bosons
*/
void ChargedHiggsMix(MixingMatrixPtr in) {HiggsPMix_ = in;}
/**
* Set the stop mixing matrix
*/
void stopMix(MixingMatrixPtr in) {theStopMix =in;}
/**
* The sbottom chargino mixing matrix
*/
void sbottomMix(MixingMatrixPtr in) {theSbotMix = in;}
/**
* The stau mixing matrix
*/
void stauMix(MixingMatrixPtr in) {theStauMix = in;}
/**
* Value of Higgs mixing angle \f$\alpha\f$.
*/
void higgsMixingAngle(double in) {theAlpha = in;}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MSSM & operator=(const MSSM &);
+ MSSM & operator=(const MSSM &) = delete;
private:
/**
* Third generation squark and slepton mixing matrices
*/
//@{
/**
* The \f$\tilde{t}\f$ mixing matrix
*/
MixingMatrixPtr theStopMix;
/**
* The \f$\tilde{b}\f$ mixing matrix
*/
MixingMatrixPtr theSbotMix;
/**
* The \f$\tilde{\tau}\f$ mixing matrix
*/
MixingMatrixPtr theStauMix;
//@}
/**
* Trilinear couplings stored as vector of complex numbers to make use
* of routine already available to read complex matrices
*/
//@{
/**
* For the up type squarks
*/
complex<Energy> theAtop;
/**
* For the down type squarks
*/
complex<Energy> theAbottom;
/**
* For the charged sleptons
*/
complex<Energy> theAtau;
//@}
/**
* Value of higgs mixing angle.
*/
double theAlpha;
/**
* Higgs boson mixing matrices
*/
//@{
/**
* Scalar Higgs mixing matrix
*/
MixingMatrixPtr theHiggsMix;
/**
* Pseudoscalar Higgs mixing
*/
MixingMatrixPtr HiggsAMix_;
/**
* Charged Higgs mixing
*/
MixingMatrixPtr HiggsPMix_;
//@}
/**
* Create diagonal the stop, bottom and stau mixing matrices if needed
*/
bool createDiagonalMixing_;
};
}
#endif /* HERWIG_MSSM_H */
diff --git a/Models/Susy/MixingMatrix.h b/Models/Susy/MixingMatrix.h
--- a/Models/Susy/MixingMatrix.h
+++ b/Models/Susy/MixingMatrix.h
@@ -1,269 +1,269 @@
// -*- C++ -*-
//
// MixingMatrix.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MixingMatrix_H
#define HERWIG_MixingMatrix_H
//
// This is the declaration of the MixingMatrix class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/Config/Complex.h"
#include "MixingMatrix.fh"
#include "ThePEG/Utilities/Exception.h"
namespace Herwig {
using namespace ThePEG;
/*@name Some convenient typedefs. */
//@{
/**
* A complex valued nested vector.
*/
typedef vector<vector<Complex> > CMatrix;
/**
* Struct for the elements of a mixing matrix
*/
struct MixingElement{
/**
* Constructor
*/
MixingElement(unsigned int irow, unsigned int icol,Complex ivalue)
: row(irow), col(icol), value(ivalue) {}
/**
* row
*/
unsigned int row;
/**
* column
*/
unsigned int col;
/**
* value
*/
Complex value;
};
/**
* A vector of mixing elements.
*/
typedef vector<MixingElement> MixingVector;
/**
* The size of the matrix
*/
typedef pair<unsigned int, unsigned int> MatrixSize;
//@}
/**
* This class is desinged to store the mixing matrices needed for Susy
* studies. The actual matrix is stored as a nested complex vector. It
* also stores a vector of PDG codes correspoding to the mass states of
* mixing states.
*
* @see Interfaced
*/
class MixingMatrix: public Interfaced {
/** Exception class to indicate problem with mixing matrix .*/
class MixingMatrixError : public Exception {};
public:
/** @name Constructors */
//@{
/**
* Constructor that takes a mixing matrix and a vector id's as arguments
* @param mix Mixing matrix
* @param ids The ids of the mixing sparticles
*/
MixingMatrix(const CMatrix & mix,const vector<long> & ids) :
mixingMatrix_(mix),ids_(ids), size_(make_pair(mix.size(),mix[0].size()))
{}
/**
* Contructor that initializes size of matrix
*/
MixingMatrix(unsigned int row, unsigned int col) :
mixingMatrix_(row,vector<Complex>(col,Complex(0.,0.))), size_(row,col)
{}
/**
* Standard Constructor.
*/
MixingMatrix() {}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** @name Get and Set functions. */
//@{
/**
* Set the mixing matrix
* @param mixing The Mixing matrix stored as nested complex vector
*/
void setMatrix(const CMatrix & mixing) {
mixingMatrix_ = mixing;
size_ = make_pair(mixing.size(),mixing[0].size());
}
/**
*Get the mixing matrix
*/
CMatrix getMatrix() const {return mixingMatrix_;}
/**
* Set the vector containing mixing particles codes
* @param mixingCodes vector containing PDG codes for mixing particles
*/
void setIds(const vector<long> & mixingCodes) {
if(mixingCodes.size() != size_.first) {
ostringstream codes;
for(unsigned int ix=0;ix<mixingCodes.size();++ix)
codes << mixingCodes[ix] << " ";
throw MixingMatrixError() << "MixingMatrix::setIds() - The number "
<< "of PDG codes (" << mixingCodes.size()
<< ") does not match the size of the "
<< "matrix (" << size_.first
<< ")"
<< "Ids are " << codes.str()
<< Exception::warning;
return;
}
ids_ = mixingCodes;
}
/**
* Get the vector containing mixing particles codes
*/
const vector<long> & getIds() const {return ids_;}
//@}
/**
* Multiply row corresponding to id by \f$i\f$
* @param id PDG code of particle
*/
void adjustPhase(long id);
/**
* Access element of matrix
*/
const Complex operator()(unsigned int row, unsigned int col) const {
return mixingMatrix_.at(row).at(col);
}
/**
* Set element of matrix
*/
Complex & operator()(unsigned int row, unsigned int col) {
return mixingMatrix_.at(row).at(col);
}
/**
* Add a PDG code to the stored vector
*/
void addCode(long id) {
if(ids_.size() >= size_.first) {
throw MixingMatrixError() << "MixingMatrix::addCode() - Trying to add a"
<< "PDG code but the vector already contains the "
<< "same number as the matrix size "
<< Exception::warning;
return;
}
ids_.push_back(id);
}
/**
* Return the size of the mixing matrix
*/
MatrixSize size() const {return size_;}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MixingMatrix & operator=(const MixingMatrix &);
+ MixingMatrix & operator=(const MixingMatrix &) = delete;
/**
* The mixing matrix
*/
CMatrix mixingMatrix_;
/**
* The PDG codes of the mixing particles
*/
vector<long> ids_;
/**
* Size of matrix
*/
pair<unsigned int,unsigned int> size_;
/**
* Print the matrix to the stream
*/
friend ostream & operator<<(ostream & os,const MixingMatrix & mix);
};
/**
* Output operator for the MixingMatrix
*/
ostream & operator<<(ostream &,const MixingMatrix &);
}
#endif /* HERWIG_MixingMatrix_H */
diff --git a/Models/Susy/NMSSM/NMSSM.h b/Models/Susy/NMSSM/NMSSM.h
--- a/Models/Susy/NMSSM/NMSSM.h
+++ b/Models/Susy/NMSSM/NMSSM.h
@@ -1,196 +1,196 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSM_H
#define HERWIG_NMSSM_H
//
// This is the declaration of the NMSSM class.
//
#include "Herwig/Models/Susy/MSSM.h"
#include "NMSSM.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the NMSSM class.
*
* @see \ref NMSSMInterfaces "The interfaces"
* defined for NMSSM.
*/
class NMSSM: public MSSM {
public:
/**
* The default constructor.
*/
NMSSM() : _lambda(0.), _kappa(0.), _theAlambda(0.*MeV),
_theAkappa(0.*MeV), _lambdaVEV(0.*MeV),
_MQ3(0.*MeV), _MU2(0.*MeV)
{}
public:
/**
* The NMSSM couplings
*/
//@{
/**
* Superpotential \f$\lambda\f$ term
*/
double lambda() const {
return _lambda;
}
/**
* Superpotential \f$\kappa\f$ coupling
*/
double kappa() const {
return _kappa;
}
/**
* The V.E.V of the extra singlet field scaled
* by \f$ lambda\f$,
*/
Energy lambdaVEV() const {
return _lambdaVEV;
}
/**
* Soft trilinear \f$SH_2 H_1\f$ coupling
*/
Energy trilinearLambda() const {
return _theAlambda;
}
/**
* Soft cubic \f$S\f$ coupling
*/
Energy trilinearKappa() const {
return _theAkappa;
}
/**
* left 3rd generation scalar quark mass
*/
Energy MQ3() const {
return _MQ3;
}
/**
* right scalar top mass
*/
Energy MU2() const {
return _MU2;
}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Extract the parameters from the input blocks
*/
virtual void extractParameters(bool checkModel=true);
/**
* Create the mixing matrices for the model
*/
virtual void createMixingMatrices();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSM & operator=(const NMSSM &);
+ NMSSM & operator=(const NMSSM &) = delete;
private:
/**
* The NMSSM couplings
*/
//@{
/**
* Superpotential \f$\lambda\f$ term
*/
double _lambda;
/**
* Superpotential \f$\kappa\f$ coupling
*/
double _kappa;
/**
* Soft trilinear \f$SH_2 H_1\f$ coupling
*/
Energy _theAlambda;
/**
* Soft cubic \f$S\f$ coupling
*/
Energy _theAkappa;
/**
* The V.E.V of the extra singlet field scaled
* by \f$ lambda\f$
*/
Energy _lambdaVEV;
/**
* left 3rd generation scalar quark mass
*/
Energy _MQ3;
/**
* right scalar top mass
*/
Energy _MU2;
//@}
};
}
#endif /* HERWIG_NMSSM_H */
diff --git a/Models/Susy/NMSSM/NMSSMFFHVertex.h b/Models/Susy/NMSSM/NMSSMFFHVertex.h
--- a/Models/Susy/NMSSM/NMSSMFFHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMFFHVertex.h
@@ -1,167 +1,167 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMFFHVertex_H
#define HERWIG_NMSSMFFHVertex_H
//
// This is the declaration of the NMSSMFFHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* The NMSSMFFHVertex class implements the interactions of the NMSSM Higgs bosons
* with the Standard Model fermions.
*
* @see \ref NMSSMFFHVertexInterfaces "The interfaces"
* defined for NMSSMFFHVertex.
*/
class NMSSMFFHVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
NMSSMFFHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMFFHVertex & operator=(const NMSSMFFHVertex &);
+ NMSSMFFHVertex & operator=(const NMSSMFFHVertex &) = delete;
private:
/**
* Mixing matrix for the CP-even Higgs bosons
*/
MixingMatrixPtr _mixS;
/**
* Mixing matrix for the CP-odd Higgs bosons
*/
MixingMatrixPtr _mixP;
/**
* Pointer to the SM object.
*/
tcHwSMPtr _theSM;
/**
* Mass of the \f$W\f$ boson
*/
Energy _mw;
/**
* \f$\sin\beta\f$
*/
double _sinb;
/**
* \f$\cos\beta\f$
*/
double _cosb;
/**
* \f$\tan\beta\f$
*/
double _tanb;
/**
* \f$\sin\theta_W\f$
*/
double _sw;
/**
* The PDG code of the last fermion the coupling was evaluated for.
*/
pair<int,int> _idlast;
/**
* The last \f$q^2\f$ the coupling was evaluated at.
*/
Energy2 _q2last;
/**
* The mass of the last fermion for which the coupling was evaluated.
*/
pair<Energy,Energy> _masslast;
/**
* The last value of the coupling
*/
double _couplast;
};
}
#endif /* HERWIG_NMSSMFFHVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMGGHVertex.cc b/Models/Susy/NMSSM/NMSSMGGHVertex.cc
--- a/Models/Susy/NMSSM/NMSSMGGHVertex.cc
+++ b/Models/Susy/NMSSM/NMSSMGGHVertex.cc
@@ -1,209 +1,211 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the NMSSMGGHVertex class.
//
#include "NMSSMGGHVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Models/Susy/NMSSM/NMSSM.h"
#include "Herwig/Looptools/clooptools.h"
using namespace Herwig;
NMSSMGGHVertex::NMSSMGGHVertex() : _sw(0.), _cw(0.), _mw(0.*MeV),
_mz(0.*MeV),_lambdaVEV(0.*MeV), _lambda(0.), _v1(0.*MeV),
_v2(0.*MeV), _triTp(0.*MeV), _triBt(0.*MeV),
_sb(0.), _cb(0.), _masslast(make_pair(0.*MeV,0.*MeV)),
_q2last(0.*MeV2), _couplast(0.), _coup(0.),
_hlast(0), _recalc(true) {
orderInGem(1);
orderInGs(2);
colourStructure(ColourStructure::DELTA);
}
void NMSSMGGHVertex::doinit() {
addToList(21,21,25);
addToList(21,21,35);
addToList(21,21,36);
addToList(21,21,45);
addToList(21,21,46);
_theSM = dynamic_ptr_cast<tcHwSMPtr>(generator()->standardModel());
if( !_theSM ) {
throw InitException() << "NMSSMGGHVertex::doinit - The SM pointer is null!"
<< Exception::abortnow;
}
// SM parameters
_sw = sqrt(sin2ThetaW());
_cw = sqrt(1. - sin2ThetaW());
_mw = getParticleData(24)->mass();
_mz = getParticleData(23)->mass();
_top = getParticleData(6);
_bt = getParticleData(5);
//NMSSM parameters
tcNMSSMPtr nmssm = dynamic_ptr_cast<tcNMSSMPtr>(_theSM);
_mixS = nmssm->CPevenHiggsMix();
_mixP = nmssm->CPoddHiggsMix();
_mixQt = nmssm->stopMix();
_mixQb = nmssm->sbottomMix();
double beta = atan(nmssm->tanBeta());
_sb = sin(beta);
_cb = cos(beta);
_v1 = sqrt(2.)*_mw*_cb;
_v2 = sqrt(2.)*_mw*_sb;
_lambda = nmssm->lambda();
_lambdaVEV = nmssm->lambdaVEV();
_triTp = nmssm->topTrilinear();
_triBt = nmssm->bottomTrilinear();
// resize vectors here and use setNParticles method
// to the set the actual number in the loop.
// Also only the top mass hass to be calculated at runtime
masses.resize(6, Energy());
masses[0] = getParticleData(6)->mass();
masses[1] = getParticleData(5)->mass();
masses[2] = getParticleData(1000005)->mass();
masses[3] = getParticleData(2000005)->mass();
masses[4] = getParticleData(1000006)->mass();
masses[5] = getParticleData(2000006)->mass();
type.resize(6, PDT::Spin0);
type[0] = PDT::Spin1Half;
type[1] = PDT::Spin1Half;
couplings.resize(6);
VVSLoopVertex::doinit();
if(loopToolsInitialized()) Looptools::ltexi();
}
void NMSSMGGHVertex::persistentOutput(PersistentOStream & os) const {
os << _theSM << _sw << _cw << ounit(_mw, GeV) << ounit(_mz, GeV)
<< ounit(_lambdaVEV,GeV) << _lambda << ounit(_v1,GeV) << ounit(_v2,GeV)
<< ounit(_triTp,GeV) << ounit(_triBt,GeV)
<< _top << _bt << _mixS << _mixP << _mixQt << _mixQb << _sb << _cb;
}
void NMSSMGGHVertex::persistentInput(PersistentIStream & is, int) {
is >> _theSM >> _sw >> _cw >> iunit(_mw, GeV) >> iunit(_mz, GeV)
>> iunit(_lambdaVEV,GeV) >> _lambda >> iunit(_v1,GeV) >> iunit(_v2,GeV)
>> iunit(_triTp,GeV) >> iunit(_triBt,GeV)
>> _top >> _bt >> _mixS >> _mixP >> _mixQt >> _mixQb >> _sb >> _cb;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<NMSSMGGHVertex,VVSLoopVertex>
describeHerwigNMSSMGGHVertex("Herwig::NMSSMGGHVertex", "HwSusy.so HwNMSSM.so");
void NMSSMGGHVertex::Init() {
static ClassDocumentation<NMSSMGGHVertex> documentation
("The effective coupling of a higgs to a pair of gluons in the "
"NMSSM.");
}
void NMSSMGGHVertex::setCoupling(Energy2 q2, tcPDPtr p1, tcPDPtr p2,
tcPDPtr p3) {
long hid(p3->id());
if( q2 != _q2last ) {
Looptools::clearcache();
_couplast = sqr(strongCoupling(q2));
_coup = weakCoupling(q2);
_q2last = q2;
_recalc = true;
}
norm(_couplast*_coup);
// scalar higgs bosons
if( hid != _hlast ) {
_hlast = hid;
_recalc = true;
if( hid % 5 == 0 ) {
// location of the higgs
int iloc = (hid - 25)/10;
// 6 particles in the loop
setNParticles(6);
// top and bottom quark masses
Energy mt = _theSM->mass(q2, _top);
Energy mb = _theSM->mass(q2, _bt);
Complex c(0.);
// couplings for the top quark loop
c = -0.25*mt*(*_mixS)(iloc, 1)/_sb/_mw;
couplings[0] = make_pair(c,c);
masses[0] = mt;
// couplings for the bottom quark loop
c = -0.25*mb*(*_mixS)(iloc, 0)/_cb/_mw;
couplings[1] = make_pair(c,c);
masses[1] = mb;
// sbottoms
double f1 = mb/_mw/_cb;
complex<Energy> f2 = 0.5*_mz/_cw*
( - _cb*(*_mixS)(iloc,0) + _sb*(*_mixS)(iloc,1));
complex<Energy> cpl;
for(unsigned int ix=0;ix<2;++ix) {
cpl = -f2*( (1. - 2.*sqr(_sw)/3.)*(*_mixQb)(ix, 0)*(*_mixQb)(ix, 0)
+ 2.*sqr(_sw)*(*_mixQb)(ix, 1)*(*_mixQb)(ix, 1)/3.)
- f1*mb*(*_mixS)(iloc,0)
*((*_mixQb)(ix, 0)*(*_mixQb)(ix, 0) + (*_mixQb)(ix, 1)*(*_mixQb)(ix, 1))
- 0.5*f1*(-_lambdaVEV*(*_mixS)(iloc,1) - _lambda*_v2*(*_mixS)(iloc,2)/_coup
+ _triBt*(*_mixS)(iloc,0))*((*_mixQb)(ix, 1)*(*_mixQb)(ix, 0)
+ (*_mixQb)(ix, 0)*(*_mixQb)(ix, 1));
- couplings[2+ix] = make_pair(0.5*cpl*UnitRemoval::InvE,0.5*cpl*UnitRemoval::InvE);
+ couplings[2+ix] = make_pair(Complex(0.5*cpl*UnitRemoval::InvE),
+ Complex(0.5*cpl*UnitRemoval::InvE));
}
// stop
f1 = mt/_mw/_sb;
for(unsigned int ix=0;ix<2;++ix) {
cpl =+f2*( (1. - 4.*sqr(_sw)/3.)*(*_mixQt)(ix, 0)*(*_mixQt)(ix, 0)
+ 4.*sqr(_sw)*(*_mixQt)(ix, 1)*(*_mixQt)(ix, 1)/3.)
- f1*mt*(*_mixS)(iloc,1)
*((*_mixQt)(ix, 0)*(*_mixQt)(ix, 0)
+ (*_mixQt)(ix, 1)*(*_mixQt)(ix, 1))
- 0.5*f1*(-_lambdaVEV*(*_mixS)(iloc,0) - _lambda*_v1*(*_mixS)(iloc,2)/_coup
+ _triTp*(*_mixS)(iloc,1))*((*_mixQt)(ix, 1)*(*_mixQt)(ix, 0)
+ (*_mixQt)(ix, 0)*(*_mixQt)(ix, 1));
- couplings[4+ix] = make_pair(0.5*cpl*UnitRemoval::InvE,0.5*cpl*UnitRemoval::InvE);
+ couplings[4+ix] = make_pair(Complex(0.5*cpl*UnitRemoval::InvE),
+ Complex(0.5*cpl*UnitRemoval::InvE));
}
}
// pseudoscalar higgs bosons
else {
// location of the higgs
int iloc = (hid - 36)/10;
// 2 particles in the loop
setNParticles(2);
// top and bottom quark masses
Energy mt = _theSM->mass(q2, _top);
Energy mb = _theSM->mass(q2, _bt);
Complex c(0.);
// top quark couplings
c = Complex(0.,-1.)*0.25*mt*(*_mixP)(iloc, 1)/_sb/_mw;
couplings[0] = make_pair(-c,c);
masses[0] = mt;
// bottom quark couplings
c = Complex(0., -1.)*0.25*mb*(*_mixP)(iloc, 0)/_cb/_mw;
couplings[1] = make_pair(-c,c);
masses[1] = mb;
}
}
if( _recalc ) {
VVSLoopVertex::setCoupling(q2, p1, p2, p3);
_recalc = false;
}
}
diff --git a/Models/Susy/NMSSM/NMSSMGGHVertex.h b/Models/Susy/NMSSM/NMSSMGGHVertex.h
--- a/Models/Susy/NMSSM/NMSSMGGHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMGGHVertex.h
@@ -1,248 +1,248 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMGGHVertex_H
#define HERWIG_NMSSMGGHVertex_H
//
// This is the declaration of the NMSSMGGHVertex class.
//
#include "Herwig/Models/General/VVSLoopVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.fh"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the effective vertex for a higgs coupling
* to a pair of gluons in the NMSSM.
*
* @see \ref NMSSMGGHVertexInterfaces "The interfaces"
* defined for NMSSMGGHVertex.
*/
class NMSSMGGHVertex: public VVSLoopVertex {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
NMSSMGGHVertex();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param p1 ParticleData pointer to first particle
*@param p2 ParticleData pointer to second particle
*@param p3 ParticleData pointer to third particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr p1, tcPDPtr p2,
tcPDPtr p3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMGGHVertex & operator=(const NMSSMGGHVertex &);
+ NMSSMGGHVertex & operator=(const NMSSMGGHVertex &) = delete;
private:
/** @name Stored parameters. */
//@{
/**
* The SM pointer
*/
tcHwSMPtr _theSM;
/**
* \f$ \sin\theta_W\f$
*/
double _sw;
/**
* \f$ \cos\theta_W\f$
*/
double _cw;
/**
* \f$ M_W\f$
*/
Energy _mw;
/**
* \f$ M_Z \f$
*/
Energy _mz;
/**
* The product \f$\lambda \langle S\rangle \f$.
*/
Energy _lambdaVEV;
/**
* The coefficient of the trilinear \f$SH_2 H_1\f$ term in the superpotential
*/
double _lambda;
/**
* The value of the VEV of the higgs that couples to the up-type sector
* \f$ g*sqrt(2)M_W\cos\beta \f$
*/
Energy _v1;
/**
* The value of the VEV of the higgs that couples to the down-type sector
* \f$ g*sqrt(2)M_W\cos\beta \f$
*/
Energy _v2;
/**
* The top quark trilinear coupling
*/
complex<Energy> _triTp;
/**
* The bottom quark trilinear coupling
*/
complex<Energy> _triBt;
/**
* A pointer to the top quark
*/
tcPDPtr _top;
/**
* A pointer to the bottom quark
*/
tcPDPtr _bt;
/**
* CP-even Higgs mixing matrix
*/
MixingMatrixPtr _mixS;
/**
* CP-even Higgs mixing matrix
*/
MixingMatrixPtr _mixP;
/**
* \f$\tilde{t}\f$ mixing matrix
*/
MixingMatrixPtr _mixQt;
/**
* \f$\tilde{b}\f$ mixing matrix
*/
MixingMatrixPtr _mixQb;
/**
* \f$ \sin\beta\f$
*/
double _sb;
/**
* \f$ \cos\beta\f$
*/
double _cb;
/**
* The top and bottom quark masses calculated at the last value
* of \f$q^2\f$
*/
pair<Energy, Energy> _masslast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* The value of the overall normalisation when the coupling was last
* evaluated.
*/
double _couplast;
/**
* The value of the weak coupling was last
* evaluated.
*/
double _coup;
/**
* The PDG code of the Higgs particle when the vertex was last evaluated
*/
long _hlast;
/**
* Whether the tensor coefficient need recalculating or not
*/
bool _recalc;
//@}
};
}
#endif /* HERWIG_NMSSMGGHVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMGOGOHVertex.h b/Models/Susy/NMSSM/NMSSMGOGOHVertex.h
--- a/Models/Susy/NMSSM/NMSSMGOGOHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMGOGOHVertex.h
@@ -1,178 +1,178 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMGOGOHVertex_H
#define HERWIG_NMSSMGOGOHVertex_H
//
// This is the declaration of the NMSSMGOGOHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* Here is the documentation of the NMSSMGOGOHVertex class.
*
* @see \ref NMSSMGOGOHVertexInterfaces "The interfaces"
* defined for NMSSMGOGOHVertex.
*/
class NMSSMGOGOHVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
inline NMSSMGOGOHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMGOGOHVertex & operator=(const NMSSMGOGOHVertex &);
+ NMSSMGOGOHVertex & operator=(const NMSSMGOGOHVertex &) = delete;
private:
/**
* The various mixing matrices and couplings
*/
//@{
/**
* The V chargino mixing matrix
*/
MixingMatrixPtr _mixV;
/**
* The U chargino mixing matrix
*/
MixingMatrixPtr _mixU;
/**
* The neutralino mixing matrix
*/
MixingMatrixPtr _mixN;
/**
* The CP-even neutral Higgs mixing matrix
*/
MixingMatrixPtr _mixS;
/**
* The CP-odd neutral Higgs mixing matrix
*/
MixingMatrixPtr _mixP;
/**
* The tri-linear \f$\lambda\f$ coupling
*/
double _lambda;
/**
* The tri-linear \f$\kappa\f$ coupling
*/
double _kappa;
/**
* \f$\sin\beta\f$
*/
double _sinb;
/**
* \f$\cos\beta\f$
*/
double _cosb;
/**
* \f$\sin\theta_W\f$
*/
double _sw;
/**
* \f$\cos\theta_W\f$
*/
double _cw;
/**
* The last \f$q^2\f$ the coupling was evaluated at.
*/
Energy2 _q2last;
/**
* The last value of the coupling
*/
double _couplast;
//@}
};
}
#endif /* HERWIG_NMSSMGOGOHVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMHHHVertex.h b/Models/Susy/NMSSM/NMSSMHHHVertex.h
--- a/Models/Susy/NMSSM/NMSSMHHHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMHHHVertex.h
@@ -1,276 +1,276 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMHHHVertex_H
#define HERWIG_NMSSMHHHVertex_H
//
// This is the declaration of the NMSSMHHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup Helicity
* The NMSSMHHHVertex defines the triple
* Higgs coupling in the NMSSM.
*
* @see \ref NMSSMHHHVertexInterfaces "The interfaces"
* defined for NMSSMHHHVertex.
*/
class NMSSMHHHVertex: public SSSVertex {
public:
/**
* The default constructor.
*/
NMSSMHHHVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMHHHVertex & operator=(const NMSSMHHHVertex &);
+ NMSSMHHHVertex & operator=(const NMSSMHHHVertex &) = delete;
private:
/**
* The mixing matrix combination \f$U^S_{ai}U^S_{bj}U^S_{ck}\f$
* @param a The row element of the first CP-even mixing matrix
* @param b The column element of the first CP-even mixing matrix
* @param c The row element of the second CP-even mixing matrix
* @param i The column element of the second CP-even mixing matrix
* @param j The row element of the third CP-even mixing matrix
* @param k The column element of the third CP-even mixing matrix
*/
Complex usMix(unsigned int a, unsigned int b, unsigned int c,
unsigned int i, unsigned int j, unsigned int k) const {
return (*_mixS)(a,i)*(*_mixS)(b,j)*(*_mixS)(c,k) +
(*_mixS)(a,i)*(*_mixS)(c,j)*(*_mixS)(b,k) +
(*_mixS)(b,i)*(*_mixS)(a,j)*(*_mixS)(c,k) +
(*_mixS)(b,i)*(*_mixS)(c,j)*(*_mixS)(a,k) +
(*_mixS)(c,i)*(*_mixS)(a,j)*(*_mixS)(b,k) +
(*_mixS)(c,i)*(*_mixS)(b,j)*(*_mixS)(a,k);
}
/**
* The mixing matrix combination \f$U^S_{ai}U^P_{bj}U^P_{ck}\f$
* @param a The row element of the first CP-even mixing matrix
* @param b The column element of the first CP-even mixing matrix
* @param c The row element of the second CP-even mixing matrix
* @param i The column element of the second CP-even mixing matrix
* @param j The row element of the third CP-even mixing matrix
* @param k The column element of the third CP-even mixing matrix
*/
Complex upMix(unsigned int a, unsigned int b, unsigned int c,
unsigned int i, unsigned int j, unsigned int k) const {
return (*_mixS)(a,i)*((*_mixP)(b,j)*(*_mixP)(c,k) +
(*_mixP)(c,j)*(*_mixP)(b,k));
}
private:
/**
* A pointer to the object containing the SM parameters
*/
tcHwSMPtr _theSM;
/**
* The \f$W\f$ mass
*/
Energy _mw;
/**
* The \f$Z\f$ mass
*/
Energy _mz;
/**
* The \f$b\f$ mass
*/
Energy _mb;
/**
* The \f$t\f$ mass
*/
Energy _mt;
/**
* \f$\sin^2\theta_W\f$
*/
double _sw2;
/**
* \f$\cos\theta_W\f$
*/
double _cw;
/**
* The CP-even Higgs mixing matrix
*/
MixingMatrixPtr _mixS;
/**
* The CP-odd Higgs mixing matrix
*/
MixingMatrixPtr _mixP;
/**
* The coefficient of the trilinear \f$SH_2 H_1\f$ term in the superpotential
*/
double _lambda;
/**
* The coefficient of the cubic singlet term in the superpotential
*/
double _kappa;
/**
* The product \f$\lambda \langle S\rangle \f$.
*/
Energy _lambdaVEV;
/**
* The soft trilinear \f$SH_2 H_1\f$ coupling
*/
Energy _theAl;
/**
* The soft cubic \f$S\f$ coupling
*/
Energy _theAk;
/**
* \f$\sin\beta\f$
*/
double _sb;
/**
* \f$\cos\beta\f$
*/
double _cb;
/**
* \f$\sin2\beta\f$
*/
double _s2b;
/**
* \f$\cos2\beta\f$
*/
double _c2b;
/**
* The value of the VEV of the higgs that couples to the down-type sector
* \f$ g*sqrt(2)M_W\cos\beta \f$
*/
Energy _vu;
/**
* The value of the VEV of the higgs that couples to the up-type sector
* i.e. \f$ g*sqrt(2)M_W\sin\beta \f$
*/
Energy _vd;
/**
* The value of the VEV of the singlet higgs
*/
Energy _s;
/**
* The scale at which this vertex was last evaluated
*/
Energy2 _q2last;
/**
* The value of the EW coupling when it was last evaluated
*/
double _glast;
/**
* left 3rd generation scalar quark mass
*/
Energy _MQ3;
/**
* right scalar top mass
*/
Energy _MU2;
/**
* Whether or onto to include the radiative terms
*/
bool _includeRadiative;
};
}
#endif /* HERWIG_NMSSMHHHVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMHSFSFVertex.h b/Models/Susy/NMSSM/NMSSMHSFSFVertex.h
--- a/Models/Susy/NMSSM/NMSSMHSFSFVertex.h
+++ b/Models/Susy/NMSSM/NMSSMHSFSFVertex.h
@@ -1,246 +1,246 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMHSFSFVertex_H
#define HERWIG_NMSSMHSFSFVertex_H
//
// This is the declaration of the NMSSMHSFSFVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
* This class defines the coupling of Higgs bosons to the sfermions
* in the NMSSM.
*
* @see \ref NMSSMHSFSFVertexInterfaces "The interfaces"
* defined for NMSSMHSFSFVertex.
*/
class NMSSMHSFSFVertex: public Helicity::SSSVertex {
public:
/**
* The default constructor.
*/
NMSSMHSFSFVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMHSFSFVertex & operator=(const NMSSMHSFSFVertex &);
+ NMSSMHSFSFVertex & operator=(const NMSSMHSFSFVertex &) = delete;
private:
/**
* Return the coupling of the charged higgs to the sfermions
*/
Complex chargedHiggs(Energy2 q2, long id1, long id2);
private:
/** @name Stored parameters for fast access.*/
//@{
/**
* A pointer to the Standard Model object
*/
tcHwSMPtr _theSM;
/**
* The CP-even higgs mixing matrix
*/
MixingMatrixPtr _mixS;
/**
* The CP-odd higgs mixing matrix
*/
MixingMatrixPtr _mixP;
/**
* The \f$ \tilde{t}\f$ mixing matrix
*/
MixingMatrixPtr _mixTp;
/**
* The \f$ \tilde{b}\f$ mixing matrix
*/
MixingMatrixPtr _mixBt;
/**
* The \f$ \tilde{\tau}\f$ mixing matrix
*/
MixingMatrixPtr _mixTa;
/**
* The top quark trilinear coupling
*/
complex<Energy> _triTp;
/**
* The bottom quark trilinear coupling
*/
complex<Energy> _triBt;
/**
* The tau lepton trilinear coupling
*/
complex<Energy> _triTa;
/**
* The value of \f$\lambda\f$.
*/
double _lambda;
/**
* The value of \f$ \lambda <S> \f$, the
* V.E.V of the extra gauge singlet scaled
* by \f$\lambda\f$
*/
Energy _lambdaVEV;
/**
* The value of the V.E.V \f$ v_1 \f$
*/
Energy _v1;
/**
* The value of the V.E.V \f$ v_2 \f$
*/
Energy _v2;
/**
* The value of \f$ \sin\theta_W \f$
*/
double _sw;
/**
* The value of \f$ \cos\theta_W \f$
*/
double _cw;
/**
* The value of \f$ M_W \f$
*/
Energy _mw;
/**
* The value of \f$ M_Z \f$
*/
Energy _mz;
/**
* The value of \f$ \sin\beta \f$
*/
double _sb;
/**
* The value of \f$ \cos\beta \f$
*/
double _cb;
/**
* The value of \f$ \tan\beta \f$
*/
double _tb;
//@}
/** @name Store previously calculated values for speed. */
//@{
/**
* The scale at which the last calculation took place.
*/
Energy2 _q2last;
/**
* The value of the dimensionless coupling \f$g_W\f$ when
* last calculated.
*/
double _couplast;
/**
* The value of mass of the counterpart SM fermion when
* last calculated.
*/
pair<Energy, Energy> _masslast;
/**
* The PDG codes of the particles in the vertex when it was last evaluated
*/
pair<long, long> _idlast;
//@}
};
}
#endif /* HERWIG_NMSSMHSFSFVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMPPHVertex.cc b/Models/Susy/NMSSM/NMSSMPPHVertex.cc
--- a/Models/Susy/NMSSM/NMSSMPPHVertex.cc
+++ b/Models/Susy/NMSSM/NMSSMPPHVertex.cc
@@ -1,284 +1,287 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the NMSSMPPHVertex class.
//
#include "NMSSMPPHVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/Models/Susy/NMSSM/NMSSM.h"
#include "Herwig/Looptools/clooptools.h"
using namespace Herwig;
NMSSMPPHVertex::NMSSMPPHVertex()
: _sw(0.), _cw(0.), _mw(0.*MeV),
_mz(0.*MeV),_lambdaVEV(0.*MeV), _lambda(0.),
_triTp(0.*MeV), _triBt(0.*MeV),
_sb(0.), _cb(0.),
_kappa(0.),_vu(ZERO),_vd(ZERO),_s(ZERO),_theAl(ZERO),
_masslast(make_pair(0.*MeV,0.*MeV)),_q2last(0.*MeV2),
_couplast(0.), _coup(0.), _hlast(0), _recalc(true) {
orderInGem(3);
orderInGs(0);
colourStructure(ColourStructure::SINGLET);
}
void NMSSMPPHVertex::doinit() {
addToList(22,22,25);
addToList(22,22,35);
addToList(22,22,36);
addToList(22,22,45);
addToList(22,22,46);
_theSM = dynamic_ptr_cast<tcHwSMPtr>(generator()->standardModel());
if( !_theSM ) {
throw InitException() << "NMSSMPPHVertex::doinit - The SM pointer is null!"
<< Exception::abortnow;
}
// SM parameters
_sw = sqrt(sin2ThetaW());
_cw = sqrt(1. - sin2ThetaW());
_mw = getParticleData(24)->mass();
_mz = getParticleData(23)->mass();
_top = getParticleData(6);
_bt = getParticleData(5);
_tau = getParticleData(15);
//NMSSM parameters
tcNMSSMPtr nmssm = dynamic_ptr_cast<tcNMSSMPtr>(_theSM);
_mixS = nmssm->CPevenHiggsMix();
_mixP = nmssm->CPoddHiggsMix();
_mixQt = nmssm->stopMix();
_mixQb = nmssm->sbottomMix();
_mixLt = nmssm->stauMix();
double beta = atan(nmssm->tanBeta());
_sb = sin(beta);
_cb = cos(beta);
_lambda = nmssm->lambda();
_lambdaVEV = nmssm->lambdaVEV();
_triTp = nmssm->topTrilinear();
_triBt = nmssm->bottomTrilinear();
_triTa = nmssm->tauTrilinear();
_vd = sqrt(2)*_mw*_cb;
_vu = sqrt(2)*_mw*_sb;
_s = _lambdaVEV/_lambda;
_theAl = nmssm->trilinearLambda();
_kappa = nmssm->kappa();
_mixU = nmssm->charginoUMix();
_mixV = nmssm->charginoVMix();
// resize vectors here and use setNParticles method
// to the set the actual number in the loop.
// Also only the top mass hass to be calculated at runtime
masses.resize(13, Energy());
masses[ 0] = getParticleData( 6)->mass();
masses[ 1] = getParticleData( 5)->mass();
masses[ 2] = getParticleData(15)->mass();
masses[ 3] = getParticleData(ParticleID::SUSY_chi_1plus)->mass();
masses[ 4] = getParticleData(ParticleID::SUSY_chi_2plus)->mass();
masses[ 5] = _mw;
masses[ 6] = getParticleData(ParticleID::Hplus)->mass();
masses[ 7] = getParticleData(1000005)->mass();
masses[ 8] = getParticleData(2000005)->mass();
masses[ 9] = getParticleData(1000006)->mass();
masses[10] = getParticleData(2000006)->mass();
masses[11] = getParticleData(1000015)->mass();
masses[12] = getParticleData(2000015)->mass();
type.resize(13, PDT::Spin0);
type[0] = PDT::Spin1Half;
type[1] = PDT::Spin1Half;
type[2] = PDT::Spin1Half;
type[3] = PDT::Spin1Half;
type[4] = PDT::Spin1Half;
type[5] = PDT::Spin1;
couplings.resize(13);
VVSLoopVertex::doinit();
if(loopToolsInitialized()) Looptools::ltexi();
}
void NMSSMPPHVertex::persistentOutput(PersistentOStream & os) const {
os << _theSM << _sw << _cw << ounit(_mw, GeV) << ounit(_mz, GeV)
<< ounit(_lambdaVEV,GeV) << _lambda
<< ounit(_triTp,GeV) << ounit(_triBt,GeV) << ounit(_triTa,GeV)
<< _top << _bt << _tau << _mixS << _mixP << _mixU << _mixV
<< _mixQt << _mixQb << _mixLt << _sb << _cb << _kappa
<< ounit(_vu,GeV) << ounit(_vd,GeV) << ounit(_s,GeV) << ounit(_theAl,GeV);
}
void NMSSMPPHVertex::persistentInput(PersistentIStream & is, int) {
is >> _theSM >> _sw >> _cw >> iunit(_mw, GeV) >> iunit(_mz, GeV)
>> iunit(_lambdaVEV,GeV) >> _lambda
>> iunit(_triTp,GeV) >> iunit(_triBt,GeV) >> iunit(_triTa,GeV)
>> _top >> _bt >> _tau >> _mixS >> _mixP >> _mixU >> _mixV
>> _mixQt >> _mixQb >> _mixLt >> _sb >> _cb >> _kappa
>> iunit(_vu,GeV) >> iunit(_vd,GeV) >> iunit(_s,GeV) >> iunit(_theAl,GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<NMSSMPPHVertex,VVSLoopVertex>
describeHerwigNMSSMPPHVertex("Herwig::NMSSMPPHVertex", "HwSusy.so HwNMSSM.so");
void NMSSMPPHVertex::Init() {
static ClassDocumentation<NMSSMPPHVertex> documentation
("The effective coupling of a higgs to a pair of gluons in the "
"NMSSM.");
}
void NMSSMPPHVertex::setCoupling(Energy2 q2, tcPDPtr p1, tcPDPtr p2,
tcPDPtr p3) {
long hid(p3->id());
double rt = sqrt(0.5);
if( q2 != _q2last ) {
Looptools::clearcache();
_couplast = sqr(electroMagneticCoupling(q2));
_coup = weakCoupling(q2);
_q2last = q2;
_recalc = true;
}
norm(_couplast*_coup);
// scalar higgs bosons
if( hid != _hlast ) {
_hlast = hid;
_recalc = true;
// top and bottom quark masses
Energy mt = _theSM->mass(q2, _top);
Energy mb = _theSM->mass(q2, _bt);
Energy mtau = _theSM->mass(q2, _tau);
// scalar
if( hid % 5 == 0 ) {
// location of the higgs
int iloc = (hid - 25)/10;
// 6 particles in the loop
setNParticles(13);
Complex c(0.);
// couplings for the top quark loop
c = -1.5*sqr(_theSM->eu())* mt*(*_mixS)(iloc, 1)/_sb/_mw;
couplings[0] = make_pair(c,c);
masses[0] = mt;
// couplings for the bottom quark loop
c = -1.5*sqr(_theSM->ed())* mb*(*_mixS)(iloc, 0)/_cb/_mw;
couplings[1] = make_pair(c,c);
masses[1] = mb;
// couplings for the tau lepton loop
c = -0.5*sqr(_theSM->ee())*mtau*(*_mixS)(iloc, 0)/_cb/_mw;
couplings[2] = make_pair(c,c);
masses[2] = mtau;
// charginos
for(unsigned int ic=0;ic<2;++ic) {
c = -_lambda/_coup*rt*(*_mixS)(iloc,2)*(*_mixU)(ic,1)*(*_mixV)(ic,1)
-rt*((*_mixS)(iloc,0)*(*_mixU)(ic,1)*(*_mixV)(ic,0) +
(*_mixS)(iloc,1)*(*_mixU)(ic,0)*(*_mixV)(ic,1));
couplings[3+ic] = make_pair(c,c);
}
// W boson
- c = UnitRemoval::InvE*_mw*
- (_cb*(*_mixS)(iloc,0)+_sb*(*_mixS)(iloc,1));
+ c = Complex(UnitRemoval::InvE*_mw*
+ (_cb*(*_mixS)(iloc,0)+_sb*(*_mixS)(iloc,1)));
couplings[5] = make_pair(c,c);
// charged Higgs
complex<Energy> cpl;
cpl = sqr(_lambda)*rt*2.*(_s*((*_mixS)(iloc,2)*sqr(_cb) + (*_mixS)(iloc,2)*sqr(_sb))
- (_vu*(*_mixS)(iloc,0)/_coup +
_vd*(*_mixS)(iloc,1)/_coup)*_sb*_cb)
+_lambda*_sb*_cb*2*(*_mixS)(iloc,2)*(_kappa*_s/rt + rt*_theAl)
+ sqr(_coup)*0.5*rt*sqr(_sw)/sqr(_cw)*((_vu*(*_mixS)(iloc,1)/_coup -
_vd*(*_mixS)(iloc,0)/_coup)*sqr(_cb) +
(_vd*(*_mixS)(iloc,0)/_coup -
_vu*(*_mixS)(iloc,1)/_coup)*sqr(_sb))
+ sqr(_coup)*0.5*rt*(_vu*((*_mixS)(iloc,1)*sqr(_cb) +
(*_mixS)(iloc,1)*sqr(_sb) +
2.*(*_mixS)(iloc,0)*_cb*_sb)/_coup
+ _vd*((*_mixS)(iloc,0)*sqr(_cb) +
(*_mixS)(iloc,0)*sqr(_sb)
+ 2.*(*_mixS)(iloc,1)*_sb*_cb)/_coup);
cpl /= -_coup;
- couplings[6] = make_pair(cpl*UnitRemoval::InvE,cpl*UnitRemoval::InvE);
+ couplings[6] = make_pair(Complex(cpl*UnitRemoval::InvE),
+ Complex(cpl*UnitRemoval::InvE));
// sbottoms
double f1 = mb/_mw/_cb;
complex<Energy> f2 = 0.5*_mz/_cw*
( - _cb*(*_mixS)(iloc,0) + _sb*(*_mixS)(iloc,1));
for(unsigned int ix=0;ix<2;++ix) {
cpl = -f2*( (1. - 2.*sqr(_sw)/3.)*(*_mixQb)(ix, 0)*(*_mixQb)(ix, 0)
+ 2.*sqr(_sw)*(*_mixQb)(ix, 1)*(*_mixQb)(ix, 1)/3.)
- f1*mb*(*_mixS)(iloc,0)
*((*_mixQb)(ix, 0)*(*_mixQb)(ix, 0) + (*_mixQb)(ix, 1)*(*_mixQb)(ix, 1))
- 0.5*f1*(-_lambdaVEV*(*_mixS)(iloc,1) - _lambda*_vu*(*_mixS)(iloc,2)/_coup
+ _triBt*(*_mixS)(iloc,0))*((*_mixQb)(ix, 1)*(*_mixQb)(ix, 0)
+ (*_mixQb)(ix, 0)*(*_mixQb)(ix, 1));
cpl *= 3.*sqr(_theSM->ed());
- couplings[7+ix] = make_pair(cpl*UnitRemoval::InvE,cpl*UnitRemoval::InvE);
+ couplings[7+ix] = make_pair(Complex(cpl*UnitRemoval::InvE),Complex(cpl*UnitRemoval::InvE));
}
// stop
f1 = mt/_mw/_sb;
for(unsigned int ix=0;ix<2;++ix) {
cpl =+f2*( (1. - 4.*sqr(_sw)/3.)*(*_mixQt)(ix, 0)*(*_mixQt)(ix, 0)
+ 4.*sqr(_sw)*(*_mixQt)(ix, 1)*(*_mixQt)(ix, 1)/3.)
- f1*mt*(*_mixS)(iloc,1)
*((*_mixQt)(ix, 0)*(*_mixQt)(ix, 0)
+ (*_mixQt)(ix, 1)*(*_mixQt)(ix, 1))
- 0.5*f1*(-_lambdaVEV*(*_mixS)(iloc,0) - _lambda*_vd*(*_mixS)(iloc,2)/_coup
+ _triTp*(*_mixS)(iloc,1))*((*_mixQt)(ix, 1)*(*_mixQt)(ix, 0)
+ (*_mixQt)(ix, 0)*(*_mixQt)(ix, 1));
cpl *= 3.*sqr(_theSM->eu());
- couplings[9+ix] = make_pair(cpl*UnitRemoval::InvE,cpl*UnitRemoval::InvE);
+ couplings[9+ix] = make_pair(Complex(cpl*UnitRemoval::InvE),
+ Complex(cpl*UnitRemoval::InvE));
} // sbottoms
f1 = mtau/_mw/_cb;
for(unsigned int ix=0;ix<2;++ix) {
cpl = -f2*( (1. - 2.*sqr(_sw))*(*_mixLt)(ix, 0)*(*_mixLt)(ix, 0)
+ 2.*sqr(_sw)*(*_mixLt)(ix, 1)*(*_mixLt)(ix, 1))
- f1*mtau*(*_mixS)(iloc,0)
*((*_mixLt)(ix, 0)*(*_mixLt)(ix, 0) + (*_mixLt)(ix, 1)*(*_mixLt)(ix, 1))
- 0.5*f1*(-_lambdaVEV*(*_mixS)(iloc,1) - _lambda*_vu*(*_mixS)(iloc,2)/_coup
+ _triTa*(*_mixS)(iloc,0))*((*_mixLt)(ix, 1)*(*_mixLt)(ix, 0)
+ (*_mixLt)(ix, 0)*(*_mixLt)(ix, 1));
cpl *= sqr(_theSM->ee());
- couplings[11+ix] = make_pair(cpl*UnitRemoval::InvE,cpl*UnitRemoval::InvE);
+ couplings[11+ix] = make_pair(Complex(cpl*UnitRemoval::InvE),
+ Complex(cpl*UnitRemoval::InvE));
}
}
// pseudoscalar higgs bosons
else {
// location of the higgs
int iloc = (hid - 36)/10;
// 2 particles in the loop
setNParticles(5);
Complex c(0.);
// top quark couplings
c = Complex(0., 1.)*1.5*sqr(_theSM->eu())* mt*(*_mixP)(iloc, 1)/_sb/_mw;
couplings[0] = make_pair(c,-c);
masses[0] = mt;
// bottom quark couplings
c = Complex(0., 1.)*1.5*sqr(_theSM->ed())* mb*(*_mixP)(iloc, 0)/_cb/_mw;
couplings[1] = make_pair(c,-c);
masses[1] = mb;
// tau lepton couplings
c = Complex(0., 1.)*0.5*sqr(_theSM->ee())*mtau*(*_mixP)(iloc, 0)/_cb/_mw;
couplings[2] = make_pair(c,-c);
masses[2] = mtau;
// charginos
for(unsigned int ic=0;ic<2;++ic) {
c = Complex(0,-1.0)*
(_lambda/_coup*rt*(*_mixP)(iloc,2)*(*_mixU)(ic,1)*(*_mixV)(ic,1)
-rt*((*_mixP)(iloc,0)*(*_mixU)(ic,1)*(*_mixV)(ic,0)
+ (*_mixP)(iloc,1)*(*_mixU)(ic,0)*(*_mixV)(ic,1)));
couplings[3+ic] = make_pair(-c,c);
}
}
}
if( _recalc ) {
VVSLoopVertex::setCoupling(q2, p1, p2, p3);
_recalc = false;
}
}
diff --git a/Models/Susy/NMSSM/NMSSMPPHVertex.h b/Models/Susy/NMSSM/NMSSMPPHVertex.h
--- a/Models/Susy/NMSSM/NMSSMPPHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMPPHVertex.h
@@ -1,300 +1,300 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMPPHVertex_H
#define HERWIG_NMSSMPPHVertex_H
//
// This is the declaration of the NMSSMPPHVertex class.
//
#include "Herwig/Models/General/VVSLoopVertex.h"
#include "Herwig/Models/StandardModel/StandardModel.fh"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the effective vertex for a higgs coupling
* to a pair of photons in the NMSSM.
*
* @see \ref NMSSMPPHVertexInterfaces "The interfaces"
* defined for NMSSMPPHVertex.
*/
class NMSSMPPHVertex: public VVSLoopVertex {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
NMSSMPPHVertex();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param p1 ParticleData pointer to first particle
*@param p2 ParticleData pointer to second particle
*@param p3 ParticleData pointer to third particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr p1, tcPDPtr p2,
tcPDPtr p3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMPPHVertex & operator=(const NMSSMPPHVertex &);
+ NMSSMPPHVertex & operator=(const NMSSMPPHVertex &) = delete;
private:
/** @name Stored parameters. */
//@{
/**
* The SM pointer
*/
tcHwSMPtr _theSM;
/**
* \f$ \sin\theta_W\f$
*/
double _sw;
/**
* \f$ \cos\theta_W\f$
*/
double _cw;
/**
* \f$ M_W\f$
*/
Energy _mw;
/**
* \f$ M_Z \f$
*/
Energy _mz;
/**
* The product \f$\lambda \langle S\rangle \f$.
*/
Energy _lambdaVEV;
/**
* The coefficient of the trilinear \f$SH_2 H_1\f$ term in the superpotential
*/
double _lambda;
/**
* The value of the VEV of the higgs that couples to the up-type sector
* \f$ g*sqrt(2)M_W\cos\beta \f$
*/
Energy _v1;
/**
* The value of the VEV of the higgs that couples to the down-type sector
* \f$ g*sqrt(2)M_W\cos\beta \f$
*/
Energy _v2;
/**
* The top quark trilinear coupling
*/
complex<Energy> _triTp;
/**
* The bottom quark trilinear coupling
*/
complex<Energy> _triBt;
/**
* The tau quark trilinear coupling
*/
complex<Energy> _triTa;
/**
* A pointer to the top quark
*/
tcPDPtr _top;
/**
* A pointer to the bottom quark
*/
tcPDPtr _bt;
/**
* A pointer to the tau lepton
*/
tcPDPtr _tau;
/**
* CP-even Higgs mixing matrix
*/
MixingMatrixPtr _mixS;
/**
* CP-even Higgs mixing matrix
*/
MixingMatrixPtr _mixP;
/**
* \f$\tilde{t}\f$ mixing matrix
*/
MixingMatrixPtr _mixQt;
/**
* \f$\tilde{b}\f$ mixing matrix
*/
MixingMatrixPtr _mixQb;
/**
* \f$\tilde{\tau}\f$ mixing matrix
*/
MixingMatrixPtr _mixLt;
/**
* \f$ \sin\beta\f$
*/
double _sb;
/**
* \f$ \cos\beta\f$
*/
double _cb;
/**
* The coefficient of the cubic singlet term in the superpotential
*/
double _kappa;
/**
* The value of the VEV of the higgs that couples to the down-type sector
* \f$ g*sqrt(2)M_W\cos\beta \f$
*/
Energy _vu;
/**
* The value of the VEV of the higgs that couples to the up-type sector
* i.e. \f$ g*sqrt(2)M_W\sin\beta \f$
*/
Energy _vd;
/**
* The value of the VEV of the singlet higgs
*/
Energy _s;
/**
* The soft trilinear \f$SH_2 H_1\f$ coupling
*/
Energy _theAl;
/**
* The U mixing matrix
*/
tMixingMatrixPtr _mixU;
/**
* The V mixing matrix
*/
tMixingMatrixPtr _mixV;
/**
* The top and bottom quark masses calculated at the last value
* of \f$q^2\f$
*/
pair<Energy, Energy> _masslast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* The value of the overall normalisation when the coupling was last
* evaluated.
*/
double _couplast;
/**
* The value of the weak coupling was last
* evaluated.
*/
double _coup;
/**
* The PDG code of the Higgs particle when the vertex was last evaluated
*/
long _hlast;
/**
* Whether the tensor coefficient need recalculating or not
*/
bool _recalc;
//@}
};
}
#endif /* HERWIG_NMSSMPPHVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMWHHVertex.h b/Models/Susy/NMSSM/NMSSMWHHVertex.h
--- a/Models/Susy/NMSSM/NMSSMWHHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMWHHVertex.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMWHHVertex_H
#define HERWIG_NMSSMWHHVertex_H
//
// This is the declaration of the NMSSMWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* The NMSSMWHHVertex class implements the coupling of an electroweak"
* gauge boson with two Higgs bosons in the NMSSM.
*
* @see \ref NMSSMWHHVertexInterfaces "The interfaces"
* defined for NMSSMWHHVertex.
*/
class NMSSMWHHVertex: public VSSVertex {
public:
/**
* The default constructor.
*/
NMSSMWHHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMWHHVertex & operator=(const NMSSMWHHVertex &);
+ NMSSMWHHVertex & operator=(const NMSSMWHHVertex &) = delete;
private:
/**
* \f$\sin\beta\f$
*/
double _sinb;
/**
* \f$\cos\beta\f$
*/
double _cosb;
/**
* \f$\sin\theta_W\f$
*/
double _sw;
/**
* \f$\cos\theta_W\f$
*/
double _cw;
/**
* The last \f$q^2\f$ the coupling was evaluated at.
*/
Energy2 _q2last;
/**
* The last value of the coupling
*/
double _couplast;
/**
* Mixing matrix for the CP-even Higgs bosons
*/
MixingMatrixPtr _mixS;
/**
* Mixing matrix for the CP-odd Higgs bosons
*/
MixingMatrixPtr _mixP;
};
}
#endif /* HERWIG_NMSSMWHHVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMWWHHVertex.h b/Models/Susy/NMSSM/NMSSMWWHHVertex.h
--- a/Models/Susy/NMSSM/NMSSMWWHHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMWWHHVertex.h
@@ -1,154 +1,154 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMWWHHVertex_H
#define HERWIG_NMSSMWWHHVertex_H
//
// This is the declaration of the NMSSMWWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the NMSSMWWHHVertex class.
*
* @see \ref NMSSMWWHHVertexInterfaces "The interfaces"
* defined for NMSSMWWHHVertex.
*/
class NMSSMWWHHVertex: public Helicity::VVSSVertex {
public:
/**
* The default constructor.
*/
NMSSMWWHHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3, tcPDPtr part4);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMWWHHVertex & operator=(const NMSSMWWHHVertex &);
+ NMSSMWWHHVertex & operator=(const NMSSMWWHHVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex couplast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2last_;
//@}
/**
* \f$\sin\theta_W\f$
*/
double sw_;
/**
* \f$\cos\theta_W\f$
*/
double cw_;
/**
* \f$\sin\beta\f$
*/
double sb_;
/**
* \f$\cos\beta\f$
*/
double cb_;
/**
* The CP-even Higgs mixing matrix
*/
MixingMatrixPtr mixS_;
/**
* The CP-odd Higgs mixing matrix
*/
MixingMatrixPtr mixP_;
};
}
#endif /* HERWIG_NMSSMWWHHVertex_H */
diff --git a/Models/Susy/NMSSM/NMSSMWWHVertex.h b/Models/Susy/NMSSM/NMSSMWWHVertex.h
--- a/Models/Susy/NMSSM/NMSSMWWHVertex.h
+++ b/Models/Susy/NMSSM/NMSSMWWHVertex.h
@@ -1,152 +1,152 @@
// -*- C++ -*-
#ifndef HERWIG_NMSSMWWHVertex_H
#define HERWIG_NMSSMWWHVertex_H
//
// This is the declaration of the NMSSMWWHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/** \ingroup Helicity
*
* The NMSSMWWHVertex class is the implementation of the coupling of two electroweak
* gauge bosons to the Higgs bosons of the NMSSM. It inherits from VVSVertex and
* implements the setCoupling member.
*
* @see \ref NMSSMWWHVertexInterfaces "The interfaces"
* @see VVSVertex
* @see SMWWHVertex
* defined for NMSSMWWHVertex.
*/
class NMSSMWWHVertex: public VVSVertex {
public:
/**
* The default constructor.
*/
NMSSMWWHVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- NMSSMWWHVertex & operator=(const NMSSMWWHVertex &);
+ NMSSMWWHVertex & operator=(const NMSSMWWHVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex _couplast;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* The mass of the \f$W\f$ boson.
*/
Energy _mw;
/**
* The factor for the \f$Z\f$ vertex.
*/
double _zfact;
/**
* \f$\sin\beta\f$
*/
double _sinb;
/**
* \f$\cos\beta\f$
*/
double _cosb;
/**
* Mixing matrix for the CP-even Higgs bosons
*/
MixingMatrixPtr _mixS;
//@}
};
}
#endif /* HERWIG_NMSSMWWHVertex_H */
diff --git a/Models/Susy/RPV/RPV.h b/Models/Susy/RPV/RPV.h
--- a/Models/Susy/RPV/RPV.h
+++ b/Models/Susy/RPV/RPV.h
@@ -1,220 +1,220 @@
// -*- C++ -*-
#ifndef HERWIG_RPV_H
#define HERWIG_RPV_H
//
// This is the declaration of the RPV class.
//
#include "Herwig/Models/Susy/MSSM.h"
#include "RPV.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPV class.
*
* @see \ref RPVInterfaces "The interfaces"
* defined for RPV.
*/
class RPV: public MSSM {
public:
/**
* The default constructor.
*/
RPV() : lambdaLLE_(3,vector<vector<double> >(3,vector<double>(3,0.))),
lambdaLQD_(3,vector<vector<double> >(3,vector<double>(3,0.))),
lambdaUDD_(3,vector<vector<double> >(3,vector<double>(3,0.))),
triLinearOnly_(false)
{}
/**
* LLE couplings
*/
const vector<vector<vector<double> > > & lambdaLLE() {return lambdaLLE_;}
/**
* LQD couplings
*/
const vector<vector<vector<double> > > & lambdaLQD() {return lambdaLQD_;}
/**
* UDD couplings
*/
const vector<vector<vector<double> > > & lambdaUDD() {return lambdaUDD_;}
/**
* Sneutrino vevs
*/
const vector<Energy> & sneutrinoVEVs() {return vnu_;}
/**
* Bilinear coupings
*/
const vector<Energy> & epsilon() {return epsilon_;}
/**
* Blinear soft terms
*/
const vector<Energy> & epsilonB() {return epsB_;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Extract the parameters from the input blocks
*/
virtual void extractParameters(bool checkModel=true);
/**
* Create the mixing matrices for the model
*/
virtual void createMixingMatrices();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPV & operator=(const RPV &);
+ RPV & operator=(const RPV &) = delete;
private:
/**
* Trillinear couplings
*/
//@
/**
* LLE couplings
*/
vector<vector<vector<double> > > lambdaLLE_;
/**
* LQD couplings
*/
vector<vector<vector<double> > > lambdaLQD_;
/**
* UDD couplings
*/
vector<vector<vector<double> > > lambdaUDD_;
//@
/**
* Sneutrino vevs
*/
vector<Energy> vnu_;
/**
* The bilinear parameters
*/
vector<Energy> epsilon_;
/**
* The bilinear soft terms
*/
vector<Energy> epsB_;
/**
* Squark mixing matrices
*/
//@{
/**
* For up-type squarks
*/
MixingMatrixPtr upSquarkMix_;
/**
* For down-type squarks
*/
MixingMatrixPtr downSquarkMix_;
//@}
/**
* New vertices
*/
//@{
/**
* LLE vertex
*/
AbstractFFSVertexPtr LLEVertex_;
/**
* LQD vertex
*/
AbstractFFSVertexPtr LQDVertex_;
/**
* UDD vertex
*/
AbstractFFSVertexPtr UDDVertex_;
//@}
/**
* Switch to only do trilinears
*/
bool triLinearOnly_;
};
}
#endif /* HERWIG_RPV_H */
diff --git a/Models/Susy/RPV/RPVFFSVertex.cc b/Models/Susy/RPV/RPVFFSVertex.cc
--- a/Models/Susy/RPV/RPVFFSVertex.cc
+++ b/Models/Susy/RPV/RPVFFSVertex.cc
@@ -1,826 +1,826 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the RPVFFSVertex class.
//
#include "RPVFFSVertex.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
namespace {
unsigned int neutralinoIndex(long id) {
if(id> 1000000)
return id<1000025 ? id-1000022 : (id-1000005)/10;
else if(abs(id)<=16)
return (abs(id)-4)/2;
else
return id-13;
}
unsigned int charginoIndex(long id) {
return abs(id)>1000000 ? (abs(id)-1000024)/13 : (abs(id)-7)/2;
}
}
RPVFFSVertex::RPVFFSVertex() : interactions_(0), mw_(ZERO),
_q2last(ZERO), _couplast(0.),
_leftlast(0.),_rightlast(0.),
_id1last(0), _id2last(0), _id3last(0),
yukawa_(true),
_sw(0.), _cw(0.),_sb(0.), _cb(0.),
vd_(ZERO), vu_(ZERO),
_massLast(make_pair(ZERO,ZERO)) {
orderInGem(1);
orderInGs(0);
colourStructure(ColourStructure::DELTA);
}
IBPtr RPVFFSVertex::clone() const {
return new_ptr(*this);
}
IBPtr RPVFFSVertex::fullclone() const {
return new_ptr(*this);
}
void RPVFFSVertex::doinit() {
// cast the model to the RPV one
model_ = dynamic_ptr_cast<tRPVPtr>(generator()->standardModel());
if( !model_ ) throw InitException() << "RPVFFSVertex::doinit() - "
<< "The pointer to the MSSM object is null!"
<< Exception::abortnow;
// get the various mixing matrices
_stop = model_->stopMix();
_sbot = model_->sbottomMix();
_stau = model_->stauMix();
_nmix = model_->neutralinoMix();
_umix = model_->charginoUMix();
_vmix = model_->charginoVMix();
_mixH = model_->CPevenHiggsMix();
_mixP = model_->CPoddHiggsMix();
_mixC = model_->ChargedHiggsMix();
if(!_stop || !_sbot ) throw InitException() << "RPVFFSVertex::doinit() - "
<< "A squark mixing matrix pointer is null."
<< " stop: " << _stop << " sbottom: "
<< _sbot << Exception::abortnow;
if(!_nmix) throw InitException() << "RPVFFSVertex::doinit() - "
<< "A gaugino mixing matrix pointer is null."
<< " N: " << _nmix << " U: " << _umix
<< " V: " << _vmix << Exception::abortnow;
if(! ( _stau || (!_stau&& _mixC->size().first>1)))
throw InitException() << "RPVFFSVertex::doinit() - "
<< "Must have either the stau mixing matrix or it"
<< " must be part of the charged Higgs boson mixing."
<< Exception::abortnow;
// various interactions
// scalar Higgs bosons
vector<long> h0(2);
h0[0] = 25; h0[1] = 35;
if(_mixH&&_mixH->size().first>2) {
h0.push_back(1000012); h0.push_back(1000014); h0.push_back(1000016);
}
// pseudoscalar Higgs bosons
vector<long> a0(1,36);
if(_mixP&&_mixP->size().first>1) {
a0.push_back(1000017); a0.push_back(1000018); a0.push_back(1000019);
}
// charged Higgs bosons
vector<long> hp(1,37);
if(_mixC->size().first>1) {
hp.push_back(-1000011); hp.push_back(-1000013); hp.push_back(-1000015);
hp.push_back(-2000011); hp.push_back(-2000013); hp.push_back(-2000015);
}
// neutralinos
vector<long> neu(4);
neu[0] = 1000022; neu[1] = 1000023;
neu[2] = 1000025; neu[3] = 1000035;
if(_nmix->size().first>4) {
if(model_->majoranaNeutrinos()) {
neu.push_back(17);
neu.push_back(18);
neu.push_back(19);
}
else {
neu.push_back(12);
neu.push_back(14);
neu.push_back(16);
}
}
// charginos
vector<long> chg(2);
chg[0] = 1000024; chg[1] = 1000037;
if(_umix->size().first>2) {
chg.push_back(-11); chg.push_back(-13); chg.push_back(-15);
}
// FFH
if(interactions_==0||interactions_==1) {
// quarks neutral scalar
for ( unsigned int h = 0; h < h0.size(); ++h ) {
for(long ix=1;ix<7;++ix) addToList(-ix,ix,h0[h]);
}
// quarks neutral pseudoscalar
for ( unsigned int h = 0; h < a0.size(); ++h ) {
for(long ix=1;ix<7;++ix) addToList(-ix,ix,a0[h]);
}
// quarks charged higgs
for(unsigned int h=0;h<hp.size();++h) {
for(long ix=1;ix<6;ix+=2) {
//outgoing H+
addToList(-ix-1, ix, hp[h]);
//outgoing H-
addToList(-ix ,ix+1,-hp[h]);
}
}
// charged leptons neutral scalar
for ( unsigned int h = 0; h < h0.size(); ++h ) {
for(long ix=11;ix<16;ix+=2) addToList(-ix,ix,h0[h]);
}
// charged leptons neutral pseudoscalar
for ( unsigned int h = 0; h < a0.size(); ++h ) {
for(long ix=11;ix<16;ix+=2) addToList(-ix,ix,a0[h]);
}
// charged higgs to leptons, no mixing
if(_nmix->size().first<=4) {
for(unsigned int h=0;h<hp.size();++h) {
for(long ix=11;ix<16;ix+=2) {
//outgoing H+
addToList(-ix-1, ix, hp[h]);
//outgoing H-
addToList(-ix ,ix+1,-hp[h]);
}
}
}
}
// GOGOH
if(interactions_==0||interactions_==2) {
// neutral scalar Higgs neutralino
for(unsigned int i=0;i<h0.size();++i) {
for(unsigned int j = 0; j < neu.size(); ++j) {
for(unsigned int k = j; k < neu.size(); ++k) {
addToList(neu[j], neu[k], h0[i]);
}
}
}
// neutral pseudoscalar Higgs neutralino
for(unsigned int i=0;i<a0.size();++i) {
for(unsigned int j = 0; j < neu.size(); ++j) {
for(unsigned int k = j; k < neu.size(); ++k) {
addToList(neu[j], neu[k], a0[i]);
}
}
}
// neutral scalar Higgs chargino
for(unsigned int i=0;i<h0.size();++i) {
for(unsigned int j = 0; j < chg.size(); ++j) {
for(unsigned int k = 0; k < chg.size(); ++k) {
if(j==k&&abs(chg[j])<16) continue;
addToList(-chg[j], chg[k], h0[i]);
}
}
}
// neutral scalar Higgs chargino
for(unsigned int i=0;i<a0.size();++i) {
for(unsigned int j = 0; j < chg.size(); ++j) {
for(unsigned int k = 0; k < chg.size(); ++k) {
if(j==k&&abs(chg[j])<16) continue;
addToList(-chg[j], chg[k], a0[i]);
}
}
}
// charged higgs
for(unsigned int i=0;i<hp.size();++i) {
for(unsigned int j = 0; j < neu.size(); ++j) {
for(unsigned int k = 0; k < chg.size(); ++k) {
addToList(-chg[k], neu[j], hp[i]);
addToList( chg[k], neu[j],-hp[i]);
}
}
}
}
// neutralino sfermion
if(interactions_==0||interactions_==3) {
// quarks
for(unsigned int nl = 0; nl < neu.size(); ++nl) {
for(long ix=1;ix<7;++ix){
addToList( neu[nl], ix, -(1000000+ix) );
addToList( neu[nl], ix, -(2000000+ix) );
addToList( neu[nl], -ix, (1000000+ix) );
addToList( neu[nl], -ix, (2000000+ix) );
}
}
// neutrino
if(_nmix->size().first<=4) {
for(unsigned int nl = 0; nl < neu.size(); ++nl) {
for(long ix=12;ix<17;ix+=2) {
addToList( neu[nl], ix, -(1000000+ix) );
addToList( neu[nl], -ix, (1000000+ix) );
}
}
}
// charged leptons no mixing
if(!_mixC || _mixC->size().first==1) {
for(unsigned int nl = 0; nl < neu.size(); ++nl) {
for(long ix=11;ix<17;ix+=2) {
addToList( neu[nl], ix, -(1000000+ix) );
addToList( neu[nl], -ix, (1000000+ix) );
addToList( neu[nl], ix, -(2000000+ix) );
addToList( neu[nl], -ix, (2000000+ix) );
}
}
}
}
// chargino sfermion
if(interactions_==0||interactions_==4) {
//quarks
for(unsigned int ic = 0; ic < chg.size(); ++ic) {
for(long ix = 1; ix < 7; ++ix) {
if( ix % 2 == 0 ) {
addToList(-chg[ic], ix,-( 999999+ix));
addToList(-chg[ic], ix,-(1999999+ix));
addToList( chg[ic],-ix, 999999+ix );
addToList( chg[ic],-ix, 1999999+ix );
}
else {
addToList(-chg[ic],-ix, 1000001+ix );
addToList(-chg[ic],-ix, 2000001+ix );
addToList( chg[ic], ix,-(1000001+ix));
addToList( chg[ic], ix,-(2000001+ix));
}
}
}
// sneutrinos
if(!_mixH || _mixH->size().first<=2) {
for(unsigned int ic = 0; ic < chg.size(); ++ic) {
for(long ix = 11; ix < 17; ix+=2) {
addToList(-chg[ic],-ix,1000001+ix);
addToList(chg[ic],ix,-(1000001+ix));
}
}
}
// charged leptons
if(!_mixC || _mixC->size().first==1) {
for(unsigned int ic = 0; ic < chg.size(); ++ic) {
for(long ix = 12; ix < 17; ix+=2) {
addToList(-chg[ic], ix,-( 999999+ix));
addToList(-chg[ic], ix,-(1999999+ix));
addToList( chg[ic],-ix, ( 999999+ix));
addToList( chg[ic],-ix, (1999999+ix));
}
}
}
}
FFSVertex::doinit();
// various couplings and parameters
mw_ = getParticleData(ParticleID::Wplus)->mass();
_sw = sqrt(sin2ThetaW());
double tb = model_->tanBeta();
_cw = sqrt(1. - sqr(_sw));
_sb = tb/sqrt(1 + sqr(tb));
_cb = sqrt(1 - sqr(_sb));
vector<Energy> vnu = model_->sneutrinoVEVs();
double g = electroMagneticCoupling(sqr(mw_))/_sw;
Energy v = 2.*mw_/g;
vd_ = sqrt((sqr(v)-sqr(vnu[0])-sqr(vnu[1])-sqr(vnu[2]))/
(1.+sqr(tb)));
vu_ = vd_*tb;
// couplings of the neutral scalar Higgs to charginos
Energy me = model_->mass(sqr(mw_),getParticleData(ParticleID::eminus ));
Energy mmu = model_->mass(sqr(mw_),getParticleData(ParticleID::muminus ));
Energy mtau = model_->mass(sqr(mw_),getParticleData(ParticleID::tauminus));
double h_E[3] = {sqrt(2.)*me/vd_/g,sqrt(2.)*mmu /vd_/g,sqrt(2.)*mtau/vd_/g};
for(unsigned int ih=0;ih<_mixH->size().first;++ih ) {
OCCHL_.push_back(vector<vector<Complex> >
(_umix->size().first,vector<Complex>(_umix->size().first,0.)));
for(unsigned int i=0;i<_umix->size().first;++i) {
for(unsigned int j=0;j<_umix->size().first;++j) {
OCCHL_[ih][i][j] = -sqrt(0.5)*
( (*_mixH)(ih,0)*(*_vmix)(i,0)*(*_umix)(j,1) +
(*_mixH)(ih,1)*(*_vmix)(i,1)*(*_umix)(j,0));
for(unsigned int k=2;k<_umix->size().first;++k) {
OCCHL_[ih][i][j] -= sqrt(0.5)*(+(*_mixH)(ih,k)*(*_vmix)(i,0)*(*_umix)(j,k)
+h_E[k-2]*(*_umix)(j,k)*(*_vmix)(i,k)*(*_mixH)(ih,0)
-h_E[k-2]*(*_umix)(j,1)*(*_vmix)(i,k)*(*_mixH)(ih,k));
}
}
}
}
// couplings of the neutral scalar Higgs to neutralinos
double tw = _sw/_cw;
for(unsigned int ih=0;ih<_mixH->size().first;++ih) {
ONNHL_.push_back(vector<vector<Complex> >
(_nmix->size().first,vector<Complex>(_nmix->size().first,0.)));
for(unsigned int i=0;i<_nmix->size().first;++i) {
for(unsigned int j=0;j<_nmix->size().first;++j) {
ONNHL_[ih][i][j] =0.;
for(unsigned int in=2;in<_nmix->size().first;++in) {
double sign = in!=3 ? 1. : -1.;
ONNHL_[ih][i][j] += 0.5*sign*(*_mixH)(ih,in-2)*
( + (tw*(*_nmix)(i,0) - (*_nmix)(i,1) )*(*_nmix)(j,in)
+ (tw*(*_nmix)(j,0) - (*_nmix)(j,1) )*(*_nmix)(i,in) );
}
}
}
}
// couplings of the neutral pseudoscalar Higgs to neutralinos
for(unsigned int ih=0;ih<_mixP->size().first;++ih) {
ONNAL_.push_back(vector<vector<Complex> >
(_nmix->size().first,vector<Complex>(_nmix->size().first,0.)));
for(unsigned int i=0;i<_nmix->size().first;++i) {
for(unsigned int j=0;j<_nmix->size().first;++j) {
ONNAL_[ih][i][j] =0.;
for(unsigned int in=2;in<_nmix->size().first;++in) {
double sign = in!=3 ? 1. : -1.;
ONNAL_[ih][i][j] += -0.5*sign*(*_mixP)(ih,in-2)*
( + (tw*(*_nmix)(i,0) - (*_nmix)(i,1) )*(*_nmix)(j,in)
+ (tw*(*_nmix)(j,0) - (*_nmix)(j,1) )*(*_nmix)(i,in) );
}
}
}
}
// couplings of the neutral pseudoscalar higgs to charginos
for(unsigned int ih=0;ih<_mixP->size().first;++ih) {
OCCAL_.push_back(vector<vector<Complex> >
(_umix->size().first,vector<Complex>(_umix->size().first,0.)));
for(unsigned int i=0;i<_umix->size().first;++i) {
for(unsigned int j=0;j<_umix->size().first;++j) {
OCCAL_[ih][i][j] =
(*_mixP)(ih,0)*(*_vmix)(i,0)*(*_umix)(j,1)+
(*_mixP)(ih,1)*(*_vmix)(i,1)*(*_umix)(j,0);
for(unsigned int k=2;k<_umix->size().first;++k) {
OCCAL_[ih][i][j] += (*_mixP)(ih,k)*(*_vmix)(i,0)*(*_umix)(j,k)
-h_E[k-2]*(*_umix)(j,k)*(*_vmix)(i,k)*(*_mixP)(ih,0)
+h_E[k-2]*(*_umix)(j,1)*(*_vmix)(i,k)*(*_mixP)(ih,k);
}
OCCAL_[ih][i][j] *= sqrt(0.5);
}
}
}
// couplings for the charged higgs
for(unsigned int ih=0;ih<_mixC->size().first;++ih) {
OCNSL_.push_back(vector<vector<Complex> >
(_nmix->size().first,vector<Complex>(_umix->size().first,0.)));
OCNSR_.push_back(vector<vector<Complex> >
(_nmix->size().first,vector<Complex>(_umix->size().first,0.)));
for(unsigned int i = 0; i < _nmix->size().first; ++i) {
for(unsigned int j=0;j<_umix->size().first;++j) {
OCNSL_[ih][i][j] = (*_mixC)(ih,1)*conj((*_nmix)(i, 3)*(*_vmix)(j,0)
+((*_nmix)(i,1) + (*_nmix)(i,0)*tw)*(*_vmix)(j,1)/sqrt(2));
OCNSR_[ih][i][j] = (*_mixC)(ih,0)* ((*_nmix)(i, 2)*(*_umix)(j,0)
-((*_nmix)(i,1) + (*_nmix)(i,0)*tw)*(*_umix)(j,1)/sqrt(2));
for(unsigned int k=2;k<_umix->size().first;++k) {
OCNSL_[ih][i][j] += -h_E[k-2]*(*_mixC)(ih,0)*conj((*_nmix)(i,2+k)*(*_vmix)(j,k))
+(*_mixC)(ih,k )*h_E[k-2]*conj((*_nmix)(i, 2)*(*_vmix)(j,k))
+(*_mixC)(ih,k+3)*tw*sqrt(2.)*conj((*_nmix)(i,0)*(*_vmix)(j,k));
OCNSR_[ih][i][j] += (*_mixC)(ih,k)*((*_nmix)(i,2+k)*(*_umix)(j,0)
-((*_nmix)(i,1) + (*_nmix)(i,0)*tw)*(*_umix)(j,k)/sqrt(2))
-(*_mixC)(ih,k+3)*h_E[k-2]*((*_nmix)(i,k+2)*(*_umix)(j,1)-(*_nmix)(i,2)*(*_umix)(j,k));
}
}
}
}
}
void RPVFFSVertex::persistentOutput(PersistentOStream & os) const {
os << interactions_ << _stop << _sbot << _stau << _umix << _vmix
<< _nmix << _mixH << _mixP << _mixC << ounit(mw_,GeV) << yukawa_
<< model_ << _sw << _cw << _sb << _cb << ounit(vd_,GeV) << ounit(vu_,GeV)
<< OCCHL_ << ONNHL_ << ONNAL_ << OCCAL_ << OCNSL_ << OCNSR_;
}
void RPVFFSVertex::persistentInput(PersistentIStream & is, int) {
is >> interactions_ >> _stop >> _sbot >> _stau >> _umix >> _vmix
>> _nmix >> _mixH >> _mixP >> _mixC >> iunit(mw_,GeV) >> yukawa_
>> model_ >> _sw >> _cw >> _sb >> _cb >> iunit(vd_,GeV) >> iunit(vu_,GeV)
>> OCCHL_ >> ONNHL_ >> ONNAL_ >> OCCAL_ >> OCNSL_ >> OCNSR_;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<RPVFFSVertex,Helicity::FFSVertex>
describeHerwigRPVFFSVertex("Herwig::RPVFFSVertex", "HwSusy.so HwRPV.so");
void RPVFFSVertex::Init() {
static ClassDocumentation<RPVFFSVertex> documentation
("The RPVFFSVertex class implements all the couplings of fermion-antiferion to scalars"
" in R-Parity violating models, including sfermion fermion gaugino, SM ferimon antiferimon Higgs "
"and gaugino-gaugino Higgs.");
static Switch<RPVFFSVertex,unsigned int> interfaceInteractions
("Interactions",
"Whice interactions to include",
&RPVFFSVertex::interactions_, 0, false, false);
static SwitchOption interfaceInteractionsAll
(interfaceInteractions,
"All",
"Include all the interactions",
0);
static SwitchOption interfaceInteractionsHiggsSMFermions
(interfaceInteractions,
"HiggsSMFermions",
"Interactions of Higgs with SM fermions",
1);
static SwitchOption interfaceInteractionsHiggsGaugino
(interfaceInteractions,
"HiggsGaugino",
"Interactions of the Higgs with the gauginos",
2);
static SwitchOption interfaceInteractionsNeutralinoSfermion
(interfaceInteractions,
"NeutralinoSfermion",
"Include the neutralino sfermion interactions",
3);
static SwitchOption interfaceInteractionsCharginoSfermions
(interfaceInteractions,
"CharginoSfermions",
"Include the chargino sfermion interactions",
4);
static Switch<RPVFFSVertex,bool> interfaceYukawa
("Yukawa",
"Whether or not to include the Yukawa type couplings in neutralino/chargino interactions",
&RPVFFSVertex::yukawa_, true, false, false);
static SwitchOption interfaceYukawaYes
(interfaceYukawa,
"Yes",
"Include the terms",
true);
static SwitchOption interfaceYukawaNo
(interfaceYukawa,
"No",
"Don't include them",
false);
}
void RPVFFSVertex::neutralinoSfermionCoupling(Energy2 q2, tcPDPtr fermion,
tcPDPtr gaugino, tcPDPtr sfermion) {
long ism(abs(fermion->id())),ig(abs(gaugino->id())),isc(sfermion->id());
if( ig != _id1last || ism != _id2last || isc != _id3last ) {
_id1last = ig;
_id2last = ism;
_id3last = isc;
// sfermion mass eigenstate
unsigned int alpha(abs(isc)/1000000 - 1);
// neutralino state
unsigned int nl = neutralinoIndex(ig);
assert(nl<=6);
// common primed neutralino matrices
Complex n2prime = (*_nmix)(nl,1)*_cw - (*_nmix)(nl,0)*_sw;
//handle neutrinos first
if( ism == 12 || ism == 14 || ism == 16 ) {
_leftlast = Complex(0., 0.);
_rightlast = -sqrt(0.5)*n2prime/_cw;
}
else {
Complex n1prime = (*_nmix)(nl,0)*_cw + (*_nmix)(nl,1)*_sw;
tcPDPtr smf = getParticleData(ism);
double qf = smf->charge()/eplus;
Complex bracketl = qf*_sw*( conj(n1prime) - _sw*conj(n2prime)/_cw );
double y = yukawa_ ? double(model_->mass(q2, smf)/2./mw_) : 0.;
double lambda(0.);
//neutralino mixing element
Complex nlf(0.);
if( ism % 2 == 0 ) {
y /= _sb;
lambda = -0.5 + qf*sqr(_sw);
nlf = (*_nmix)(nl,3);
}
else {
y /= _cb;
lambda = 0.5 + qf*sqr(_sw);
nlf = (*_nmix)(nl,2);
}
Complex bracketr = _sw*qf*n1prime - n2prime*lambda/_cw;
//heavy quarks/sleptons
if( ism == 5 || ism == 6 || ism == 15 ) {
Complex ma1(0.), ma2(0.);
if( ism == 5 ) {
ma1 = (*_sbot)(alpha,0);
ma2 = (*_sbot)(alpha,1);
}
else if( ism == 6 ) {
ma1 = (*_stop)(alpha,0);
ma2 = (*_stop)(alpha,1);
}
else {
ma1 = (*_stau)(alpha,0);
ma2 = (*_stau)(alpha,1);
}
_leftlast = y*conj(nlf)*ma1 - ma2*bracketl;
_rightlast = y*nlf*ma2 + ma1*bracketr;
}
else {
if( alpha == 0 ) {
_leftlast = y*conj(nlf);
_rightlast = bracketr;
}
else {
_leftlast = -bracketl;
_rightlast = y*nlf;
}
}
_leftlast *= -sqrt(2.);
_rightlast *= -sqrt(2.);
}
}
//determine the helicity order of the vertex
if( fermion->id() < 0 ) {
left (conj(_rightlast));
right(conj( _leftlast));
}
else {
left ( _leftlast);
right(_rightlast);
}
norm(_couplast);
}
void RPVFFSVertex::charginoSfermionCoupling(Energy2 q2, tcPDPtr fermion,
tcPDPtr gaugino, tcPDPtr sfermion) {
long ism(abs(fermion->id())),ig(abs(gaugino->id())),isc(sfermion->id());
if( ig != _id1last || ism != _id2last || isc != _id3last ) {
_id1last = ig;
_id2last = ism;
_id3last = isc;
// sfermion mass eigenstate
unsigned int alpha(abs(isc)/1000000 - 1);
// get the type of chargino
unsigned int ch = charginoIndex(ig);
assert(ch<=4);
// various mixing matrix elements
Complex ul1 = (*_umix)(ch,0), ul2 = (*_umix)(ch,1);
Complex vl1 = (*_vmix)(ch,0), vl2 = (*_vmix)(ch,1);
// lepton/slepton
if( ism >= 11 && ism <= 16 ) {
long lept = ( ism % 2 == 0 ) ? ism - 1 : ism;
double y = yukawa_ ?
double(model_->mass(q2, getParticleData(lept))/mw_/sqrt(2)/_cb) : 0.;
if( ism == 12 || ism == 14 ) {
_leftlast = 0.;
_rightlast = alpha == 0 ? - ul1 : y*ul2;
}
else if( ism == 16 ) {
_leftlast = 0.;
_rightlast = -ul1*(*_stau)(alpha, 0) + y*(*_stau)(alpha,1)*ul2;
}
else if( ism == 11 || ism == 13 || ism == 15 ) {
_leftlast = y*conj(ul2);
_rightlast = -vl1;
}
}
// squark/quark
else {
double yd(0.), yu(0.);
if(yukawa_) {
if( ism % 2 == 0) {
yu = model_->mass(q2, getParticleData(ism))/mw_/sqrt(2)/_sb;
yd = model_->mass(q2, getParticleData(ism - 1))/mw_/sqrt(2)/_cb;
}
else {
yu = model_->mass(q2, getParticleData(ism + 1))/mw_/sqrt(2)/_sb;
yd = model_->mass(q2, getParticleData(ism))/mw_/sqrt(2)/_cb;
}
}
//heavy quarks
if( ism == 5 ) {
_leftlast = yd*conj(ul2)*(*_stop)(alpha,0);
_rightlast = -vl1*(*_stop)(alpha, 0) + yu*vl2*(*_stop)(alpha,1);
}
else if( ism == 6 ) {
_leftlast = yu*conj(vl2)*(*_sbot)(alpha,0);
_rightlast = -ul1*(*_sbot)(alpha, 0) + yd*ul2*(*_sbot)(alpha,1);
}
else {
if( alpha == 0 ) {
_leftlast = (ism % 2 == 0) ? yu*conj(vl2) : yd*conj(ul2);
_rightlast = (ism % 2 == 0) ? -ul1 : -vl1;
}
else {
_leftlast = 0.;
_rightlast = (ism % 2 == 0) ? yd*ul2 : yu*vl2;
}
}
}
}
//determine the helicity order of the vertex
if( fermion->id() < 0 ) {
left (conj(_rightlast));
right(conj( _leftlast));
}
else {
left ( _leftlast);
right(_rightlast);
}
norm(_couplast);
}
void RPVFFSVertex::higgsFermionCoupling(Energy2 q2, tcPDPtr f1,
tcPDPtr f2, tcPDPtr higgs) {
long f1ID(f1->id()), f2ID(f2->id()), isc(higgs->id());
// running fermion masses
if( q2 != _q2last || _id1last != f1ID) {
_massLast.first = model_->mass(q2,f1);
_id1last = f1ID;
}
if( q2 != _q2last || _id2last != f2ID) {
_massLast.second = model_->mass(q2,f2);
_id2last = f2ID;
}
if( q2 != _q2last) _id3last = isc;
Complex fact(0.);
// scalar neutral Higgs
if(isc == ParticleID::h0 || isc == ParticleID::H0 ||
isc == ParticleID::SUSY_nu_eL || isc == ParticleID::SUSY_nu_muL ||
isc == ParticleID::SUSY_nu_tauL ) {
unsigned int ih = isc < 1000000 ? (isc-25)/10 : (isc-1000008)/2;
unsigned int id = abs(f1ID);
- fact = -_massLast.first*
- ((id%2==0) ? (*_mixH)(ih,1)/vu_ : (*_mixH)(ih,0)/vd_);
+ fact = -Complex(_massLast.first*
+ ((id%2==0) ? (*_mixH)(ih,1)/vu_ : (*_mixH)(ih,0)/vd_));
left (1.);
right(1.);
}
// pseudoscalar neutral Higgs
else if(isc == ParticleID::A0 || isc == 1000017 || isc == 1000018 ||
isc == 1000019 ) {
unsigned int ih = isc < 1000000 ? 0 : (isc-1000016);
unsigned int id = abs(f1ID);
if(_mixP) {
- fact = -Complex(0., 1.)*_massLast.first*
- ( (id%2==0) ? (*_mixP)(ih,1)/vu_ : (*_mixP)(ih,0)/vd_);
+ fact = Complex(-Complex(0., 1.)*_massLast.first*
+ ( (id%2==0) ? (*_mixP)(ih,1)/vu_ : (*_mixP)(ih,0)/vd_));
}
else {
- fact = -Complex(0., 1.)*_massLast.first*
- ( (id%2==0) ? _cb/vu_ : _sb/vd_);
+ fact = Complex(-Complex(0., 1.)*_massLast.first*
+ ( (id%2==0) ? _cb/vu_ : _sb/vd_));
}
left ( 1.);
right(-1.);
}
// charged higgs
else {
if(!_mixC) {
if( abs(f1ID) % 2 == 0 ) {
_leftlast = _massLast.first /vu_*_cb;
_rightlast = _massLast.second/vd_*_sb;
}
else {
_leftlast = _massLast.second/vu_*_cb;
_rightlast = _massLast.first /vd_*_sb;
}
}
else {
unsigned int ih;
if(abs(isc)==ParticleID::Hplus) {
ih = 0;
}
else {
isc *= -1;
ih = abs(isc)<2000000 ? (abs(isc)-1000009)/2 : (abs(isc)-2000003)/2;
}
if( abs(f1ID) % 2 == 0 ) {
- _leftlast = _massLast.first /vu_*(*_mixC)(ih,1);
- _rightlast = _massLast.second/vd_*(*_mixC)(ih,0);
+ _leftlast = Complex(_massLast.first /vu_*(*_mixC)(ih,1));
+ _rightlast = Complex(_massLast.second/vd_*(*_mixC)(ih,0));
}
else {
- _leftlast = _massLast.second/vu_*(*_mixC)(ih,1);
- _rightlast = _massLast.first /vd_*(*_mixC)(ih,0);
+ _leftlast = Complex(_massLast.second/vu_*(*_mixC)(ih,1));
+ _rightlast = Complex(_massLast.first /vd_*(*_mixC)(ih,0));
}
}
if( isc > 0 ) swap(_leftlast,_rightlast);
fact = sqrt(2.);
left ( _leftlast);
right(_rightlast);
}
norm(fact);
}
void RPVFFSVertex::higgsGauginoCoupling(Energy2, tcPDPtr f1,
tcPDPtr f2, tcPDPtr higgs) {
long f1ID(f1->id()), f2ID(f2->id()), isc(higgs->id());
if( isc == _id3last && f1ID == _id1last && f2ID == _id2last ) {
left ( _leftlast);
right(_rightlast);
}
else {
_id1last = f1ID;
_id2last = f2ID;
_id3last = isc;
// scalar neutral Higgs
if(isc == ParticleID::h0 || isc == ParticleID::H0 ||
isc == ParticleID::SUSY_nu_eL || isc == ParticleID::SUSY_nu_muL ||
isc == ParticleID::SUSY_nu_tauL ) {
unsigned int ih = isc < 1000000 ? (isc-25)/10 : (isc-1000008)/2;
// charginos
if(f1->charged()) {
unsigned int ei = charginoIndex(f1ID);
unsigned int ej = charginoIndex(f2ID);
if (ei< 2&&f1ID>0) swap(ei,ej);
else if(ei>=2&&f1ID<0) swap(ei,ej);
_rightlast = conj(OCCHL_[ih][ej][ei]);
_leftlast = OCCHL_[ih][ei][ej] ;
}
// neutralinos
else {
unsigned int ei = neutralinoIndex(f1ID);
unsigned int ej = neutralinoIndex(f2ID);
_leftlast = conj(ONNHL_[ih][ej][ei]);
_rightlast = ONNHL_[ih][ei][ej] ;
}
}
// pseudoscalar neutral Higgs
else if(isc == ParticleID::A0 || isc == 1000017 || isc == 1000018 ||
isc == 1000019 ) {
unsigned int ih = isc < 1000000 ? 0 : (isc-1000016);
// charginos
if(f1->charged()) {
unsigned int ei = charginoIndex(f1ID);
unsigned int ej = charginoIndex(f2ID);
if (ei< 2&&f1ID>0) swap(ei,ej);
else if(ei>=2&&f1ID<0) swap(ei,ej);
_rightlast = -Complex(0.,1.)*conj(OCCAL_[ih][ej][ei]);
_leftlast = Complex(0.,1.)* OCCAL_[ih][ei][ej] ;
}
// neutralinos
else {
unsigned int ei = neutralinoIndex(f1ID);
unsigned int ej = neutralinoIndex(f2ID);
_leftlast = Complex(0.,1.)*conj(ONNAL_[ih][ej][ei]);
_rightlast = -Complex(0.,1.)* ONNAL_[ih][ei][ej] ;
}
}
// charged higgs
else {
unsigned int ih = abs(isc) < 1000000 ? 0 :
(abs(isc) < 2000000 ? (abs(isc)-1000009)/2 : (abs(isc)-2000003)/2);
long chg(f2ID), neu(f1ID);
if(f1->charged()) swap(chg, neu);
unsigned int ei = neutralinoIndex(neu);
unsigned int ej = charginoIndex(chg);
_leftlast = -OCNSL_[ih][ei][ej];
_rightlast = -OCNSR_[ih][ei][ej];
bool chargedSwap = abs(isc)<1000000 ? isc<0 : isc>0;
if( chargedSwap ) {
Complex tmp = _leftlast;
_leftlast = conj(_rightlast);
_rightlast = conj(tmp);
}
}
left ( _leftlast);
right(_rightlast);
}
norm(_couplast);
}
void RPVFFSVertex::setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3) {
// overall normalisation
if(q2!=_q2last || _couplast==0.) {
_couplast = weakCoupling(q2);
_q2last=q2;
}
long f1ID(part1->id()), f2ID(part2->id()), isc(abs(part3->id()));
// squark quark
if(part3->coloured()) {
tcPDPtr smfermion = part1, gaugino = part2;
if(gaugino->coloured()) swap(smfermion,gaugino);
if(gaugino->charged())
charginoSfermionCoupling(q2,smfermion,gaugino,part3);
else
neutralinoSfermionCoupling(q2,smfermion,gaugino,part3);
}
// slepton/lepton without mixing
else if((( isc >= 1000011 && isc <= 1000016) ||
( isc >= 2000011 && isc <= 2000016)) &&
(!_mixC || _mixC->size().first<=1 ||
!_mixP || _mixP->size().first<=1 )) {
tcPDPtr smfermion = part1, gaugino = part2;
if(abs(gaugino->id())<1000000) swap(smfermion,gaugino);
if(gaugino->charged())
charginoSfermionCoupling(q2,smfermion,gaugino,part3);
else
neutralinoSfermionCoupling(q2,smfermion,gaugino,part3);
}
// SM quarks and Higgs
else if((abs(f1ID) <= 6 && abs(f2ID) <= 6) ||
((abs(f1ID) >= 11 && abs(f1ID) <= 16) &&
(abs(f2ID) >= 11 && abs(f2ID) <= 16) &&
_umix->size().first==2) ) {
higgsFermionCoupling(q2,part1,part2,part3);
}
// gauginos and the Higgs (general case for sleptons)
else {
higgsGauginoCoupling(q2,part1,part2,part3);
}
}
diff --git a/Models/Susy/RPV/RPVFFSVertex.h b/Models/Susy/RPV/RPVFFSVertex.h
--- a/Models/Susy/RPV/RPVFFSVertex.h
+++ b/Models/Susy/RPV/RPVFFSVertex.h
@@ -1,303 +1,303 @@
// -*- C++ -*-
#ifndef Herwig_RPVFFSVertex_H
#define Herwig_RPVFFSVertex_H
//
// This is the declaration of the RPVFFSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "RPV.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVFFSVertex class.
*
* @see \ref RPVFFSVertexInterfaces "The interfaces"
* defined for RPVFFSVertex.
*/
class RPVFFSVertex: public Helicity::FFSVertex {
public:
/**
* The default constructor.
*/
RPVFFSVertex();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Neutralino-sfermion-fermion
*/
void neutralinoSfermionCoupling(Energy2 q2, tcPDPtr fermion, tcPDPtr gaugino,
tcPDPtr sfermion);
/**
* Chargino-sfermion-fermion
*/
void charginoSfermionCoupling(Energy2 q2, tcPDPtr fermion, tcPDPtr gaugino,
tcPDPtr sfermion);
/**
* Higgs to SM fermions
*/
void higgsFermionCoupling(Energy2 q2, tcPDPtr f1, tcPDPtr f2, tcPDPtr higgs);
/**
* Higgs to gauginos (general slepton case with mixing)
*/
void higgsGauginoCoupling(Energy2 q2, tcPDPtr f1, tcPDPtr f2, tcPDPtr higgs);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVFFSVertex & operator=(const RPVFFSVertex &);
+ RPVFFSVertex & operator=(const RPVFFSVertex &) = delete;
private:
/**
* Which interactions to include
*/
unsigned int interactions_;
/**
* Mixing Matrices
*/
//@{
/**
* Pointer to stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Pointer to sbottom mixing matrix
*/
tMixingMatrixPtr _sbot;
/**
* Pointer to stau mixing matrix
*/
tMixingMatrixPtr _stau;
/**
* Pointer to U chargino mixing matrix
*/
tMixingMatrixPtr _umix;
/**
* Pointer to V chargino mixing matrix
*/
tMixingMatrixPtr _vmix;
/**
* Pointer to the neutralino mixing matrix
*/
tMixingMatrixPtr _nmix;
/**
* Neutral scalar Higgs mixing matrix
*/
MixingMatrixPtr _mixH;
/**
* Neutral pseudoscalar Higgs mixing matrix
*/
MixingMatrixPtr _mixP;
/**
* Charged Higgs mixing matrix
*/
MixingMatrixPtr _mixC;
//@}
/**
* The mass of the \f$W\f$.
*/
Energy mw_;
/**
* The energy scale at which the coupling
* was last evaluated
*/
Energy2 _q2last;
/**
* The value of the coupling at the scale last evaluated
*/
Complex _couplast;
/**
* Store the value of the left coupling when it was last evaluated
*/
Complex _leftlast;
/**
* Store the value of the right coupling when it was last evaluated
*/
Complex _rightlast;
/**
* Store the id of the last gaugino to be evaluated
*/
long _id1last;
/**
* Store the id of the last SM fermion to be evaluated
*/
long _id2last;
/**
* Store the id of the last scalar to be evaluated
*/
long _id3last;
/**
* Include Yukawa's ? in neutralino/chargino interactions
*/
bool yukawa_;
/**
* Pointer to the Susy Model object
*/
tRPVPtr model_;
/**
* \f$\sin(\theta_w)\f$
*/
double _sw;
/**
* \f$\cos(\theta_w)\f$
*/
double _cw;
/**
* \f$\sin(\beta)\f$
*/
double _sb;
/**
* \f$\cos(\beta)\f$
*/
double _cb;
/**
* VEV for down type Higgs
*/
Energy vd_;
/**
* VEV for up type Higgs
*/
Energy vu_;
/**
* Values of the masses
*/
pair<Energy,Energy> _massLast;
/**
* OCCHL
*/
vector<vector<vector<Complex> > > OCCHL_;
/**
* ONNHL
*/
vector<vector<vector<Complex> > > ONNHL_;
/**
* OCCAL
*/
vector<vector<vector<Complex> > > OCCAL_;
/**
* ONNAL
*/
vector<vector<vector<Complex> > > ONNAL_;
/**
* OCNSL
*/
vector<vector<vector<Complex> > > OCNSL_;
/**
* OCNSR
*/
vector<vector<vector<Complex> > > OCNSR_;
};
}
#endif /* Herwig_RPVFFSVertex_H */
diff --git a/Models/Susy/RPV/RPVFFWVertex.h b/Models/Susy/RPV/RPVFFWVertex.h
--- a/Models/Susy/RPV/RPVFFWVertex.h
+++ b/Models/Susy/RPV/RPVFFWVertex.h
@@ -1,178 +1,178 @@
// -*- C++ -*-
#ifndef Herwig_RPVFFWVertex_H
#define Herwig_RPVFFWVertex_H
//
// This is the declaration of the RPVFFWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Models/Susy/SusyBase.h"
#include "Herwig/Models/Susy/MixingMatrix.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVFFWVertex class.
*
* @see \ref RPVFFWVertexInterfaces "The interfaces"
* defined for RPVFFWVertex.
*/
class RPVFFWVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
RPVFFWVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVFFWVertex & operator=(const RPVFFWVertex &);
+ RPVFFWVertex & operator=(const RPVFFWVertex &) = delete;
private:
/** @name Quark flavour parameters */
//@{
/**
* True, if a diagonal CKM matrix should be assumed. This ignores
* the CKM object of the StandardModel.
*/
bool _diagonal;
/**
* The elements of the CKM matrix.
*/
vector<vector<Complex> > _ckm;
//@}
/**
* Store \f$sin(\theta_W)\f$
*/
double _sw;
/**
* Store the neutralino mixing matrix
*/
tMixingMatrixPtr _theN;
/**
* Store the U-type chargino mixing matrix
*/
tMixingMatrixPtr _theU;
/**
* Store the V-type chargino mixing matrix
*/
tMixingMatrixPtr _theV;
/**
* The value of the coupling when it was last evaluated
*/
Complex _couplast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* The id of the first chargino the last time the vertex was evaluated
*/
long _id1last;
/**
* The id of the second chargino the last time the vertex was evaluated
*/
long _id2last;
/**
* The value of the left coupling when it was last evaluated
*/
Complex _leftlast;
/**
* The value of the right coupling when it was last evaluated
*/
Complex _rightlast;
/**
* Which interactions to include
*/
unsigned int _interactions;
};
}
#endif /* Herwig_RPVFFWVertex_H */
diff --git a/Models/Susy/RPV/RPVFFZVertex.h b/Models/Susy/RPV/RPVFFZVertex.h
--- a/Models/Susy/RPV/RPVFFZVertex.h
+++ b/Models/Susy/RPV/RPVFFZVertex.h
@@ -1,183 +1,183 @@
// -*- C++ -*-
#ifndef Herwig_RPVFFZVertex_H
#define Herwig_RPVFFZVertex_H
//
// This is the declaration of the RPVFFZVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Models/Susy/SusyBase.h"
#include "Herwig/Models/Susy/MixingMatrix.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVFFZVertex class.
*
* @see \ref RPVFFZVertexInterfaces "The interfaces"
* defined for RPVFFZVertex.
*/
class RPVFFZVertex: public Helicity::FFVVertex {
public:
/**
* The default constructor.
*/
RPVFFZVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVFFZVertex & operator=(const RPVFFZVertex &);
+ RPVFFZVertex & operator=(const RPVFFZVertex &) = delete;
private:
/**
* The value of \f$sin(\theta_W)\f$
*/
double _sw;
/**
* The value of \f$cos(\theta_W)\f$
*/
double _cw;
/**
* Store the neutralino mixing matrix
*/
tMixingMatrixPtr _theN;
/**
* The U mixing matrix
*/
tMixingMatrixPtr _theU;
/**
* The V mixing matrix
*/
tMixingMatrixPtr _theV;
/**
* Store the id of the 1st neutralino when the coupling was last evaluated
*/
long _id1last;
/**
* Store the id of the 2nd neutralino when the coupling was last evaluated
*/
long _id2last;
/**
* Store the value at which the coupling when it was last evalutated
*/
Energy2 _q2last;
/**
* Store the value of the coupling when it was last evalutated
*/
Complex _couplast;
/**
* Store the value of the left-coupling when it was last evalutated
*/
Complex _leftlast;
/**
* Store the value of the right-coupling when it was last evalutated
*/
Complex _rightlast;
/**
* The left couplings of the Standard Model fermions.
*/
vector<double> _gl;
/**
* The right couplings of the Standard Model fermions.
*/
vector<double> _gr;
/**
* The ID of the gauge boson when the vertex was last evaluated
*/
long _gblast;
/**
* Switch controlling which subset of interactions to include
*/
unsigned int _interactions;
};
}
#endif /* Herwig_RPVFFZVertex_H */
diff --git a/Models/Susy/RPV/RPVLLEVertex.h b/Models/Susy/RPV/RPVLLEVertex.h
--- a/Models/Susy/RPV/RPVLLEVertex.h
+++ b/Models/Susy/RPV/RPVLLEVertex.h
@@ -1,119 +1,119 @@
// -*- C++ -*-
#ifndef HERWIG_LLEVertex_H
#define HERWIG_LLEVertex_H
//
// This is the declaration of the RPVLLEVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "RPV.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVLLEVertex class.
*
* @see \ref RPVLLEVertexInterfaces "The interfaces"
* defined for RPVLLEVertex.
*/
class RPVLLEVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
RPVLLEVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVLLEVertex & operator=(const RPVLLEVertex &);
+ RPVLLEVertex & operator=(const RPVLLEVertex &) = delete;
private:
/**
* Coupling
*/
vector<vector<vector<double > > > lambda_;
/**
* Pointer to the stau mixing matrix
*/
tMixingMatrixPtr stau_;
};
}
#endif /* HERWIG_RPVLLEVertex_H */
diff --git a/Models/Susy/RPV/RPVLQDVertex.h b/Models/Susy/RPV/RPVLQDVertex.h
--- a/Models/Susy/RPV/RPVLQDVertex.h
+++ b/Models/Susy/RPV/RPVLQDVertex.h
@@ -1,129 +1,129 @@
// -*- C++ -*-
#ifndef HERWIG_RPVLQDVertex_H
#define HERWIG_RPVLQDVertex_H
//
// This is the declaration of the RPVLQDVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "RPV.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVLQDVertex class.
*
* @see \ref RPVLQDVertexInterfaces "The interfaces"
* defined for RPVLQDVertex.
*/
class RPVLQDVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
RPVLQDVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVLQDVertex & operator=(const RPVLQDVertex &);
+ RPVLQDVertex & operator=(const RPVLQDVertex &) = delete;
private:
/**
* Coupling
*/
vector<vector<vector<double > > > lambda_;
/**
* Pointer to the stop mixing matrix
*/
tMixingMatrixPtr stop_;
/**
* Pointer to the sbottom mixing matrix
*/
tMixingMatrixPtr sbot_;
/**
* Pointer to the stau mixing matrix
*/
tMixingMatrixPtr stau_;
};
}
#endif /* HERWIG_RPVLQDVertex_H */
diff --git a/Models/Susy/RPV/RPVSSSVertex.h b/Models/Susy/RPV/RPVSSSVertex.h
--- a/Models/Susy/RPV/RPVSSSVertex.h
+++ b/Models/Susy/RPV/RPVSSSVertex.h
@@ -1,209 +1,209 @@
// -*- C++ -*-
#ifndef Herwig_RPVSSSVertex_H
#define Herwig_RPVSSSVertex_H
//
// This is the declaration of the RPVSSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVSSSVertex class.
*
* @see \ref RPVSSSVertexInterfaces "The interfaces"
* defined for RPVSSSVertex.
*/
class RPVSSSVertex: public Helicity::SSSVertex {
public:
/**
* The default constructor.
*/
RPVSSSVertex();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVSSSVertex & operator=(const RPVSSSVertex &);
+ RPVSSSVertex & operator=(const RPVSSSVertex &) = delete;
private:
/**
* Which types of interaction to include
*/
unsigned int interactions_;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 q2Last_;
/**
* The value of \f$ \sqrt{4\pi\alpha}\f$ when it was last evaluated.
*/
double gLast_;
/**
* Sfermion mixing
*/
//@{
/**
* Stau mixing
*/
tMixingMatrixPtr stau_;
/**
* Sbottom mixing
*/
tMixingMatrixPtr sbottom_;
/**
* Stop mixing
*/
tMixingMatrixPtr stop_;
//@}
/**
* Couplings of the scalar Higgs bosons to other scalars
*/
vector<vector<vector<complex<Energy> > > > scalarScalarScalar_;
/**
* Couplings of the scalar Higgs bosons to pseudoscalars
*/
vector<vector<vector<complex<Energy> > > > scalarPseudoPseudo_;
/**
* Couplings of the neutral scalar Higgs bosons to two charged Higgs bosons
*/
vector<vector<vector<complex<Energy> > > > scalarChargedCharged_;
/**
* Couplings of the neutral pseudoscalar Higgs bosons to two charged Higgs bosons
*/
vector<vector<vector<complex<Energy> > > > pseudoChargedCharged_;
/**
* Couplings of the scalar Higgs bosons to up squarks
*/
vector<vector<vector<vector<complex<Energy> > > > > scalarSup_;
/**
* Couplings of the scalar Higgs bosons to down squarks
*/
vector<vector<vector<vector<complex<Energy> > > > > scalarSdown_;
/**
* Couplings of the pseudo Higgs bosons to up squarks
*/
vector<vector<complex<Energy> > > pseudoSup_;
/**
* Couplings of the pseudo Higgs bosons to down squarks
*/
vector<vector<complex<Energy> > > pseudoSdown_;
/**
* Couplings of the scalar Higgs bosons to sneutinos
*/
vector<vector<complex<Energy> > > scalarSneutrino_;
/**
* Couplings of the scalar Higgs bosons to charged sleptons
*/
vector<vector<vector<vector<complex<Energy> > > > > scalarSlepton_;
/**
* Couplings of the pseudo Higgs bosons to charged sleptons
*/
vector<vector<complex<Energy> > > pseudoSlepton_;
/**
* Couplings of the charged Higgs to squarks
*/
vector<vector<vector<vector<complex<Energy> > > > > chargedSquark_;
/**
* Couplings of the charged Higgs to sleptons
*/
vector<vector<vector<complex<Energy> > > > chargedSlepton_;
};
}
#endif /* Herwig_RPVSSSVertex_H */
diff --git a/Models/Susy/RPV/RPVUDDVertex.h b/Models/Susy/RPV/RPVUDDVertex.h
--- a/Models/Susy/RPV/RPVUDDVertex.h
+++ b/Models/Susy/RPV/RPVUDDVertex.h
@@ -1,124 +1,124 @@
// -*- C++ -*-
#ifndef HERWIG_RPVUDDVertex_H
#define HERWIG_RPVUDDVertex_H
//
// This is the declaration of the RPVUDDVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "RPV.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVUDDVertex class.
*
* @see \ref RPVUDDVertexInterfaces "The interfaces"
* defined for RPVUDDVertex.
*/
class RPVUDDVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
RPVUDDVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVUDDVertex & operator=(const RPVUDDVertex &);
+ RPVUDDVertex & operator=(const RPVUDDVertex &) = delete;
private:
/**
* Coupling
*/
vector<vector<vector<double > > > lambda_;
/**
* Pointer to the stop mixing matrix
*/
tMixingMatrixPtr stop_;
/**
* Pointer to the sbottom mixing matrix
*/
tMixingMatrixPtr sbot_;
};
}
#endif /* HERWIG_RPVUDDVertex_H */
diff --git a/Models/Susy/RPV/RPVWSSVertex.h b/Models/Susy/RPV/RPVWSSVertex.h
--- a/Models/Susy/RPV/RPVWSSVertex.h
+++ b/Models/Susy/RPV/RPVWSSVertex.h
@@ -1,199 +1,199 @@
// -*- C++ -*-
#ifndef Herwig_RPVWSSVertex_H
#define Herwig_RPVWSSVertex_H
//
// This is the declaration of the RPVWSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "Herwig/Models/Susy/MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the RPVWSSVertex class.
*
* @see \ref RPVWSSVertexInterfaces "The interfaces"
* defined for RPVWSSVertex.
*/
class RPVWSSVertex: public Helicity::VSSVertex {
public:
/**
* The default constructor.
*/
RPVWSSVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVWSSVertex & operator=(const RPVWSSVertex &);
+ RPVWSSVertex & operator=(const RPVWSSVertex &) = delete;
private:
/**
* Value of \f$sin(\theta_w)\f$
*/
double _sw;
/**
* Value of \f$cos(\theta_w)\f$
*/
double _cw;
/**
* Stau mixing matrix
*/
tMixingMatrixPtr _stau;
/**
* Stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Sbottom mixing matrix
*/
tMixingMatrixPtr _sbottom;
/**
* The value of \f$\sin2\theta_W\f$
*/
double _s2w;
/**
* The value of \f$\cos2\theta_W\f$
*/
double _c2w;
/**
* Coupling of Z to scalar and pseudoscalar
*/
vector<vector<Complex> > Cijeo_;
/**
* Coupling of W to scalar charged
*/
vector<vector<Complex> > Cijec_;
/**
* Coupling of W to pseudoscalar charged
*/
vector<vector<Complex> > Cijco_;
/**
* Coupling of Z to charged Higgs
*/
vector<vector<Complex> > Cijc_;
/**
* Which interactions to include
*/
unsigned int _interactions;
/**
* Scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* The up type sfermion present when the vertex was evaluated.
*/
long _ulast;
/**
* The down type sfermion present when the vertex was evaluated.
*/
long _dlast;
/**
* The gauge boson present when the vertex was last evaluated.
*/
long _gblast;
/**
* The value of the mixing matrix dependent part when the vertex was
* last evaluated
*/
Complex _factlast;
/**
* Value of coupling when last evaluated
*/
Complex _couplast;
};
}
#endif /* Herwig_RPVWSSVertex_H */
diff --git a/Models/Susy/RPV/RPVWWHVertex.h b/Models/Susy/RPV/RPVWWHVertex.h
--- a/Models/Susy/RPV/RPVWWHVertex.h
+++ b/Models/Susy/RPV/RPVWWHVertex.h
@@ -1,121 +1,121 @@
// -*- C++ -*-
#ifndef Herwig_RPVWWHVertex_H
#define Herwig_RPVWWHVertex_H
//
// This is the declaration of the RPVWWHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* The RPVWWHVertex class implements the couplings of a pair of gauge bosons to scalars in
* the R-parity violating MSSM.
*/
class RPVWWHVertex: public Helicity::VVSVertex {
public:
/**
* The default constructor.
*/
RPVWWHVertex();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- RPVWWHVertex & operator=(const RPVWWHVertex &);
+ RPVWWHVertex & operator=(const RPVWWHVertex &) = delete;
private:
/**
* The factors for the various interactions
*/
vector<vector<complex<Energy> > > couplings_;
/**
* last value of the coupling
*/
double coupLast_;
/**
* last value of the scale
*/
Energy2 q2Last_;
};
}
#endif /* Herwig_RPVWWHVertex_H */
diff --git a/Models/Susy/SSCCZVertex.h b/Models/Susy/SSCCZVertex.h
--- a/Models/Susy/SSCCZVertex.h
+++ b/Models/Susy/SSCCZVertex.h
@@ -1,170 +1,170 @@
// -*- C++ -*-
//
// SSCCZVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSCCZVertex_H
#define HERWIG_SSCCZVertex_H
//
// This is the declaration of the SSCCZVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "SusyBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a \f$\gamma/Z^0\f$ to a pair of
* charginos. It inherits from FFVVertex and implements the setCoupling method.
*
* @see \ref SSCCZVertexInterfaces "The interfaces"
* defined for SSCCZVertex.
* @see FFVVertex
*/
class SSCCZVertex: public FFVVertex {
public:
/**
* The default constructor.
*/
SSCCZVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSCCZVertex & operator=(const SSCCZVertex &);
+ SSCCZVertex & operator=(const SSCCZVertex &) = delete;
private:
/**
* Value of \f$sin^2(\theta_W)\f$
*/
double _sw2;
/**
* Value of \f$cos(\theta_W)\f$
*/
double _cw;
/**
* The U mixing matrix
*/
tMixingMatrixPtr _theU;
/**
* The V mixing matrix
*/
tMixingMatrixPtr _theV;
/**
* The value of the coupling when it was last evaluated
*/
Complex _couplast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* The id of the first chargino the last time the vertex was evaluated
*/
long _id1last;
/**
* The id of the second chargino the last time the vertex was evaluated
*/
long _id2last;
/**
* The value of the left coupling when it was last evaluated
*/
Complex _leftlast;
/**
* The value of the right coupling when it was last evaluated
*/
Complex _rightlast;
/**
* The ID of the gauge boson when the vertex was last evaluated
*/
long _gblast;
};
}
#endif /* HERWIG_SSCCZVertex_H */
diff --git a/Models/Susy/SSCFSVertex.h b/Models/Susy/SSCFSVertex.h
--- a/Models/Susy/SSCFSVertex.h
+++ b/Models/Susy/SSCFSVertex.h
@@ -1,199 +1,199 @@
// -*- C++ -*-
//
// SSCFSVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSCFSVertex_H
#define HERWIG_SSCFSVertex_H
//
// This is the declaration of the SSCFSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the coupling of the charginos to fermion-
* sfermions. It inherits from FFSVertex and implements the virtual
* setCoupling member
*
* @see FFSVertex
*/
class SSCFSVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
SSCFSVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSCFSVertex & operator=(const SSCFSVertex &);
+ SSCFSVertex & operator=(const SSCFSVertex &) = delete;
/**
* Pointer to the MSSM object
*/
tMSSMPtr _theSS;
/**
* \f$\sin(\beta)\f$
*/
double _sb;
/**
* \f$\cos(\beta)\f$
*/
double _cb;
/**
* Mass of the W
*/
Energy _mw;
/**
* Pointer to stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Pointer to sbottom mixing matrix
*/
tMixingMatrixPtr _sbot;
/**
* Pointer to stau mixing matrix
*/
tMixingMatrixPtr _stau;
/**
* Pointer to U chargino mixing matrix
*/
tMixingMatrixPtr _umix;
/**
* Pointer to V chargino mixing matrix
*/
tMixingMatrixPtr _vmix;
/**
* The energy scale at which the coupling
* was last evaluated
*/
Energy2 _q2last;
/**
* The value of the coupling at the scale last evaluated
*/
Complex _couplast;
/**
* The value of the left coupling when last evaluated
*/
Complex _leftlast;
/**
* The value of the right coupling when last evaluated
*/
Complex _rightlast;
/**
* Id of the last sm fermion that the coupling was evaluated for
*/
long _id1last;
/**
* Id of the last scalar that the coupling was evaluated for
*/
long _id2last;
/**
* Id of the last chargino that the coupling was evaluated for
*/
long _id3last;
/**
* Include Yukawa's ?
*/
unsigned int yukawa_;
};
}
#endif /* HERWIG_SSCFSVertex_H */
diff --git a/Models/Susy/SSCNWVertex.h b/Models/Susy/SSCNWVertex.h
--- a/Models/Susy/SSCNWVertex.h
+++ b/Models/Susy/SSCNWVertex.h
@@ -1,165 +1,165 @@
// -*- C++ -*-
//
// SSCNWVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSCNWVertex_H
#define HERWIG_SSCNWVertex_H
//
// This is the declaration of the SSCNWVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "SusyBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class is implements the coupling of a W boson to a chargino and a
* neutralino. It inherits from FFVVertex and implements the setCoupling method.
*
* @see \ref SSCNWVertexInterfaces "The interfaces"
* defined for SSCNWVertex.
* @see FFVVertex
*/
class SSCNWVertex: public FFVVertex {
public:
/**
* The default constructor.
*/
SSCNWVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSCNWVertex & operator=(const SSCNWVertex &);
+ SSCNWVertex & operator=(const SSCNWVertex &) = delete;
private:
/**
* Store \f$sin(\theta_W)\f$
*/
double _sw;
/**
* Store the neutralino mixing matrix
*/
tMixingMatrixPtr _theN;
/**
* Store the U-type chargino mixing matrix
*/
tMixingMatrixPtr _theU;
/**
* Store the V-type chargino mixing matrix
*/
tMixingMatrixPtr _theV;
/**
* The value of the coupling when it was last evaluated
*/
Complex _couplast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* The id of the first chargino the last time the vertex was evaluated
*/
long _id1last;
/**
* The id of the second chargino the last time the vertex was evaluated
*/
long _id2last;
/**
* The value of the left coupling when it was last evaluated
*/
Complex _leftlast;
/**
* The value of the right coupling when it was last evaluated
*/
Complex _rightlast;
};
}
#endif /* HERWIG_SSCNWVertex_H */
diff --git a/Models/Susy/SSFFHVertex.h b/Models/Susy/SSFFHVertex.h
--- a/Models/Susy/SSFFHVertex.h
+++ b/Models/Susy/SSFFHVertex.h
@@ -1,171 +1,171 @@
// -*- C++ -*-
//
// SSFFHVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSFFHVertex_H
#define HERWIG_SSFFHVertex_H
//
// This is the declaration of the SSFFHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "MSSM.h"
namespace Herwig {
/**
* The is the coupling of higgs bosons in the MSSM to a pair
* of SM fermions.
*
* @see \ref SSFFHVertexInterfaces "The interfaces"
* defined for SSFFHVertex.
*/
class SSFFHVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
SSFFHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSFFHVertex & operator=(const SSFFHVertex &);
+ SSFFHVertex & operator=(const SSFFHVertex &) = delete;
private:
/**
* Pointer to the SM object.
*/
tcMSSMPtr theMSSM;
/**
* The value of \f$\tan\beta\f$.
*/
double thetanb;
/**
* The mass of the \f$W\f$.
*/
Energy theMw;
/**
* The value of \f$\sin\theta_W\f$
*/
double theSw;
/**
* The value of \f$\sin\alpha\f$
*/
double theSa;
/**
* The value of \f$\sin\beta\f$
*/
double theSb;
/**
* The value of \f$\cos\alpha\f$
*/
double theCa;
/**
* The value of \f$\cos\beta\f$
*/
double theCb;
/**
* The ID of the last fermion for which the vertex was evaluated
*/
pair<long,long> theFLast;
/**
* The value of \f$ \frac{e}{\sin\theta_W} \f$ when it was last evaluated.
*/
double theGlast;
/**
* The scale at which then coupling was last evaluated.
*/
Energy2 theq2last;
/**
* Values of the masses
*/
pair<Energy,Energy> theMassLast;
};
}
#endif /* HERWIG_SSFFHVertex_H */
diff --git a/Models/Susy/SSGFSVertex.h b/Models/Susy/SSGFSVertex.h
--- a/Models/Susy/SSGFSVertex.h
+++ b/Models/Susy/SSGFSVertex.h
@@ -1,158 +1,158 @@
// -*- C++ -*-
//
// SSGFSVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSGFSVertex_H
#define HERWIG_SSGFSVertex_H
//
// This is the declaration of the SSGFSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the coupling of a gluino to a squark-
* quark pair. It inherits from FFSVertex and implements the setCoupling
* method.
*
* @see FFSVertex
*/
class SSGFSVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
SSGFSVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
/**
* Pointer to the stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Pointer to the _sbottom mixing matrix
*/
tMixingMatrixPtr _sbottom;
/**
* Gluino Phase
*/
Complex gluinoPhase_;
/**
* The scale at which the coupling was last evaluated;
*/
Energy2 _q2last;
/**
* The value of the coupling when it was last evaluated
*/
Complex _couplast;
/**
* The id of the sm fermion for which the coupling was evaluated
*/
long _id1last;
/**
* The id of the scalar for which the coupling was evaluated
*/
long _id2last;
/**
* The value of the left coupling when it was last evaluated
*/
Complex _leftlast;
/**
* The value of the right coupling when it was last evaluated
*/
Complex _rightlast;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGFSVertex & operator=(const SSGFSVertex &);
+ SSGFSVertex & operator=(const SSGFSVertex &) = delete;
};
}
#endif /* HERWIG_SSGFSVertex_H */
diff --git a/Models/Susy/SSGGSQSQVertex.h b/Models/Susy/SSGGSQSQVertex.h
--- a/Models/Susy/SSGGSQSQVertex.h
+++ b/Models/Susy/SSGGSQSQVertex.h
@@ -1,110 +1,110 @@
// -*- C++ -*-
//
// SSGGSQSQVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSGGSQSQVertex_H
#define HERWIG_SSGGSQSQVertex_H
//
// This is the declaration of the SSGGSQSQVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
#include "SusyBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the 4 point gluon-gluon-squark-squark
* vertex. It inherits from VVSSVertex and implements the setCouopling
* method.
*
* @see VVSSVertex
*/
class SSGGSQSQVertex: public VVSSVertex {
public:
/**
* The default constructor.
*/
SSGGSQSQVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3,tcPDPtr part4);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGGSQSQVertex & operator=(const SSGGSQSQVertex &);
+ SSGGSQSQVertex & operator=(const SSGGSQSQVertex &) = delete;
private:
/**
* The energy at which the coupling was last evaluated
*/
Energy2 q2last_;
/**
* The coupling when it was last evaluated
*/
Complex couplast_;
};
}
#endif /* HERWIG_SSGGSQSQVertex_H */
diff --git a/Models/Susy/SSGNGVertex.h b/Models/Susy/SSGNGVertex.h
--- a/Models/Susy/SSGNGVertex.h
+++ b/Models/Susy/SSGNGVertex.h
@@ -1,223 +1,223 @@
// -*- C++ -*-
//
// SSGNGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSGNGVertex_H
#define HERWIG_SSGNGVertex_H
//
// This is the declaration of the SSGNGVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/GeneralFFVVertex.h"
#include "Herwig/Models/Susy/MSSM.h"
#include "Herwig/Models/Susy/MixingMatrix.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a gluon to a gluino and a neutralino
* via loop diagrams
* It inherits from GeneralFFVertex and implements the setCoupling method.
*
* @see \ref SSGNGVertexInterfaces "The interfaces"
* defined for SSGNGVertex.
* @see FFVertex
*/
class SSGNGVertex: public GeneralFFVVertex {
public:
/**
* The default constructor.
*/
SSGNGVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Evaluate the loop integrals
*/
void loopIntegrals(Energy Mi, Energy Mj, Energy M, Energy m,
complex<InvEnergy2> & I, complex<InvEnergy2> & J,
complex<InvEnergy2> & K, complex<InvEnergy2> & I2);
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGNGVertex & operator=(const SSGNGVertex &);
+ SSGNGVertex & operator=(const SSGNGVertex &) = delete;
private:
/**
* Whether of not to include on-shell intermediate states
*/
bool _includeOnShell;
/**
* Only include the real part of the integral
*/
bool _realIntegral;
/**
* Option to omit light quark yukawas
*/
bool _omitLightQuarkYukawas;
/**
* Pointer to the stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Pointer to the sbottom mixing matrix
*/
tMixingMatrixPtr _sbot;
/**
* The value of \f$sin(\theta_W)\f$
*/
double _sw;
/**
* The value of \f$cos(\theta_W)\f$
*/
double _cw;
/**
* Mass of the W
*/
Energy _mw;
/**
* \f$\sin(\beta)\f$
*/
double _sb;
/**
* \f$\cos(\beta)\f$
*/
double _cb;
/**
* Store the neutralino mixing matrix
*/
tMixingMatrixPtr _theN;
/**
* Store the id of the neutralino when the coupling was last evaluated
*/
long _idlast;
/**
* Store the value at which the coupling when it was last evaluated
*/
Energy2 _q2last;
/**
* Store the value of the coupling when it was last evaluated
*/
Complex _couplast;
/**
* Store the value of the left-coupling when it was last evaluated
*/
complex<InvEnergy> _leftlast;
/**
* Store the value of the right-coupling when it was last evaluated
*/
complex<InvEnergy> _rightlast;
/**
* Whether or not initialised
*/
bool _initLoops;
};
}
#endif /* HERWIG_SSGNGVertex_H */
diff --git a/Models/Susy/SSGOGOHVertex.h b/Models/Susy/SSGOGOHVertex.h
--- a/Models/Susy/SSGOGOHVertex.h
+++ b/Models/Susy/SSGOGOHVertex.h
@@ -1,204 +1,204 @@
// -*- C++ -*-
//
// SSGOGOHVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSGOGOHVertex_H
#define HERWIG_SSGOGOHVertex_H
//
// This is the declaration of the SSGOGOHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "MSSM.h"
namespace Herwig {
/**
* The is the coupling of higgs bosons in the MSSM to a pair
* of SM fermions.
*
* @see \ref SSGOGOHVertexInterfaces "The interfaces"
* defined for SSGOGOHVertex.
*/
class SSGOGOHVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
SSGOGOHVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGOGOHVertex & operator=(const SSGOGOHVertex &);
+ SSGOGOHVertex & operator=(const SSGOGOHVertex &) = delete;
private:
/**
* The mass of the \f$W\f$.
*/
Energy theMw;
/**
* The matrix \f$S_{ij}\f$
*/
vector<vector<Complex> > theSij;
/**
* The matrix \f$Q_{ij}\f$
*/
vector<vector<Complex> > theQij;
/**
* The matrix \f$Q_{ij}^{L'}\f$
*/
vector<vector<Complex> > theQijLp;
/**
* The matrix \f$Q_{ij}^{R'}\f$
*/
vector<vector<Complex> > theQijRp;
/**
* The matrix \f$S_{ij}^{''}\f$
*/
vector<vector<Complex> > theSijdp;
/**
* The matrix \f$Q_{ij}^{''}\f$
*/
vector<vector<Complex> > theQijdp;
/**
* The value of \f$\sin\alpha\f$
*/
double theSa;
/**
* The value of \f$\sin\beta\f$
*/
double theSb;
/**
* The value of \f$\cos\alpha\f$
*/
double theCa;
/**
* The value of \f$\cos\beta\f$
*/
double theCb;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCoupLast;
/**
* The value of the left-coupling when it was last evaluated.
*/
Complex theLLast;
/**
* The value of the right-coupling when it was last evaluated.
*/
Complex theRLast;
/**
* The ID of the last higgs for which the vertex was evaluated
*/
long theHLast;
/**
* The ID of the first gaugino when the coupling was las evaluated
*/
long theID1Last;
/**
* The ID of the first gaugino when the coupling was las evaluated
*/
long theID2Last;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 theq2last;
};
}
#endif /* HERWIG_SSGOGOHVertex_H */
diff --git a/Models/Susy/SSGSGSGVertex.h b/Models/Susy/SSGSGSGVertex.h
--- a/Models/Susy/SSGSGSGVertex.h
+++ b/Models/Susy/SSGSGSGVertex.h
@@ -1,106 +1,106 @@
// -*- C++ -*-
//
// SSGSGSGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSGSGSGVertex_H
#define HERWIG_SSGSGSGVertex_H
//
// This is the declaration of the SSGSGSGVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "SusyBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the g-\f$\tilde{g}\f$-\f$\tilde{g}\f$ vertex. It
* inherits from FFVVertex and implements the setCoupling virtual method.
*
* @see FFVVertex
*/
class SSGSGSGVertex: public FFVVertex {
public:
/**
* The default constructor.
*/
SSGSGSGVertex();
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGSGSGVertex & operator=(const SSGSGSGVertex &);
+ SSGSGSGVertex & operator=(const SSGSGSGVertex &) = delete;
private:
/**
* The value of the coupling when last evaluated
*/
Complex _couplast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 _q2last;
};
}
#endif /* HERWIG_SSGSGSGVertex_H */
diff --git a/Models/Susy/SSGSSVertex.h b/Models/Susy/SSGSSVertex.h
--- a/Models/Susy/SSGSSVertex.h
+++ b/Models/Susy/SSGSSVertex.h
@@ -1,106 +1,106 @@
// -*- C++ -*-
//
// SSGSSVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSGSSVertex_H
#define HERWIG_SSGSSVertex_H
//
// This is the declaration of the SSGSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "SusyBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SSGSSVertex implements the coupling of a gluon to 2 sfermions.
* It inherits from VSSVertex and implements the setCoupling method.
*
* @see VSSVertex
*/
class SSGSSVertex: public VSSVertex {
public:
/**
* The default constructor.
*/
SSGSSVertex();
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGSSVertex & operator=(const SSGSSVertex &);
+ SSGSSVertex & operator=(const SSGSSVertex &) = delete;
private:
/**
* Store the value of the coupling when last evaluated
*/
Complex _couplast;
/**
* Store the scale at which coupling was last evaluated
*/
Energy2 _q2last;
};
}
#endif /* HERWIG_SSGSSVertex_H */
diff --git a/Models/Susy/SSGVFSVertex.h b/Models/Susy/SSGVFSVertex.h
--- a/Models/Susy/SSGVFSVertex.h
+++ b/Models/Susy/SSGVFSVertex.h
@@ -1,133 +1,133 @@
// -*- C++ -*-
//
// SSGVFSVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSGVFSVertex_H
#define HERWIG_SSGVFSVertex_H
//
// This is the declaration of the SSGVFSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/RFSVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the coupling of the gravitino to
* fermion-sfermions. It inherits from RFSVertex and implements the
* virtual setCoupling() method.
*
* @see RFSVertex
*/
class SSGVFSVertex: public RFSVertex {
public:
/**
* The default constructor.
*/
SSGVFSVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGVFSVertex & operator=(const SSGVFSVertex &);
+ SSGVFSVertex & operator=(const SSGVFSVertex &) = delete;
/**
* Pointer to the stop mixing matrix
*/
tMixingMatrixPtr stop_;
/**
* Pointer to the sbottom mixing matrix
*/
tMixingMatrixPtr sbot_;
/**
* Pointer to the stau mixing matrix
*/
tMixingMatrixPtr stau_;
/**
* The Planck mass
*/
Energy MPlanck_;
};
}
#endif /* HERWIG_SSGVFSVertex_H */
diff --git a/Models/Susy/SSGVNHVertex.h b/Models/Susy/SSGVNHVertex.h
--- a/Models/Susy/SSGVNHVertex.h
+++ b/Models/Susy/SSGVNHVertex.h
@@ -1,139 +1,139 @@
// -*- C++ -*-
#ifndef HERWIG_SSGVNHVertex_H
#define HERWIG_SSGVNHVertex_H
//
// This is the declaration of the SSGVNHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/RFSVertex.h"
#include "MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SSGVNHVertex class implements the coupling of the gravitino to
* a neutralino and Higgs boson.
*
* @see \ref SSGVNHVertexInterfaces "The interfaces"
* defined for SSGVNHVertex.
*/
class SSGVNHVertex: public Helicity::RFSVertex {
public:
/**
* The default constructor.
*/
SSGVNHVertex();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGVNHVertex & operator=(const SSGVNHVertex &);
+ SSGVNHVertex & operator=(const SSGVNHVertex &) = delete;
private:
/**
* The value of \f$\sin\alpha\f$
*/
double sa_;
/**
* The value of \f$\sin\beta\f$
*/
double sb_;
/**
* The value of \f$\cos\alpha\f$
*/
double ca_;
/**
* The value of \f$\cos\beta\f$
*/
double cb_;
/**
* Pointer to the neutralino mixing matrix
*/
tMixingMatrixPtr nmix_;
/**
* The Planck mass
*/
Energy MPlanck_;
};
}
#endif /* HERWIG_SSGVNHVertex_H */
diff --git a/Models/Susy/SSGVNVVertex.cc b/Models/Susy/SSGVNVVertex.cc
--- a/Models/Susy/SSGVNVVertex.cc
+++ b/Models/Susy/SSGVNVVertex.cc
@@ -1,120 +1,120 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SSGVNVVertex class.
//
#include "SSGVNVVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "MSSM.h"
using namespace Herwig;
SSGVNVVertex::SSGVNVVertex() : sw_(0.), cw_(0.), sb_(0.), cb_(0.),
mz_(91.1876*GeV), MPlanck_(2.4e18*GeV) {
orderInGem(1);
orderInGs(0);
colourStructure(ColourStructure::SINGLET);
}
IBPtr SSGVNVVertex::clone() const {
return new_ptr(*this);
}
IBPtr SSGVNVVertex::fullclone() const {
return new_ptr(*this);
}
void SSGVNVVertex::persistentOutput(PersistentOStream & os) const {
os << sw_ << cw_ << sb_ << cb_ << ounit(mz_,GeV) << nmix_ << ounit(MPlanck_,GeV);
}
void SSGVNVVertex::persistentInput(PersistentIStream & is, int) {
is >> sw_ >> cw_ >> sb_ >> cb_ >> iunit(mz_,GeV) >> nmix_ >> iunit(MPlanck_,GeV);
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<SSGVNVVertex,Helicity::RFVVertex>
describeHerwigSSGVNVVertex("Herwig::SSGVNVVertex", "SSGVNVVertex.so");
void SSGVNVVertex::Init() {
static ClassDocumentation<SSGVNVVertex> documentation
("The SSGVNVVertex class implements the coupling of the gravitino"
" to the neutralino and a photon or Z boson, or the gluino and gluon.");
}
void SSGVNVVertex::doinit() {
long neu[4] = {ParticleID::SUSY_chi_10, ParticleID::SUSY_chi_20,
ParticleID::SUSY_chi_30, ParticleID::SUSY_chi_40};
for(unsigned int j = 0; j < 4; ++j) {
addToList(ParticleID::SUSY_Gravitino, neu[j], ParticleID::gamma);
addToList(ParticleID::SUSY_Gravitino, neu[j], ParticleID::Z0);
}
addToList(ParticleID::SUSY_Gravitino, ParticleID::SUSY_g, ParticleID::g);
RFVVertex::doinit();
tMSSMPtr model = dynamic_ptr_cast<tMSSMPtr>(generator()->standardModel());
if( !model )
throw InitException()
<< "SSGVNVVertex::doinit() - The pointer to the MSSM object is null!"
<< Exception::abortnow;
double tanb = model->tanBeta();
sb_ = tanb/sqrt(1. + sqr(tanb));
cb_ = sqrt( 1. - sqr(sb_) );
sw_ = sqrt(sin2ThetaW());
cw_ = sqrt(1. - sin2ThetaW());
nmix_ = model->neutralinoMix();
MPlanck_ = model->MPlanck();
}
void SSGVNVVertex::setCoupling(Energy2 ,
#ifndef NDEBUG
tcPDPtr part1,
#else
tcPDPtr,
#endif
tcPDPtr part2,tcPDPtr part3) {
assert(part1->id()==ParticleID::SUSY_Gravitino);
assert(part3->iSpin()==PDT::Spin1);
unsigned int neut = part2->id() - ParticleID::SUSY_chi_10;
if(neut>1) neut = ( neut == 13 ) ? 3 : 2;
int bid = part3->id();
Complex coup[2];
vector<Complex> lV,rV;
switch(bid) {
case ParticleID::gamma :
coup[0] = (*nmix_)(neut,0)*cw_+(*nmix_)(neut,1)*sw_;
lV.push_back(-coup[0]*part2->mass()*UnitRemoval::InvE);
lV.push_back( coup[0]);
lV.push_back(0.);
rV=lV;
break;
case ParticleID::Z0 :
coup[0] = -(*nmix_)(neut,0)*sw_+(*nmix_)(neut,1)*cw_;
coup[1] = -(*nmix_)(neut,2)*cb_+(*nmix_)(neut,3)*sb_;
lV.push_back((-coup[0]*part2->mass()-mz_*coup[1])*UnitRemoval::InvE);
lV.push_back( coup[0]);
lV.push_back(0.);
rV=lV;
- rV[0] = (-coup[0]*part2->mass()+mz_*coup[1])*UnitRemoval::InvE;
+ rV[0] = Complex((-coup[0]*part2->mass()+mz_*coup[1])*UnitRemoval::InvE);
break;
case ParticleID::g :
lV.push_back(-double(part2->mass()*UnitRemoval::InvE));
lV.push_back(1.);
lV.push_back(0.);
rV=lV;
break;
default :
assert(false);
}
left (lV);
right(rV);
norm(double(1./MPlanck_*UnitRemoval::E));
}
diff --git a/Models/Susy/SSGVNVVertex.h b/Models/Susy/SSGVNVVertex.h
--- a/Models/Susy/SSGVNVVertex.h
+++ b/Models/Susy/SSGVNVVertex.h
@@ -1,146 +1,146 @@
// -*- C++ -*-
#ifndef HERWIG_SSGVNVVertex_H
#define HERWIG_SSGVNVVertex_H
//
// This is the declaration of the SSGVNVVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/RFVVertex.h"
#include "MixingMatrix.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SSGVNVVertex class implements the coupling of the gravitino
* to a gaugino and the assoicated gauge boson.
*
* @see \ref SSGVNVVertexInterfaces "The interfaces"
* defined for SSGVNVVertex.
*/
class SSGVNVVertex: public Helicity::RFVVertex {
public:
/**
* The default constructor.
*/
SSGVNVVertex();
/**
* Calculate the couplings. This method is virtual and must be implemented in
* classes inheriting from this.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSGVNVVertex & operator=(const SSGVNVVertex &);
+ SSGVNVVertex & operator=(const SSGVNVVertex &) = delete;
private:
/**
* \f$\sin\theta_W\f$
*/
double sw_;
/**
* \f$\sin\theta_W\f$
*/
double cw_;
/**
* The value of \f$\sin\beta\f$
*/
double sb_;
/**
* The value of \f$\cos\beta\f$
*/
double cb_;
/**
* The Z mass
*/
Energy mz_;
/**
* Pointer to the neutralino mixing matrix
*/
tMixingMatrixPtr nmix_;
/**
* The Planck mass
*/
Energy MPlanck_;
};
}
#endif /* HERWIG_SSGVNVVertex_H */
diff --git a/Models/Susy/SSHGGVertex.cc b/Models/Susy/SSHGGVertex.cc
--- a/Models/Susy/SSHGGVertex.cc
+++ b/Models/Susy/SSHGGVertex.cc
@@ -1,293 +1,293 @@
// -*- C++ -*-
//
// SSHGGVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SSHGGVertex class.
//
#include "SSHGGVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/Looptools/clooptools.h"
#include <cassert>
using namespace ThePEG::Helicity;
using namespace Herwig;
SSHGGVertex::SSHGGVertex() : theIncludeTriLinear(true),
thePseudoScalarTreatment(false),
theSw(0.), theMw(), theZfact(),
theQt1L(0.), theQt1R(0.), theQt1LR(0.),
theQt2L(0.), theQt2R(0.), theQt2LR(0.),
theQb1L(0.), theQb1R(0.), theQb1LR(0.),
theQb2L(0.), theQb2R(0.), theQb2LR(0.),
theSqmass(4,ZERO),
theTanB(0.),theSinA(0.),
theCosA(0.), theSinB(0.), theCosB(0.),
theSinApB(0.), theCosApB(0.), theCouplast(0.),
theq2last(), theHaveCoeff(false), theLastID(0) {
orderInGs(2);
orderInGem(1);
colourStructure(ColourStructure::DELTA);
}
void SSHGGVertex::doinit() {
//PDG codes for particles at vertices
addToList(21,21,25);
addToList(21,21,35);
addToList(21,21,36);
theMSSM = dynamic_ptr_cast<tMSSMPtr>(generator()->standardModel());
if( !theMSSM )
throw InitException()
<< "SSHGGVertex::doinit() - The pointer to the MSSM object is null!"
<< Exception::abortnow;
theMw = getParticleData(ParticleID::Wplus)->mass();
thetop = getParticleData(ParticleID::t);
thebot = getParticleData(ParticleID::b);
theSw = sqrt(sin2ThetaW());
theZfact = getParticleData(ParticleID::Wplus)->mass()/(1. - sqr(theSw));
theSinA = sin(theMSSM->higgsMixingAngle());
theCosA = sqrt(1. - sqr(theSinA));
theTanB = theMSSM->tanBeta();
theSinB = theTanB/sqrt(1. + sqr(theTanB));
theCosB = sqrt( 1. - sqr(theSinB) );
theSinApB = theSinA*theCosB + theCosA*theSinB;
theCosApB = theCosA*theCosB - theSinA*theSinB;
MixingMatrixPtr stop = theMSSM->stopMix();
MixingMatrixPtr sbot = theMSSM->sbottomMix();
theQt1L = (*stop)(0,0)*(*stop)(0,0);
theQt1R = (*stop)(0,1)*(*stop)(0,1);
theQt1LR = (*stop)(0,1)*(*stop)(0,0) + (*stop)(0,1)*(*stop)(0,0);
theQt2L = (*stop)(1,0)*(*stop)(1,0);
theQt2R = (*stop)(1,1)*(*stop)(1,1);
theQt2LR = (*stop)(1,1)*(*stop)(1,0) + (*stop)(1,0)*(*stop)(1,1);
theQb1L = (*sbot)(0,0)*(*sbot)(0,0);
theQb1R = (*sbot)(0,1)*(*sbot)(0,1);
theQb1LR = (*sbot)(0,1)*(*sbot)(0,0) + (*sbot)(0,1)*(*sbot)(0,0);
theQb2L = (*sbot)(1,0)*(*sbot)(1,0);
theQb2R = (*sbot)(1,1)*(*sbot)(1,1);
theQb2LR = (*sbot)(1,1)*(*sbot)(1,0) + (*sbot)(1,0)*(*sbot)(1,1);
assert( theSqmass.size() == 4 );
theSqmass[0] = getParticleData(ParticleID::SUSY_b_1)->mass();
theSqmass[1] = getParticleData(ParticleID::SUSY_t_1)->mass();
theSqmass[2] = getParticleData(ParticleID::SUSY_b_2)->mass();
theSqmass[3] = getParticleData(ParticleID::SUSY_t_2)->mass();
VVSLoopVertex::doinit();
if(loopToolsInitialized()) Looptools::ltexi();
}
void SSHGGVertex::persistentOutput(PersistentOStream & os) const {
os << theMSSM << theSw << ounit(theMw,GeV) << ounit(theZfact,GeV)
<< theQt1L << theQt1R << theQt1LR << theQt2L << theQt2R << theQt2LR
<< theQb1L << theQb1R << theQb1LR << theQb2L << theQb2R << theQb2LR
<< thetop << thebot << theTanB << theIncludeTriLinear
<< theSinA << theCosA << theSinB << theCosB << theSinApB << theCosApB
<< ounit(theSqmass, GeV) << thePseudoScalarTreatment;
}
void SSHGGVertex::persistentInput(PersistentIStream & is, int) {
is >> theMSSM >> theSw >> iunit(theMw,GeV) >> iunit(theZfact,GeV)
>> theQt1L >> theQt1R >> theQt1LR >> theQt2L >> theQt2R >> theQt2LR
>> theQb1L >> theQb1R >> theQb1LR >> theQb2L >> theQb2R >> theQb2LR
>> thetop >> thebot >> theTanB >> theIncludeTriLinear
>> theSinA >> theCosA >> theSinB >> theCosB >> theSinApB >> theCosApB
>> iunit(theSqmass, GeV) >> thePseudoScalarTreatment;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<SSHGGVertex,VVSLoopVertex>
describeHerwigSSHGGVertex("Herwig::SSHGGVertex", "HwSusy.so");
void SSHGGVertex::Init() {
static ClassDocumentation<SSHGGVertex> documentation
("This class implements the higgs-gluon-gluon effective "
"vertex in the MSSM including stop, sbottom and top quarks "
"loops.");
static Switch<SSHGGVertex,bool> interfaceIncludeTriLinear
("IncludeTriLinear",
"Whether or not to include the A term squark trilinear couplings",
&SSHGGVertex::theIncludeTriLinear, true, false, false);
static SwitchOption interfaceIncludeTriLinearYes
(interfaceIncludeTriLinear,
"Yes",
"Include them",
true);
static SwitchOption interfaceIncludeTriLinearNo
(interfaceIncludeTriLinear,
"No",
"Don't include them",
false);
static Switch<SSHGGVertex,bool> interfacePseudoScalarTreatment
("PseudoScalarTreatment",
"Whether to treat the pseudoscalar as pseudoscalar or scalar, for testing only",
&SSHGGVertex::thePseudoScalarTreatment, false, false, false);
static SwitchOption interfacePseudoScalarTreatmentPseudoScalar
(interfacePseudoScalarTreatment,
"PseudoScalar",
"Treat as a pseudoscalar, the right physics",
false);
static SwitchOption interfacePseudoScalarTreatmentScalar
(interfacePseudoScalarTreatment,
"Scalar",
"Treat as a scalar for testing",
true);
}
void SSHGGVertex::setCoupling(Energy2 q2, tcPDPtr particle2,
tcPDPtr particle3, tcPDPtr particle1) {
long higgs(abs(particle1->id()));
assert( higgs == ParticleID::h0 || higgs == ParticleID::H0 ||
higgs == ParticleID::A0 );
assert(particle2->id() == ParticleID::g && particle3->id() == ParticleID::g );
if( q2 != theq2last || theCouplast == 0. || higgs != theLastID ) {
Looptools::clearcache();
theCouplast = weakCoupling(q2)*sqr(strongCoupling(q2));
Energy mt = theMSSM->mass(q2, thetop);
Energy mb = theMSSM->mass(q2, thebot);
masses.clear();
type.clear();
if( higgs == ParticleID::h0 || higgs == ParticleID::H0 ) {
setNParticles(6);
masses.insert(masses.begin(), theSqmass.begin(), theSqmass.end());
masses.push_back(mt);
masses.push_back(mb);
type.resize(6, PDT::Spin0);
type[4] = PDT::Spin1Half;
type[5] = PDT::Spin1Half;
couplings.resize(6, make_pair(0., 0.));
complex<Energy> brac1 = theZfact*(0.5 + theMSSM->ed()*sqr(theSw));
complex<Energy> brac2 = theZfact*(0.5 - theMSSM->eu()*sqr(theSw));
complex<Energy> brac3 = theZfact*theMSSM->ed()*sqr(theSw);
complex<Energy> brac4 = theZfact*theMSSM->eu()*sqr(theSw);
Energy Trib=theMSSM->bottomTrilinear().real();
Energy Trit=theMSSM->topTrilinear().real();
Energy theMu = theMSSM->muParameter();
if( higgs == ParticleID::h0 ) {
// lightest sbottom
complex<Energy> trilinear = theIncludeTriLinear ?
theQb1LR*0.5*mb/theMw*(Trib*theSinA + theMu*theCosA)/theCosB : Energy();
Complex coup = 0.5*UnitRemoval::InvE*
(theQb1L *( sqr(mb)*theSinA/theMw/theCosB - theSinApB*brac1) +
theQb1R *( sqr(mb)*theSinA/theMw/theCosB + theSinApB*brac3)+trilinear);
couplings[0] = make_pair(coup, coup);
// lightest stop
trilinear = theIncludeTriLinear ?
-theQt1LR*0.5*mt/theMw*(Trit*theCosA + theMu*theSinA)/theSinB : Energy();
- coup = 0.5*UnitRemoval::InvE*
- (theQt1L *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
- theQt1R *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4)+trilinear);
+ coup = Complex(0.5*UnitRemoval::InvE*
+ (theQt1L *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
+ theQt1R *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4)+trilinear));
couplings[1] = make_pair(coup, coup);
// heavier sbottom
trilinear = theIncludeTriLinear ?
theQb2LR*0.5*mb/theMw*(Trib*theSinA + theMu*theCosA)/theCosB : Energy();
- coup = 0.5*UnitRemoval::InvE*
- (theQb2L *( sqr(mb)*theSinA/theMw/theCosB - theSinApB*brac1) +
- theQb2R *( sqr(mb)*theSinA/theMw/theCosB + theSinApB*brac3)+trilinear);
+ coup = Complex(0.5*UnitRemoval::InvE*
+ (theQb2L *( sqr(mb)*theSinA/theMw/theCosB - theSinApB*brac1) +
+ theQb2R *( sqr(mb)*theSinA/theMw/theCosB + theSinApB*brac3)+trilinear));
couplings[2] = make_pair(coup, coup);
// heavier stop
trilinear = theIncludeTriLinear ?
-theQt2LR*0.5*mt/theMw*(Trit*theCosA + theMu*theSinA)/theSinB : Energy();
- coup = 0.5*UnitRemoval::InvE*
- (theQt2L *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
- theQt2R *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4)+trilinear);
+ coup = Complex(0.5*UnitRemoval::InvE*
+ (theQt2L *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
+ theQt2R *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4)+trilinear));
couplings[3] = make_pair(coup, coup);
// top
coup = -0.25*(mt*theCosA/theMw/theSinB);
couplings[4] = make_pair(coup, coup);
// bottom
coup = +0.25*(mb*theSinA/theMw/theCosB);
couplings[5] = make_pair(coup, coup);
}
else {
// lightest sbottom
complex<Energy> trilinear = theIncludeTriLinear ?
theQb1LR*0.5*mb/theMw*(theMu*theSinA - Trib*theCosA)/theCosB: Energy();
Complex coup = 0.5*UnitRemoval::InvE*
(theQb1L *( - sqr(mb)*theCosA/theMw/theCosB + theCosApB*brac1) +
theQb1R *( - sqr(mb)*theCosA/theMw/theCosB - theCosApB*brac3)+trilinear);
couplings[0] = make_pair(coup, coup);
// lightest stop
trilinear = theIncludeTriLinear ?
-theQt1LR*0.5*mt/theMw*(-theMu*theCosA + Trit*theSinA)/theSinB: Energy();
- coup = 0.5*UnitRemoval::InvE*
- (theQt1L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
- theQt1R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear);
+ coup = Complex(0.5*UnitRemoval::InvE*
+ (theQt1L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
+ theQt1R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear));
couplings[1] = make_pair(coup, coup);
// heavier sbottom
trilinear = theIncludeTriLinear ?
theQb2LR*0.5*mb/theMw*(theMu*theSinA - Trib*theCosA)/theCosB: Energy();
- coup = 0.5*UnitRemoval::InvE*
- (theQb2L *( - sqr(mb)*theCosA/theMw/theCosB + theCosApB*brac1) +
- theQb2R *( - sqr(mb)*theCosA/theMw/theCosB - theCosApB*brac3)+trilinear);
+ coup = Complex(0.5*UnitRemoval::InvE*
+ (theQb2L *( - sqr(mb)*theCosA/theMw/theCosB + theCosApB*brac1) +
+ theQb2R *( - sqr(mb)*theCosA/theMw/theCosB - theCosApB*brac3)+trilinear));
couplings[2] = make_pair(coup, coup);
// heavier stop
trilinear = theIncludeTriLinear ?
-theQt2LR*0.5*mt/theMw*(-theMu*theCosA + Trit*theSinA)/theSinB: Energy();
- coup = 0.5*UnitRemoval::InvE*
- (theQt2L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
- theQt2R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear);
+ coup = Complex(0.5*UnitRemoval::InvE*
+ (theQt2L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
+ theQt2R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear));
couplings[3] = make_pair(coup, coup);
// top
coup = -0.25*mt*theSinA/theMw/theSinB;
couplings[4] = make_pair(coup, coup);
// bottom
coup = -0.25*mb*theCosA/theMw/theCosB;
couplings[5] = make_pair(coup, coup);
}
}
else {
setNParticles(2);
masses.resize(2);
couplings.resize(2);
masses[0] = mt;
masses[1] = mb;
type.resize(2,PDT::Spin1Half);
Complex coup = 0.25*Complex(0., 1.)*mt/theMw/theTanB;
couplings[0] = make_pair(coup, thePseudoScalarTreatment ? coup : -coup);
coup = 0.25*Complex(0., 1.)*mb/theMw*theTanB;
couplings[1] = make_pair(coup, thePseudoScalarTreatment ? coup : -coup);
}
theq2last = q2;
theLastID = higgs;
theHaveCoeff = false;
}
norm(theCouplast);
//calculate tensor coefficients
if( !theHaveCoeff ) {
VVSLoopVertex::setCoupling(q2, particle2, particle3, particle1);
theHaveCoeff = true;
}
}
diff --git a/Models/Susy/SSHGGVertex.h b/Models/Susy/SSHGGVertex.h
--- a/Models/Susy/SSHGGVertex.h
+++ b/Models/Susy/SSHGGVertex.h
@@ -1,286 +1,286 @@
// -*- C++ -*-
//
// SSHGGVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSHGGVertex_H
#define HERWIG_SSHGGVertex_H
//
// This is the declaration of the SSHGGVertex class.
//
#include "Herwig/Models/General/VVSLoopVertex.h"
#include "MSSM.h"
namespace Herwig {
/**
* This class implements the effective vertex coupling a higgs
* to a pair of gluons in the MSSM. The loop include the stop and sbottom
* squarks and the top quark.
*
*
* @see \ref SSHGGVertexInterfaces "The interfaces"
* defined for SSHGGVertex.
*/
class SSHGGVertex: public VVSLoopVertex {
public:
/**
* The default constructor.
*/
SSHGGVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param particle1 ParticleData pointer to first particle
*@param particle2 ParticleData pointer to second particle
*@param particle3 ParticleData pointer to third particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSHGGVertex & operator=(const SSHGGVertex &);
+ SSHGGVertex & operator=(const SSHGGVertex &) = delete;
private:
/**
* Switch to turn off squark trilinear couplings via A terms for testing
*/
bool theIncludeTriLinear;
/**
* Treat the pseudoscalar as scalar for comparison with ISAJET
*/
bool thePseudoScalarTreatment;
/**
* A pointer to the MSSM object
*/
tMSSMPtr theMSSM;
/**
* Value of \f$\sin\theta_W\f$
*/
double theSw;
/**
* The mass of the \f$W\f$ boson.
*/
Energy theMw;
/**
* The factor \f$\frac{M_Z}{\cos\theta_W}\f$
*/
Energy theZfact;
/**
* The mixing matrix factor \f$Q^{2i}_{11}Q^{2i}_{11}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt1L;
/**
* The mixing matrix factor \f$Q^{2i}_{12}Q^{2i}_{12}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt1R;
/**
* The mixing matrix factor \f$Q^{2i}_{12}Q^{2i}_{12}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt1LR;
/**
* The mixing matrix factor \f$Q^{2i}_{21}Q^{2i}_{21}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt2L;
/**
* The mixing matrix factor \f$Q^{2i}_{22}Q^{2i}_{22}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt2R;
/**
* The mixing matrix factor \f$Q^{2i}_{22}Q^{2i}_{22}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt2LR;
/**
* The mixing matrix factor \f$Q^{2i-1}_{11}Q^{2i-1}_{11}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb1L;
/**
* The mixing matrix factor \f$Q^{2i-1}_{12}Q^{2i-1}_{12}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb1R;
/**
* The mixing matrix factor \f$Q^{2i-1}_{12}Q^{2i-1}_{12}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb1LR;
/**
* The mixing matrix factor \f$Q^{2i-1}_{21}Q^{2i-1}_{21}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb2L;
/**
* The mixing matrix factor \f$Q^{2i-1}_{22}Q^{2i-1}_{22}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb2R;
/**
* The mixing matrix factor \f$Q^{2i-1}_{22}Q^{2i-1}_{22}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb2LR;
/**
* A pointer to the top quark ParticleData object
*/
tPDPtr thetop;
/**
* A pointer to the bottom quark ParticleData object
*/
tPDPtr thebot;
/**
* The squark masses
*/
vector<Energy> theSqmass;
/**
* The value of \f$ \tan\beta \f$
*/
double theTanB;
/**
* The value of \f$ \sin\alpha \f$
*/
double theSinA;
/**
* The value of \f$ \cos\alpha \f$
*/
double theCosA;
/**
* The value of \f$ \sin\beta \f$
*/
double theSinB;
/**
* The value of \f$ \cos\beta \f$
*/
double theCosB;
/**
* The value of \f$ \sin(\alpha + \beta) \f$
*/
double theSinApB;
/**
* The value of \f$ \cos(\alpha + \beta) \f$
*/
double theCosApB;
/**
* Last value of the coupling calculated
*/
Complex theCouplast;
/**
* The scale \f$q^2\f$ at which coupling was last evaluated
*/
Energy2 theq2last;
/**
* Whether we have calculated the tensor coefficents yet
*/
bool theHaveCoeff;
/**
* ID of the higgs
*/
long theLastID;
};
}
#endif /* HERWIG_SSHGGVertex_H */
diff --git a/Models/Susy/SSHHHVertex.h b/Models/Susy/SSHHHVertex.h
--- a/Models/Susy/SSHHHVertex.h
+++ b/Models/Susy/SSHHHVertex.h
@@ -1,177 +1,177 @@
// -*- C++ -*-
//
// SSHHHVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSHHHVertex_H
#define HERWIG_SSHHHVertex_H
//
// This is the declaration of the SSHHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the higgs coupling with other higgs bosons in the MSSM.
*
* @see \ref SSHHHVertexInterfaces "The interfaces"
* defined for SSHHHVertex.
*/
class SSHHHVertex: public SSSVertex {
public:
/**
* The default constructor.
*/
SSHHHVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSHHHVertex & operator=(const SSHHHVertex &);
+ SSHHHVertex & operator=(const SSHHHVertex &) = delete;
private:
/**
* The mass of the \f$W\f$.
*/
Energy theMw;
/**
* The factor \f$ \frac{m_Z}{\sin2\theta_W} \f$
*/
Energy theZfact;
/**
* The value of \f$\sin\theta_W\f$
*/
double theSw;
/**
* The value of \f$ \sin(\beta + \alpha) \f$.
*/
double theSbpa;
/**
* The value of \f$ \cos(\beta + \alpha) \f$.
*/
double theCbpa;
/**
* The value of \f$ \sin(\beta - \alpha) \f$.
*/
double theSbma;
/**
* The value of \f$ \cos(\beta - \alpha) \f$.
*/
double theCbma;
/**
* The value of \f$ \sin 2\alpha \f$.
*/
double theS2a;
/**
* The value of \f$ \cos 2\alpha \f$.
*/
double theC2a;
/**
* The value of \f$ \sin 2\beta \f$.
*/
double theS2b;
/**
* The value of \f$ \cos 2\beta \f$.
*/
double theC2b;
/**
* The value of \f$ \sqrt{4\pi\alpha}\f$ when it was last evaluated.
*/
double theElast;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2last;
};
}
#endif /* HERWIG_SSHHHVertex_H */
diff --git a/Models/Susy/SSHPPVertex.cc b/Models/Susy/SSHPPVertex.cc
--- a/Models/Susy/SSHPPVertex.cc
+++ b/Models/Susy/SSHPPVertex.cc
@@ -1,634 +1,634 @@
// -*- C++ -*-
//
// SSHPPVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SSHPPVertex class.
//
#include "SSHPPVertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
#include <cassert>
#include "Herwig/Looptools/clooptools.h"
using namespace ThePEG::Helicity;
using namespace Herwig;
SSHPPVertex::SSHPPVertex() : theIncludeTriLinear(true),
thePseudoScalarTreatment(false),
theSw(0.), theMw(), theZfact(),
theQt1L(0.), theQt1R(0.), theQt1LR(0.),
theQt2L(0.), theQt2R(0.), theQt2LR(0.),
theQb1L(0.), theQb1R(0.), theQb1LR(0.),
theQb2L(0.), theQb2R(0.), theQb2LR(0.),
theLt1L(0.), theLt1R(0.), theLt1LR(0.),
theLt2L(0.), theLt2R(0.), theLt2LR(0.),
theSfmass(6,ZERO),
theTanB(0.),theSinA(0.),
theCosA(0.), theSinB(0.), theCosB(0.),
theSinApB(0.), theCosApB(0.),
theSinBmA(0.), theCosBmA(0.),
theCouplast(0.),
theq2last(), theHaveCoeff(false), theLastID(0) {
orderInGs(0);
orderInGem(3);
colourStructure(ColourStructure::SINGLET);
}
void SSHPPVertex::persistentOutput(PersistentOStream & os) const {
os << theMSSM << theSw << ounit(theMw,GeV) << ounit(theZfact,GeV)
<< theQt1L << theQt1R << theQt1LR << theQt2L << theQt2R << theQt2LR
<< theQb1L << theQb1R << theQb1LR << theQb2L << theQb2R << theQb2LR
<< theLt1L << theLt1R << theLt1LR << theLt2L << theLt2R << theLt2LR
<< thetop << thebot << thetau << theTanB << theIncludeTriLinear
<< theSinA << theCosA << theSinB << theCosB << theSinApB << theCosApB
<< theSinBmA << theCosBmA << thePseudoScalarTreatment
<< ounit(theSfmass, GeV) << theU << theV;
}
void SSHPPVertex::persistentInput(PersistentIStream & is, int) {
is >> theMSSM >> theSw >> iunit(theMw,GeV) >> iunit(theZfact,GeV)
>> theQt1L >> theQt1R >> theQt1LR >> theQt2L >> theQt2R >> theQt2LR
>> theQb1L >> theQb1R >> theQb1LR >> theQb2L >> theQb2R >> theQb2LR
>> theLt1L >> theLt1R >> theLt1LR >> theLt2L >> theLt2R >> theLt2LR
>> thetop >> thebot >> thetau >> theTanB >> theIncludeTriLinear
>> theSinA >> theCosA >> theSinB >> theCosB >> theSinApB >> theCosApB
>> theSinBmA >> theCosBmA >> thePseudoScalarTreatment
>> iunit(theSfmass, GeV) >> theU >> theV;
}
// The following static variable is needed for the type
// description system in ThePEG.
DescribeClass<SSHPPVertex,VVSLoopVertex>
describeHerwigSSHPPVertex("Herwig::SSHPPVertex", "HwSusy.so");
void SSHPPVertex::Init() {
static ClassDocumentation<SSHPPVertex> documentation
("This class implements the higgs-gluon-gluon effective "
"vertex in the MSSM including stop, sbottom and top quarks "
"loops.");
static Switch<SSHPPVertex,bool> interfaceIncludeTriLinear
("IncludeTriLinear",
"Whether or not to include the A term squark trilinear couplings",
&SSHPPVertex::theIncludeTriLinear, true, false, false);
static SwitchOption interfaceIncludeTriLinearYes
(interfaceIncludeTriLinear,
"Yes",
"Include them",
true);
static SwitchOption interfaceIncludeTriLinearNo
(interfaceIncludeTriLinear,
"No",
"Don't include them",
false);
static Switch<SSHPPVertex,bool> interfacePseudoScalarTreatment
("PseudoScalarTreatment",
"Whether to treat the pseudoscalar as pseudoscalar or scalar, for testing only",
&SSHPPVertex::thePseudoScalarTreatment, false, false, false);
static SwitchOption interfacePseudoScalarTreatmentPseudoScalar
(interfacePseudoScalarTreatment,
"PseudoScalar",
"Treat as a pseudoscalar, the right physics",
false);
static SwitchOption interfacePseudoScalarTreatmentScalar
(interfacePseudoScalarTreatment,
"Scalar",
"Treat as a scalar for testing",
true);
}
void SSHPPVertex::setCoupling(Energy2 q2, tcPDPtr particle2,
tcPDPtr particle3, tcPDPtr particle1) {
long higgs(abs(particle1->id()));
// check allowed
assert ( higgs == ParticleID::h0 || higgs == ParticleID::H0 ||
higgs == ParticleID::A0 );
assert(particle2->id() == ParticleID::gamma &&
particle3->id() == ParticleID::gamma );
// couplings
if( q2 != theq2last || theCouplast == 0. || higgs != theLastID ) {
Looptools::clearcache();
theCouplast = sqr(electroMagneticCoupling(q2))*weakCoupling(q2);
Energy mt = theMSSM->mass(q2, thetop);
Energy mb = theMSSM->mass(q2, thebot);
Energy mtau = theMSSM->mass(q2, thetau);
masses.clear();
type.clear();
if( higgs == ParticleID::h0 || higgs == ParticleID::H0 ) {
setNParticles(13);
masses.insert(masses.begin(), theSfmass.begin(), theSfmass.end());
masses.push_back(mt);
masses.push_back(mb);
masses.push_back(mtau);
masses.push_back(getParticleData(ParticleID::Hplus)->mass());
masses.push_back(theMw);
masses.push_back(getParticleData(ParticleID::SUSY_chi_1plus)->mass());
masses.push_back(getParticleData(ParticleID::SUSY_chi_2plus)->mass());
type.resize(13, PDT::Spin0);
type[6] = PDT::Spin1Half;
type[7] = PDT::Spin1Half;
type[8] = PDT::Spin1Half;
type[9] = PDT::Spin0;
type[10] = PDT::Spin1;
type[11] = PDT::Spin1Half;
type[12] = PDT::Spin1Half;
couplings.resize(13, make_pair(0., 0.));
complex<Energy> brac1 = theZfact*(0.5 + theMSSM->ed()*sqr(theSw));
complex<Energy> brac2 = theZfact*(0.5 - theMSSM->eu()*sqr(theSw));
complex<Energy> brac3 = theZfact*theMSSM->ed()*sqr(theSw);
complex<Energy> brac4 = theZfact*theMSSM->eu()*sqr(theSw);
complex<Energy> brac5 = theZfact*(0.5 + theMSSM->ee()*sqr(theSw));
complex<Energy> brac6 = theZfact*theMSSM->ee()*sqr(theSw);
Energy Trib=theMSSM->bottomTrilinear().real();
Energy Trit=theMSSM->topTrilinear().real();
Energy Trita=theMSSM->tauTrilinear().real();
Energy theMu = theMSSM->muParameter();
if( higgs == ParticleID::h0 ) {
// lightest sbottom
complex<Energy> trilinear = theIncludeTriLinear ?
theQb1LR*0.5*mb/theMw*(Trib*theSinA + theMu*theCosA)/theCosB : Energy();
Complex coup = 3.*UnitRemoval::InvE*sqr(theMSSM->ed())*
(theQb1L *( sqr(mb)*theSinA/theMw/theCosB - theSinApB*brac1) +
theQb1R *( sqr(mb)*theSinA/theMw/theCosB + theSinApB*brac3) +
trilinear);
couplings[0] = make_pair(coup, coup);
// lightest stop
trilinear = theIncludeTriLinear ?
theQt1LR*0.5*mt/theMw*(Trit*theCosA + theMu*theSinA)/theSinB : Energy();
- coup = 3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
- (theQt1L *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
- theQt1R *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4) -
- trilinear);
+ coup = Complex(3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
+ (theQt1L *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
+ theQt1R *( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4) -
+ trilinear));
couplings[1] = make_pair(coup, coup);
// lightest stau
trilinear = theIncludeTriLinear ?
theLt1LR*0.5*mtau/theMw*(Trita*theSinA + theMu*theCosA)/theCosB : Energy();
- coup = UnitRemoval::InvE*sqr(theMSSM->ee())*
- (theLt1L *( sqr(mtau)*theSinA/theMw/theCosB - theSinApB*brac5) +
- theLt1R *( sqr(mtau)*theSinA/theMw/theCosB + theSinApB*brac6) +
- trilinear);
+ coup = Complex(UnitRemoval::InvE*sqr(theMSSM->ee())*
+ (theLt1L *( sqr(mtau)*theSinA/theMw/theCosB - theSinApB*brac5) +
+ theLt1R *( sqr(mtau)*theSinA/theMw/theCosB + theSinApB*brac6) +
+ trilinear));
couplings[2] = make_pair(coup, coup);
// heavier sbottom
trilinear = theIncludeTriLinear ?
theQb2LR*0.5*mb/theMw*(Trib*theSinA + theMu*theCosA)/theCosB : Energy();
- coup = 3.*UnitRemoval::InvE*sqr(theMSSM->ed())*
- (theQb2L *( sqr(mb)*theSinA/theMw/theCosB - theSinApB*brac1) +
- theQb2R *( sqr(mb)*theSinA/theMw/theCosB + theSinApB*brac3) +
- trilinear);
+ coup = Complex(3.*UnitRemoval::InvE*sqr(theMSSM->ed())*
+ (theQb2L *( sqr(mb)*theSinA/theMw/theCosB - theSinApB*brac1) +
+ theQb2R *( sqr(mb)*theSinA/theMw/theCosB + theSinApB*brac3) +
+ trilinear));
couplings[3] = make_pair(coup, coup);
// heavier stop
trilinear = theIncludeTriLinear ?
theQt2LR*0.5*mt/theMw*(Trit*theCosA + theMu*theSinA)/theSinB : Energy();
- coup = 3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
- (theQt2L*( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
- theQt2R*( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4) -
- trilinear);
+ coup = Complex(3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
+ (theQt2L*( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac2) +
+ theQt2R*( - sqr(mt)*theCosA/theMw/theSinB + theSinApB*brac4) -
+ trilinear));
couplings[4] = make_pair(coup, coup);
// heavier stau
trilinear = theIncludeTriLinear ?
theLt2LR*0.5*mtau/theMw*(Trita*theSinA + theMu*theCosA)/theCosB : Energy();
- coup = UnitRemoval::InvE*sqr(theMSSM->ee())*
- (theLt2L *( sqr(mtau)*theSinA/theMw/theCosB - theSinApB*brac5) +
- theLt2R *( sqr(mtau)*theSinA/theMw/theCosB + theSinApB*brac6)+
- trilinear);
+ coup = Complex(UnitRemoval::InvE*sqr(theMSSM->ee())*
+ (theLt2L *( sqr(mtau)*theSinA/theMw/theCosB - theSinApB*brac5) +
+ theLt2R *( sqr(mtau)*theSinA/theMw/theCosB + theSinApB*brac6)+
+ trilinear));
couplings[5] = make_pair(coup, coup);
// top
coup = - 3.*mt*sqr(theMSSM->eu())*theCosA/2./theMw/theSinB;
couplings[6] = make_pair(coup, coup);
// bottom
coup = 3.*mb*sqr(theMSSM->ed())*theSinA/2./theMw/theCosB;
couplings[7] = make_pair(coup, coup);
// tau
coup = mtau*sqr(theMSSM->ee())*theSinA/2./theMw/theCosB;
couplings[8] = make_pair(coup, coup);
// charged higgs
coup = - UnitRemoval::InvE*theMw*(theSinBmA + 0.5/(1.-sqr(theSw))*
(sqr(theCosB)-sqr(theSinB))*theSinApB);
couplings[9] = make_pair(coup, coup);
// W boson
coup = UnitRemoval::InvE*theMw*theSinBmA;
couplings[10] = make_pair(coup, coup);
// charginos
for(unsigned int ix=0;ix<2;++ix) {
Complex Q = sqrt(0.5)*(*theV)(ix,0)*(*theU)(ix,1);
Complex S = sqrt(0.5)*(*theV)(ix,1)*(*theU)(ix,0);
coup = Q*theSinA-S*theCosA;
couplings[11+ix] = make_pair(conj(coup), coup);
}
}
else {
// lightest sbottom
complex<Energy> trilinear = theIncludeTriLinear ?
theQb1LR*0.5*mb/theMw*(theMu*theSinA - Trib*theCosA)/theCosB: Energy();
Complex coup = 3.*UnitRemoval::InvE*sqr(theMSSM->ed())*
(theQb1L *( - sqr(mb)*theCosA/theMw/theCosB + theCosApB*brac1) +
theQb1R *( - sqr(mb)*theCosA/theMw/theCosB - theCosApB*brac3)+trilinear);
couplings[0] = make_pair(coup, coup);
// lightest stop
trilinear = theIncludeTriLinear ?
-theQt1LR*0.5*mt/theMw*(-theMu*theCosA + Trit*theSinA)/theSinB: Energy();
- coup = 3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
- (theQt1L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
- theQt1R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear);
+ coup = Complex(3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
+ (theQt1L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
+ theQt1R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear));
couplings[1] = make_pair(coup, coup);
// lightest stau
trilinear = theIncludeTriLinear ?
theLt1LR*0.5*mtau/theMw*(theMu*theSinA - Trita*theCosA)/theCosB: Energy();
- coup = UnitRemoval::InvE*sqr(theMSSM->ee())*
- (theLt1L *( - sqr(mtau)*theCosA/theMw/theCosB + theCosApB*brac5) +
- theLt1R *( - sqr(mtau)*theCosA/theMw/theCosB - theCosApB*brac6)+trilinear);
+ coup = Complex(UnitRemoval::InvE*sqr(theMSSM->ee())*
+ (theLt1L *( - sqr(mtau)*theCosA/theMw/theCosB + theCosApB*brac5) +
+ theLt1R *( - sqr(mtau)*theCosA/theMw/theCosB - theCosApB*brac6)+trilinear));
couplings[2] = make_pair(coup, coup);
// heavier sbottom
trilinear = theIncludeTriLinear ?
theQb2LR*0.5*mb/theMw*(theMu*theSinA - Trib*theCosA)/theCosB: Energy();
- coup = 3.*UnitRemoval::InvE*sqr(theMSSM->ed())*
- (theQb2L *( - sqr(mb)*theCosA/theMw/theCosB + theCosApB*brac1) +
- theQb2R *( - sqr(mb)*theCosA/theMw/theCosB - theCosApB*brac3)+trilinear);
+ coup = Complex(3.*UnitRemoval::InvE*sqr(theMSSM->ed())*
+ (theQb2L *( - sqr(mb)*theCosA/theMw/theCosB + theCosApB*brac1) +
+ theQb2R *( - sqr(mb)*theCosA/theMw/theCosB - theCosApB*brac3)+trilinear));
couplings[3] = make_pair(coup, coup);
// heavier stop
trilinear = theIncludeTriLinear ?
-theQt2LR*0.5*mt/theMw*(-theMu*theCosA + Trit*theSinA)/theSinB: Energy();
- coup = 3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
- (theQt2L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
- theQt2R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear);
+ coup = Complex(3.*UnitRemoval::InvE*sqr(theMSSM->eu())*
+ (theQt2L *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac2) +
+ theQt2R *( - sqr(mt)*theSinA/theMw/theSinB - theCosApB*brac4)+trilinear));
couplings[4] = make_pair(coup, coup);
// heavier stau
trilinear = theIncludeTriLinear ?
theLt2LR*0.5*mtau/theMw*(theMu*theSinA - Trita*theCosA)/theCosB: Energy();
- coup = UnitRemoval::InvE*sqr(theMSSM->ee())*
- (theLt2L *( - sqr(mtau)*theCosA/theMw/theCosB + theCosApB*brac5) +
- theLt2R *( - sqr(mtau)*theCosA/theMw/theCosB - theCosApB*brac6)+trilinear);
+ coup = Complex(UnitRemoval::InvE*sqr(theMSSM->ee())*
+ (theLt2L *( - sqr(mtau)*theCosA/theMw/theCosB + theCosApB*brac5) +
+ theLt2R *( - sqr(mtau)*theCosA/theMw/theCosB - theCosApB*brac6)+trilinear));
couplings[5] = make_pair(coup, coup);
// top
coup = -3.*mt*sqr(theMSSM->eu())*theSinA/2./theMw/theSinB;
couplings[6] = make_pair(coup, coup);
// bottom
coup = -3.*mb*sqr(theMSSM->ed())*theCosA/2./theMw/theCosB;
couplings[7] = make_pair(coup, coup);
// tau
coup = -mtau*sqr(theMSSM->ee())*theCosA/2./theMw/theCosB;
couplings[8] = make_pair(coup, coup);
// charged higgs
coup = - UnitRemoval::InvE*theMw*(theCosBmA - 0.5/(1.-sqr(theSw))*
(sqr(theCosB)-sqr(theSinB))*theCosApB);
couplings[9] = make_pair(coup, coup);
// W boson
coup = UnitRemoval::InvE*theMw*theCosBmA;
couplings[10] = make_pair(coup, coup);
// charginos
for(unsigned int ix=0;ix<2;++ix) {
Complex Q = sqrt(0.5)*(*theV)(ix,0)*(*theU)(ix,1);
Complex S = sqrt(0.5)*(*theV)(ix,1)*(*theU)(ix,0);
coup = -Q*theCosA-S*theSinA;
couplings[11+ix] = make_pair(conj(coup), coup);
}
}
}
else {
setNParticles(5);
masses.resize(5);
couplings.resize(5);
masses[0] = mt;
masses[1] = mb;
masses[2] = mtau;
masses[3] = getParticleData(ParticleID::SUSY_chi_1plus)->mass();
masses[4] = getParticleData(ParticleID::SUSY_chi_2plus)->mass();
type.resize(5,PDT::Spin1Half);
// top
Complex coup = 3.*Complex(0., 1.)*sqr(theMSSM->eu())*mt/2./theMw/theTanB;
couplings[0] = make_pair(coup, thePseudoScalarTreatment ? coup : -coup);
// bottom
coup = 3.*Complex(0., 1.)*sqr(theMSSM->ed())*mb/2./theMw*theTanB;
couplings[1] = make_pair(coup, thePseudoScalarTreatment ? coup : -coup);
// tau
coup = Complex(0., 1.)*sqr(theMSSM->ee())*mtau/2./theMw*theTanB;
couplings[2] = make_pair(coup, thePseudoScalarTreatment ? coup : -coup);
// charginos
for(unsigned int ix=0;ix<2;++ix) {
Complex Q = sqrt(0.5)*(*theV)(ix,0)*(*theU)(ix,1);
Complex S = sqrt(0.5)*(*theV)(ix,1)*(*theU)(ix,0);
coup = - Complex(0., 1.)*(Q*theSinB+S*theCosB);
couplings[3+ix] = make_pair(coup, thePseudoScalarTreatment ? coup : -coup);
}
}
theq2last = q2;
theLastID = higgs;
theHaveCoeff = false;
}
norm(theCouplast);
//calculate tensor coefficients
if( !theHaveCoeff ) {
VVSLoopVertex::setCoupling(q2, particle2, particle3, particle1);
theHaveCoeff = true;
}
}
// functions for loops for testing
// namespace {
// Complex F0(double tau) {
// Complex ft;
// if(tau>=1.)
// ft = sqr(asin(1./sqrt(tau)));
// else {
// double etap = 1.+sqrt(1.-tau);
// double etam = 1.-sqrt(1.-tau);
// ft = -0.25*sqr(log(etap/etam)-Constants::pi*Complex(0.,1.));
// }
// return tau*(1.-tau*ft);
// }
// Complex FHalf(double tau,double eta) {
// Complex ft;
// if(tau>=1.)
// ft = sqr(asin(1./sqrt(tau)));
// else {
// double etap = 1.+sqrt(1.-tau);
// double etam = 1.-sqrt(1.-tau);
// ft = -0.25*sqr(log(etap/etam)-Constants::pi*Complex(0.,1.));
// }
// return -2.*tau*(eta+(1.-tau*eta)*ft);
// }
// Complex F1(double tau) {
// Complex ft;
// if(tau>=1.)
// ft = sqr(asin(1./sqrt(tau)));
// else {
// double etap = 1.+sqrt(1.-tau);
// double etam = 1.-sqrt(1.-tau);
// ft = -0.25*sqr(log(etap/etam)-Constants::pi*Complex(0.,1.));
// }
// return 2.+3.*tau+3.*tau*(2.-tau)*ft;
// }
// }
void SSHPPVertex::doinit() {
//PDG codes for particles at vertices
addToList(22,22,25);
addToList(22,22,35);
addToList(22,22,36);
theMSSM = dynamic_ptr_cast<tMSSMPtr>(generator()->standardModel());
if( !theMSSM )
throw InitException()
<< "SSHPPVertex::doinit() - The pointer to the MSSM object is null!"
<< Exception::abortnow;
theMw = getParticleData(ParticleID::Wplus)->mass();
thetop = getParticleData(ParticleID::t);
thebot = getParticleData(ParticleID::b);
thetau = getParticleData(ParticleID::tauminus);
theSw = sqrt(sin2ThetaW());
theZfact = getParticleData(ParticleID::Wplus)->mass()/(1. - sqr(theSw));
theSinA = sin(theMSSM->higgsMixingAngle());
theCosA = sqrt(1. - sqr(theSinA));
theTanB = theMSSM->tanBeta();
theSinB = theTanB/sqrt(1. + sqr(theTanB));
theCosB = sqrt( 1. - sqr(theSinB) );
theSinApB = theSinA*theCosB + theCosA*theSinB;
theCosApB = theCosA*theCosB - theSinA*theSinB;
theSinBmA =-theSinA*theCosB + theCosA*theSinB;
theCosBmA = theCosA*theCosB + theSinA*theSinB;
MixingMatrix stop = *theMSSM->stopMix();
MixingMatrix sbot = *theMSSM->sbottomMix();
MixingMatrix stau = *theMSSM->stauMix();
theQt1L = stop(0,0)*stop(0,0);
theQt1R = stop(0,1)*stop(0,1);
theQt1LR = stop(0,1)*stop(0,0) + stop(0,1)*stop(0,0);
theQt2L = stop(1,0)*stop(1,0);
theQt2R = stop(1,1)*stop(1,1);
theQt2LR = stop(1,1)*stop(1,0) + stop(1,0)*stop(1,1);
theQb1L = sbot(0,0)*sbot(0,0);
theQb1R = sbot(0,1)*sbot(0,1);
theQb1LR = sbot(0,1)*sbot(0,0) + sbot(0,1)*sbot(0,0);
theQb2L = sbot(1,0)*sbot(1,0);
theQb2R = sbot(1,1)*sbot(1,1);
theQb2LR = sbot(1,1)*sbot(1,0) + sbot(1,0)*sbot(1,1);
theLt1L = stau(0,0)*stau(0,0);
theLt1R = stau(0,1)*stau(0,1);
theLt1LR = stau(0,1)*stau(0,0) + stau(0,1)*stau(0,0);
theLt2L = stau(1,0)*stau(1,0);
theLt2R = stau(1,1)*stau(1,1);
theLt2LR = stau(1,1)*stau(1,0) + stau(1,0)*stau(1,1);
theU = theMSSM->charginoUMix();
theV = theMSSM->charginoVMix();
assert( theSfmass.size() == 6 );
theSfmass[0] = getParticleData(ParticleID::SUSY_b_1)->mass();
theSfmass[1] = getParticleData(ParticleID::SUSY_t_1)->mass();
theSfmass[2] = getParticleData(ParticleID::SUSY_tau_1minus)->mass();
theSfmass[3] = getParticleData(ParticleID::SUSY_b_2)->mass();
theSfmass[4] = getParticleData(ParticleID::SUSY_t_2)->mass();
theSfmass[5] = getParticleData(ParticleID::SUSY_tau_2minus)->mass();
VVSLoopVertex::doinit();
// test calc of the width
// for(unsigned int ix=0;ix<2;++ix) {
// Energy mh = getParticleData(25+long(ix)*10)->mass();
// Energy mt = theMSSM->mass(sqr(mh ), thetop);
// Energy mb = theMSSM->mass(sqr(mh ), thebot);
// Energy mtau = theMSSM->mass(sqr(mh ), thetau);
// Energy mhp = getParticleData(ParticleID::Hplus)->mass();
// Energy mc[2] = {getParticleData(ParticleID::SUSY_chi_1plus)->mass(),
// getParticleData(ParticleID::SUSY_chi_2plus)->mass()};
// // sbottom
// Complex rsb1,rsb2;
// if(ix==0) {
// rsb1 =
// +theQb1L*(-sqr(mb/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// -(-0.5+sqr(theSw)/3.)*theSinApB)
// +theQb1R*(-sqr(mb/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// +sqr(theSw)/3.*theSinApB);
// rsb2 =
// +theQb2L*(-sqr(mb/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// -(-0.5+sqr(theSw)/3.)*theSinApB)
// +theQb2R*(-sqr(mb/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// +sqr(theSw)/3.*theSinApB);
// }
// else {
// rsb1 =
// +theQb1L*(+sqr(mb/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// +(-0.5+sqr(theSw)/3.)*theCosApB)
// +theQb1R*(+sqr(mb/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// -sqr(theSw)/3.*theCosApB);
// rsb2 =
// +theQb2L*(+sqr(mb/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// +(-0.5+sqr(theSw)/3.)*theCosApB)
// +theQb2R*(+sqr(mb/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// -sqr(theSw)/3.*theCosApB);
// }
// Complex Isb1 = 3.*sqr(1./3.)*rsb1*sqr(theMw/theSfmass[0])/(1.-sqr(theSw))
// *F0(sqr(2.*theSfmass[0]/mh));
// Complex Isb2 = 3.*sqr(1./3.)*rsb2*sqr(theMw/theSfmass[3])/(1.-sqr(theSw))
// *F0(sqr(2.*theSfmass[3]/mh));
// // stop
// Complex rst1,rst2;
// if(ix==0) {
// rst1 =
// +theQt1L*(+sqr(mt/theMw)*(1.-sqr(theSw))*theCosA/theSinB
// -(+0.5-2.*sqr(theSw)/3.)*theSinApB)
// +theQt1R*(+sqr(mt/theMw)*(1.-sqr(theSw))*theCosA/theSinB
// -2.*sqr(theSw)/3.*theSinApB);
// rst2 =
// +theQt2L*(+sqr(mt/theMw)*(1.-sqr(theSw))*theCosA/theSinB
// -(+0.5-2.*sqr(theSw)/3.)*theSinApB)
// +theQt2R*(+sqr(mt/theMw)*(1.-sqr(theSw))*theCosA/theSinB
// -2.*sqr(theSw)/3.*theSinApB);
// }
// else {
// rst1 =
// +theQt1L*(+sqr(mt/theMw)*(1.-sqr(theSw))*theSinA/theSinB
// +(+0.5-2.*sqr(theSw)/3.)*theCosApB)
// +theQt1R*(+sqr(mt/theMw)*(1.-sqr(theSw))*theSinA/theSinB
// +2.*sqr(theSw)/3.*theCosApB);
// rst2 =
// +theQt2L*(+sqr(mt/theMw)*(1.-sqr(theSw))*theSinA/theSinB
// +(+0.5-2.*sqr(theSw)/3.)*theCosApB)
// +theQt2R*(+sqr(mt/theMw)*(1.-sqr(theSw))*theSinA/theSinB
// +2.*sqr(theSw)/3.*theCosApB);
// }
// Complex Ist1 = 3.*sqr(2./3.)*rst1*sqr(theMw/theSfmass[1])/(1.-sqr(theSw))
// *F0(sqr(2.*theSfmass[1]/mh));
// Complex Ist2 = 3.*sqr(2./3.)*rst2*sqr(theMw/theSfmass[4])/(1.-sqr(theSw))
// *F0(sqr(2.*theSfmass[4]/mh));
// // stau
// Complex rstau1,rstau2;
// if(ix==0) {
// rstau1 =
// +theLt1L*(-sqr(mtau/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// -(-0.5+sqr(theSw))*theSinApB)
// +theLt1R*(-sqr(mtau/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// +sqr(theSw)*theSinApB);
// rstau2 =
// +theLt2L*(-sqr(mtau/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// -(-0.5+sqr(theSw))*theSinApB)
// +theLt2R*(-sqr(mtau/theMw)*(1.-sqr(theSw))*theSinA/theCosB
// +sqr(theSw)*theSinApB);
// }
// else {
// rstau1 =
// +theLt1L*(+sqr(mtau/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// +(-0.5+sqr(theSw))*theCosApB)
// +theLt1R*(+sqr(mtau/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// -sqr(theSw)*theCosApB);
// rstau2 =
// +theLt2L*(+sqr(mtau/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// +(-0.5+sqr(theSw))*theCosApB)
// +theLt2R*(+sqr(mtau/theMw)*(1.-sqr(theSw))*theCosA/theCosB
// -sqr(theSw)*theCosApB);
// }
// Complex Istau1 = rstau1*sqr(theMw/theSfmass[2])/(1.-sqr(theSw))
// *F0(sqr(2.*theSfmass[2]/mh));
// Complex Istau2 = rstau2*sqr(theMw/theSfmass[5])/(1.-sqr(theSw))
// *F0(sqr(2.*theSfmass[5]/mh));
// // charged higgs
// Complex rh;
// if(ix==0) {
// rh = theSinBmA+0.5*(sqr(theCosB)-sqr(theSinB))*theSinApB/(1.-sqr(theSw));
// }
// else {
// rh = theCosBmA-0.5*(sqr(theCosB)-sqr(theSinB))*theCosApB/(1.-sqr(theSw));
// }
// Complex Ih = rh*sqr(theMw/mhp)*F0(sqr(2.*mhp/mh));
// // W
// Complex rw;
// if(ix==0) {
// rw = theSinBmA;
// }
// else {
// rw = theCosBmA;
// }
// Complex IW = rw*F1(sqr(2.*theMw/mh));
// // top
// Complex rt;
// if(ix==0) {
// rt = theCosA/theSinB;
// }
// else {
// rt = theSinA/theSinB;
// }
// Complex Itop = 3.*sqr(2./3.)*rt*FHalf(sqr(2.*mt/mh),1.);
// // bottom
// Complex rb;
// if(ix==0) {
// rb =-theSinA/theCosB;
// }
// else {
// rb = theCosA/theCosB;
// }
// Complex Ibot = 3.*sqr(1./3.)*rb*FHalf(sqr(2.*mb/mh),1.);
// // tau
// Complex rtau;
// if(ix==0) {
// rtau =-theSinA/theCosB;
// }
// else {
// rtau = theCosA/theCosB;
// }
// Complex Itau = rtau*FHalf(sqr(2.*mtau/mh),1.);
// // charginos
// Complex rc[2],IC[2];
// for(unsigned int ic=0;ic<2;++ic) {
// Complex Q = sqrt(0.5)*(*theV)(ic,0)*(*theU)(ic,1);
// Complex S = sqrt(0.5)*(*theV)(ic,1)*(*theU)(ic,0);
// if(ix==0) {
// rc[ic] = 2.*(S*theCosA-Q*theSinA);
// }
// else {
// rc[ic] = 2.*(S*theSinA+Q*theCosA);
// }
// IC[ic] = rc[ic]*FHalf(sqr(2.*mc[ic]/mh),1.)*theMw/mc[ic];
// }
// Energy pre = sqr(mh/theMw)*mh/1024./pow(Constants::pi,3)
// *sqr(weakCoupling(sqr(mh))*sqr(electroMagneticCoupling(sqr(mh)))/4./Constants::pi);
// cerr << "testing lighter sbottom" << ix << " "
// << pre*std::norm(Isb1)/GeV << "\n";
// cerr << "testing heavier sbottom" << ix << " "
// << pre*std::norm(Istau2)/GeV << "\n";
// cerr << "testing lighter stop" << ix << " "
// << pre*std::norm(Ist1)/GeV << "\n";
// cerr << "testing heavier stop" << ix << " "
// << pre*std::norm(Ist2)/GeV << "\n";
// cerr << "testing lighter stau" << ix << " "
// << pre*std::norm(Istau1)/GeV << "\n";
// cerr << "testing heavier stau" << ix << " "
// << pre*std::norm(Isb2)/GeV << "\n";
// cerr << "testing top " << ix << " "
// << pre*std::norm(Itop)/GeV << "\n";
// cerr << "testing bottom " << ix << " "
// << pre*std::norm(Ibot)/GeV << "\n";
// cerr << "testing tau " << ix << " "
// << pre*std::norm(Itau)/GeV << "\n";
// cerr << "testing higgs " << ix << " "
// << pre*std::norm(Ih)/GeV << "\n";
// cerr << "testing W " << ix << " "
// << pre*std::norm(IW)/GeV << "\n";
// cerr << "testing chi1 " << ix << " "
// << pre*std::norm(IC[0])/GeV << "\n";
// cerr << "testing chi2 " << ix << " "
// << pre*std::norm(IC[1])/GeV << "\n";
// cerr << "testing chi " << ix << " "
// << pre*std::norm(IC[0]+IC[1])/GeV << "\n";
// cerr << "testing higgs width " << ix << " "
// << pre*std::norm(Isb1+Isb2+Ist1+Ist2+Istau1+Istau2+
// Itop+Ibot+Itau+Ih+IW+IC[0]+IC[1])/GeV << "\n";
// }
if(loopToolsInitialized()) Looptools::ltexi();
}
diff --git a/Models/Susy/SSHPPVertex.h b/Models/Susy/SSHPPVertex.h
--- a/Models/Susy/SSHPPVertex.h
+++ b/Models/Susy/SSHPPVertex.h
@@ -1,345 +1,345 @@
// -*- C++ -*-
//
// SSHPPVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSHPPVertex_H
#define HERWIG_SSHPPVertex_H
//
// This is the declaration of the SSHPPVertex class.
//
#include "Herwig/Models/General/VVSLoopVertex.h"
#include "MSSM.h"
namespace Herwig {
/**
* This class implements the effective vertex coupling a higgs
* to a pair of photons in the MSSM. The loops include third generation
* sfermions and fermions, \f$W^\pm\f$ and \f$H^\pm\f$
*
* @see \ref SSHPPVertexInterfaces "The interfaces"
* defined for SSHPPVertex.
*/
class SSHPPVertex: public VVSLoopVertex {
public:
/**
* The default constructor.
*/
SSHPPVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate couplings
*@param q2 Scale at which to evaluate coupling
*@param particle1 ParticleData pointer to first particle
*@param particle2 ParticleData pointer to second particle
*@param particle3 ParticleData pointer to third particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSHPPVertex & operator=(const SSHPPVertex &);
+ SSHPPVertex & operator=(const SSHPPVertex &) = delete;
private:
/**
* Switch to turn off squark trilinear couplings via A terms for testing
*/
bool theIncludeTriLinear;
/**
* Treat the pseudoscalar as scalar for comparison with ISAJET
*/
bool thePseudoScalarTreatment;
/**
* A pointer to the MSSM object
*/
tMSSMPtr theMSSM;
/**
* Value of \f$\sin\theta_W\f$
*/
double theSw;
/**
* The mass of the \f$W\f$ boson.
*/
Energy theMw;
/**
* The factor \f$\frac{M_Z}{\cos\theta_W}\f$
*/
Energy theZfact;
/**
* The mixing matrix factor \f$Q^{2i}_{11}Q^{2i}_{11}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt1L;
/**
* The mixing matrix factor \f$Q^{2i}_{12}Q^{2i}_{12}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt1R;
/**
* The mixing matrix factor \f$Q^{2i}_{12}Q^{2i}_{12}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt1LR;
/**
* The mixing matrix factor \f$Q^{2i}_{21}Q^{2i}_{21}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt2L;
/**
* The mixing matrix factor \f$Q^{2i}_{22}Q^{2i}_{22}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt2R;
/**
* The mixing matrix factor \f$Q^{2i}_{22}Q^{2i}_{22}\f$
* for the \f$\tilde{t}\f$
*/
Complex theQt2LR;
/**
* The mixing matrix factor \f$Q^{2i-1}_{11}Q^{2i-1}_{11}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb1L;
/**
* The mixing matrix factor \f$Q^{2i-1}_{12}Q^{2i-1}_{12}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb1R;
/**
* The mixing matrix factor \f$Q^{2i-1}_{12}Q^{2i-1}_{12}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb1LR;
/**
* The mixing matrix factor \f$Q^{2i-1}_{21}Q^{2i-1}_{21}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb2L;
/**
* The mixing matrix factor \f$Q^{2i-1}_{22}Q^{2i-1}_{22}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb2R;
/**
* The mixing matrix factor \f$Q^{2i-1}_{22}Q^{2i-1}_{22}\f$
* for the \f$\tilde{b}\f$
*/
Complex theQb2LR;
/**
* The mixing matrix factor \f$L^{2i}_{11}L^{2i}_{11}\f$
* for the \f$\tilde{\tau}\f$
*/
Complex theLt1L;
/**
* The mixing matrix factor \f$L^{2i}_{12}L^{2i}_{12}\f$
* for the \f$\tilde{\tau}\f$
*/
Complex theLt1R;
/**
* The mixing matrix factor \f$L^{2i}_{12}L^{2i}_{12}\f$
* for the \f$\tilde{\tau}\f$
*/
Complex theLt1LR;
/**
* The mixing matrix factor \f$L^{2i}_{21}L^{2i}_{21}\f$
* for the \f$\tilde{\tau}\f$
*/
Complex theLt2L;
/**
* The mixing matrix factor \f$L^{2i}_{22}L^{2i}_{22}\f$
* for the \f$\tilde{\tau}\f$
*/
Complex theLt2R;
/**
* The mixing matrix factor \f$L^{2i}_{22}L^{2i}_{22}\f$
* for the \f$\tilde{\tau}\f$
*/
Complex theLt2LR;
/**
* A pointer to the top quark ParticleData object
*/
tPDPtr thetop;
/**
* A pointer to the bottom quark ParticleData object
*/
tPDPtr thebot;
/**
* A pointer to the tau lepton ParticleData object
*/
tPDPtr thetau;
/**
* The sfermion masses
*/
vector<Energy> theSfmass;
/**
* The value of \f$ \tan\beta \f$
*/
double theTanB;
/**
* The value of \f$ \sin\alpha \f$
*/
double theSinA;
/**
* The value of \f$ \cos\alpha \f$
*/
double theCosA;
/**
* The value of \f$ \sin\beta \f$
*/
double theSinB;
/**
* The value of \f$ \cos\beta \f$
*/
double theCosB;
/**
* The value of \f$ \sin(\alpha + \beta) \f$
*/
double theSinApB;
/**
* The value of \f$ \cos(\alpha + \beta) \f$
*/
double theCosApB;
/**
* The value of \f$ \sin(\beta-\alpha) \f$
*/
double theSinBmA;
/**
* The value of \f$ \cos(\beta-\alpha) \f$
*/
double theCosBmA;
/**
* The U mixing matrix
*/
tMixingMatrixPtr theU;
/**
* The V mixing matrix
*/
tMixingMatrixPtr theV;
/**
* Last value of the coupling calculated
*/
Complex theCouplast;
/**
* The scale \f$q^2\f$ at which coupling was last evaluated
*/
Energy2 theq2last;
/**
* Whether we have calculated the tensor coefficents yet
*/
bool theHaveCoeff;
/**
* ID of the higgs
*/
long theLastID;
};
}
#endif /* HERWIG_SSHPPVertex_H */
diff --git a/Models/Susy/SSHSFSFVertex.h b/Models/Susy/SSHSFSFVertex.h
--- a/Models/Susy/SSHSFSFVertex.h
+++ b/Models/Susy/SSHSFSFVertex.h
@@ -1,267 +1,267 @@
// -*- C++ -*-
//
// SSHSFSFVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSHSFSFVertex_H
#define HERWIG_SSHSFSFVertex_H
//
// This is the declaration of the SSHSFSFVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/SSSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the coupling for a Higgs in the MSSM
* to a pair of sfermions.
*
* @see \ref SSHSFSFVertexInterfaces "The interfaces"
* defined for SSHSFSFVertex.
*/
class SSHSFSFVertex: public SSSVertex {
/** A vector of MixingMatrix pointers. */
typedef vector<MixingMatrixPtr> MMPVector;
public:
/**
* The default constructor.
*/
SSHSFSFVertex();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling at the given scale.
* @param q2 The scale at which to evaluate the coupling
* @param particle1 The first particle at the vertex
* @param particle2 The second particle at the vertex
* @param particle3 The third particle at the vertex
*/
void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSHSFSFVertex & operator=(const SSHSFSFVertex &);
+ SSHSFSFVertex & operator=(const SSHSFSFVertex &) = delete;
private:
/** @name Functions to calculate the coupling based on the sfermion type. */
//@{
/**
* Calculate the coupling for the first higgs
* @param q2 scale
* @param higgs The ID of the higgs
* @param smID The ID of the SM particle to which it is a partner.
* @param alpha The mass eigenstate of an sfermion
* @param beta The mass eigenstate of the other sfermion
*/
void downSF(Energy2 q2, long higgs, long smID, unsigned int alpha, unsigned int beta);
/**
* Calculate the coupling for the second higgs
* @param q2 scale
* @param higgs The ID of the higgs
* @param smID The ID of the SM particle to which it is a partner.
* @param alpha The mass eigenstate of an sfermion
* @param beta The mass eigenstate of the other sfermion
*/
void upSF(Energy2 q2, long higgs, long smID, unsigned int alpha, unsigned int beta);
/**
* Calculate the coupling for the third higgs
* @param q2 scale
* @param higgs The ID of the higgs
* @param smID The ID of the SM particle to which it is a partner.
* @param alpha The mass eigenstate of an sfermion
* @param beta The mass eigenstate of the other sfermion
*/
void leptonSF(Energy2 q2, long higgs, long smID, unsigned int alpha, unsigned int beta);
/**
* Calculate the coupling for the charged higgs
* @param q2 scale
* @param id1 The ID of the first sfermion
* @param id2 The ID of the second sfermion
*/
void chargedHiggs(Energy2 q2, long id1, long id2);
//@}
private:
/**
* A vector containing pointers to the mixing matrices, 0 = stop,
* 1 = sbottom, 2 = stau
*/
MMPVector theMix;
/**
* A vector containing the trilinear couplings, quarks then leptons
*/
vector<complex<Energy> > theTriC;
/**
* The value of \f$\sin\alpha\f$.
*/
double theSinA;
/**
* The value of \f$\cos\alpha\f$.
*/
double theCosA;
/**
* The value of \f$\sin\beta\f$.
*/
double theSinB;
/**
* The value of \f$\cos\beta\f$.
*/
double theCosB;
/**
* The value of \f$\tan\beta\f$.
*/
double theTanB;
/**
* The value of \f$\sin(\alpha + \beta)\f$.
*/
double theSinAB;
/**
* The value of \f$\cos(\alpha + \beta)\f$.
*/
double theCosAB;
/**
* The mass of the \f$W\f$.
*/
Energy theMw;
/**
* The mass of the \f$Z\f$.
*/
Energy theMz;
/**
* The \f$\mu\f$ parameter.
*/
Energy theMu;
/**
* The value of \f$\sin\theta_W\f$
*/
double theSw;
/**
* The value of \f$\cos\theta_W\f$
*/
double theCw;
/**
* The value of the coupling when it was last evaluated
*/
complex<Energy> theCoupLast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 theq2Last;
/**
* The value of g coupling when it was last evaluated
*/
double thegLast;
/**
* The ID of the higgs when the vertex was last evaluated
*/
long theHLast;
/**
* The ID of the first sfermion when the vertex was last evaluated
*/
long theSF1Last;
/**
* The ID of the second sfermion when the vertex was last evaluated
*/
long theSF2Last;
/**
* The Model
*/
tMSSMPtr theMSSM;
};
}
#endif /* HERWIG_SSHSFSFVertex_H */
diff --git a/Models/Susy/SSNCTVertex.h b/Models/Susy/SSNCTVertex.h
--- a/Models/Susy/SSNCTVertex.h
+++ b/Models/Susy/SSNCTVertex.h
@@ -1,174 +1,174 @@
// -*- C++ -*-
#ifndef HERWIG_SSNCTVertex_H
#define HERWIG_SSNCTVertex_H
//
// This is the declaration of the SSNCTVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SSNCTVertex class.
*
* @see \ref SSNCTVertexInterfaces "The interfaces"
* defined for SSNCTVertex.
*/
class SSNCTVertex: public Helicity::FFSVertex {
public:
/**
* The default constructor.
*/
SSNCTVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSNCTVertex & operator=(const SSNCTVertex &);
+ SSNCTVertex & operator=(const SSNCTVertex &) = delete;
private:
/**
* High scale for the loops
*/
Energy MX_;
/**
* Pointer to the neutralino mixing matrix
*/
tMixingMatrixPtr nmix_;
/**
* \f$\sin(\theta_w)\f$
*/
double sw_;
/**
* \f$\cos(\theta_w)\f$
*/
double cw_;
/**
* Mass of the W
*/
Energy mw_;
/**
* \f$\sin(\beta)\f$
*/
double sb_;
/**
* \f$\cos(\beta)\f$
*/
double cb_;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 q2last_;
/**
* The value of the normalisation when it was evaluated at _q2last
*/
Complex couplast_;
/**
* Store the value of the left coupling when it was last evaluated
*/
Complex leftlast_;
/**
* Store the value of the right coupling when it was last evaluated
*/
Complex rightlast_;
/**
* Store the id of the last neutralino to be evaluate
*/
long idlast_;
/**
* Mixing parameter
*/
Complex epsilon_;
};
}
#endif /* HERWIG_SSNCTVertex_H */
diff --git a/Models/Susy/SSNFSVertex.h b/Models/Susy/SSNFSVertex.h
--- a/Models/Susy/SSNFSVertex.h
+++ b/Models/Susy/SSNFSVertex.h
@@ -1,203 +1,203 @@
// -*- C++ -*-
//
// SSNFSVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSNFSVertex_H
#define HERWIG_SSNFSVertex_H
//
// This is the declaration of the SSNFSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "ThePEG/StandardModel/StandardModelBase.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the coupling of the neutralinos to
* fermion-sfermions. It inherits from FFSVertex and implements the
* virtual setCoupling() method.
*
* @see FFSVertex
*/
class SSNFSVertex: public FFSVertex {
public:
/**
* The default constructor.
*/
SSNFSVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSNFSVertex & operator=(const SSNFSVertex &);
+ SSNFSVertex & operator=(const SSNFSVertex &) = delete;
/**
* Pointer to the stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Pointer to the sbottom mixing matrix
*/
tMixingMatrixPtr _sbot;
/**
* Pointer to the stau mixing matrix
*/
tMixingMatrixPtr _stau;
/**
* Pointer to the neutralino mixing matrix
*/
tMixingMatrixPtr _nmix;
/**
* Pointer to the Susy Model object
*/
tMSSMPtr _theSS;
/**
* \f$\sin(\theta_w)\f$
*/
double _sw;
/**
* \f$\cos(\theta_w)\f$
*/
double _cw;
/**
* Mass of the W
*/
Energy _mw;
/**
* \f$\sin(\beta)\f$
*/
double _sb;
/**
* \f$\cos(\beta)\f$
*/
double _cb;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 _q2last;
/**
* The value of the normalisation when it was evaluated at _q2last
*/
Complex _couplast;
/**
* Store the value of the left coupling when it was last evaluated
*/
Complex _leftlast;
/**
* Store the value of the right coupling when it was last evaluated
*/
Complex _rightlast;
/**
* Store the id of the last neutralino to be evaluate
*/
long _id1last;
/**
* Store the id of the last SM fermion to be evaluate
*/
long _id2last;
/**
* Store the id of the last scalar to be evaluate
*/
long _id3last;
/**
* Include Yukawa's ?
*/
unsigned int yukawa_;
};
}
#endif /* HERWIG_SSNFSVertex_H */
diff --git a/Models/Susy/SSNNPVertex.h b/Models/Susy/SSNNPVertex.h
--- a/Models/Susy/SSNNPVertex.h
+++ b/Models/Susy/SSNNPVertex.h
@@ -1,233 +1,233 @@
// -*- C++ -*-
//
// SSNNPVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSNNPVertex_H
#define HERWIG_SSNNPVertex_H
//
// This is the declaration of the SSNNPVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/GeneralFFVVertex.h"
#include "Herwig/Models/Susy/MSSM.h"
#include "Herwig/Models/Susy/MixingMatrix.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a photon to a pair of neutralinos
* via loop diagrams
* It inherits from GeneralFFVertex and implements the setCoupling method.
*
* @see \ref SSNNPVertexInterfaces "The interfaces"
* defined for SSNNPVertex.
* @see FFVertex
*/
class SSNNPVertex: public GeneralFFVVertex {
public:
/**
* The default constructor.
*/
SSNNPVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Evaluate the loop integrals
*/
void loopIntegrals(Energy Mi, Energy Mj, Energy M, Energy m,
complex<InvEnergy2> & I, complex<InvEnergy2> & J,
complex<InvEnergy2> & K, complex<InvEnergy2> & I2);
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSNNPVertex & operator=(const SSNNPVertex &);
+ SSNNPVertex & operator=(const SSNNPVertex &) = delete;
private:
/**
* Whether of not to include on-shell intermediate states
*/
bool _includeOnShell;
/**
* Only include the real part of the integral
*/
bool _realIntegral;
/**
* Pointer to the stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Pointer to the sbottom mixing matrix
*/
tMixingMatrixPtr _sbot;
/**
* Pointer to the stau mixing matrix
*/
tMixingMatrixPtr _stau;
/**
* The value of \f$sin(\theta_W)\f$
*/
double _sw;
/**
* The value of \f$cos(\theta_W)\f$
*/
double _cw;
/**
* Mass of the W
*/
Energy _mw;
/**
* \f$\sin(\beta)\f$
*/
double _sb;
/**
* \f$\cos(\beta)\f$
*/
double _cb;
/**
* Store the neutralino mixing matrix
*/
tMixingMatrixPtr _theN;
/**
* Store the U-type chargino mixing matrix
*/
tMixingMatrixPtr _theU;
/**
* Store the V-type chargino mixing matrix
*/
tMixingMatrixPtr _theV;
/**
* Store the id of the 1st neutralino when the coupling was last evaluated
*/
long _id1last;
/**
* Store the id of the 1st neutralino when the coupling was last evaluated
*/
long _id2last;
/**
* Store the value at which the coupling when it was last evalutated
*/
Energy2 _q2last;
/**
* Store the value of the coupling when it was last evalutated
*/
Complex _couplast;
/**
* Store the value of the left-coupling when it was last evalutated
*/
complex<InvEnergy> _leftlast;
/**
* Store the value of the right-coupling when it was last evalutated
*/
complex<InvEnergy> _rightlast;
};
}
#endif /* HERWIG_SSNNPVertex_H */
diff --git a/Models/Susy/SSNNZVertex.h b/Models/Susy/SSNNZVertex.h
--- a/Models/Susy/SSNNZVertex.h
+++ b/Models/Susy/SSNNZVertex.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
//
// SSNNZVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSNNZVertex_H
#define HERWIG_SSNNZVertex_H
//
// This is the declaration of the SSNNZVertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "SusyBase.h"
#include "MixingMatrix.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a Z-boson to a pair of neutralinos.
* It inherits from FFVertex and implements the setCoupling method.
*
* @see \ref SSNNZVertexInterfaces "The interfaces"
* defined for SSNNZVertex.
* @see FFVertex
*/
class SSNNZVertex: public FFVVertex {
public:
/**
* The default constructor.
*/
SSNNZVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1,
tcPDPtr part2, tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSNNZVertex & operator=(const SSNNZVertex &);
+ SSNNZVertex & operator=(const SSNNZVertex &) = delete;
private:
/**
* The value of \f$sin(\theta_W)\f$
*/
double _sw;
/**
* The value of \f$cos(\theta_W)\f$
*/
double _cw;
/**
* Store the neutralino mixing matrix
*/
tMixingMatrixPtr _theN;
/**
* Store the id of the 1st neutralino when the coupling was last evaluated
*/
long _id1last;
/**
* Store the id of the 1st neutralino when the coupling was last evaluated
*/
long _id2last;
/**
* Store the value at which the coupling when it was last evalutated
*/
Energy2 _q2last;
/**
* Store the value of the coupling when it was last evalutated
*/
Complex _couplast;
/**
* Store the value of the left-coupling when it was last evalutated
*/
Complex _leftlast;
/**
* Store the value of the right-coupling when it was last evalutated
*/
Complex _rightlast;
};
}
#endif /* HERWIG_SSNNZVertex_H */
diff --git a/Models/Susy/SSWGSSVertex.h b/Models/Susy/SSWGSSVertex.h
--- a/Models/Susy/SSWGSSVertex.h
+++ b/Models/Susy/SSWGSSVertex.h
@@ -1,172 +1,172 @@
// -*- C++ -*-
//
// SSWGSSVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSWGSSVertex_H
#define HERWIG_SSWGSSVertex_H
//
// This is the declaration of the SSWGSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
//#include "SusyBase.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the 4 point gluon-gluon-squark-squark
* vertex. It inherits from VVSSVertex and implements the setCouopling
* method.
*
* @see VVSSVertex
*/
class SSWGSSVertex: public VVSSVertex {
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The default constructor.
*/
SSWGSSVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3,tcPDPtr part4);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSWGSSVertex & operator=(const SSWGSSVertex &);
+ SSWGSSVertex & operator=(const SSWGSSVertex &) = delete;
private:
/**
* Value of \f$sin(\theta_w)\f$
*/
double _sw;
/**
* Value of \f$cos(\theta_w)\f$
*/
double _cw;
/**
* Scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* Value of em coupling when last evaluated
*/
Complex _emcouplast;
/**
* Value of strong coupling when last evaluated
*/
Complex _scouplast;
/**
* Stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Sbottom mixing matrix
*/
tMixingMatrixPtr _sbottom;
/**
* The up type squark present when the vertex was evaluated.
*/
long _ulast;
/**
* The down type squark present when the vertex was evaluated.
*/
long _dlast;
/**
* The gauge boson present when the vertex was last evaluated.
*/
long _gblast;
/**
* The value of the mixing matrix dependent part when the vertex was
* last evaluated
*/
Complex _factlast;
};
}
#endif /* HERWIG_SSWGSSVertex_H */
diff --git a/Models/Susy/SSWHHVertex.h b/Models/Susy/SSWHHVertex.h
--- a/Models/Susy/SSWHHVertex.h
+++ b/Models/Susy/SSWHHVertex.h
@@ -1,151 +1,151 @@
// -*- C++ -*-
//
// SSWHHVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSWHHVertex_H
#define HERWIG_SSWHHVertex_H
//
// This is the declaration of the SSWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* The coupling of a pair of higgs to the SM gauge bosons
* in the MSSM.
*
* @see \ref SSWHHVertexInterfaces "The interfaces"
* defined for SSWHHVertex.
*/
class SSWHHVertex: public VSSVertex {
public:
/**
* The default constructor.
*/
SSWHHVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSWHHVertex & operator=(const SSWHHVertex &);
+ SSWHHVertex & operator=(const SSWHHVertex &) = delete;
private:
/**
* The value of \f$\sin\theta_W\f$
*/
double theSw;
/**
* The value of \f$\sin2\theta_W\f$
*/
double theS2w;
/**
* The value of \f$\cos2\theta_W\f$
*/
double theC2w;
/**
* The value of \f$\sin(\beta - \alpha)\f$
*/
double thesbma;
/**
* The value of \f$\cos(\beta - \alpha)\f$
*/
double thecbma;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2last;
/**
* The value of the \f$\sqrt{4\pi\alpha}\f$ when last evaluated.
*/
double theElast;
};
}
#endif /* HERWIG_SSWHHVertex_H */
diff --git a/Models/Susy/SSWSSVertex.h b/Models/Susy/SSWSSVertex.h
--- a/Models/Susy/SSWSSVertex.h
+++ b/Models/Susy/SSWSSVertex.h
@@ -1,169 +1,169 @@
// -*- C++ -*-
//
// SSWSSVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSWSSVertex_H
#define HERWIG_SSWSSVertex_H
//
// This is the declaration of the SSWSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the coupling of an SM gauge boson to
* a pair of sfermions.
* It inherits from VSSVertex and implements the setCoupling() method.
*
* @see VSSVertex
*/
class SSWSSVertex: public VSSVertex {
public:
/**
* The default constructor.
*/
SSWSSVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSWSSVertex & operator=(const SSWSSVertex &);
+ SSWSSVertex & operator=(const SSWSSVertex &) = delete;
/**
* Value of \f$sin(\theta_w)\f$
*/
double _sw;
/**
* Value of \f$cos(\theta_w)\f$
*/
double _cw;
/**
* Scale at which the coupling was last evaluated
*/
Energy2 _q2last;
/**
* Value of coupling when last evaluated
*/
Complex _couplast;
/**
* Stau mixing matrix
*/
tMixingMatrixPtr _stau;
/**
* Stop mixing matrix
*/
tMixingMatrixPtr _stop;
/**
* Sbottom mixing matrix
*/
tMixingMatrixPtr _sbottom;
/**
* The up type sfermion present when the vertex was evaluated.
*/
long _ulast;
/**
* The down type sfermion present when the vertex was evaluated.
*/
long _dlast;
/**
* The gauge boson present when the vertex was last evaluated.
*/
long _gblast;
/**
* The value of the mixing matrix dependent part when the vertex was
* last evaluated
*/
Complex _factlast;
};
}
#endif /* HERWIG_SSWSSVertex_H */
diff --git a/Models/Susy/SSWWHHVertex.h b/Models/Susy/SSWWHHVertex.h
--- a/Models/Susy/SSWWHHVertex.h
+++ b/Models/Susy/SSWWHHVertex.h
@@ -1,129 +1,129 @@
// -*- C++ -*-
#ifndef HERWIG_SSWWHHVertex_H
#define HERWIG_SSWWHHVertex_H
//
// This is the declaration of the SSWWHHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SSWWHHVertex class.
*
* @see \ref SSWWHHVertexInterfaces "The interfaces"
* defined for SSWWHHVertex.
*/
class SSWWHHVertex: public Helicity::VVSSVertex {
public:
/**
* The default constructor.
*/
SSWWHHVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
* @param part4 The ParticleData pointer for the fourth particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3, tcPDPtr part4);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSWWHHVertex & operator=(const SSWWHHVertex &);
+ SSWWHHVertex & operator=(const SSWWHHVertex &) = delete;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* The last value of the electroweak coupling calculated.
*/
Complex couplast_;
/**
* The scale \f$q^2\f$ at which the coupling was last evaluated.
*/
Energy2 q2last_;
//@}
/**
* Prefactors for the couplings
*/
vector<Complex> coup_;
};
}
#endif /* HERWIG_SSWWHHVertex_H */
diff --git a/Models/Susy/SSWWHVertex.h b/Models/Susy/SSWWHVertex.h
--- a/Models/Susy/SSWWHVertex.h
+++ b/Models/Susy/SSWWHVertex.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
//
// SSWWHVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SSWWHVertex_H
#define HERWIG_SSWWHVertex_H
//
// This is the declaration of the SSWWHVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSVertex.h"
#include "MSSM.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a higgs in the MSSM
* to a pair of SM gauge bosons.
*
* @see \ref SSWWHVertexInterfaces "The interfaces"
* defined for SSWWHVertex.
*/
class SSWWHVertex: public VVSVertex {
public:
/**
* The default constructor.
*/
SSWWHVertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Calculate the coupling for the vertex
* @param q2 The scale to at which evaluate the coupling.
* @param particle1 The first particle in the vertex.
* @param particle2 The second particle in the vertex.
* @param particle3 The third particle in the vertex.
*/
virtual void setCoupling(Energy2 q2, tcPDPtr particle1, tcPDPtr particle2,
tcPDPtr particle3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSWWHVertex & operator=(const SSWWHVertex &);
+ SSWWHVertex & operator=(const SSWWHVertex &) = delete;
private:
/**
* The value of the factor \f$\frac{m_W \sin(\beta-\alpha)}{\sin\theta_W}\f$
*/
Energy theh0Wfact;
/**
* The value of the factor \f$\frac{m_W \cos(\beta-\alpha)}{\sin\theta_W}\f$
*/
Energy theH0Wfact;
/**
* The value of the factor
* \f$\frac{m_Z\sin(\beta-\alpha)}{\sin\theta_W\cos\theta_W}\f$
*/
Energy theh0Zfact;
/**
* The value of the factor
* \f$\frac{m_Z\cos(\beta-\alpha)}{\sin\theta_W\cos\theta_W}\f$
*/
Energy theH0Zfact;
/**
* The value of the coupling when it was last evaluated
*/
complex<Energy> theCoupLast;
/**
* The value of \f$\sqrt{4\pi \alpha(q2)}\f$ when it was last evaluated.
*/
Complex theElast;
/**
* The scale at which the coupling was last evaluated
*/
Energy2 theq2last;
/**
* The ID of the last higgs for which the vertex was evaluated
*/
long theHlast;
/**
* The ID of the last gauge boson for which the vertex was evaluated
*/
long theGBlast;
};
}
#endif /* HERWIG_SSWWHVertex_H */
diff --git a/Models/Susy/SSWWSSVertex.h b/Models/Susy/SSWWSSVertex.h
--- a/Models/Susy/SSWWSSVertex.h
+++ b/Models/Susy/SSWWSSVertex.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
#ifndef Herwig_SSWWSSVertex_H
#define Herwig_SSWWSSVertex_H
//
// This is the declaration of the SSWWSSVertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VVSSVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the SSWWSSVertex class.
*
* @see \ref SSWWSSVertexInterfaces "The interfaces"
* defined for SSWWSSVertex.
*/
class SSWWSSVertex: public VVSSVertex {
public:
/**
* The default constructor.
*/
SSWWSSVertex();
/**
* Calculate the coupling
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,
tcPDPtr part3,tcPDPtr part4);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SSWWSSVertex & operator=(const SSWWSSVertex &);
+ SSWWSSVertex & operator=(const SSWWSSVertex &) = delete;
private:
/**
* Value of \f$sin(\theta_w)\f$
*/
double sw_;
/**
* Value of \f$cos(\theta_w)\f$
*/
double cw_;
/**
* Scale at which the coupling was last evaluated
*/
Energy2 q2last_;
/**
* Value of coupling when last evaluated
*/
Complex couplast_;
/**
* Stau mixing matrix
*/
tMixingMatrixPtr stau_;
/**
* Stop mixing matrix
*/
tMixingMatrixPtr stop_;
/**
* Sbottom mixing matrix
*/
tMixingMatrixPtr sbottom_;
/**
* The up type sfermion present when the vertex was evaluated.
*/
long ulast_;
/**
* The down type sfermion present when the vertex was evaluated.
*/
long dlast_;
/**
* The first gauge boson present when the vertex was last evaluated.
*/
long gblast1_;
/**
* The second gauge boson present when the vertex was last evaluated.
*/
long gblast2_;
/**
* The value of the mixing matrix dependent part when the vertex was
* last evaluated
*/
Complex factlast_;
};
}
#endif /* Herwig_SSWWSSVertex_H */
diff --git a/Models/Susy/SusyBase.h b/Models/Susy/SusyBase.h
--- a/Models/Susy/SusyBase.h
+++ b/Models/Susy/SusyBase.h
@@ -1,712 +1,712 @@
// -*- C++ -*-
//
// SusyBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SusyBase_H
#define HERWIG_SusyBase_H
//
// This is the declaration of the SusyBase class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "MixingMatrix.h"
#include "ThePEG/Utilities/CFileLineReader.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractSSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVSSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractRFVVertex.h"
#include "SusyBase.fh"
namespace Herwig {
using namespace ThePEG;
/*@name Some convenient typedefs. */
//@{
/**
* Map to hold key, parameter pairs.
*/
typedef map<long, double> ParamMap;
/**
* Map to hold key, string pairs
*/
typedef map<long,string> StringMap;
//@}
/** \ingroup Models
* This class is designed to be a base class for SUSY models. There is
* an interface to set the name of the spectrum file to read in
* the necessary parameters for a SUSY model.
*
* @see \ref SusyBaseInterfaces "The interfaces"
* defined for SusyBase.
* @see StandardModel
*/
class SusyBase: public BSMModel {
public:
/**
* The default constructor.
*/
SusyBase();
public:
/** @name Access functions. */
//@{
/**
* Value of \f$\tan\beta\f$.
*/
double tanBeta() const { return tanBeta_; }
/**
* Value of \f$\mu\f$ parameter.
*/
Energy muParameter() const { return mu_; }
/**
* The neutralino mixing matrix
*/
const MixingMatrixPtr & neutralinoMix() const {
return NMix_;
}
/**
* The U-type chargino mixing matrix
*/
const MixingMatrixPtr & charginoUMix() const {
return UMix_;
}
/**
* The V-type chargino mixing matrix
*/
const MixingMatrixPtr & charginoVMix() const {
return VMix_;
}
/**
* The phase for gluino vertices
*/
const Complex & gluinoPhase() const {return gluinoPhase_;}
//@}
/**
* Treatment of neutrinos
*/
bool majoranaNeutrinos() const {return majoranaNeutrinos_;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Soft breaking parameters
*/
//@{
/**
* The bilinear breaking mass term for the bino
*/
const Energy & M1() const {return M1_;}
/**
* The bilinear breaking mass term for the wino
*/
const Energy & M2() const {return M2_;}
/**
* The bilinear breaking mass term for the gluinos
*/
const Energy & M3() const {return M3_;}
/**
* The soft breaking mass squared for \f$H_1\f$
*/
const Energy2 & Mh12() const {return mH12_;}
/**
* The soft breaking mass squared for \f$H_2\f$
*/
const Energy2 & Mh22() const {return mH22_;}
/**
* Soft breaking mass for the first generation lepton doublet
*/
const Energy & MeL() const {return meL_;}
/**
* Soft breaking mass for the second generation lepton doublet
*/
const Energy & MmuL() const {return mmuL_;}
/**
* Soft breaking mass for the third generation lepton doublet
*/
const Energy & MtauL() const {return mtauL_;}
/**
* Soft breaking mass for the first generation lepton singlet
*/
const Energy & MeR() const {return meR_;}
/**
* Soft breaking mass for the second generation lepton singlet
*/
const Energy & MmuR() const {return mmuR_;}
/**
* Soft breaking mass for the third generation lepton singlet
*/
const Energy & MtauR() const {return mtauR_;}
/**
* Soft breaking mass for the first generation quark doublet
*/
const Energy & Mq1L() const {return mq1L_;}
/**
* Soft breaking mass for the second generation quark doublet
*/
const Energy & Mq2L() const {return mq2L_;}
/**
* Soft breaking mass for the third generation quark doublet
*/
const Energy & Mq3L() const {return mq3L_;}
/**
* Soft breaking mass for the down singlet
*/
const Energy & MdR() const {return mdR_;}
/**
* Soft breaking mass for the up singlet
*/
const Energy & MuR() const {return muR_;}
/**
* Soft breaking mass for the strange singlet
*/
const Energy & MsR() const {return msR_;}
/**
* Soft breaking mass for the charm singlet
*/
const Energy & McR() const {return mcR_;}
/**
* Soft breaking mass for the bottom singlet
*/
const Energy & MbR() const {return mbR_;}
/**
* Soft breaking mass for the top singlet
*/
const Energy & MtR() const {return mtR_;}
//@}
/**
* Planck mass
*/
const Energy & MPlanck() const {return MPlanck_;}
protected:
/**
* Function to read information from a setup file.
* @param is istream object to read file.
*/
virtual void readSetup(istream & is);
private:
/**@name Functions to help file read-in. */
//@{
/**
* Read block from LHA file
* @param ifs input stream containg data
* @param name The name of the block
* @param line The line defining the block
*/
void readBlock(CFileLineReader & ifs,string name,string line,
bool stringBlock);
/**
* Function to read mixing matrix from LHA file
* @param ifs input stream containg data
* @param row Number of rows
* @param col Number of columns
*/
const MixingVector readMatrix(CFileLineReader & ifs, unsigned int & row,
unsigned int & col);
protected:
/**
* Create the mixing matrices for the model
*/
virtual void createMixingMatrices();
/**
* Extract the parameters from the input blocks
*/
virtual void extractParameters(bool checkmodel=true);
/**
* Create a object MixingMatrix in the repository
* @param matrix Pointer to the mixing matrix
* @param name Name of the mixing matrix, i.e. nmix, umix...
* @param values Value of each entry in the matrix
* @param size The size of the matrix
*/
void createMixingMatrix(MixingMatrixPtr & matrix, string name,
const MixingVector & values,
MatrixSize size);
/**
* Reset masses in the repository to values read from LHA file.
*/
void resetRepositoryMasses();
/**
* Adjust row of Mixing Matrix if a negative mass occurs in LHA file
* @param id The PDG code of the particle with a negative mass
*/
virtual void adjustMixingMatrix(long id);
//@}
/**
* Access to the mixings and parameters for the inheriting classes
*/
//@{
/**
* Parameter blocks
*/
const map<string,ParamMap> & parameters() const {
return parameters_;
}
/**
* Info blocks
*/
const map<string,StringMap> & info() const {
return info_;
}
/**
* Mixing blocks
*/
const map<string,pair<MatrixSize,MixingVector> > & mixings() const {
return mixings_;
}
//@}
/**
* Reset neutralino mixing matrix
*/
void neutralinoMix(MixingMatrixPtr nm) { NMix_ = nm; }
/**
* Reset the U-type chargino mixing matrix
*/
void charginoUMix(MixingMatrixPtr um) { UMix_ = um; }
/**
* Reset the V-type chargino mixing matrix
*/
void charginoVMix(MixingMatrixPtr vm) { VMix_ = vm; }
/**
* Read a parameter from a block, checking that the
* entry exists
*/
double findValue(const map<string,ParamMap>::const_iterator pit,
int iloc, const string & block,
const string & name) {
ParamMap::const_iterator it = pit->second.find(iloc);
if(it!=pit->second.end()) {
return it->second;
}
else {
ostringstream message;
message << "SusyBase::findValue() Parameter " << name << " = " << iloc
<< " not found in BLOCK " << block << "\n";
if(generator())
generator()->logWarning( Exception(message.str(), Exception::warning) );
else
cerr << message.str();
return 0.;
}
}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SusyBase & operator=(const SusyBase &);
+ SusyBase & operator=(const SusyBase &) = delete;
private:
/**
* Whether or not the SLHA file has been read
*/
bool readFile_;
/**
* Planck mass needed in GMSB models
*/
Energy MPlanck_;
/**
* Whether or not to include gravitino interactions
*/
bool gravitino_;
/**
* Treatment of the neutrinos
*/
bool majoranaNeutrinos_;
/*
* Storage of the parameters.
*/
//@{
/**
* Parameter blocks
*/
map<string,ParamMap> parameters_;
/**
* Info blocks
*/
map<string,StringMap> info_;
/**
* Mixing blocks
*/
map<string,pair<MatrixSize, MixingVector> > mixings_;
/**
* \f$\tan\beta\f$
*/
double tanBeta_;
/**
* \f$\mu\f$
*/
Energy mu_;
//@}
/**
* Soft breaking parameters
*/
//@{
/**
* The bilinear breaking mass term for the bino
*/
Energy M1_;
/**
* The bilinear breaking mass term for the wino
*/
Energy M2_;
/**
* The bilinear breaking mass term for the gluinos
*/
Energy M3_;
/**
* The soft breaking mass squared for \f$H_1\f$
*/
Energy2 mH12_;
/**
* The soft breaking mass squared for \f$H_2\f$
*/
Energy2 mH22_;
/**
* Soft breaking mass for the first generation lepton doublet
*/
Energy meL_;
/**
* Soft breaking mass for the second generation lepton doublet
*/
Energy mmuL_;
/**
* Soft breaking mass for the third generation lepton doublet
*/
Energy mtauL_;
/**
* Soft breaking mass for the first generation lepton singlet
*/
Energy meR_;
/**
* Soft breaking mass for the second generation lepton singlet
*/
Energy mmuR_;
/**
* Soft breaking mass for the third generation lepton singlet
*/
Energy mtauR_;
/**
* Soft breaking mass for the first generation quark doublet
*/
Energy mq1L_;
/**
* Soft breaking mass for the second generation quark doublet
*/
Energy mq2L_;
/**
* Soft breaking mass for the third generation quark doublet
*/
Energy mq3L_;
/**
* Soft breaking mass for the down singlet
*/
Energy mdR_;
/**
* Soft breaking mass for the up singlet
*/
Energy muR_;
/**
* Soft breaking mass for the strange singlet
*/
Energy msR_;
/**
* Soft breaking mass for the charm singlet
*/
Energy mcR_;
/**
* Soft breaking mass for the bottom singlet
*/
Energy mbR_;
/**
* Soft breaking mass for the top singlet
*/
Energy mtR_;
//@}
/**
* Phase for the gluino
*/
Complex gluinoPhase_;
/**
* Neutralino and Chargino mixing matrices
*/
//@{
/**
* Store pointers to the gaugino mixing matrices
*/
//@{
/**
* The neutralino mixing matrix
*/
MixingMatrixPtr NMix_;
/**
* The \f$U\f$ mixing matrix for the charginos
*/
MixingMatrixPtr UMix_;
/**
* The \f$V\f$ mixing matrix for the charginos
*/
MixingMatrixPtr VMix_;
//@}
/**@name Vertex pointers. */
//@{
/**
* Pointer to the gauge boson sfermion-sfermion vertex
*/
AbstractVSSVertexPtr WSFSFVertex_;
/**
* Pointer to the gauge boson pair sfermion-sfermion vertex
*/
AbstractVVSSVertexPtr WWSFSFVertex_;
/**
* Pointer to the neutralino-fermion-sfermion vertex
*/
AbstractFFSVertexPtr NFSFVertex_;
/**
* Pointer to the gluino-fermion-sfermion coupling
*/
AbstractFFSVertexPtr GFSFVertex_;
/**
* Pointer to the Higgs-sfermion-sfermion vertex
*/
AbstractSSSVertexPtr HSFSFVertex_;
/**
* Pointer to the \f$\tilde{\chi}^+\f$-fermion-sfermion vertex
*/
AbstractFFSVertexPtr CFSFVertex_;
/**
* Pointer to the gluon-sfermion-sfermion vertex
*/
AbstractVSSVertexPtr GSFSFVertex_;
/**
* Pointer to the gluon-gluon-squark-squark vertex;
*/
AbstractVVSSVertexPtr GGSQSQVertex_;
/**
* Pointer to the gauge boson-gluon-squark-squark vertex;
*/
AbstractVVSSVertexPtr WGSQSQVertex_;
/**
* Pointer to the gluon-gluino-gluino vertex
*/
AbstractFFVVertexPtr GSGSGVertex_;
/**
* Pointer to the gluino-neutralino-gluon vertex
*/
AbstractFFVVertexPtr GNGVertex_;
/**
* Pointer to the neutralino-neutralino-Z vertex
*/
AbstractFFVVertexPtr NNZVertex_;
/**
* Pointer to the neutralino-neutralino-photon vertex
*/
AbstractFFVVertexPtr NNPVertex_;
/**
* Pointer to the vertex chargino-chargino-Z vertex
*/
AbstractFFVVertexPtr CCZVertex_;
/**
* Pointer to the vertex chargino-neutralino-Z vertex
*/
AbstractFFVVertexPtr CNWVertex_;
/**
* Pointer to the vertex gaugino-gaugino-higgs vertex
*/
AbstractFFSVertexPtr GOGOHVertex_;
/**
* Pointer to the vertex for a gauge boson and higgs
*/
AbstractVSSVertexPtr WHHVertex_;
/**
* Pointer to the vertex for flavour changing stop decay
*/
AbstractFFSVertexPtr NCTVertex_;
/**
* Pointer to the vertex for gravitino-neutralino vector boson
*/
AbstractRFVVertexPtr GVNVVertex_;
/**
* Pointer to the vertex for gravitino-neutralino Higgs boson
*/
AbstractRFSVertexPtr GVNHVertex_;
/**
* Pointer to the vertex for gravitino-fermion sfermion
*/
AbstractRFSVertexPtr GVFSVertex_;
//@}
/**
* Allow the resetting of Standard Model masses
*/
bool allowedToResetSMMasses_;
};
}
#endif /* HERWIG_SusyBase_H */
diff --git a/Models/TTbAsymm/TTbAModel.h b/Models/TTbAsymm/TTbAModel.h
--- a/Models/TTbAsymm/TTbAModel.h
+++ b/Models/TTbAsymm/TTbAModel.h
@@ -1,313 +1,313 @@
// -*- C++ -*-
#ifndef HERWIG_TTbAModel_H
#define HERWIG_TTbAModel_H
//
// This is the declaration of the TTbAModel class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "TTbAModel.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* Here is the documentation of the TTbAModel class.
*
* @see \ref TTbAModelInterfaces "The interfaces"
* defined for TTbAModel.
*/
class TTbAModel: public BSMModel {
public:
/**
* The default constructor.
*/
TTbAModel();
/** @name Vertices */
//@{
/**
* Pointer to the object handling W prime vertex.
*/
tAbstractFFVVertexPtr vertexWPTD() const {return _theWPTDVertex;}
/**
* Pointer to the object handling Z prime vertex.
*/
tAbstractFFVVertexPtr vertexZPQQ() const {return _theZPQQVertex;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Return the W prime top-down left-handed coupling
*/
double _cWPTD_left() const {return _gWPTD_L;}
/**
* Return the W prime top-down right-handed coupling
*/
double _cWPTD_right() const {return _gWPTD_R;}
/**
* Return the Z prime top-up left-handed coupling
*/
double _cZPTU_left() const {return _gZPTU_L;}
/**
* Return the Z prime top-up right-handed coupling
*/
double _cZPTU_right() const {return _gZPTU_R;}
/**
* Return the Z prime up-upbar left-handed coupling
*/
double _cZPUU_left() const {return _gZPUU_L;}
/**
* Return the Z prime up-upbar right-handed coupling
*/
double _cZPUU_right() const {return _gZPUU_R;}
/**
* Return the Z prime charm-charmbar left-handed coupling
*/
double _cZPCC_left() const {return _gZPCC_L;}
/**
* Return the Z prime charm-charmbar right-handed coupling
*/
double _cZPCC_right() const {return _gZPCC_R;}
/**
* Return the axigluon q-qbar left-handed coupling
*/
double _cAGQQ_left() const {return _gAGQQ_L;}
/**
* Return the axigluon q-qbar right-handed coupling
*/
double _cAGQQ_right() const {return _gAGQQ_R;}
/**
* Return the axigluon t-tbar left-handed coupling
*/
double _cAGTT_left() const {return _gAGTT_L;}
/**
* Return the axigluon t-tbar right-handed coupling
*/
double _cAGTT_right() const {return _gAGTT_R;}
/**
* Return the alphaX value of the SU(2)_X model
*/
double _alphaX_value() const {return _alphaXparam;}
/**
* Return the costheta misalignment value of the SU(2)_X model
*/
double _costhetaX_value() const {return _costhetaXparam;}
/**
* Return the selected model id
*/
int _model() const {return _modelselect;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TTbAModel & operator=(const TTbAModel &);
+ TTbAModel & operator=(const TTbAModel &) = delete;
/**
* Pointer to the object handling the Wp to Top Down vertex.
*/
AbstractFFVVertexPtr _theWPTDVertex;
/**
* Pointer to the object handling the Zp to Quark-antiQuark vertex.
*/
AbstractFFVVertexPtr _theZPQQVertex;
/**
* Pointer to the object handling the Ag to Quark-antiQuark vertex.
*/
AbstractFFVVertexPtr _theAGQQVertex;
/**
* Pointer to the object handling the SU(2)_X vertex.
*/
AbstractFFVVertexPtr _theSU2XVertex;
/**
* W prime coupling to top-down (left-handed)
*/
double _gWPTD_L;
/**
* W prime coupling to top-down (right-handed)
*/
double _gWPTD_R;
/**
* Z prime coupling to top-up (left-handed)
*/
double _gZPTU_L;
/**
* Z prime coupling to top-up (right-handed)
*/
double _gZPTU_R;
/**
* Z prime coupling to up-upbar (left-handed)
*/
double _gZPUU_L;
/**
* Z prime coupling to up-upbar (right-handed)
*/
double _gZPUU_R;
/**
* Z prime coupling to charm-charmbar (left-handed)
*/
double _gZPCC_L;
/**
* Z prime coupling to charm-charmbar (right-handed)
*/
double _gZPCC_R;
/**
* Axigluon coupling to q-qbar (left-handed)
*/
double _gAGQQ_L;
/**
* Axigluon coupling to q-qbar (right-handed)
*/
double _gAGQQ_R;
/**
* Axigluon coupling to t-tbar (left-handed)
*/
double _gAGTT_L;
/**
* Axigluon coupling to t-tbar (right-handed)
*/
double _gAGTT_R;
/**
* SU(2)_X alpha_X parameter
*/
double _alphaXparam;
/**
* SU(2)_X costheta misalignment angle
*/
double _costhetaXparam;
/**
* Model selector
*/
int _modelselect;
};
}
#endif /* HERWIG_TTbAModel_H */
diff --git a/Models/TTbAsymm/TTbAModelAGQQVertex.h b/Models/TTbAsymm/TTbAModelAGQQVertex.h
--- a/Models/TTbAsymm/TTbAModelAGQQVertex.h
+++ b/Models/TTbAsymm/TTbAModelAGQQVertex.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
//
// TTbAModelAGQQVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TTbAModelAGQQVertex_H
#define HERWIG_TTbAModelAGQQVertex_H
//
// This is the declaration of the TTbAModelAGQQVertex class.
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Models/TTbAsymm/TTbAModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vertex coupling the Standard Model Higgs
* to the Standard Model fermions for helicity amplitude calculations
*
* @see FFVVertex
* @see VertexBase
*/
class TTbAModelAGQQVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
TTbAModelAGQQVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- TTbAModelAGQQVertex & operator=(const TTbAModelAGQQVertex &);
+ TTbAModelAGQQVertex & operator=(const TTbAModelAGQQVertex &) = delete;
/**
* Pointer to the model object.
*/
tcSMPtr _theModel;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* Axigluon coupling to q-qbar (left-handed)
*/
double _cAGQQ_L;
/**
* Axigluon coupling to q-qbar (right-handed)
*/
double _cAGQQ_R;
/**
* Axigluon coupling to t-tbar (left-handed)
*/
double _cAGTT_L;
/**
* Axigluon coupling to t-tbar (right-handed)
*/
double _cAGTT_R;
/**
* Model selector
*/
int _models;
//@}
};
}
#endif /* HERWIG_TTbAModelAGQQVertex_H */
diff --git a/Models/TTbAsymm/TTbAModelSU2XVertex.h b/Models/TTbAsymm/TTbAModelSU2XVertex.h
--- a/Models/TTbAsymm/TTbAModelSU2XVertex.h
+++ b/Models/TTbAsymm/TTbAModelSU2XVertex.h
@@ -1,144 +1,144 @@
// -*- C++ -*-
//
// TTbAModelSU2XVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TTbAModelSU2XVertex_H
#define HERWIG_TTbAModelSU2XVertex_H
//
// This is the declaration of the TTbAModelSU2XVertex class.
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Models/TTbAsymm/TTbAModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vertex coupling the Standard Model Higgs
* to the Standard Model fermions for helicity amplitude calculations
*
* @see FFVVertex
* @see VertexBase
*/
class TTbAModelSU2XVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
TTbAModelSU2XVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- TTbAModelSU2XVertex & operator=(const TTbAModelSU2XVertex &);
+ TTbAModelSU2XVertex & operator=(const TTbAModelSU2XVertex &) = delete;
/**
* Pointer to the model object.
*/
tcSMPtr _theModel;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* alpha_X coupling for the SU(2)_X gauge
*/
double _alphaX;
/**
* Misalignment angle cosine
*/
double _costhetaX;
/**
* coupling strength for the SU(2)_X gauge
*/
double _gX;
/**
* Model selector
*/
int _models;
//@}
};
}
#endif /* HERWIG_TTbAModelSU2XVertex_H */
diff --git a/Models/TTbAsymm/TTbAModelWPTDVertex.h b/Models/TTbAsymm/TTbAModelWPTDVertex.h
--- a/Models/TTbAsymm/TTbAModelWPTDVertex.h
+++ b/Models/TTbAsymm/TTbAModelWPTDVertex.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
//
// TTbAModelWPTDVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TTbAModelWPTDVertex_H
#define HERWIG_TTbAModelWPTDVertex_H
//
// This is the declaration of the TTbAModelWPTDVertex class.
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Models/TTbAsymm/TTbAModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vertex coupling the Standard Model Higgs
* to the Standard Model fermions for helicity amplitude calculations
*
* @see FFVVertex
* @see VertexBase
*/
class TTbAModelWPTDVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
TTbAModelWPTDVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- TTbAModelWPTDVertex & operator=(const TTbAModelWPTDVertex &);
+ TTbAModelWPTDVertex & operator=(const TTbAModelWPTDVertex &) = delete;
/**
* Pointer to the model object.
*/
tcSMPtr _theModel;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* W prime coupling to top-down (left-handed)
*/
double _cWPTD_L;
/**
* W prime coupling to top-down (right-handed)
*/
double _cWPTD_R;
/**
* Model selector
*/
int _models;
//@}
};
}
#endif /* HERWIG_TTbAModelWPTDVertex_H */
diff --git a/Models/TTbAsymm/TTbAModelZPQQVertex.h b/Models/TTbAsymm/TTbAModelZPQQVertex.h
--- a/Models/TTbAsymm/TTbAModelZPQQVertex.h
+++ b/Models/TTbAsymm/TTbAModelZPQQVertex.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
//
// TTbAModelZPQQVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TTbAModelZPQQVertex_H
#define HERWIG_TTbAModelZPQQVertex_H
//
// This is the declaration of the TTbAModelZPQQVertex class.
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Models/TTbAsymm/TTbAModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vertex coupling the Standard Model Higgs
* to the Standard Model fermions for helicity amplitude calculations
*
* @see FFVVertex
* @see VertexBase
*/
class TTbAModelZPQQVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
TTbAModelZPQQVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- TTbAModelZPQQVertex & operator=(const TTbAModelZPQQVertex &);
+ TTbAModelZPQQVertex & operator=(const TTbAModelZPQQVertex &) = delete;
/**
* Pointer to the model object.
*/
tcSMPtr _theModel;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* Z prime coupling to top-up (left-handed)
*/
double _cZPTU_L;
/**
* Z prime coupling to top-up (right-handed)
*/
double _cZPTU_R;
/**
* Z prime coupling to up-upbar (left-handed)
*/
double _cZPUU_L;
/**
* Z prime coupling to up-upbar (right-handed)
*/
double _cZPUU_R;
/**
* Z prime coupling to charm-charmbar (left-handed)
*/
double _cZPCC_L;
/**
* Z prime coupling to charm-charmbar (right-handed)
*/
double _cZPCC_R;
/**
* Model selector
*/
int _models;
//@}
};
}
#endif /* HERWIG_TTbAModelZPQQVertex_H */
diff --git a/Models/Transplanckian/METRP2to2.h b/Models/Transplanckian/METRP2to2.h
--- a/Models/Transplanckian/METRP2to2.h
+++ b/Models/Transplanckian/METRP2to2.h
@@ -1,235 +1,237 @@
// -*- C++ -*-
//
// METRP2to2.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2009-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_METRP2to2_H
#define HERWIG_METRP2to2_H
//
// This is the declaration of the METRP2to2 class.
//
// The implementation of this process is based upon hep-ph/0112161 by G.F. Giudice, R. Rattazzi, J.D. Wells.
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/Repository/UseRandom.h"
#include "Herwig/Utilities/Interpolator.h"
namespace Herwig {
using namespace ThePEG;
/**
* The METRP2to2 class implements the matrix elements for
* Transplanckian \f$2\to2\f$ scattering process
+ *
+ * @see \ref METRP2to2Interfaces "The interfaces" defined for METRP2to2.
*/
class METRP2to2: public HwMEBase {
public:
/**
* The default constructor.
*/
METRP2to2();
/** @name Virtual functions required by the MEBase class. */
//@{
/**
* Return the order in \f$\alpha_S\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaS() const { return 0; }
/**
* Return the order in \f$\alpha_{EW}\f$ in which this matrix
* element is given.
*/
virtual unsigned int orderInAlphaEW() const { return 0; }
/**
* Return the scale associated with the last set phase space point.
*/
virtual Energy2 scale() const;
/**
* Add all possible diagrams with the add() function.
*/
virtual void getDiagrams() const;
/**
* Get diagram selector. With the information previously supplied with the
* setKinematics method, a derived class may optionally
* override this method to weight the given diagrams with their
* (although certainly not physical) relative probabilities.
* @param dv the diagrams to be weighted.
* @return a Selector relating the given diagrams to their weights.
*/
virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const;
/**
* Return a Selector with possible colour geometries for the selected
* diagram weighted by their relative probabilities.
* @param diag the diagram chosen.
* @return the possible colour geometries weighted by their
* relative probabilities.
*/
virtual Selector<const ColourLines *>
colourGeometries(tcDiagPtr diag) const;
/**
* The matrix element for the kinematical configuration
* previously provided by the last call to setKinematics(), suitably
* scaled by sHat() to give a dimension-less number.
* @return the matrix element scaled with sHat() to give a
* dimensionless number.
*/
virtual double me2() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans);
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Helper functions for me2. */
//@{
/**
* The function which calculates b_c according to hep-ph/0112161, eq.(18)
*/
InvEnergy bccalc(Energy2 s) const;
/**
* A_ny calculates part of the matrix element squared (divided by 16 * pi^2) according to hep-ph/0112161. eq.(19)
*/
double A_ny(Energy2 s, Energy2 t) const;
/**
* fpoint initializes the matrix of pre-calculated points for the functions F_n(y) (hep-ph/0112161, eq.(20)
*/
double fpoint(double x) const;
/**
* The asymptotic form of the F_n(y) functions, used for y>20, according to hep-ph/0112161, eq. (25)
*/
double fnyasympt(double y) const;
//@}
/**
* Setup the interpolator
*/
void setup_interpolator();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- METRP2to2 & operator=(const METRP2to2 &);
+ METRP2to2 & operator=(const METRP2to2 &) = delete;
private:
/**
* Interpolator
*/
Interpolator<double, double>::Ptr _interpol;
/**
* Maximum number of quark flavours to include
*/
unsigned int _maxflavour;
/**
* Number of Extra dimensions (>=2)
*/
unsigned int _ndim;
/**
* The Extra-dimensional Planck mass
*/
Energy _planckmass;
/**
* Processes to include
*/
unsigned int _process;
};
}
#endif /* HERWIG_METRP2to2_H */
diff --git a/Models/UED/UEDBase.h b/Models/UED/UEDBase.h
--- a/Models/UED/UEDBase.h
+++ b/Models/UED/UEDBase.h
@@ -1,341 +1,341 @@
// -*- C++ -*-
//
// UEDBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDBase_H
#define HERWIG_UEDBase_H
//
// This is the declaration of the UEDBase class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h"
#include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h"
#include "UEDBase.fh"
namespace Herwig {
using namespace ThePEG;
/**
* This class serves as a base class for all UED models. It stores the
* values of the inverse radius and the product \f$\Lambda R \f$ and has functions
* to calculate the radiative corrections to the nth level KK excitations.
*
* To use this class for n > 1 simply inherit off it, calculate the necessary masses
* using the provided functions for the new excitations and add the
* appropriate vertices.
*
* @see \ref UEDBaseInterfaces "The interfaces"
* defined for UEDBase.
*/
class UEDBase: public BSMModel {
public:
/** Typedef for ID-Mass pair. */
typedef pair<long, Energy> IDMassPair;
/** Typedef for unsigned int/double map to store Weinburg angles.*/
typedef map<unsigned int, double> WAMap;
public:
/**
* The default constructor.
*/
UEDBase();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/** @name Public Access Functions.*/
//@{
/**
* Return the compactification radius
*/
InvEnergy compactRadius() const {
return 1./theInvRadius;
}
/**
* Return the Weinburg mixing angle for any level.
*/
double sinThetaN(const unsigned int n) const;
/**
* Return the Weinburg mixing angle for \f$n = 1\f$
*/
double sinThetaOne() const {
return theSinThetaOne;
}
//@}
protected:
/**
* Add a new ID,mass pair to the mass storage
* @param elem The element to add in to storage
*/
void addMassElement(IDMassPair elem) {
theMasses.push_back(elem);
}
/**
* Add a new mixing angle to the storage
* @param n The level
* @param val The value
*/
void addMixingAngle(const unsigned int n,
const double val) {
theMixingAngles.insert(make_pair(n, val));
}
private:
/** @name Utility Functions for calculating masses. */
//@{
/**
* Calculate the radiative corrections to the masses of the KK excitations
* @param n The KK-level for which to calculate the masses.
*/
void calculateKKMasses(const unsigned int n);
/**
* Calculate the radiative corrections to the spin-0 and spin-1
* masses of the KK excitations
* @param n The KK-level for which to calculate the masses.
*/
void bosonMasses(const unsigned int n);
/**
* Calculate the radiative corrections to the spin-1/2
* masses of the KK excitations.
* @param n The KK-level for which to calculate the masses.
*/
void fermionMasses(const unsigned int n);
/**
* Reset the mass of the ParticleData object
*@param id The id of the particles mass to reset
*@param value The new mass
*/
void resetMass(long id, Energy value);
/**
* Calculate the Weinburg Mixing angle for the appropriate level.
* @param n The KK-level for which to calculate the mixing angle.
*/
double calculateMixingAngle(const unsigned int n);
//@}
/**
* Write out a spectrum file ordered in mass (name can be set by an interface).
*/
void writeSpectrum();
/**
* A predicate for sorting the list of masses.
*/
static bool lowerMass(const pair<long, Energy> & p1,
const pair<long, Energy> & p2) {
return p1.second < p2.second;
}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDBase & operator=(const UEDBase &);
+ UEDBase & operator=(const UEDBase &) = delete;
private:
/**
* Whether to calculate the radiative corrections to the KK masses
*/
bool theRadCorr;
/**
* Store the radius of the compactified dimension.
*/
Energy theInvRadius;
/**
* The value of \f$\Lambda R \f$.
*/
double theLambdaR;
/**
* The boundary mass term for the Higgs.
*/
Energy theMbarH;
/**
* The values of \f$\sin\theta_N\f$
*/
WAMap theMixingAngles;
/**
* Store \f$\sin\theta_1\f$ for faster access
*/
double theSinThetaOne;
/**
* Store the masses of the new particles
*/
vector<IDMassPair> theMasses;
/**
* The value of the vacuum expectation value of the higgs field.
*/
Energy theVeV;
/**
* Include SM masses in calculation of KK masses
*/
bool includeSMMass_;
/**
* Use fixed couplings for the mass calculation
*/
bool fixedCouplings_;
/**
* Include gauge boson mixing
*/
bool includeGaugeMixing_;
/** @name The level 1 UED vertices. */
//@{
/**
* The \f$\bar{f}^{(1)}f^{(1)}Z^{(0)}\f$
*/
AbstractFFVVertexPtr theF1F1Z0Vertex;
/**
* The \f$\bar{f}^{(1)}f^{(1)}g^{(0)}\f$
*/
AbstractFFVVertexPtr theF1F1G0Vertex;
/**
* The \f$\bar{f}^{(1)}f^{(0)}g^{(1)}\f$
*/
AbstractFFVVertexPtr theF1F0G1Vertex;
/**
* The \f$g^{(1)}g^{(1)}g\f$ vertex
*/
AbstractVVVVertexPtr theG1G1G0Vertex;
/**
* The \f$g\,g\,g^{(1)},g^{(1)}\f$ vertex
*/
AbstractVVVVVertexPtr theG0G0G1G1Vertex;
/**
* The \f$\bar{f}^{(1)}f^{(1)}\gamma\f$
*/
AbstractFFVVertexPtr theF1F1P0Vertex;
/**
* The \f$\bar{f}^{(1)}f^{(1)}W\f$
*/
AbstractFFVVertexPtr theF1F1W0Vertex;
/**
* The \f$\bar{f}^{(1)}f^{(0)}W^{(1)}\f$
*/
AbstractFFVVertexPtr theF1F0W1Vertex;
/**
* The \f$\bar{f}^{(1)}f^{(0)}H^{(1)}\f$
*/
AbstractFFSVertexPtr theF1F0H1Vertex;
/**
* The \f$ A^\mu_{(0)}H^+_{(1)}H-_{(1)}\f$
*/
AbstractVSSVertexPtr theP0H1H1Vertex;
/**
* The \f$ Z^\mu_{(0)}H^+_{(1)}H-_{(1)}\f$
*/
AbstractVSSVertexPtr theZ0H1H1Vertex;
/**
* The \f$ W^\pm_{\mu(0)}A_{(1)}H^\mp_{(1)}\f$
*/
AbstractVSSVertexPtr theW0A1H1Vertex;
/**
* The \f$ Z^\mu_{\mu(0)}A_{(1)}h_{(1)}\f$
*/
AbstractVSSVertexPtr theZ0A1h1Vertex;
/**
* The \f$W^{(1)}Z^{(1)}W_{(0)}\f$ vertex
*/
AbstractVVVVertexPtr theW0W1W1Vertex;
//@}
};
}
#endif /* HERWIG_UEDBase_H */
diff --git a/Models/UED/UEDF1F0G1Vertex.h b/Models/UED/UEDF1F0G1Vertex.h
--- a/Models/UED/UEDF1F0G1Vertex.h
+++ b/Models/UED/UEDF1F0G1Vertex.h
@@ -1,105 +1,105 @@
// -*- C++ -*-
//
// UEDF1F0G1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F0G1Vertex_H
#define HERWIG_UEDF1F0G1Vertex_H
//
// This is the declaration of the UEDF1F0G1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the \f$\bar{f}^{1}f^{0}g^{(1)}\f$ vertex
*
* @see \ref UEDF1F0G1VertexInterfaces "The interfaces"
* defined for UEDF1F0G1Vertex.
*/
class UEDF1F0G1Vertex: public FFVVertex {
public:
/**
* The default constructor.
*/
UEDF1F0G1Vertex();
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDF1F0G1Vertex & operator=(const UEDF1F0G1Vertex &);
+ UEDF1F0G1Vertex & operator=(const UEDF1F0G1Vertex &) = delete;
private:
/**
* The energy at which the coupling was last evaluated
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDF1F0G1Vertex_H */
diff --git a/Models/UED/UEDF1F0H1Vertex.h b/Models/UED/UEDF1F0H1Vertex.h
--- a/Models/UED/UEDF1F0H1Vertex.h
+++ b/Models/UED/UEDF1F0H1Vertex.h
@@ -1,175 +1,175 @@
// -*- C++ -*-
//
// UEDF1F0H1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F0H1Vertex_H
#define HERWIG_UEDF1F0H1Vertex_H
//
// This is the declaration of the UEDF1F0H1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/FFSVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The implementation of the \f$ f_{(1)}f_{(0)}H_{(1)}^\pm\f$ vertex. It inherits
* from FFSVertex and implements the setCoupling member function.
*
* @see \ref UEDF1F0H1VertexInterfaces "The interfaces"
* defined for UEDF1F0H1Vertex.
*/
class UEDF1F0H1Vertex: public FFSVertex {
public:
/**
* The default constructor.
*/
UEDF1F0H1Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDF1F0H1Vertex & operator=(const UEDF1F0H1Vertex &);
+ UEDF1F0H1Vertex & operator=(const UEDF1F0H1Vertex &) = delete;
private:
/**
* The compactification radius.
*/
InvEnergy theRadius;
/**
* The mass of the \f$W\f$-boson.
*/
Energy theMw;
/**
* The mass of the \f$Z\f$-boson.
*/
Energy theMz;
/**
* The value of \f$\sin\Theta_W\f$.
*/
double theSinThetaW;
/**
* The value of \f$\cos\Theta_W\f$.
*/
double theCosThetaW;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCoupLast;
/**
* The value of the left coupling when it was last evaluated.
*/
Complex theLeftLast;
/**
* The value of the right coupling when it was last evaluated.
*/
Complex theRightLast;
/**
* The PDG code of the 1st particle at the vertex when it was last evaluated
*/
long theAntiLast;
/**
* The PDG code of the 2nd particle at the vertex when it was last evaluated
*/
long theFermLast;
/**
* The PDG code of the Higgs particle at the vertex when it was last
* evaluated
*/
long theHLast;
};
}
#endif /* HERWIG_UEDF1F0H1Vertex_H */
diff --git a/Models/UED/UEDF1F0W1Vertex.h b/Models/UED/UEDF1F0W1Vertex.h
--- a/Models/UED/UEDF1F0W1Vertex.h
+++ b/Models/UED/UEDF1F0W1Vertex.h
@@ -1,185 +1,185 @@
// -*- C++ -*-
//
// UEDF1F0W1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F0W1Vertex_H
#define HERWIG_UEDF1F0W1Vertex_H
//
// This is the declaration of the UEDF1F0W1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the \f$ \bar{f}^{(1)} f^{(0)} W^{(1)}\f$ coupling, where
* \f$W^{(1)}\f$ is any level 1 EW gauge boson. The class
* inherits from FFVVertex and implements the setCoupling virtual member.
*
* @see \ref UEDF1F0W1VertexInterfaces "The interfaces"
* defined for UEDF1F0W1Vertex.
*/
class UEDF1F0W1Vertex: public FFVVertex {
public:
/**
* The default constructor.
*/
UEDF1F0W1Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDF1F0W1Vertex & operator=(const UEDF1F0W1Vertex &);
+ UEDF1F0W1Vertex & operator=(const UEDF1F0W1Vertex &) = delete;
private:
/**
* The value of \f$\sin\theta_W\f$
*/
double theSinW;
/**
* The value of \f$\cos\theta_W\f$
*/
double theCosW;
/**
* The value of \f$\sin\theta_1\f$
*/
double theSinOne;
/**
* The value of \f$\cos\theta_1\f$
*/
double theCosOne;
/**
* The value of \f$\sin(\theta_W - \theta_1)\f$
*/
double theSinWmO;
/**
* The value of \f$\cos(\theta_W - \theta_1)\f$
*/
double theCosWmO;
/**
* Store the CKM matrix for the \f$W\f$ interactions
*/
vector< vector<Complex> > theCKM;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2last;
/**
* The value of \f$\sqrt{4\pi\alpha}\f$ when it was last evaluated.
*/
Complex theCouplast;
/**
* The value of the left coupling when it was last evaluated.
*/
Complex theLlast;
/**
* The value of the right coupling when it was last evaluated.
*/
Complex theRlast;
/**
* The last gauge boson in the vertex
*/
long theGBlast;
/**
* The last KK-fermion in the vertex
*/
long theKKlast;
/**
* The last SM fermion in the vertex
*/
long theSMlast;
};
}
#endif /* HERWIG_UEDF1F0W1Vertex_H */
diff --git a/Models/UED/UEDF1F1G0Vertex.h b/Models/UED/UEDF1F1G0Vertex.h
--- a/Models/UED/UEDF1F1G0Vertex.h
+++ b/Models/UED/UEDF1F1G0Vertex.h
@@ -1,105 +1,105 @@
// -*- C++ -*-
//
// UEDF1F1G0Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F1G0Vertex_H
#define HERWIG_UEDF1F1G0Vertex_H
//
// This is the declaration of the UEDF1F1G0Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the \f$\bar{f}^{1}f^{(1)}g\f$ vertex
*
* @see \ref UEDF1F1G0VertexInterfaces "The interfaces"
* defined for UEDF1F1G0Vertex.
*/
class UEDF1F1G0Vertex: public FFVVertex {
public:
/**
* The default constructor.
*/
UEDF1F1G0Vertex();
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDF1F1G0Vertex & operator=(const UEDF1F1G0Vertex &);
+ UEDF1F1G0Vertex & operator=(const UEDF1F1G0Vertex &) = delete;
private:
/**
* The energy at which the coupling was last evaluated
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDF1F1G0Vertex_H */
diff --git a/Models/UED/UEDF1F1P0Vertex.h b/Models/UED/UEDF1F1P0Vertex.h
--- a/Models/UED/UEDF1F1P0Vertex.h
+++ b/Models/UED/UEDF1F1P0Vertex.h
@@ -1,137 +1,137 @@
// -*- C++ -*-
//
// UEDF1F1P0Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F1P0Vertex_H
#define HERWIG_UEDF1F1P0Vertex_H
//
// This is the declaration of the UEDF1F1P0Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a pair of level-1 KK
* fermions to a standard Model photon.
*
* @see \ref UEDF1F1P0VertexInterfaces "The interfaces"
* defined for UEDF1F1P0Vertex.
*/
class UEDF1F1P0Vertex: public FFVVertex {
public:
/**
* The default constructor.
*/
UEDF1F1P0Vertex();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDF1F1P0Vertex & operator=(const UEDF1F1P0Vertex &);
+ UEDF1F1P0Vertex & operator=(const UEDF1F1P0Vertex &) = delete;
private:
/**
* The value of the coupling when it was last evaluated .
*/
Complex coupLast_;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 q2Last_;
/**
* The id of the last fermion that the vertex was evaluated for
*/
long fermLast_;
/**
* The value of the left/right coupling when it was last evaluated.
*/
Complex LRLast_;
/**
* The charges of the fermions
*/
vector<double> charges_;
};
}
#endif /* HERWIG_UEDF1F1P0Vertex_H */
diff --git a/Models/UED/UEDF1F1W0Vertex.h b/Models/UED/UEDF1F1W0Vertex.h
--- a/Models/UED/UEDF1F1W0Vertex.h
+++ b/Models/UED/UEDF1F1W0Vertex.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
//
// UEDF1F1W0Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F1W0Vertex_H
#define HERWIG_UEDF1F1W0Vertex_H
//
// This is the declaration of the UEDF1F1W0Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a pair of level-1
* fermions to the SM $W$ boson.
*
* @see \ref UEDF1F1W0VertexInterfaces "The interfaces"
* defined for UEDF1F1W0Vertex.
*/
class UEDF1F1W0Vertex: public FFVVertex {
public:
/**
* The default constructor.
*/
UEDF1F1W0Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDF1F1W0Vertex & operator=(const UEDF1F1W0Vertex &);
+ UEDF1F1W0Vertex & operator=(const UEDF1F1W0Vertex &) = delete;
private:
/**
* Whether or not to include mixing
*/
bool includeMixing_;
/**
* The value of the inverse radius
*/
InvEnergy theRadius;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theQ2Last;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCoupLast;
/**
* The value of the left coupling when it was last evaluated.
*/
Complex theLeftLast;
/**
* The PDG code of the first fermion for which the vertex was last evaluated.
*/
long thefermALast;
/**
* The PDG code of the second fermion for which the vertex was last evaluated.
*/
long thefermBLast;
};
}
#endif /* HERWIG_UEDF1F1W0Vertex_H */
diff --git a/Models/UED/UEDF1F1Z0Vertex.h b/Models/UED/UEDF1F1Z0Vertex.h
--- a/Models/UED/UEDF1F1Z0Vertex.h
+++ b/Models/UED/UEDF1F1Z0Vertex.h
@@ -1,164 +1,164 @@
// -*- C++ -*-
//
// UEDF1F1Z0Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F1Z0Vertex_H
#define HERWIG_UEDF1F1Z0Vertex_H
//
// This is the declaration of the UEDF1F1Z0Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the level-1 fermion-fermion Z-boson.
* It inherits from FFVVertex and implements the setCoupling member.
*
* @see \ref UEDF1F1Z0VertexInterfaces "The interfaces"
* defined for UEDF1F1Z0Vertex.
*/
class UEDF1F1Z0Vertex: public FFVVertex {
public:
/**
* The default constructor.
*/
UEDF1F1Z0Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDF1F1Z0Vertex & operator=(const UEDF1F1Z0Vertex &);
+ UEDF1F1Z0Vertex & operator=(const UEDF1F1Z0Vertex &) = delete;
private:
/**
* The value if \f$\sin^2\theta_W\f$
*/
double theSin2ThW;
/**
* The value if \f$\cos\theta_W\f$
*/
double theCosThW;
/**
* The value of the inverse radius
*/
InvEnergy theRadius;
/**
* The PDG code of the 1st fermion when the vertex was last evaluated
*/
long theID1Last;
/**
* The PDG code of the 2nd fermion when the vertex was last evaluated
*/
long theID2Last;
/**
* The energy where the coupling was last evaluated
*/
Energy2 theq2Last;
/**
*
* The value of the coupling when it was last evaluated
*/
Complex theCoupLast;
/**
*
* The value of the coupling when it was last evaluated
*/
Complex theLeftLast;
/**
*
* The value of the coupling when it was last evaluated
*/
Complex theRightLast;
};
}
#endif /* HERWIG_UEDF1F1Z0Vertex_H */
diff --git a/Models/UED/UEDG0G0G1G1Vertex.h b/Models/UED/UEDG0G0G1G1Vertex.h
--- a/Models/UED/UEDG0G0G1G1Vertex.h
+++ b/Models/UED/UEDG0G0G1G1Vertex.h
@@ -1,105 +1,105 @@
// -*- C++ -*-
//
// UEDG0G0G1G1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDG0G0G1G1Vertex_H
#define HERWIG_UEDG0G0G1G1Vertex_H
//
// This is the declaration of the UEDG0G0G1G1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVVertex.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the implementation of the coupling of two Standard
* Model gluons to a pair of level 1 KK gluons.
*
* @see \ref UEDG0G0G1G1VertexInterfaces "The interfaces"
* defined for UEDG0G0G1G1Vertex.
*/
class UEDG0G0G1G1Vertex: public Helicity::VVVVVertex {
public:
/**
* The default constructor.
*/
UEDG0G0G1G1Vertex();
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*@param part4 The fourth interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3, tcPDPtr part4);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDG0G0G1G1Vertex & operator=(const UEDG0G0G1G1Vertex &);
+ UEDG0G0G1G1Vertex & operator=(const UEDG0G0G1G1Vertex &) = delete;
private:
/**
* The scale at which the coupling was last evaluated
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDG0G0G1G1Vertex_H */
diff --git a/Models/UED/UEDG1G1G0Vertex.h b/Models/UED/UEDG1G1G0Vertex.h
--- a/Models/UED/UEDG1G1G0Vertex.h
+++ b/Models/UED/UEDG1G1G0Vertex.h
@@ -1,108 +1,108 @@
// -*- C++ -*-
//
// UEDG1G1G0Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDG1G1G0Vertex_H
#define HERWIG_UEDG1G1G0Vertex_H
//
// This is the declaration of the UEDG1G1G0Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::Direction;
/**
* This is the implementation of the Feynman rule for the coupling
* of Standard Model gluon to a pair of (level1) KK excited gluons.
*
* @see \ref UEDG1G1G0VertexInterfaces "The interfaces"
* defined for UEDG1G1G0Vertex.
*/
class UEDG1G1G0Vertex: public VVVVertex {
public:
/**
* The default constructor.
*/
UEDG1G1G0Vertex();
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDG1G1G0Vertex & operator=(const UEDG1G1G0Vertex &);
+ UEDG1G1G0Vertex & operator=(const UEDG1G1G0Vertex &) = delete;
private:
/**
* The scale at which the coupling was last evaluated
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDG1G1G0Vertex_H */
diff --git a/Models/UED/UEDP0H1H1Vertex.h b/Models/UED/UEDP0H1H1Vertex.h
--- a/Models/UED/UEDP0H1H1Vertex.h
+++ b/Models/UED/UEDP0H1H1Vertex.h
@@ -1,108 +1,108 @@
// -*- C++ -*-
//
// UEDP0H1H1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDP0H1H1Vertex_H
#define HERWIG_UEDP0H1H1Vertex_H
//
// This is the declaration of the UEDP0H1H1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The implementation of the \f$A^\mu_{(0)}H_{(1)}^+H_{(1)}^-\f$ vertex. This
* class inherits from VSSVertex and implements the setCoupling member function.
*
* @see \ref UEDP0H1H1VertexInterfaces "The interfaces"
* defined for UEDP0H1H1Vertex.
*/
class UEDP0H1H1Vertex: public VSSVertex {
public:
/**
* The default constructor.
*/
UEDP0H1H1Vertex();
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDP0H1H1Vertex & operator=(const UEDP0H1H1Vertex &);
+ UEDP0H1H1Vertex & operator=(const UEDP0H1H1Vertex &) = delete;
private:
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDP0H1H1Vertex_H */
diff --git a/Models/UED/UEDW0A1H1Vertex.h b/Models/UED/UEDW0A1H1Vertex.h
--- a/Models/UED/UEDW0A1H1Vertex.h
+++ b/Models/UED/UEDW0A1H1Vertex.h
@@ -1,141 +1,141 @@
// -*- C++ -*-
//
// UEDW0A1H1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDW0A1H1Vertex_H
#define HERWIG_UEDW0A1H1Vertex_H
//
// This is the declaration of the UEDW0A1H1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This is the coupling for the vertex \f$ W_{\mu(0)}^\pm A_{(1)}^0 H^\mp_{(1)}\f$.
* It takes the form:
* \f[\pm\frac{g(m_W^2 R^2 + 1/2)}{\sqrt{(1 + m_W^2)(1 + m_Z^2)}}
* \left(p(H_1^\mp) - p(A_1)\right)_\mu \f]
*
* @see \ref UEDW0A1H1VertexInterfaces "The interfaces"
* defined for UEDW0A1H1Vertex.
*/
class UEDW0A1H1Vertex: public VSSVertex {
public:
/**
* The default constructor.
*/
UEDW0A1H1Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDW0A1H1Vertex & operator=(const UEDW0A1H1Vertex &);
+ UEDW0A1H1Vertex & operator=(const UEDW0A1H1Vertex &) = delete;
private:
/**
* The mass-squared of the \f$W\f$ boson.
*/
Energy2 theMw2;
/**
* The mass-squared of the \f$Z\f$ boson.
*/
Energy2 theMz2;
/**
* The square of the compactification radius.
*/
InvEnergy2 theR2;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDW0A1H1Vertex_H */
diff --git a/Models/UED/UEDW0W1W1Vertex.h b/Models/UED/UEDW0W1W1Vertex.h
--- a/Models/UED/UEDW0W1W1Vertex.h
+++ b/Models/UED/UEDW0W1W1Vertex.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
//
// UEDW0W1W1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDW0W1W1Vertex_H
#define HERWIG_UEDW0W1W1Vertex_H
//
// This is the declaration of the UEDW0W1W1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/VVVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
using ThePEG::Helicity::Direction;
/**
* The coupling for the \f$ W\,W^{(1)}Z^{(1)}\f$ and \f$ W\,W^{(1)}\gamma^{(1)}\f$
* vertex . The class inherits from VVVVertex and implements
* the setCoupling member.
*
* @see \ref UEDW0W1W1VertexInterfaces "The interfaces"
* defined for UEDW0W1W1Vertex.
*/
class UEDW0W1W1Vertex: public VVVVertex {
public:
/**
* The default constructor.
*/
UEDW0W1W1Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,
tcPDPtr part2,tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDW0W1W1Vertex & operator=(const UEDW0W1W1Vertex &);
+ UEDW0W1W1Vertex & operator=(const UEDW0W1W1Vertex &) = delete;
private:
/**
* The value of \f$\sin\theta_W\f$.
*/
double theSinW;
/**
* The value of \f$\cos\theta_W\f$.
*/
double theCosW;
/**
* The value of \f$\sin\theta_1\f$.
*/
double theSinThetaOne;
/**
* The value of \f$\cos\theta_1\f$.
*/
double theCosThetaOne;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2last;
/**
* The value of \f$ \sqrt{4\pi\alpha}\f$ when it was last evaluated.
*/
Complex theElast;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCouplast;
/**
* The PDG code of the last SM particle in the vertex
*/
long theSMlast;
/**
* The PDG code of the last KK-particle in the vertex
*/
long theKKlast;
};
}
#endif /* HERWIG_UEDW0W1W1Vertex_H */
diff --git a/Models/UED/UEDZ0A1h1Vertex.h b/Models/UED/UEDZ0A1h1Vertex.h
--- a/Models/UED/UEDZ0A1h1Vertex.h
+++ b/Models/UED/UEDZ0A1h1Vertex.h
@@ -1,134 +1,134 @@
// -*- C++ -*-
//
// UEDZ0A1h1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDZ0A1h1Vertex_H
#define HERWIG_UEDZ0A1h1Vertex_H
//
// This is the declaration of the UEDZ0A1h1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling for the \f$A_{(1)}h_{(1)}Z^\mu_{{0}}\f$
* vertex. It inherits from VSSVertex and implements the setCoupling member.
*
* @see \ref UEDZ0A1h1VertexInterfaces "The interfaces"
* defined for UEDZ0A1h1Vertex.
*/
class UEDZ0A1h1Vertex: public VSSVertex {
public:
/**
* The default constructor.
*/
UEDZ0A1h1Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDZ0A1h1Vertex & operator=(const UEDZ0A1h1Vertex &);
+ UEDZ0A1h1Vertex & operator=(const UEDZ0A1h1Vertex &) = delete;
private:
/**
* The value of \f$ \sin 2\theta_W \f$.
*/
double theSin2ThetaW;
/**
* The value of \f$m_kk/\sqrt{m_kk^2 + m_z^2}\f$
*/
double theKappa;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDZ0A1h1Vertex_H */
diff --git a/Models/UED/UEDZ0H1H1Vertex.h b/Models/UED/UEDZ0H1H1Vertex.h
--- a/Models/UED/UEDZ0H1H1Vertex.h
+++ b/Models/UED/UEDZ0H1H1Vertex.h
@@ -1,148 +1,148 @@
// -*- C++ -*-
//
// UEDZ0H1H1Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDZ0H1H1Vertex_H
#define HERWIG_UEDZ0H1H1Vertex_H
//
// This is the declaration of the UEDZ0H1H1Vertex class.
//
#include "ThePEG/Helicity/Vertex/Scalar/VSSVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The implementation of the \f$Z^\mu_{(0)}H_{(1)}^+H_{(1)}^-\f$ vertex. This
* class inherits from VSSVertex and implements the setCoupling member function.
*
* The vertex is taken to have the form:
* \f[\frac{g}{1 + m_W^2R^2}\left(\frac{\cos 2\theta_W}{2\cos\theta_W} -
* m_W^2 R^2\cos^2\theta_W \right)\left(p(H_{(1)}^-) - p(H_{(1)}^+)\right) \f]
*
* @see \ref UEDZ0H1H1VertexInterfaces "The interfaces"
* defined for UEDZ0H1H1Vertex.
*/
class UEDZ0H1H1Vertex: public VSSVertex {
public:
/**
* The default constructor.
*/
UEDZ0H1H1Vertex();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEDZ0H1H1Vertex & operator=(const UEDZ0H1H1Vertex &);
+ UEDZ0H1H1Vertex & operator=(const UEDZ0H1H1Vertex &) = delete;
private:
/**
* The value of \f$\cos\theta_W\f$.
*/
double theCosThetaW;
/**
* The value of \f$\cos 2\theta_W\f$.
*/
double theCosTheta2W;
/**
* The mass-squared of the \f$W\f$ boson.
*/
Energy2 theMw2;
/**
* The square of the compactification radius.
*/
InvEnergy2 theR2;
/**
* The scale at which the coupling was last evaluated.
*/
Energy2 theq2Last;
/**
* The value of the coupling when it was last evaluated.
*/
Complex theCoupLast;
};
}
#endif /* HERWIG_UEDZ0H1H1Vertex_H */
diff --git a/Models/Zprime/ZprimeModel.h b/Models/Zprime/ZprimeModel.h
--- a/Models/Zprime/ZprimeModel.h
+++ b/Models/Zprime/ZprimeModel.h
@@ -1,424 +1,424 @@
// -*- C++ -*-
#ifndef HERWIG_ZprimeModel_H
#define HERWIG_ZprimeModel_H
//
// This is the declaration of the ZprimeModel class.
//
#include "Herwig/Models/General/BSMModel.h"
#include "ThePEG/Helicity/Vertex/AbstractFFVVertex.h"
#include "ZprimeModel.fh"
namespace Herwig {
using namespace ThePEG;
using namespace ThePEG::Helicity;
/**
* Here is the documentation of the ZprimeModel class.
*
* @see \ref ZprimeModelInterfaces "The interfaces"
* defined for ZprimeModel.
*/
class ZprimeModel: public BSMModel {
public:
/**
* The default constructor.
*/
ZprimeModel();
/** @name Vertices */
//@{
/**
* Pointer to the object handling Z prime quark-anti-quark vertex.
*/
tAbstractFFVVertexPtr vertexZPQQ() const {return _theZPQQVertex;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Return the Z prime top-up left-handed coupling
*/
double _cZPTU_left() const {return _gZPTU_L;}
/**
* Return the Z prime top-up right-handed coupling
*/
double _cZPTU_right() const {return _gZPTU_R;}
/**
* Return the Z prime d-dbar left-handed coupling
*/
double _cZPDD_left() const {return _gZPDD_L;}
/**
* Return the Z prime d-dbar right-handed coupling
*/
double _cZPDD_right() const {return _gZPDD_R;}
/**
* Return the Z prime top-anti-top left-handed coupling
*/
double _cZPTT_left() const {return _gZPTT_L;}
/**
* Return the Z prime top-anti-top right-handed coupling
*/
double _cZPTT_right() const {return _gZPTT_R;}
/**
* Return the Z prime u-ubar left-handed coupling
*/
double _cZPUU_left() const {return _gZPUU_L;}
/**
* Return the Z prime u-ubar right-handed coupling
*/
double _cZPUU_right() const {return _gZPUU_R;}
/**
* Return the Z prime c-cbar left-handed coupling
*/
double _cZPCC_left() const {return _gZPCC_L;}
/**
* Return the Z prime c-cbar right-handed coupling
*/
double _cZPCC_right() const {return _gZPCC_R;}
/**
* Return the Z prime b-bbar left-handed coupling
*/
double _cZPBB_left() const {return _gZPBB_L;}
/**
* Return the Z prime b-bbar right-handed coupling
*/
double _cZPBB_right() const {return _gZPBB_R;}
/**
* Return the Z prime s-sbar left-handed coupling
*/
double _cZPSS_left() const {return _gZPSS_L;}
/**
* Return the Z prime c-cbar right-handed coupling
*/
double _cZPSS_right() const {return _gZPSS_R;}
/**
* Return the Z prime e+e- left-handed coupling
*/
double _cZPee_left() const {return _gZPee_L;}
/**
* Return the Z prime e+e- right-handed coupling
*/
double _cZPee_right() const {return _gZPee_R;}
/**
* Return the Z prime mu+mu- left-handed coupling
*/
double _cZPmm_left() const {return _gZPmm_L;}
/**
* Return the Z prime mu+mu- right-handed coupling
*/
double _cZPmm_right() const {return _gZPmm_R;}
/**
* Return the Z prime tau+tau- left-handed coupling
*/
double _cZPtt_left() const {return _gZPtt_L;}
/**
* Return the Z prime tau+tau- right-handed coupling
*/
double _cZPtt_right() const {return _gZPtt_R;}
/**
* Return the Z prime nu_e nu_ebar left-handed coupling
*/
double _cZPnuenue_left() const {return _gZPnuenue_L;}
/**
* Return the Z prime nu_e nu_ebar right-handed coupling
*/
double _cZPnuenue_right() const {return _gZPnuenue_R;}
/**
* Return the Z prime nu_mu nu_mubar left-handed coupling
*/
double _cZPnumnum_left() const {return _gZPnumnum_L;}
/**
* Return the Z prime nu_mu nu_mubar right-handed coupling
*/
double _cZPnumnum_right() const {return _gZPnumnum_R;}
/**
* Return the Z prime nu_tau nu_taubar left-handed coupling
*/
double _cZPnutnut_left() const {return _gZPnutnut_L;}
/**
* Return the Z prime nu_tau nu_taubar right-handed coupling
*/
double _cZPnutnut_right() const {return _gZPnutnut_R;}
/**
* Return the overall coupling of the Z prime to quark-anti-quark
*/
double _cZPoverallCoup() const {return _ZPoverall;}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZprimeModel & operator=(const ZprimeModel &);
+ ZprimeModel & operator=(const ZprimeModel &) = delete;
/**
* Pointer to the object handling the Zp to Quark-antiQuark vertex.
*/
AbstractFFVVertexPtr _theZPQQVertex;
/**
* Z prime coupling to u-ubar (left-handed)
*/
double _gZPUU_L;
/**
* Z prime coupling to u-ubar (right-handed)
*/
double _gZPUU_R;
/**
* Z prime coupling to d-dbar (left-handed)
*/
double _gZPDD_L;
/**
* Z prime coupling to d-dbar (right-handed)
*/
double _gZPDD_R;
/**
* Z prime coupling to c-cbar (left-handed)
*/
double _gZPCC_L;
/**
* Z prime coupling to c-cbar (right-handed)
*/
double _gZPCC_R;
/**
* Z prime coupling to s-sbar (left-handed)
*/
double _gZPSS_L;
/**
* Z prime coupling to s-sbar (right-handed)
*/
double _gZPSS_R;
/**
* Z prime coupling to b-bbar (left-handed)
*/
double _gZPBB_L;
/**
* Z prime coupling to b-bbar (right-handed)
*/
double _gZPBB_R;
/**
* Z prime coupling to top-up (left-handed)
*/
double _gZPTU_L;
/**
* Z prime coupling to top-up (right-handed)
*/
double _gZPTU_R;
/**
* Z prime coupling to top-anti-top (left-handed)
*/
double _gZPTT_L;
/**
* Z prime coupling to top-anti-top (right-handed)
*/
double _gZPTT_R;
/**
* Z prime coupling to e+e- (left-handed)
*/
double _gZPee_L;
/**
* Z prime coupling to e+e- (right-handed)
*/
double _gZPee_R;
/**
* Z prime coupling to mu+mu- (left-handed)
*/
double _gZPmm_L;
/**
* Z prime coupling to mu+mu- (right-handed)
*/
double _gZPmm_R;
/**
* Z prime coupling to tau+tau- (left-handed)
*/
double _gZPtt_L;
/**
* Z prime coupling to tau+tau- (right-handed)
*/
double _gZPtt_R;
/**
* Z prime coupling to nu_e nu_ebar (left-handed)
*/
double _gZPnuenue_L;
/**
* Z prime coupling to nu_e nu_ebar (right-handed)
*/
double _gZPnuenue_R;
/**
* Z prime coupling to nu_mu nu_mubar (left-handed)
*/
double _gZPnumnum_L;
/**
* Z prime coupling to nu_mu nu_mubar (right-handed)
*/
double _gZPnumnum_R;
/**
* Z prime coupling to nu_tau nu_taubar (left-handed)
*/
double _gZPnutnut_L;
/**
* Z prime coupling to nu_tau nu_taubar (right-handed)
*/
double _gZPnutnut_R;
/**
* Z prime overall coupling
*/
double _ZPoverall;
};
}
#endif /* HERWIG_ZprimeModel_H */
diff --git a/Models/Zprime/ZprimeModelZPQQVertex.h b/Models/Zprime/ZprimeModelZPQQVertex.h
--- a/Models/Zprime/ZprimeModelZPQQVertex.h
+++ b/Models/Zprime/ZprimeModelZPQQVertex.h
@@ -1,263 +1,263 @@
// -*- C++ -*-
//
// ZprimeModelZPQQVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ZprimeModelZPQQVertex_H
#define HERWIG_ZprimeModelZPQQVertex_H
//
// This is the declaration of the ZprimeModelZPQQVertex class.
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "Herwig/Models/Zprime/ZprimeModel.h"
#include "ThePEG/PDT/EnumParticles.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
*
* This is the implementation of the vertex coupling the Standard Model Higgs
* to the Standard Model fermions for helicity amplitude calculations
*
* @see FFVVertex
* @see VertexBase
*/
class ZprimeModelZPQQVertex: public FFVVertex {
public:
/**
* Default constructor.
*/
ZprimeModelZPQQVertex();
/**
* Calculate the couplings.
* @param q2 The scale \f$q^2\f$ for the coupling at the vertex.
* @param part1 The ParticleData pointer for the first particle.
* @param part2 The ParticleData pointer for the second particle.
* @param part3 The ParticleData pointer for the third particle.
*/
virtual void setCoupling(Energy2 q2,tcPDPtr part1,tcPDPtr part2,tcPDPtr part3);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* Private and non-existent assignment operator.
*/
- ZprimeModelZPQQVertex & operator=(const ZprimeModelZPQQVertex &);
+ ZprimeModelZPQQVertex & operator=(const ZprimeModelZPQQVertex &) = delete;
/**
* Pointer to the model object.
*/
tcSMPtr _theModel;
private:
/**
* Storage of the couplings.
*/
//@{
/**
* Z prime coupling to top-up (left-handed)
*/
double _cZPTU_L;
/**
* Z prime coupling to top-up (right-handed)
*/
double _cZPTU_R;
/**
* Z prime coupling to top-anti-top (left-handed)
*/
double _cZPTT_L;
/**
* Z prime coupling to top-anti-top (right-handed)
*/
double _cZPTT_R;
/**
* Z prime coupling to u-ubar (left-handed)
*/
double _cZPUU_L;
/**
* Z prime coupling to u-ubar (right-handed)
*/
double _cZPUU_R;
/**
* Z prime coupling to c-cbar (left-handed)
*/
double _cZPCC_L;
/**
* Z prime coupling to c-cbar (right-handed)
*/
double _cZPCC_R;
/**
* Z prime coupling to s-sbar (left-handed)
*/
double _cZPSS_L;
/**
* Z prime coupling to s-sbar (right-handed)
*/
double _cZPSS_R;
/**
* Z prime coupling to d-dbar (left-handed)
*/
double _cZPDD_L;
/**
* Z prime coupling to d-dbar (right-handed)
*/
double _cZPDD_R;
/**
* Z prime coupling to d-dbar (left-handed)
*/
double _cZPBB_L;
/**
* Z prime coupling to d-dbar (right-handed)
*/
double _cZPBB_R;
/**
* Z prime coupling to e+e- (left-handed)
*/
double _cZPee_L;
/**
* Z prime coupling to e+e- (right-handed)
*/
double _cZPee_R;
/**
* Z prime coupling to mu+mu- (left-handed)
*/
double _cZPmm_L;
/**
* Z prime coupling to mu+mu- (right-handed)
*/
double _cZPmm_R;
/**
* Z prime coupling to tau+tau- (left-handed)
*/
double _cZPtt_L;
/**
* Z prime coupling to tau+tau- (right-handed)
*/
double _cZPtt_R;
/**
* Z prime coupling to nu_e nu_ebar (left-handed)
*/
double _cZPnuenue_L;
/**
* Z prime coupling to nu_e nu_ebar (right-handed)
*/
double _cZPnuenue_R;
/**
* Z prime coupling to nu_mu nu_mubar (left-handed)
*/
double _cZPnumnum_L;
/**
* Z prime coupling to nu_mu nu_mubar (right-handed)
*/
double _cZPnumnum_R;
/**
* Z prime coupling to nu_tau nu_taubar (left-handed)
*/
double _cZPnutnut_L;
/**
* Z prime coupling to nu_tau nu_taubar (right-handed)
*/
double _cZPnutnut_R;
/**
* Z prime overall coupling
*/
double _cZP_o;
//@}
};
}
#endif /* HERWIG_ZprimeModelZPQQVertex_H */
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -1,1699 +1,1719 @@
Herwig News -*- outline -*-
================================================================================
+* Herwig 7.1.5 release: 2019-04-04
+
+** Add option of producing partons on physically mass shell after the parton shower
+ to allow the string model to be used to hadronize events
+
+** Fixes for template issues and compiler warnings for gcc8,9, icc and clang
+
+** Fixes to the calculation of W, Z and h widths if decay modes removed
+
+** Fix typo in FI g to gg dipole.
+
+** Fix to allow 1 parameter to specify the mass of more than one particle in the UFO converter
+
+** Fix to partial width calculation of VSS decays
+
+** Fix the PDF assignment for DIS processes with Matchbox
+
+** Fix for undecayed W bosons in internal POWHEG gauge boson pair code
+
+** Update boost detection in configure script
* Herwig 7.1.4 release: 2018-06-28
** More matrix elements and better handling of BSM physics
** Fix for spin correlations in angular-ordered shower, effects top decays
** Allow fixed target collisions
** various minor fixes
* Herwig 7.1.3 release: 2018-04-05
** Dipole Shower
*** Changed default phase space limits
*** g -> gg splitting function asymmetrized
*** Initial retune supplied, given the visible changes
to LEP observables
** Added new Baryonic colour reconnection model
(arXiv 1710:10906)
** Added Schuler-Sjostrand Photon PDFs
** Handling of massless taus from external sources
** various minor fixes
** use std::array<> where possible
* Herwig 7.1.2 release: 2017-11-01
** Reduction of the default pt cut for QED radiation off leptons.
** Inputfile changes due to new read mode in ThePEG.
ThePEG remains in current repo dir when reading input-file/snippet.
** Fix for shower scale variations in qtilde shower.
** All standard input files now use the tuned intrinsic pt.
** Remove obsolete input files for various tunes.
** Fix for Madgraph interface for NLO corrections with recent version.
** Run file size reduction for processes using madgraph/openloops.
** Fix in jacobian for massive dipole kinematics.
** General improvements for UFO model handling.
* Herwig 7.1.1 release: 2017-07-14
** Snippets are now all installed
** Fixed broken ufo2herwig output and LHC-MB.in
** UFO improvements
*** More robust SLHA file handling
*** option of creating diagonal mixing matrices, needed for ATLAS simplfied models
*** Improved warnings about resetting standard model particles
*** Fixed certain cases where the wrong lorentz structure was picked in VVS vertices
** Improved error message for unhandled beam particles
** Fix for Dipole Shower chain selection
** Fixed crash in double diffractive delta resonances
* Herwig 7.1.0 release: 2017-05-19
** Major new release
For a more detailed overview and further references please see the
release note arXiv:1705.06919
** NLO multijet merging with the dipole shower
** A new soft model
** An interface to EvtGen
** Improved calculation of mass effects in the dipole shower
** Top decays in the dipole shower, and NLO corrections to the decay
** An implementation of the KrkNLO method for simple processes
** Major restructuring and cleanup of default input files
** C++11 is now mandatory and heavily used in the code
** Many smaller bugfixes and improvements
* Herwig 7.0.4 release: 2016-10-24
** API
The high level API is now properly available as a library, providing an
alternative to the Herwig main program.
** Dipole shower
Added nloops() function to the AlphaS classes to return the number of loops
in the running coupling
** Matchbox
Improved error handling and clearer messages
** BSM models
Initialize W mass correctly from SLHA file. Improved reading in of decay
modes if they already exist.
** Sampling
Introduced option to reduce reference weight in AlmostUnweighted mode by
Kappa factor. Useful for processes where full unweighting is infeasible.
** Qtilde shower
Better control of scale in splitting functions using the
SplittingFunction:ScaleChoice interface.
** Tests
New NLO fixed-order input files for testing Matchbox in Tests/ExternNLO.
** Input files
Set diagonal CKM options consistently. Added TauTauHVertex and MuMuHVertex
to MatchboxDefaults.
* Herwig 7.0.3 release: 2016-07-21
** subprocess generation filters
A number of filters has been implemented to speed up process and diagram
generation for the case of Standard Model like processes; this is
particularly helpful for processes involving a large number of electroweak
combinatorics. See the documentation for more details.
** fix to directory hierarchy
A bug in the Herwig-scratch directory hierarchy when integrating with
different seeds has been fixed.
** fix for relocating MadGraph generated amplitudes
The directory and symbolic link structure for MadGraph-built amplitudes has
been changed to allow for relocation of a run directory to a different file
system hierarchy.
** z* variable added to LeptonsJetsAnalysis
The builtin LeptonsJetsAnalysis has been extented to include the normalized
relative rapidity z*
** detuning parameter for shower reweighting
An efficiency tweak when using the shower reweighting facilities has been
introduced for the veto algorithms in both the QTilde and the Dipole
shower. See the documentation for more details.
** BaryonThreeQuarkModelFormFactor
A scaling bug in the form factor series expansion was fixed.
* Herwig 7.0.2 release: 2016-04-29
** Event reweighting
New option of calculating the weights for the effect of varying the scale
used in both the default and dipole showers. The method is described in
arXiv:1605.08256
** mergegrids mode
A main mode for the Herwig executable has been added which merges the
integration grids from parallel runs.
** NLO Diphoton production
The NLO matrix elements in the POWHEG approach for diphoton production as
described in JHEP 1202 (2012) 130, arXiv:1106.3939 have been included as
MEPP2GammaGammaPowheg.
** BSM Hard process constructor
A missing Feynman diagram with a t-channel vector boson has been added to
the matrix element for vv2ss
** BSM Decay Modes calculation
The behaviour of the option to disable decay modes in BSM Models has been
changed so that the partial width for the ignored modes is now calculated
and included in the total width, but the branching ratio is set to
zero. This is more physical than the previous option where the mode was
t otally ignored and hence not included in the calculation of the width.
** Mass Generation
The behaviour of the GenericMassGenerator has been changed so that modes
which have been disabled are only included in the calculation of the total
width and not in the partial width used in the numerator of the weight used
to select the off-shell mass.
** Boost detection
Boost could not detect the compiler version for gcc-5.3 and gcc-6.1
* Herwig 7.0.1 release: 2016-01-17
** Version number written to log file
The Herwig version number is now included in addition to ThePEG's version.
** Tau lifetimes
A bug with lifetimes for hard process Taus is fixed. Thanks to ATLAS
for the report!
** Shower FSR retries
Rare events could take a long time due to an extremely large number
of FSR retries. These are now capped at a configurable number.
** Dipole shower
Reweighting for non-radiating events; fixes for shower profile
handling; option to downgrade large-Q expansion for alphaS
** Matchbox builtins
Added massive currents for q-qbar
** ShowerAlphaQCD
can now use user-defined thresholds
** Input snippets
W/Z/H on-shell now split into three files; 4-flavour scheme added
** UFO converter
The converter now has experimental support for writing out param
cards of its current settings.
** LEPJetAnalysis loading fixed
** Contrib
HJets++ has moved to a stand-alone project, FxFx has been added
* Herwig 7.0.0 (Herwig++ 3.0.0) release: 2015-12-04
** Major new release
A major new release of the Monte Carlo event generator Herwig++ (version
3.0) is now available. This release marks the end of distinguishing
Herwig++ and HERWIG development and therefore constitutes the first major
release of version 7 of the Herwig event generator family. The new version
features a number of significant improvements to the event simulation,
including: built-in NLO hard process calculation for all Standard Model
processes, with matching to both angular ordered and dipole shower modules
via variants of both subtractive (MC@NLO-type) and multiplicative
(Powheg-type) algorithms; QED radiation and spin correlations in the
angular ordered shower; a consistent treatment of perturbative
uncertainties within the hard process and parton showering, as well as a
vastly improved documentation. This version includes (for a more detailed
overview and further references please see the release note
arXiv:1512.01178):
** A long list of improvements and fixes for the Matchbox module
*** includes MC@NLO and Powheg matching to both showers with truncated showering
** A long list of improvements and fixes for both of the shower modules
*** includes improvements of numerics issues relevant to 100 TeV pp collisions
** NLO event simulation and Matchbox development
*** Interfaces to a number of external libraries
*** A new workflow for event generation
*** Electroweak corrections to VV production
** Parton shower development
*** QED radiation in the angular ordered shower
*** Spin correlations in the angular ordered shower
*** New scale choices in gluon branchings
** Improvements to event generation workflow
*** Re-organized and streamlined input files for the new NLO development
*** A unified treatment of shower and matching uncertainties
*** New integrator modules featuring parallel integration
** New default tunes for both shower modules
** New contrib modules
*** Electroweak Higgs plus jets production
*** FxFx merging support
*** Higgs boson pair production
* Herwig++-2.7.1 release: 2014-07-07
** New shower switches to select schemes for momentum reconstruction
*** QTildeReconstructor:FinalStateReconOption
has the following options:
*** Default
All momenta are rescaled in the rest frame.
*** MostOffShell
Put all particles on the new-mass shell and the most off-shell and
recoiling system are rescaled to ensure 4-momentum is conserved.
*** Recursive
Recursively put the most off-shell particle which hasn't yet been
rescaled on-shell by rescaling the particles and the recoiling
system.
*** RestMostOffShell
The most off-shell is put on shell by rescaling it and the
recoiling system, the recoiling system is then put on-shell in its
rest frame.
*** RestRecursive
As above, but recursively treat the currently most-off shell
(only makes a difference for more than 3 partons)
** Ticket #378: Hadronization of baryon number violating clusters involving diquarks
Fixed by only considering non-diquarks to be combined in the
ClusterFinder.
** UFO converter can now parse SLHA files for parameter settings
The UFO converter code can now use SLHA files for modifying
parameters. The first pass "ufo2herwig" produces the model to be
compiled. For each parameter card, run "slha2herwig" to get the
matching input file.
** Fix for systems using lib64
The repository is now initialized correctly on systems using lib64
as the library location.
** Efficiency optimization
Better allocation of internal vector variables for a noticeable
speed increase of 10-20% with LHC events.
* Herwig++-2.7.0 release: 2013-10-28
** UFO interface to Feynman rules generators
Herwig++ now includes "ufo2herwig", a tool that automatically
creates all required files to run a BSM model from a UFO
directory. The conversion has been extensively tested against
Feynrules models MSSM, NMSSM, RS, Technicolor,
and less extensively with most of the
other models in the Feynrules model database.
We expect that following this release there will be no further
hard-coded new physics models added to Herwig++ and that future
models will be included using the UFO interface.
** Shower uncertainties
A first set of scaling parameters to estimate shower uncertainties
is provided for both the angular ordered as well as the dipole
shower; they are Evolver:HardScaleFactor and ShowerAlphaQCD:
RenormalizationScaleFactor.
** Rewrite of Matchbox NLO matching
The NLO matching implementation has been rewritten and is now more
flexible and consistent. Profile scales are provided for the
hardest emission both for the dipole shower and matrix element
correction matching.
** BLHA2 Interface and new processes
Matchbox now features a generic BLHA2 interface to one-loop
amplitude codes and now also includes W and W+jet production as
well as Higss production in gluon fusion as builtin processes.
** Impoved dipole shower kinematics parametrization
The kinematics parametrization for emissions in the dipole shower
has been made more efficient.
** W and Z Powheg decays
Decays of W and Z bosons now use the Powheg decayers by default.
** Improved treatment of beam remnants
The handling of beam remnants has been improved in multiple
contexts, leading to a much lower error rate at p+/p- collisions.
An additional value "VeryHard" for ClusterFissioner:RemnantOption
can be used to disable any special treatment of beam remnant
clusters.
** New underlying event tune
Herwig++ now uses tune UE-EE-5-MRST by default. Other related tunes
can be obtained from the Herwig++ tunes page
** Improvements in BSM code
The UFO development identified many sign fixes in rarely used BSM
vertices; many improvements were made to general decayers, allowing
four-body decays in BSM for the first time; Powheg is enabled in
General two-body decayers; and the handling of colour
sextets has been improved.
** A new HiggsPair matrix element in Contrib.
** A new matrix element for single top production.
** The Higgs mass is now set to 125.9 GeV (from PDG 2013 update).
** C++-11 testing
To help with the coming transition to C++-11, we provide the new
--enable-stdcxx11 configure flag. Please try to test builds with
this flag enabled and let us know any problems, but do not use this
in production code yet. In future releases, this flag will be on by
default.
** Other changes
*** Many new Rivet analyses have been included in the Tests directory.
*** Cleaned Shower header structure; grouped shower parameters into one struct.
*** The boolean Powheg flag in HwMEBase changed to an enumeration.
* Herwig++-2.6.3 release: 2013-02-22
** Decay vertex positioning in HepMC output
Pseudo-vertices that Herwig++ inserts for technical reasons will
now not contribute to the Lorentz positions of downstream vertices.
Thanks to ATLAS for the bug report!
** Updated Rivet tests
Herwig's library of Rivet test runs has been brought up-to-date
with new analyses that were recently published by the Rivet
collaboration.
* Herwig++-2.6.2 release: 2013-01-30
** Fixes for PDF and scale choices in POWHEG events
Scale settings for MPI and the regular shower are now correct in
POWHEG events. This should fix reported anomalies in POWHEG jet rates.
NLO PDFs are now also set consistently in the example input files.
** Ticket #373: Branching ratio factors in cross-section
If any decay modes are selectively disabled, setting the following
post-handler will cause all reported cross-sections to include the
branching ratio factor(s) from the previous stages correctly:
create Herwig::BranchingRatioReweighter BRreweight
insert LHCGenerator:EventHandler:PostDecayHandlers 0 BRreweight
** Anomalous vertices now possible in MEfftoVH
** Interactive shell does not quit on error
** Better warning messages for events from inconsistent LHEF files
** Possible division by zero error fixed in BSM branching ratio calculations
** Decayer and ME changes to improve checkpointing
The checkpointing changes in ThePEG 1.8.2 are implemented here, too. Regular
dump files are consistent now.
* Herwig++-2.6.1 release: 2012-10-16
** Configure switches
The various switches to turn off compilation of BSM models have
been unified into a single '--disable-models'. A new flag
'--disable-dipole' can be used to turn off the compilation of the
Dipole and Matchbox codes.
** Ticket #348: Search path for repository 'read' command
The search path for the 'read' command is configurable on the
command line with the -i and -I switches. By default, the
installation location is now included in the search path, so that
'Herwig++ read LEP.in' will work in an empty directory. The current
working directory will always be searched first.
The rarely used "Herwig++ init" command has been made consistent
with 'read' and 'run' and should now be used without the '-i' flag.
** Width treatment in BSM
The width treatment in BSM decay chains has been greatly improved
and is now switched on by default in the .model files. To get the
old behaviour, use
set /Herwig/NewPhysics/NewModel:WhichOffshell Selected
** New BSM models
Little Higgs models with and without T-parity are now available.
** Resonance photon lifetime
A lifetime bug affecting decays of pi0 to e+e-X was fixed. The
virtual photon is not part of the event record anymore.
** Ticket #371: Hard diffraction FPE
Herwig++ 2.6.0 introduced a bug into the diffraction code which
would abort any runs. This is now fixed.
** O2AlphaS
Support for setting quark masses different from the particle data
objects as introduced in ThePEG 1.8.1 has been enabled.
** Matchbox
Several improvements and bug fixes are included for
Matchbox. Amplitudes relevant to pp -> Z+jet and crossed processes
at NLO are now available, and various scale choices have been added
in a more flexible way. All subtraction dipoles for massive quarks
are now included.
** Dipole shower
Parameters to perform scale variations in the shower have been
added to estimate uncertainties. A bug in showering off gg -> h has
been fixed.
** Minor fixes
*** Two broken colour structures in GeneralHardME
*** Susy Higgs mixing matrix
*** BaryonFactorizedDecayer out-of-bounds access
*** Mass values in SimpleLHCAnalysis
* Herwig++-2.6.0 release: 2012-05-21 (tagged at SVN r7407)
** New NLO framework
Matchbox, a flexible and very general framework for performing NLO
calculations at fixed order or matched to parton showers is
provided with this release.
** Dipole shower algorithm
A first implementation of the coherent dipole shower algorithm by
Plätzer and Gieseke (arXiv:0909.5593 and arXiv:1109.6256) is
available.
** Alternative samplers and the ExSample library
The ExSample library by Plätzer (arXiv:1108.6182) is shipped along
with Herwig++ in an extended version. The extended version provides
SamplerBase objects which can be used alternatively to the default
ACDCSampler.
** New BSM models
*** New colour sextet diquark model
A colour sextet diquark model has been included, as described in
Richardson and Winn (arXiv:1108.6154).
*** Models reproducing the CDF t-tbar asymmetry
Four models that can reproduce the reported t-tbar asymmetry have
been included.
*** Zprime
A simple standard model extension by one additional heavy neutral
vector boson.
** Interface to AlpGen, with MLM merging
The Contrib directory contains a new interface to the AlpGen matrix
element generator. AlpGen events must be preprocessed with the
provided AlpGenToLH.exe tool before they can be used. More
information can be found in the Herwig++ 2.6 release note.
** HiggsVBF Powheg
Higgs boson production by vector boson fusion is available at NLO
in the POWHEG scheme, as described in d'Errico, Richardson
(arXiv:1106.2983). The Powheg DIS processes were available in
Herwig++-2.5.2 already.
** Statistical colour reconnection
Alternative mechanisms to minimize the colour length Sum(m_clu)
before the hadronization stage, based on Metropolis and annealing
algorithms.
** Energy extrapolation of underlying-event tunes
To describe underlying-event data at different c.m. energies, the
energy-dependent parameter pT_min will now be adjusted
automatically, following a power-law. The new tune parameters are
the value at 7000 GeV "MPIHandler:pTmin0", and MPIHandler:Power.
** Ticket #239: Reporting of minimum-bias cross-section
When simulating minimum-bias events using the MEMinBias matrix
element, the correct unitarized cross section can now be reported
via the standard facilities; it is no longer necessary to extract
it from the .log file of the run. The corresponding functionality
is enabled by inserting a MPIXSecReweighter object as a
post-subprocess handler:
create Herwig::MPIXSecReweighter MPIXSecReweighter
insert LHCHandler:PostSubProcessHandlers 0 MPIXSecReweighter
** Dependency on 'boost'
Herwig++ now requires the boost headers to build; if not detected
in standard locations, specify with the --with-boost configure
option.
** Tests directory
The Tests directory now contains input cards for almost all Rivet
analyses. A full comparison run can be initiated with 'make tests'.
** Minor changes
*** Default LHC energy now 8 TeV
All LHC-based defaults have now been updated to use 8 TeV as the
center-of-mass energy.
*** Herwig::ExtraParticleID -> ThePEG::ParticleID
The namespace for additional particles has been unified into
ThePEG::ParticleID
*** MEee2VectorMeson
The e+e- -> vector meson matrix element has moved from Contrib into
HwMELepton.so
*** SUSY numerics fixes
Better handling of rare numerical instabilities.
*** YODA output for Rivet
The built-in histogramming handler can now output data in the YODA
format used by Rivet.
*** Consistency checks in SLHA file reader
Better warnings for inconsistent SusyLHA files
*** better colour flow checking for development
** Bug fixes
*** Extremely offshell W from top decay
Numerical improvements for very off-shell W bosons coming from top
decays.
*** Ticket #367: problems in using SUSY + LHE
Susy events from Les Houches event files are now handled better.
*** Infinite loop in remnant decayer
The remnant decayer will now abort after 100 tries.
*** Fix to HiggsVBF LO diagrams
The diagram structure of HiggsVBF LO matrix elements has been fixed.
*** LEP thrust fix
The calculation of the transverse momentum of a branching from the
evolution variable in final-state radiation can now be
changed. While formally a sub-leading choice this enables a better
description of the thrust distribution in e+e- collisions at
small values of the thrust. Currently the default behaviour, where
the cut-off masses are used in the calculation, remains the same
as previous versions.
* Herwig++-2.5.2 release: 2011-11-01 (tagged at SVN r6928)
** Optional new jet vetoing model
The jet vetoing model by Schofield and Seymour (arXiv:1103.4811) is
available via Evolver:ColourEvolutionMethod,
PartnerFinder:PartnerMethod and SplittingFunction:SplittingColourMethod.
The default behaviour is unchanged.
** MPI tune
Version 3 of the MPI tunes is now the default. Please note that the
pT parameter is energy-dependent and needs to be modified when an
LHC run is not at 7 TeV.
The latest tunes are always available at
http://projects.hepforge.org/herwig/trac/wiki/MB_UE_tunes
** MPI PDFs
MPI PDFs can now be controlled independently.
** Initialization time speedup
A new BSMModel base class was introduced between StandardModel and
the BSM model classes. Together with a restructured decay mode
initialization, this offers significantly faster startup times for
BSM runs. ThreeBodyDecays can now always be switched on without a
large speed penalty.
** Decay mode file
Decay mode files in the SLHA format can now be read separately in
any BSM model with 'set Model:DecayFileName filename'
** Powheg DIS
Charged- and neutral-current DIS processes implementing the POWHEG
method are now available.
** Diffraction models
Xi cut implemented in PomeronFlux
** Ticket #352: Colour reconnection fixed in DIS
** Ticket #353: Improved numerical stability in chargino decays
** Ticket #358: Infinite loop in top events with pT cut in shower
** Ticket #361: Problem with duplicate 2-body modes in BSM
** Tickets #362 / #363: Crashes with baryon number violating models
Particle decays in SUSY models with RPV now work correctly in the
colour 8 -> 3,3,3 case. Colour reshuffling now works for RPV
clusters.
** Improved Fastjet detection
The configure step uses fastjet-config to make sure all header file
paths are seen.
** Darwin 11 / OS X Lion
A configure bug was fixed which prevented 'make check' from
succeeding on OS X Lion.
** Vertex classes
The specification of QED / QCD orders has been moved to the vertex
constructors, to allow ThePEG consistency checks. WWHH vertices in
MSSM and NMSSM were fixed. Some Leptoquark and UED vertices fixed.
** Hadronization
Cleanup of obsolete code.
* Herwig++-2.5.1 release: 2011-06-24 (tagged at SVN r6609)
** Example input files at 7 TeV
All our example input files for LHC now have their beam energy set
to 7 TeV instead of 14 TeV.
** Colour reconnection on by default
The colour reconnection tunes are now the default setup. Version 2
of the tunes replaces the *-1 tunes, which had a problem with LEP
event shapes.
** Run name tags
Aded possibility to add a tag to the run name when running with the
'-t' option. One run file can thus be run with different seeds and
results stored in different output files.
** Floating point exceptions
The new command line option -D enables floating point error checking.
** General improvements to WeakCurrent decays
** Remnant decayer
Hardwired gluon mass was removed.
** WeakCurrentDecayConstructor
Instead of specifying separate Particle1...Particle5 vectors for
the decay modes, the new interface DecayModes can be filled with
decay tags in the standard syntax.
** BSM: improvements to handling of vertex and model initialisation
** Powheg Higgs
Option to use pT or mT as the scale in alphaS and for the
factorization scale in the PDFs
** Ticket #337: Tau polarization wrong in charged Higgs decay
** Ticket #339: Colour flows in GeneralThreeBody Decayers for 3bar -> 8 3bar 1
** Ticket #340: Crash for resonant zero-width particles
** Ticket #341: Varying scale for BSM processes
The scale used is now ResonantProcessConstructor:ScaleFactor or
TwoToTwoProcessConstructor:ScaleFactor multiplied by sHat.
** Ticket #346: Chargino decays
Chargino decayers now automatically switch between the mesonic
decays for mass differences less than 2 GeV and the normal partonic
decays above 2 GeV.
** Ticket #349: Stop by default on input file errors
The '--exitonerror' flag is now the default behaviour for the
Herwig++ binary. To switch back to the old behaviour,
'--noexitonerror' is required.
** Ticket #351: Four-body stop decays
** Tested with gcc-4.6
* Herwig++-2.5.0 release: 2011-02-08 (tagged at SVN r6274)
** Uses ThePEG-1.7.0
Herwig++ 2.5.0 requires ThePEG 1.7.0 to benefit from various
improvements, particularly: handling of diffractive processes;
respecting LD_LIBRARY_PATH when loading dynamic libraries,
including LHAPDF; improvements to repository commands for decay
modes. See ThePEG's NEWS file for more details.
** POWHEG improvements
*** New POWHEG processes
Simulation at NLO accuracy using the POWHEG method is now
available for hadronic diboson production (pp to WW,WZ,ZZ), Higgs
decays to heavy quarks, and e+e- to two jets or ttbar, including
full mass dependence.
*** Input file changes
The input files for setting up POWHEG process simulation have been
simplified. See the example files LHC-Powheg.in and TVT-Powheg.in
for the improved command list.
*** Structural changes
The POWHEG backend in the shower code has been restructured to
make future additions easier: PowhegEvolver has merged with
Evolver; both the matrix element corrections and real corrections
in the POWHEG scheme are implemented directly in the ME or Decayer
classes.
** New processes at leading order
*** Photon initiated processes
We have added a matrix element for dijet production in gamma
hadron collisions.
*** Bottom and charm in heavy quark ME
The option of bottom and charm quarks is now supported for heavy
quark production in MEHeavyQuark.
** Colour reconnection
The cluster hadronization model has been extended by an option to
reconnect coloured constituents between clusters with a given
probability. This new model is different from the colour
reconnection model used in FORTRAN HERWIG, and improves the
description of minimum bias and underlying event data.
** Diffractive Processes
Both single and double diffractive processes are now supported in
Herwig++. The Pomeron PDF is implemented using a fit to HERA data,
and a pion PDF can be used to model reggeon flux.
** BSM physics
*** New models
We have added new BSM models, particularly ADD-type extra
dimension models and the next-to-minimal supersymmetric standard
model (NMSSM). Effects of leptoquarks can as well be simulated.
*** Vertex additions
We have added flavour changing stop interactions (stop -
neutralino - charm) and gravitino interactions with particular
emphasis on numerical stability for very light gravitinos.
Tri-linear Higgs and Higgs-Higgs/Vector-Vector four-vertices are
available as well.
*** Input file changes
The SUSY model can now also extract the SLHA information from the
header of a Les Houches event file: replace the SLHA file name
in the example input files with the LH file name.
*** Structure
The backend structure of the HardProcessConstructor has changed,
to allow easier inclusion of new process constructors. Some 2->3
BSM scattering processes involving neutral higgs bosons are now
included. The spin handling has been improved in the background.
** Shower splitting code reorganized
The selection of spin structures has been decoupled from the choice
of colour structure. This gives more flexibility in implementing
new splittings. Selected splittings can be disabled in the input
files.
** B mixing
B mixing, and indirect CP violation in the B meson system are
included now.
** Looptools
The Looptools directory has been updated to reflect T.Hahn's
Looptools 2.6.
** Contrib changes
The ROOT interface has been removed as deprecated. The MCPWNLO code
has temporarily been removed from the Contrib directory as a major
review of this code is required. Additionally, there are various
fixes to all other codes shipped in Contrib.
** DIS improvements
The momentum reshuffling in DIS events has been improved.
** mu and nu beams
mu, nu_e and nu_mu and their antiparticles are now available as
beam particles. They are all supported in the DIS matrix
elements. mu+ mu- collisions are supported in the general
matrix element code for BSM models, but not yet in the hard-coded
matrix elements for lepton-lepton scattering.
** Structural changes
*** Inline code
Inline code has been merged into the header files, .icc files were
removed.
*** Silent build
By default, Herwig++ now builds with silent build rules. To get
the old behaviour, run 'make V=1'.
*** Debug level
The debug level on the command line will now always have priority.
*** Event counter
The event counter has been simplified.
*** Interpolator persistency
Interpolators can now be written persistently.
** Ticket #307: Momentum violation check in BasicConsistency
Added parameters AbsoluteMomentumTolerance and
RelativeMomentumTolerance
** Example POWHEG input files
The example input files for Powheg processes now set the NLO
alpha_S correctly, and are run as part of 'make check'.
** Truncated shower
A problem which lead to the truncated shower not being applied in
some cases has been fixed.
** Fixes to numerical problems
Minor problems with values close to zero were fixed in several
locations.
** Remove duplicated calculation of event shapes
An accidental duplication in the calculation of event shapes was
removed, they are now only calculated once per event. Several other
minor issues in the event shape calculations have also been fixed.
** MRST PDFs fixed
An initialization problem in the internal MRST PDFs was fixed.
** Vertex scale choice
The scale in the Vertex classes can now be zero where
possible.
** Treatment of -N flag
The Herwig++ main program now correctly treats the -N flag
as optional.
** Numerical stability improved
The numerical stability in the 'RunningMass' and
'QTildeReconstructor' classes has been improved. The
stability of the boosts in the SOPTHY code for the
simulation of QED radiation has been improved.
The accuracy of boosts in the z-direction has been improved to
fix problems with extremely high p_T partons.
** Bugfix in initial state splittings
A bug in the implementation of the PDF weight in initial-state
qbar -> qbar g splittings has been fixed.
** Bugfix in chargino neutralino vertices
A bug in the 'chi+- chi0 W-+' and charged
Higgs-sfermions vertices has been fixed.
** Remove uninitialized variables written to repository
A number of uninitialised variables which were written to the
repository have been initialised to zero to avoid problems on some
systems.
** Fix to QED radiation in hadronic collisions
The longitudinal boost of the centre-of-mass frame in hadronic
collisions is correctly accounted for now in the generation of QED
radiation.
** Fix to numerical problems in two-body decays
Numerical problems have been fixed, which appeared in the rare case
that the three-momenta of the decay products in two-body decays are
zero in the rest frame of the decay particle.
** A problem with forced splittings in the Remnant was fixed.
** ME correction for W+- decays applied properly
The matrix element correction for QCD radiation in W+- decays
which was not being applied is now correctly used.
** Top quark decays from SLHA file
The presence of top quark decay modes in SLHA files is now handled
correctly.
** Exceptional shower reconstruction kinematics
Additional protection against problems due to the shower
reconstruction leading to partons with x>1 has been added.
** Ordering of particles in BSM processes
Changes have been made to allow arbitrary ordering of the outgoing
particles in BSM processes.
** Bugfixes in tau decays
Two bugs involving tau decays have been fixed. The wrong masses
were used in the 'KPiCurrent' class for the scalar form factors
and a mistake in the selection of decay products lead to
tau- --> pi0 K- being generated instead of tau- --> eta K-.
** Avoid crashes in baryon number violating processes.
To avoid crashes, better protection has been introduced for the
case where diquarks cannot be formed from the quarks in a
baryon-number violating process. In addition, the parents of the
baryon-number violating clusters have been changed to avoid
problems with the conversion of the events to HepMC.
** QED radiation in W- decays
A bug in the 'QEDRadiationHandler' class which resulted
in no QED radiation being generated in W- decays has been fixed.
** A number of minor fixes to the SUSY models have been made.
** Partial width calculations in BSM models
A fix for the direction of the incoming particle in the calculation
of two-body partial widths in BSM models has been made.
** LoopTools improvements
The LoopTools cache is now cleared more frequently to
reduce the amount of memory used by the particle.
** Negative gluino masses are now correctly handled.
** A problem with mixing matrices which are not square has been fixed.
** Removed duplicate diagram
The 'MEee2gZ2ll' class has been fixed to only include the
photon exchange diagram once rather than twice as previously.
** Fix for duplicate particles in DecayConstructor
A problem has been fixed which occurred if the same particle was
included in the list of DecayConstructor:DecayParticles.
** Fixes for UED model vertices
A number of minor problems in the vertices for the UED model have
been fixed.
** Include missing symmetry factor
The missing identical-particle symmetry factor in
'MEPP2GammaGamma' has been included.
** Fix floating point problem in top decays
A floating point problem in the matrix element correction for top
decays has been fixed.
* Herwig++-2.4.2 release: 2009-12-11 (tagged at SVN r5022)
** Ticket #292: Tau decay numerical instability
The momentum assignment in tau decays contained numerical
instabilities which have been fixed by postponing the tau decay
until after the parton shower. A new interface setting
DecayHandler:Excluded is available to prevent decays in the shower
step. This is enabled by default for tau only.
** Ticket #290: Missing MSSM colour structure
The missing colour structure for gluino -> gluon neutralino was added.
** Ticket #294: Zero momentum in some decays
Some rare phase space points lead to zero momentum in two-body
decays. This has been fixed.
** Ticket #295: Stability of QED radiation for lepton collider processes
The numerical stability of QED radiation momenta was improved
further.
** Ticket #296: K0 oscillation vertex was wrong
The oscillation from K0 to K0_L/S now takes place at the production
vertex of K0.
** Ticket #289: Undefined variables in repository
On some system configurations, undefined variables were written to
the repository. These have been fixed.
** Fixed QED radiation for hadron processes
The longitudinal boost of the centre-of-mass frame in hadronic
collisions is correctly accounted for now.
** Numerical stability fixes
Small fixes in RunningMass and QTildeReconstructor.
** Powheg example input files
The example input files for Powheg processes now set the NLO
alpha_S correctly, and are run as part of 'make check'.
** OS X builds for Snow Leopard
Snow Leopard machines will now be recognized as a 64bit
architecture.
* Herwig++-2.4.1 release: 2009-11-19 (tagged at SVN r4932)
** Uses ThePEG-1.6.0
Herwig++ now requires ThePEG-1.6.0 to benefit from the improved
helicity code there. If you have self-written vertex classes, see
ThePEG's NEWS file for conversion instructions.
** Vertex improvements
ThePEG's new helicity code allowed major simplification of the vertex
implementations for all Standard Model and BSM physics models.
** New Transplanckian scattering model
An example configuration is in LHC-TRP.in
** BSM ModelGenerator as branching ratio calculator
The BSM ModelGenerator has a new switch to output the branching
ratios for a given SLHA file in SLHA format, which can then be used
elsewhere.
** BSM debugging: HardProcessConstructor
New interface 'Excluded' to exclude certain particles from
intermediate lines.
** Chargino-Neutralino-W vertex fixed
** Spin correlations
are now switched on by default for all perturbative decays.
** Ticket #276: Scale choice in BSM models' HardProcessConstructor
New interface 'ScaleChoice' to choose process scale between
- sHat (default for colour neutral intermediates) and
- transverse mass (default for all other processes).
** Ticket #287: Powheg process scale choice
The default choice is now the mass of the colour-singlet system.
** Ticket #278: QED radiation for BSM
Soft QED radiation is now enabled in BSM decays and all
perturbative decays by default.
** Ticket #279: Full 1-loop QED radiation for Z decays
Soft QED radiation in Z decays is now fully 1-loop by default.
** Ticket #280: Redirect all files to stdout
This is now implemented globally. The files previously ending in
-UE.out and -BSMinfo.out are now appended to the log file. They now
also obey the EventGenerator:UseStdout flag.
** Ticket #270: LaTeX output updated
After each run, a LaTeX file is produced that contains the full
list of citations. Please include the relevant ones in publications.
** Ticket #256: Mac OS X problems
An initialization problem that affected only some configurations has
been identified and fixed.
** Tests directory added
This contains many .in files, to exercise most matrix
elements.
** Minor fixes
*** Prevent rare x>1 partons in shower reconstruction.
*** SUSY-LHA parameter EXTPAR can be used to set tan beta
*** Improved Fastjet detection at configure time
* Herwig++-2.4.0 release: 2009-09-01 (tagged at SVN r4616)
** New matrix elements
We have added a built-in implementation of several new matrix elements:
PP --> WW / WZ / ZZ
PP --> W gamma / Z gamma
PP --> VBF Higgs
PP --> Higgs tt / Higgs bb
e+e- --> WW / ZZ
gamma gamma --> ff / WW
** Base code improvements
*** Ticket #257: Remnant handling
A problem with forced splittings in the Remnant was fixed.
*** Ticket #264: Soft matrix element correction
A problem with emissions form antiquarks was fixed.
** PDF sets
*** New default set
MRST LO** is the new default PDF set. LO* is also available built-in.
*** Shower PDFs can be set separately from the hard process
Use the 'ShowerHandler:PDF' interface.
** Parameter tunes
Shower, hadronization and underlying event parameters were retuned
against LEP and Tevatron data respectively.
** BSM module improvements
*** Ticket #259: read error for some UED models
Arbitrary ordering of outgoing lines in the process description is now
possible.
*** Ticket #266: branching ratio sums
The warning threshold for branching ratios not summing to 1 has
been relaxed. It is now a user interface parameter.
*** Ticket #267: Top decay modes
Top decay modes listed in SLHA files are now handled correctly.
** QED radiation
*** Ticket #241: Soft QED radiation is now enabled by default
*** Ticket #265: Radiation off W+ and W- is now handled correctly
** Interfaces
*** Ticket #243: Fastjet
Fastjet is now the only supported jet finder code. All example
analyses have been converted to use Fastjet.
*** KtJet and CLHEP interfaces have been removed.
*** New interfaces to AcerDet and PGS available in Contrib
*** MCPWnlo distributed in Contrib
*** HepMC and Rivet interfaces moved to ThePEG
** Ticket #239: Inelastic cross-section for MinBias
This information is now available in the ...-UE.out files.
** Technical changes
*** Ticket #186
Configure now looks for ThePEG in the --prefix location first.
*** Configure information
Important configuration information is listed at the end of the
'configure' run and in the file 'config.thepeg'. Please provide
this file in any bug reports.
*** New ZERO object
The ZERO object can be used to set any dimensionful quantity to
zero. This avoids explicit constructs like 0.0*GeV.
*** Exception specifiers removed
Client code changes are needed in doinit() etc., simply remove the
exception specifier after the function name.
*** Ticket #263: Tau polarizations can be forced in TauDecayer
* Herwig++-2.3.2 release: 2009-05-08 (tagged at SVN r4249)
** SUSY enhancements
*** Ticket #245: Select inclusive / exclusive production
Using the new 'HardProcessConstructor:Processes' switch options
'SingleParticleInclusive', 'TwoParticleInclusive' or 'Exclusive'
*** Improved three-body decay generation
Several problems were fixed, incl. tickets #249 #250 #251
Thanks to J.Tattersall and K.Rolbiecki for the stress-testing!
*** Looptools fix
Release 2.3.1 had broken the Looptools initialization.
*** Improved warning message texts
** Ticket #237:
Values of q2last can now be zero where possible.
** Ticket #240:
The Herwig++ main program now correctly treats the -N flag as optional.
** Ticket #246:
Extreme pT partons fixed by improving accuracy of z boosts.
** DIS
Improved parton shower momentum reshuffling.
** Minimum Bias events
The zero-momentum interacting particle used for
bookkeeping is now labelled as a pomeron.
** User Makefile
Makefile-UserModules does not enable -pedantic anymore. User's ROOT
code will not compile otherwise.
** Build system
Small fixes in the build system.
* Herwig++-2.3.1 release: 2009-03-31 (tagged at SVN r4140)
** Initial state showers
The PDF veto was wrongly applied to qbar->qbar g splittings.
** User interaction
The Makefile-UserModules now includes the Herwig version number.
The -N flag to 'Herwig++ run' is optional now, as was always intended.
** Contrib
The contrib directory is now included in the tarball. The omission
was accidental.
** Numerical accuracy
Minor problems with values close to zero were fixed in several
locations.
** LEP event shapes
An accidental duplication was removed, they are now only calculated
once per event.
** MRST PDF code
Initialization problem fixed.
** Mac OS X
The configure script was improved to detect libraries better.
** Libtool
Updated to version 2.2.6
* Herwig++-2.3.0 release: 2008-12-02 (tagged at SVN r3939)
** Major release, with many new features and bug fixes
** Extension to lepton-hadron collisions
** Inclusion of several processes accurate at next-to-leading order
in the POsitive Weight Hardest Emission Generator (POWHEG) scheme
** Inclusion of three-body decays and finite-width effects
in BSM processes
** New procedure for reconstructing kinematics of the parton shower
based on the colour structure of the hard scattering process
** New model for baryon decays including excited baryon multiplets
** Addition of a soft component to the multiple scattering model
of the underlying event and the option to choose more than one hard
scattering explicitly
** New matrix elements for DIS and e+e- processes
** New /Contrib directory added
containing external modules that will hopefully be of use to some
users but are not expected to be needed by most users and are not
supported at the same level as the main Herwig++ code
** Minor changes to improve the physics simulation:
*** IncomingPhotonEvolver added
to allow the simulation of partonic processes with incoming photons
in hadron collisions
*** KTRapidityCut added
to allow cuts on the p_T and rapidity, rather than just the p_T and
pseudorapidity used in SimpleKTCut. This is now used by default for
cuts on massive particles such as the $W^\pm$, $Z^0$ and Higgs
bosons and the top quark
*** Several changes to the decayers of B mesons
both to resolve problems with the modelling of partonic decays and
improve agreement with $\Upsilon(4s)$ data
*** Changes to allow values other than transverse mass of final-state particles as maximum transverse momentum for radiation in parton shower
either SCALUP for Les Houches events or the scale of the hard
process for internally generated hard processes
*** Changed defaults for intrinsic transverse momentum in hadron collisions
to 1.9GeV, 2.1GeV and 2.2GeV for the Tevatron and LHC at 10 TeV and
14 TeV, respectively
*** Pdfinfo object is now created in the HepMC interface
However in order to support all versions of HepMC containing this
feature the PDF set is not specified as not all versions contain
this information
*** New option of only decaying particles with lifetimes below user specified value
*** New options for the cut-off in the shower
and some obsolete parameters removed
*** Added option of switching off certain decay modes in BSM models
*** Added a Matcher for Higgs boson
to allow cuts to be placed on it
*** Diffractive particles deleted from default input files
they were not previously used
** Technical changes:
*** Some AnalysisHandler classes comparing to LEP data have been renamed
e.g. MultiplicityCount becomes LEPMultiplicityCount to avoid
confusion with those supplied in /Contrib for observables at the
Upsilon(4s) resonance
*** Reorganisation to remove the majority of the .icc files
by moving inlined functions to headers in an effort to improve
compile time
*** Restructured the decay libraries to reduce the amount of memory allocation
and de-allocation which improves run-time performance
*** The switch to turn off LoopTools has been removed
because LoopTools is now used by several core modules. As LoopTools
does not work on 64-bit platforms with g77 this build option is not
supported
*** Removed support for obsolete version of HepMC supplied with CLHEP
and improved the support for different units options with HepMC
*** EvtGen interface has been removed until it is more stable
*** Support for ROOT has been removed
it was not previously used
*** CKKW infrastructure has been removed from the release
until a concrete implementation is available
*** Default optimisation has been increased from -O2 to -O3
*** Handling of the fortran compiler has been improved
mainly due to improvements in the autotools
*** Use of FixedAllocator for Particle objects in ThePEG has been removed
as it had no performance benefits
** Bugs fixed:
*** Problems with the mother/daughter relations in the hard process
and diagram selection in W+- and Z0 production in association with a
hard jet
*** In general matrix element code for fermion-vector to fermion-scalar
where the outgoing fermion is coloured and the scalar neutral
*** In the selection of diagrams in some associated squark gaugino processes
*** h0->mu+mu- was being generated when h0->tau+tau-
*** Normalisation in the Histogram class for non unit-weight events
*** Protection against negative PDF values has been improved
these can occur when using NLO PDF sets
*** Lifetime for BSM particles is now automatically calculated
at the same time as the width
*** Hadrons containing a top quark now treated like hadrons containing BSM particles
in order to support this possibility
*** Several ambiguous uses of unsigned int
*** Several variables that may have been used undefined
*** Several memory leaks at initialisation
*** The configuration now aborts if no fortran compiler is found
as this is required to compile Looptools
*** Several minor floating point errors that did not affect results
* Herwig++-2.2.1 release: 2008-07-09 (tagged at SVN r3434)
** Ticket #181: BSM shower with a decay close to threshold
Now fixed.
** Ticket #191: Split SUSY crash
Improved error message.
** Ticket #192: using SCALUP as the pT veto in the shower
Now implemented.
** Ticket #194: production processes of ~chi_1(2)-
Fixed bug in the diagram creation.
** Removed unused particles
DiffractiveParticles.in was removed, they were never produced.
** Hadronization
Top quark clusters now possible, handled as 'exotic' clusters.
** Improved handling of decay modes
See ThePEG-1.3.0. 'defaultparticle' command is now obsolete.
** Multi-Parton interactions
Increased phase space sampling to have less than 1% uncertainty on
average multiplicity.
** New libtool version
gfortran is now used as default if it is available. Set FC=g77 to
override this.
** Fixed several memory leaks
** Memory allocation
Now using plain 'new' and 'delete'.
* Herwig++-2.2.0 release: 2008-04-18 (tagged at SVN r3195)
** Major release: now as stand-alone library
Herwig++ is now a stand-alone dlopen() plugin to ThePEG.
No compile-time linking to Herwig code is required. The Herwig++
binary is a simple executable steering ThePEG, which can
be replaced by other frontends (such as setupThePEG / runThePEG).
** New matrix elements
p p -> W + jet / Z + jet / W + higgs / Z + higgs
e+ e- -> Z + higgs
** Looptools
Updated to version 2.2.
** Ticket #141: segfault from using 'run' command
Fixed by using default allocators in Herwig++, and the
Repository::cleanup() method in ThePEG 1.2.0.
** Ticket #157: broken gsl library path on some 64bit systems
Paths with lib64 are correctly identified now.
** Ticket #159: p_t spectrum of ttbar pair
Fixed identical particle multiplier in Sudakov form factor.
** Ticket #161: glibc segfault
Rare segfault in MPI handler fixed.
** Ticket #165: rare infinite loop in four-body decay
All 4-body decays without dedicated decayers now use the Mambo algorithm.
A loop guard has been introduced to 3-body decays to avoid infinite retries.
** Ticket #166: rare infinite loop in top ME correction
These very rare events (O(1) in 10^7) close to mass threshold
now are discarded.
** Higgs width fixes
** SatPDF
Optionally, the PDF extrapolation behaviour outside a given range
can now be specified.
** gcc 4.3
Herwig++-2.2 compiles cleanly with the new gcc 4.3 series.
* Herwig++-2.1.4 release: 2008-03-03 (tagged at SVN r3024)
** Ticket #152: Vertex positions
All vertex positions of unphysical particles are set to zero until
a fix for the previous nonsensical values can be implemented.
* Herwig++-2.1.3 release: 2008-02-25 (tagged at SVN r2957)
** Ticket #129: Baryon decays
Fix for baryon decay modes.
** Ticket #131: HepMC
Check if IO_GenEvent exists
** Ticket #134: Hadronization
Smearing of hadron directions in cluster decay fixed.
** Ticket #137: HepMC
HepMC conversion allows specification of energy and length units to
be used.
** Ticket #139: Neutral kaons
Ratio K_L / K_S corrected.
** Ticket #140 / #141: Crash on shutdown
Event generation from the 'read' stage or an interface now shuts
down cleanly. Fixes a crash bug introduced in 2.1.1 which affected
external APIs to ThePEG / Herwig.
** Ticket #146: BSM models can be disabled
To save build time, some or all of the BSM models can be disabled
using the '--enable-models' configure switch.
** Reorganised .model files
The .model files now include the model-specific particles, too.
** Re-tune
Re-tuned hadronization parameters to LEP data.
** Other fixes in
QSPAC implementation in Shower; Multi-parton interaction tuning;
MRST initialization
* Herwig++-2.1.2 release: 2008-01-05 (tagged at SVN r2694)
** Ticket #127
Thanks to a patch submitted by Fred Stober, HepMCFile now can
output event files in all supported formats.
** Ticket #128
Fixed incorrect value of pi in histogram limits.
** Other fixes in
CKKW Qtilde clusterers, BSM width cut, SUSY mixing matrices.
* Herwig++-2.1.1 release: 2007-12-08 (tagged at SVN r2589)
** Bug #123
Fixed a bug with particle lifetimes which resulted in nan for some
vertex positions.
** Secondary scatters
Fixed bug which gave intrinsic pT to secondary scatters.
** gcc abs bug detection
configure now checks for and works around
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34130
** CKKW reweighting
Fixed wrong check for top quarks.
** MPIHandler
Fixed call order ambiguity.
* Herwig++-2.1.0 release: 2007-11-20 (tagged at SVN r2542)
** Major new release
Herwig++-2.1 includes significant improvements, including
multi-parton interactions, BSM physics and a new hadronic decay
model, tuned to LEP data.
For an overview of the changes, please see the release note
arXiv:0711.3137
* Herwig++-2.0.3 release: 2007-08-21 (tagged at SVN r2101)
** Bug #90
nan in top decay ME corrections fixed.
** unlisted
Colour flow fix in LightClusterDecayer
** unlisted
Updated version of MultiplicityCount analysis handler.
* Herwig++-2.0.2 release: 2007-07-06 (tagged at SVN r1716)
** Bug #80
Separation of HepMC from CLHEP is handled properly now.
** Bug #83
Workaround for OS X header problem
** unlisted
Veto on very hard emissions from Shower.
** unlisted
Detailed documentation in .in files
* Herwig++-2.0.1 release: 2006-12-05 (tagged at SVN r1195)
** Bug #54
ClusterFissioner vertex calculation fixed.
** Bug #57
Crash when showering W+jet events supplied by Les Houches interface.
** Bug #59
Fix for #57 applied to LHC events.
** Bug #60
Segfault when PDF is set to NoPDF.
** Bug #61
Missing weight factor for I=0 mesons
** Bug #62
Spinor vertex calculations broken when spinor rep is not default rep.
** Bug #63
Top decay never produces tau.
** Bug #69
TTbar and HiggsJet analysis handlers fixed.
** unlisted
Reorganization of Hadronization module gives 30% speedup.
Thanks to Vincenzo Innocente at CMS for his profiling work!
** unlisted
cleaner automake files in include/ and src/
** unlisted
Hw64 hadron selection algorithm 'abortnow' fixed.
** unlisted
Top/LeptonDalitzAnalysis removed (only worked with modified code).
** unlisted
removed f'_0 from particle list, decays were not handled
* Herwig++-2.0.0 release: 2006-09-28 (tagged at SVN r1066)
** Full simulation of hadron collisions
diff --git a/PDF/HwRemDecayer.h b/PDF/HwRemDecayer.h
--- a/PDF/HwRemDecayer.h
+++ b/PDF/HwRemDecayer.h
@@ -1,665 +1,665 @@
// -*- C++ -*-
//
// HwRemDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HwRemDecayer_H
#define HERWIG_HwRemDecayer_H
//
// This is the declaration of the HwRemDecayer class.
//
#include "ThePEG/PDT/RemnantDecayer.h"
#include "ThePEG/Handlers/EventHandler.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/EventRecord/SubProcess.h"
#include "ThePEG/PDF/BeamParticleData.h"
#include "Herwig/Shower/ShowerAlpha.h"
#include "Herwig/PDT/StandardMatchers.h"
#include "ThePEG/PDT/StandardMatchers.h"
#include "HwRemDecayer.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The HwRemDecayer class is responsible for the decay of the remnants. Additional
* secondary scatters have to be evolved backwards to a gluon, the
* first/hard interaction has to be evolved back to a valence quark.
* This is all generated inside this class,
* which main methods are then called by the ShowerHandler.
*
* A simple forced splitting algorithm is used.
* This takes the Remnant object produced from the PDF and backward
* evolution (hadron - parton) and produce partons with the remaining
* flavours and with the correct colour connections.
*
* The algorithim operates by starting with the parton which enters the hard process.
* If this is from the sea there is a forced branching to produce the antiparticle
* from a gluon branching. If the parton entering the hard process was a gluon, or
* a gluon was produced from the first step of the algorithm, there is then a further
* branching back to a valence parton. After these partons have been produced a quark or
* diquark is produced to give the remaining valence content of the incoming hadron.
*
* The forced branching are generated using a scale between QSpac and EmissionRange times
* the minimum scale. The energy fractions are then distributed using
* \f[\frac{\alpha_S}{2\pi}\frac{P(z)}{z}f(x/z,\tilde{q})\f]
* with the massless splitting functions.
*
* \author Manuel B\"ahr
*
* @see \ref HwRemDecayerInterfaces "The interfaces"
* defined for HwRemDecayer.
*/
class HwRemDecayer: public RemnantDecayer {
public:
/** Typedef to store information about colour partners */
typedef vector<pair<tPPtr, tPPtr> > PartnerMap;
public:
/**
* The default constructor.
*/
HwRemDecayer() : allowTop_(false), multiPeriph_(false), quarkPair_(false),
ptmin_(-1.*GeV), beta_(ZERO),
maxtrySoft_(10),
colourDisrupt_(1.0),
ladderbFactor_(0.0),
ladderPower_(-0.08),
ladderNorm_(1.0),
gaussWidth_(0.1),
valOfN_(0),
initTotRap_(0),
_kinCutoff(0.75*GeV),
_forcedSplitScale(2.5*GeV),
_range(1.1), _zbin(0.05),_ybin(0.),
_nbinmax(100), DISRemnantOpt_(0),
pomeronStructure_(0), mg_(ZERO) {}
/** @name Virtual functions required by the Decayer class. */
//@{
/**
* Check if this decayer can perfom the decay specified by the
* given decay mode.
* @return true if this decayer can handle the given mode, otherwise false.
*/
virtual bool accept(const DecayMode &) const {
return true;
}
/**
* Return true if this decayer can handle the extraction of the \a
* extracted parton from the given \a particle.
*/
virtual bool canHandle(tcPDPtr particle, tcPDPtr parton) const;
/**
* Return true if this decayed can extract more than one parton from
* a particle.
*/
virtual bool multiCapable() const {
return true;
}
/**
* Perform a decay for a given DecayMode and a given Particle instance.
* @param dm the DecayMode describing the decay.
* @param p the Particle instance to be decayed.
* @param step the step we are working on.
* @return a ParticleVector containing the decay products.
*/
virtual ParticleVector decay(const DecayMode & dm, const Particle & p, Step & step) const;
//@}
public:
/**
* struct that is used to catch exceptions which are thrown
* due to energy conservation issues of additional soft scatters
*/
struct ExtraSoftScatterVeto {};
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Do several checks and initialization, for remnantdecay inside ShowerHandler.
*/
void initialize(pair<tRemPPtr, tRemPPtr> rems, tPPair beam, Step & step,
Energy forcedSplitScale);
/**
* Initialize the soft scattering machinery.
* @param ptmin = the pt cutoff used in the UE model
* @param beta = slope of the soft pt-spectrum
*/
void initSoftInteractions(Energy ptmin, InvEnergy2 beta);
/**
* Perform the acual forced splitting.
* @param partons is a pair of ThePEG::Particle pointers which store the final
* partons on which the shower ends.
* @param pdfs are pointers to the pdf objects for both beams
* @param first is a flage wether or not this is the first or a secondary interation
*/
void doSplit(pair<tPPtr, tPPtr> partons, pair<tcPDFPtr, tcPDFPtr> pdfs, bool first);
/**
* Perform the final creation of the diquarks. Set the remnant masses and do
* all colour connections.
* @param colourDisrupt = variable to control how many "hard" scatters
* are colour isolated
* @param softInt = parameter for the number of soft scatters
*/
void finalize(double colourDisrupt=0.0, unsigned int softInt=0);
/**
* Find the children
*/
void findChildren(tPPtr,vector<PPtr> &) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit() {
Interfaced::doinit();
_ybin=0.25/_zbin;
mg_ = getParticleData(ParticleID::g)->constituentMass();
}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HwRemDecayer & operator=(const HwRemDecayer &);
+ HwRemDecayer & operator=(const HwRemDecayer &) = delete;
public:
/**
* Simple struct to store info about baryon quark and di-quark
* constituents.
*/
struct HadronContent {
/**
* manually extract the valence flavour \a id.
*/
inline void extract(int id) {
for(unsigned int i=0; i<flav.size(); i++) {
if(id == sign*flav[i]){
if(hadron->id() == ParticleID::gamma ||
(hadron->id() == ParticleID::pomeron && pomeronStructure==1) ||
hadron->id() == ParticleID::reggeon) {
flav[0] = id;
flav[1] = -id;
extracted = 0;
flav.resize(2);
}
else if (hadron->id() == ParticleID::pomeron && pomeronStructure==0) {
extracted = 0;
}
else {
extracted = i;
}
break;
}
}
}
/**
* Return a proper particle ID assuming that \a id has been removed
* from the hadron.
*/
long RemID() const;
/**
* Method to determine whether \a parton is a quark from the sea.
* @return TRUE if \a parton is neither a valence quark nor a gluon.
*/
bool isSeaQuark(tcPPtr parton) const {
return ((parton->id() != ParticleID::g) && ( !isValenceQuark(parton) ) );
}
/**
* Method to determine whether \a parton is a valence quark.
*/
bool isValenceQuark(tcPPtr parton) const {
return isValenceQuark(parton->id());
}
/**
* Method to determine whether \a parton is a quark from the sea.
* @return TRUE if \a parton is neither a valence quark nor a gluon.
*/
bool isSeaQuarkData(tcPDPtr partonData) const {
return ((partonData->id() != ParticleID::g) && ( !isValenceQuarkData(partonData) ) );
}
/**
* Method to determine whether \a parton is a valence quark.
*/
bool isValenceQuarkData(tcPDPtr partonData) const {
int id(sign*partonData->id());
return find(flav.begin(),flav.end(),id) != flav.end();
}
/**
* Method to determine whether \a parton is a valence quark.
*/
bool isValenceQuark(int id) const {
return find(flav.begin(),flav.end(),sign*id) != flav.end();
}
/** The valence flavours of the corresponding baryon. */
vector<int> flav;
/** The array index of the extracted particle. */
int extracted;
/** -1 if the particle is an anti-particle. +1 otherwise. */
int sign;
/** The ParticleData objects of the hadron */
tcPDPtr hadron;
/** Pomeron treatment */
unsigned int pomeronStructure;
};
/**
* Return the hadron content objects for the incoming particles.
*/
const pair<HadronContent, HadronContent>& content() const {
return theContent;
}
/**
* Return a HadronContent struct from a PPtr to a hadron.
*/
HadronContent getHadronContent(tcPPtr hadron) const;
/**
* Set the hadron contents.
*/
void setHadronContent(tPPair beam) {
theContent.first = getHadronContent(beam.first);
theContent.second = getHadronContent(beam.second);
}
private:
/**
* Do the forced Splitting of the Remnant with respect to the
* extracted parton \a parton.
* @param parton = PPtr to the parton going into the subprocess.
* @param content = HadronContent struct to keep track of flavours.
* @param rem = Pointer to the ThePEG::RemnantParticle.
* @param used = Momentum vector to keep track of remaining momenta.
* @param partners = Vector of pairs filled with tPPtr to the particles
* which should be colour connected.
* @param pdf pointer to the PDF Object which is used for this particle
* @param first = Flag for the first interaction.
*/
void split(tPPtr parton, HadronContent & content, tRemPPtr rem,
Lorentz5Momentum & used, PartnerMap & partners, tcPDFPtr pdf, bool first);
/**
* Merge the colour lines of two particles
* @param p1 = Pointer to particle 1
* @param p2 = Pointer to particle 2
* @param anti = flag to indicate, if (anti)colour was extracted as first parton.
*/
void mergeColour(tPPtr p1, tPPtr p2, bool anti) const;
/**
* Set the colour connections.
* @param partners = Object that holds the information which particles to connect.
* @param anti = flag to indicate, if (anti)colour was extracted as first parton.
* @param disrupt parameter for disruption of the colour structure
*/
void fixColours(PartnerMap partners, bool anti, double disrupt) const;
/**
* Set the momenta of the Remnants properly and boost the decay particles.
*/
void setRemMasses() const;
/**
* This creates a parton from the remaining flavours of the hadron. The
* last parton used was a valance parton, so only 2 (or 1, if meson) flavours
* remain to be used.
*/
PPtr finalSplit(const tRemPPtr rem, long remID,
Lorentz5Momentum usedMomentum) const {
// Create the remnant and set its momentum, also reset all of the decay
// products from the hadron
PPtr remnant = new_ptr(Particle(getParticleData(remID)));
Lorentz5Momentum prem(rem->momentum()-usedMomentum);
prem.setMass(getParticleData(remID)->constituentMass());
prem.rescaleEnergy();
remnant->set5Momentum(prem);
// Add the remnant to the step, but don't do colour connections
thestep->addDecayProduct(rem,remnant,false);
return remnant;
}
/**
* This takes the particle and find a splitting for np -> p + child and
* creates the correct kinematics and connects for such a split. This
* Splitting has an upper bound on qtilde given by the energy argument
* @param rem The Remnant
* @param child The PDG code for the outgoing particle
* @param oldQ The maximum scale for the evolution
* @param oldx The fraction of the hadron's momentum carried by the last parton
* @param pf The momentum of the last parton at input and after branching at output
* @param p The total emitted momentum
* @param content The content of the hadron
*/
PPtr forceSplit(const tRemPPtr rem, long child, Energy &oldQ, double &oldx,
Lorentz5Momentum &pf, Lorentz5Momentum &p,
HadronContent & content) const;
/**
* Check if a particle is a parton from a hadron or not
* @param parton The parton to be tested
*/
bool isPartonic(tPPtr parton) const;
/** @name Soft interaction methods. */
//@{
/**
* Produce pt values according to dN/dp_T = N p_T exp(-beta_*p_T^2)
*/
Energy softPt() const;
/**
* Get the 2 pairs of 5Momenta for the scattering. Needs calling of
* initSoftInteractions.
*/
void softKinematics(Lorentz5Momentum &r1, Lorentz5Momentum &r2,
Lorentz5Momentum &g1, Lorentz5Momentum &g2) const;
/**
* Create N soft gluon interactions
*/
void doSoftInteractions(unsigned int N){
if(!multiPeriph_){
doSoftInteractions_old(N);}
else{
doSoftInteractions_multiPeriph(N);
}
}
/**
* Create N soft gluon interactions (old version)
*/
void doSoftInteractions_old(unsigned int N);
/**
* Create N soft gluon interactions - multiperhpheral kinematics
*/
void doSoftInteractions_multiPeriph(unsigned int N);
/**
* Method to add a particle to the step
* @param parent = pointer to the parent particle
* @param id = Particle ID of the newly created particle
* @param p = Lorentz5Momentum of the new particle
*/
tPPtr addParticle(tcPPtr parent, long id, Lorentz5Momentum p) const;
//@}
/**
* A flag which indicates, whether the extracted valence quark was a
* anti particle.
*/
pair<bool, bool> theanti;
/**
* variable to sum up the x values of the extracted particles
*/
pair<double, double> theX;
/**Pair of HadronContent structs to know about the quark content of the beams*/
pair<HadronContent, HadronContent> theContent;
/**Pair of Lorentz5Momentum to keep track of the forced splitting product momenta*/
pair<Lorentz5Momentum, Lorentz5Momentum> theUsed;
/**
* Pair of PartnerMap's to store the particles, which will be colour
* connected in the end.
*/
pair<PartnerMap, PartnerMap> theMaps;
/**
* Variable to hold a pointer to the current step. The variable is used to
* determine, wether decay(const DecayMode & dm, const Particle & p, Step & step)
* has been called in this event or not.
*/
StepPtr thestep;
/**
* Pair of Remnant pointers. This is needed to boost
* in the Remnant-Remnant CMF after all have been decayed.
*/
pair<RemPPtr, RemPPtr> theRems;
/**
* The beam particle data for the current incoming hadron
*/
mutable tcPPtr theBeam;
/**
* the beam data
*/
mutable Ptr<BeamParticleData>::const_pointer theBeamData;
/**
* The PDF for the current initial-state shower
*/
mutable tcPDFPtr _pdf;
private:
/**
* Switch to control handling of top quarks in proton
*/
bool allowTop_;
/**
* Switch to control using multiperipheral kinemaics
*/
bool multiPeriph_;
/**
* True if kinematics is to be calculated for quarks
*/
bool quarkPair_;
/** @name Soft interaction variables. */
//@{
/**
* Pair of soft Remnant pointers, i.e. Diquarks.
*/
tPPair softRems_;
/**
* ptcut of the UE model
*/
Energy ptmin_;
/**
* slope of the soft pt-spectrum: dN/dp_T = N p_T exp(-beta*p_T^2)
*/
InvEnergy2 beta_;
/**
* Maximum number of attempts for the regeneration of an additional
* soft scattering, before the number of scatters is reduced.
*/
unsigned int maxtrySoft_;
/**
* Variable to store the relative number of colour disrupted
* connections to additional soft subprocesses.
*/
double colourDisrupt_;
/**
* Variable to store the additive factor of the
multiperipheral ladder multiplicity.
*/
double ladderbFactor_;
/**
* Variable of the parameterization of the ladder multiplicity.
*/
double ladderPower_;
/**
* Variable of the parameterization of the ladder multiplicity.
*/
double ladderNorm_;
/**
* Variable to store the gaussian width of the
* fluctuation of the longitudinal momentum
* fraction.
*/
double gaussWidth_;
/**
* Variable to store the current total multiplicity
of a ladder.
*/
double valOfN_;
/**
* Variable to store the initial total rapidity between
of the remnants.
*/
double initTotRap_;
//@}
/** @name Forced splitting variables. */
//@{
/**
* The kinematic cut-off
*/
Energy _kinCutoff;
/**
* The PDF freezing scale as set in ShowerHandler
*/
Energy _forcedSplitScale;
/**
* Range for emission
*/
double _range;
/**
* Size of the bins in z for the interpolation
*/
double _zbin;
/**
* Size of the bins in y for the interpolation
*/
double _ybin;
/**
* Maximum number of bins for the z interpolation
*/
int _nbinmax;
/**
* Pointer to the object calculating the QCD coupling
*/
ShowerAlphaPtr _alphaS;
/**
* Pointer to the object calculating the QED coupling
*/
ShowerAlphaPtr _alphaEM;
/**
* Option for the DIS remnant
*/
unsigned int DISRemnantOpt_;
/**
* Option for the treatment of the pomeron structure
*/
unsigned int pomeronStructure_;
//@}
/**
* The gluon constituent mass.
*/
Energy mg_;
};
}
#endif /* HERWIG_HwRemDecayer_H */
diff --git a/PDF/IncomingPhotonEvolver.h b/PDF/IncomingPhotonEvolver.h
--- a/PDF/IncomingPhotonEvolver.h
+++ b/PDF/IncomingPhotonEvolver.h
@@ -1,180 +1,180 @@
// -*- C++ -*-
#ifndef HERWIG_IncomingPhotonEvolver_H
#define HERWIG_IncomingPhotonEvolver_H
//
// This is the declaration of the IncomingPhotonEvolver class.
//
#include "ThePEG/Handlers/StepHandler.h"
namespace Herwig {
using namespace ThePEG;
/**
* The IncomingPhotonEvolver class performs the backward evolution
* of a photon in a partonic process to a quark or antiquark so that
* the event can be showered.
*
* @see \ref IncomingPhotonEvolverInterfaces "The interfaces"
* defined for IncomingPhotonEvolver.
*/
class IncomingPhotonEvolver: public StepHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IncomingPhotonEvolver();
//@}
public:
/** @name Virtual functions required by the StepHandler class. */
//@{
/**
* The main function called by the EventHandler class to
* perform a step. Given the current state of an Event, this function
* performs the event generation step and includes the result in a new
* Step object int the Event record.
* @param eh the EventHandler in charge of the Event generation.
* @param tagged if not empty these are the only particles which should
* be considered by the StepHandler.
* @param hint a Hint object with possible information from previously
* performed steps.
* @throws Veto if the StepHandler requires the current step to be discarded.
* @throws Stop if the generation of the current Event should be stopped
* after this call.
* @throws Exception if something goes wrong.
*/
virtual void handle(EventHandler & eh, const tPVector & tagged,
const Hint & hint);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Compute boost parameter along z axis to get (Ep, any perp, qp)
* from (E, same perp, q).
*/
inline double getBeta(const double E, const double q,
const double Ep, const double qp) const
{return (q*E-qp*Ep)/(sqr(qp)+sqr(E));}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IncomingPhotonEvolver & operator=(const IncomingPhotonEvolver &);
+ IncomingPhotonEvolver & operator=(const IncomingPhotonEvolver &) = delete;
private:
/**
* PDF set to use. Overrides the one that is associated with the beam particle.
*/
PDFPtr PDF_;
/**
* The maximum value of the PDF for the sample
*/
double PDFMax_;
/**
* The power for the sampling of the PDF
*/
double PDFPower_;
/**
* The minimum starting scale for the evolution
*/
Energy minpT_;
/**
* The minimum space-like virtuality of the photon
*/
Energy minVirtuality_;
/**
* Maximum number of attempts to generate the scale of the
* branching
*/
unsigned int vetoTries_;
/**
* Maximum number of attempts to regenerate the virtuality
*/
unsigned int virtualityTries_;
/**
* Photon ParticleData object
*/
tcPDPtr photon_;
/**
* Partons to backward evolve to
*/
vector<tcPDPtr> partons_;
};
}
#endif /* HERWIG_IncomingPhotonEvolver_H */
diff --git a/PDF/MPIPDF.h b/PDF/MPIPDF.h
--- a/PDF/MPIPDF.h
+++ b/PDF/MPIPDF.h
@@ -1,156 +1,156 @@
// -*- C++ -*-
//
// MPIPDF.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MPIPDF_H
#define HERWIG_MPIPDF_H
//
// This is the declaration of the MPIPDF class.
//
#include "ThePEG/PDF/PDFBase.h"
#include "MPIPDF.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The MPIPDF class defines
* a modified pdf which uses an existing pdf object to add
* modifications like removing the valence part of it, which
* is needed in the backward evolution of secondary scatters.
*
* \author Manuel B\"ahr
*
* @see \ref MPIPDFInterfaces "The interfaces"
* defined for MPIPDF.
*/
class MPIPDF: public PDFBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The constructor which takes a PDF object as argument, to work with.
*/
MPIPDF(cPDFPtr orig = cPDFPtr()) : thePDF(orig) {}
/**
* The destructor.
*/
virtual ~MPIPDF();
//@}
public:
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return true if this PDF can handle the extraction of partons from
* the given \a particle.
*/
virtual bool canHandleParticle(tcPDPtr particle) const;
/**
* Return the partons which this PDF may extract from the given
* \a particle.
*/
virtual cPDVector partons(tcPDPtr particle) const;
/**
* The density. Return the pdf for the given \a parton inside the
* given \a particle for the virtuality \a partonScale and momentum
* fraction \a x. The \a particle is assumed to have a virtuality \a
* particleScale. For MPIPDF, only the sea quark densities
* are included here!
*/
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps = 0.0,
Energy2 particleScale = ZERO) const;
/**
* The valence density. Return the pdf for the given cvalence \a
* parton inside the given \a particle for the virtuality \a
* partonScale and momentum fraction \a x. The \a particle is
* assumed to have a virtuality \a particleScale. If not overidden
* by a sub class this implementation will assume that the
* difference between a quark and anti-quark distribution is due do
* valense quarks, but return zero for anything else.
*/
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps = 0.0,
Energy2 particleScale = ZERO) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MPIPDF & operator=(const MPIPDF &);
+ MPIPDF & operator=(const MPIPDF &) = delete;
/**
* pointer to the underlying ThePEG::PDFBase object, we are modifying.
*/
cPDFPtr thePDF;
};
}
#endif /* HERWIG_MPIPDF_H */
diff --git a/PDF/Makefile.am b/PDF/Makefile.am
--- a/PDF/Makefile.am
+++ b/PDF/Makefile.am
@@ -1,58 +1,58 @@
EXTRA_DIST = diffraction
pkglib_LTLIBRARIES = HwPomeronPDF.la
HwPomeronPDF_la_SOURCES = \
PomeronPDF.cc PomeronPDF.h
## add this to produce tests of the PDFs
## HwDIFFRACTIVEPDF_la_CPPFLAGS=$(AM_CPPFLAGS) -DDIFFRACTIVEPDF_TESTING
-HwPomeronPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0
+HwPomeronPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
pkglib_LTLIBRARIES += HwReggeonPDF.la
HwReggeonPDF_la_SOURCES = \
ReggeonPDF.cc ReggeonPDF.h
## add this to produce tests of the PDFs
## HwDIFFRACTIVEPDF_la_CPPFLAGS=$(AM_CPPFLAGS) -DDIFFRACTIVEPDF_TESTING
-HwReggeonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0
+HwReggeonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
pkglib_LTLIBRARIES += HwPomeronFlux.la
HwPomeronFlux_la_SOURCES = \
PomeronFlux.h PomeronFlux.cc
-HwPomeronFlux_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
+HwPomeronFlux_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
## bound into HwShower.la
noinst_LTLIBRARIES = libHwRemDecayer.la
libHwRemDecayer_la_SOURCES = \
HwRemDecayer.h HwRemDecayer.cc HwRemDecayer.fh
## bound into HwShower.la
noinst_LTLIBRARIES += libHwMPIPDF.la
libHwMPIPDF_la_SOURCES = \
MPIPDF.h MPIPDF.cc MPIPDF.fh \
MinBiasPDF.h MinBiasPDF.cc MinBiasPDF.fh
pkglib_LTLIBRARIES += HwSatPDF.la
HwSatPDF_la_SOURCES = \
SatPDF.h SatPDF.cc
-HwSatPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0
+HwSatPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0
pkglib_LTLIBRARIES += HwIncomingPhotonEvolver.la
HwIncomingPhotonEvolver_la_SOURCES = \
IncomingPhotonEvolver.h IncomingPhotonEvolver.cc
-HwIncomingPhotonEvolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0
+HwIncomingPhotonEvolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0
pkglib_LTLIBRARIES += HwSaSPhotonPDF.la
HwSaSPhotonPDF_la_SOURCES = \
SaSGamma.f SaSPhotonPDF.cc SaSPhotonPDF.h
-HwSaSPhotonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0
+HwSaSPhotonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0
install-data-local:
for i in `find $(srcdir)/diffraction -name '*.data'`; \
do \
$(install_sh_DATA) $$i $(DESTDIR)$(pkgdatadir)/PDF/$${i#$(srcdir)/}; \
done
uninstall-local:
rm -rf $(DESTDIR)$(pkgdatadir)/PDF
diff --git a/PDF/MinBiasPDF.h b/PDF/MinBiasPDF.h
--- a/PDF/MinBiasPDF.h
+++ b/PDF/MinBiasPDF.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
//
// MinBiasPDF.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MinBiasPDF_H
#define HERWIG_MinBiasPDF_H
//
// This is the declaration of the MinBiasPDF class.
//
#include "ThePEG/PDF/PDFBase.h"
#include "MinBiasPDF.fh"
namespace Herwig {
using namespace ThePEG;
/**
* The MinBiasPDF class defines
* a modified pdf which uses an existing pdf object to add
* modifications like removing the valence part of it, which
* is needed in the backward evolution of secondary scatters.
*
* \author Manuel B\"ahr
*
* @see \ref MinBiasPDFInterfaces "The interfaces"
* defined for MinBiasPDF.
*/
class MinBiasPDF: public PDFBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MinBiasPDF() : thePDF(PDFPtr()) {}
/**
* The copy constructor.
*/
MinBiasPDF(const MinBiasPDF & x) :
PDFBase(x), thePDF(x.thePDF) {}
/**
* The destructor.
*/
virtual ~MinBiasPDF() {}
//@}
public:
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return true if this PDF can handle the extraction of partons from
* the given \a particle.
*/
virtual bool canHandleParticle(tcPDPtr particle) const;
/**
* Return the partons which this PDF may extract from the given
* \a particle.
*/
virtual cPDVector partons(tcPDPtr particle) const;
/**
* The density. Return the pdf for the given \a parton inside the
* given \a particle for the virtuality \a partonScale and momentum
* fraction \a x. The \a particle is assumed to have a virtuality \a
* particleScale.
*/
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps=0.0, Energy2 particleScale = ZERO) const;
/**
* The valence density. Return the pdf for the given cvalence \a
* parton inside the given \a particle for the virtuality \a
* partonScale and momentum fraction \a x. The \a particle is
* assumed to have a virtuality \a particleScale. If not overidden
* by a sub class this implementation will assume that the
* difference between a quark and anti-quark distribution is due do
* valense quarks, but return zero for anything else.
*/
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps=0.0, Energy2 particleScale = ZERO) const;
//@}
/** return the underlying PDFBase pointer*/
tcPDFPtr originalPDF() const {return thePDF;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MinBiasPDF & operator=(const MinBiasPDF &);
+ MinBiasPDF & operator=(const MinBiasPDF &) = delete;
/**
* pointer to the underlying ThePEG::PDFBase object, we are modifying.
*/
PDFPtr thePDF;
};
}
#endif /* HERWIG_MinBiasPDF_H */
diff --git a/PDF/PomeronFlux.h b/PDF/PomeronFlux.h
--- a/PDF/PomeronFlux.h
+++ b/PDF/PomeronFlux.h
@@ -1,245 +1,245 @@
// -*- C++ -*-
#ifndef Herwig_PomeronFlux_H
#define Herwig_PomeronFlux_H
//
// This is the declaration of the PomeronFlux class.
//
#include "ThePEG/PDF/PDFBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the PomeronFlux class.
*
* @see \ref PomeronFluxInterfaces "The interfaces"
* defined for PomeronFlux.
*/
class PomeronFlux: public PDFBase {
public:
/**
* Default constructor
*/
PomeronFlux();
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return true if this PDF can handle the extraction of partons from
* the given \a particle.
*/
virtual bool canHandleParticle(tcPDPtr particle) const;
/**
* Return the partons which this PDF may extract from the given
* \a particle.
*/
virtual cPDVector partons(tcPDPtr particle) const;
/**
* The density. Return the pdf for the given \a parton inside the
* given \a particle for the virtuality \a partonScale and
* logarithmic momentum fraction \a l \f$(l=\log(1/x)\f$. The \a
* particle is assumed to have a virtuality \a particleScale.
*/
virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double l, Energy2 particleScale = ZERO) const;
/**
* The valence density. Return the pdf for the given cvalence \a
* parton inside the given \a particle for the virtuality \a
* partonScale and logarithmic momentum fraction \a l
* \f$(l=\log(1/x)\f$. The \a particle is assumed to have a
* virtuality \a particleScale. If not overidden by a sub class this
* will return zero.
*/
virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double l, Energy2 particleScale = ZERO) const;
/**
* Generate scale (as a fraction of the maximum scale). If the PDF
* contains strange peaks which can be difficult to handle, this
* function may be overwritten to return an appropriate scale
* \f$Q^2/Q^2_{\max}\f$ for a \a z uniformly distributed in
* ]0,1[. Also the jacobobian of the \f$Q^2/Q^2_{\max}\rightarrow
* z\f$ variable transformation must multiply the \a jacobian
* argument. The default version will simply use the function
* \f$Q^2/Q^2_{\max} = (Q^2_{\max}/Q^2_{\min})^(z-1)\f$ or, if
* \f$Q^2_{\min}\f$ is zero, \f$Q^2/Q^2_{\max} = z\f$ (where the
* limits are set by \a cut).
*/
virtual double flattenScale(tcPDPtr particle, tcPDPtr parton,
const PDFCuts & cut, double l, double z,
double & jacobian) const;
/**
* Generate a momentum fraction. If the PDF contains strange peaks
* which can be difficult to handle, this function may be
* overwritten to return an appropriate \f$l=\log(1/x)\f$ for a \a z
* uniformly distributed in ]0,1[. Also the jacobobian of the
* \f$l\rightarrow z\f$ variable transformation must in the function
* multiply the \a jacobian argument. The default version will
* simply use the function \f$l(z) = l_{\min} +
* z*(l_{\max}-l_{\min})\f$ (where the limits are set by \a cut).
*/
virtual double flattenL(tcPDPtr particle, tcPDPtr parton, const PDFCuts &cut,
double z, double & jacobian) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Set normalization constant Ap of the pomeron flux.
*/
virtual void doinit();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PomeronFlux & operator=(const PomeronFlux &);
+ PomeronFlux & operator=(const PomeronFlux &) = delete;
private:
/**
* Integrated pomeron/regeon flux over qq in the range qqmin ... qqmax
* (with normalization constant Ap = 1 GeV2).
* The flux normalization constant is obtained \f$x_p*intFx_p = 1\f$,
* where x_p = 0.003.
*/
Energy2 intxFx(double x, Energy2 qqmin, Energy2 qqmax,
double alfa0, InvEnergy2 alfap, InvEnergy2 beta) const;
/**
* Helper function in doinit() which sets the parameters of the
* pomeron/regeon flux according to user setup.
*/
void setFluxPar();
private:
/**
* Minimum \f$Q^2\f$ for the pomeron/reggeon
*/
Energy2 q2min_;
/**
* Maximum \f$Q^2\f$ for the pomeron/reggeon
*/
Energy2 q2max_;
/**
* Cut on the minimum xi
*/
double xiMin_;
/**
* Cut on the maximum xi
*/
double xiMax_;
/**
* Pomeron intercept
*/
double alfa0P_;
/**
* Pomeron slope
*/
InvEnergy2 alfapP_;
/**
* Parameter of pomeron flux Bp
*/
InvEnergy2 betaP_;
/**
* Normalization constant of the pomeron flux
*/
InvEnergy2 normP_;
/**
* Reggeon intercept
*/
double alfa0R_;
/**
* Reggeon slope
*/
InvEnergy2 alfapR_;
/**
* Parameter of reggeon flux Bp
*/
InvEnergy2 betaR_;
/**
* Normalization constant of the reggeon flux
*/
InvEnergy2 normR_;
/**
* Factor of the pomeron flux
*/
double nR_;
/**
* Switch between pomeron/regeon structure function fits.
* The flux parameters are set according to the fit choice.
*/
int PDFFit_;
};
}
#endif /* Herwig_PomeronFlux_H */
diff --git a/PDF/PomeronPDF.h b/PDF/PomeronPDF.h
--- a/PDF/PomeronPDF.h
+++ b/PDF/PomeronPDF.h
@@ -1,226 +1,226 @@
// -*- C++ -*-
//
// PomeronPDF.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PomeronPDF_H
#define HERWIG_PomeronPDF_H
#include <ThePEG/PDF/PDFBase.h>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
namespace Herwig {
using namespace ThePEG;
/** \ingroup PDF
*
* Implementation of the PomeronPDF PDFs
*
* @see \ref PomeronPDFInterfaces "The interfaces"
* defined for PomeronPDF.
*/
class PomeronPDF : public PDFBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default constructor.
*/
PomeronPDF();
/** @name Virtual functions from PDFBase */
//@{
/**
* Return true if this PDF can handle the extraction of parton from the
* given particle ie. if the particle is a proton or neutron.
* @param particle The particle
*/
virtual bool canHandleParticle(tcPDPtr particle) const;
/**
* Return the parton types which are described by these parton
* densities.
* @param p The particle
*/
virtual cPDVector partons(tcPDPtr p) const;
/**
* Return x times the pdf for the given parameters
* @param particle The beam particle
* @param parton The parton for which to return the PDF.
* @param partonScale The scale at which to evaluate the PDF.
* @param x The momentum fraction
* @param eps ??? an unknown parameter from ThePEG.
* @param particleScale The scale for the particle
*/
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps = 0.0,
Energy2 particleScale = ZERO) const;
/**
* Return x times the valence pdf for the given parameters
* @param particle The beam particle
* @param parton The parton for which to return the PDF.
* @param partonScale The scale at which to evaluate the PDF.
* @param x The momentum fraction
* @param eps ??? an unknown parameter from ThePEG.
* @param particleScale The scale for the particle
*/
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps = 0.0,
Energy2 particleScale = ZERO) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Enumeration to storage the types of partons
*/
enum PDFFlavour {charm, gluon, singlet};
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PomeronPDF & operator=(const PomeronPDF &);
+ PomeronPDF & operator=(const PomeronPDF &) = delete;
private:
/**
* This function calculates the PDF value for the given particles and a given x and q
* @param flPDF Flavour of the PDF function
* @param x The x of the pomeron
* @param qq The scale
*
*/
double getPDFValue(PDFFlavour flPDF, double x, Energy2 qq) const;
/**
* Load the PDF tables from file to the vectors.
*/
void loadTables() const;
private:
/**
* Number of PDF flavours
*/
static const int nPDFFlavour_;
/**
* Vector of matrixes of PDF functions for different flavours:
* pdfTable [Flavours][Q^2][log x]
*/
mutable vector<vector<vector<double> > > pdfTable_;
/**
* Vector of grid with log x values: lxGrid [Flavours] [log x]
*/
mutable vector<vector<double> > lxGrid_;
/**
* Vector of grid with log qq values: lxGrid [Flavours] [log qq]
*/
mutable vector<vector<double> > lqqGrid_;
/**
* Vector of names of PDF data files for each flavour
*/
vector<string> fileName_;
/**
* Base of the filename
*/
string rootName_;
/**
* Number of ln x points
*/
int nxPoints_;
/**
* Number of qq flavours
*/
int nqPoints_;
/**
* Switch between different PDF fits. Possible values: 0 fit 2007, 1 fit A 2006, 2 fit B 2006
*/
int PDFFit_;
/**
* Switch between different aproaches when the values are out of PDF range: 0 Extrapolate, 1 Freeze
*/
int boundary_;
};
}
#endif
diff --git a/PDF/ReggeonPDF.h b/PDF/ReggeonPDF.h
--- a/PDF/ReggeonPDF.h
+++ b/PDF/ReggeonPDF.h
@@ -1,167 +1,167 @@
// -*- C++ -*-
//
// ReggeonPDF.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ReggeonPDF_H
#define HERWIG_ReggeonPDF_H
#include <ThePEG/PDF/PDFBase.h>
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
namespace Herwig {
using namespace ThePEG;
/** \ingroup PDF
*
* Implementation of the ReggeonPDF PDFs
*
* @see \ref ReggeonPDFInterfaces "The interfaces"
* defined for ReggeonPDF
* This class is wrapper of Reggeon structure function. Which is most likely
* simulated by pion structure function.
*/
class ReggeonPDF : public PDFBase {
public:
/**
* Default constructor
*/
ReggeonPDF() : particleID_(111) {}
/** @name Virtual functions from PDFBase */
//@{
/**
* Return true if this PDF can handle the extraction of parton from the
* given particle ie. if the particle is a proton or neutron.
* @param particle The particle
*/
virtual bool canHandleParticle(tcPDPtr particle) const;
/**
* Return the parton types which are described by these parton
* densities.
* @param p The particle
*/
virtual cPDVector partons(tcPDPtr p) const;
/**
* Return x times the pdf for the given parameters
* @param particle The beam particle
* @param parton The parton for which to return the PDF.
* @param partonScale The scale at which to evaluate the PDF.
* @param x The momentum fraction
* @param eps ??? an unknown parameter from ThePEG.
* @param particleScale The scale for the particle
*/
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps = 0.0,
Energy2 particleScale = ZERO) const;
/**
* Return x times the valence pdf for the given parameters
* @param particle The beam particle
* @param parton The parton for which to return the PDF.
* @param partonScale The scale at which to evaluate the PDF.
* @param x The momentum fraction
* @param eps ??? an unknown parameter from ThePEG.
* @param particleScale The scale for the particle
*/
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps = 0.0,
Energy2 particleScale = ZERO) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ReggeonPDF & operator=(const ReggeonPDF &);
+ ReggeonPDF & operator=(const ReggeonPDF &) = delete;
/**
* Pointer to the concrete PDF reggeon structure function.
*/
PDFPtr ptrPDF_;
/**
* PDG code for the particle
*/
long particleID_;
/**
* Pointer to the particle
*/
PDPtr particle_;
};
}
#endif
diff --git a/PDF/SaSPhotonPDF.h b/PDF/SaSPhotonPDF.h
--- a/PDF/SaSPhotonPDF.h
+++ b/PDF/SaSPhotonPDF.h
@@ -1,134 +1,134 @@
// -*- C++ -*-
#ifndef Herwig_SaSPhotonPDF_H
#define Herwig_SaSPhotonPDF_H
//
// This is the declaration of the SaSPhotonPDF class.
//
#include "ThePEG/PDF/PDFBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SaSPhotonPDF class provides an interface to the
*
* @see \ref SaSPhotonPDFInterfaces "The interfaces"
* defined for SaSPhotonPDF.
*/
class SaSPhotonPDF: public PDFBase {
public:
/**
* The default constructor.
*/
SaSPhotonPDF() : iset_(2), ip_(0) {}
public:
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return true if this PDF can handle the extraction of partons from
* the given \a particle.
*/
virtual bool canHandleParticle(tcPDPtr particle) const;
/**
* Return the partons which this PDF may extract from the given
* \a particle.
*/
virtual cPDVector partons(tcPDPtr particle) const;
/**
* The density. Return the pdf for the given \a parton inside the
* given \a particle for the virtuality \a partonScale and
* logarithmic momentum fraction \a l \f$(l=\log(1/x)\f$. The \a
* particle is assumed to have a virtuality \a particleScale.
*/
virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double l, Energy2 particleScale = 0.0*GeV2) const;
/**
* The valence density. Return the pdf for the given cvalence \a
* parton inside the given \a particle for the virtuality \a
* partonScale and logarithmic momentum fraction \a l
* \f$(l=\log(1/x)\f$. The \a particle is assumed to have a
* virtuality \a particleScale. If not overidden by a sub class this
* will return zero.
*/
virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double l, Energy2 particleScale = 0.0*GeV2) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SaSPhotonPDF & operator=(const SaSPhotonPDF &);
+ SaSPhotonPDF & operator=(const SaSPhotonPDF &) = delete;
private:
/**
* PDF Set
*/
mutable int iset_;
/**
* Scheme used to evaluate off-shell anomalous component.
*/
mutable int ip_;
};
}
#endif /* Herwig_SaSPhotonPDF_H */
diff --git a/PDF/SatPDF.h b/PDF/SatPDF.h
--- a/PDF/SatPDF.h
+++ b/PDF/SatPDF.h
@@ -1,172 +1,172 @@
// -*- C++ -*-
//
// SatPDF.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SatPDF_H
#define HERWIG_SatPDF_H
//
// This is the declaration of the SatPDF class.
//
#include "ThePEG/PDF/PDFBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SatPDF class defines
* a modified pdf which uses an existing pdf object to add
* modifications like removing the valence part of it, which
* is needed in the backward evolution of secondary scatters.
*
* \author Manuel B\"ahr
*
* @see \ref SatPDFInterfaces "The interfaces"
* defined for SatPDF.
*/
class SatPDF: public PDFBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
inline SatPDF() : thePDF(PDFPtr()), theX0(1E-4), theExp(0.0) {}
/**
* The copy constructor.
*/
inline SatPDF(const SatPDF & x) :
PDFBase(x), thePDF(x.thePDF), theX0(x.theX0), theExp(x.theExp) {}
/**
* The destructor.
*/
virtual ~SatPDF();
//@}
public:
/** @name Virtual functions to be overridden by sub-classes. */
//@{
/**
* Return true if this PDF can handle the extraction of partons from
* the given \a particle.
*/
virtual bool canHandleParticle(tcPDPtr particle) const;
/**
* Return the partons which this PDF may extract from the given
* \a particle.
*/
virtual cPDVector partons(tcPDPtr particle) const;
/**
* The density. Return the pdf for the given \a parton inside the
* given \a particle for the virtuality \a partonScale and momentum
* fraction \a x. The \a particle is assumed to have a virtuality \a
* particleScale.
*/
virtual double xfx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps=0.0, Energy2 particleScale = ZERO) const;
/**
* The valence density. Return the pdf for the given cvalence \a
* parton inside the given \a particle for the virtuality \a
* partonScale and momentum fraction \a x. The \a particle is
* assumed to have a virtuality \a particleScale. If not overidden
* by a sub class this implementation will assume that the
* difference between a quark and anti-quark distribution is due do
* valense quarks, but return zero for anything else.
*/
virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale,
double x, double eps=0.0, Energy2 particleScale = ZERO) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SatPDF & operator=(const SatPDF &);
+ SatPDF & operator=(const SatPDF &) = delete;
/**
* pointer to the underlying ThePEG::PDFBase object, we are modifying.
*/
PDFPtr thePDF;
/**
* x from where the extrapolation f(x) = f(theX0) * (x/theX0)**theExp
* is used for the pdf's.
*/
double theX0;
/**
* the exponent of the pdf extrapolation for small x (x < theX0).
*/
double theExp;
};
}
#ifndef HERWIG_TEMPLATES_IN_CC_FILE
// #include "SatPDF.tcc"
#endif
#endif /* HERWIG_SatPDF_H */
diff --git a/PDT/BaryonWidthGenerator.h b/PDT/BaryonWidthGenerator.h
--- a/PDT/BaryonWidthGenerator.h
+++ b/PDT/BaryonWidthGenerator.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
#ifndef HERWIG_BaryonWidthGenerator_H
#define HERWIG_BaryonWidthGenerator_H
//
// This is the declaration of the BaryonWidthGenerator class.
//
#include "GenericWidthGenerator.h"
#include "BaryonWidthGenerator.fh"
#include "Herwig/Decay/Baryon/Baryon1MesonDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup PDT
* The BaryonWidthGenerator class is designed to automatically calculate the running
* width for a given particle using information from the decayModes and the
* Baryon1MesonDecayer to construct the running width.
*
* It inherits from the GenericWidthGenerator.
*
* @see GenericWidthGenerator
* @see GenericMassGenerator
*
*/
class BaryonWidthGenerator: public GenericWidthGenerator {
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Output the initialisation info for the database
* @param output The stream to output the information to
* @param header output the header.
**/
virtual void dataBaseOutput(ofstream & output,bool header=true);
/**
* The \f$1\to2\f$ width for outgoing particles which can be off-shell.
* @param iloc The location of the mode in the list.
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @return The partial width.
*/
virtual Energy partial2BodyWidth(int iloc,Energy m0,Energy m1,Energy m2) const;
protected:
/**
* Perform the set up for a mode, this is called by the base class
* @param mode The decay mode
* @param decayer The decayer for the mode.
* @param imode The number of the mode.
*/
virtual void setupMode(tcDMPtr mode, tDecayIntegratorPtr decayer, unsigned int imode);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BaryonWidthGenerator & operator=(const BaryonWidthGenerator &);
+ BaryonWidthGenerator & operator=(const BaryonWidthGenerator &) = delete;
private:
/**
* vector of pointers to the decayers
*/
vector<Baryon1MesonDecayerBasePtr> _baryondecayers;
/**
* Location of the decay mode in the decayer
*/
vector<int> _modeloc;
};
}
#endif /* HERWIG_BaryonWidthGenerator_H */
diff --git a/PDT/GenericMassGenerator.h b/PDT/GenericMassGenerator.h
--- a/PDT/GenericMassGenerator.h
+++ b/PDT/GenericMassGenerator.h
@@ -1,463 +1,463 @@
// -*- C++ -*-
//
// GenericMassGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GenericMassGenerator_H
#define HERWIG_GenericMassGenerator_H
//
// This is the declaration of the GenericMassGenerator class.
//
#include "ThePEG/PDT/MassGenerator.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/PDT/ParticleData.h"
#include "GenericMassGenerator.fh"
#include "ThePEG/PDT/WidthGenerator.h"
#include "GenericWidthGenerator.fh"
#include "ThePEG/Repository/CurrentGenerator.h"
namespace Herwig {
using namespace ThePEG;
/**
* Declare ModelGenerator class as must be friend to set the particle
*/
class ModelGenerator;
/** \ingroup PDT
*
* The <code>GenericMassGenerator</code> class is a simple class for the
* generation of particle masses in Herwig. It inherits from the
* <code>MassGenerator</code> class of ThePEG and implements a Breit-Wigner
* using the width generator to give the running width.
*
* In general the width generator will be an instance of the
* <code>GenericWidthGenerator</code> class which uses the Herwig decayers
* based on the <code>DecayIntegrator</code> class to define the shape of the
* running width.
*
* This class is designed so that the weight
*
* \f[\int dm^2 \frac{m\Gamma(m)}{(m^2-M^2)^2+m^2\Gamma^2(m)}\f]
*
* can be included in the production of the particle to take off-shell effects into
* account. This is the default form of the weight.
* The numerator and running of the width can
* be changed using the BreitWignerShape interface.
*
* @see MassGenerator
* @see DecayIntegrator
* @see GenericWidthGenerator
*
*/
class GenericMassGenerator: public MassGenerator {
/**
* ModelGenerator class as must be friend to set the particle
*/
friend class ModelGenerator;
public:
/**
* Default constructor
*/
GenericMassGenerator();
/**
* Destructor
*/
virtual ~GenericMassGenerator();
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/**
* Return true if this mass generator can handle the given particle type.
* @param part The particle data pointer of the particle.
* @return True ig this class can handle the particle and false otherwise
*/
bool accept(const ParticleData & part) const;
/** @name Members to generate the mass of a particle instance */
//@{
/**
* Generate a mass using the default limits.
* @param part The particle data pointer of the particle.
* @return The mass of the particle instance.
*/
Energy mass(const ParticleData & part) const {
return mass(part,lowerMass_,upperMass_);
}
/**
* Generate a mass using specified limits
* @param part The particle data pointer of the particle.
* @param low The lower limit on the particle's mass.
* @param upp The upper limit on the particle's mass.
* @return The mass of the particle instance.
*/
Energy mass(const ParticleData & part,
const Energy low,const Energy upp) const {
if(upp<low) return low;
Energy output;
int ntry=0; double wgt=0.;
do {
++ntry;
output=mass(wgt,part,low,upp,3);
if(wgt>maxWgt_) maxWgt_=wgt;
}
while(maxWgt_*(UseRandom::rnd())>wgt&&ntry<nGenerate_);
return (ntry>=nGenerate_) ? mass_ : output;
}
/**
* Return a mass with the weight using the default limits.
* @param part The particle data pointer of the particle.
* @param wgt The weight for this mass.
* @param r The random number used for the weight
* @return The mass of the particle instance.
*/
Energy mass(double & wgt, const ParticleData & part,
double r=UseRandom::rnd()) const {
return mass(wgt,part,lowerMass_,upperMass_,r);
}
/**
* Return a mass with the weight using the specified limits.
* @param part The particle data pointer of the particle.
* @param low The lower limit on the particle's mass.
* @param upp The upper limit on the particle's mass.
* @param wgt The weight for this mass.
* @param r The random number used for the weight
* @return The mass of the particle instance.
*/
Energy mass(double & wgt, const ParticleData & part,
const Energy low,const Energy upp,
double r=UseRandom::rnd()) const {
return mass(wgt,part,low,upp,BWShape_,r);
}
/**
* Weight for the factor.
* @param q The mass of the instance
* @return The weight.
*/
virtual double weight(Energy q) const {
return weight(q,BWShape_);
}
/**
* Return the full weight
*/
virtual InvEnergy2 BreitWignerWeight(Energy q) {
return BreitWignerWeight(q,BWShape_);
}
//@}
/**
* Output the initialisation info for the database
*/
virtual void dataBaseOutput(ofstream &,bool);
public:
/** @name Access to particle properties */
//@{
/**
* The running width.
* @param q The mass for the calculation of the running width
* @return The running width.
*/
pair<Energy,Energy> width(Energy q,int shape) const;
/**
* Lower limit on the mass
*/
Energy lowerLimit() const {return lowerMass_;}
/**
* Upper limit on the mass
*/
Energy upperLimit() const {return upperMass_;}
/**
* Default mass
*/
Energy nominalMass() const {return mass_;}
/**
* Default Width
*/
Energy nominalWidth() const {return width_;}
protected:
/**
* Return a mass with the weight using the specified limits.
* @param low The lower limit on the particle's mass.
* @param upp The upper limit on the particle's mass.
* @param wgt The weight for this mass.
* @param shape The type of shape to use
* @param r The random number used for the weight
* @return The mass of the particle instance.
*/
virtual Energy mass(double & wgt, const ParticleData & ,
const Energy low,const Energy upp, int shape,
double r=UseRandom::rnd()) const {
// calculate the mass square using fixed width BW
Energy lo=max(low,lowerMass_),up=min(upp,upperMass_);
double rhomin=atan2((lo*lo-mass2_),mWidth_);
double rhomax=atan2((up*up-mass2_),mWidth_)-rhomin;
double rho=rhomin+rhomax*r;
Energy2 q2 = mass2_+mWidth_*tan(rho);
Energy q = sqrt(q2);
wgt = rhomax*weight(q,shape);
// return the mass
return q;
}
/**
* Return a mass with the weight using the default limits.
* @param part The particle data pointer of the particle.
* @param wgt The weight for this mass.
* @param shape The type of shape to use
* @param r The random number used for the weight
* @return The mass of the particle instance.
*/
Energy mass(double & wgt, const ParticleData & part, int shape,
double r=UseRandom::rnd()) const {
return mass(wgt,part,lowerMass_,upperMass_,shape,r);
}
/**
* Weight for the factor.
* @param q The mass of the instance
* @param shape The type of shape to use as for the BreitWignerShape interface
* @return The weight.
*/
inline virtual double weight(Energy q, int shape) const {
Energy2 q2 = q*q;
Energy4 sq=sqr(q2-mass2_);
pair<Energy,Energy> gam=width(q,shape);
// finish the calculation of the width
Energy2 num;
if(shape==2) num = mass_*gam.first;
else if(shape==3) num = mass_*gam.first;
else num = q *gam.first;
Energy4 den = (shape==2) ? sq+mass2_*gam.second*gam.second : sq+q2*gam.second*gam.second;
return num/den*(sq+mWidth_*mWidth_)/Constants::pi/mWidth_;
}
/**
* Return the full weight
*/
virtual InvEnergy2 BreitWignerWeight(Energy q, int shape) const {
Energy2 q2 = q*q;
Energy4 sq=sqr(q2-mass2_);
pair<Energy,Energy> gam=width(q,shape);
// finish the calculation of the width
Energy2 num;
if(shape==2) num = mass_*gam.first;
else if(shape==3) num = mass_*gam.first;
else num = q *gam.first;
Energy4 den = (shape==2) ? sq+mass2_*gam.second*gam.second : sq+q2*gam.second*gam.second;
return num/den/Constants::pi;
}
/**
* Accesss to the particle
*/
tcPDPtr particle() const {return particle_;}
/**
* Set the particle
*/
void particle(tPDPtr in) {particle_ = in;}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- GenericMassGenerator & operator=(const GenericMassGenerator &);
+ GenericMassGenerator & operator=(const GenericMassGenerator &) = delete;
private:
/**
* Helper function for the interface
*/
void setParticle(string);
/**
* Helper function for the interface
*/
string getParticle() const;
private:
/**
* The maximum weight for unweighting when generating the mass.
*/
mutable double maxWgt_;
/**
* parameter controlling the shape of the Breit-Wigner
*/
int BWShape_;
/**
* Number of attempts to generate the mass.
*/
int nGenerate_;
private:
/**
* Pointer to the particle
*/
tPDPtr particle_;
/**
* Lower limit on the particle's mass
*/
Energy lowerMass_;
/**
* Upper limit on the particle's mass
*/
Energy upperMass_;
/**
* Mass of the particle
*/
Energy mass_;
/**
* Width of the particle
*/
Energy width_;
/**
* Mass of the particle squared.
*/
Energy2 mass2_;
/**
* Mass of the particle times the width.
*/
Energy2 mWidth_;
/**
* Number of weights to generate when initializing
*/
int nInitial_;
/**
* Whether or not to initialize the GenericMassGenerator
*/
bool initialize_;
/**
* Whether or not to output the data to a file
*/
bool output_;
/**
* Pointer to the width generator
*/
WidthGeneratorPtr widthGen_;
/**
* Pointer to the width generator
*/
GenericWidthGeneratorPtr widthGenB_;
/**
* Option for the treatment of the width
*/
bool widthOpt_;
};
}
#endif /* HERWIG_GenericMassGenerator_H */
diff --git a/PDT/GenericWidthGenerator.h b/PDT/GenericWidthGenerator.h
--- a/PDT/GenericWidthGenerator.h
+++ b/PDT/GenericWidthGenerator.h
@@ -1,435 +1,435 @@
// -*- C++ -*-
//
// GenericWidthGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GenericWidthGenerator_H
#define HERWIG_GenericWidthGenerator_H
//
// This is the declaration of the GenericWidthGenerator class.
//
#include "ThePEG/PDT/WidthGenerator.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/PDT/DecayMode.h"
#include "GenericWidthGenerator.fh"
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Utilities/Interpolator.h"
#include "GenericMassGenerator.h"
#include <iostream>
namespace Herwig {
using namespace ThePEG;
/**
* Declare ModelGenerator class as must be friend to set the particle
*/
class ModelGenerator;
/**
* Typedef to define a DecayMoap
*/
typedef Selector<tDMPtr> DecayMap;
/** \ingroup PDT
*
* The GenericWidthGenerator class is designed to automatically
* calculate the running width for a given particle using information from
* the decayModes and the Decayers to construct the running width.
*
* It also gives us the option of selecting the decay modes for a particle
* based on the mass.
*
* @see WidthGenerator
* @see DecayIntegrator
* @see GenericMassGenerator
*/
class GenericWidthGenerator: public WidthGenerator {
/**
* ModelGenerator class as must be friend to set the particle
*/
friend class ModelGenerator;
public:
/**
* A friend class so the off-shell matrix elements can be integrated.
*/
friend class TwoBodyAllOnCalculator;
public:
/**
* Default constructor
*/
GenericWidthGenerator()
: mass_(), prefactor_(1.), initialize_(false),output_(false),
BRnorm_(true),npoints_(50),
BRminimum_(0.01), intOrder_(1), twoBodyOnly_(false)
{}
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/**
* Return true if this width generator can handle the given particle type.
* @param part The particle data pointer of the particle.
* @return True if this class can handle the particle and false otherwise
*/
virtual bool accept(const ParticleData & part) const {
if(!particle_) return false;
return part.id() == particle_->id() ||
( part.CC() && part.CC()->id() == particle_->id() );
}
/** @name Members to calculate the width and decay modes. */
//@{
/**
* Calculate the width.
* @param part The particle data pointer of the particle.
* @param m The scale for the width calculation
* @return The width at the mass given.
*/
virtual Energy width(const ParticleData & part, Energy m) const;
/**
* Initialize the given decay map for the given particle type.
* @param part The particle data pointer of the particle.
* @return The decay map
*/
virtual DecayMap rate(const ParticleData & part) const {
return part.decaySelector();
}
/**
* Return a decay map for a given particle instance. This allows us to
* vary the branching ratios as a function of the particles mass.
* @param part The particle instance
* @return The decay map
*/
virtual DecayMap rate (const Particle & part);
/**
* The partial width for a given mode
* @param m The mass, or scale, for the calculation
* @param iloc The location of the mode in the list
* @return The partial width for the mode.
*/
virtual Energy partialWidth(int iloc,Energy m) const;
/**
* Return the total width and the sum of the partial widths for
* modes which are used
*/
virtual pair<Energy,Energy> width(Energy, const ParticleData &) const;
//@}
/**
* Output the initialisation info for the database
* @param output The stream to output the information to
* @param header output the header.
**/
virtual void dataBaseOutput(ofstream & output, bool header=true);
/**
* Given a particle type and a mass and a width of an instance of
* that particle type, generate a life time.
*/
virtual Length lifeTime(const ParticleData &, Energy m, Energy w) const;
protected:
/**
* The \f$1\to2\f$ width for on-shell particles
* @param q The mass, or scale, for the calculation
* @param iloc The location of the mode in the list.
* @return The partial width.
*/
Energy partial2BodyWidth(int iloc,Energy q) const {
return partial2BodyWidth(iloc,q,MEmass1_[iloc],MEmass2_[iloc]);
}
/**
* The \f$1\to2\f$ width for outgoing particles which can be off-shell.
* @param iloc The location of the mode in the list.
* @param m0 The mass of the decaying particle.
* @param m1 The mass of the first outgoing particle.
* @param m2 The mass of the second outgoing particle.
* @return The partial width.
*/
virtual Energy partial2BodyWidth(int iloc,Energy m0,Energy m1,Energy m2) const;
/**
* Perform the set up for a mode in classes inheriting from this one
* @param mode The decay mode
* @param decayer The decayer for the mode.
* @param imode The number of the mode.
*/
virtual void setupMode(tcDMPtr mode, tDecayIntegratorPtr decayer, unsigned int imode);
/**
* Access to the particle dat for inheriting classes
*/
tPDPtr particle() const {return particle_;}
/**
* Set the particle
*/
void particle(tPDPtr in) {particle_ = in;}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
/**
* Matrix element code for a given mode
* @param imode The mode.
*/
int MEcode(int imode) const {return MEcode_[imode];}
/**
* Coupling for a given mode
* @param imode The mode.
*/
double MEcoupling(int imode) const {return MEcoupling_[imode];}
/**
* The on-shell mass of the particle
*/
Energy mass() const {return mass_;}
/**
* Access to the decay modes
*/
/**
* Initialization option for use by the inheriting classes
*/
bool initialize() const {return initialize_;}
/**
* Output option for use by the inheriting classes
*/
bool output() const {return output_;}
/**
* Access to the DecayModes
*/
vector<tDMPtr> decayModes() const {return decayModes_;}
private:
/**
* Helper function for the interface
*/
void setParticle(string);
/**
* Helper function for the interface
*/
string getParticle() const;
private:
/**
* Private and non-existent assignment operator.
*/
- GenericWidthGenerator & operator=(const GenericWidthGenerator &);
+ GenericWidthGenerator & operator=(const GenericWidthGenerator &) = delete;
private:
/**
* The pointer to the ParticleData object for the particle for this width generator.
*/
tPDPtr particle_;
/**
* The decaymodes
*/
vector<tDMPtr> decayModes_;
/**
* The tags for the DecayMode s
*/
vector<string> decayTags_;
/**
* The minimum mass of the decaying particle for which this decay mode is possible
*/
vector<Energy> minMass_;
/**
* The on-shell mass of the particle
*/
Energy mass_;
/**
* Prefactor to get the on-shell width
*/
double prefactor_;
/**
* The type of ME, whether it is fixed, calculated by this class or interpolation
*/
vector<int> MEtype_;
/**
* The code for the matrix element
*/
vector<int> MEcode_;
/**
* Mass of the first outgoing particle for the simple \f$1\to2\f$ ME's
*/
vector<Energy> MEmass1_;
/**
* Mass of the second outgoing particle for the simple \f$1\to2\f$ ME's
*/
vector<Energy> MEmass2_;
/**
* the coupling for a given me
*/
vector<double> MEcoupling_;
/**
* is this mode used for the running width
*/
vector<bool> modeOn_;
/**
* storage of the massesto set up the interpolation tables
*/
vector<Energy> interMasses_;
/**
* storage of the widths to set up the interpolation tables
*/
vector<Energy> interWidths_;
/**
* the number of entries in the decay table for a particular mode
*/
vector<int> noOfEntries_;
/**
* initialize the generator using the particle data object
*/
bool initialize_;
/**
* Output the parameters
*/
bool output_;
/**
* normalise the terms so that the partial widths for an on-shell particle are correct
*/
bool BRnorm_;
/**
* number of points to use for interpolation tables
*/
int npoints_;
/**
* intepolators for the running width
*/
vector<Interpolator<Energy,Energy>::Ptr> interpolators_;
/**
* minimum branching ratio for the inclusion in the total running width
*/
double BRminimum_;
/**
* Order of the interpolation for the tables
*/
unsigned int intOrder_;
/**
* Whether or not to only include 2 body modes in the running
* width calculation, higher modes flat
*/
bool twoBodyOnly_;
};
}
#endif /* HERWIG_GenericWidthGenerator_H */
diff --git a/PDT/OneOffShellCalculator.h b/PDT/OneOffShellCalculator.h
--- a/PDT/OneOffShellCalculator.h
+++ b/PDT/OneOffShellCalculator.h
@@ -1,205 +1,205 @@
// -*- C++ -*-
//
// OneOffShellCalculator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_OneOffShellCalculator_H
#define HERWIG_OneOffShellCalculator_H
//
// This is the declaration of the OneOffShellCalculator class.
//
#include "GenericMassGenerator.h"
#include "WidthCalculatorBase.h"
#include "OneOffShellCalculator.fh"
#include "Herwig/Utilities/GSLIntegrator.h"
namespace Herwig {
using namespace ThePEG;
struct OneOffShellIntegrand;
/** \ingroup PDT
*
* Use another <code>WidthCalculatorBase</code> object to integrate over the
* mass of on of the external particles which can be off-shell for running
* width calculations.
*
* @see WidthCalculatorBase
* @see OneOffShellIntegrand
*
*/
class OneOffShellCalculator: public WidthCalculatorBase {
public:
/**
* The OneOffShellIntegrand is a friend to allow access to the members needed
* for the integration without making the members public.
*/
friend struct OneOffShellIntegrand;
public:
/**
* Constructor which should be used setting all the required members.
* @param inloc The mass which is off-shell and to be integrated over.
* @param inwidth Pointer to the WidthGeneratorBase object which calculates
* the partial width for a given mass of the off-shell particle.
* @param inmass Pointer to the GenericMassGenerator for the off-shell particle.
* @param inmin The minimum mass for the off-shell particle.
*/
OneOffShellCalculator(int inloc,WidthCalculatorBasePtr inwidth,
GenericMassGeneratorPtr inmass,
Energy inmin)
: _themass(inloc), _minmass(inmin),_onshellwidth(inwidth),_massptr(inmass)
{}
/**
* member to calculate the partial width.
* @param scale The mass squared for the decaying particle.
* @return The partial width.
*/
Energy partialWidth(Energy2 scale) const;
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @param mass The new value.
* @return The mass required.
*/
void resetMass(int imass,Energy mass) {
_onshellwidth->resetMass(imass,mass);
}
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @return The mass required.
*/
Energy getMass(const int imass) const {
return _onshellwidth->getMass(imass);
}
/**
* Get the masses of all bar the one specified. Used to get the limits
* for integration.
* @param imass The particle not needed
* @return The sum of the other masses.
*/
Energy otherMass(const int imass) const {
return _onshellwidth->otherMass(imass);
}
protected:
/**
* The integrand.
* @param min The mass of the off-shell particle,
* @return The differential rate.
*/
Energy dGamma(Energy min) const {
_onshellwidth->resetMass(_themass,min);
Energy wgt = (_onshellwidth->partialWidth(_scale));
wgt*=(_massptr->weight(min));
return wgt;
}
private:
/**
* Private and non-existent assignment operator.
*/
- OneOffShellCalculator & operator=(const OneOffShellCalculator &);
+ OneOffShellCalculator & operator=(const OneOffShellCalculator &) = delete;
private:
/**
* which mass is offshell.
*/
int _themass;
/**
* the minimum allowed mass.
*/
Energy _minmass;
/**
* pointer to object calculating the on-shell width.
*/
WidthCalculatorBasePtr _onshellwidth;
/**
* pointer to object calculating the mass of the particle.
*/
GenericMassGeneratorPtr _massptr;
/**
* integrator
*/
GSLIntegrator _integrator;
/**
* the mass squared of the decaying particle
*/
mutable Energy2 _scale;
};
/** \ingroup PDT
* Class for the integrand of a matrix element where one of the outgoing
* particles is off-shell.This class is used by the OneOffShellCalculator class
* to perform the integral.
*
* @see OneOffShellCalculator
*/
struct OneOffShellIntegrand {
/**
* Constructor.
* @param in Pointer to the OneOffShellCalculator class this is doing the
* integration for.
* @param m2 The mass squared of the off-shell particle for the Jacobian
* transform.
* @param mw The mass times width of the off-shell particle for the Jacobian
* transform.
*/
OneOffShellIntegrand(tcOneOffShellCalculatorPtr in,Energy2 m2,Energy2 mw)
: _integrand(in),_mass2(m2),_mwidth(mw)
{}
/**
* return the value
*/
Energy operator ()(double x) const {
return _integrand->dGamma(sqrt(_mass2+_mwidth*tan(x)));
}
/** Argument type for the GSLIntegrator */
typedef double ArgType;
/** Return type for the GSLIntegrator */
typedef Energy ValType;
/**
* pointer to the decay integrator
*/
tcOneOffShellCalculatorPtr _integrand;
/**
* The mass squared for the off-shell particle for the Jacobian transform.
*/
Energy2 _mass2;
/**
* The mass times width for the off-shell particle for the Jacobian transform.
*/
Energy2 _mwidth;
};
}
#endif /* HERWIG_OneOffShellCalculator_H */
diff --git a/PDT/SMHiggsMassGenerator.h b/PDT/SMHiggsMassGenerator.h
--- a/PDT/SMHiggsMassGenerator.h
+++ b/PDT/SMHiggsMassGenerator.h
@@ -1,161 +1,161 @@
// -*- C++ -*-
//
// SMHiggsMassGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMHiggsMassGenerator_H
#define HERWIG_SMHiggsMassGenerator_H
//
// This is the declaration of the SMHiggsMassGenerator class.
//
#include "GenericMassGenerator.h"
#include "GenericWidthGenerator.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SMHiggsMassGenerator class implements the generation
* of the Higgs boson mass according to the prescription of hep-ph/9505211
*
* @see \ref SMHiggsMassGeneratorInterfaces "The interfaces"
* defined for SMHiggsMassGenerator.
*/
class SMHiggsMassGenerator: public GenericMassGenerator {
public:
/**
* The default constructor.
*/
SMHiggsMassGenerator() : _shape(1) {}
/**
* Weight for the factor for an off-shell mass
* @param q The off-shell mass
* @param shape The type of shape to use as for the BreitWignerShape interface
* @return The weight.
*/
virtual double weight(Energy q, int shape) const {
Energy2 q2 = sqr(q);
Energy2 mass2 = sqr(nominalMass());
Energy2 mwidth= nominalMass()*nominalWidth();
return BreitWignerWeight(q,shape)*(sqr(mass2-q2)+sqr(mwidth))/mwidth;
}
/**
* Return true if this mass generator can handle the given particle type.
* @param part The particle data pointer of the particle.
* @return True ig this class can handle the particle and false otherwise
*/
bool accept(const ParticleData & part) const;
/**
* output for the database
*/
virtual void dataBaseOutput(ofstream &,bool);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Weight for the factor for an off-shell mass
* @param q The off-shell mass
* @param shape The type of shape to use as for the BreitWignerShape interface
* @return The weight.
*/
virtual InvEnergy2 BreitWignerWeight(Energy q,int shape) const {
useMe();
pair<Energy,Energy> widths = shape!=2 ? _hwidth->width(q,*particle()) :
make_pair(nominalWidth(),nominalWidth());
Energy2 q2 = sqr(q);
Energy4 sq=sqr(q2-sqr(nominalMass()));
Energy2 num = widths.first*q;
double fact = 1.;
if(_shape==1) fact *= pow<4,1>(nominalMass()/q);
if( shape==3) num=GeV2;
return num*fact/Constants::pi/(sq+sqr(widths.second*q)*fact);
}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHiggsMassGenerator & operator=(const SMHiggsMassGenerator &);
+ SMHiggsMassGenerator & operator=(const SMHiggsMassGenerator &) = delete;
private:
/**
* Option for the line-shape
*/
unsigned int _shape;
/**
* The width generator
*/
GenericWidthGeneratorPtr _hwidth;
};
}
#endif /* HERWIG_SMHiggsMassGenerator_H */
diff --git a/PDT/SMHiggsWidthGenerator.h b/PDT/SMHiggsWidthGenerator.h
--- a/PDT/SMHiggsWidthGenerator.h
+++ b/PDT/SMHiggsWidthGenerator.h
@@ -1,279 +1,279 @@
// -*- C++ -*-
//
// SMHiggsWidthGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SMHiggsWidthGenerator_H
#define HERWIG_SMHiggsWidthGenerator_H
//
// This is the declaration of the SMHiggsWidthGenerator class.
//
#include "GenericWidthGenerator.h"
namespace Herwig {
using namespace ThePEG;
/**
* The SMHiggsWidthGenerator class calculates the width for the Standard Model
* Higgs boson
*
* @see \ref SMHiggsWidthGeneratorInterfaces "The interfaces"
* defined for SMHiggsWidthGenerator.
*/
class SMHiggsWidthGenerator: public GenericWidthGenerator {
public:
/**
* The default constructor.
*/
SMHiggsWidthGenerator()
: widthopt_(2), offshell_(10.), mw_(ZERO), mz_(ZERO), gamw_(ZERO),
gamz_(ZERO), qmass_(7,ZERO), lmass_(3,ZERO),
sw2_(0.), ca_(0.), cf_(0.), qlast_(ZERO)
{}
private:
/** @name Virtual functions to be overridden from based class */
//@{
/**
* Given a particle type and a mass of an instance of that particle
* type, calculate a width.
*/
virtual Energy width(const ParticleData &, Energy m) const;
/**
* Return decay map for the given particle type.
*/
virtual DecayMap rate(const ParticleData &) const;
/**
* Return a decay map for a given Particle instance.
*/
virtual DecayMap rate(const Particle &);
//@}
/**
* Return the total width and the sum of the partial widths for
* modes which are used
*/
virtual pair<Energy,Energy> width(Energy, const ParticleData &) const;
/**
* Calculate the partial width for a given mode
* @param mH The Higgs masses
* @param imode The decay mode
*/
Energy partialWidth(int imode, Energy mH) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Routines to calculate Higgs width. */
//@{
/**
* Calculates the double Breit-Wigner Integral a-la FORTRAN HERWIG.
* It is used in NLL corrected Higgs width for H->WW/ZZ,
* x = (M_V/M_H)^2, y=M_V*G_V/(M_H)^2, where M_V/G_V - V-boson mass/width
* @return the integral value.
*/
double HwDoubleBW(double x, double y) const;
/**
* Calculate a loop function for the triangle vertex GGH/AAH
* @return the loop function value as a complex number
*/
Complex HwW2(double tau) const;
//@}
/**
* Return the branching ratios at the given scale
* @param scale The off shell-mass of the Higgs
*/
DecayMap branching(Energy scale, const ParticleData &) const;
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SMHiggsWidthGenerator & operator=(const SMHiggsWidthGenerator &);
+ SMHiggsWidthGenerator & operator=(const SMHiggsWidthGenerator &) = delete;
private:
/**
* Type of the Higgs width used (options: fixed, LO running, NLL corrected running)
*/
unsigned int widthopt_;
/**
* Number of times the width the Higgs is allowed to be off-shell
*/
double offshell_;
/**
* Particle properties extracted at initialization
*/
//@{
/**
* Mass of the W boson
*/
Energy mw_;
/**
* Mass of the Z boson
*/
Energy mz_;
/**
* Width of the W boson
*/
Energy gamw_;
/**
* Width of the Z boson
*/
Energy gamz_;
/**
* Masses of the quarks
*/
vector<Energy> qmass_;
/**
* Masses of the leptons
*/
vector<Energy> lmass_;
/**
* \f$\sin^2\theta_W\f$
*/
double sw2_;
/**
* The \f$C_A\f$ colour factor
*/
double ca_;
/**
* The \f$C_F\f$ colour factor
*/
double cf_;
//@}
/**
* Storage of parameters for speed
*/
//@{
/**
* The last scale
*/
mutable Energy qlast_;
/**
* \f$\Lambda_{\rm QCD}\f$
*/
mutable Energy lambdaQCD_;
/**
* The electromagnetic coupling
*/
mutable double alphaEM_;
/**
* The strong coupling
*/
mutable double alphaS_;
/**
* Correction factor for \f$H\to q\bar{q}\f$
*/
mutable double cd_;
/**
* Fermi constant
*/
mutable Energy2 gfermiinv_;
/**
* The anomalous dimension for \f$H\to q\bar{q}\f$
*/
mutable double gam0_;
/**
* The \f$\beta\f$ function coefficient for \f$H\to q\bar{q}\f$
*/
mutable double beta0_;
//@}
/**
* Map between location in decay modes vector and code here
*/
map<int,int> locMap_;
};
}
#endif /* HERWIG_SMHiggsWidthGenerator_H */
diff --git a/PDT/ScalarMassGenerator.h b/PDT/ScalarMassGenerator.h
--- a/PDT/ScalarMassGenerator.h
+++ b/PDT/ScalarMassGenerator.h
@@ -1,162 +1,162 @@
// -*- C++ -*-
//
// ScalarMassGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ScalarMassGenerator_H
#define HERWIG_ScalarMassGenerator_H
// This is the declaration of the ScalarMassGenerator class.
#include "GenericMassGenerator.h"
#include "ScalarMassGenerator.fh"
#include "ThePEG/Config/Complex.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup PDT
*
* The <code>ScalarMassGenerator</code> class is designed for the generation
* of the masses of the \f$a_0\f$ and \f$f_0\f$ mesons which have \f$K\bar{K}\f$
* modes close to the on-shell mass of the particle.
*
* The form based on the Flatte parameterisation of PLB63, 224, we use a weight
* \f[\frac{1}{\pi}\frac{m\Gamma(m)}{|M^2-m^2-i\sum_ig^2_i\rho_i|^2}\f],
* where
* - \f$g_i\f$ is the coupling for a given decay mode
* - \f$\rho_i=2p_i/m\f$ is Lorentz-invariant phase-space where \f$p_i\f$ is the
* momentum release in the decay, this analytically continued
* below the threshold.
* In this case the running width given by the sum of the running partial widths
* \f[\Gamma_i(m) = 2g^2_i\frac{p_i}{m^2}\f],
* and we differ from the Flatte approach in not analytically
* continuing below the threshold for the numerator.
*
* @see MassGenerator
* @see GenericMassGenerator
*
*/
class ScalarMassGenerator: public GenericMassGenerator {
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interfaces.
*/
static void Init();
public:
/**
* Weight for the factor for an off-shell mass
* @param mass The off-shell mass
* @param shape The type of shape to use as for the BreitWignerShape interface
* @return The weight.
*/
virtual double weight(Energy mass,int shape) const;
/**
* output for the database
*/
virtual void dataBaseOutput(ofstream &,bool);
protected:
/**
* Return the full weight
*/
virtual InvEnergy2 BreitWignerWeight(Energy q, int shape) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving and
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- ScalarMassGenerator & operator=(const ScalarMassGenerator &);
+ ScalarMassGenerator & operator=(const ScalarMassGenerator &) = delete;
private:
/**
* couplings for the decay channels
*/
vector<Energy> _coupling;
/**
* The first outgoing mass for the channels
*/
vector<Energy> _mass1;
/**
* The second outgoing mass for the channels
*/
vector<Energy> _mass2;
/**
* calculated values to speed things up
*/
//@{
/**
* Maximum mass squared
*/
vector<Energy2> _m2plus;
/**
* Minimum mass squared
*/
vector<Energy2> _m2minus;
//@}
};
}
#endif /* HERWIG_ScalarMassGenerator_H */
diff --git a/PDT/ThreeBodyAllOn1IntegralCalculator.h b/PDT/ThreeBodyAllOn1IntegralCalculator.h
--- a/PDT/ThreeBodyAllOn1IntegralCalculator.h
+++ b/PDT/ThreeBodyAllOn1IntegralCalculator.h
@@ -1,175 +1,175 @@
// -*- C++ -*-
//
// ThreeBodyAllOn1IntegralCalculator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ThreeBodyAllOn1IntegralCalculator_H
#define HERWIG_ThreeBodyAllOn1IntegralCalculator_H
// This is the declaration of the ThreeBodyAllOn1IntegralCalculator class.
#include "WidthCalculatorBase.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
#include "Herwig/Utilities/GSLIntegrator.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup PDT
*
* The ThreeBodyAllOn1IntegralCalculator class is designed to integrate
* a function which gives \f$d\Gamma/dm^2_{ij}\f$ to give the partial width.
*
* @see WidthCalculatorBase
* @see ThreeBodyAllOn1IntegralOuter
*/
template<class T>
class ThreeBodyAllOn1IntegralCalculator: public WidthCalculatorBase {
public:
/**
* Constructor with the \f$d\Gamma/ds\f$ as a function.
* @param intype The types of the different integration channels.
* @param inmass The mass for the Jacobian for the different channels.
* @param inwidth The width for the Jacobian for the different channels.
* @param inpow The power for the power-law smoothing function
* @param indGamma The pointer to the function which gives \f$d\Gamma/ds\f$.
* @param mode The mode to be calculated
* @param m1 The mass of the first particle.
* @param m2 The mass of the second particle.
* @param m3 The mass of the third particle.
*/
ThreeBodyAllOn1IntegralCalculator(int intype, Energy inmass, Energy inwidth,
double inpow, T indGamma,int mode,
Energy m1,Energy m2,Energy m3)
: _variabletype(intype),_intmass(inmass),_intwidth(inwidth),
_intpower(inpow),_mode(mode), _theDgamma(indGamma) {
_m .resize(4);
_m2.resize(4);
_m[1]=m1;_m[2]=m2;_m[3]=m3;
for(int ix=1;ix<4;++ix)_m2[ix]=sqr(_m[ix]);
}
/**
* calculate the width for a given mass
* @param q2 The mass squared of the decaying particle.
* @return The partial width.
*/
Energy partialWidth(Energy2 q2) const;
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @param mass The new value.
* @return The mass required.
*/
void resetMass(int imass,Energy mass) {
assert(imass<4);
_m[imass]=mass;
_m2[imass]=mass*mass;
}
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @return The mass required.
*/
Energy getMass(const int imass) const {
assert(imass<4);
return _m[imass];
}
/**
* Get the masses of all bar the one specified. Used to get the limits
* for integration.
* @param imass The particle not needed
* @return The sum of the other masses.
*/
Energy otherMass(const int imass) const {
assert(imass>0&&imass<4);
if(imass==1) return _m[2]+_m[3];
else if(imass==2) return _m[1]+_m[3];
else return _m[1]+_m[2];
}
/**
* The integrand for the inner integrand.
* @param argument The mass squared for the inner integral
* @return The value of the inner integrand.
*/
Energy operator ()(double argument) const;
/** Argument type for the GSLIntegrator */
typedef double ArgType;
/** Return type for the GSLIntegrator */
typedef Energy ValType;
private:
/**
* Private and non-existent assignment operator.
*/
ThreeBodyAllOn1IntegralCalculator &
- operator=(const ThreeBodyAllOn1IntegralCalculator &);
+ operator=(const ThreeBodyAllOn1IntegralCalculator &) = delete;
private:
/**
* which scale we are using
*/
int _variabletype;
/**
* The mass for the jacobian
*/
Energy _intmass;
/**
* The width for the jacobian
*/
Energy _intwidth;
/**
* The power for power-law smoothing
*/
double _intpower;
/**
* The mode to be integrated
*/
int _mode;
/**
* masses of the external particles
*/
mutable vector<Energy> _m;
/**
* mass squareds of the external particles
*/
mutable vector<Energy2> _m2;
/**
* The function for the differential rate
*/
T _theDgamma;
/**
* the integrator
*/
GSLIntegrator _integrator;
};
}
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
#include "ThreeBodyAllOn1IntegralCalculator.tcc"
#endif
#endif /* HERWIG_ThreeBodyAllOn1IntegralCalculator_H */
diff --git a/PDT/ThreeBodyAllOnCalculator.h b/PDT/ThreeBodyAllOnCalculator.h
--- a/PDT/ThreeBodyAllOnCalculator.h
+++ b/PDT/ThreeBodyAllOnCalculator.h
@@ -1,279 +1,279 @@
// -*- C++ -*-
//
// ThreeBodyAllOnCalculator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ThreeBodyAllOnCalculator_H
#define HERWIG_ThreeBodyAllOnCalculator_H
// This is the declaration of the ThreeBodyAllOnCalculator class.
#include "WidthCalculatorBase.h"
#include "Herwig/Utilities/GSLIntegrator.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
namespace Herwig {
using namespace ThePEG;
template <class T>
class ThreeBodyAllOnCalculator;
/** \ingroup PDT
*
* The ThreeBodyAllOnCalculator class is designed to integrate
* a three-body matrix element in which all the outgoing particles are
* on-shell to give the partial width. A multi-channel type approach is
* used together with a GSL integration subroutine.
*
* @see GSLIntegrator
* @see ThreeBodyAllOnOuter
* @see ThreeBodyAllOnIner
*
*/
template <class T>
class ThreeBodyAllOnCalculator: public WidthCalculatorBase {
/** \ingroup PDT
* The class for the outer integrand of the integral of a three body decay matrix
* element. This class is used by the ThreeBodyAllOnCalculator
* to perform the outer integral.
*
* @see ThreeBodyAllOnCalculator
* @see ThreeBodyAllOnInner
*/ struct Outer {
/**
* Constructor with a pointer to the ThreeBodyAllOnCalculator
*/
Outer(typename Ptr<Herwig::ThreeBodyAllOnCalculator<T> >::const_pointer in,
double relerr)
: _integrand(in), _integrator(1e-35,relerr,1000)
{}
/**
* Retreive function value
*/
Energy4 operator ()(double x) const {
Energy2 low, upp;
_integrand->outerVariables(x,low,upp);
return _integrator.value(*_integrand,low,upp);
}
/** Argument type for the GSLIntegrator */
typedef double ArgType;
/** Return type for the GSLIntegrator */
typedef Energy4 ValType;
/**
* pointer to the decay integrator
*/
typename Ptr<Herwig::ThreeBodyAllOnCalculator<T> >::const_pointer _integrand;
/**
* GSL integration class
*/
GSLIntegrator _integrator;
};
public:
/**
* The ThreeBodyAllOnOuter class is a friend so it can access the private
* members and perform the integral.
*/
friend struct ThreeBodyAllOnOuter;
public:
/**
* Constructor with all the parameters
* @param inweights The weights for the different integration channels
* @param intype The types of the different integration channels.
* @param inmass The mass for the Jacobian for the different channels.
* @param inwidth The width for the Jacobian for the different channels.
* @param inpow the power for power-law smoothing for a given channel
* @param inme The pointer to the function which gives the matrix element.
* @param mode The mode to be integrated
* @param m1 The mass of the first particle.
* @param m2 The mass of the second particle.
* @param m3 The mass of the third particle.
*/
ThreeBodyAllOnCalculator(vector<double> inweights,
vector<int> intype,
vector<Energy> inmass,
vector<Energy> inwidth,
vector<double> inpow,
T inme, int mode,
Energy m1,Energy m2,Energy m3,
double relerr=1e-3)
: _channelweights(inweights),_channeltype(intype),_channelmass(inmass),
_channelwidth(inwidth),_channelpower(inpow),_theME(inme),_mode(mode),
_thechannel(0),_mapping(inweights.size(),0),_souter(ZERO),
_integrator(1e-35,relerr,1000),_relerr(relerr) {
_m.resize(4);
_m[1]=m1;_m[2]=m2;_m[3]=m3;
_m2.resize(4);
for(int ix=1;ix<4;++ix) {
_m2[ix]=sqr(_m[ix]);
}
}
/**
* calculate the width for a given mass
* @param q2 The mass squared of the decaying particle.
* @return The partial width.
*/
Energy partialWidth(Energy2 q2) const;
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @param mass The new value.
* @return The mass required.
*/
void resetMass(int imass,Energy mass) {
assert(imass<4);
_m[imass]=mass;
_m2[imass]=mass*mass;
}
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @return The mass required.
*/
Energy getMass(const int imass) const {
assert(imass>=0&&imass<4);
return _m[imass];
}
/**
* Get the masses of all bar the one specified. Used to get the limits
* for integration.
* @param imass The particle not needed
* @return The sum of the other masses.
*/
Energy otherMass(const int imass) const {
assert(imass>0&&imass<4);
if(imass==1) return _m[2]+_m[3];
else if(imass==2) return _m[1]+_m[3];
else return _m[1]+_m[2];
}
/**
* The integrand for the inner integrand.
* @param argument The mass squared for the inner integral
* @return The value of the inner integrand.
*/
Energy2 operator ()(Energy2 argument) const;
/** Argument type for the GSLIntegrator */
typedef Energy2 ArgType;
/** Return type for the GSLIntegrator */
typedef Energy2 ValType;
protected:
/**
* shift the variables for the outer integrand and give limits for the inner one.
* This member sets the value of the _souter member for the mass squared of the
* outer integral and calculates the limits on the mass squared of the inner
* integral.
* @param x The integration variable
* @param low The lower limit for the inner integral.
* @param upp The upper limit for the inner integral.
*/
void outerVariables(double x, Energy2 & low, Energy2 & upp) const;
private:
/**
* Private and non-existent assignment operator.
*/
- ThreeBodyAllOnCalculator & operator=(const ThreeBodyAllOnCalculator &);
+ ThreeBodyAllOnCalculator & operator=(const ThreeBodyAllOnCalculator &) = delete;
private:
/**
* weights for the different channels
*/
vector<double> _channelweights;
/**
* the types for the different channels
*/
vector<int> _channeltype;
/**
* the mass of the resonance for a given channel
*/
vector<Energy> _channelmass;
/**
* the width of the resonance for a given channel
*/
vector<Energy> _channelwidth;
/**
* the power for power-law smoothing for a given channel
*/
vector<double> _channelpower;
/**
* Function giving the matrix element as a function of s12,s13,s23
*/
T _theME;
/**
* The mode
*/
int _mode;
/**
* the channel currently being integrated
*/
mutable int _thechannel;
/**
* The mapping currently in used
*/
mutable vector<int> _mapping;
/**
* the value of s for the outer integral
*/
mutable Energy2 _souter;
/**
* masses of the external particles
*/
mutable vector<Energy> _m;
/**
* mass squareds of the external particles
*/
mutable vector<Energy2> _m2;
/**
* member to do the integration
*/
GSLIntegrator _integrator;
/**
* Relative error for the integration
*/
double _relerr;
};
}
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
#include "ThreeBodyAllOnCalculator.tcc"
#endif
#endif /* HERWIG_ThreeBodyAllOnCalculator_H */
diff --git a/PDT/TwoBodyAllOnCalculator.h b/PDT/TwoBodyAllOnCalculator.h
--- a/PDT/TwoBodyAllOnCalculator.h
+++ b/PDT/TwoBodyAllOnCalculator.h
@@ -1,137 +1,137 @@
// -*- C++ -*-
//
// TwoBodyAllOnCalculator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TwoBodyAllOnCalculator_H
#define HERWIG_TwoBodyAllOnCalculator_H
// This is the declaration of the TwoBodyAllOnCalculator class.
#include "WidthCalculatorBase.h"
#include "TwoBodyAllOnCalculator.fh"
#include "GenericWidthGenerator.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup PDT
*
* The <code>TwoBodyAllOnCalculator</code> class is a wrapped around the the
* simple two body decay matrix elements in the <code>GenericWidthGenerator</code>
* class and is designed to allow these matrix elements to be integrated
* if the external particles can be off-shell.
*
* @see TwoBodyAllOnCalculator
*
*/
class TwoBodyAllOnCalculator: public WidthCalculatorBase {
public:
/**
* The GenericWidthGenerator class is a friend to allow easier access for the
* integration of the two body partial widths.
*/
friend class GenericWidthGenerator;
public:
/**
* Constructor.
* @param inwidth Pointer to the GenericWidthGenerator class.
* @param imode The mode in the GenericWidthGenerator class we are integrating
* @param m1 The mass of the first particle.
* @param m2 The mass of the second particle.
*/
TwoBodyAllOnCalculator(tGenericWidthGeneratorPtr inwidth,int imode,
Energy m1,Energy m2)
: _mode(imode),_mass1(m1),_mass2(m2),_widthgen(inwidth)
{}
/**
* member to calculate the partial width.
* @param scale The mass squared for the decaying particle.
* @return The partial width.
*/
Energy partialWidth(Energy2 scale) const;
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @param mass The new value.
* @return The mass required.
*/
void resetMass(int imass,Energy mass) {
if(imass==1) _mass1=mass;
else if(imass==2) _mass2=mass;
else throw Exception() << "Unknown particle in "
<< "TwoBodyAllOnCalculator::resetMass()"
<< Exception::runerror;
}
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @return The mass required.
*/
Energy getMass(const int imass) const {
if(imass==1) return _mass1;
else if(imass==2) return _mass2;
else throw Exception() << "Unknown particle in "
<< "TwoBodyAllOnCalculator::getMass()"
<< Exception::runerror;
}
/**
* Get the masses of all bar the one specified. Used to get the limits
* for integration.
* @param imass The particle not needed
* @return The sum of the other masses.
*/
Energy otherMass(const int imass) const {
if(imass==1) return _mass2;
else if(imass==2) return _mass1;
else throw Exception() << "Unknown particle in "
<< "TwoBodyAllOnCalculator::otherMass()"
<< Exception::runerror;
}
private:
/**
* Private and non-existent assignment operator.
*/
- TwoBodyAllOnCalculator & operator=(const TwoBodyAllOnCalculator &);
+ TwoBodyAllOnCalculator & operator=(const TwoBodyAllOnCalculator &) = delete;
private:
/**
* the mode
*/
int _mode;
/**
* Mass of the first particle.
*/
Energy _mass1;
/**
* Mass of the second particle.
*/
Energy _mass2;
/**
* the width generator
*/
GenericWidthGeneratorPtr _widthgen;
};
}
#endif /* HERWIG_TwoBodyAllOnCalculator_H */
diff --git a/PDT/TwoOffShellCalculator.h b/PDT/TwoOffShellCalculator.h
--- a/PDT/TwoOffShellCalculator.h
+++ b/PDT/TwoOffShellCalculator.h
@@ -1,208 +1,208 @@
// -*- C++ -*-
//
// TwoOffShellCalculator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TwoOffShellCalculator_H
#define HERWIG_TwoOffShellCalculator_H
//
// This is the declaration of the TwoOffShellCalculator class.
//
#include "WidthCalculatorBase.h"
#include "GenericMassGenerator.h"
#include "TwoOffShellCalculator.fh"
#include "OneOffShellCalculator.fh"
#include "Herwig/Utilities/GSLIntegrator.h"
namespace Herwig {
using namespace ThePEG;
struct TwoOffShellIntegrand;
/** \ingroup PDT
*
* Use <code>WidthCalculatorBase</code> objects to integrate over the mass of two
* external particles which can be off-shell for running width calculations.
*
* @see WidthCalculatorBase
* @see TwoOffShellIntegrand
*/
class TwoOffShellCalculator: public WidthCalculatorBase {
/**
* The TwoOffShellIntegrand class is a friend to allow access to the private
* members for the integration.
*/
friend struct TwoOffShellIntegrand;
public:
/**
* Constructor which should be used setting all the required members.
* @param inloc The mass which is off-shell and to be integrated over.
* @param inwidth Pointer to the WidthGeneratorBase object which calculates
* the partial width for a given mass of the off-shell particle. This
* should be a OneOffShellCalculator instance.
* @param inmass Pointer to the GenericMassGenerator for the off-shell particle.
* @param inmin1 The minimum mass for the first off-shell particle.
* @param inmin2 The minimum mass for the second off-shell particle.
*/
TwoOffShellCalculator(int inloc, WidthCalculatorBasePtr inwidth,
GenericMassGeneratorPtr inmass,
Energy inmin2,Energy inmin1)
: _themass(inloc),_minmass(inmin2),_mother(inmin1),_oneoffwidth(inwidth),
_massptr(inmass)
{}
/**
* member to calculate the partial width.
* @param scale The mass squared for the decaying particle.
* @return The partial width.
*/
Energy partialWidth(Energy2 scale) const;
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @param mass The new value.
* @return The mass required.
*/
void resetMass(int imass,Energy mass) {
_oneoffwidth->resetMass(imass,mass);
}
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @return The mass required.
*/
Energy getMass(const int imass) const {
return _oneoffwidth->getMass(imass);
}
/**
* Get the masses of all bar the one specified. Used to get the limits
* for integration.
* @param imass The particle not needed
* @return The sum of the other masses.
*/
Energy otherMass(const int imass) const {
return _oneoffwidth->otherMass(imass);
}
protected:
/**
* The integrand.
* @param mass The mass of the second off-shell particle,
* @return The differential rate.
*/
Energy dGamma(Energy mass) const {
_oneoffwidth->resetMass(_themass,mass);
Energy wgt = (_oneoffwidth->partialWidth(_scale));
wgt*=(_massptr->weight(mass));
return wgt;
}
private:
/**
* Private and non-existent assignment operator.
*/
- TwoOffShellCalculator & operator=(const TwoOffShellCalculator &);
+ TwoOffShellCalculator & operator=(const TwoOffShellCalculator &) = delete;
private:
/**
* The second mass which is offshell
*/
int _themass;
/**
* the minimum allowed mass
*/
Energy _minmass;
/**
* sum of the masses of the other decay products
*/
Energy _mother;
/**
* pointer to object calculating the width for one-off shell particle.
*/
WidthCalculatorBasePtr _oneoffwidth;
/**
* pointer to object calculating the mass of the particle
*/
GenericMassGeneratorPtr _massptr;
/**
* integrator
*/
GSLIntegrator _integrator;
/**
* the mass squared of the decaying particle
*/
mutable Energy2 _scale;
};
/** \ingroup PDT
* Class for the integrand of a matrix element where two of the outgoing
* particles is off-shell. This class is used by the TwoOffShellCalculator class
* to perform the integral.
*/
struct TwoOffShellIntegrand {
/**
* Constructor.
* @param in Pointer to the OneOffShellCalculator class this is doing the
* integration for.
* @param m2 The mass squared of the off-shell particle for the Jacobian
* transform.
* @param mw The mass times width of the off-shell particle for the Jacobian
* transform.
*/
TwoOffShellIntegrand(tcTwoOffShellCalculatorPtr in,Energy2 m2,Energy2 mw)
: _integrand(in),_mass2(m2),_mwidth(mw)
{}
/**
* Retreive function value
*/
Energy operator ()(double x) const {
return _integrand->dGamma(sqrt(_mass2+_mwidth*tan(x)));
}
/** Argument type for the GSLIntegrator */
typedef double ArgType;
/** Return type for the GSLIntegrator */
typedef Energy ValType;
private:
/**
* pointer to the decay integrator
*/
cTwoOffShellCalculatorPtr _integrand;
/**
* The mass squared for the off-shell particle for the Jacobian transform.
*/
Energy2 _mass2;
/**
* The mass times width for the off-shell particle for the Jacobian transform.
*/
Energy2 _mwidth;
};
}
#endif /* HERWIG_TwoOffShellCalculator_H */
diff --git a/PDT/WidthCalculatorBase.h b/PDT/WidthCalculatorBase.h
--- a/PDT/WidthCalculatorBase.h
+++ b/PDT/WidthCalculatorBase.h
@@ -1,80 +1,80 @@
// -*- C++ -*-
//
// WidthCalculatorBase.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_WidthCalculatorBase_H
#define HERWIG_WidthCalculatorBase_H
//
// This is the declaration of the WidthCalculatorBase class.
//
#include "ThePEG/Config/ThePEG.h"
#include "ThePEG/Pointer/ReferenceCounted.h"
#include "WidthCalculatorBase.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup PDT
* The WidthCalculatorBase class is a base class to be used
* by classes which calculate partial widths for the running width.
*
* @see DecayIntegrator
* @see GenericWidthGenerator
*
*/
class WidthCalculatorBase: public Pointer::ReferenceCounted {
public:
/**
* Destructor
*/
virtual ~WidthCalculatorBase();
/**
* Calculate the partial width. This must be implemented in classes inheriting from
* this one.
* @param scale The mass squared of the decaying particle.
* @return The partial width.
*/
virtual Energy partialWidth(Energy2 scale) const =0;
/**
* Reset the mass of a particle (used to integrate over the mass.) This must be
* implemented in classes inheriting from this one.
* @param imass The mass to be reset.
* @param mass The new mass.
*/
virtual void resetMass(int imass,Energy mass) =0;
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @return The mass required.
*/
virtual Energy getMass(const int imass) const= 0;
/**
* Get the masses of all bar the one specified. Used to get the limits
* for integration.
* @param imass The particle not needed
* @return The sum of the other masses.
*/
virtual Energy otherMass(const int imass) const=0;
private:
/**
* Private and non-existent assignment operator.
*/
- WidthCalculatorBase & operator=(const WidthCalculatorBase &);
+ WidthCalculatorBase & operator=(const WidthCalculatorBase &) = delete;
};
}
#endif /* HERWIG_WidthCalculatorBase_H */
diff --git a/Sampling/BinSampler.h b/Sampling/BinSampler.h
--- a/Sampling/BinSampler.h
+++ b/Sampling/BinSampler.h
@@ -1,592 +1,592 @@
// -*- C++ -*-
//
// BinSampler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_BinSampler_H
#define Herwig_BinSampler_H
//
// This is the declaration of the BinSampler class.
//
#include "ThePEG/Handlers/StandardEventHandler.h"
#include "ThePEG/Utilities/Exception.h"
#include "ThePEG/Repository/UseRandom.h"
#include "MultiIterationStatistics.h"
#include "Remapper.h"
namespace Herwig {
using namespace ThePEG;
class GeneralSampler;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief BinSampler samples XCombs bins. This default implementation
* performs flat MC integration.
*
* @see \ref BinSamplerInterfaces "The interfaces"
* defined for BinSampler.
*/
class BinSampler: public Herwig::MultiIterationStatistics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
BinSampler();
/**
* The destructor.
*/
virtual ~BinSampler();
//@}
public:
/**
* Clone this object.
*/
Ptr<BinSampler>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<BinSampler>::ptr>(clone());
}
public:
/**
* Evaluate the cross section
*/
double evaluate(vector<double> p,
bool remap = true);
/**
* Return the bias with which this sampler is selected. The sampler
* needs to divide out this bias in its weight calculation.
*/
double bias() const { return theBias; }
/**
* Set the bias with which this sampler is selected.
*/
void bias(double b) { theBias = b; }
/**
* Set the event handler
*/
void eventHandler(tStdEHPtr eh) { theEventHandler = eh; }
/**
* Return the event handler
*/
tStdEHPtr eventHandler() const { return theEventHandler; }
/**
* Set the containing sampler
*/
void sampler(Ptr<GeneralSampler>::tptr);
/**
* Get the containing sampler
*/
Ptr<GeneralSampler>::tptr sampler() const;
/**
* Return the bin
*/
int bin() const { return theBin; }
/**
* Set the bin
*/
void bin(int b) { theBin = b; }
/**
* Return a string describing the process handled by this sampler.
*/
string process() const;
/**
* Return a short string describing the process handled by this sampler.
*/
string shortprocess() const;
/**
* Return a string identifying the process handled by this sampler.
*/
string id() const;
/**
* Return the last generated point.
*/
const vector<double>& lastPoint() const { return theLastPoint; }
/**
* Access the last generated point.
*/
vector<double>& lastPoint() { return theLastPoint; }
/**
* Return the reference weight to be used
*/
double referenceWeight() const { return theReferenceWeight; }
/**
* Set the reference weight to be used
*/
void referenceWeight(double w) { theReferenceWeight = w; }
/**
* Return true, if this sampler can provide unweighted events; if
* the proposal density is not an overestimate, weights larger than
* one can be generated, the handling of these points being subject
* to the GeneralSampler class.
*/
virtual bool canUnweight() const { return true; }
/**
* Return true, if this sampler adapts on the fly while generating
* events. Cross sections in the GeneralSampler class are calculated
* from adding up the cross sections quoted by individual samplers.
*/
virtual bool adaptsOnTheFly() const { return false; }
/**
* If this sampler features a compensation algorithm, return true if
* more events need to be generated to finish the compensation.
*/
virtual bool compensating() const { return false; }
/**
* Return true, if weighted events should be generated
*/
bool weighted() const { return theWeighted; }
/**
* Indicate that weighted events should be generated
*/
void doWeighted(bool yes = true) { theWeighted = yes; }
/**
* Exception to be thrown if cross section information should be updated.
*/
struct NextIteration {};
/**
* Generate the next point and return its weight; store the point in
* lastPoint().
*/
virtual double generate();
/**
* Fill and finalize the remappers present
*/
void fillRemappers(bool progress);
/**
* Write remappers to grid file
*/
void saveRemappers() const;
/**
* Write integration data to grid files
*/
void saveIntegrationData() const;
/**
* Save grid data
*/
virtual void saveGrid() const {}
/**
* Read integration data from grid files
*/
void readIntegrationData();
/**
* Read remappers from grid file
*/
void setupRemappers(bool progress);
/**
* Run a single iteration of n points, optionally printing a
* progress bar to cout. Calls generate n times.
*/
void runIteration(unsigned long n, bool progress);
/**
* Adapt this sampler after an iteration has been run
*/
virtual void adapt() {}
/**
* Initialize this bin sampler. This default version calls runIteration.
*/
virtual void initialize(bool progress);
/**
* Return true, if this sampler has already been initialized.
*/
bool initialized() const { return theInitialized; }
/**
* Indicate that this sampler has already been initialized.
*/
void isInitialized() { theInitialized = true; }
/**
* Return true, if integration has already been performed
*/
bool integrated() const { return theIntegrated; }
/**
* Return true, if remappers have been set up
*/
bool remappersFilled() const { return theRemappersFilled; }
/**
* Return true, if grid data exists for this sampler.
*/
virtual bool existsGrid() const { return false; }
/**
* Return true, if this sampler has already read grid data.
*/
bool hasGrids() const { return theHasGrids; }
/**
* Indicate that this sampler has already read grid data.
*/
void didReadGrids() { theHasGrids = true; }
/**
* Finalize this sampler.
*/
virtual void finalize(bool);
/**
* Return the total integrated cross section determined from the
* Monte Carlo sampling so far.
*/
virtual CrossSection integratedXSec() const {
return averageWeight()*nanobarn;
}
/**
* Return the error on the total integrated cross section determined
* from the Monte Carlo sampling so far.
*/
virtual CrossSection integratedXSecErr() const {
return sqrt(abs(averageWeightVariance()))*nanobarn;
}
/**
* Define the key for the collinear subtraction data.
*/
struct RandomNumberHistogram {
/**
* The lower bound
*/
double lower;
/**
* The bins, indexed by upper bound.
*/
map<double,double > bins;
map<double,double > binsw1;
/**
* Constructor
*/
RandomNumberHistogram(double low = 0.0,
double up = 1.,
unsigned int nbins = 20);
/**
* Book an event.
*/
void book(double inv, double weight) {
map<double,double>::iterator b = bins.upper_bound(inv);
if ( b == bins.end() ) return;
b->second = b->second+weight;
map<double,double>::iterator b2 = binsw1.upper_bound(inv);
if ( b2 == binsw1.end() ) return;
b2->second = b2->second+1.;
}
/**
* Write to file given name and invariant.
*/
void dump(const std::string& folder,const std::string& prefix, const std::string& process,const int NR)const;
};
typedef pair<string,size_t > RandomNumberIndex;
map<RandomNumberIndex,pair<RandomNumberHistogram,double> > RandomNumberHistograms;
public:
/**
* Return the dimension.
*/
int dimension() const { return theEventHandler->nDim(bin()); }
/**
* Return the number of points to be used for initial integration.
*/
unsigned long initialPoints() const { return theInitialPoints; }
/**
* Set the number of points to be used for initial integration.
*/
void initialPoints(unsigned long n) { theInitialPoints = n; }
/**
* Return the number of iterations to be considered for initialization.
*/
size_t nIterations() const { return theNIterations; }
/**
* Set the number of iterations to be considered for initialization.
*/
void nIterations(size_t n) { theNIterations = n; }
/**
* Set the factor to enhance the number of points for the next
* iteration.
*/
void enhancementFactor(double f) { theEnhancementFactor = f; }
/**
* Return the factor to enhance the number of points for the next
* iteration.
*/
double enhancementFactor() const { return theEnhancementFactor; }
/**
* Return the folder for the random number plots.
*/
string randomNumberString() const {return theRandomNumbers;}
/**
* In the AlmostUnweighted mode we do not need to unweight
* the events to the reference weight.
* Kappa reduces effectivly the reference weight.
* This can be used for processes, where unweighting
* is hardly feasable.
*/
double kappa() const {return theKappa;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The bias with which this sampler is selected.
*/
double theBias;
/**
* True, if weighted events should be generated
*/
bool theWeighted;
/**
* The number of points to use for initial integration.
*/
unsigned long theInitialPoints;
/**
* The number of iterations to be considered for initialization.
*/
size_t theNIterations;
/**
* Factor to enhance the number of points for the next iteration.
*/
double theEnhancementFactor;
/**
* Switch to count only non zero weights in presampling.
*/
bool theNonZeroInPresampling;
/**
* Switch to require that we get half of the points
* in each iteration below the maximum weight of the iteration.
*/
bool theHalfPoints;
/**
* The maximum number of allowed new maxima,
* in combination with HalfPoints, in order to prevent unstable
* processes.
*/
int theMaxNewMax;
/**
* The reference weight to be used
*/
double theReferenceWeight;
/**
* The bin to be sampled.
*/
int theBin;
/**
* Wether or not this sampler has already been initialized.
*/
bool theInitialized;
/**
* The last generated point.
*/
vector<double> theLastPoint;
/**
* The event handler to be used.
*/
tStdEHPtr theEventHandler;
/**
* The containing sampler
*/
Ptr<GeneralSampler>::tptr theSampler;
/**
* Folder for the random number plots.
*/
string theRandomNumbers;
/**
* Remapper objects indexed by dimension
*/
map<size_t,Remapper> remappers;
/**
* The number of points to be used for initial filling of the remappers
*/
unsigned long theRemapperPoints;
/**
* True if channels should get a remapper
*/
bool theRemapChannelDimension;
/**
* The number of bins to be used for luminosity dimensions
*/
unsigned long theLuminosityMapperBins;
/**
* The number of bins to be used for any other dimension
*/
unsigned long theGeneralMapperBins;
/**
* The minimum selection probability for remapper bins
*/
double theRemapperMinSelection;
/**
* True, if integration has already be performed
*/
bool theIntegrated;
/**
* True, if remappers have been set up
*/
bool theRemappersFilled;
/**
* True, if this sampler has already read grid data.
*/
bool theHasGrids;
/**
* In the AlmostUnweighted mode we do not need to unweight
* the events to the reference weight.
* Kappa reduces effectivly the reference weight.
* This can be used for processes, where unweighting
* is hardly feasable.
*/
double theKappa;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- BinSampler & operator=(const BinSampler &);
+ BinSampler & operator=(const BinSampler &) = delete;
};
}
#endif /* Herwig_BinSampler_H */
diff --git a/Sampling/CellGrids/CellGridSampler.h b/Sampling/CellGrids/CellGridSampler.h
--- a/Sampling/CellGrids/CellGridSampler.h
+++ b/Sampling/CellGrids/CellGridSampler.h
@@ -1,210 +1,210 @@
// -*- C++ -*-
//
// CellGridSampler.hpp is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_CellGridSampler_H
#define Herwig_CellGridSampler_H
//
// This is the declaration of the CellGridSampler class.
//
#include "Herwig/Sampling/BinSampler.h"
#include "SimpleCellGrid.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief CellGridSampler samples XCombs bins using CellGrids
*
* @see \ref CellGridSamplerInterfaces "The interfaces"
* defined for CellGridSampler.
*/
class CellGridSampler:
public Herwig::BinSampler, ExSample::SimpleCellGrid {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
CellGridSampler();
/**
* The destructor.
*/
virtual ~CellGridSampler();
//@}
public:
/**
* Clone this object.
*/
Ptr<CellGridSampler>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<CellGridSampler>::ptr>(clone());
}
public:
/**
* Generate the next point; store the point in lastPoint() and its
* weight using select(); if noMaxInfo is true, do not throw
* NewMaximum or UpdateCrossSections exceptions.
*/
virtual double generate();
/**
* Initialize this bin sampler. This default version calls runIteration.
*/
virtual void initialize(bool progress);
/**
* Finalize this sampler.
*/
virtual void finalize(bool);
/**
* Adapt
*/
virtual void adapt();
/**
* Return true, if grid data exists for this sampler.
*/
virtual bool existsGrid() const;
/**
* Save grid data
*/
virtual void saveGrid() const;
/**
* The splittings for each dimension befor adaption.
*/
const vector<int>& pre_adaption_splits() const { return the_pre_adaption_splits; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- CellGridSampler & operator=(const CellGridSampler &);
+ CellGridSampler & operator=(const CellGridSampler &) = delete;
/**
* The number of points used to explore a cell
*/
size_t theExplorationPoints;
/**
* The number of exploration steps
*/
size_t theExplorationSteps;
/**
* The adaption threshold.
*/
double theGain;
/**
* The adaption threshold.
*/
double theEpsilon;
/**
* The minimum probability for cell selection.
*/
double theMinimumSelection;
/**
* The splittings for each dimension befor adaption.
*/
vector<int> the_pre_adaption_splits;
/**
* The number of splits to put into parton luminiosity degrees of
* freedom.
*/
int theLuminositySplits;
/**
* The number of splits to put into channel degrees of freedom.
*/
int theChannelSplits;
/**
* Perform splits for all channels
*/
bool theAllChannelSplits;
/**
* Perform unweighting in cells
*/
bool theUnweightCells;
};
}
#endif /* Herwig_CellGridSampler_H */
diff --git a/Sampling/GeneralSampler.h b/Sampling/GeneralSampler.h
--- a/Sampling/GeneralSampler.h
+++ b/Sampling/GeneralSampler.h
@@ -1,494 +1,494 @@
// -*- C++ -*-
//
// GeneralSampler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_GeneralSampler_H
#define Herwig_GeneralSampler_H
//
// This is the declaration of the GeneralSampler class.
//
#include "ThePEG/Handlers/SamplerBase.h"
#include "BinSampler.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Simon Platzer
*
* \brief A GeneralSampler class
*
* @see \ref GeneralSamplerInterfaces "The interfaces"
* defined for GeneralSampler.
*/
class GeneralSampler: public SamplerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
GeneralSampler();
/**
* The destructor.
*/
virtual ~GeneralSampler();
//@}
public:
/** @name Virtual functions from SamplerBase. */
//@{
/**
* Initialize the the sampler, possibly doing presampling of the
* phase space.
*/
virtual void initialize();
/**
* Generarate a new phase space point and return a weight associated
* with it. This weight should preferably be 1.
*/
virtual double generate();
/**
* Reject the last chosen phase space point.
*/
virtual void rejectLast();
/**
* If the sampler is able to sample several different functions
* separately, this function should return the last chosen
* function. This default version always returns 0.
*/
virtual int lastBin() const { return lastSampler() ? lastSampler()->bin() : 0; }
/**
* Return the total integrated cross section determined from the
* Monte Carlo sampling so far.
*/
virtual CrossSection integratedXSec() const {
currentCrossSections();
return theIntegratedXSec;
}
/**
* Return the error on the total integrated cross section determined
* from the Monte Carlo sampling so far.
*/
virtual CrossSection integratedXSecErr() const {
currentCrossSections();
return theIntegratedXSecErr;
}
/**
* Return the overestimated integrated cross section.
*/
virtual CrossSection maxXSec() const {
if ( theAddUpSamplers )
return SamplerBase::maxXSec();
return theMaxWeight*nanobarn;
}
/**
* Return the sum of the weights returned by generate() so far (of
* the events that were not rejeted).
*/
virtual double sumWeights() const { return theSumWeights; }
/**
* Return the sum of the weights squaredreturned by generate() so far (of
* the events that were not rejeted).
*/
virtual double sumWeights2() const { return theSumWeights2; }
/**
* Return the number of attempts
*/
virtual double attempts() const {
if ( theAddUpSamplers )
return SamplerBase::attempts();
return theAttempts;
}
/**
* Return the number of accepts
*/
double accepts() const { return theAccepts; }
//@}
/**
* Return the samplers
*/
const map<double,Ptr<BinSampler>::ptr>& samplers() const { return theSamplers; }
/**
* Return the bin sampler
*/
Ptr<BinSampler>::ptr binSampler() const { return theBinSampler; }
/**
* Return the last selected bin sampler
*/
Ptr<BinSampler>::tptr lastSampler() const { return theLastSampler; }
/**
* True if we should do weighted events
*/
bool weighted() const { return eventHandler()->weighted(); }
/**
* Return true if this sampler is generating almost unweighted events.
*/
virtual bool almostUnweighted() const { return theAlmostUnweighted; }
public:
/**
* Return the XML element containing the grids
*/
const XML::Element& grids() const { return theGrids; }
/**
* Access the XML element containing the grids
*/
XML::Element& grids() { return theGrids; }
/**
* Write out grids
*/
void writeGrids() const;
/**
* Read in grids
*/
void readGrids();
/**
* Return the number of integration jobs which were actually created.
*/
unsigned int integrationJobsCreated() {
return theIntegrationJobsCreated;
}
/**
* An external hook to prepare the sampler for generating events, e.g. by
* combining grid files from parallel integration runs.
*/
virtual void prepare();
protected:
/**
* Access the samplers
*/
map<double,Ptr<BinSampler>::ptr>& samplers() { return theSamplers; }
/**
* Set the last selected bin sampler
*/
void lastSampler(Ptr<BinSampler>::tptr s) { theLastSampler = s; }
/**
* Calculate cross sections from samplers at current state.
*/
void currentCrossSections() const;
/**
* Update the sampler selection
*/
void updateSamplers();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans);
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
private:
/**
* Whether or not additional information should be printed to cout.
*/
bool theVerbose;
/**
* The XML element containing the grids
*/
XML::Element theGrids;
/**
* The bin sampler to use.
*/
Ptr<BinSampler>::ptr theBinSampler;
/**
* The selector map for the bin samplers.
*/
map<double,Ptr<BinSampler>::ptr> theSamplers;
/**
* The last selected bin sampler.
*/
Ptr<BinSampler>::tptr theLastSampler;
/**
* The integrated cross section
*/
mutable CrossSection theIntegratedXSec;
/**
* The integrated cross section error
*/
mutable CrossSection theIntegratedXSecErr;
/**
* The number of events after which cross sections should truly be
* updated. This is used to prevent exhaustive combination of
* statistics when HepMC events are written out.
*/
size_t theUpdateAfter;
/**
* The number of calls to currentCrossSections since the last
* update.
*/
mutable size_t crossSectionCalls;
/**
* True, if currentCrossSections has been called since the last call
* to generate.
*/
mutable bool gotCrossSections;
/**
* The sum of weights
*/
double theSumWeights;
/**
* The sum of weights squared
*/
double theSumWeights2;
/**
* The number of attempts
*/
double theAttempts;
/**
* The number of accepts
*/
double theAccepts;
/**
* The maximum weight encountered
*/
double theMaxWeight;
/**
* True, if cross sections are to be combined from each sampler
* individually
*/
bool theAddUpSamplers;
/**
* True, if the global maximum weight should be used as
* reference. If not, the maximum weights of individual samplers are
* used, and selection probabilities fro the samplers are adjusted
* accordingly.
*/
bool theGlobalMaximumWeight;
/**
* True, if subprocesses should be selected flat. This is a debug
* flag, cross section information and distributions will not be
* correct.
*/
bool theFlatSubprocesses;
/**
* True, if we are generating events.
*/
bool isSampling;
/**
* A minimum selection probability for each sampler
*/
double theMinSelection;
/**
* True, if information for combining unnormalized runs should be
* printed out
*/
bool runCombinationData;
/**
* True, if we should perform an almost unweighted sampling
*/
bool theAlmostUnweighted;
/**
* Number of points which exceeded the maximum
*/
unsigned long maximumExceeds;
/**
* The average relative deviation from the maximum weight
*/
double maximumExceededBy;
/**
* The correct cross section as one would exspect with
* almostUnweighted.
*/
double correctWeights;
/**
* Enhancement factor to the maximum weight.
* This is to get less maximumExceeds.
*/
double theMaxEnhancement;
/**
* True, if grids have already been read.
*/
bool didReadGrids;
/**
* True, if parallel subprocess integration should be enabled
*/
bool theParallelIntegration;
/**
* The number of subprocesses to integrate per job
*/
unsigned int theIntegratePerJob;
/**
* The maximum number of integration jobs to be created
*/
unsigned int theIntegrationJobs;
/**
* The number of integration jobs which were actually created
*/
unsigned int theIntegrationJobsCreated;
/**
* Indicate that initialization is only reading a grid.
*/
bool justAfterIntegrate;
/**
* True, if grids should be written at the end of a run
*/
bool theWriteGridsOnFinish;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GeneralSampler & operator=(const GeneralSampler &);
+ GeneralSampler & operator=(const GeneralSampler &) = delete;
};
}
#endif /* Herwig_GeneralSampler_H */
diff --git a/Sampling/Makefile.am b/Sampling/Makefile.am
--- a/Sampling/Makefile.am
+++ b/Sampling/Makefile.am
@@ -1,40 +1,40 @@
SUBDIRS = CellGrids
pkglib_LTLIBRARIES = HwSampling.la
-HwSampling_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0
+HwSampling_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0
HwSampling_la_SOURCES = \
GeneralStatistics.h GeneralStatistics.cc \
MultiIterationStatistics.h MultiIterationStatistics.cc \
BinSampler.h BinSampler.cc \
GeneralSampler.h GeneralSampler.cc \
MonacoSampler.h MonacoSampler.cc \
Remapper.h Remapper.cc \
exsample/cell.icc \
exsample/generator.h \
exsample/linear_interpolator.icc \
exsample/config.h \
exsample/selectors.h \
exsample/adaption_info.h \
exsample/selectors.icc \
exsample/adaption_info.icc \
exsample/exponential_generator.h \
exsample/exponential_generator.icc \
exsample/generator.icc \
exsample/statistics.h \
exsample/linear_interpolator.h \
exsample/cell.h \
exsample/utility.h \
exsample/binary_tree.h \
exsample/statistics.icc
HwSampling_la_LIBADD = \
CellGrids/libHwCellGrids.la
EXTRA_DIST = herwig-mergegrids.py
install-exec-local:
$(install_sh_SCRIPT) $(srcdir)/herwig-mergegrids.py $(DESTDIR)$(bindir)/herwig-mergegrids
uninstall-local:
rm -f $(DESTDIR)$(bindir)/herwig-mergegrids
diff --git a/Sampling/MonacoSampler.h b/Sampling/MonacoSampler.h
--- a/Sampling/MonacoSampler.h
+++ b/Sampling/MonacoSampler.h
@@ -1,201 +1,201 @@
// -*- C++ -*-
//
// MonacoSampler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MonacoSampler_H
#define Herwig_MonacoSampler_H
//
// This is the declaration of the MonacoSampler class.
//
#include "Herwig/Sampling/BinSampler.h"
#include "Herwig/Utilities/XML/Element.h"
// work around a Boost 1.64 bug where ublas headers would fail otherwise
#include <boost/version.hpp>
#if (BOOST_VERSION / 100 >= 1064)
#include <boost/serialization/array_wrapper.hpp>
#endif
#include <boost/numeric/ublas/matrix.hpp>
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Michael Rauch
*
* \brief MonacoSampler samples XCombs bins using using Monaco
*
* @see \ref MonacoSamplerInterfaces "The interfaces"
* defined for MonacoSampler.
*/
class MonacoSampler: public Herwig::BinSampler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MonacoSampler();
/**
* The destructor.
*/
virtual ~MonacoSampler();
//@}
public:
/**
* Clone this object.
*/
Ptr<MonacoSampler>::ptr cloneMe() const {
return dynamic_ptr_cast<Ptr<MonacoSampler>::ptr>(clone());
}
public:
/**
* Generate the next point and return its weight; store the point in
* lastPoint().
*/
virtual double generate();
/**
* Adapt this sampler after an iteration has been run
*/
virtual void adapt();
/**
* Return true, if grid data exists for this sampler.
*/
virtual bool existsGrid() const;
/**
* Save grid data
*/
virtual void saveGrid() const;
/**
* Initialize this bin sampler. This default version calls runIteration.
*/
virtual void initialize(bool progress);
/**
* Finalize this sampler.
*/
virtual void finalize(bool);
/**
* Fill Monaco grid data from an XML element
*/
virtual void fromXML(const XML::Element&);
/**
* Return an XML element for the data of the Monaco grid
*/
virtual XML::Element toXML() const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Rate of grid modification (0 for no modification)
*/
double theAlpha;
/**
* Number of grid divisions per dimension
*/
size_t theGridDivisions;
/**
* Grid boundaries
* (first index: dimension of random numbers,
* second index: dimension of partitions per random number)
*/
boost::numeric::ublas::matrix<double> theGrid;
/**
* Collected value per grid bin
*/
boost::numeric::ublas::matrix<double> theGridData;
private:
/**
* Number of points collected in iteration so far
*/
size_t theIterationPoints;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MonacoSampler & operator=(const MonacoSampler &);
+ MonacoSampler & operator=(const MonacoSampler &) = delete;
};
}
#endif /* Herwig_MonacoSampler_H */
diff --git a/Shower/Dipole/AlphaS/Makefile.am b/Shower/Dipole/AlphaS/Makefile.am
--- a/Shower/Dipole/AlphaS/Makefile.am
+++ b/Shower/Dipole/AlphaS/Makefile.am
@@ -1,14 +1,14 @@
pkglib_LTLIBRARIES = HwDipoleShowerAlphaS.la
-HwDipoleShowerAlphaS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
+HwDipoleShowerAlphaS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0
HwDipoleShowerAlphaS_la_SOURCES = \
alpha_s.h \
alpha_s.cc \
lo_alpha_s.h \
lo_alpha_s.cc \
nlo_alpha_s.h \
nlo_alpha_s.cc \
gsl.h \
gsl.tcc \
gsl.cc
diff --git a/Shower/Dipole/AlphaS/alpha_s.h b/Shower/Dipole/AlphaS/alpha_s.h
--- a/Shower/Dipole/AlphaS/alpha_s.h
+++ b/Shower/Dipole/AlphaS/alpha_s.h
@@ -1,352 +1,352 @@
// -*- C++ -*-
// couplings/alpha_s.h is part of matchbox
// (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
#ifndef matchbox_couplings_alpha_s_h
#define matchbox_couplings_alpha_s_h
#include <string>
#include <array>
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/StandardModel/AlphaSBase.h"
#include "gsl.h"
namespace matchbox {
using namespace ThePEG;
template<class AlphaS>
struct solve_lambda_below {
typedef AlphaS alpha_s;
inline solve_lambda_below (alpha_s* a,
unsigned int n,
Energy2 lambda2n,
Energy2 mass2)
: alpha(a), nf_in(n), lambda2_nf_in(lambda2n), threshold(mass2) {}
alpha_s * alpha;
unsigned int nf_in;
Energy2 lambda2_nf_in;
Energy2 threshold;
inline double operator () (double lambda2) {
return ((*alpha)(threshold,lambda2_nf_in,nf_in) -
(*alpha)(threshold,lambda2*MeV2,nf_in-1));
}
};
template<class AlphaS>
struct solve_lambda_above {
typedef AlphaS alpha_s;
inline solve_lambda_above (alpha_s * a,
unsigned int n,
Energy2 lambda2n,
Energy2 mass2)
: alpha(a), nf_in(n), lambda2_nf_in(lambda2n), threshold(mass2) {}
alpha_s * alpha;
unsigned int nf_in;
Energy2 lambda2_nf_in;
Energy2 threshold;
inline double operator () (double lambda2) {
return ((*alpha)(threshold,lambda2_nf_in,nf_in) -
(*alpha)(threshold,lambda2*MeV2,nf_in+1));
}
};
template<class AlphaS>
struct solve_input_lambda {
typedef AlphaS alpha_s;
inline solve_input_lambda (alpha_s * a,
unsigned int n,
double inalpha,
Energy2 inscale)
: alpha(a), nf_in(n), alpha_in(inalpha), scale_in(inscale) {}
alpha_s * alpha;
unsigned int nf_in;
double alpha_in;
Energy2 scale_in;
inline double operator () (double lambda2) {
return ((*alpha)(scale_in,lambda2*MeV2,nf_in) - alpha_in);
}
};
/**
* Base class for the strong coupling.
*
* @see \ref alpha_sInterfaces "The interfaces"
* defined for alpha_s.
*/
class alpha_s
: public AlphaSBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
alpha_s();
/**
* The destructor.
*/
virtual ~alpha_s();
//@}
public:
/** @name Virtual functions as required by AlphaSBase. */
//@{
/**
* The \f$\alpha_S\f$. Return the QCD coupling for a given \a scale
* using the given standard model object \a sm.
*/
virtual inline double value(Energy2 scale, const StandardModelBase &) const {
return operator() (scale);
}
/**
* Return the flavour thresholds used. The returned vector contains
* (in position <code>i</code>) the scales when the active number of
* flavours changes from <code>i</code> to <code>i+1</code>.
*/
virtual inline vector<Energy2> flavourThresholds() const {
assert(!nfvector.empty());
return nfvector;
}
/**
* Return the \f$\Lambda_{QCD}\f$ used for different numbers of
* active flavours.
*/
virtual inline vector<Energy> LambdaQCDs() const {
vector<Energy> res;
for (size_t k = 0; k < 7; ++k)
res.push_back(sqrt(lambda_squared_[k]));
return res;
}
//@}
public:
/// return alpha_s as function of scale
inline double operator () (Energy2 scale) const {
if ( fixed_ )
return alpha_s_in_;
assert(matched());
unsigned int active = active_flavours(scale_factor_*scale);
return operator () (scale_factor_*scale,lambda_squared_[active],active);
}
/// return alpha_s as function of scale, QCD scale
/// and number of active flavours
virtual double operator () (Energy2 scale,
Energy2 lambda2,
unsigned int nf) const = 0;
/// match thresholds and write alpha_s
/// to specified file; arguments are
/// Q_low/GeV Q_high/GeV n_steps filename
string check (string args);
public:
/// return minimum number of active flavours
inline unsigned int min_active_flavours () const { return min_active_flavours_; }
/// set minimum number of active flavours
inline void min_active_flavours (unsigned int nf) { min_active_flavours_ = nf; }
/// return maximum number of active flavours
inline unsigned int max_active_flavours () const { return max_active_flavours_; }
/// set maximum number of active flavours
inline void max_active_flavours (unsigned int nf) { max_active_flavours_ = nf; }
/// return the number of active flavours at the given scale
inline unsigned int active_flavours (Energy2 scale) const {
unsigned int active = 0;
if (scale > 0.*GeV2) {
while(quark_mass_squared(active) < scale) {
if (++active == max_active_flavours_+1)
break;
}
active -= 1;
} else {
active = 0;
}
return active;
}
/// return the lambda squared for the given number of flavours
inline Energy2 lambda_squared (unsigned int f) const {
assert(f < 7);
return lambda_squared_[f];
}
/// return the mass squared for given flavour
inline Energy2 quark_mass_squared (unsigned int f) const {
assert(f < 7);
return quark_masses_squared_[f];
}
/// set the mass squared for given flavour
inline void quark_mass_squared (unsigned int f, Energy2 m2) {
assert(f < 7);
quark_masses_squared_[f] = m2;
matched_ = false;
}
public:
/// perform the threshold matching
/// given alpha_s value at reference scale
void match_thresholds ();
/// return true, if threshold matching has been
/// performed
inline bool matched () const { return matched_; }
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual inline void doinit() {
match_thresholds();
copy(quark_masses_squared_.begin()+1,
quark_masses_squared_.end(),nfvector.begin());
AlphaSBase::doinit();
}
//@}
/// return the scale factor
double scale_factor () const { return scale_factor_; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @name os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @name is the persistent input stream read from.
* @name version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an abstract class with persistent data.
*/
static AbstractClassDescription<alpha_s> initalpha_s;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- alpha_s & operator=(const alpha_s &);
+ alpha_s & operator=(const alpha_s &) = delete;
private:
unsigned int min_active_flavours_;
unsigned int max_active_flavours_;
bool matched_;
double scale_factor_;
std::array<Energy2,7> quark_masses_squared_;
std::array<Energy2,7> lambda_squared_;
vector<Energy2> nfvector=vector<Energy2>(6);
double alpha_s_in_;
Energy scale_in_;
pair<Energy2,Energy2> lambda_range_;
bool fixed_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of alpha_s. */
template <>
struct BaseClassTrait<matchbox::alpha_s,1> {
/** Typedef of the first base class of alpha_s. */
typedef AlphaSBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the alpha_s class and the shared object where it is defined. */
template <>
struct ClassTraits<matchbox::alpha_s>
: public ClassTraitsBase<matchbox::alpha_s> {
/** Return a platform-independent class name */
static string className() { return "matchbox::alpha_s"; }
/**
* The name of a file containing the dynamic library where the class
* alpha_s is implemented. It may also include several, space-separated,
* libraries if the class alpha_s depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShowerAlphaS.so"; }
};
/** @endcond */
}
#endif /* matchbox_couplings_alpha_s_h */
diff --git a/Shower/Dipole/AlphaS/lo_alpha_s.h b/Shower/Dipole/AlphaS/lo_alpha_s.h
--- a/Shower/Dipole/AlphaS/lo_alpha_s.h
+++ b/Shower/Dipole/AlphaS/lo_alpha_s.h
@@ -1,167 +1,167 @@
// -*- C++ -*-
// couplings/lo_alpha_s.h is part of matchbox
// (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
#ifndef matchbox_couplings_lo_alpha_s_h
#define matchbox_couplings_lo_alpha_s_h
#include "alpha_s.h"
namespace matchbox {
using namespace ThePEG;
/**
* LO running alpha_s
*
* @see \ref lo_alpha_sInterfaces "The interfaces"
* defined for lo_alpha_s.
*/
class lo_alpha_s
: public alpha_s {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
lo_alpha_s();
/**
* The destructor.
*/
virtual ~lo_alpha_s();
//@}
public:
/// return alpha_s as function of scale, QCD scale
/// and number of active flavours
virtual double operator () (Energy2 scale,
Energy2 lambda2,
unsigned int nf) const;
/// return the number of loops which determine this running
virtual unsigned int nloops () const { return 1; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @name os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @name is the persistent input stream read from.
* @name version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual inline void doinit() {
freezing_scale_ *= scale_factor();
alpha_s::doinit();
}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an abstract class with persistent data.
*/
static ClassDescription<lo_alpha_s> initlo_alpha_s;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- lo_alpha_s & operator=(const lo_alpha_s &);
+ lo_alpha_s & operator=(const lo_alpha_s &) = delete;
private:
Energy freezing_scale_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of lo_alpha_s. */
template <>
struct BaseClassTrait<matchbox::lo_alpha_s,1> {
/** Typedef of the first base class of lo_alpha_s. */
typedef matchbox::alpha_s NthBase;
};
/** This template specialization informs ThePEG about the name of
* the lo_alpha_s class and the shared object where it is defined. */
template <>
struct ClassTraits<matchbox::lo_alpha_s>
: public ClassTraitsBase<matchbox::lo_alpha_s> {
/** Return a platform-independent class name */
static string className() { return "matchbox::lo_alpha_s"; }
/**
* The name of a file containing the dynamic library where the class
* lo_alpha_s is implemented. It may also include several, space-separated,
* libraries if the class lo_alpha_s depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShowerAlphaS.so"; }
};
/** @endcond */
}
#endif /* matchbox_couplings_lo_alpha_s_h */
diff --git a/Shower/Dipole/AlphaS/nlo_alpha_s.h b/Shower/Dipole/AlphaS/nlo_alpha_s.h
--- a/Shower/Dipole/AlphaS/nlo_alpha_s.h
+++ b/Shower/Dipole/AlphaS/nlo_alpha_s.h
@@ -1,197 +1,197 @@
// -*- C++ -*-
// couplings/nlo_alpha_s.h is part of matchbox
// (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
#ifndef matchbox_couplings_nlo_alpha_s_h
#define matchbox_couplings_nlo_alpha_s_h
#include "alpha_s.h"
namespace matchbox {
using namespace ThePEG;
/**
* NLO running alpha_s
*
* @see \ref nlo_alpha_sInterfaces "The interfaces"
* defined for nlo_alpha_s.
*/
class nlo_alpha_s
: public alpha_s {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
nlo_alpha_s();
/**
* The destructor.
*/
virtual ~nlo_alpha_s();
//@}
public:
/// return alpha_s as function of scale, QCD scale
/// and number of active flavours
virtual double operator () (Energy2 scale,
Energy2 lambda2,
unsigned int nf) const;
/// return the number of loops which determine this running
virtual unsigned int nloops () const { return 2; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @name os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @name is the persistent input stream read from.
* @name version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual inline void doinit() {
freezing_scale_ *= scale_factor();
alpha_s::doinit();
}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an abstract class with persistent data.
*/
static ClassDescription<nlo_alpha_s> initnlo_alpha_s;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- nlo_alpha_s & operator=(const nlo_alpha_s &);
+ nlo_alpha_s & operator=(const nlo_alpha_s &) = delete;
private:
struct rg_solution {
inline double operator () (double alpha) {
double beta0 = (33.-2.*nf)/(12.*Constants::pi);
double beta1 = (153.-19.*nf)/(24.*sqr(Constants::pi));
return ((1./alpha)+(beta1/beta0)*log(alpha/(beta0+beta1*alpha))- beta0*slog);
}
double slog;
unsigned int nf;
};
Energy freezing_scale_;
bool exact_evaluation_;
static rg_solution& rg () {
static rg_solution rg_;
return rg_;
}
static gsl::bisection_root_solver<rg_solution,100>& rg_solver () {
static gsl::bisection_root_solver<rg_solution,100> rg_solver_(rg());
return rg_solver_;
}
bool two_largeq_terms_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of nlo_alpha_s. */
template <>
struct BaseClassTrait<matchbox::nlo_alpha_s,1> {
/** Typedef of the first base class of nlo_alpha_s. */
typedef matchbox::alpha_s NthBase;
};
/** This template specialization informs ThePEG about the name of
* the nlo_alpha_s class and the shared object where it is defined. */
template <>
struct ClassTraits<matchbox::nlo_alpha_s>
: public ClassTraitsBase<matchbox::nlo_alpha_s> {
/** Return a platform-independent class name */
static string className() { return "matchbox::nlo_alpha_s"; }
/**
* The name of a file containing the dynamic library where the class
* nlo_alpha_s is implemented. It may also include several, space-separated,
* libraries if the class nlo_alpha_s depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShowerAlphaS.so"; }
};
/** @endcond */
}
#endif /* matchbox_couplings_nlo_alpha_s_h */
diff --git a/Shower/Dipole/Base/DipoleChainOrdering.h b/Shower/Dipole/Base/DipoleChainOrdering.h
--- a/Shower/Dipole/Base/DipoleChainOrdering.h
+++ b/Shower/Dipole/Base/DipoleChainOrdering.h
@@ -1,200 +1,200 @@
// -*- C++ -*-
//
// DipoleChainOrdering.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleChainOrdering_H
#define HERWIG_DipoleChainOrdering_H
//
// This is the declaration of the DipoleChainOrdering class.
//
#include "DipoleEvolutionOrdering.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief DipoleChainOrdering performs ordering on
* complete colour singlet dipole chains.
*
*/
class DipoleChainOrdering: public DipoleEvolutionOrdering {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleChainOrdering();
/**
* The destructor.
*/
virtual ~DipoleChainOrdering();
//@}
public:
/**
* For the given dipole and splitting kernel return
* the hard scale.
*/
virtual Energy hardScale(tPPtr emitter, tPPtr spectator,
double emitterX, double spectatorX,
const DipoleSplittingKernel&,
const DipoleIndex&) const;
/**
* For the given performed splitting, dipole chain
* and dipoles originating from the splitting, set the next
* scale.
*/
virtual void setEvolutionScale(Energy scale,
const DipoleSplittingInfo&,
DipoleChain&,
pair<list<Dipole>::iterator,list<Dipole>::iterator>) const;
/**
* For the given performed splitting, dipole chain
* and dipole taking a recoil, set the next
* scale.
*/
virtual void setEvolutionScale(Energy scale,
const DipoleSplittingInfo&,
DipoleChain&,
list<Dipole>::iterator) const;
/**
* For the given selected splitting return
* the evolution scale.
*/
virtual Energy evolutionScale(const DipoleSplittingInfo& split,
const DipoleSplittingKernel&) const;
/**
* Return the maximum pt corresponding to the given
* evolution scale.
*/
virtual Energy maxPt(Energy scale,
const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* True, if virtuality instead of pt ordering
* should be performed.
*/
bool virtualityOrdering;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<DipoleChainOrdering> initDipoleChainOrdering;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleChainOrdering & operator=(const DipoleChainOrdering &);
+ DipoleChainOrdering & operator=(const DipoleChainOrdering &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleChainOrdering. */
template <>
struct BaseClassTrait<Herwig::DipoleChainOrdering,1> {
/** Typedef of the first base class of DipoleChainOrdering. */
typedef Herwig::DipoleEvolutionOrdering NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleChainOrdering class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleChainOrdering>
: public ClassTraitsBase<Herwig::DipoleChainOrdering> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleChainOrdering"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleChainOrdering is implemented. It may also include several, space-separated,
* libraries if the class DipoleChainOrdering depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleChainOrdering_H */
diff --git a/Shower/Dipole/Base/DipoleEventReweight.h b/Shower/Dipole/Base/DipoleEventReweight.h
--- a/Shower/Dipole/Base/DipoleEventReweight.h
+++ b/Shower/Dipole/Base/DipoleEventReweight.h
@@ -1,117 +1,117 @@
// -*- C++ -*-
//
// DipoleEventReweight.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_DipoleEventReweight_H
#define Herwig_DipoleEventReweight_H
//
// This is the declaration of the DipoleEventReweight class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/StandardModel/AlphaSBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
* \brief Reweight full final states produced by the shower
*
* @see \ref DipoleEventReweightInterfaces "The interfaces"
* defined for DipoleEventReweight.
*/
class DipoleEventReweight: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleEventReweight();
/**
* The destructor.
*/
virtual ~DipoleEventReweight();
//@}
public:
/**
* Return the weight for the given incoming, outgoing coloured and
* hard colour neutral particles, after an emission was generated
*/
virtual double weight(const PPair& in, const PList& out, const PList& hard,
Ptr<AlphaSBase>::tptr as) const = 0;
/**
* Return the weight which is applied to a cascade only once even if there was
* no emission from the cascade at all.
*/
virtual double weightCascade(const PPair& in, const PList& out, const PList& hard,
Ptr<AlphaSBase>::tptr as) const = 0;
/**
* Return true, if the event reweight should be applied to the hard scattering
*/
virtual bool firstInteraction() const = 0;
/**
* Return true, if the event reweight should be applied to secondary interactions
*/
virtual bool secondaryInteractions() const = 0;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleEventReweight & operator=(const DipoleEventReweight &);
+ DipoleEventReweight & operator=(const DipoleEventReweight &) = delete;
};
}
#endif /* Herwig_DipoleEventReweight_H */
diff --git a/Shower/Dipole/Base/DipoleEvolutionOrdering.h b/Shower/Dipole/Base/DipoleEvolutionOrdering.h
--- a/Shower/Dipole/Base/DipoleEvolutionOrdering.h
+++ b/Shower/Dipole/Base/DipoleEvolutionOrdering.h
@@ -1,184 +1,184 @@
// -*- C++ -*-
//
// DipoleEvolutionOrdering.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleEvolutionOrdering_H
#define HERWIG_DipoleEvolutionOrdering_H
//
// This is the declaration of the DipoleEvolutionOrdering class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "Herwig/Shower/Dipole/Base/Dipole.h"
#include "Herwig/Shower/Dipole/Base/DipoleChain.h"
#include "Herwig/Shower/Dipole/Kernels/DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief DipoleEvolutionOrdering defines a particular evolution
* algortihm for the dipole shower.
*
*/
class DipoleEvolutionOrdering: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleEvolutionOrdering();
/**
* The destructor.
*/
virtual ~DipoleEvolutionOrdering();
//@}
public:
/**
* Return true, if this ordering requests
* an independent dipole evolution.
*/
virtual bool independentDipoles() const { return false; }
/**
* For the given dipole and splitting kernel return
* the hard scale.
*/
virtual Energy hardScale(tPPtr emitter, tPPtr spectator,
double emitterX, double spectatorX,
const DipoleSplittingKernel&,
const DipoleIndex&) const = 0;
/**
* For the given performed splitting, dipole chain
* and dipoles originating from the splitting, set the next
* scale.
*/
virtual void setEvolutionScale(Energy scale,
const DipoleSplittingInfo&,
DipoleChain&,
pair<list<Dipole>::iterator,list<Dipole>::iterator>) const = 0;
/**
* For the given performed splitting, dipole chain
* and dipole taking a recoil, set the next
* scale.
*/
virtual void setEvolutionScale(Energy scale,
const DipoleSplittingInfo&,
DipoleChain&,
list<Dipole>::iterator) const = 0;
/**
* For the given selected splitting return the evolution scale.
*/
virtual Energy evolutionScale(const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const = 0;
/**
* Return the maximum pt corresponding to the given
* evolution scale.
*/
virtual Energy maxPt(Energy scale,
const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const = 0;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an abstract class with persistent data.
*/
static AbstractClassDescription<DipoleEvolutionOrdering> initDipoleEvolutionOrdering;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleEvolutionOrdering & operator=(const DipoleEvolutionOrdering &);
+ DipoleEvolutionOrdering & operator=(const DipoleEvolutionOrdering &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleEvolutionOrdering. */
template <>
struct BaseClassTrait<Herwig::DipoleEvolutionOrdering,1> {
/** Typedef of the first base class of DipoleEvolutionOrdering. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleEvolutionOrdering class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleEvolutionOrdering>
: public ClassTraitsBase<Herwig::DipoleEvolutionOrdering> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleEvolutionOrdering"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleEvolutionOrdering is implemented. It may also include several, space-separated,
* libraries if the class DipoleEvolutionOrdering depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleEvolutionOrdering_H */
diff --git a/Shower/Dipole/Base/DipoleSplittingGenerator.h b/Shower/Dipole/Base/DipoleSplittingGenerator.h
--- a/Shower/Dipole/Base/DipoleSplittingGenerator.h
+++ b/Shower/Dipole/Base/DipoleSplittingGenerator.h
@@ -1,513 +1,513 @@
// -*- C++ -*-
//
// DipoleSplittingGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleSplittingGenerator_H
#define HERWIG_DipoleSplittingGenerator_H
//
// This is the declaration of the DipoleSplittingGenerator class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "Herwig/Shower/Dipole/Kernels/DipoleSplittingKernel.h"
#include "DipoleSplittingReweight.h"
#include "Herwig/Shower/Dipole/Utility/DipoleMCCheck.h"
#include "Herwig/Sampling/exsample/exponential_generator.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Johannes Bellm
*
* \brief DipoleSplittingGenerator is used by the dipole shower
* to sample splittings from a given dipole splitting kernel.
*
* @see \ref DipoleSplittingGeneratorInterfaces "The interfaces"
* defined for DipoleSplittingGenerator.
*/
class DipoleSplittingGenerator: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleSplittingGenerator();
/**
* The destructor.
*/
virtual ~DipoleSplittingGenerator();
//@}
public:
/**
* Return the dipole splitting kernel.
*/
Ptr<DipoleSplittingKernel>::tptr splittingKernel() const;
/**
* Return the dipole splitting reweight.
*/
Ptr<DipoleSplittingReweight>::tptr splittingReweight() const;
/**
* Return the dipole splitting kinematics.
*/
Ptr<DipoleSplittingKinematics>::tptr splittingKinematics() const;
/**
* Set the dipole splitting kernel.
*/
void splittingKernel(Ptr<DipoleSplittingKernel>::tptr sp);
/**
* Set the dipole splitting reweight.
*/
void splittingReweight(Ptr<DipoleSplittingReweight>::tptr sp);
/**
* Make a wrapper around another generator.
*/
void wrap(Ptr<DipoleSplittingGenerator>::ptr other);
/**
* Return true, if this is actually a wrapper around
* another splitting generator.
*/
bool wrapping() const { return theOtherGenerator; }
public:
/**
* Reset the current variations to one
*/
void resetVariations();
/**
* Prepare to fill the given splitting.
*/
void prepare(const DipoleSplittingInfo&);
/**
* Fix parameters from the given DipoleSplittingInfo
* and generate the next splitting. Return the
* pt selected for the next splitting.
*/
Energy generate(const DipoleSplittingInfo&,
map<string,double>& variations,
Energy optHardPt = ZERO,
Energy optCutoff = ZERO);
/**
* Fix parameters from the fiven DipoleSplittingInfo
* and generate the next splitting. Return the
* pt selected for the next splitting when called
* from a wrapping generator.
*/
Energy generateWrapped(DipoleSplittingInfo&,
map<string,double>& variations,
Energy optHardPt = ZERO,
Energy optCutoff = ZERO);
/**
* Complete the given splitting.
*/
void completeSplitting(DipoleSplittingInfo&) const;
/**
* Return the last generated splitting
*/
const DipoleSplittingInfo& lastSplitting() const { return generatedSplitting; }
/// Sample the Sudakov in monte carlo fashion.
double sudakov(const DipoleSplittingInfo&,Energy down);
/// do the actiual calculation of the sudakov exponent.
double dosudakov(const DipoleSplittingInfo&,Energy down);
/// wrapper for sudakovExpansion for identical dipoles.
double wrappedSudakov(DipoleSplittingInfo& split,Energy down);
/// Sample the Sudakov exponent for sudakovExpansion weights
double sudakovExpansion(const DipoleSplittingInfo&,Energy down,Energy fixedScale);
/// do the actual calculation for the sudakov expansion.
double dosudakovExpansion(const DipoleSplittingInfo&,Energy down,Energy fixedScale);
/// wrapper for sudakovExpansion
double wrappedSudakovExpansion(DipoleSplittingInfo& split,Energy down,Energy fixedScale);
public:
/**
* Print debug information on the splitting
* handled.
*/
void debugGenerator(ostream&) const;
/**
* Print debug information on the last
* generated event.
*/
void debugLastEvent(ostream&) const;
protected:
/**
* Update parameters given a splitting.
*/
void fixParameters(const DipoleSplittingInfo&,
Energy optHardPt = ZERO);
/**
* With the parameters previuosly supplied
* through fixParameters generate the next
* splitting.
*/
void doGenerate(map<string,double>& variations,
Energy optCutoff = ZERO);
public:
/**
* Return the number of random numbers
* needed to sample this kernel.
*/
int nDim() const;
/**
* Flag, which variables are free variables.
*/
const vector<bool>& sampleFlags();
/**
* Return the support of the splitting kernel.
* The lower bound on the first variable is
* assumed to correspond to the cutoff on the
* evolution variable.
*/
const pair<vector<double>,vector<double> >& support();
/**
* Return the parameter point associated to the splitting
* previously supplied through fixParameters.
*/
const vector<double>& parameterPoint() const { return parameters; }
/**
* Indicate that presampling of this kernel
* will be performed in the next calls to
* evaluate until stopPresampling() is called.
*/
void startPresampling();
/**
* Indicate that presampling of this kernel
* is done until startPresampling() is called.
*/
void stopPresampling();
/**
* Return the number of points to presample this
* splitting generator.
*/
unsigned long presamplingPoints() const { return splittingKernel()->presamplingPoints(); }
/**
* Return the maximum number of trials
* to generate a splitting.
*/
unsigned long maxtry() const { return splittingKernel()->maxtry(); }
/**
* Return the number of accepted points after which the grid should
* be frozen
*/
unsigned long freezeGrid() const { return splittingKernel()->freezeGrid(); }
/**
* Return the detuning factor applied to the sampling overestimate kernel
*/
double detuning() const { return splittingKernel()->detuning(); }
/**
* Return true, if this splitting generator
* is able to deliver an overestimate to the sampled
* kernel.
*/
bool haveOverestimate() const;
/**
* Return an overestimate to the sampled kernel.
*/
double overestimate(const vector<double>&);
/**
* Invert the integral over the overestimate to equal
* the given value.
*/
double invertOverestimateIntegral(double) const;
/**
* Evalute the splitting kernel.
*/
double evaluate(const vector<double>&);
/**
* Indicate that a veto with the given kernel value and overestimate has occured.
*/
void veto(const vector<double>&, double p, double r);
/**
* Indicate that an accept with the given kernel value and overestimate has occured.
*/
void accept(const vector<double>&, double p, double r);
/**
* Return the weight associated to the currently generated splitting
*/
double splittingWeight() const {
if ( wrapping() )
return theOtherGenerator->splittingWeight();
return theSplittingWeight;
}
/**
* True, if sampler should apply compensation
*/
void doCompensate(bool yes = true) { theDoCompensate = yes; }
public:
/**@name Wrap to the exsample2 interface until this is finally cleaned up. */
//@{
inline const vector<bool>& variable_flags () {
return sampleFlags();
}
inline size_t evolution_variable () const { return 0; }
inline double evolution_cutoff () { return support().first[0]; }
inline const vector<double>& parameter_point () const {
return parameterPoint();
}
inline void start_presampling () {
startPresampling();
}
inline void stop_presampling () {
stopPresampling();
}
inline size_t dimension () const {
return nDim();
}
inline unsigned long presampling_points () const {
return presamplingPoints();
}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Pointer to another generator to wrap around.
*/
Ptr<DipoleSplittingGenerator>::ptr theOtherGenerator;
/**
* The dipole splitting kernel to sample
* splitting from.
*/
Ptr<DipoleSplittingKernel>::ptr theSplittingKernel;
/**
* The dipole splitting reweight.
*/
Ptr<DipoleSplittingReweight>::ptr theSplittingReweight;
/**
* Pointer to the exponential generator
*/
exsample::exponential_generator<DipoleSplittingGenerator,UseRandom>*
theExponentialGenerator;
/**
* The dipole splitting to be completed.
*/
DipoleSplittingInfo generatedSplitting;
/**
* A backup of the dipole splitting to be
* completed, if this generator is presampled.
*/
DipoleSplittingInfo presampledSplitting;
/**
* True, if prepared to sample splittings
* of a given kind.
*/
bool prepared;
/**
* Wether or not the kernel is currently
* being presampled.
*/
bool presampling;
/**
* The parameter point.
*/
vector<double> parameters;
/**
* The sampling flags
*/
vector<bool> theFlags;
/**
* The support.
*/
pair<vector<double>,vector<double> > theSupport;
/**
* Pointer to a check histogram object
*/
Ptr<DipoleMCCheck>::ptr theMCCheck;
/**
* True, if sampler should apply compensation
*/
bool theDoCompensate;
/**
* The currently used weight map
*/
map<string,double> currentWeights;
/**
* The weight associated to the currently generated splitting
*/
double theSplittingWeight;
/**
* Sudakov sampling accuracy
*/
double theSudakovAccuracy=0.05;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<DipoleSplittingGenerator> initDipoleSplittingGenerator;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleSplittingGenerator & operator=(const DipoleSplittingGenerator &);
+ DipoleSplittingGenerator & operator=(const DipoleSplittingGenerator &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleSplittingGenerator. */
template <>
struct BaseClassTrait<Herwig::DipoleSplittingGenerator,1> {
/** Typedef of the first base class of DipoleSplittingGenerator. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleSplittingGenerator class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleSplittingGenerator>
: public ClassTraitsBase<Herwig::DipoleSplittingGenerator> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleSplittingGenerator"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleSplittingGenerator is implemented. It may also include several, space-separated,
* libraries if the class DipoleSplittingGenerator depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleSplittingGenerator_H */
diff --git a/Shower/Dipole/Base/DipoleSplittingReweight.h b/Shower/Dipole/Base/DipoleSplittingReweight.h
--- a/Shower/Dipole/Base/DipoleSplittingReweight.h
+++ b/Shower/Dipole/Base/DipoleSplittingReweight.h
@@ -1,175 +1,175 @@
// -*- C++ -*-
//
// DipoleSplittingReweight.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleSplittingReweight_H
#define HERWIG_DipoleSplittingReweight_H
//
// This is the declaration of the DipoleSplittingReweight class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "DipoleSplittingInfo.h"
#include "Herwig/Shower/Dipole/DipoleShowerHandler.fh"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief DipoleSplittingReweight is used by the dipole shower
* to reweight splittings from a given dipole splitting kernel.
*
* @see \ref DipoleSplittingReweightInterfaces "The interfaces"
* defined for DipoleSplittingReweight.
*/
class DipoleSplittingReweight: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleSplittingReweight();
/**
* The destructor.
*/
virtual ~DipoleSplittingReweight();
//@}
public:
/**
* Return true, if the reweighting should be applied to the first
* interaction
*/
virtual bool firstInteraction() const { return true; }
/**
* Return true, if the reweighting should be applied to the secondary
* interactions
*/
virtual bool secondaryInteractions() const { return false; }
/**
* Update the pointer to the currently active dipole shower handler object.
*/
void updateCurrentHandler();
/**
* Return the pointer to the currently active dipole shower handler object.
*/
Ptr<DipoleShowerHandler>::tptr currentHandler() const;
/**
* Return the reweighting factor for the given splitting type.
*/
virtual double evaluate(const DipoleSplittingInfo&) const = 0;
/**
* Return an enhancement hint for the sampling of the un-reweighted
* splitting kernel
*/
virtual double hint(const DipoleSplittingInfo&) const {
return 1.;
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static AbstractClassDescription<DipoleSplittingReweight> initDipoleSplittingReweight;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleSplittingReweight & operator=(const DipoleSplittingReweight &);
+ DipoleSplittingReweight & operator=(const DipoleSplittingReweight &) = delete;
/**
* A pointer to the currently active dipole shower handler object.
*/
Ptr<DipoleShowerHandler>::tptr theCurrentHandler;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleSplittingReweight. */
template <>
struct BaseClassTrait<Herwig::DipoleSplittingReweight,1> {
/** Typedef of the first base class of DipoleSplittingReweight. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleSplittingReweight class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleSplittingReweight>
: public ClassTraitsBase<Herwig::DipoleSplittingReweight> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleSplittingReweight"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleSplittingReweight is implemented. It may also include several, space-separated,
* libraries if the class DipoleSplittingReweight depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleSplittingReweight_H */
diff --git a/Shower/Dipole/Colorea/HelAmps_sm.cc b/Shower/Dipole/Colorea/HelAmps_sm.cc
--- a/Shower/Dipole/Colorea/HelAmps_sm.cc
+++ b/Shower/Dipole/Colorea/HelAmps_sm.cc
@@ -1,1035 +1,1027 @@
//==========================================================================
// This file has been automatically generated for C++ Standalone by
// MadGraph5_aMC@NLO v. 2.5.4, 2017-03-28
// By the MadGraph5_aMC@NLO Development Team
// Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch
//==========================================================================
#include "HelAmps_sm.h"
#include <complex>
#include <cmath>
#include <iostream>
#include <cstdlib>
using namespace std;
namespace MG5_sm_COLOREA
{
void ixxxxx(double p[4], double fmass, int nhel, int nsf, complex<double> fi[6])
{
complex<double> chi[2];
double sf[2], sfomega[2], omega[2], pp, pp3, sqp0p3, sqm[2];
int ip, im, nh;
fi[0] = complex<double> (-p[0] * nsf, -p[3] * nsf);
fi[1] = complex<double> (-p[1] * nsf, -p[2] * nsf);
nh = nhel * nsf;
if (fmass != 0.0)
{
pp = min(p[0], sqrt(p[1] * p[1] + p[2] * p[2] + p[3] * p[3]));
if (pp == 0.0)
{
sqm[0] = sqrt(std::abs(fmass));
sqm[1] = Sgn(sqm[0], fmass);
ip = (1 + nh)/2;
im = (1 - nh)/2;
fi[2] = ip * sqm[ip];
fi[3] = im * nsf * sqm[ip];
fi[4] = ip * nsf * sqm[im];
fi[5] = im * sqm[im];
}
else
{
sf[0] = (1 + nsf + (1 - nsf) * nh) * 0.5;
sf[1] = (1 + nsf - (1 - nsf) * nh) * 0.5;
omega[0] = sqrt(p[0] + pp);
omega[1] = fmass/omega[0];
ip = (1 + nh)/2;
im = (1 - nh)/2;
sfomega[0] = sf[0] * omega[ip];
sfomega[1] = sf[1] * omega[im];
pp3 = max(pp + p[3], 0.0);
chi[0] = complex<double> (sqrt(pp3 * 0.5/pp), 0);
if (pp3 == 0.0)
{
chi[1] = complex<double> (-nh, 0);
}
else
{
chi[1] = complex<double> (nh * p[1], p[2])/sqrt(2.0 * pp * pp3);
}
fi[2] = sfomega[0] * chi[im];
fi[3] = sfomega[0] * chi[ip];
fi[4] = sfomega[1] * chi[im];
fi[5] = sfomega[1] * chi[ip];
}
}
else
{
if (p[1] == 0.0 and p[2] == 0.0 and p[3] < 0.0)
{
sqp0p3 = 0.0;
}
else
{
sqp0p3 = sqrt(max(p[0] + p[3], 0.0)) * nsf;
}
chi[0] = complex<double> (sqp0p3, 0.0);
if (sqp0p3 == 0.0)
{
chi[1] = complex<double> (-nhel * sqrt(2.0 * p[0]), 0.0);
}
else
{
chi[1] = complex<double> (nh * p[1], p[2])/sqp0p3;
}
if (nh == 1)
{
fi[2] = complex<double> (0.0, 0.0);
fi[3] = complex<double> (0.0, 0.0);
fi[4] = chi[0];
fi[5] = chi[1];
}
else
{
fi[2] = chi[1];
fi[3] = chi[0];
fi[4] = complex<double> (0.0, 0.0);
fi[5] = complex<double> (0.0, 0.0);
}
}
return;
}
double Sgn(double a, double b)
{
return (b < 0)? - abs(a):abs(a);
}
void txxxxx(double p[4], double tmass, int nhel, int nst, complex<double>
tc[18])
{
complex<double> ft[6][4], ep[4], em[4], e0[4];
double pt, pt2, pp, pzpt, emp, sqh, sqs;
int i, j;
sqh = sqrt(0.5);
sqs = sqrt(0.5/3);
pt2 = p[1] * p[1] + p[2] * p[2];
pp = min(p[0], sqrt(pt2 + p[3] * p[3]));
pt = min(pp, sqrt(pt2));
ft[4][0] = complex<double> (p[0] * nst, p[3] * nst);
ft[5][0] = complex<double> (p[1] * nst, p[2] * nst);
// construct eps+
if(nhel >= 0)
{
if(pp == 0)
{
ep[0] = complex<double> (0, 0);
ep[1] = complex<double> (-sqh, 0);
ep[2] = complex<double> (0, nst * sqh);
ep[3] = complex<double> (0, 0);
}
else
{
ep[0] = complex<double> (0, 0);
ep[3] = complex<double> (pt/pp * sqh, 0);
if(pt != 0)
{
pzpt = p[3]/(pp * pt) * sqh;
ep[1] = complex<double> (-p[1] * pzpt, -nst * p[2]/pt * sqh);
ep[2] = complex<double> (-p[2] * pzpt, nst * p[1]/pt * sqh);
}
else
{
ep[1] = complex<double> (-sqh, 0);
ep[2] = complex<double> (0, nst * Sgn(sqh, p[3]));
}
}
}
// construct eps-
if(nhel <= 0)
{
if(pp == 0)
{
em[0] = complex<double> (0, 0);
em[1] = complex<double> (sqh, 0);
em[2] = complex<double> (0, nst * sqh);
em[3] = complex<double> (0, 0);
}
else
{
em[0] = complex<double> (0, 0);
em[3] = complex<double> (-pt/pp * sqh, 0);
if(pt != 0)
{
pzpt = -p[3]/(pp * pt) * sqh;
em[1] = complex<double> (-p[1] * pzpt, -nst * p[2]/pt * sqh);
em[2] = complex<double> (-p[2] * pzpt, nst * p[1]/pt * sqh);
}
else
{
em[1] = complex<double> (sqh, 0);
em[2] = complex<double> (0, nst * Sgn(sqh, p[3]));
}
}
}
// construct eps0
if(std::labs(nhel) <= 1)
{
if(pp == 0)
{
e0[0] = complex<double> (0, 0);
e0[1] = complex<double> (0, 0);
e0[2] = complex<double> (0, 0);
e0[3] = complex<double> (1, 0);
}
else
{
emp = p[0]/(tmass * pp);
e0[0] = complex<double> (pp/tmass, 0);
e0[3] = complex<double> (p[3] * emp, 0);
if(pt != 0)
{
e0[1] = complex<double> (p[1] * emp, 0);
e0[2] = complex<double> (p[2] * emp, 0);
}
else
{
e0[1] = complex<double> (0, 0);
e0[2] = complex<double> (0, 0);
}
}
}
if(nhel == 2)
{
for(j = 0; j < 4; j++ )
{
for(i = 0; i < 4; i++ )
ft[i][j] = ep[i] * ep[j];
}
}
else if(nhel == -2)
{
for(j = 0; j < 4; j++ )
{
for(i = 0; i < 4; i++ )
ft[i][j] = em[i] * em[j];
}
}
else if(tmass == 0)
{
for(j = 0; j < 4; j++ )
{
for(i = 0; i < 4; i++ )
ft[i][j] = 0;
}
}
else if(tmass != 0)
{
if(nhel == 1)
{
for(j = 0; j < 4; j++ )
{
for(i = 0; i < 4; i++ )
ft[i][j] = sqh * (ep[i] * e0[j] + e0[i] * ep[j]);
}
}
else if(nhel == 0)
{
for(j = 0; j < 4; j++ )
{
for(i = 0; i < 4; i++ )
ft[i][j] = sqs * (ep[i] * em[j] + em[i] * ep[j]
+ 2.0 * e0[i] * e0[j]);
}
}
else if(nhel == -1)
{
for(j = 0; j < 4; j++ )
{
for(i = 0; i < 4; i++ )
ft[i][j] = sqh * (em[i] * e0[j] + e0[i] * em[j]);
}
}
else
{
std::cerr << "Invalid helicity in txxxxx.\n";
std::exit(1);
}
}
tc[0] = ft[4][0];
tc[1] = ft[5][0];
for(j = 0; j < 4; j++ )
{
for(i = 0; i < 4; i++ )
tc[j * 4 + i + 2] = ft[j][i];
}
}
void vxxxxx(double p[4], double vmass, int nhel, int nsv, complex<double> vc[6])
{
double hel, hel0, pt, pt2, pp, pzpt, emp, sqh;
int nsvahl;
sqh = sqrt(0.5);
hel = double(nhel);
nsvahl = nsv * std::abs(hel);
pt2 = (p[1] * p[1]) + (p[2] * p[2]);
pp = min(p[0], sqrt(pt2 + (p[3] * p[3])));
pt = min(pp, sqrt(pt2));
vc[0] = complex<double> (p[0] * nsv, p[3] * nsv);
vc[1] = complex<double> (p[1] * nsv, p[2] * nsv);
if (vmass != 0.0)
{
hel0 = 1.0 - std::abs(hel);
if(pp == 0.0)
{
vc[2] = complex<double> (0.0, 0.0);
vc[3] = complex<double> (-hel * sqh, 0.0);
vc[4] = complex<double> (0.0, nsvahl * sqh);
vc[5] = complex<double> (hel0, 0.0);
}
else
{
emp = p[0]/(vmass * pp);
vc[2] = complex<double> (hel0 * pp/vmass, 0.0);
vc[5] = complex<double> (hel0 * p[3] * emp + hel * pt/pp * sqh, 0.0);
if (pt != 0.0)
{
pzpt = p[3]/(pp * pt) * sqh * hel;
vc[3] = complex<double> (hel0 * p[1] * emp - p[1] * pzpt, -nsvahl *
p[2]/pt * sqh);
vc[4] = complex<double> (hel0 * p[2] * emp - p[2] * pzpt, nsvahl *
p[1]/pt * sqh);
}
else
{
vc[3] = complex<double> (-hel * sqh, 0.0);
vc[4] = complex<double> (0.0, nsvahl * Sgn(sqh, p[3]));
}
}
}
else
{
pp = p[0];
pt = sqrt((p[1] * p[1]) + (p[2] * p[2]));
vc[2] = complex<double> (0.0, 0.0);
vc[5] = complex<double> (hel * pt/pp * sqh, 0.0);
if (pt != 0.0)
{
pzpt = p[3]/(pp * pt) * sqh * hel;
vc[3] = complex<double> (-p[1] * pzpt, -nsv * p[2]/pt * sqh);
vc[4] = complex<double> (-p[2] * pzpt, nsv * p[1]/pt * sqh);
}
else
{
vc[3] = complex<double> (-hel * sqh, 0.0);
vc[4] = complex<double> (0.0, nsv * Sgn(sqh, p[3]));
}
}
return;
}
void sxxxxx(double p[4], int nss, complex<double> sc[3])
{
sc[2] = complex<double> (1.00, 0.00);
sc[0] = complex<double> (p[0] * nss, p[3] * nss);
sc[1] = complex<double> (p[1] * nss, p[2] * nss);
return;
}
void oxxxxx(double p[4], double fmass, int nhel, int nsf, complex<double> fo[6])
{
complex<double> chi[2];
double sf[2], sfomeg[2], omega[2], pp, pp3, sqp0p3, sqm[2];
int nh, ip, im;
fo[0] = complex<double> (p[0] * nsf, p[3] * nsf);
fo[1] = complex<double> (p[1] * nsf, p[2] * nsf);
nh = nhel * nsf;
if (fmass != 0.000)
{
pp = min(p[0], sqrt((p[1] * p[1]) + (p[2] * p[2]) + (p[3] * p[3])));
if (pp == 0.000)
{
sqm[0] = sqrt(std::abs(fmass));
sqm[1] = Sgn(sqm[0], fmass);
ip = -((1 - nh)/2) * nhel;
im = (1 + nh)/2 * nhel;
fo[2] = im * sqm[std::abs(ip)];
fo[3] = ip * nsf * sqm[std::abs(ip)];
fo[4] = im * nsf * sqm[std::abs(im)];
fo[5] = ip * sqm[std::abs(im)];
}
else
{
pp = min(p[0], sqrt((p[1] * p[1]) + (p[2] * p[2]) + (p[3] * p[3])));
sf[0] = double(1 + nsf + (1 - nsf) * nh) * 0.5;
sf[1] = double(1 + nsf - (1 - nsf) * nh) * 0.5;
omega[0] = sqrt(p[0] + pp);
omega[1] = fmass/omega[0];
ip = (1 + nh)/2;
im = (1 - nh)/2;
sfomeg[0] = sf[0] * omega[ip];
sfomeg[1] = sf[1] * omega[im];
pp3 = max(pp + p[3], 0.00);
chi[0] = complex<double> (sqrt(pp3 * 0.5/pp), 0.00);
if (pp3 == 0.00)
{
chi[1] = complex<double> (-nh, 0.00);
}
else
{
chi[1] = complex<double> (nh * p[1], -p[2])/sqrt(2.0 * pp * pp3);
}
fo[2] = sfomeg[1] * chi[im];
fo[3] = sfomeg[1] * chi[ip];
fo[4] = sfomeg[0] * chi[im];
fo[5] = sfomeg[0] * chi[ip];
}
}
else
{
if((p[1] == 0.00) and (p[2] == 0.00) and (p[3] < 0.00))
{
sqp0p3 = 0.00;
}
else
{
sqp0p3 = sqrt(max(p[0] + p[3], 0.00)) * nsf;
}
chi[0] = complex<double> (sqp0p3, 0.00);
if(sqp0p3 == 0.000)
{
chi[1] = complex<double> (-nhel, 0.00) * sqrt(2.0 * p[0]);
}
else
{
chi[1] = complex<double> (nh * p[1], -p[2])/sqp0p3;
}
if(nh == 1)
{
fo[2] = chi[0];
fo[3] = chi[1];
fo[4] = complex<double> (0.00, 0.00);
fo[5] = complex<double> (0.00, 0.00);
}
else
{
fo[2] = complex<double> (0.00, 0.00);
fo[3] = complex<double> (0.00, 0.00);
fo[4] = chi[1];
fo[5] = chi[0];
}
}
return;
}
void FFV1P0_3(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> COUP, double M3, double W3, std::complex<double> V3[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
double P3[4];
std::complex<double> denom;
V3[0] = +F1[0] + F2[0];
V3[1] = +F1[1] + F2[1];
P3[0] = -V3[0].real();
P3[1] = -V3[1].real();
P3[2] = -V3[1].imag();
P3[3] = -V3[0].imag();
denom = COUP/((P3[0] * P3[0]) - (P3[1] * P3[1]) - (P3[2] * P3[2]) - (P3[3] *
P3[3]) - M3 * (M3 - cI * W3));
V3[2] = denom * (-cI) * (F1[2] * F2[4] + F1[3] * F2[5] + F1[4] * F2[2] +
F1[5] * F2[3]);
V3[3] = denom * (-cI) * (F1[4] * F2[3] + F1[5] * F2[2] - F1[2] * F2[5] -
F1[3] * F2[4]);
V3[4] = denom * (-cI) * (-cI * (F1[2] * F2[5] + F1[5] * F2[2]) + cI * (F1[3]
* F2[4] + F1[4] * F2[3]));
V3[5] = denom * (-cI) * (F1[3] * F2[5] + F1[4] * F2[2] - F1[2] * F2[4] -
F1[5] * F2[3]);
}
void FFV2_2(std::complex<double> F1[], std::complex<double> V3[],
std::complex<double> COUP, double M2, double W2, std::complex<double> F2[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
double P2[4];
std::complex<double> denom;
F2[0] = +F1[0] + V3[0];
F2[1] = +F1[1] + V3[1];
P2[0] = -F2[0].real();
P2[1] = -F2[1].real();
P2[2] = -F2[1].imag();
P2[3] = -F2[0].imag();
denom = COUP/((P2[0] * P2[0]) - (P2[1] * P2[1]) - (P2[2] * P2[2]) - (P2[3] *
P2[3]) - M2 * (M2 - cI * W2));
F2[2] = denom * cI * (F1[2] * (P2[0] * (V3[2] + V3[5]) + (P2[1] * (-1.) *
(V3[3] + cI * (V3[4])) + (P2[2] * (+cI * (V3[3]) - V3[4]) - P2[3] *
(V3[2] + V3[5])))) + F1[3] * (P2[0] * (V3[3] - cI * (V3[4])) + (P2[1] *
(V3[5] - V3[2]) + (P2[2] * (-cI * (V3[5]) + cI * (V3[2])) + P2[3] * (+cI
* (V3[4]) - V3[3])))));
F2[3] = denom * cI * (F1[2] * (P2[0] * (V3[3] + cI * (V3[4])) + (P2[1] *
(-1.) * (V3[2] + V3[5]) + (P2[2] * (-1.) * (+cI * (V3[2] + V3[5])) +
P2[3] * (V3[3] + cI * (V3[4]))))) + F1[3] * (P2[0] * (V3[2] - V3[5]) +
(P2[1] * (+cI * (V3[4]) - V3[3]) + (P2[2] * (-1.) * (V3[4] + cI *
(V3[3])) + P2[3] * (V3[2] - V3[5])))));
F2[4] = denom * - cI * M2 * (F1[2] * (-1.) * (V3[2] + V3[5]) + F1[3] * (+cI *
(V3[4]) - V3[3]));
F2[5] = denom * cI * M2 * (F1[2] * (V3[3] + cI * (V3[4])) + F1[3] * (V3[2] -
V3[5]));
}
void FFV2_5_2(std::complex<double> F1[], std::complex<double> V3[],
std::complex<double> COUP1, std::complex<double> COUP2, double M2, double
W2, std::complex<double> F2[])
{
- static std::complex<double> cI = std::complex<double> (0., 1.);
- std::complex<double> Ftmp[6];
- double P2[4];
+ std::complex<double> Ftmp[6];
std::complex<double> denom;
int i;
FFV2_2(F1, V3, COUP1, M2, W2, F2);
FFV5_2(F1, V3, COUP2, M2, W2, Ftmp);
i = 2;
while (i < 6)
{
F2[i] = F2[i] + Ftmp[i];
i++;
}
}
void FFV1_2(std::complex<double> F1[], std::complex<double> V3[],
std::complex<double> COUP, double M2, double W2, std::complex<double> F2[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
double P2[4];
std::complex<double> denom;
F2[0] = +F1[0] + V3[0];
F2[1] = +F1[1] + V3[1];
P2[0] = -F2[0].real();
P2[1] = -F2[1].real();
P2[2] = -F2[1].imag();
P2[3] = -F2[0].imag();
denom = COUP/((P2[0] * P2[0]) - (P2[1] * P2[1]) - (P2[2] * P2[2]) - (P2[3] *
P2[3]) - M2 * (M2 - cI * W2));
F2[2] = denom * cI * (F1[2] * (P2[0] * (V3[2] + V3[5]) + (P2[1] * (-1.) *
(V3[3] + cI * (V3[4])) + (P2[2] * (+cI * (V3[3]) - V3[4]) - P2[3] *
(V3[2] + V3[5])))) + (F1[3] * (P2[0] * (V3[3] - cI * (V3[4])) + (P2[1] *
(V3[5] - V3[2]) + (P2[2] * (-cI * (V3[5]) + cI * (V3[2])) + P2[3] * (+cI
* (V3[4]) - V3[3])))) + M2 * (F1[4] * (V3[2] - V3[5]) + F1[5] * (+cI *
(V3[4]) - V3[3]))));
F2[3] = denom * (-cI) * (F1[2] * (P2[0] * (-1.) * (V3[3] + cI * (V3[4])) +
(P2[1] * (V3[2] + V3[5]) + (P2[2] * (+cI * (V3[2] + V3[5])) - P2[3] *
(V3[3] + cI * (V3[4]))))) + (F1[3] * (P2[0] * (V3[5] - V3[2]) + (P2[1] *
(V3[3] - cI * (V3[4])) + (P2[2] * (V3[4] + cI * (V3[3])) + P2[3] * (V3[5]
- V3[2])))) + M2 * (F1[4] * (V3[3] + cI * (V3[4])) - F1[5] * (V3[2] +
V3[5]))));
F2[4] = denom * (-cI) * (F1[4] * (P2[0] * (V3[5] - V3[2]) + (P2[1] * (V3[3] +
cI * (V3[4])) + (P2[2] * (V3[4] - cI * (V3[3])) + P2[3] * (V3[5] -
V3[2])))) + (F1[5] * (P2[0] * (V3[3] - cI * (V3[4])) + (P2[1] * (-1.) *
(V3[2] + V3[5]) + (P2[2] * (+cI * (V3[2] + V3[5])) + P2[3] * (V3[3] - cI
* (V3[4]))))) + M2 * (F1[2] * (-1.) * (V3[2] + V3[5]) + F1[3] * (+cI *
(V3[4]) - V3[3]))));
F2[5] = denom * cI * (F1[4] * (P2[0] * (-1.) * (V3[3] + cI * (V3[4])) +
(P2[1] * (V3[2] - V3[5]) + (P2[2] * (-cI * (V3[5]) + cI * (V3[2])) +
P2[3] * (V3[3] + cI * (V3[4]))))) + (F1[5] * (P2[0] * (V3[2] + V3[5]) +
(P2[1] * (+cI * (V3[4]) - V3[3]) + (P2[2] * (-1.) * (V3[4] + cI *
(V3[3])) - P2[3] * (V3[2] + V3[5])))) + M2 * (F1[2] * (V3[3] + cI *
(V3[4])) + F1[3] * (V3[2] - V3[5]))));
}
void FFV2_0(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> V3[], std::complex<double> COUP, std::complex<double>
& vertex)
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP9;
TMP9 = (F1[2] * (F2[4] * (V3[2] + V3[5]) + F2[5] * (V3[3] + cI * (V3[4]))) +
F1[3] * (F2[4] * (V3[3] - cI * (V3[4])) + F2[5] * (V3[2] - V3[5])));
vertex = COUP * - cI * TMP9;
}
void FFV2_5_0(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> V3[], std::complex<double> COUP1, std::complex<double>
COUP2, std::complex<double> & vertex)
{
- static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> tmp;
FFV2_0(F1, F2, V3, COUP1, vertex);
FFV5_0(F1, F2, V3, COUP2, tmp);
vertex = vertex + tmp;
}
void FFV5_1(std::complex<double> F2[], std::complex<double> V3[],
std::complex<double> COUP, double M1, double W1, std::complex<double> F1[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
double P1[4];
std::complex<double> denom;
F1[0] = +F2[0] + V3[0];
F1[1] = +F2[1] + V3[1];
P1[0] = -F1[0].real();
P1[1] = -F1[1].real();
P1[2] = -F1[1].imag();
P1[3] = -F1[0].imag();
denom = COUP/((P1[0] * P1[0]) - (P1[1] * P1[1]) - (P1[2] * P1[2]) - (P1[3] *
P1[3]) - M1 * (M1 - cI * W1));
F1[2] = denom * 4. * cI * (F2[2] * (P1[0] * (V3[5] - V3[2]) + (P1[1] * (V3[3]
- cI * (V3[4])) + (P1[2] * (V3[4] + cI * (V3[3])) + P1[3] * (V3[5] -
V3[2])))) + (+1./4. * (M1 * (F2[5] * (V3[3] + cI * (V3[4])) + 4. * (F2[4]
* 1./4. * (V3[2] + V3[5])))) + F2[3] * (P1[0] * (V3[3] + cI * (V3[4])) +
(P1[1] * (-1.) * (V3[2] + V3[5]) + (P1[2] * (-1.) * (+cI * (V3[2] +
V3[5])) + P1[3] * (V3[3] + cI * (V3[4])))))));
F1[3] = denom * 4. * cI * (F2[2] * (P1[0] * (V3[3] - cI * (V3[4])) + (P1[1] *
(V3[5] - V3[2]) + (P1[2] * (-cI * (V3[5]) + cI * (V3[2])) + P1[3] * (+cI
* (V3[4]) - V3[3])))) + (+1./4. * (M1 * (F2[5] * (V3[2] - V3[5]) + 4. *
(F2[4] * 1./4. * (V3[3] - cI * (V3[4]))))) + F2[3] * (P1[0] * (-1.) *
(V3[2] + V3[5]) + (P1[1] * (V3[3] + cI * (V3[4])) + (P1[2] * (V3[4] - cI
* (V3[3])) + P1[3] * (V3[2] + V3[5]))))));
F1[4] = denom * (-cI) * (F2[4] * (P1[0] * (V3[2] + V3[5]) + (P1[1] * (+cI *
(V3[4]) - V3[3]) + (P1[2] * (-1.) * (V3[4] + cI * (V3[3])) - P1[3] *
(V3[2] + V3[5])))) + (F2[5] * (P1[0] * (V3[3] + cI * (V3[4])) + (P1[1] *
(V3[5] - V3[2]) + (P1[2] * (-cI * (V3[2]) + cI * (V3[5])) - P1[3] *
(V3[3] + cI * (V3[4]))))) + M1 * (F2[2] * 4. * (V3[5] - V3[2]) + 4. *
(F2[3] * (V3[3] + cI * (V3[4]))))));
F1[5] = denom * cI * (F2[4] * (P1[0] * (+cI * (V3[4]) - V3[3]) + (P1[1] *
(V3[2] + V3[5]) + (P1[2] * (-1.) * (+cI * (V3[2] + V3[5])) + P1[3] * (+cI
* (V3[4]) - V3[3])))) + (F2[5] * (P1[0] * (V3[5] - V3[2]) + (P1[1] *
(V3[3] + cI * (V3[4])) + (P1[2] * (V3[4] - cI * (V3[3])) + P1[3] * (V3[5]
- V3[2])))) + M1 * (F2[2] * 4. * (+cI * (V3[4]) - V3[3]) + 4. * (F2[3] *
(V3[2] + V3[5])))));
}
void FFV1_0(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> V3[], std::complex<double> COUP, std::complex<double>
& vertex)
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP13;
TMP13 = (F1[2] * (F2[4] * (V3[2] + V3[5]) + F2[5] * (V3[3] + cI * (V3[4]))) +
(F1[3] * (F2[4] * (V3[3] - cI * (V3[4])) + F2[5] * (V3[2] - V3[5])) +
(F1[4] * (F2[2] * (V3[2] - V3[5]) - F2[3] * (V3[3] + cI * (V3[4]))) +
F1[5] * (F2[2] * (+cI * (V3[4]) - V3[3]) + F2[3] * (V3[2] + V3[5])))));
vertex = COUP * - cI * TMP13;
}
void VVVV4P0_1(std::complex<double> V2[], std::complex<double> V3[],
std::complex<double> V4[], std::complex<double> COUP, double M1, double W1,
std::complex<double> V1[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP12;
std::complex<double> TMP11;
double P1[4];
std::complex<double> denom;
V1[0] = +V2[0] + V3[0] + V4[0];
V1[1] = +V2[1] + V3[1] + V4[1];
P1[0] = -V1[0].real();
P1[1] = -V1[1].real();
P1[2] = -V1[1].imag();
P1[3] = -V1[0].imag();
TMP11 = (V2[2] * V4[2] - V2[3] * V4[3] - V2[4] * V4[4] - V2[5] * V4[5]);
TMP12 = (V3[2] * V4[2] - V3[3] * V4[3] - V3[4] * V4[4] - V3[5] * V4[5]);
denom = COUP/((P1[0] * P1[0]) - (P1[1] * P1[1]) - (P1[2] * P1[2]) - (P1[3] *
P1[3]) - M1 * (M1 - cI * W1));
V1[2] = denom * (-cI * (V3[2] * TMP11) + cI * (V2[2] * TMP12));
V1[3] = denom * (-cI * (V3[3] * TMP11) + cI * (V2[3] * TMP12));
V1[4] = denom * (-cI * (V3[4] * TMP11) + cI * (V2[4] * TMP12));
V1[5] = denom * (-cI * (V3[5] * TMP11) + cI * (V2[5] * TMP12));
}
void VVVV3P0_1(std::complex<double> V2[], std::complex<double> V3[],
std::complex<double> V4[], std::complex<double> COUP, double M1, double W1,
std::complex<double> V1[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP12;
double P1[4];
std::complex<double> TMP6;
std::complex<double> denom;
V1[0] = +V2[0] + V3[0] + V4[0];
V1[1] = +V2[1] + V3[1] + V4[1];
P1[0] = -V1[0].real();
P1[1] = -V1[1].real();
P1[2] = -V1[1].imag();
P1[3] = -V1[0].imag();
TMP6 = (V3[2] * V2[2] - V3[3] * V2[3] - V3[4] * V2[4] - V3[5] * V2[5]);
TMP12 = (V3[2] * V4[2] - V3[3] * V4[3] - V3[4] * V4[4] - V3[5] * V4[5]);
denom = COUP/((P1[0] * P1[0]) - (P1[1] * P1[1]) - (P1[2] * P1[2]) - (P1[3] *
P1[3]) - M1 * (M1 - cI * W1));
V1[2] = denom * (-cI * (TMP6 * V4[2]) + cI * (V2[2] * TMP12));
V1[3] = denom * (-cI * (TMP6 * V4[3]) + cI * (V2[3] * TMP12));
V1[4] = denom * (-cI * (TMP6 * V4[4]) + cI * (V2[4] * TMP12));
V1[5] = denom * (-cI * (TMP6 * V4[5]) + cI * (V2[5] * TMP12));
}
void VVV1_0(std::complex<double> V1[], std::complex<double> V2[],
std::complex<double> V3[], std::complex<double> COUP, std::complex<double>
& vertex)
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP2;
std::complex<double> TMP1;
double P1[4];
std::complex<double> TMP0;
double P2[4];
std::complex<double> TMP7;
double P3[4];
std::complex<double> TMP6;
std::complex<double> TMP5;
std::complex<double> TMP4;
std::complex<double> TMP3;
std::complex<double> TMP8;
P1[0] = V1[0].real();
P1[1] = V1[1].real();
P1[2] = V1[1].imag();
P1[3] = V1[0].imag();
P2[0] = V2[0].real();
P2[1] = V2[1].real();
P2[2] = V2[1].imag();
P2[3] = V2[0].imag();
P3[0] = V3[0].real();
P3[1] = V3[1].real();
P3[2] = V3[1].imag();
P3[3] = V3[0].imag();
TMP8 = (V1[2] * P3[0] - V1[3] * P3[1] - V1[4] * P3[2] - V1[5] * P3[3]);
TMP5 = (V2[2] * P3[0] - V2[3] * P3[1] - V2[4] * P3[2] - V2[5] * P3[3]);
TMP4 = (P1[0] * V2[2] - P1[1] * V2[3] - P1[2] * V2[4] - P1[3] * V2[5]);
TMP7 = (V1[2] * P2[0] - V1[3] * P2[1] - V1[4] * P2[2] - V1[5] * P2[3]);
TMP6 = (V3[2] * V2[2] - V3[3] * V2[3] - V3[4] * V2[4] - V3[5] * V2[5]);
TMP1 = (V2[2] * V1[2] - V2[3] * V1[3] - V2[4] * V1[4] - V2[5] * V1[5]);
TMP0 = (V3[2] * P1[0] - V3[3] * P1[1] - V3[4] * P1[2] - V3[5] * P1[3]);
TMP3 = (V3[2] * V1[2] - V3[3] * V1[3] - V3[4] * V1[4] - V3[5] * V1[5]);
TMP2 = (V3[2] * P2[0] - V3[3] * P2[1] - V3[4] * P2[2] - V3[5] * P2[3]);
vertex = COUP * (TMP1 * (-cI * (TMP0) + cI * (TMP2)) + (TMP3 * (-cI * (TMP5)
+ cI * (TMP4)) + TMP6 * (-cI * (TMP7) + cI * (TMP8))));
}
void FFV2_3(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> COUP, double M3, double W3, std::complex<double> V3[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> denom;
std::complex<double> TMP10;
double P3[4];
double OM3;
OM3 = 0.;
if (M3 != 0.)
OM3 = 1./(M3 * M3);
V3[0] = +F1[0] + F2[0];
V3[1] = +F1[1] + F2[1];
P3[0] = -V3[0].real();
P3[1] = -V3[1].real();
P3[2] = -V3[1].imag();
P3[3] = -V3[0].imag();
TMP10 = (F1[2] * (F2[4] * (P3[0] + P3[3]) + F2[5] * (P3[1] + cI * (P3[2]))) +
F1[3] * (F2[4] * (P3[1] - cI * (P3[2])) + F2[5] * (P3[0] - P3[3])));
denom = COUP/((P3[0] * P3[0]) - (P3[1] * P3[1]) - (P3[2] * P3[2]) - (P3[3] *
P3[3]) - M3 * (M3 - cI * W3));
V3[2] = denom * (-cI) * (F1[2] * F2[4] + F1[3] * F2[5] - P3[0] * OM3 *
TMP10);
V3[3] = denom * (-cI) * (-F1[2] * F2[5] - F1[3] * F2[4] - P3[1] * OM3 *
TMP10);
V3[4] = denom * (-cI) * (-cI * (F1[2] * F2[5]) + cI * (F1[3] * F2[4]) - P3[2]
* OM3 * TMP10);
V3[5] = denom * (-cI) * (F1[3] * F2[5] - F1[2] * F2[4] - P3[3] * OM3 *
TMP10);
}
void FFV2_4_3(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> COUP1, std::complex<double> COUP2, double M3, double
W3, std::complex<double> V3[])
{
- static std::complex<double> cI = std::complex<double> (0., 1.);
- std::complex<double> denom;
- double P3[4];
- double OM3;
+ std::complex<double> denom;
int i;
std::complex<double> Vtmp[6];
FFV2_3(F1, F2, COUP1, M3, W3, V3);
FFV4_3(F1, F2, COUP2, M3, W3, Vtmp);
i = 2;
while (i < 6)
{
V3[i] = V3[i] + Vtmp[i];
i++;
}
}
void FFV5_2(std::complex<double> F1[], std::complex<double> V3[],
std::complex<double> COUP, double M2, double W2, std::complex<double> F2[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
double P2[4];
std::complex<double> denom;
F2[0] = +F1[0] + V3[0];
F2[1] = +F1[1] + V3[1];
P2[0] = -F2[0].real();
P2[1] = -F2[1].real();
P2[2] = -F2[1].imag();
P2[3] = -F2[0].imag();
denom = COUP/((P2[0] * P2[0]) - (P2[1] * P2[1]) - (P2[2] * P2[2]) - (P2[3] *
P2[3]) - M2 * (M2 - cI * W2));
F2[2] = denom * cI * (F1[2] * (P2[0] * (V3[2] + V3[5]) + (P2[1] * (-1.) *
(V3[3] + cI * (V3[4])) + (P2[2] * (+cI * (V3[3]) - V3[4]) - P2[3] *
(V3[2] + V3[5])))) + (F1[3] * (P2[0] * (V3[3] - cI * (V3[4])) + (P2[1] *
(V3[5] - V3[2]) + (P2[2] * (-cI * (V3[5]) + cI * (V3[2])) + P2[3] * (+cI
* (V3[4]) - V3[3])))) + M2 * (F1[4] * 4. * (V3[2] - V3[5]) + 4. * (F1[5]
* (+cI * (V3[4]) - V3[3])))));
F2[3] = denom * cI * (F1[2] * (P2[0] * (V3[3] + cI * (V3[4])) + (P2[1] *
(-1.) * (V3[2] + V3[5]) + (P2[2] * (-1.) * (+cI * (V3[2] + V3[5])) +
P2[3] * (V3[3] + cI * (V3[4]))))) + (F1[3] * (P2[0] * (V3[2] - V3[5]) +
(P2[1] * (+cI * (V3[4]) - V3[3]) + (P2[2] * (-1.) * (V3[4] + cI *
(V3[3])) + P2[3] * (V3[2] - V3[5])))) + M2 * (F1[4] * (-4.) * (V3[3] + cI
* (V3[4])) + 4. * (F1[5] * (V3[2] + V3[5])))));
F2[4] = denom * (-4. * cI) * (F1[4] * (P2[0] * (V3[5] - V3[2]) + (P2[1] *
(V3[3] + cI * (V3[4])) + (P2[2] * (V3[4] - cI * (V3[3])) + P2[3] * (V3[5]
- V3[2])))) + (+1./4. * (M2 * (F1[3] * (+cI * (V3[4]) - V3[3]) + 4. *
(F1[2] * (-1./4.) * (V3[2] + V3[5])))) + F1[5] * (P2[0] * (V3[3] - cI *
(V3[4])) + (P2[1] * (-1.) * (V3[2] + V3[5]) + (P2[2] * (+cI * (V3[2] +
V3[5])) + P2[3] * (V3[3] - cI * (V3[4])))))));
F2[5] = denom * (-4. * cI) * (F1[4] * (P2[0] * (V3[3] + cI * (V3[4])) +
(P2[1] * (V3[5] - V3[2]) + (P2[2] * (-cI * (V3[2]) + cI * (V3[5])) -
P2[3] * (V3[3] + cI * (V3[4]))))) + (+1./4. * (M2 * (F1[3] * (V3[5] -
V3[2]) + 4. * (F1[2] * (-1./4.) * (V3[3] + cI * (V3[4]))))) + F1[5] *
(P2[0] * (-1.) * (V3[2] + V3[5]) + (P2[1] * (V3[3] - cI * (V3[4])) +
(P2[2] * (V3[4] + cI * (V3[3])) + P2[3] * (V3[2] + V3[5]))))));
}
void FFV2_1(std::complex<double> F2[], std::complex<double> V3[],
std::complex<double> COUP, double M1, double W1, std::complex<double> F1[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
double P1[4];
std::complex<double> denom;
F1[0] = +F2[0] + V3[0];
F1[1] = +F2[1] + V3[1];
P1[0] = -F1[0].real();
P1[1] = -F1[1].real();
P1[2] = -F1[1].imag();
P1[3] = -F1[0].imag();
denom = COUP/((P1[0] * P1[0]) - (P1[1] * P1[1]) - (P1[2] * P1[2]) - (P1[3] *
P1[3]) - M1 * (M1 - cI * W1));
F1[2] = denom * cI * M1 * (F2[4] * (V3[2] + V3[5]) + F2[5] * (V3[3] + cI *
(V3[4])));
F1[3] = denom * - cI * M1 * (F2[4] * (+cI * (V3[4]) - V3[3]) + F2[5] * (V3[5]
- V3[2]));
F1[4] = denom * (-cI) * (F2[4] * (P1[0] * (V3[2] + V3[5]) + (P1[1] * (+cI *
(V3[4]) - V3[3]) + (P1[2] * (-1.) * (V3[4] + cI * (V3[3])) - P1[3] *
(V3[2] + V3[5])))) + F2[5] * (P1[0] * (V3[3] + cI * (V3[4])) + (P1[1] *
(V3[5] - V3[2]) + (P1[2] * (-cI * (V3[2]) + cI * (V3[5])) - P1[3] *
(V3[3] + cI * (V3[4]))))));
F1[5] = denom * (-cI) * (F2[4] * (P1[0] * (V3[3] - cI * (V3[4])) + (P1[1] *
(-1.) * (V3[2] + V3[5]) + (P1[2] * (+cI * (V3[2] + V3[5])) + P1[3] *
(V3[3] - cI * (V3[4]))))) + F2[5] * (P1[0] * (V3[2] - V3[5]) + (P1[1] *
(-1.) * (V3[3] + cI * (V3[4])) + (P1[2] * (+cI * (V3[3]) - V3[4]) + P1[3]
* (V3[2] - V3[5])))));
}
void FFV2_5_1(std::complex<double> F2[], std::complex<double> V3[],
std::complex<double> COUP1, std::complex<double> COUP2, double M1, double
W1, std::complex<double> F1[])
{
- static std::complex<double> cI = std::complex<double> (0., 1.);
- double P1[4];
std::complex<double> denom;
int i;
std::complex<double> Ftmp[6];
FFV2_1(F2, V3, COUP1, M1, W1, F1);
FFV5_1(F2, V3, COUP2, M1, W1, Ftmp);
i = 2;
while (i < 6)
{
F1[i] = F1[i] + Ftmp[i];
i++;
}
}
void FFV5_0(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> V3[], std::complex<double> COUP, std::complex<double>
& vertex)
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP15;
std::complex<double> TMP16;
TMP15 = (F1[2] * (F2[4] * (V3[2] + V3[5]) + F2[5] * (V3[3] + cI * (V3[4]))) +
F1[3] * (F2[4] * (V3[3] - cI * (V3[4])) + F2[5] * (V3[2] - V3[5])));
TMP16 = (F1[4] * (F2[2] * (V3[2] - V3[5]) - F2[3] * (V3[3] + cI * (V3[4]))) +
F1[5] * (F2[2] * (+cI * (V3[4]) - V3[3]) + F2[3] * (V3[2] + V3[5])));
vertex = COUP * (-1.) * (+cI * (TMP15) + 4. * cI * (TMP16));
}
void FFV1_1(std::complex<double> F2[], std::complex<double> V3[],
std::complex<double> COUP, double M1, double W1, std::complex<double> F1[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
double P1[4];
std::complex<double> denom;
F1[0] = +F2[0] + V3[0];
F1[1] = +F2[1] + V3[1];
P1[0] = -F1[0].real();
P1[1] = -F1[1].real();
P1[2] = -F1[1].imag();
P1[3] = -F1[0].imag();
denom = COUP/((P1[0] * P1[0]) - (P1[1] * P1[1]) - (P1[2] * P1[2]) - (P1[3] *
P1[3]) - M1 * (M1 - cI * W1));
F1[2] = denom * cI * (F2[2] * (P1[0] * (V3[5] - V3[2]) + (P1[1] * (V3[3] - cI
* (V3[4])) + (P1[2] * (V3[4] + cI * (V3[3])) + P1[3] * (V3[5] - V3[2]))))
+ (F2[3] * (P1[0] * (V3[3] + cI * (V3[4])) + (P1[1] * (-1.) * (V3[2] +
V3[5]) + (P1[2] * (-1.) * (+cI * (V3[2] + V3[5])) + P1[3] * (V3[3] + cI *
(V3[4]))))) + M1 * (F2[4] * (V3[2] + V3[5]) + F2[5] * (V3[3] + cI *
(V3[4])))));
F1[3] = denom * (-cI) * (F2[2] * (P1[0] * (+cI * (V3[4]) - V3[3]) + (P1[1] *
(V3[2] - V3[5]) + (P1[2] * (-cI * (V3[2]) + cI * (V3[5])) + P1[3] *
(V3[3] - cI * (V3[4]))))) + (F2[3] * (P1[0] * (V3[2] + V3[5]) + (P1[1] *
(-1.) * (V3[3] + cI * (V3[4])) + (P1[2] * (+cI * (V3[3]) - V3[4]) - P1[3]
* (V3[2] + V3[5])))) + M1 * (F2[4] * (+cI * (V3[4]) - V3[3]) + F2[5] *
(V3[5] - V3[2]))));
F1[4] = denom * (-cI) * (F2[4] * (P1[0] * (V3[2] + V3[5]) + (P1[1] * (+cI *
(V3[4]) - V3[3]) + (P1[2] * (-1.) * (V3[4] + cI * (V3[3])) - P1[3] *
(V3[2] + V3[5])))) + (F2[5] * (P1[0] * (V3[3] + cI * (V3[4])) + (P1[1] *
(V3[5] - V3[2]) + (P1[2] * (-cI * (V3[2]) + cI * (V3[5])) - P1[3] *
(V3[3] + cI * (V3[4]))))) + M1 * (F2[2] * (V3[5] - V3[2]) + F2[3] *
(V3[3] + cI * (V3[4])))));
F1[5] = denom * cI * (F2[4] * (P1[0] * (+cI * (V3[4]) - V3[3]) + (P1[1] *
(V3[2] + V3[5]) + (P1[2] * (-1.) * (+cI * (V3[2] + V3[5])) + P1[3] * (+cI
* (V3[4]) - V3[3])))) + (F2[5] * (P1[0] * (V3[5] - V3[2]) + (P1[1] *
(V3[3] + cI * (V3[4])) + (P1[2] * (V3[4] - cI * (V3[3])) + P1[3] * (V3[5]
- V3[2])))) + M1 * (F2[2] * (+cI * (V3[4]) - V3[3]) + F2[3] * (V3[2] +
V3[5]))));
}
void FFV4_3(std::complex<double> F1[], std::complex<double> F2[],
std::complex<double> COUP, double M3, double W3, std::complex<double> V3[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> denom;
std::complex<double> TMP10;
double P3[4];
double OM3;
std::complex<double> TMP14;
OM3 = 0.;
if (M3 != 0.)
OM3 = 1./(M3 * M3);
V3[0] = +F1[0] + F2[0];
V3[1] = +F1[1] + F2[1];
P3[0] = -V3[0].real();
P3[1] = -V3[1].real();
P3[2] = -V3[1].imag();
P3[3] = -V3[0].imag();
TMP14 = (F1[4] * (F2[2] * (P3[0] - P3[3]) - F2[3] * (P3[1] + cI * (P3[2]))) +
F1[5] * (F2[2] * (+cI * (P3[2]) - P3[1]) + F2[3] * (P3[0] + P3[3])));
TMP10 = (F1[2] * (F2[4] * (P3[0] + P3[3]) + F2[5] * (P3[1] + cI * (P3[2]))) +
F1[3] * (F2[4] * (P3[1] - cI * (P3[2])) + F2[5] * (P3[0] - P3[3])));
denom = COUP/((P3[0] * P3[0]) - (P3[1] * P3[1]) - (P3[2] * P3[2]) - (P3[3] *
P3[3]) - M3 * (M3 - cI * W3));
V3[2] = denom * (-2. * cI) * (OM3 * - 1./2. * P3[0] * (TMP10 + 2. * (TMP14))
+ (+1./2. * (F1[2] * F2[4] + F1[3] * F2[5]) + F1[4] * F2[2] + F1[5] *
F2[3]));
V3[3] = denom * (-2. * cI) * (OM3 * - 1./2. * P3[1] * (TMP10 + 2. * (TMP14))
+ (-1./2. * (F1[2] * F2[5] + F1[3] * F2[4]) + F1[4] * F2[3] + F1[5] *
F2[2]));
V3[4] = denom * 2. * cI * (OM3 * 1./2. * P3[2] * (TMP10 + 2. * (TMP14)) +
(+1./2. * cI * (F1[2] * F2[5]) - 1./2. * cI * (F1[3] * F2[4]) - cI *
(F1[4] * F2[3]) + cI * (F1[5] * F2[2])));
V3[5] = denom * 2. * cI * (OM3 * 1./2. * P3[3] * (TMP10 + 2. * (TMP14)) +
(+1./2. * (F1[2] * F2[4]) - 1./2. * (F1[3] * F2[5]) - F1[4] * F2[2] +
F1[5] * F2[3]));
}
void VVVV1P0_1(std::complex<double> V2[], std::complex<double> V3[],
std::complex<double> V4[], std::complex<double> COUP, double M1, double W1,
std::complex<double> V1[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP11;
double P1[4];
std::complex<double> TMP6;
std::complex<double> denom;
V1[0] = +V2[0] + V3[0] + V4[0];
V1[1] = +V2[1] + V3[1] + V4[1];
P1[0] = -V1[0].real();
P1[1] = -V1[1].real();
P1[2] = -V1[1].imag();
P1[3] = -V1[0].imag();
TMP6 = (V3[2] * V2[2] - V3[3] * V2[3] - V3[4] * V2[4] - V3[5] * V2[5]);
TMP11 = (V2[2] * V4[2] - V2[3] * V4[3] - V2[4] * V4[4] - V2[5] * V4[5]);
denom = COUP/((P1[0] * P1[0]) - (P1[1] * P1[1]) - (P1[2] * P1[2]) - (P1[3] *
P1[3]) - M1 * (M1 - cI * W1));
V1[2] = denom * (-cI * (TMP6 * V4[2]) + cI * (V3[2] * TMP11));
V1[3] = denom * (-cI * (TMP6 * V4[3]) + cI * (V3[3] * TMP11));
V1[4] = denom * (-cI * (TMP6 * V4[4]) + cI * (V3[4] * TMP11));
V1[5] = denom * (-cI * (TMP6 * V4[5]) + cI * (V3[5] * TMP11));
}
void VVV1P0_1(std::complex<double> V2[], std::complex<double> V3[],
std::complex<double> COUP, double M1, double W1, std::complex<double> V1[])
{
static std::complex<double> cI = std::complex<double> (0., 1.);
std::complex<double> TMP2;
double P1[4];
std::complex<double> TMP0;
double P2[4];
double P3[4];
std::complex<double> TMP6;
std::complex<double> TMP5;
std::complex<double> TMP4;
std::complex<double> denom;
P2[0] = V2[0].real();
P2[1] = V2[1].real();
P2[2] = V2[1].imag();
P2[3] = V2[0].imag();
P3[0] = V3[0].real();
P3[1] = V3[1].real();
P3[2] = V3[1].imag();
P3[3] = V3[0].imag();
V1[0] = +V2[0] + V3[0];
V1[1] = +V2[1] + V3[1];
P1[0] = -V1[0].real();
P1[1] = -V1[1].real();
P1[2] = -V1[1].imag();
P1[3] = -V1[0].imag();
TMP5 = (V2[2] * P3[0] - V2[3] * P3[1] - V2[4] * P3[2] - V2[5] * P3[3]);
TMP4 = (P1[0] * V2[2] - P1[1] * V2[3] - P1[2] * V2[4] - P1[3] * V2[5]);
TMP6 = (V3[2] * V2[2] - V3[3] * V2[3] - V3[4] * V2[4] - V3[5] * V2[5]);
TMP0 = (V3[2] * P1[0] - V3[3] * P1[1] - V3[4] * P1[2] - V3[5] * P1[3]);
TMP2 = (V3[2] * P2[0] - V3[3] * P2[1] - V3[4] * P2[2] - V3[5] * P2[3]);
denom = COUP/((P1[0] * P1[0]) - (P1[1] * P1[1]) - (P1[2] * P1[2]) - (P1[3] *
P1[3]) - M1 * (M1 - cI * W1));
V1[2] = denom * (TMP6 * (-cI * (P2[0]) + cI * (P3[0])) + (V2[2] * (-cI *
(TMP0) + cI * (TMP2)) + V3[2] * (-cI * (TMP5) + cI * (TMP4))));
V1[3] = denom * (TMP6 * (-cI * (P2[1]) + cI * (P3[1])) + (V2[3] * (-cI *
(TMP0) + cI * (TMP2)) + V3[3] * (-cI * (TMP5) + cI * (TMP4))));
V1[4] = denom * (TMP6 * (-cI * (P2[2]) + cI * (P3[2])) + (V2[4] * (-cI *
(TMP0) + cI * (TMP2)) + V3[4] * (-cI * (TMP5) + cI * (TMP4))));
V1[5] = denom * (TMP6 * (-cI * (P2[3]) + cI * (P3[3])) + (V2[5] * (-cI *
(TMP0) + cI * (TMP2)) + V3[5] * (-cI * (TMP5) + cI * (TMP4))));
}
} // end namespace MG5_sm_COLOREA
diff --git a/Shower/Dipole/Colorea/read_slha_COLOREA.cc b/Shower/Dipole/Colorea/read_slha_COLOREA.cc
--- a/Shower/Dipole/Colorea/read_slha_COLOREA.cc
+++ b/Shower/Dipole/Colorea/read_slha_COLOREA.cc
@@ -1,144 +1,144 @@
#include <algorithm>
#include <iostream>
#include <fstream>
#include "read_slha_COLOREA.h"
void SLHABlock_COLOREA::set_entry(std::vector<int> indices, double value)
{
if (_entries.size() == 0)
_indices = indices.size();
else if(indices.size() != _indices)
throw "Wrong number of indices in set_entry";
_entries[indices] = value;
}
double SLHABlock_COLOREA::get_entry(std::vector<int> indices, double def_val)
{
if (_entries.find(indices) == _entries.end()){
std::cout << "Warning: No such entry in " << _name << ", using default value "
<< def_val << std::endl;
return def_val;
}
return _entries[indices];
}
void SLHAReader_COLOREA::read_slha_file(std::string file_name)
{
std::ifstream param_card;
param_card.open(file_name.c_str(), std::ifstream::in);
if(!param_card.good())
throw "Error while opening param card";
std::cout << "\nColorea: Opened slha file " << file_name << " for reading" << std::endl;
char buf[200];
std::string line;
std::string block("");
while(param_card.good()){
param_card.getline(buf, 200);
line = buf;
// Change to lowercase
transform(line.begin(), line.end(), line.begin(), (int(*)(int)) tolower);
if(line != "" && line[0] != '#'){
if(block != ""){
// Look for double index blocks
double dindex1, dindex2;
double value;
std::stringstream linestr2(line);
if (linestr2 >> dindex1 >> dindex2 >> value &&
dindex1 == int(dindex1) and dindex2 == int(dindex2))
{
std::vector<int> indices;
indices.push_back(int(dindex1));
indices.push_back(int(dindex2));
set_block_entry(block, indices, value);
// Done with this line, read next
continue;
}
std::stringstream linestr1(line);
// Look for single index blocks
if(linestr1 >> dindex1 >> value && dindex1 == int(dindex1))
{
std::vector<int> indices;
indices.push_back(int(dindex1));
set_block_entry(block, indices, value);
// Done with this line, read next
continue;
}
}
// Look for block
if(line.find("block ") != line.npos){
line = line.substr(6);
// Get rid of spaces between block and block name
while (line[0] == ' ')
line = line.substr(1);
// Now find end of block name
- int space_pos = line.find(' ');
+ std::string::size_type space_pos = line.find(' ');
if(space_pos != line.npos)
line = line.substr(0, space_pos);
block = line;
continue;
}
// Look for decay
if(line.find("decay ") == 0){
line = line.substr(6);
block = "";
std::stringstream linestr(line);
int pdg_code;
double value;
if(linestr >> pdg_code >> value)
set_block_entry("decay", pdg_code, value);
else
std::cout << "Warning: Wrong format for decay block " << line << std::endl;
continue;
}
}
}
if (_blocks.size() == 0)
throw "No information read from SLHA card";
param_card.close();
}
double SLHAReader_COLOREA::get_block_entry(std::string block_name, std::vector<int> indices,
double def_val)
{
if (_blocks.find(block_name) == _blocks.end()){
std::cout << "No such block " << block_name << ", using default value "
<< def_val << std::endl;
return def_val;
}
return _blocks[block_name].get_entry(indices);
}
double SLHAReader_COLOREA::get_block_entry(std::string block_name, int index,
double def_val)
{
std::vector<int> indices;
indices.push_back(index);
return get_block_entry(block_name, indices, def_val);
}
void SLHAReader_COLOREA::set_block_entry(std::string block_name, std::vector<int> indices,
double value)
{
if (_blocks.find(block_name) == _blocks.end()){
SLHABlock_COLOREA block(block_name);
_blocks[block_name] = block;
}
_blocks[block_name].set_entry(indices, value);
/* cout << "Set block " << block_name << " entry ";
for (int i=0;i < indices.size();i++)
cout << indices[i] << " ";
cout << "to " << _blocks[block_name].get_entry(indices) << endl;*/
}
void SLHAReader_COLOREA::set_block_entry(std::string block_name, int index,
double value)
{
std::vector<int> indices;
indices.push_back(index);
set_block_entry(block_name, indices, value);
}
diff --git a/Shower/Dipole/DipoleShowerHandler.cc b/Shower/Dipole/DipoleShowerHandler.cc
--- a/Shower/Dipole/DipoleShowerHandler.cc
+++ b/Shower/Dipole/DipoleShowerHandler.cc
@@ -1,1384 +1,1384 @@
// -*- C++ -*-
//
// DipoleShowerHandler.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the DipoleShowerHandler class.
//
#include <config.h>
#include "DipoleShowerHandler.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
// include theses to have complete types
#include "Herwig/PDF/MPIPDF.h"
#include "Herwig/PDF/MinBiasPDF.h"
#include "Herwig/PDF/HwRemDecayer.h"
#include "Herwig/Shower/Dipole/Utility/DipolePartonSplitter.h"
#include "Herwig/MatrixElement/Matchbox/Base/MergerBase.h"
#include "Herwig/MatrixElement/Matchbox/Base/SubtractedME.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
#include <queue>
using namespace Herwig;
bool DipoleShowerHandler::firstWarn = true;
DipoleShowerHandler::DipoleShowerHandler() :
ShowerHandler(), chainOrderVetoScales(true),
nEmissions(0), discardNoEmissions(false), firstMCatNLOEmission(false),
thePowhegDecayEmission(true),
realignmentScheme(0),
verbosity(0), printEvent(0), nTries(0),
didRadiate(false), didRealign(false),
theRenormalizationScaleFreeze(1.*GeV),
theFactorizationScaleFreeze(2.*GeV), theDoCompensate(false),
theFreezeGrid(500000), theDetuning(1.0),
maxPt(ZERO), muPt(ZERO),
theInputColouredOffShellInShower(),
theZBoundaries(1) {}
DipoleShowerHandler::~DipoleShowerHandler() {}
IBPtr DipoleShowerHandler::clone() const {
return new_ptr(*this);
}
IBPtr DipoleShowerHandler::fullclone() const {
return new_ptr(*this);
}
void DipoleShowerHandler::cascade(tPVector ) {
throw Exception()
<< "DipoleShowerHandler: Dipoleshower not implemented as second shower."
<< "Check your setup or contact Herwig authors."
<< Exception::runerror;
}
tPPair DipoleShowerHandler::cascade(tSubProPtr sub, XCombPtr,
Energy optHardPt, Energy optCutoff) {
useMe();
prepareCascade(sub);
resetWeights();
if ( !doFSR() && ! doISR() )
return sub->incoming();
eventRecord().clear();
eventRecord().prepare(sub, dynamic_ptr_cast<tStdXCombPtr>(lastXCombPtr()), newStep(), pdfs(),
ShowerHandler::currentHandler()->generator()->currentEvent()->incoming(),
firstInteraction(), offShellPartons());
if ( eventRecord().outgoing().empty() && !doISR() )
return sub->incoming();
if ( !eventRecord().incoming().first->coloured() &&
!eventRecord().incoming().second->coloured() &&
!doFSR() )
return sub->incoming();
nTries = 0;
while ( true ) {
try {
didRadiate = false;
didRealign = false;
if ( eventRecord().truncatedShower() ) {
throw Exception() << "Inconsistent hard emission set-up in DipoleShowerHandler::cascade. "
<< "No truncated shower needed with DipoleShowerHandler. Add "
<< "'set MEMatching:TruncatedShower No' to input file."
<< Exception::runerror;
}
hardScales(lastXCombPtr()->lastShowerScale());
if ( verbosity > 1 ) {
generator()->log() << "DipoleShowerHandler starting off:\n";
eventRecord().debugLastEvent(generator()->log());
generator()->log() << flush;
}
unsigned int nEmitted = 0;
if ( firstMCatNLOEmission ) {
if ( !eventRecord().isMCatNLOHEvent() )
nEmissions = 1;
else
nEmissions = 0;
}
if ( !firstMCatNLOEmission ) {
doCascade(nEmitted,optHardPt,optCutoff);
if ( discardNoEmissions ) {
if ( !didRadiate )
throw Veto();
if ( nEmissions )
if ( nEmissions < nEmitted )
throw Veto();
}
} else {
if ( nEmissions == 1 )
doCascade(nEmitted,optHardPt,optCutoff);
}
if ( intrinsicPtGenerator ) {
if ( eventRecord().incoming().first->coloured() &&
eventRecord().incoming().second->coloured() ) {
SpinOneLorentzRotation rot =
intrinsicPtGenerator->kick(eventRecord().incoming(),
eventRecord().intermediates());
eventRecord().transform(rot);
}
}
didRealign = realign();
constituentReshuffle();
// Decay and shower any particles that require decaying
while ( !eventRecord().decays().empty() ) {
map<PPtr,PerturbativeProcessPtr>::const_iterator decayIt = eventRecord().decays().begin();
// find the decay to do, one with greatest width and parent showered
while(find(eventRecord().outgoing().begin(),eventRecord().outgoing().end(),decayIt->first)==
eventRecord().outgoing().end() &&
find(eventRecord().hard().begin(),eventRecord().hard().end(),decayIt->first)==
eventRecord().hard().end()) ++decayIt;
assert(decayIt!=eventRecord().decays().end());
PPtr incoming = decayIt->first;
eventRecord().currentDecay(decayIt->second);
// Use this to record if an emission actually happens
bool powhegEmission = !( nEmissions && nEmitted==nEmissions) ? thePowhegDecayEmission : false;
// Decay the particle / sort out its pert proc
Energy showerScale = eventRecord().decay(incoming, powhegEmission);
// Following the decay, the bool powheg emission is updated
// to indicate whether or not an emission occurred
if ( powhegEmission )
nEmitted += 1;
// Check that there is only one particle incoming to the decay
assert(eventRecord().currentDecay()->incoming().size()==1);
// Prepare the event record for the showering of the decay
bool needToShower = eventRecord().prepareDecay(eventRecord().currentDecay(),
offShellPartons());
// Only need to shower if we have coloured outgoing particles
if ( needToShower ) {
// The decays currently considered produce a maximum of 2 chains (with powheg emission)
// so all dipole should have the same scale as returned by the decay function.
assert( eventRecord().chains().size() <= 2 );
for ( auto & ch : eventRecord().chains()) {
for ( auto & dip : ch.dipoles()) {
assert ( showerScale > ZERO );
dip.leftScale( showerScale );
dip.rightScale( showerScale );
}
}
// Perform the cascade
doCascade(nEmitted,optHardPt,optCutoff,true);
// Do the constituent mass shell reshuffling
decayConstituentReshuffle(eventRecord().currentDecay());
}
// Update the decays, adding any decays and updating momenta
eventRecord().updateDecays(eventRecord().currentDecay());
eventRecord().decays().erase(decayIt);
}
break;
} catch (RedoShower&) {
resetWeights();
if ( ++nTries > maxtry() )
throw ShowerTriesVeto(maxtry());
eventRecord().clear();
eventRecord().prepare(sub, dynamic_ptr_cast<tStdXCombPtr>(lastXCombPtr()), newStep(), pdfs(),
ShowerHandler::currentHandler()->generator()->currentEvent()->incoming(),
firstInteraction(), offShellPartons());
continue;
} catch (...) {
throw;
}
}
tPPair incoming=eventRecord().fillEventRecord(newStep(),firstInteraction(),didRealign);
setDidRunCascade(true);
return incoming;
}
// Reshuffle the outgoing partons from the hard process onto their constituent mass shells
void DipoleShowerHandler::constituentReshuffle() {
if ( constituentReshuffler && ShowerHandler::currentHandler()->retConstituentMasses() ) {
if ( eventRecord().decays().empty() ) {
constituentReshuffler->reshuffle(eventRecord().outgoing(),
eventRecord().incoming(),
eventRecord().intermediates());
return;
}
else {
PList decaying;
for(auto const & dec : eventRecord().decays())
decaying.push_back(dec.first);
constituentReshuffler->hardProcDecayReshuffle( decaying,
eventRecord().outgoing(),
eventRecord().hard(),
eventRecord().incoming(),
eventRecord().intermediates());
}
}
// After reshuffling the hard process, the decays need to be updated
// as this is not done in reshuffle
vector<pair<PPtr,PerturbativeProcessPtr> > decays;
for(auto const & dec : eventRecord().decays() )
decays.push_back({dec.first,dec.second});
for(auto const & dec : decays) {
PPtr unstable = dec.first;
PList::iterator pos = find(eventRecord().intermediates().begin(),
eventRecord().intermediates().end(),
dec.first);
// Update the PPtr in theDecays
if(pos!=eventRecord().intermediates().end()) {
unstable = *pos;
while(!unstable->children().empty()) {
unstable = unstable->children()[0];
}
eventRecord().decays().erase(dec.first);
eventRecord().decays()[unstable] = dec.second;
// Update the momenta of any other particles in the decay chain
// (for externally provided events)
if ( !(eventRecord().decays()[unstable]->outgoing().empty()) )
eventRecord().updateDecayChainMom( unstable , eventRecord().decays()[unstable]);
}
else {
if ( !(eventRecord().decays()[unstable]->outgoing().empty()) ) {
// Update the momenta of any other particles in the decay chain
// (for externally provided events)
// Note this needs to be done for all decaying particles in the
// outgoing/hard regardless of whether that particle radiated
// or was involved in the reshuffling, this is due to the
// transformation performed for IILightKinematics.
if ( (find(eventRecord().outgoing().begin(),
eventRecord().outgoing().end(), unstable) != eventRecord().outgoing().end())
|| (find(eventRecord().hard().begin(),
eventRecord().hard().end(), unstable) != eventRecord().hard().end()) )
eventRecord().updateDecayChainMom( unstable , eventRecord().decays()[unstable]);
}
}
}
eventRecord().currentDecay(PerturbativeProcessPtr());
}
// Reshuffle outgoing partons from a decay process onto their constituent mass shells
void DipoleShowerHandler::decayConstituentReshuffle(PerturbativeProcessPtr decayProc) {
if ( Debug::level > 2 ){
// Test this function by comparing the
// invariant mass of the outgoing decay
// systems before and after reshuffling
Lorentz5Momentum testOutMomBefore (ZERO,ZERO,ZERO,ZERO);
Energy testInvMassBefore = ZERO;
for ( auto const & testDecayOutItBefore : decayProc->outgoing() ) {
testOutMomBefore += testDecayOutItBefore.first->momentum();
}
testInvMassBefore = testOutMomBefore.m();
// decayReshuffle updates both the event record and the decay perturbative process
if ( constituentReshuffler && ShowerHandler::currentHandler()->retConstituentMasses()) {
constituentReshuffler->decayReshuffle(decayProc,
eventRecord().outgoing(),
eventRecord().hard(),
eventRecord().intermediates());
}
Lorentz5Momentum testOutMomAfter (ZERO,ZERO,ZERO,ZERO);
Energy testInvMassAfter = ZERO;
for ( auto const & testDecayOutItAfter : decayProc->outgoing() ) {
testOutMomAfter += testDecayOutItAfter.first->momentum();
}
testInvMassAfter = testOutMomAfter.m();
Energy incomingMass = decayProc->incoming()[0].first->momentum().m();
assert( abs(testInvMassBefore-incomingMass)/GeV < 1e-5 );
assert( abs(testInvMassBefore-testInvMassAfter)/GeV < 1e-5);
}else{
// decayReshuffle updates both the event record and the decay perturbative process
if ( constituentReshuffler && ShowerHandler::currentHandler()->retConstituentMasses() ) {
constituentReshuffler->decayReshuffle(decayProc,
eventRecord().outgoing(),
eventRecord().hard(),
eventRecord().intermediates());
}
return;
}
}
// Sets the scale of each particle in the dipole chains by finding the smallest
//of several upper bound energy scales: the CMEnergy of the event,
//the transverse mass of outgoing particles, the hardScale (maxPT or maxQ)
//calculated for each dipole (in both configurations) and the veto scale for each particle
void DipoleShowerHandler::hardScales(Energy2 muf) {
// Initalise maximum pt as max CMEnergy of the event
maxPt = generator()->maximumCMEnergy();
if ( restrictPhasespace() ) {
// First interaction == hard collision (i.e. not a MPI collision)
if ( !hardScaleIsMuF() || !firstInteraction() ) {
if ( !eventRecord().outgoing().empty() ) {
for ( auto const & p : eventRecord().outgoing() )
maxPt = min(maxPt,p->momentum().mt());
}
//Look at any non-coloured outgoing particles in the current subprocess
else {
assert(!eventRecord().hard().empty());
Lorentz5Momentum phard(ZERO,ZERO,ZERO,ZERO);
for ( auto const & p : eventRecord().hard())
phard += p->momentum();
Energy mhard = phard.m();
maxPt = mhard;
}
maxPt *= hardScaleFactor();
}
else {
maxPt = hardScaleFactor()*sqrt(muf);
}
muPt = maxPt;
} else {
muPt = hardScaleFactor()*sqrt(muf);
}
for ( auto & ch : eventRecord().chains()) {
// Note that minVetoScale is a value for each DipoleChain, not each dipole
// It will contain the minimum veto scale from all of the dipoles in the chain
Energy minVetoScale = -1.*GeV;
for ( auto & dip : ch.dipoles()) {
// max scale per config
Energy maxFirst = ZERO;
Energy maxSecond = ZERO;
// Loop over the kernels for the given dipole.
// For each dipole configuration, calculate ptMax (or QMax if virtuality ordering)
// for each kernel and find the maximum
for ( auto const & k : kernels) {
pair<bool,bool> conf = {true,false};
if ( k->canHandle(dip.index(conf)) ) {
// Look in DipoleChainOrdering for this
Energy scale =
evolutionOrdering()->hardScale(dip.emitter(conf),dip.spectator(conf),
dip.emitterX(conf),dip.spectatorX(conf),
*k,dip.index(conf));
maxFirst = max(maxFirst,scale);
}
conf = {false,true};
if ( k->canHandle(dip.index(conf)) ) {
Energy scale =
evolutionOrdering()->hardScale(dip.emitter(conf),dip.spectator(conf),
dip.emitterX(conf),dip.spectatorX(conf),
*k,dip.index(conf));
maxSecond = max(maxSecond,scale);
}
}
// Find the maximum value from comparing the maxScale found from maxPt and the vetoScale of the particle
if ( dip.leftParticle()->vetoScale() >= ZERO ) {
maxFirst = min(maxFirst,sqrt(dip.leftParticle()->vetoScale()));
// minVetoScale is a value for each DipoleChain, not each dipole
// It contains the minimum veto scale for all the dipoles in the entire DipoleChain
if ( minVetoScale >= ZERO )
minVetoScale = min(minVetoScale,sqrt(dip.leftParticle()->vetoScale()));
else
minVetoScale = sqrt(dip.leftParticle()->vetoScale());
}
if ( dip.rightParticle()->vetoScale() >= ZERO ) {
maxSecond = min(maxSecond,sqrt(dip.rightParticle()->vetoScale()));
if ( minVetoScale >= ZERO )
minVetoScale = min(minVetoScale,sqrt(dip.rightParticle()->vetoScale()));
else
minVetoScale = sqrt(dip.rightParticle()->vetoScale());
}
// Set the emitterScale for both members of each dipole
maxFirst = min(maxPt,maxFirst);
dip.emitterScale({true,false},maxFirst);
maxSecond = min(maxPt,maxSecond);
dip.emitterScale({false,true},maxSecond);
}
// if the smallest veto scale (i.e. from all of the dipoles)
// is smaller than the scale calculated for a particular
// particle in a particular dipole,
// replace the scale with the veto scale
if ( !evolutionOrdering()->independentDipoles() &&
chainOrderVetoScales &&
minVetoScale >= ZERO ) {
for ( auto & dip : ch.dipoles() ) {
dip.leftScale(min(dip.leftScale(),minVetoScale));
dip.rightScale(min(dip.rightScale(),minVetoScale));
}
}
}
}
Energy DipoleShowerHandler::getWinner(DipoleSplittingInfo& winner,
const Dipole& dip,
pair<bool,bool> conf,
Energy optHardPt,
Energy optCutoff) {
return
getWinner(winner,dip.index(conf),
dip.emitterX(conf),dip.spectatorX(conf),
conf,dip.emitter(conf),dip.spectator(conf),
dip.emitterScale(conf),optHardPt,optCutoff);
}
Energy DipoleShowerHandler::getWinner(SubleadingSplittingInfo& winner,
Energy optHardPt,
Energy optCutoff) {
return
getWinner(winner,winner.index(),
winner.emitterX(),winner.spectatorX(),
winner.configuration(),
winner.emitter(),winner.spectator(),
winner.startScale(),optHardPt,optCutoff);
}
Energy DipoleShowerHandler::getWinner(DipoleSplittingInfo& winner,
const DipoleIndex& index,
double emitterX, double spectatorX,
pair<bool,bool> conf,
tPPtr emitter, tPPtr spectator,
Energy startScale,
Energy optHardPt,
Energy optCutoff) {
if ( !index.initialStateEmitter() &&
!doFSR() ) {
winner.didStopEvolving();
return 0.0*GeV;
}
if ( index.initialStateEmitter() &&
!doISR() ) {
winner.didStopEvolving();
return 0.0*GeV;
}
// Currently do not split IF dipoles so
// don't evaluate them in order to avoid
// exceptions in the log
if ( index.incomingDecayEmitter() ) {
winner.didStopEvolving();
return 0.0*GeV;
}
DipoleSplittingInfo candidate;
candidate.index(index);
candidate.configuration(conf);
candidate.emitterX(emitterX);
candidate.spectatorX(spectatorX);
if ( generators().find(candidate.index()) == generators().end() )
getGenerators(candidate.index(),theSplittingReweight);
//
// NOTE -- needs proper fixing at some point
//
// For some very strange reason, equal_range gives back
// key ranges it hasn't been asked for. This particularly
// happens e.g. for FI dipoles of the same kind, but different
// PDF (hard vs MPI PDF). I can't see a reason for this,
// as DipoleIndex properly implements comparison for equality
// and (lexicographic) ordering; for the time being, we
// use equal_range, extented by an explicit check for wether
// the key is indeed what we wanted. See line after (*) comment
// below.
//
// SW - Update 04/01/2016: Note - This caused a bug for me as I did not
// include equality checks on the decay booleans in the == definition
pair<GeneratorMap::iterator,GeneratorMap::iterator> gens
= generators().equal_range(candidate.index());
Energy winnerScale = 0.0*GeV;
GeneratorMap::iterator winnerGen = generators().end();
for ( GeneratorMap::iterator gen = gens.first; gen != gens.second; ++gen ) {
// (*) see NOTE above
if ( !(gen->first == candidate.index()) )
continue;
if ( startScale <= gen->second->splittingKinematics()->IRCutoff() )
continue;
Energy dScale =
gen->second->splittingKinematics()->dipoleScale(emitter->momentum(),
spectator->momentum());
// in very exceptional cases happening in DIS
if ( std::isnan( double(dScale/MeV) ) )
throw RedoShower();
candidate.scale(dScale);
// Calculate the mass of the recoil system
// for decay dipoles
if ( candidate.index().incomingDecaySpectator() || candidate.index().incomingDecayEmitter() ) {
Energy recoilMass = gen->second->splittingKinematics()->recoilMassKin(emitter->momentum(),
spectator->momentum());
candidate.recoilMass(recoilMass);
}
// Store emitter and spectator masses, needed in kinematics
if ( candidate.index().emitterData()->mass() != ZERO ) {
if ( !candidate.index().offShellEmitter() )
candidate.emitterMass( emitter->nominalMass() );
else
candidate.emitterMass( emitter->mass() );
}
if ( candidate.index().spectatorData()->mass() != ZERO ) {
if ( !candidate.index().offShellSpectator() )
candidate.spectatorMass( spectator->nominalMass() );
else
candidate.spectatorMass( spectator->mass() );
}
candidate.continuesEvolving();
Energy hardScale = evolutionOrdering()->maxPt(startScale,candidate,*(gen->second->splittingKernel()));
Energy maxPossible =
gen->second->splittingKinematics()->ptMax(candidate.scale(),
candidate.emitterX(), candidate.spectatorX(),
candidate,
*gen->second->splittingKernel());
Energy ircutoff =
optCutoff < gen->second->splittingKinematics()->IRCutoff() ?
gen->second->splittingKinematics()->IRCutoff() :
optCutoff;
if ( maxPossible <= ircutoff ) {
continue;
}
if ( maxPossible >= hardScale ){
candidate.hardPt(hardScale);
}
else {
hardScale = maxPossible;
candidate.hardPt(maxPossible);
}
gen->second->generate(candidate,currentWeights(),optHardPt,optCutoff);
Energy nextScale = evolutionOrdering()->evolutionScale(
gen->second->lastSplitting(),*(gen->second->splittingKernel()));
if ( nextScale > winnerScale ) {
winner.fill(candidate);
gen->second->completeSplitting(winner);
winnerGen = gen;
winnerScale = nextScale;
}
reweight(reweight() * gen->second->splittingWeight());
}
if ( winnerGen == generators().end() ) {
winner.didStopEvolving();
return 0.0*GeV;
}
if ( winner.stoppedEvolving() )
return 0.0*GeV;
return winnerScale;
}
void DipoleShowerHandler::doCascade(unsigned int& emDone,
Energy optHardPt,
Energy optCutoff,
const bool decay) {
if ( nEmissions )
if ( emDone == nEmissions )
return;
DipoleSplittingInfo winner;
DipoleSplittingInfo dipoleWinner;
while ( eventRecord().haveChain() ) {
// allow the dipole chain to be rearranged according to arXiv:1801.06113
- if( _rearrange && ( _rearrangeNEmissions < 0 || _rearrangeNEmissions >= emDone ) ){
+ if( _rearrange && ( _rearrangeNEmissions < 0 || _rearrangeNEmissions >= int(emDone) ) ){
eventRecord().currentChain().rearrange(_dipmax,_diplong);
}
if ( verbosity > 2 ) {
generator()->log() << "DipoleShowerHandler selecting splittings for the chain:\n"
<< eventRecord().currentChain() << flush;
}
list<Dipole>::iterator winnerDip = eventRecord().currentChain().dipoles().end();
Energy winnerScale = 0.0*GeV;
Energy nextLeftScale = 0.0*GeV;
Energy nextRightScale = 0.0*GeV;
for ( list<Dipole>::iterator dip = eventRecord().currentChain().dipoles().begin();
dip != eventRecord().currentChain().dipoles().end(); ++dip ) {
nextLeftScale = getWinner(dipoleWinner,*dip,{true,false},optHardPt,optCutoff);
if ( nextLeftScale > winnerScale ) {
winnerScale = nextLeftScale;
winner = dipoleWinner;
winnerDip = dip;
}
nextRightScale = getWinner(dipoleWinner,*dip,{false,true},optHardPt,optCutoff);
if ( nextRightScale > winnerScale ) {
winnerScale = nextRightScale;
winner = dipoleWinner;
winnerDip = dip;
}
if ( evolutionOrdering()->independentDipoles() ) {
Energy dipScale = max(nextLeftScale,nextRightScale);
if ( dip->leftScale() > dipScale )
dip->leftScale(dipScale);
if ( dip->rightScale() > dipScale )
dip->rightScale(dipScale);
}
}
if ( verbosity > 1 ) {
if ( winnerDip != eventRecord().currentChain().dipoles().end() )
generator()->log() << "DipoleShowerHandler selected the splitting:\n"
<< winner << " for the dipole\n"
<< (*winnerDip) << flush;
else
generator()->log() << "DipoleShowerHandler could not select a splitting above the IR cutoff\n"
<< flush;
}
// pop the chain if no dipole did radiate
if ( winnerDip == eventRecord().currentChain().dipoles().end() ) {
eventRecord().popChain();
if ( theEventReweight && eventRecord().chains().empty() )
if ( (theEventReweight->firstInteraction() && firstInteraction()) ||
(theEventReweight->secondaryInteractions() && !firstInteraction()) ) {
double w = theEventReweight->weightCascade(eventRecord().incoming(),
eventRecord().outgoing(),
eventRecord().hard(),theGlobalAlphaS);
reweight(reweight()*w);
}
continue;
}
// otherwise perform the splitting
// but first see if the emission would produce a configuration in the ME region.
if ( theMergingHelper
&& eventHandler()->currentCollision()
&& !decay
&& firstInteraction() ) {
if (theMergingHelper->maxLegs()>eventRecord().outgoing().size()+
eventRecord().hard().size()
+2){//incoming
if (theMergingHelper->mergingScale()<winnerScale &&
theMergingHelper->emissionProbability() < UseRandom::rnd()) {
theMergingHelper->setEmissionProbability(0.);
const bool transparent=true;
if (transparent) {
pair<list<Dipole>::iterator,list<Dipole>::iterator> tmpchildren;
DipoleSplittingInfo tmpwinner=winner;
DipoleChain* tmpfirstChain = nullptr;
DipoleChain* tmpsecondChain = nullptr;
auto New=eventRecord().tmpsplit(winnerDip,tmpwinner,
tmpchildren,tmpfirstChain,
tmpsecondChain);
if (theMergingHelper->matrixElementRegion(New.first,
New.second,
winnerScale,
theMergingHelper->mergingScale())) {
optHardPt=winnerScale;
continue;
}
}else{
optHardPt=winnerScale;
continue;
}
}
}
}
if(theMergingHelper&&firstInteraction())
optHardPt=ZERO;
didRadiate = true;
eventRecord().isMCatNLOSEvent(false);
eventRecord().isMCatNLOHEvent(false);
pair<list<Dipole>::iterator,list<Dipole>::iterator> children;
DipoleChain* firstChain = nullptr;
DipoleChain* secondChain = nullptr;
// Note: the dipoles are updated in eventRecord().split(....) after the splitting,
// hence the entire cascade is handled in doCascade
// The dipole scales are updated in dip->split(....)
if ( decay )
winner.isDecayProc( true );
eventRecord().split(winnerDip,winner,children,firstChain,secondChain);
assert(firstChain && secondChain);
evolutionOrdering()->setEvolutionScale(winnerScale,winner,*firstChain,children);
if ( !secondChain->dipoles().empty() )
evolutionOrdering()->setEvolutionScale(winnerScale,winner,*secondChain,children);
if ( verbosity > 1 ) {
generator()->log() << "DipoleShowerHandler did split the last selected dipole into:\n"
<< (*children.first) << (*children.second) << flush;
}
if ( verbosity > 2 ) {
generator()->log() << "After splitting the last selected dipole, "
<< "DipoleShowerHandler encountered the following chains:\n"
<< (*firstChain) << (*secondChain) << flush;
}
if ( theEventReweight )
if ( (theEventReweight->firstInteraction() && firstInteraction()) ||
(theEventReweight->secondaryInteractions() && !firstInteraction()) ) {
double w = theEventReweight->weight(eventRecord().incoming(),
eventRecord().outgoing(),
eventRecord().hard(),theGlobalAlphaS);
reweight(reweight()*w);
}
if ( nEmissions )
if ( ++emDone == nEmissions )
return;
}
}
bool DipoleShowerHandler::realign() {
if ( !didRadiate && !intrinsicPtGenerator )
return false;
if ( eventRecord().incoming().first->coloured() ||
eventRecord().incoming().second->coloured() ) {
if ( eventRecord().incoming().first->momentum().perp2()/GeV2 < 1e-10 &&
eventRecord().incoming().second->momentum().perp2()/GeV2 < 1e-10 )
return false;
pair<Lorentz5Momentum,Lorentz5Momentum> inMomenta
(eventRecord().incoming().first->momentum(),
eventRecord().incoming().second->momentum());
SpinOneLorentzRotation transform((inMomenta.first+inMomenta.second).findBoostToCM());
Axis dir = (transform * inMomenta.first).vect().unit();
Axis rot (-dir.y(),dir.x(),0);
double theta = dir.theta();
if ( lastParticles().first->momentum().z() < ZERO )
theta = -theta;
transform.rotate(-theta,rot);
inMomenta.first = transform*inMomenta.first;
inMomenta.second = transform*inMomenta.second;
assert(inMomenta.first.z() > ZERO &&
inMomenta.second.z() < ZERO);
Energy2 sHat =
(eventRecord().incoming().first->momentum() +
eventRecord().incoming().second->momentum()).m2();
pair<Energy,Energy> masses(eventRecord().incoming().first->mass(),
eventRecord().incoming().second->mass());
pair<Energy,Energy> qs;
if ( !eventRecord().incoming().first->coloured() ) {
assert(masses.second == ZERO);
qs.first = eventRecord().incoming().first->momentum().z();
qs.second = (sHat-sqr(masses.first))/(2.*(qs.first+sqrt(sqr(masses.first)+sqr(qs.first))));
} else if ( !eventRecord().incoming().second->coloured() ) {
assert(masses.first == ZERO);
qs.second = eventRecord().incoming().second->momentum().z();
qs.first = (sHat-sqr(masses.second))/(2.*(qs.second+sqrt(sqr(masses.second)+sqr(qs.second))));
} else {
assert(masses.first == ZERO && masses.second == ZERO);
if ( realignmentScheme == 0 ) {
double yX = eventRecord().pX().rapidity();
double yInt = (transform*eventRecord().pX()).rapidity();
double dy = yX-yInt;
qs.first = (sqrt(sHat)/2.)*exp(dy);
qs.second = (sqrt(sHat)/2.)*exp(-dy);
} else if ( realignmentScheme == 1 ) {
Energy sS = sqrt((lastParticles().first->momentum() +
lastParticles().second->momentum()).m2());
qs.first = eventRecord().fractions().first * sS / 2.;
qs.second = eventRecord().fractions().second * sS / 2.;
}
}
double beta =
(qs.first-qs.second) /
( sqrt(sqr(masses.first)+sqr(qs.first)) +
sqrt(sqr(masses.second)+sqr(qs.second)) );
transform.boostZ(beta);
Lorentz5Momentum tmp;
if ( eventRecord().incoming().first->coloured() ) {
tmp = eventRecord().incoming().first->momentum();
tmp = transform * tmp;
eventRecord().incoming().first->set5Momentum(tmp);
}
if ( eventRecord().incoming().second->coloured() ) {
tmp = eventRecord().incoming().second->momentum();
tmp = transform * tmp;
eventRecord().incoming().second->set5Momentum(tmp);
}
eventRecord().transform(transform);
return true;
}
return false;
}
void DipoleShowerHandler::resetAlphaS(Ptr<AlphaSBase>::tptr as) {
for ( auto & k : kernels) {
if ( !k->alphaS() )
k->alphaS(as);
k->renormalizationScaleFreeze(theRenormalizationScaleFreeze);
k->factorizationScaleFreeze(theFactorizationScaleFreeze);
}
// clear the generators to be rebuild
// actually, there shouldn't be any generators
// when this happens.
generators().clear();
}
void DipoleShowerHandler::resetReweight(Ptr<DipoleSplittingReweight>::tptr rw) {
for ( auto & g : generators() )
g.second->splittingReweight(rw);
}
void DipoleShowerHandler::getGenerators(const DipoleIndex& ind,
Ptr<DipoleSplittingReweight>::tptr rw) {
bool gotone = false;
for ( auto & k : kernels ) {
if ( k->canHandle(ind) ) {
if ( verbosity > 0 ) {
generator()->log() << "DipoleShowerHandler encountered the dipole configuration\n"
<< ind << " in event number "
<< eventHandler()->currentEvent()->number()
<< "\nwhich can be handled by the splitting kernel '"
<< k->name() << "'.\n" << flush;
}
gotone = true;
Ptr<DipoleSplittingGenerator>::ptr nGenerator =
new_ptr(DipoleSplittingGenerator());
nGenerator->doCompensate(theDoCompensate);
nGenerator->splittingKernel(k);
if ( renormalizationScaleFactor() != 1. )
nGenerator->splittingKernel()->renormalizationScaleFactor(renormalizationScaleFactor());
if ( factorizationScaleFactor() != 1. )
nGenerator->splittingKernel()->factorizationScaleFactor(factorizationScaleFactor());
if ( !nGenerator->splittingReweight() )
nGenerator->splittingReweight(rw);
nGenerator->splittingKernel()->freezeGrid(theFreezeGrid);
nGenerator->splittingKernel()->detuning(theDetuning);
GeneratorMap::const_iterator equivalent = generators().end();
for ( GeneratorMap::const_iterator eq = generators().begin();
eq != generators().end(); ++eq ) {
if ( !eq->second->wrapping() )
if ( k->canHandleEquivalent(ind,*(eq->second->splittingKernel()),eq->first) ) {
equivalent = eq;
if ( verbosity > 0 ) {
generator()->log() << "The dipole configuration "
<< ind
<< " can equivalently be handled by the existing\n"
<< "generator for configuration "
<< eq->first << " using the kernel '"
<< eq->second->splittingKernel()->name()
<< "'\n" << flush;
}
break;
}
}
if ( equivalent != generators().end() ) {
nGenerator->wrap(equivalent->second);
}
DipoleSplittingInfo dummy;
dummy.index(ind);
nGenerator->prepare(dummy);
generators().insert({ind,nGenerator});
}
}
if ( !gotone ) {
throw Exception()
<< "DipoleShowerHandler could not "
<< "find a splitting kernel which is able "
<< "to handle splittings off the dipole "
<< ind << ".\n"
<< "Please check the input files."
<< Exception::runerror;
}
}
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void DipoleShowerHandler::doinit() {
ShowerHandler::doinit();
if ( theGlobalAlphaS )
resetAlphaS(theGlobalAlphaS);
// copy off-shell particle ids before showering from input vector to the
// set used in the simulation
if ( theColouredOffShellInShower.empty() ) {
for(unsigned int ix=0;ix<theInputColouredOffShellInShower.size();++ix)
theColouredOffShellInShower.insert(abs(theInputColouredOffShellInShower[ix]));
}
// work out which shower phase space to use for the matching
bool zChoice0 = false;
bool zChoice1 = false;
size_t zChoiceOther = false;
for ( auto & k : kernels) {
if ( k->splittingKinematics()->openZBoundaries() == 0 )
zChoice0 = true;
else if ( k->splittingKinematics()->openZBoundaries() == 1 )
zChoice1 = true;
else
zChoiceOther = true;
// either inconsistent or other option which cannot be handled by the matching
if ( zChoice0 && zChoice1 ) {
zChoiceOther = true; break;
}
}
if ( zChoiceOther )
theZBoundaries = 2;
else if ( zChoice1 )
theZBoundaries = 1;
else if ( zChoice0 )
theZBoundaries = 0;
}
void DipoleShowerHandler::dofinish() {
ShowerHandler::dofinish();
}
void DipoleShowerHandler::doinitrun() {
ShowerHandler::doinitrun();
}
void DipoleShowerHandler::persistentOutput(PersistentOStream & os) const {
os << kernels << theEvolutionOrdering
<< constituentReshuffler << intrinsicPtGenerator
<< theGlobalAlphaS << chainOrderVetoScales
<< nEmissions << discardNoEmissions << firstMCatNLOEmission
<< thePowhegDecayEmission
<< realignmentScheme << verbosity << printEvent
<< ounit(theRenormalizationScaleFreeze,GeV)
<< ounit(theFactorizationScaleFreeze,GeV)
<< theShowerApproximation
<< theDoCompensate << theFreezeGrid << theDetuning
<< theEventReweight << theSplittingReweight << ounit(maxPt,GeV)
<< ounit(muPt,GeV)<< theMergingHelper << theColouredOffShellInShower
<< theInputColouredOffShellInShower
<< _rearrange << _dipmax << _diplong << _rearrangeNEmissions << theZBoundaries;
}
void DipoleShowerHandler::persistentInput(PersistentIStream & is, int) {
is >> kernels >> theEvolutionOrdering
>> constituentReshuffler >> intrinsicPtGenerator
>> theGlobalAlphaS >> chainOrderVetoScales
>> nEmissions >> discardNoEmissions >> firstMCatNLOEmission
>> thePowhegDecayEmission
>> realignmentScheme >> verbosity >> printEvent
>> iunit(theRenormalizationScaleFreeze,GeV)
>> iunit(theFactorizationScaleFreeze,GeV)
>> theShowerApproximation
>> theDoCompensate >> theFreezeGrid >> theDetuning
>> theEventReweight >> theSplittingReweight >> iunit(maxPt,GeV)
>> iunit(muPt,GeV)>>theMergingHelper >> theColouredOffShellInShower
>> theInputColouredOffShellInShower
>> _rearrange >> _dipmax >> _diplong >> _rearrangeNEmissions >> theZBoundaries;
}
ClassDescription<DipoleShowerHandler> DipoleShowerHandler::initDipoleShowerHandler;
// Definition of the static class description member.
void DipoleShowerHandler::Init() {
static ClassDocumentation<DipoleShowerHandler> documentation
("The DipoleShowerHandler class manages the showering using "
"the dipole shower algorithm.",
"The shower evolution was performed using the algorithm described in "
"\\cite{Platzer:2009jq} and \\cite{Platzer:2011bc}.",
"%\\cite{Platzer:2009jq}\n"
"\\bibitem{Platzer:2009jq}\n"
"S.~Platzer and S.~Gieseke,\n"
"``Coherent Parton Showers with Local Recoils,''\n"
" JHEP {\\bf 1101}, 024 (2011)\n"
"arXiv:0909.5593 [hep-ph].\n"
"%%CITATION = ARXIV:0909.5593;%%\n"
"%\\cite{Platzer:2011bc}\n"
"\\bibitem{Platzer:2011bc}\n"
"S.~Platzer and S.~Gieseke,\n"
"``Dipole Showers and Automated NLO Matching in Herwig,''\n"
"arXiv:1109.6256 [hep-ph].\n"
"%%CITATION = ARXIV:1109.6256;%%");
static RefVector<DipoleShowerHandler,DipoleSplittingKernel> interfaceKernels
("Kernels",
"Set the splitting kernels to be used by the dipole shower.",
&DipoleShowerHandler::kernels, -1, false, false, true, false, false);
static Reference<DipoleShowerHandler,DipoleEvolutionOrdering> interfaceEvolutionOrdering
("EvolutionOrdering",
"Set the evolution ordering to be used.",
&DipoleShowerHandler::theEvolutionOrdering, false, false, true, false, false);
static Reference<DipoleShowerHandler,ConstituentReshuffler> interfaceConstituentReshuffler
("ConstituentReshuffler",
"The object to be used to reshuffle partons to their constitutent mass shells.",
&DipoleShowerHandler::constituentReshuffler, false, false, true, true, false);
static Reference<DipoleShowerHandler,IntrinsicPtGenerator> interfaceIntrinsicPtGenerator
("IntrinsicPtGenerator",
"Set the object in charge to generate intrinsic pt for incoming partons.",
&DipoleShowerHandler::intrinsicPtGenerator, false, false, true, true, false);
static Reference<DipoleShowerHandler,AlphaSBase> interfaceGlobalAlphaS
("GlobalAlphaS",
"Set a global strong coupling for all splitting kernels.",
&DipoleShowerHandler::theGlobalAlphaS, false, false, true, true, false);
static Switch<DipoleShowerHandler,int> interfaceRealignmentScheme
("RealignmentScheme",
"The realignment scheme to use.",
&DipoleShowerHandler::realignmentScheme, 0, false, false);
static SwitchOption interfaceRealignmentSchemePreserveRapidity
(interfaceRealignmentScheme,
"PreserveRapidity",
"Preserve the rapidity of non-coloured outgoing system.",
0);
static SwitchOption interfaceRealignmentSchemeEvolutionFractions
(interfaceRealignmentScheme,
"EvolutionFractions",
"Use momentum fractions as generated by the evolution.",
1);
static SwitchOption interfaceRealignmentSchemeCollisionFrame
(interfaceRealignmentScheme,
"CollisionFrame",
"Determine realignment from collision frame.",
2);
static Switch<DipoleShowerHandler,bool> interfaceChainOrderVetoScales
("ChainOrderVetoScales",
"[experimental] Switch the chain ordering for veto scales on or off.",
&DipoleShowerHandler::chainOrderVetoScales, true, false, false);
static SwitchOption interfaceChainOrderVetoScalesYes
(interfaceChainOrderVetoScales,
"Yes",
"Switch on chain ordering for veto scales.",
true);
static SwitchOption interfaceChainOrderVetoScalesNo
(interfaceChainOrderVetoScales,
"No",
"Switch off chain ordering for veto scales.",
false);
interfaceChainOrderVetoScales.rank(-1);
static Parameter<DipoleShowerHandler,unsigned int> interfaceNEmissions
("NEmissions",
"[debug option] Limit the number of emissions to be generated. Zero does not limit the number of emissions.",
&DipoleShowerHandler::nEmissions, 0, 0, 0,
false, false, Interface::lowerlim);
interfaceNEmissions.rank(-1);
static Switch<DipoleShowerHandler,bool> interfaceDiscardNoEmissions
("DiscardNoEmissions",
"[debug option] Discard events without radiation.",
&DipoleShowerHandler::discardNoEmissions, false, false, false);
static SwitchOption interfaceDiscardNoEmissionsYes
(interfaceDiscardNoEmissions,
"Yes",
"Discard events without radiation.",
true);
static SwitchOption interfaceDiscardNoEmissionsNo
(interfaceDiscardNoEmissions,
"No",
"Do not discard events without radiation.",
false);
interfaceDiscardNoEmissions.rank(-1);
static Switch<DipoleShowerHandler,bool> interfaceFirstMCatNLOEmission
("FirstMCatNLOEmission",
"[debug option] Only perform the first MC@NLO emission.",
&DipoleShowerHandler::firstMCatNLOEmission, false, false, false);
static SwitchOption interfaceFirstMCatNLOEmissionYes
(interfaceFirstMCatNLOEmission,
"Yes",
"Perform only the first MC@NLO emission.",
true);
static SwitchOption interfaceFirstMCatNLOEmissionNo
(interfaceFirstMCatNLOEmission,
"No",
"Produce all emissions.",
false);
interfaceFirstMCatNLOEmission.rank(-1);
static Parameter<DipoleShowerHandler,int> interfaceVerbosity
("Verbosity",
"[debug option] Set the level of debug information provided.",
&DipoleShowerHandler::verbosity, 0, 0, 0,
false, false, Interface::lowerlim);
interfaceVerbosity.rank(-1);
static Parameter<DipoleShowerHandler,int> interfacePrintEvent
("PrintEvent",
"[debug option] The number of events for which debugging information should be provided.",
&DipoleShowerHandler::printEvent, 0, 0, 0,
false, false, Interface::lowerlim);
interfacePrintEvent.rank(-1);
static Parameter<DipoleShowerHandler,Energy> interfaceRenormalizationScaleFreeze
("RenormalizationScaleFreeze",
"The freezing scale for the renormalization scale.",
&DipoleShowerHandler::theRenormalizationScaleFreeze, GeV, 1.0*GeV, 0.0*GeV, 0*GeV,
false, false, Interface::lowerlim);
static Parameter<DipoleShowerHandler,Energy> interfaceFactorizationScaleFreeze
("FactorizationScaleFreeze",
"The freezing scale for the factorization scale.",
&DipoleShowerHandler::theFactorizationScaleFreeze, GeV, 2.0*GeV, 0.0*GeV, 0*GeV,
false, false, Interface::lowerlim);
static Switch<DipoleShowerHandler,bool> interfaceDoCompensate
("DoCompensate",
"",
&DipoleShowerHandler::theDoCompensate, false, false, false);
static SwitchOption interfaceDoCompensateYes
(interfaceDoCompensate,
"Yes",
"",
true);
static SwitchOption interfaceDoCompensateNo
(interfaceDoCompensate,
"No",
"",
false);
static Parameter<DipoleShowerHandler,unsigned long> interfaceFreezeGrid
("FreezeGrid",
"",
&DipoleShowerHandler::theFreezeGrid, 500000, 1, 0,
false, false, Interface::lowerlim);
static Parameter<DipoleShowerHandler,double> interfaceDetuning
("Detuning",
"A value to detune the overestimate kernel.",
&DipoleShowerHandler::theDetuning, 1.0, 1.0, 0,
false, false, Interface::lowerlim);
static Reference<DipoleShowerHandler,DipoleEventReweight> interfaceEventReweight
("EventReweight",
"",
&DipoleShowerHandler::theEventReweight, false, false, true, true, false);
static Reference<DipoleShowerHandler,DipoleSplittingReweight> interfaceSplittingReweight
("SplittingReweight",
"Set the splitting reweight.",
&DipoleShowerHandler::theSplittingReweight, false, false, true, true, false);
static Switch<DipoleShowerHandler, bool> interfacePowhegDecayEmission
("PowhegDecayEmission",
"Use Powheg style emission for the decays",
&DipoleShowerHandler::thePowhegDecayEmission, true, false, false);
static SwitchOption interfacePowhegDecayEmissionYes
(interfacePowhegDecayEmission,"Yes","Powheg decay emission on", true);
static SwitchOption interfacePowhegDecayEmissionNo
(interfacePowhegDecayEmission,"No","Powheg decay emission off", false);
static ParVector<DipoleShowerHandler,long> interfaceOffShellInShower
("OffShellInShower",
"PDG codes of the coloured particles that can be off-shell in the process.",
&DipoleShowerHandler::theInputColouredOffShellInShower, -1, 0l, -10000000l, 10000000l,
false, false, Interface::limited);
static Switch<DipoleShowerHandler, bool> interfacerearrange
("Rearrange",
"Allow rearranging of dipole chains according to arXiv:1801.06113",
&DipoleShowerHandler::_rearrange, false, false, false);
static SwitchOption interfacerearrangeYes
(interfacerearrange,"Yes","_rearrange on", true);
static SwitchOption interfacerearrangeNo
(interfacerearrange,"No","_rearrange off", false);
static Parameter<DipoleShowerHandler,unsigned int> interfacedipmax
("DipMax",
"Allow rearrangment of color chains with ME including dipmax dipoles.",
&DipoleShowerHandler::_dipmax, 0, 0, 0,
false, false, Interface::lowerlim);
static Parameter<DipoleShowerHandler,unsigned int> interfacediplong
("DipLong",
"Dipole chains with more than dipmax dipoles are treated as long. \
diplong=3 rearranges these chains with eeuugg MEs, \
diplong=4 rearranges these chains with eeuuggg MEs (slower), \
diplong=5 rearranges these chains with eeuugggg MEs (slow).\
Note: Numerically there is no difference between the options. ",
&DipoleShowerHandler::_diplong, 0, 0, 0,
false, false, Interface::lowerlim);
static Parameter<DipoleShowerHandler, int> interfacedcorrectNemissions
("RearrangeNEmissions",
"Allow rearrangment of color chains up to the nth emission.",
&DipoleShowerHandler::_rearrangeNEmissions, 0, 0, 0,
false, false, Interface::lowerlim);
}
diff --git a/Shower/Dipole/DipoleShowerHandler.h b/Shower/Dipole/DipoleShowerHandler.h
--- a/Shower/Dipole/DipoleShowerHandler.h
+++ b/Shower/Dipole/DipoleShowerHandler.h
@@ -1,603 +1,603 @@
// -*- C++ -*-
//
// DipoleShowerHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleShowerHandler_H
#define HERWIG_DipoleShowerHandler_H
//
// This is the declaration of the DipoleShowerHandler class.
//
#include "Herwig/Shower/ShowerHandler.h"
#include "Herwig/Shower/Dipole/DipoleShowerHandler.fh"
#include "Herwig/Shower/Dipole/Base/DipoleSplittingInfo.h"
#include "Herwig/Shower/Dipole/Base/DipoleSplittingReweight.h"
#include "Herwig/Shower/Dipole/Kernels/DipoleSplittingKernel.h"
#include "Herwig/Shower/Dipole/Base/DipoleSplittingGenerator.h"
#include "Herwig/Shower/Dipole/Base/DipoleEventRecord.h"
#include "Herwig/Shower/Dipole/Base/DipoleEvolutionOrdering.h"
#include "Herwig/Shower/Dipole/Base/DipoleEventReweight.h"
#include "Herwig/Shower/Dipole/Utility/ConstituentReshuffler.h"
#include "Herwig/Shower/Dipole/Utility/IntrinsicPtGenerator.h"
#include "Herwig/MatrixElement/Matchbox/Base/MergerBase.h"
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Stephen Webster
*
* \brief The DipoleShowerHandler class manages the showering using
* the dipole shower algorithm.
*
* @see \ref DipoleShowerHandlerInterfaces "The interfaces"
* defined for DipoleShowerHandler.
*/
class DipoleShowerHandler: public ShowerHandler {
friend class Merger;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleShowerHandler();
/**
* The destructor.
*/
virtual ~DipoleShowerHandler();
//@}
public:
inline void colourPrint();
/**
* Indicate a problem in the shower.
*/
struct RedoShower {};
/**
* Insert an additional splitting kernel.
*/
void addSplitting(Ptr<DipoleSplittingKernel>::ptr sp) {
kernels.push_back(sp);
}
/**
* Reset the alpha_s for all splitting kernels.
*/
void resetAlphaS(Ptr<AlphaSBase>::tptr);
virtual void cascade(tPVector);
/**
* Reset the splitting reweight for all splitting kernels.
*/
void resetReweight(Ptr<DipoleSplittingReweight>::tptr);
/**
* Return true, if the shower handler can generate a truncated
* shower for POWHEG style events generated using Matchbox
*/
virtual bool canHandleMatchboxTrunc() const { return false; }
/**
* Return true, if this cascade handler will perform reshuffling from hard
* process masses.
*/
virtual bool isReshuffling() const { return false; }
/**
* Return the relevant hard scale to be used in the profile scales
*/
virtual Energy hardScale() const {
return muPt;
}
/**
* Calculate the alpha_s value the shower uses for Q.
*/
double as(Energy Q)const{return theGlobalAlphaS->value(sqr(Q));}
/**
* Return the number of scale dependent active flavours from
* the alpha_s object.
*/
double Nf(Energy Q)const{return theGlobalAlphaS->Nf(sqr(Q));}
/**
* Set the pointer to the Merging Helper.
* Used by the merging factory.
*/
void setMerger(Ptr<MergerBase>::ptr mh){theMergingHelper=mh;}
protected:
typedef multimap<DipoleIndex,Ptr<DipoleSplittingGenerator>::ptr> GeneratorMap;
/**
* The main method which manages the showering of a subprocess.
*/
virtual tPPair cascade(tSubProPtr sub, XCombPtr xcomb) {
return cascade(sub,xcomb,ZERO,ZERO);
}
/**
* The main method which manages the showering of a subprocess.
*/
tPPair cascade(tSubProPtr sub, XCombPtr xcomb,
Energy optHardPt, Energy optCutoff);
/**
* Build splitting generators for the given
* dipole index.
*/
void getGenerators(const DipoleIndex&,
Ptr<DipoleSplittingReweight>::tptr rw =
Ptr<DipoleSplittingReweight>::tptr());
/**
* Setup the hard scales.
*/
void hardScales(Energy2 scale);
/**
* Return the evolution ordering
*/
Ptr<DipoleEvolutionOrdering>::tptr evolutionOrdering() const { return theEvolutionOrdering; }
/**
* Reshuffle to constituent mass shells
*/
void constituentReshuffle();
/**
* Reshuffle to constituent mass shells
*/
void decayConstituentReshuffle( PerturbativeProcessPtr decayProc);
/**
* Access the generator map
*/
GeneratorMap& generators() { return theGenerators; }
/**
* Access the event record
*/
DipoleEventRecord& eventRecord() { return theEventRecord; }
/**
* Return the event record
*/
const DipoleEventRecord& eventRecord() const { return theEventRecord; }
/**
* Return the splitting kernels.
*/
const vector<Ptr<DipoleSplittingKernel>::ptr>& splittingKernels() const {
return kernels;
}
/**
* Return the set of offshell parton ids.
**/
const set<long>& offShellPartons() { return theColouredOffShellInShower; }
/**
* Realign the event such as to have the incoming partons along thre
* beam axes.
*/
bool realign();
/**
* The choice of z boundaries; 0 = restricted, 1 = open, 2 = mixed/other
*/
virtual int showerPhaseSpaceOption() const {
return theZBoundaries;
}
protected:
/**
* Perform the cascade.
*/
void doCascade(unsigned int& emDone,
Energy optHardPt = ZERO,
Energy optCutoff = ZERO,
const bool decay = false);
/**
* Set the number of emissions
**/
void setNEmissions(unsigned int n){nEmissions=n;}
/**
* Get the winning splitting for the
* given dipole and configuration.
*/
Energy getWinner(DipoleSplittingInfo& winner,
const Dipole& dip,
pair<bool,bool> conf,
Energy optHardPt = ZERO,
Energy optCutoff = ZERO);
/**
* Get the winning splitting for the
* given dipole and configuration.
*/
Energy getWinner(SubleadingSplittingInfo& winner,
Energy optHardPt = ZERO,
Energy optCutoff = ZERO);
/**
* Get the winning splitting for the
* given dipole and configuration.
*/
Energy getWinner(DipoleSplittingInfo& winner,
const DipoleIndex& index,
double emitterX, double spectatorX,
pair<bool,bool> conf,
tPPtr emitter, tPPtr spectator,
Energy startScale,
Energy optHardPt = ZERO,
Energy optCutoff = ZERO);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The splitting kernels to be used.
*/
vector<Ptr<DipoleSplittingKernel>::ptr> kernels;
/**
* The evolution ordering considered
*/
Ptr<DipoleEvolutionOrdering>::ptr theEvolutionOrdering;
/**
* The ConstituentReshuffler to be used
*/
Ptr<ConstituentReshuffler>::ptr constituentReshuffler;
/**
* The intrinsic pt generator to be used.
*/
Ptr<IntrinsicPtGenerator>::ptr intrinsicPtGenerator;
/**
* A global alpha_s to be used for all splitting kernels.
*/
Ptr<AlphaSBase>::ptr theGlobalAlphaS;
/**
* Apply chain ordering to events from matrix
* element corrections.
*/
bool chainOrderVetoScales;
/**
* Limit the number of emissions.
* Limit applied if > 0.
*/
unsigned int nEmissions;
/**
* Discard events which did not radiate.
*/
bool discardNoEmissions;
/**
* Perform the first MC@NLO emission only.
*/
bool firstMCatNLOEmission;
/**
* True if powheg style emissions are to be used in the decays
*/
bool thePowhegDecayEmission;
/**
* The realignment scheme
*/
int realignmentScheme;
private:
/**
* The verbosity level.
* 0 - print no info
* 1 - print diagnostic information on setting up
* splitting generators etc.
* 2 - print detailed event information for up to
* printEvent events.
* 3 - print dipole chains after each splitting.
*/
int verbosity;
/**
* See verbosity.
*/
int printEvent;
private:
/**
* The splitting generators indexed by the dipole
* indices they can work on.
*/
GeneratorMap theGenerators;
/**
* The evnt record used.
*/
DipoleEventRecord theEventRecord;
/**
* The number of shoer tries so far.
*/
unsigned int nTries;
/**
* Whether or not we did radiate anything
*/
bool didRadiate;
/**
* Whether or not we did realign the event
*/
bool didRealign;
private:
/**
* A freezing value for the renormalization scale
*/
Energy theRenormalizationScaleFreeze;
/**
* A freezing value for the factorization scale
*/
Energy theFactorizationScaleFreeze;
/**
* The matching subtraction, if appropriate
*/
Ptr<ShowerApproximation>::tptr theShowerApproximation;
/**
* True, if sampler should apply compensation
*/
bool theDoCompensate;
/**
* Return the number of accepted points after which the grid should
* be frozen
*/
unsigned long theFreezeGrid;
/**
* The detuning factor applied to the sampling overestimate kernel
*/
double theDetuning;
/**
* A pointer to the dipole event reweight object
*/
Ptr<DipoleEventReweight>::ptr theEventReweight;
/**
* A pointer to a global dipole splitting reweight
*/
Ptr<DipoleSplittingReweight>::ptr theSplittingReweight;
/**
* True if no warnings have been issued yet
*/
static bool firstWarn;
/**
* The shower starting scale for the last event encountered
*/
Energy maxPt;
/**
* The shower hard scale for the last event encountered
*/
Energy muPt;
/**
* The merging helper takes care of merging multiple LO and NLO
* cross sections. Here we need to check if an emission would
* radiate in the matrix element region of an other multipicity.
* If so, the emission is vetoed.
*/
Ptr<MergerBase>::ptr theMergingHelper;
/**
* PDG codes of the partons which can have an off-shell mass,
* this is fast storage for use during running
*/
set<long> theColouredOffShellInShower;
/**
* PDG codes of the partons which can have an off-shell mass,
* this is a vector that is interfaced so they can be changed
*/
vector<long> theInputColouredOffShellInShower;
/**
* Allow the dipole chains to be rearranged
*/
bool _rearrange=false;
/**
* number of maximal ME dipoles in the rearrangement.
*/
unsigned int _dipmax=3;
/**
* If a chain is considered long (more than dipmax dipoles)
* ME with diplong dipoles are used to test for rearrangement.
*/
unsigned int _diplong=3;
/**
* Number of emissions to be rearranged.
*/
int _rearrangeNEmissions=-1;
/**
* The choice of z boundaries; 0 = restricted, 1 = open, 2 = mixed/other
*/
int theZBoundaries;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<DipoleShowerHandler> initDipoleShowerHandler;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleShowerHandler & operator=(const DipoleShowerHandler &);
+ DipoleShowerHandler & operator=(const DipoleShowerHandler &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleShowerHandler. */
template <>
struct BaseClassTrait<Herwig::DipoleShowerHandler,1> {
/** Typedef of the first base class of DipoleShowerHandler. */
typedef Herwig::ShowerHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleShowerHandler class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleShowerHandler>
: public ClassTraitsBase<Herwig::DipoleShowerHandler> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleShowerHandler"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleShowerHandler is implemented. It may also include several, space-separated,
* libraries if the class DipoleShowerHandler depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleShowerHandler_H */
diff --git a/Shower/Dipole/Kernels/DipoleSplittingKernel.h b/Shower/Dipole/Kernels/DipoleSplittingKernel.h
--- a/Shower/Dipole/Kernels/DipoleSplittingKernel.h
+++ b/Shower/Dipole/Kernels/DipoleSplittingKernel.h
@@ -1,520 +1,520 @@
// -*- C++ -*-
//
// DipoleSplittingKernel.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleSplittingKernel_H
#define HERWIG_DipoleSplittingKernel_H
//
// This is the declaration of the DipoleSplittingKernel class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/StandardModel/AlphaSBase.h"
#include "ThePEG/PDF/PDF.h"
#include "Herwig/Shower/Dipole/Utility/PDFRatio.h"
#include "Herwig/Shower/Dipole/Base/DipoleSplittingInfo.h"
#include "Herwig/Shower/Dipole/Kinematics/DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief DipoleSplittingKernel is the base class for all kernels
* used within the dipole shower.
*
* @see \ref DipoleSplittingKernelInterfaces "The interfaces"
* defined for DipoleSplittingKernel.
*/
class DipoleSplittingKernel: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleSplittingKernel();
/**
* The destructor.
*/
virtual ~DipoleSplittingKernel();
//@}
public:
/**
* Return the alpha_s to be used
*/
Ptr<AlphaSBase>::tptr alphaS() const { return theAlphaS; }
/**
* Set the alpha_s to be used
*/
void alphaS(Ptr<AlphaSBase>::tptr ap) { theAlphaS = ap; }
/**
* Return the splitting kinematics object
*/
Ptr<DipoleSplittingKinematics>::tptr splittingKinematics() const {
return theSplittingKinematics;
}
/**
* Return the mc check object
*/
Ptr<DipoleMCCheck>::ptr mcCheck() const { return theMCCheck; }
/**
* Set the splitting kinematics object
*/
void splittingKinematics(Ptr<DipoleSplittingKinematics>::tptr sp) {
theSplittingKinematics = sp;
}
/**
* Return the PDFRatio object
*/
Ptr<PDFRatio>::tptr pdfRatio() const { return thePDFRatio; }
/**
* Set the PDFRatio object
*/
void pdfRatio(Ptr<PDFRatio>::tptr sp) { thePDFRatio = sp; }
/**
* Return the number of additional parameter
* random variables needed to evaluate this kernel
* except the momentum fractions of incoming partons.
* These will be accessible through the
* lastSplittingParameters() container of the splitting
* info object.
*/
virtual int nDimAdditional() const { return 0; }
/**
* Set the freezing value for the renormalization scale
*/
void renormalizationScaleFreeze(Energy s) { theRenormalizationScaleFreeze = s; }
/**
* Set the freezing value for the factorization scale
*/
void factorizationScaleFreeze(Energy s) { theFactorizationScaleFreeze = s; }
/**
* Get the freezing value for the renormalization scale
*/
Energy renormalizationScaleFreeze() const { return theRenormalizationScaleFreeze; }
/**
* Get the freezing value for the factorization scale
*/
Energy factorizationScaleFreeze() const { return theFactorizationScaleFreeze; }
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const = 0;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const = 0;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const = 0;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const = 0;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const = 0;
/**
* Return the flavour produced, if this cannot
* be determined from the dipole.
*/
PDPtr flavour() const { return theFlavour; }
/**
* Return true, if this splitting kernel is supposed to work in a
* strict large-N limit, i.e. replacing C_F by C_A/2
*/
bool strictLargeN() const { return theStrictLargeN; }
public:
/**
* Inform this splitting kernel, that it is being
* presampled until a call to stopPresampling
*/
virtual void startPresampling(const DipoleIndex&) {
presampling = true;
}
/**
* Inform this splitting kernel, that it is not being
* presampled until a call to startPresampling
*/
virtual void stopPresampling(const DipoleIndex&) {
presampling = false;
}
/**
* Return the number of points to presample this
* splitting generator.
*/
unsigned long presamplingPoints() const { return thePresamplingPoints; }
/**
* Return the maximum number of trials
* to generate a splitting.
*/
unsigned long maxtry() const { return theMaxtry; }
/**
* Return the number of accepted points after which the grid should
* be frozen
*/
unsigned long freezeGrid() const { return theFreezeGrid; }
/**
* Set the number of accepted points after which the grid should
* be frozen
*/
void freezeGrid(unsigned long n) { theFreezeGrid = n; }
/**
* Set a detuning factor to be applied to the sampling overestimate kernel
*/
void detuning(double d) { theDetuning = d; }
/**
* Return the detuning factor applied to the sampling overestimate kernel
*/
double detuning() const { return theDetuning; }
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const = 0;
/**
* Clear the alphaPDF cache
*/
void clearAlphaPDFCache() const {
theAlphaSCache.clear();
thePDFCache.clear();
}
/**
* Update the variations vector at the given splitting using the indicated
* kernel and overestimate values.
*/
virtual void accept(const DipoleSplittingInfo&, double, double, map<string,double>&) const;
/**
* Update the variations vector at the given splitting using the indicated
* kernel and overestimate values.
*/
virtual void veto(const DipoleSplittingInfo&, double, double, map<string,double>&) const;
/**
* Return true, if this kernel is capable of
* delivering an overestimate to the kernel, and
* of inverting the integral over the overestimate
* w.r.t. the phasepsace provided by the given
* DipoleSplittingInfo object.
*/
virtual bool haveOverestimate(const DipoleSplittingInfo&) const { return false; }
/**
* Return the overestimate to this splitting kernel
* for the given dipole splitting.
*/
virtual double overestimate(const DipoleSplittingInfo&) const { return -1.; }
/**
* Invert the integral over the overestimate
* w.r.t. the phasepsace provided by the given
* DipoleSplittingInfo object to equal
* the given value.
*/
virtual double invertOverestimateIntegral(const DipoleSplittingInfo&, double) const {
return -1.;
}
/**
* .
*/
bool useThisKernel() const {
return theUseThisKernel;
}
public:
/**
* Get the factorization scale factor
*/
double factorizationScaleFactor() const { return theFactorizationScaleFactor; }
/**
* Set the factorization scale factor
*/
void factorizationScaleFactor(double f) { theFactorizationScaleFactor = f; }
/**
* Get the renormalization scale factor
*/
double renormalizationScaleFactor() const { return theRenormalizationScaleFactor; }
/**
* Set the renormalization scale factor
*/
void renormalizationScaleFactor(double f) { theRenormalizationScaleFactor = f; }
protected:
/**
* Return the common factor of (alphas/2pi)*(pdf ratio)
*/
double alphaPDF(const DipoleSplittingInfo&,
Energy optScale = ZERO,
double rScaleFactor = 1.0,
double fScaleFactor = 1.0) const;
/**
* Return true, if the virtuality of the splitting should be used as the
* argument of alphas rather than the pt
*/
bool virtualitySplittingScale() const { return theVirtualitySplittingScale; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The alpha_s to be used.
*/
Ptr<AlphaSBase>::ptr theAlphaS;
/**
* An optional 'colour screening' scale
* for alternative intrinsic pt generation.
*/
Energy theScreeningScale;
/**
* The splitting kinematics to be used.
*/
Ptr<DipoleSplittingKinematics>::ptr theSplittingKinematics;
/**
* An optional PDF ratio object to be used
* when evaluating this kernel.
*/
Ptr<PDFRatio>::ptr thePDFRatio;
/**
* The number of points to presample this
* splitting generator.
*/
unsigned long thePresamplingPoints;
/**
* The maximum number of trials
* to generate a splitting.
*/
unsigned long theMaxtry;
/**
* Return the number of accepted points after which the grid should
* be frozen
*/
unsigned long theFreezeGrid;
/**
* The detuning factor applied to the sampling overestimate kernel
*/
double theDetuning;
/**
* The flavour produced, if this cannot
* be determined from the dipole.
*/
PDPtr theFlavour;
/**
* Pointer to a check histogram object
*/
Ptr<DipoleMCCheck>::ptr theMCCheck;
/**
* True, if this splitting kernel is supposed to work in a
* strict large-N limit, i.e. replacing C_F by C_A/2
*/
bool theStrictLargeN;
/**
* The factorization scale factor.
*/
double theFactorizationScaleFactor;
/**
* The renormalization scale factor.
*/
double theRenormalizationScaleFactor;
/**
* A freezing value for the renormalization scale
*/
Energy theRenormalizationScaleFreeze;
/**
* A freezing value for the factorization scale
*/
Energy theFactorizationScaleFreeze;
/**
* True, if the virtuality of the splitting should be used as the
* argument of alphas rather than the pt
*/
bool theVirtualitySplittingScale;
/**
* Implementing CMW in the kernels.
**/
unsigned int theCMWScheme=0;
/**
* Cache for alphas evaluations
*/
mutable map<double,double> theAlphaSCache;
/**
* Cache for PDF evaluations
*/
mutable map<double,double> thePDFCache;
/**
* True, if we are presampling
*/
bool presampling;
/**
* True, if the kernel should be used
*/
bool theUseThisKernel = true;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an abstract class with persistent data.
*/
static AbstractClassDescription<DipoleSplittingKernel> initDipoleSplittingKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleSplittingKernel & operator=(const DipoleSplittingKernel &);
+ DipoleSplittingKernel & operator=(const DipoleSplittingKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleSplittingKernel. */
template <>
struct BaseClassTrait<Herwig::DipoleSplittingKernel,1> {
/** Typedef of the first base class of DipoleSplittingKernel. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleSplittingKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleSplittingKernel>
: public ClassTraitsBase<Herwig::DipoleSplittingKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleSplittingKernel"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleSplittingKernel is implemented. It may also include several, space-separated,
* libraries if the class DipoleSplittingKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleSplittingKernel_H */
diff --git a/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFMgx2ggxDipoleKernel.h
@@ -1,187 +1,187 @@
// -*- C++ -*-
#ifndef HERWIG_FFMgx2ggxDipoleKernel_H
#define HERWIG_FFMgx2ggxDipoleKernel_H
//
// This is the declaration of the FFMgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll, Stephen Webster
*
* \brief FFMgx2ggxDipoleKernel implements the g -> gg
* splitting off a final-final dipole
*
*/
class FFMgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFMgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Asymmetry option for final state gluon splittings.
*/
int theAsymmetryOption=1;
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFMgx2ggxDipoleKernel> initFFMgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMgx2ggxDipoleKernel & operator=(const FFMgx2ggxDipoleKernel &);
+ FFMgx2ggxDipoleKernel & operator=(const FFMgx2ggxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFMgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFMgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of FFMgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFMgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFMgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::FFMgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFMgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFMgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFMgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFMgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FFMgx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/FFMgx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFMgx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFMgx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FFMgx2qqxDipoleKernel_H
#define HERWIG_FFMgx2qqxDipoleKernel_H
//
// This is the declaration of the FFMgx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll, Stephen Webster
*
* \brief FFMgx2qqxDipoleKernel implements the g -> qqbar
* splitting off a final-final dipole
*
*/
class FFMgx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMgx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFMgx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFMgx2qqxDipoleKernel> initFFMgx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMgx2qqxDipoleKernel & operator=(const FFMgx2qqxDipoleKernel &);
+ FFMgx2qqxDipoleKernel & operator=(const FFMgx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFMgx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFMgx2qqxDipoleKernel,1> {
/** Typedef of the first base class of FFMgx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFMgx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFMgx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::FFMgx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFMgx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFMgx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFMgx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFMgx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FFMqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/FFMqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFMqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFMqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FFMqx2qgxDipoleKernel_H
#define HERWIG_FFMqx2qgxDipoleKernel_H
//
// This is the declaration of the FFMqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll, Stephen Webster
*
* \brief FFMqx2qgxDipoleKernel implements the q -> qg
* splitting off a final-final dipole
*
*/
class FFMqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFMqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFMqx2qgxDipoleKernel> initFFMqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMqx2qgxDipoleKernel & operator=(const FFMqx2qgxDipoleKernel &);
+ FFMqx2qgxDipoleKernel & operator=(const FFMqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFMqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFMqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of FFMqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFMqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFMqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::FFMqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFMqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFMqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFMqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFMqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFgx2ggxDipoleKernel.h
@@ -1,187 +1,187 @@
// -*- C++ -*-
#ifndef HERWIG_FFgx2ggxDipoleKernel_H
#define HERWIG_FFgx2ggxDipoleKernel_H
//
// This is the declaration of the FFgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FFgx2ggxDipoleKernel implements the g -> gg
* splitting off a final-final dipole
*
*/
class FFgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFgx2ggxDipoleKernel> initFFgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFgx2ggxDipoleKernel & operator=(const FFgx2ggxDipoleKernel &);
+ FFgx2ggxDipoleKernel & operator=(const FFgx2ggxDipoleKernel &) = delete;
/**
* Asymmetry option for final state gluon splittings.
*/
int theAsymmetryOption=1;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of FFgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::FFgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FFgx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/FFgx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFgx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFgx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FFgx2qqxDipoleKernel_H
#define HERWIG_FFgx2qqxDipoleKernel_H
//
// This is the declaration of the FFgx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FFgx2qqxDipoleKernel implements the g -> qqbar
* splitting off a final-final dipole
*
*/
class FFgx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFgx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFgx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFgx2qqxDipoleKernel> initFFgx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFgx2qqxDipoleKernel & operator=(const FFgx2qqxDipoleKernel &);
+ FFgx2qqxDipoleKernel & operator=(const FFgx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFgx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFgx2qqxDipoleKernel,1> {
/** Typedef of the first base class of FFgx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFgx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFgx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::FFgx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFgx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFgx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFgx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFgx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FFqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/FFqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FFqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FFqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FFqx2qgxDipoleKernel_H
#define HERWIG_FFqx2qgxDipoleKernel_H
//
// This is the declaration of the FFqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FFqx2qgxDipoleKernel implements the q -> qg
* splitting off a final-final dipole
*
*/
class FFqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~FFqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFqx2qgxDipoleKernel> initFFqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFqx2qgxDipoleKernel & operator=(const FFqx2qgxDipoleKernel &);
+ FFqx2qgxDipoleKernel & operator=(const FFqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FFqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of FFqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::FFqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FFqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FFqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIMDecaygx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/FIMDecaygx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIMDecaygx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIMDecaygx2ggxDipoleKernel.h
@@ -1,186 +1,186 @@
// -*- C++ -*-
#ifndef HERWIG_FIMDecaygx2ggxDipoleKernel_H
#define HERWIG_FIMDecaygx2ggxDipoleKernel_H
//
// This is the declaration of the FIMDecaygx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Stephen Webster
*
* \brief FIMDecaygx2ggxDipoleKernel implements the g -> gg
* splitting off a final-initial decay dipole and includes the
* contribution from the splitting of the intial / decay particle
*
*/
class FIMDecaygx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMDecaygx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIMDecaygx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIMDecaygx2ggxDipoleKernel> initFIMDecaygx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMDecaygx2ggxDipoleKernel & operator=(const FIMDecaygx2ggxDipoleKernel &);
+ FIMDecaygx2ggxDipoleKernel & operator=(const FIMDecaygx2ggxDipoleKernel &) = delete;
/**
* Asymmetry option for final state gluon splittings.
*/
int theAsymmetryOption=0;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIMDecaygx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIMDecaygx2ggxDipoleKernel,1> {
/** Typedef of the first base class of FIMDecaygx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIMDecaygx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIMDecaygx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::FIMDecaygx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIMDecaygx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIMDecaygx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIMDecaygx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIMDecaygx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIMDecaygx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/FIMDecaygx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIMDecaygx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIMDecaygx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FIMDecaygx2qqxDipoleKernel_H
#define HERWIG_FIMDecaygx2qqxDipoleKernel_H
//
// This is the declaration of the FIMDecaygx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Stephen Webster
*
* \brief FIMDecaygx2qqxDipoleKernel implements the g -> qq
* splitting off a final-initial decay dipole
*
*/
class FIMDecaygx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMDecaygx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIMDecaygx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIMDecaygx2qqxDipoleKernel> initFIMDecaygx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMDecaygx2qqxDipoleKernel & operator=(const FIMDecaygx2qqxDipoleKernel &);
+ FIMDecaygx2qqxDipoleKernel & operator=(const FIMDecaygx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIMDecaygx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIMDecaygx2qqxDipoleKernel,1> {
/** Typedef of the first base class of FIMDecaygx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIMDecaygx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIMDecaygx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::FIMDecaygx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIMDecaygx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIMDecaygx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIMDecaygx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIMDecaygx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIMDecayqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/FIMDecayqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIMDecayqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIMDecayqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FIMDecayqx2qgxDipoleKernel_H
#define HERWIG_FIMDecayqx2qgxDipoleKernel_H
//
// This is the declaration of the FIMDecayqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Stephen Webster
*
* \brief FIMDecayqx2qgxDipoleKernel implements the q -> qg
* splitting off a final-initial decay dipole and includes the
* contribution from the splitting of the intial / decay particle
*
*/
class FIMDecayqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMDecayqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIMDecayqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex& ind) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex& ind) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo& split) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIMDecayqx2qgxDipoleKernel> initFIMDecayqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMDecayqx2qgxDipoleKernel & operator=(const FIMDecayqx2qgxDipoleKernel &);
+ FIMDecayqx2qgxDipoleKernel & operator=(const FIMDecayqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIMDecayqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIMDecayqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of FIMDecayqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIMDecayqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIMDecayqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::FIMDecayqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIMDecayqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIMDecayqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIMDecayqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIMDecayqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIMgx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/FIMgx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIMgx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIMgx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FIMgx2qqxDipoleKernel_H
#define HERWIG_FIMgx2qqxDipoleKernel_H
//
// This is the declaration of the FIMgx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief FIMgx2qqxDipoleKernel implements the g -> qqbar
* splitting off a final-initial dipole
*
*/
class FIMgx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMgx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIMgx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIMgx2qqxDipoleKernel> initFIMgx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMgx2qqxDipoleKernel & operator=(const FIMgx2qqxDipoleKernel &);
+ FIMgx2qqxDipoleKernel & operator=(const FIMgx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIMgx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIMgx2qqxDipoleKernel,1> {
/** Typedef of the first base class of FIMgx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIMgx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIMgx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::FIMgx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIMgx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIMgx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIMgx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIMgx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIMqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/FIMqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIMqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIMqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FIMqx2qgxDipoleKernel_H
#define HERWIG_FIMqx2qgxDipoleKernel_H
//
// This is the declaration of the FIMqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief FIMqx2qgxDipoleKernel implements the q -> qg
* splitting off a final-initial dipole
*
*/
class FIMqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIMqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIMqx2qgxDipoleKernel> initFIMqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMqx2qgxDipoleKernel & operator=(const FIMqx2qgxDipoleKernel &);
+ FIMqx2qgxDipoleKernel & operator=(const FIMqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIMqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIMqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of FIMqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIMqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIMqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::FIMqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIMqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIMqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIMqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIMqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc
--- a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc
+++ b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.cc
@@ -1,116 +1,116 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FIgx2ggxDipoleKernel class.
//
#include "FIgx2ggxDipoleKernel.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
FIgx2ggxDipoleKernel::FIgx2ggxDipoleKernel()
: DipoleSplittingKernel() {}
FIgx2ggxDipoleKernel::~FIgx2ggxDipoleKernel() {}
IBPtr FIgx2ggxDipoleKernel::clone() const {
return new_ptr(*this);
}
IBPtr FIgx2ggxDipoleKernel::fullclone() const {
return new_ptr(*this);
}
bool FIgx2ggxDipoleKernel::canHandle(const DipoleIndex& ind) const {
return
useThisKernel() &&
ind.emitterData()->id() == ParticleID::g &&
ind.spectatorData()->mass() == ZERO &&
!ind.initialStateEmitter() && ind.initialStateSpectator();
}
bool FIgx2ggxDipoleKernel::canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const {
assert(canHandle(a));
if ( !canHandle(b) )
return false;
return
sk.emitter(b)->id() == ParticleID::g &&
sk.emission(b)->id() == ParticleID::g &&
a.spectatorPDF() == b.spectatorPDF();
}
tcPDPtr FIgx2ggxDipoleKernel::emitter(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FIgx2ggxDipoleKernel::emission(const DipoleIndex&) const {
return getParticleData(ParticleID::g);
}
tcPDPtr FIgx2ggxDipoleKernel::spectator(const DipoleIndex& ind) const {
return ind.spectatorData();
}
double FIgx2ggxDipoleKernel::evaluate(const DipoleSplittingInfo& split) const {
double ret = alphaPDF(split);
double z = split.lastZ();
double x = 1. / ( 1. + sqr(split.lastPt()/split.scale()) / (z*(1.-z)) );
- double S1=1./(1.-z*(1.-x));
- double S2=1./(1.-(1.-z)*(1.-x));
+ double S1=1./(1.-z+(1.-x));
+ double S2=1./(1.-(1.-z)+(1.-x));
double NS=(-2 + z*(1.-z)+(1.-x)*(1.+x*z*(1.-z)));
if( theAsymmetryOption == 0 ){
ret *= 3.*( S1 + 0.5 * NS);
}else if ( theAsymmetryOption == 1 ){
ret *= 3.*z*( S1 +S2 + NS );
}else{
ret *= 3.*0.5*( S1 + S2 + NS );
}
return ret > 0. ? ret : 0.;
}
// If needed, insert default implementations of function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void FIgx2ggxDipoleKernel::persistentOutput(PersistentOStream & os) const {
os << theAsymmetryOption;
}
void FIgx2ggxDipoleKernel::persistentInput(PersistentIStream & is, int) {
is >> theAsymmetryOption;
}
ClassDescription<FIgx2ggxDipoleKernel> FIgx2ggxDipoleKernel::initFIgx2ggxDipoleKernel;
// Definition of the static class description member.
void FIgx2ggxDipoleKernel::Init() {
static ClassDocumentation<FIgx2ggxDipoleKernel> documentation
("FIgx2ggxDipoleKernel");
static Parameter<FIgx2ggxDipoleKernel,int> interfacetheAsymmetryOption
("AsymmetryOption",
"The asymmetry option for final state gluon spliitings.",
&FIgx2ggxDipoleKernel::theAsymmetryOption, 1, 0, 0,
false, false, Interface::lowerlim);
}
diff --git a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIgx2ggxDipoleKernel.h
@@ -1,186 +1,186 @@
// -*- C++ -*-
#ifndef HERWIG_FIgx2ggxDipoleKernel_H
#define HERWIG_FIgx2ggxDipoleKernel_H
//
// This is the declaration of the FIgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FIgx2ggxDipoleKernel implements the g -> gg
* splitting off a final-initial dipole
*
*/
class FIgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* Asymmetry option for final state gluon splittings.
*/
int theAsymmetryOption=1;
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIgx2ggxDipoleKernel> initFIgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIgx2ggxDipoleKernel & operator=(const FIgx2ggxDipoleKernel &);
+ FIgx2ggxDipoleKernel & operator=(const FIgx2ggxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of FIgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::FIgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIgx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/FIgx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIgx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIgx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FIgx2qqxDipoleKernel_H
#define HERWIG_FIgx2qqxDipoleKernel_H
//
// This is the declaration of the FIgx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FIgx2qqxDipoleKernel implements the g -> qqbar
* splitting off a final-initial dipole
*
*/
class FIgx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIgx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIgx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIgx2qqxDipoleKernel> initFIgx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIgx2qqxDipoleKernel & operator=(const FIgx2qqxDipoleKernel &);
+ FIgx2qqxDipoleKernel & operator=(const FIgx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIgx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIgx2qqxDipoleKernel,1> {
/** Typedef of the first base class of FIgx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIgx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIgx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::FIgx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIgx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIgx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIgx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIgx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/FIqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/FIqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/FIqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/FIqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_FIqx2qgxDipoleKernel_H
#define HERWIG_FIqx2qgxDipoleKernel_H
//
// This is the declaration of the FIqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FIqx2qgxDipoleKernel implements the q -> qg
* splitting off a final-initial dipole
*
*/
class FIqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~FIqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIqx2qgxDipoleKernel> initFIqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIqx2qgxDipoleKernel & operator=(const FIqx2qgxDipoleKernel &);
+ FIqx2qgxDipoleKernel & operator=(const FIqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::FIqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of FIqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::FIqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* FIqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class FIqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFMgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/IFMgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFMgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFMgx2ggxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFMgx2ggxDipoleKernel_H
#define HERWIG_IFMgx2ggxDipoleKernel_H
//
// This is the declaration of the IFMgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief IFMgx2ggxDipoleKernel implements the g -> gg
* splitting off an initial-final dipole
*
*/
class IFMgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFMgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFMgx2ggxDipoleKernel> initIFMgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMgx2ggxDipoleKernel & operator=(const IFMgx2ggxDipoleKernel &);
+ IFMgx2ggxDipoleKernel & operator=(const IFMgx2ggxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFMgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFMgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of IFMgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFMgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFMgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::IFMgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFMgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFMgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFMgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFMgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFMgx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/IFMgx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFMgx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFMgx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFMgx2qqxDipoleKernel_H
#define HERWIG_IFMgx2qqxDipoleKernel_H
//
// This is the declaration of the IFgx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief IFMgx2qqxDipoleKernel implements the g -> qq
* splitting off an initial-final dipole
*
*/
class IFMgx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMgx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFMgx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFMgx2qqxDipoleKernel> initIFMgx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMgx2qqxDipoleKernel & operator=(const IFMgx2qqxDipoleKernel &);
+ IFMgx2qqxDipoleKernel & operator=(const IFMgx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFMgx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFMgx2qqxDipoleKernel,1> {
/** Typedef of the first base class of IFMgx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFMgx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFMgx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::IFMgx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFMgx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFMgx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFMgx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFMgx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFMqx2gqxDipoleKernel.h b/Shower/Dipole/Kernels/IFMqx2gqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFMqx2gqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFMqx2gqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFMqx2gqxDipoleKernel_H
#define HERWIG_IFMqx2gqxDipoleKernel_H
//
// This is the declaration of the IFqx2gqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief IFMqx2gqxDipoleKernel implements the q -> gqbar
* splitting off an initial-final dipole
*
*/
class IFMqx2gqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMqx2gqxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFMqx2gqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFMqx2gqxDipoleKernel> initIFMqx2gqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMqx2gqxDipoleKernel & operator=(const IFMqx2gqxDipoleKernel &);
+ IFMqx2gqxDipoleKernel & operator=(const IFMqx2gqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFMqx2gqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFMqx2gqxDipoleKernel,1> {
/** Typedef of the first base class of IFMqx2gqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFMqx2gqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFMqx2gqxDipoleKernel>
: public ClassTraitsBase<Herwig::IFMqx2gqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFMqx2gqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFMqx2gqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFMqx2gqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFMqx2gqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFMqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/IFMqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFMqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFMqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFMqx2qgxDipoleKernel_H
#define HERWIG_IFMqx2qgxDipoleKernel_H
//
// This is the declaration of the IFqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief IFMqx2qgxDipoleKernel implements the q -> qg
* splitting off an initial-final dipole
*
*/
class IFMqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFMqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFMqx2qgxDipoleKernel> initIFMqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMqx2qgxDipoleKernel & operator=(const IFMqx2qgxDipoleKernel &);
+ IFMqx2qgxDipoleKernel & operator=(const IFMqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFMqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFMqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of IFMqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFMqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFMqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::IFMqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFMqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFMqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFMqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFMqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/IFgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFgx2ggxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFgx2ggxDipoleKernel_H
#define HERWIG_IFgx2ggxDipoleKernel_H
//
// This is the declaration of the IFgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IFgx2ggxDipoleKernel implements the g -> gg
* splitting off an initial-final dipole
*
*/
class IFgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFgx2ggxDipoleKernel> initIFgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFgx2ggxDipoleKernel & operator=(const IFgx2ggxDipoleKernel &);
+ IFgx2ggxDipoleKernel & operator=(const IFgx2ggxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of IFgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::IFgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFgx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/IFgx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFgx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFgx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFgx2qqxDipoleKernel_H
#define HERWIG_IFgx2qqxDipoleKernel_H
//
// This is the declaration of the IFgx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IFgx2qqxDipoleKernel implements the g -> qq
* splitting off an initial-final dipole
*
*/
class IFgx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFgx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFgx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFgx2qqxDipoleKernel> initIFgx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFgx2qqxDipoleKernel & operator=(const IFgx2qqxDipoleKernel &);
+ IFgx2qqxDipoleKernel & operator=(const IFgx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFgx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFgx2qqxDipoleKernel,1> {
/** Typedef of the first base class of IFgx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFgx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFgx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::IFgx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFgx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFgx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFgx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFgx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFqx2gqxDipoleKernel.h b/Shower/Dipole/Kernels/IFqx2gqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFqx2gqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFqx2gqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFqx2gqxDipoleKernel_H
#define HERWIG_IFqx2gqxDipoleKernel_H
//
// This is the declaration of the IFqx2gqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IFqx2gqxDipoleKernel implements the q -> gqbar
* splitting off an initial-final dipole
*
*/
class IFqx2gqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFqx2gqxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFqx2gqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFqx2gqxDipoleKernel> initIFqx2gqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFqx2gqxDipoleKernel & operator=(const IFqx2gqxDipoleKernel &);
+ IFqx2gqxDipoleKernel & operator=(const IFqx2gqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFqx2gqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFqx2gqxDipoleKernel,1> {
/** Typedef of the first base class of IFqx2gqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFqx2gqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFqx2gqxDipoleKernel>
: public ClassTraitsBase<Herwig::IFqx2gqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFqx2gqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFqx2gqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFqx2gqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFqx2gqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IFqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/IFqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IFqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IFqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IFqx2qgxDipoleKernel_H
#define HERWIG_IFqx2qgxDipoleKernel_H
//
// This is the declaration of the IFqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IFqx2qgxDipoleKernel implements the q -> qg
* splitting off an initial-final dipole
*
*/
class IFqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~IFqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFqx2qgxDipoleKernel> initIFqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFqx2qgxDipoleKernel & operator=(const IFqx2qgxDipoleKernel &);
+ IFqx2qgxDipoleKernel & operator=(const IFqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IFqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of IFqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::IFqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IFqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IFqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IIgx2ggxDipoleKernel.h b/Shower/Dipole/Kernels/IIgx2ggxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IIgx2ggxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IIgx2ggxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IIgx2ggxDipoleKernel_H
#define HERWIG_IIgx2ggxDipoleKernel_H
//
// This is the declaration of the IIgx2ggxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IIgx2ggxDipoleKernel implements the g -> gg
* splitting off an initial-initial dipole
*
*/
class IIgx2ggxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIgx2ggxDipoleKernel();
/**
* The destructor.
*/
virtual ~IIgx2ggxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IIgx2ggxDipoleKernel> initIIgx2ggxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIgx2ggxDipoleKernel & operator=(const IIgx2ggxDipoleKernel &);
+ IIgx2ggxDipoleKernel & operator=(const IIgx2ggxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IIgx2ggxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IIgx2ggxDipoleKernel,1> {
/** Typedef of the first base class of IIgx2ggxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IIgx2ggxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IIgx2ggxDipoleKernel>
: public ClassTraitsBase<Herwig::IIgx2ggxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IIgx2ggxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IIgx2ggxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IIgx2ggxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IIgx2ggxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IIgx2qqxDipoleKernel.h b/Shower/Dipole/Kernels/IIgx2qqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IIgx2qqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IIgx2qqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IIgx2qqxDipoleKernel_H
#define HERWIG_IIgx2qqxDipoleKernel_H
//
// This is the declaration of the IIgx2qqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IIgx2qqxDipoleKernel implements the g -> qq
* splitting off an initial-initial dipole
*
*/
class IIgx2qqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIgx2qqxDipoleKernel();
/**
* The destructor.
*/
virtual ~IIgx2qqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IIgx2qqxDipoleKernel> initIIgx2qqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIgx2qqxDipoleKernel & operator=(const IIgx2qqxDipoleKernel &);
+ IIgx2qqxDipoleKernel & operator=(const IIgx2qqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IIgx2qqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IIgx2qqxDipoleKernel,1> {
/** Typedef of the first base class of IIgx2qqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IIgx2qqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IIgx2qqxDipoleKernel>
: public ClassTraitsBase<Herwig::IIgx2qqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IIgx2qqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IIgx2qqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IIgx2qqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IIgx2qqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IIqx2gqxDipoleKernel.h b/Shower/Dipole/Kernels/IIqx2gqxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IIqx2gqxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IIqx2gqxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IIqx2gqxDipoleKernel_H
#define HERWIG_IIqx2gqxDipoleKernel_H
//
// This is the declaration of the IIqx2gqxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IIqx2gqxDipoleKernel implements the q -> gqbar
* splitting off an initial-initial dipole
*
*/
class IIqx2gqxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIqx2gqxDipoleKernel();
/**
* The destructor.
*/
virtual ~IIqx2gqxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IIqx2gqxDipoleKernel> initIIqx2gqxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIqx2gqxDipoleKernel & operator=(const IIqx2gqxDipoleKernel &);
+ IIqx2gqxDipoleKernel & operator=(const IIqx2gqxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IIqx2gqxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IIqx2gqxDipoleKernel,1> {
/** Typedef of the first base class of IIqx2gqxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IIqx2gqxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IIqx2gqxDipoleKernel>
: public ClassTraitsBase<Herwig::IIqx2gqxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IIqx2gqxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IIqx2gqxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IIqx2gqxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IIqx2gqxDipoleKernel_H */
diff --git a/Shower/Dipole/Kernels/IIqx2qgxDipoleKernel.h b/Shower/Dipole/Kernels/IIqx2qgxDipoleKernel.h
--- a/Shower/Dipole/Kernels/IIqx2qgxDipoleKernel.h
+++ b/Shower/Dipole/Kernels/IIqx2qgxDipoleKernel.h
@@ -1,181 +1,181 @@
// -*- C++ -*-
#ifndef HERWIG_IIqx2qgxDipoleKernel_H
#define HERWIG_IIqx2qgxDipoleKernel_H
//
// This is the declaration of the IIqx2qgxDipoleKernel class.
//
#include "DipoleSplittingKernel.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IIqx2qgxDipoleKernel implements the q -> qg
* splitting off an initial-initial dipole
*
*/
class IIqx2qgxDipoleKernel: public DipoleSplittingKernel {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IIqx2qgxDipoleKernel();
/**
* The destructor.
*/
virtual ~IIqx2qgxDipoleKernel();
//@}
public:
/**
* Return true, if this splitting kernel
* applies to the given dipole index.
*/
virtual bool canHandle(const DipoleIndex&) const;
/**
* Return true, if this splitting kernel is
* the same for the given index a, as the given
* splitting kernel for index b.
*/
virtual bool canHandleEquivalent(const DipoleIndex& a,
const DipoleSplittingKernel& sk,
const DipoleIndex& b) const;
/**
* Return the emitter data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emitter(const DipoleIndex&) const;
/**
* Return the emission data after splitting, given
* a dipole index.
*/
virtual tcPDPtr emission(const DipoleIndex&) const;
/**
* Return the spectator data after splitting, given
* a dipole index.
*/
virtual tcPDPtr spectator(const DipoleIndex&) const;
/**
* Evaluate this splitting kernel for the given
* dipole splitting.
*/
virtual double evaluate(const DipoleSplittingInfo&) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IIqx2qgxDipoleKernel> initIIqx2qgxDipoleKernel;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IIqx2qgxDipoleKernel & operator=(const IIqx2qgxDipoleKernel &);
+ IIqx2qgxDipoleKernel & operator=(const IIqx2qgxDipoleKernel &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IIqx2qgxDipoleKernel. */
template <>
struct BaseClassTrait<Herwig::IIqx2qgxDipoleKernel,1> {
/** Typedef of the first base class of IIqx2qgxDipoleKernel. */
typedef Herwig::DipoleSplittingKernel NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IIqx2qgxDipoleKernel class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IIqx2qgxDipoleKernel>
: public ClassTraitsBase<Herwig::IIqx2qgxDipoleKernel> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IIqx2qgxDipoleKernel"; }
/**
* The name of a file containing the dynamic library where the class
* IIqx2qgxDipoleKernel is implemented. It may also include several, space-separated,
* libraries if the class IIqx2qgxDipoleKernel depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IIqx2qgxDipoleKernel_H */
diff --git a/Shower/Dipole/Kinematics/DipoleSplittingKinematics.h b/Shower/Dipole/Kinematics/DipoleSplittingKinematics.h
--- a/Shower/Dipole/Kinematics/DipoleSplittingKinematics.h
+++ b/Shower/Dipole/Kinematics/DipoleSplittingKinematics.h
@@ -1,643 +1,643 @@
// -*- C++ -*-
//
// DipoleSplittingKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleSplittingKinematics_H
#define HERWIG_DipoleSplittingKinematics_H
//
// This is the declaration of the DipoleSplittingKinematics class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Vectors/Lorentz5Vector.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Utilities/UtilityBase.h"
#include "Herwig/Shower/Dipole/Utility/DipoleMCCheck.h"
namespace Herwig {
using namespace ThePEG;
class DipoleIndex;
class DipoleSplittingInfo;
class DipoleSplittingKernel;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief DipoleSplittingKinematics is the base class for dipole splittings
* as performed in the dipole shower.
*
* @see \ref DipoleSplittingKinematicsInterfaces "The interfaces"
* defined for DipoleSplittingKinematics.
*/
class DipoleSplittingKinematics: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleSplittingKinematics();
/**
* The destructor.
*/
virtual ~DipoleSplittingKinematics();
//@}
public:
/**
* Return the boundaries in between the evolution
* variable random number is to be sampled; the lower
* cuoff is assumed to correspond to the infrared cutoff.
*/
virtual pair<double,double> kappaSupport(const DipoleSplittingInfo&) const {
return {0.0,1.0};
}
/**
* Return the boundaries in between the momentum
* fraction random number is to be sampled.
*/
virtual pair<double,double> xiSupport(const DipoleSplittingInfo&) const {
return {0.0,1.0};
}
/**
* Return the dipole scale associated to the
* given pair of emitter and spectator. This
* should be the invariant mass or absolute value
* final/final or initial/initial and the absolute
* value of the momentum transfer for intial/final or
* final/initial dipoles.
*/
virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const {
// MEMinBias produces non-zero zeros.
if(abs(pEmitter*pSpectator)<0.0000001*GeV2)return ZERO;
assert(pEmitter*pSpectator >= ZERO);
return sqrt(2.*pEmitter*pSpectator);
}
/**
* Return the mass of the system absorbing
* the recoil in the dipole splitting.
* This is overloaded in the decay dipoles.
*/
virtual Energy recoilMassKin(const Lorentz5Momentum&,
const Lorentz5Momentum& pSpectator) const {
return pSpectator.m();
}
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split) const =0;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr emitter, tPPtr spectator) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split) const =0;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr emitter, tPPtr spectator) const;
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const = 0;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const = 0;
/**
* Return the infrared cutoff.
*/
virtual Energy IRCutoff() const { return theIRCutoff; }
/**
* Return the minimum momentum fraction for
* incoming partons
*/
double xMin() const { return theXMin; }
/**
* Generate a pt
*/
Energy generatePt(double r, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
double& weight) const;
/**
* Return the random number associated to
* the given pt.
*/
virtual double ptToRandom(Energy pt, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy pt,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const = 0;
/**
* Enumerate the variants of sampling z
*/
enum ZSamplingOptions {
FlatZ = 0,
OneOverZ,
OneOverOneMinusZ,
OneOverZOneMinusZ
};
/**
* Generate a z value flat
*/
double generateZ(double r, Energy pt, int sampling,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split,
double& weight) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& info,
const DipoleSplittingKernel&) = 0;
/**
* Get the splitting phasespace weight associated to
* the last call to generateSplitting. This is taken to
* be the single particle phasespace times 16 \pi^2 divided
* by the relevant propagator invariant.
*/
double jacobian() const { return theJacobian; }
/**
* Return true, if this splitting kinematics
* class is capable of delivering an overestimate
* to the jacobian.
*/
virtual bool haveOverestimate() const { return false; }
/**
* Return the overestimated jacobian for the
* last generated parameters.
*/
virtual double jacobianOverestimate() const { return -1.; }
/**
* Return the last generated pt
*/
Energy lastPt() const { return theLastPt; }
/**
* Return the last generated momentum fraction.
*/
double lastZ() const { return theLastZ; }
/**
* Return the last calculated zPrime for massive FF and decay dipoles.
*/
// Do not need in current implementation,
// using lastSplittingParameters instead.
//double lastZPrime() const { return theLastZPrime; }
/**
* Return the last generated azimuthal angle.
*/
double lastPhi() const { return theLastPhi; }
/**
* Return the momentum fraction, by which the emitter's
* momentum fraction should be divided after the splitting.
*/
double lastEmitterZ() const { return theLastEmitterZ; }
/**
* Return the momentum fraction, by which the spectator's
* momentum fraction should be divided after the splitting.
*/
double lastSpectatorZ() const { return theLastSpectatorZ; }
/**
* Return any additional parameters needed to
* evaluate the splitting kernel or to generate the
* full splitting.
*/
const vector<double>& lastSplittingParameters() const { return theLastSplittingParameters; }
/**
* Complete a DipoleSplittingInfo object with
* the parameters generated by the last call to
* generateSplitting()
*/
void prepareSplitting(DipoleSplittingInfo& dInfo);
public:
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo) = 0;
/**
* Return the emitter's momentum after the splitting.
*/
const Lorentz5Momentum& lastEmitterMomentum() const { return theEmitterMomentum; }
/**
* Return the spectator's momentum after the splitting.
*/
const Lorentz5Momentum& lastSpectatorMomentum() const { return theSpectatorMomentum; }
/**
* Return the emission's momentum.
*/
const Lorentz5Momentum& lastEmissionMomentum() const { return theEmissionMomentum; }
/*
* Return true, if there is a transformation which should
* be applied to all other final state particles except the ones
* involved in the splitting after having performed the splitting.
*/
virtual bool doesTransform () const { return false; }
/*
* Use the Dipole scale instead of hardpt for z-boundaries.
*/
int openZBoundaries() const { return theOpenZBoundaries; }
/*
* perform the transformation if required.
*/
virtual Lorentz5Momentum transform (const Lorentz5Momentum& p) const { return p; }
/*
* Return true if this splitting is of a dipole which contains
* a decayed parton and requires the remnant to absorb the recoil.
*/
virtual bool isDecay() const { return false; }
/**
* Perform the recoil in the case of a decayed parton
*/
//virtual Lorentz5Momentum decayRecoil ( const Lorentz5Momentum& p, const int) { return p; }
/**
* Perform the recoil in the case of a decayed parton
*/
virtual void decayRecoil ( PList& ) {};
// {;}
protected:
/**
* Calculate a transverse momentum for the given momenta,
* invariant pt and azimuth.
*/
Lorentz5Momentum getKt(const Lorentz5Momentum& p1,
const Lorentz5Momentum& p2,
Energy pt,
double phi,
bool spacelike = false) const;
/**
* Set the splitting phasespace weight associated to
* the last call to generateSplitting. This is taken to
* be the single particle phasespace times 16 \pi^2 divided
* by the relevant propagator invariant.
*/
void jacobian(double w) { theJacobian = w; }
/**
* Set the last generated pt
*/
void lastPt(Energy p) { theLastPt = p; }
/**
* Set the last generated momentum fraction.
*/
void lastZ(double z) { theLastZ = z; }
/**
* Set the last calculated zPrime for massive FF and decay dipoles.
*/
// Do not need in current implementation,
// using lastSplittingParameters instead.
//void lastZPrime(double zPrime) { theLastZPrime = zPrime; }
/**
* Set the last generated azimuthal angle.
*/
void lastPhi(double p) { theLastPhi = p; }
/**
* Set the momentum fraction, by which the emitter's
* momentum fraction should be divided after the splitting.
*/
void lastEmitterZ(double z) { theLastEmitterZ = z; }
/**
* Set the momentum fraction, by which the spectator's
* momentum fraction should be divided after the splitting.
*/
void lastSpectatorZ(double z) { theLastSpectatorZ = z; }
/**
* Access any additional parameters needed to
* evaluate the splitting kernel or to generate the
* full splitting.
*/
vector<double>& splittingParameters() { return theLastSplittingParameters; }
/**
* Set the emitter's momentum after the splitting.
*/
void emitterMomentum(const Lorentz5Momentum& p) { theEmitterMomentum = p; }
/**
* Set the spectator's momentum after the splitting.
*/
void spectatorMomentum(const Lorentz5Momentum& p) { theSpectatorMomentum = p; }
/**
* Set the emission's momentum.
*/
void emissionMomentum(const Lorentz5Momentum& p) { theEmissionMomentum = p; }
/**
* Set the momentum of the recoil system before the splitting.
* 25/05/2016 - Not currently used.
*/
//void recoilMomentum( const Lorentz5Momentum& mom ) { theRecoilMomentum = mom; }
/**
* Set the momentum of the recoil system after the splitting.
*/
void splitRecoilMomentum( const Lorentz5Momentum& mom ) { theSplitRecoilMomentum = mom; }
/**
* Return the momentum of the recoil system before splitting.
* 25/05/2016 - Not currently used.
*/
//const Lorentz5Momentum& recoilMomentum() const { return theRecoilMomentum; }
/**
* Return the momentum of the recoil system after splitting.
*/
const Lorentz5Momentum& splitRecoilMomentum() const { return theSplitRecoilMomentum; }
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The infrared cutoff associated to this
* splitting kinematics.
*/
Energy theIRCutoff;
/**
* The minimum momentum fraction for
* incoming partons
*/
double theXMin;
/**
* The last calculated splitting phase space weight.
*/
double theJacobian;
/**
* The last generated pt
*/
Energy theLastPt;
/**
* The last generated momentum fraction.
*/
double theLastZ;
/**
* The last calculated zPrime required for massive FF
* and decay kinematics dipoles.
* zPrime := qi.nk / (qi+qj).nk (qj = emission momentum)
*/
// Do not need in current implementation,
// using lastSplittingParameters instead.
//double theLastZPrime;
/**
* The last generated azimuthal angle.
*/
double theLastPhi;
/**
* The momentum fraction, by which the emitter's
* momentum fraction should be divided after the splitting.
*/
double theLastEmitterZ;
/**
* The momentum fraction, by which the spectator's
* momentum fraction should be divided after the splitting.
*/
double theLastSpectatorZ;
/**
* Any additional parameters needed to
* evaluate the splitting kernel or to generate the
* full splitting.
*/
vector<double> theLastSplittingParameters;
/**
* The emitter's momentum after the splitting.
*/
Lorentz5Momentum theEmitterMomentum;
/**
* The emission's momentum after the splitting.
*/
Lorentz5Momentum theEmissionMomentum;
/**
* The spectator's momentum after the splitting.
*/
Lorentz5Momentum theSpectatorMomentum;
/**
* The momentum of the recoil system used in decay dipole kinematics.
* 25/05/2016 - Not currently used
*/
//Lorentz5Momentum theRecoilMomentum;
/**
* The momentum of the recoil system after the splitting, used in decay dipole kinematics.
*/
Lorentz5Momentum theSplitRecoilMomentum;
int theOpenZBoundaries;
protected:
/**
* Pointer to a check histogram object
*/
Ptr<DipoleMCCheck>::ptr theMCCheck;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is an abstract class.
*/
static AbstractClassDescription<DipoleSplittingKinematics> initDipoleSplittingKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleSplittingKinematics & operator=(const DipoleSplittingKinematics &);
+ DipoleSplittingKinematics & operator=(const DipoleSplittingKinematics &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleSplittingKinematics. */
template <>
struct BaseClassTrait<Herwig::DipoleSplittingKinematics,1> {
/** Typedef of the first base class of DipoleSplittingKinematics. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleSplittingKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleSplittingKinematics>
: public ClassTraitsBase<Herwig::DipoleSplittingKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleSplittingKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleSplittingKinematics is implemented. It may also include several, space-separated,
* libraries if the class DipoleSplittingKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleSplittingKinematics_H */
diff --git a/Shower/Dipole/Kinematics/FFLightKinematics.h b/Shower/Dipole/Kinematics/FFLightKinematics.h
--- a/Shower/Dipole/Kinematics/FFLightKinematics.h
+++ b/Shower/Dipole/Kinematics/FFLightKinematics.h
@@ -1,200 +1,200 @@
// -*- C++ -*-
//
// FFLightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFLightKinematics_H
#define HERWIG_FFLightKinematics_H
//
// This is the declaration of the FFLightKinematics class.
//
#include "DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FFLightKinematics implements massless splittings
* off a final-final dipole.
*
*/
class FFLightKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFLightKinematics();
/**
* The destructor.
*/
virtual ~FFLightKinematics();
//@}
public:
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy pt,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& dIndex,
const DipoleSplittingKernel&);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFLightKinematics> initFFLightKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFLightKinematics & operator=(const FFLightKinematics &);
+ FFLightKinematics & operator=(const FFLightKinematics &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFLightKinematics. */
template <>
struct BaseClassTrait<Herwig::FFLightKinematics,1> {
/** Typedef of the first base class of FFLightKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFLightKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFLightKinematics>
: public ClassTraitsBase<Herwig::FFLightKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFLightKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* FFLightKinematics is implemented. It may also include several, space-separated,
* libraries if the class FFLightKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFLightKinematics_H */
diff --git a/Shower/Dipole/Kinematics/FFMassiveKinematics.h b/Shower/Dipole/Kinematics/FFMassiveKinematics.h
--- a/Shower/Dipole/Kinematics/FFMassiveKinematics.h
+++ b/Shower/Dipole/Kinematics/FFMassiveKinematics.h
@@ -1,303 +1,303 @@
// -*- C++ -*-
//
// FFMassiveKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FFMassiveKinematics_H
#define HERWIG_FFMassiveKinematics_H
//
// This is the declaration of the FFMassiveKinematics class.
//
#include "DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Stephen Webster
*
* \brief FFMassiveKinematics implements massive splittings
* off a final-final dipole.
*
*/
class FFMassiveKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FFMassiveKinematics();
/**
* The destructor.
*/
virtual ~FFMassiveKinematics();
//@}
public:
/**
* Return the boundaries in between the evolution
* variable random number is to be sampled; the lower
* cuoff is assumed to correspond to the infrared cutoff.
*/
virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries in between the momentum
* fraction random number is to be sampled.
*/
virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy,
const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const {
return {0.0,1.0};
}
/**
* Return the dipole scale associated to the
* given pair of emitter and spectator. This
* should be the invariant mass or absolute value
* final/final or initial/initial and the absolute
* value of the momentum transfer for intial/final or
* final/initial dipoles.
*/
virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double, double,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr emitter, tPPtr spectator) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for massive
// dipoles, for now anyway.
assert(false);
return ZERO;
}
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for massive
// dipoles, for now anyway.
assert(false);
return ZERO;
}
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the random number associated to
* the given pt.
*/
virtual double ptToRandom(Energy pt, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& dIndex,
const DipoleSplittingKernel& split);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline double rootOfKallen (T a, T b, T c) const {
double sres=a*a + b*b + c*c - 2.*( a*b+a*c+b*c );
return sres>0.?sqrt( sres ):0.; }
/**
* Perform a rotation on both momenta such that the first one will
* point along the (positive) z axis. Rotate back to the original
* reference frame by applying rotateUz(returnedVector) to each momentum.
*/
ThreeVector<double> rotateToZ (Lorentz5Momentum& pTarget, Lorentz5Momentum& p1){
ThreeVector<double> oldAxis = pTarget.vect().unit();
double ct = oldAxis.z(); double st = sqrt( 1.-sqr(ct) ); // cos,sin(theta)
double cp = oldAxis.x()/st; double sp = oldAxis.y()/st; // cos,sin(phi)
pTarget.setZ( pTarget.vect().mag() ); pTarget.setX( 0.*GeV ); pTarget.setY( 0.*GeV );
Lorentz5Momentum p1old = p1;
p1.setX( sp*p1old.x() - cp*p1old.y() );
p1.setY( ct*cp*p1old.x() + ct*sp*p1old.y() - st*p1old.z() );
p1.setZ( st*cp*p1old.x() + st*sp*p1old.y() + ct*p1old.z() );
return oldAxis;
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FFMassiveKinematics> initFFMassiveKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FFMassiveKinematics & operator=(const FFMassiveKinematics &);
+ FFMassiveKinematics & operator=(const FFMassiveKinematics &) = delete;
/**
* Option to use the full jacobian, including the z->zprime jacobian.
**/
bool theFullJacobian;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FFMassiveKinematics. */
template <>
struct BaseClassTrait<Herwig::FFMassiveKinematics,1> {
/** Typedef of the first base class of FFMassiveKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FFMassiveKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FFMassiveKinematics>
: public ClassTraitsBase<Herwig::FFMassiveKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FFMassiveKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* FFMassiveKinematics is implemented. It may also include several, space-separated,
* libraries if the class FFMassiveKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FFMassiveKinematics_H */
diff --git a/Shower/Dipole/Kinematics/FILightKinematics.h b/Shower/Dipole/Kinematics/FILightKinematics.h
--- a/Shower/Dipole/Kinematics/FILightKinematics.h
+++ b/Shower/Dipole/Kinematics/FILightKinematics.h
@@ -1,200 +1,200 @@
// -*- C++ -*-
//
// FILightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FILightKinematics_H
#define HERWIG_FILightKinematics_H
//
// This is the declaration of the FILightKinematics class.
//
#include "DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief FILightKinematics implements massless splittings
* off a final-initial dipole.
*
*/
class FILightKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FILightKinematics();
/**
* The destructor.
*/
virtual ~FILightKinematics();
//@}
public:
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy pt,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& dIndex,
const DipoleSplittingKernel&);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FILightKinematics> initFILightKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FILightKinematics & operator=(const FILightKinematics &);
+ FILightKinematics & operator=(const FILightKinematics &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FILightKinematics. */
template <>
struct BaseClassTrait<Herwig::FILightKinematics,1> {
/** Typedef of the first base class of FILightKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FILightKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FILightKinematics>
: public ClassTraitsBase<Herwig::FILightKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FILightKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* FILightKinematics is implemented. It may also include several, space-separated,
* libraries if the class FILightKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FILightKinematics_H */
diff --git a/Shower/Dipole/Kinematics/FIMassiveDecayKinematics.h b/Shower/Dipole/Kinematics/FIMassiveDecayKinematics.h
--- a/Shower/Dipole/Kinematics/FIMassiveDecayKinematics.h
+++ b/Shower/Dipole/Kinematics/FIMassiveDecayKinematics.h
@@ -1,309 +1,309 @@
// -*- C++ -*-
//
// FIMassiveDecayKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FIMassiveDecayKinematics_H
#define HERWIG_FIMassiveDecayKinematics_H
//
// This is the declaration of the FIMassiveDecayKinematics class.
//
#include "DipoleSplittingKinematics.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Utilities/UtilityBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Stephen Webster
*
* \brief FIMassiveDecayKinematics implements massive splittings
* off a final-initial decay dipole.
*
*/
class FIMassiveDecayKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMassiveDecayKinematics();
/**
* The destructor.
*/
virtual ~FIMassiveDecayKinematics();
//@}
public:
/**
* Return the boundaries in between the evolution
* variable random number is to be sampled; the lower
* cuoff is assumed to correspond to the infrared cutoff.
*/
virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries in between the momentum
* fraction random number is to be sampled.
*/
virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy,
const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const {
return {0.0,1.0};
}
/**
* Return the dipole scale associated to the
* given pair of emitter and spectator. This
* should be the invariant mass or absolute value
* final/final or initial/initial and the absolute
* value of the momentum transfer for intial/final or
* final/initial dipoles.
*/
virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const;
/**
* Return the mass of the system absorbing
* the recoil in the dipole splitting.
* This is only used in decay dipoles.
*/
virtual Energy recoilMassKin(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double, double,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr emitter, tPPtr spectator) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for the decays.
assert(false);
return ZERO;
}
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for the decays.
assert(false);
return ZERO;
}
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the random number associated to
* the given pt.
*/
virtual double ptToRandom(Energy pt, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& info,
const DipoleSplittingKernel& split);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
/*
* Return true if this splitting is of a dipole which contains
* a decayed parton and requires the remnant to absorb the recoil.
*/
virtual bool isDecay() const { return true; }
/**
* Perform the recoil in the case of a decayed parton
*/
virtual void decayRecoil ( PList& recoilSystem ) {
PList::iterator beginRecoil = recoilSystem.begin();
PList::iterator endRecoil = recoilSystem.end();
const ThreeVector<Energy> transformMom = splitRecoilMomentum().vect();
ThePEG::UtilityBase::setMomentum(beginRecoil, endRecoil, transformMom );
}
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline double rootOfKallen (T a, T b, T c) const {
double sres=a*a + b*b + c*c - 2.*( a*b+a*c+b*c );
return sres>0.?sqrt( sres ):0.; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIMassiveDecayKinematics> initFIMassiveDecayKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMassiveDecayKinematics & operator=(const FIMassiveDecayKinematics &);
+ FIMassiveDecayKinematics & operator=(const FIMassiveDecayKinematics &) = delete;
/**
* Option to use the full jacobian, including the z->zprime jacobian.
**/
bool theFullJacobian;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIMassiveDecayKinematics. */
template <>
struct BaseClassTrait<Herwig::FIMassiveDecayKinematics,1> {
/** Typedef of the first base class of FIMassiveDecayKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIMassiveDecayKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIMassiveDecayKinematics>
: public ClassTraitsBase<Herwig::FIMassiveDecayKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIMassiveDecayKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* FIMassiveDecayKinematics is implemented. It may also include several, space-separated,
* libraries if the class FIMassiveDecayKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIMassiveDecayKinematics_H */
diff --git a/Shower/Dipole/Kinematics/FIMassiveKinematics.h b/Shower/Dipole/Kinematics/FIMassiveKinematics.h
--- a/Shower/Dipole/Kinematics/FIMassiveKinematics.h
+++ b/Shower/Dipole/Kinematics/FIMassiveKinematics.h
@@ -1,281 +1,281 @@
// -*- C++ -*-
//
// FILightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_FILightKinematics_H
#define HERWIG_FILightKinematics_H
//
// This is the declaration of the FILightKinematics class.
//
#include "DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief FIMassiveKinematics implements massless splittings
* off a final-initial dipole.
*
*/
class FIMassiveKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
FIMassiveKinematics();
/**
* The destructor.
*/
virtual ~FIMassiveKinematics();
//@}
public:
/**
* Return the boundaries in between the evolution
* variable random number is to be sampled; the lower
* cuoff is assumed to correspond to the infrared cutoff.
*/
virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries in between the momentum
* fraction random number is to be sampled.
*/
virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy,
const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const {
return {0.0,1.0};
}
/**
* Return the dipole scale associated to the
* given pair of emitter and spectator. This
* should be the invariant mass or absolute value
* final/final or initial/initial and the absolute
* value of the momentum transfer for intial/final or
* final/initial dipoles.
*/
virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double, double,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr emitter, tPPtr) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for massive
// dipoles, for now anyway.
assert(false);
return ZERO;
}
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for massive
// dipoles, for now anyway.
assert(false);
return ZERO;
}
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the random number associated to
* the given pt.
*/
virtual double ptToRandom(Energy pt, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& dIndex,
const DipoleSplittingKernel&);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline double rootOfKallen (T a, T b, T c) const {
double sres=a*a + b*b + c*c - 2.*( a*b+a*c+b*c );
return sres>0.?sqrt( sres ):0.; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<FIMassiveKinematics> initFIMassiveKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FIMassiveKinematics & operator=(const FIMassiveKinematics &);
+ FIMassiveKinematics & operator=(const FIMassiveKinematics &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of FIMassiveKinematics. */
template <>
struct BaseClassTrait<Herwig::FIMassiveKinematics,1> {
/** Typedef of the first base class of FIMassiveKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the FIMassiveKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::FIMassiveKinematics>
: public ClassTraitsBase<Herwig::FIMassiveKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::FIMassiveKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* FIMassiveKinematics is implemented. It may also include several, space-separated,
* libraries if the class FIMassiveKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_FIMassiveKinematics_H */
diff --git a/Shower/Dipole/Kinematics/IFLightKinematics.h b/Shower/Dipole/Kinematics/IFLightKinematics.h
--- a/Shower/Dipole/Kinematics/IFLightKinematics.h
+++ b/Shower/Dipole/Kinematics/IFLightKinematics.h
@@ -1,209 +1,209 @@
// -*- C++ -*-
//
// IFLightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFLightKinematics_H
#define HERWIG_IFLightKinematics_H
//
// This is the declaration of the IFLightKinematics class.
//
#include "DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IFLightKinematics implements massless splittings
* off an initial-final dipole.
*
* @see \ref IFLightKinematicsInterfaces "The interfaces"
* defined for IFLightKinematics.
*/
class IFLightKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFLightKinematics();
/**
* The destructor.
*/
virtual ~IFLightKinematics();
//@}
public:
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleIndex&,
const DipoleSplittingKernel&) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy pt,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& dIndex,
const DipoleSplittingKernel&);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFLightKinematics> initIFLightKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFLightKinematics & operator=(const IFLightKinematics &);
+ IFLightKinematics & operator=(const IFLightKinematics &) = delete;
private:
/**
* Wether or not to choose the `collinear' scheme
*/
bool theCollinearScheme;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFLightKinematics. */
template <>
struct BaseClassTrait<Herwig::IFLightKinematics,1> {
/** Typedef of the first base class of IFLightKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFLightKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFLightKinematics>
: public ClassTraitsBase<Herwig::IFLightKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFLightKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* IFLightKinematics is implemented. It may also include several, space-separated,
* libraries if the class IFLightKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFLightKinematics_H */
diff --git a/Shower/Dipole/Kinematics/IFMassiveDecayKinematics.h b/Shower/Dipole/Kinematics/IFMassiveDecayKinematics.h
--- a/Shower/Dipole/Kinematics/IFMassiveDecayKinematics.h
+++ b/Shower/Dipole/Kinematics/IFMassiveDecayKinematics.h
@@ -1,297 +1,297 @@
// -*- C++ -*-
//
// IFMassiveDecayKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFMassiveDecayKinematics_H
#define HERWIG_IFMassiveDecayKinematics_H
//
// This is the declaration of the IFMassiveDecayKinematics class.
//
#include "DipoleSplittingKinematics.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Utilities/UtilityBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Stephen Webster
*
* \brief IFMassiveDecayKinematics implements massive splittings
* off an initial-final decay dipole.
*
*/
class IFMassiveDecayKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMassiveDecayKinematics();
/**
* The destructor.
*/
virtual ~IFMassiveDecayKinematics();
//@}
public:
/**
* Return the boundaries in between the evolution
* variable random number is to be sampled; the lower
* cuoff is assumed to correspond to the infrared cutoff.
*/
virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries in between the momentum
* fraction random number is to be sampled.
*/
virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy,
const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const {
return {0.0,1.0};
}
/**
* Return the dipole scale associated to the
* given pair of emitter and spectator. This
* should be the invariant mass or absolute value
* final/final or initial/initial and the absolute
* value of the momentum transfer for intial/final or
* final/initial dipoles.
*/
virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const;
/**
* Return the mass of the system absorbing
* the recoil in the dipole splitting.
* This is only used in decay dipoles.
*/
virtual Energy recoilMassKin(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for the decays.
assert(false);
return 0.0;
}
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for the decays.
assert(false);
return 0.0;
}
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the random number associated to
* the given pt.
*/
virtual double ptToRandom(Energy pt, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& info,
const DipoleSplittingKernel& split);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
/*
* Return true if this splitting is of a dipole which contains
* a decayed parton and requires the remnant to absorb the recoil.
*/
virtual bool isDecay() const { return true; }
/**
* Perform the recoil in the case of a decayed parton
*/
virtual void decayRecoil ( PList& recoilSystem ) {
PList::iterator beginRecoil = recoilSystem.begin();
PList::iterator endRecoil = recoilSystem.end();
const ThreeVector<double> transformMom = splitRecoilMomentum().vect();
ThePEG::UtilityBase::setMomentum(beginRecoil, endRecoil, transformMom );
}
public:
/**
* Triangular / Kallen function
*/
template <class T>
inline double rootOfKallen (T a, T b, T c) const {
double sres=a*a + b*b + c*c - 2.*( a*b+a*c+b*c );
return sres>0.?sqrt( sres ):0.; }
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFMassiveDecayKinematics> initIFMassiveDecayKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMassiveDecayKinematics & operator=(const IFMassiveDecayKinematics &);
+ IFMassiveDecayKinematics & operator=(const IFMassiveDecayKinematics &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFMassiveDecayKinematics. */
template <>
struct BaseClassTrait<Herwig::IFMassiveDecayKinematics,1> {
/** Typedef of the first base class of IFMassiveDecayKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFMassiveDecayKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFMassiveDecayKinematics>
: public ClassTraitsBase<Herwig::IFMassiveDecayKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFMassiveDecayKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* IFMassiveDecayKinematics is implemented. It may also include several, space-separated,
* libraries if the class IFMassiveDecayKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFMassiveDecayKinematics_H */
diff --git a/Shower/Dipole/Kinematics/IFMassiveKinematics.h b/Shower/Dipole/Kinematics/IFMassiveKinematics.h
--- a/Shower/Dipole/Kinematics/IFMassiveKinematics.h
+++ b/Shower/Dipole/Kinematics/IFMassiveKinematics.h
@@ -1,279 +1,279 @@
// -*- C++ -*-
//
// IFLightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IFLightKinematics_H
#define HERWIG_IFLightKinematics_H
//
// This is the declaration of the IFLightKinematics class.
//
#include "DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Martin Stoll
*
* \brief IFMassiveKinematics implements massless splittings
* off an initial-final dipole.
*
* @see \ref IFMassiveKinematicsInterfaces "The interfaces"
* defined for IFMassiveKinematics.
*/
class IFMassiveKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IFMassiveKinematics();
/**
* The destructor.
*/
virtual ~IFMassiveKinematics();
//@}
public:
/**
* Return the boundaries in between the evolution
* variable random number is to be sampled; the lower
* cuoff is assumed to correspond to the infrared cutoff.
*/
virtual pair<double,double> kappaSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries in between the momentum
* fraction random number is to be sampled.
*/
virtual pair<double,double> xiSupport(const DipoleSplittingInfo& dIndex) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy,
const DipoleSplittingInfo&,
const DipoleSplittingKernel&) const {
return {0.0,1.0};
}
/**
* Return the dipole scale associated to the
* given pair of emitter and spectator. This
* should be the invariant mass or absolute value
* final/final or initial/initial and the absolute
* value of the momentum transfer for intial/final or
* final/initial dipoles.
*/
virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double, double,
const DipoleIndex& dIndex,
const DipoleSplittingKernel& split,
tPPtr emitter, tPPtr) const;
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for massive
// dipoles, for now anyway.
assert(false);
return ZERO;
}
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy,
double, double,
const DipoleIndex&,
const DipoleSplittingKernel&) const {
// Only the DipoleSplittingInfo version should be used for massive
// dipoles, for now anyway.
assert(false);
return ZERO;
}
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the random number associated to
* the given pt.
*/
virtual double ptToRandom(Energy pt, Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& dIndex,
const DipoleSplittingKernel&);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IFMassiveKinematics> initIFMassiveKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IFMassiveKinematics & operator=(const IFMassiveKinematics &);
+ IFMassiveKinematics & operator=(const IFMassiveKinematics &) = delete;
private:
/**
* Wether or not to choose the `collinear' scheme
*/
bool theCollinearScheme;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IFMassiveKinematics. */
template <>
struct BaseClassTrait<Herwig::IFMassiveKinematics,1> {
/** Typedef of the first base class of IFMassiveKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IFMassiveKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IFMassiveKinematics>
: public ClassTraitsBase<Herwig::IFMassiveKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IFMassiveKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* IFMassiveKinematics is implemented. It may also include several, space-separated,
* libraries if the class IFMassiveKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IFMassiveKinematics_H */
diff --git a/Shower/Dipole/Kinematics/IILightKinematics.h b/Shower/Dipole/Kinematics/IILightKinematics.h
--- a/Shower/Dipole/Kinematics/IILightKinematics.h
+++ b/Shower/Dipole/Kinematics/IILightKinematics.h
@@ -1,232 +1,232 @@
// -*- C++ -*-
//
// IILightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IILightKinematics_H
#define HERWIG_IILightKinematics_H
//
// This is the declaration of the IILightKinematics class.
//
#include "DipoleSplittingKinematics.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IILightKinematics implements massless splittings
* off an initial-initial dipole.
*
* @see \ref IILightKinematicsInterfaces "The interfaces"
* defined for IILightKinematics.
*/
class IILightKinematics: public DipoleSplittingKinematics {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IILightKinematics();
/**
* The destructor.
*/
virtual ~IILightKinematics();
//@}
public:
/**
* Return the maximum pt for the given dipole scale.
*/
virtual Energy ptMax(Energy dScale,
double emX, double specX,
const DipoleIndex&,
const DipoleSplittingKernel&) const;
/**
* Return the maximum virtuality for the given dipole scale.
*/
virtual Energy QMax(Energy dScale,
double emX, double specX,
const DipoleIndex& dIndex,
const DipoleSplittingKernel&) const;
/**
* Return the pt given a virtuality.
*/
virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the virtuality given a pt.
*/
virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const;
/**
* Return the boundaries on the momentum fraction
*/
virtual pair<double,double> zBoundaries(Energy pt,
const DipoleSplittingInfo& dInfo,
const DipoleSplittingKernel& split) const;
/**
* Generate splitting variables given three random numbers
* and the momentum fractions of the emitter and spectator.
* Return true on success.
*/
virtual bool generateSplitting(double kappa, double xi, double phi,
DipoleSplittingInfo& dIndex,
const DipoleSplittingKernel&);
/**
* Generate the full kinematics given emitter and
* spectator momentum and a previously completeted
* DipoleSplittingInfo object.
*/
virtual void generateKinematics(const Lorentz5Momentum& pEmitter,
const Lorentz5Momentum& pSpectator,
const DipoleSplittingInfo& dInfo);
/*
* Return true, if there is a transformation which should
* be applied to all other final state particles except the ones
* involved in the splitting after having performed the splitting
*/
virtual bool doesTransform () const { return theCollinearScheme || didCollinear; }
/*
* perform the transformation, if existing
*/
virtual Lorentz5Momentum transform (const Lorentz5Momentum& p) const {
if ( !theCollinearScheme && !didCollinear ) return p;
return p-(2.*(KplusKtilde*p)/KplusKtilde2)*KplusKtilde+(2.*(Ktilde*p)/K2)*K;
}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IILightKinematics> initIILightKinematics;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IILightKinematics & operator=(const IILightKinematics &);
+ IILightKinematics & operator=(const IILightKinematics &) = delete;
private:
/**
* Wether or not to choose the `collinear' scheme
*/
bool theCollinearScheme;
bool didCollinear;
Lorentz5Momentum K;
Energy2 K2;
Lorentz5Momentum Ktilde;
Lorentz5Momentum KplusKtilde;
Energy2 KplusKtilde2;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IILightKinematics. */
template <>
struct BaseClassTrait<Herwig::IILightKinematics,1> {
/** Typedef of the first base class of IILightKinematics. */
typedef Herwig::DipoleSplittingKinematics NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IILightKinematics class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IILightKinematics>
: public ClassTraitsBase<Herwig::IILightKinematics> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IILightKinematics"; }
/**
* The name of a file containing the dynamic library where the class
* IILightKinematics is implemented. It may also include several, space-separated,
* libraries if the class IILightKinematics depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IILightKinematics_H */
diff --git a/Shower/Dipole/Makefile.am b/Shower/Dipole/Makefile.am
--- a/Shower/Dipole/Makefile.am
+++ b/Shower/Dipole/Makefile.am
@@ -1,23 +1,23 @@
SUBDIRS = Base Kernels Kinematics Utility AlphaS Merging Colorea
pkglib_LTLIBRARIES = HwDipoleShower.la
-HwDipoleShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 9:1:0
+HwDipoleShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 10:0:0
HwDipoleShower_la_LIBADD = \
Base/libHwDipoleShowerBase.la \
Kernels/libHwDipoleShowerKernels.la \
Kinematics/libHwDipoleShowerKinematics.la \
Utility/libHwDipoleShowerUtility.la \
Merging/libHwDipoleShowerMerging.la \
Colorea/libHwDipoleShowerColorea.la
HwDipoleShower_la_SOURCES = \
DipoleShowerHandler.h DipoleShowerHandler.fh DipoleShowerHandler.cc
pkglib_LTLIBRARIES += HwKrknloEventReweight.la
HwKrknloEventReweight_la_SOURCES = \
KrkNLO/KrknloEventReweight.h KrkNLO/KrknloEventReweight.cc
-HwKrknloEventReweight_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0
+HwKrknloEventReweight_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0
diff --git a/Shower/Dipole/Utility/ConstituentReshuffler.h b/Shower/Dipole/Utility/ConstituentReshuffler.h
--- a/Shower/Dipole/Utility/ConstituentReshuffler.h
+++ b/Shower/Dipole/Utility/ConstituentReshuffler.h
@@ -1,290 +1,290 @@
// -*- C++ -*-
//
// ConstituentReshuffler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ConstituentReshuffler_H
#define HERWIG_ConstituentReshuffler_H
//
// This is the declaration of the ConstituentReshuffler class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Utilities/Exception.h"
#include "Herwig/Shower/PerturbativeProcess.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer, Stephen Webster
*
* \brief The ConstituentReshuffler class implements reshuffling
* of partons on their nominal mass shell to their constituent
* mass shells.
*
*/
class ConstituentReshuffler: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ConstituentReshuffler();
/**
* The destructor.
*/
virtual ~ConstituentReshuffler();
//@}
public:
/**
* Reshuffle the outgoing partons to constituent
* masses. Optionally, incoming partons are given
* to absorb recoils. Add the non-reshuffled partons
* to the intermediates list. Throw ConstituentReshufflerProblem
* if a numerical problem prevents the solution of
* the reshuffling equation.
*/
void reshuffle(PList& out,
PPair& in,
PList& intermediates,
const bool decay,
PList& decayPartons,
PList& decayRecoilers);
/**
* Reshuffle the outgoing partons to constituent
* masses. Optionally, incoming partons are given
* to absorb recoils. Add the non-reshuffled partons
* to the intermediates list. Throw ConstituentReshufflerProblem
* if a numerical problem prevents the solution of
* the reshuffling equation.
*/
void reshuffle(PList& out,
PPair& in,
PList& intermediates,
const bool decay=false) {
PList decayPartons;
PList decayRecoilers;
reshuffle(out,
in,
intermediates,
decay,
decayPartons,
decayRecoilers);
}
/**
* Reshuffle the outgoing partons following the showering
* of the initial hard interaction to constituent masses,
* for the case of outgoing decaying particles.
* Throw ConstituentReshufflerProblem
* if a numerical problem prevents the solution of
* the reshuffling equation.
*/
void hardProcDecayReshuffle(PList& decaying,
PList& eventOutgoing,
PList& eventHard,
PPair& eventIncoming,
PList& eventIntermediates) ;
/**
* Reshuffle the outgoing partons following the showering
* of a particle decay to constituent masses.
* Throw ConstituentReshufflerProblem
* if a numerical problem prevents the solution of
* the reshuffling equation.
*/
void decayReshuffle(PerturbativeProcessPtr& decayProc,
PList& eventOutgoing,
PList& eventHard,
PList& eventIntermediates) ;
/**
* Update the dipole event record and, if appropriate,
* the relevant decay process.
**/
void updateEvent( PList& intermediates,
PList& eventIntermediates,
PList& out,
PList& eventOutgoing,
PList& eventHard,
PerturbativeProcessPtr decayProc = PerturbativeProcessPtr() ) ;
protected:
/**
* The function object defining the equation
* to be solved.
*/
struct ReshuffleEquation {
ReshuffleEquation (Energy q,
PList::iterator m_begin,
PList::iterator m_end)
: w(q), p_begin(m_begin), p_end(m_end) {}
typedef double ArgType;
typedef double ValType;
static double aUnit();
static double vUnit();
double operator() (double xi) const;
Energy w;
PList::iterator p_begin;
PList::iterator p_end;
};
/**
* The function object defining the equation
* to be solved in the case of separate recoilers
* TODO - refine the whole implementation of separate partons and recoilers
*/
struct DecayReshuffleEquation {
DecayReshuffleEquation (Energy q,
PList::iterator m_begin,
PList::iterator m_end,
PList::iterator n_begin,
PList::iterator n_end)
: w(q), p_begin(m_begin), p_end(m_end), r_begin(n_begin), r_end(n_end) {}
typedef double ArgType;
typedef double ValType;
static double aUnit();
static double vUnit();
double operator() (double xi) const;
Energy w;
PList::iterator p_begin;
PList::iterator p_end;
PList::iterator r_begin;
PList::iterator r_end;
};
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<ConstituentReshuffler> initConstituentReshuffler;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ConstituentReshuffler & operator=(const ConstituentReshuffler &);
+ ConstituentReshuffler & operator=(const ConstituentReshuffler &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of ConstituentReshuffler. */
template <>
struct BaseClassTrait<Herwig::ConstituentReshuffler,1> {
/** Typedef of the first base class of ConstituentReshuffler. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the ConstituentReshuffler class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::ConstituentReshuffler>
: public ClassTraitsBase<Herwig::ConstituentReshuffler> {
/** Return a platform-independent class name */
static string className() { return "Herwig::ConstituentReshuffler"; }
/**
* The name of a file containing the dynamic library where the class
* ConstituentReshuffler is implemented. It may also include several, space-separated,
* libraries if the class ConstituentReshuffler depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_ConstituentReshuffler_H */
diff --git a/Shower/Dipole/Utility/DipoleMCCheck.h b/Shower/Dipole/Utility/DipoleMCCheck.h
--- a/Shower/Dipole/Utility/DipoleMCCheck.h
+++ b/Shower/Dipole/Utility/DipoleMCCheck.h
@@ -1,231 +1,231 @@
// -*- C++ -*-
//
// DipoleMCCheck.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_DipoleMCCheck_H
#define HERWIG_DipoleMCCheck_H
//
// This is the declaration of the DipoleMCCheck class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief DipoleMCCheck is used to perform checks for
* the dipole shower.
*
* @see \ref DipoleMCCheckInterfaces "The interfaces"
* defined for DipoleMCCheck.
*/
class DipoleMCCheck: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
DipoleMCCheck();
/**
* The destructor.
*/
virtual ~DipoleMCCheck();
//@}
public:
/**
* Book a point.
*/
void book(double xe,double xs,
Energy dScale,
Energy hardPt,
Energy pt, double z,
double weight);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The number of bins in the starting scale
* divided by the dipole scale, the upper bound
* is 1/2.
*/
unsigned int theHardPtBins;
/**
* The number of bins in the emitter fraction.
* The lenght of the zero bin is taken to be
* 10^(-7).
*/
unsigned int theEmitterXBins;
/**
* The number of bins in the spectator fraction.
* The lenght of the zero bin is taken to be
* 10^(-7).
*/
unsigned int theSpectatorXBins;
/**
* The number of bins in pt dicided by the
* dipole scale; the upper bound is 1/2
*/
unsigned int thePtBins;
/**
* The number of bins in z
*/
unsigned int theZBins;
/**
* The recursive map structure: xe, xs, hard pt / GeV
* to histograms for pt and z;
* output is done such that there's one file for each
* xe,xs bin, including all histograms for the
* hard pt bins.
*/
map<double,
map<double,
map<double,
pair<Ptr<Histogram>::ptr,Ptr<Histogram>::ptr>
>
>
> histoMap;
/**
* Helper to make logarithmic bins.
*/
vector<double> makeLogBins(double xlow, double xup, unsigned int n) const;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<DipoleMCCheck> initDipoleMCCheck;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DipoleMCCheck & operator=(const DipoleMCCheck &);
+ DipoleMCCheck & operator=(const DipoleMCCheck &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of DipoleMCCheck. */
template <>
struct BaseClassTrait<Herwig::DipoleMCCheck,1> {
/** Typedef of the first base class of DipoleMCCheck. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the DipoleMCCheck class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::DipoleMCCheck>
: public ClassTraitsBase<Herwig::DipoleMCCheck> {
/** Return a platform-independent class name */
static string className() { return "Herwig::DipoleMCCheck"; }
/**
* The name of a file containing the dynamic library where the class
* DipoleMCCheck is implemented. It may also include several, space-separated,
* libraries if the class DipoleMCCheck depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_DipoleMCCheck_H */
diff --git a/Shower/Dipole/Utility/IntrinsicPtGenerator.h b/Shower/Dipole/Utility/IntrinsicPtGenerator.h
--- a/Shower/Dipole/Utility/IntrinsicPtGenerator.h
+++ b/Shower/Dipole/Utility/IntrinsicPtGenerator.h
@@ -1,174 +1,174 @@
// -*- C++ -*-
//
// IntrinsicPtGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_IntrinsicPtGenerator_H
#define HERWIG_IntrinsicPtGenerator_H
//
// This is the declaration of the IntrinsicPtGenerator class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/Vectors/SpinOneLorentzRotation.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief IntrinsicPtGenerator generates intrinsic pt for massless
* incoming partons in a shower independent way.
*
* @see \ref IntrinsicPtGeneratorInterfaces "The interfaces"
* defined for IntrinsicPtGenerator.
*/
class IntrinsicPtGenerator: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
IntrinsicPtGenerator();
/**
* The destructor.
*/
virtual ~IntrinsicPtGenerator();
//@}
public:
/**
* Generate intrinsic pt for the given incoming
* partons and return the transformation to be
* applied on the final state particles. Add the
* old incoming partons to the given list.
*/
SpinOneLorentzRotation kick(PPair& in,
PList& intermediates);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The mean of the Gaussian distribution for
* the intrinsic pt of valence partons.
*/
Energy theValenceIntrinsicPtScale;
/**
* The mean of the Gaussian distribution for
* the intrinsic pt of sea partons.
*/
Energy theSeaIntrinsicPtScale;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<IntrinsicPtGenerator> initIntrinsicPtGenerator;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- IntrinsicPtGenerator & operator=(const IntrinsicPtGenerator &);
+ IntrinsicPtGenerator & operator=(const IntrinsicPtGenerator &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of IntrinsicPtGenerator. */
template <>
struct BaseClassTrait<Herwig::IntrinsicPtGenerator,1> {
/** Typedef of the first base class of IntrinsicPtGenerator. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the IntrinsicPtGenerator class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::IntrinsicPtGenerator>
: public ClassTraitsBase<Herwig::IntrinsicPtGenerator> {
/** Return a platform-independent class name */
static string className() { return "Herwig::IntrinsicPtGenerator"; }
/**
* The name of a file containing the dynamic library where the class
* IntrinsicPtGenerator is implemented. It may also include several, space-separated,
* libraries if the class IntrinsicPtGenerator depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_IntrinsicPtGenerator_H */
diff --git a/Shower/Dipole/Utility/PDFRatio.h b/Shower/Dipole/Utility/PDFRatio.h
--- a/Shower/Dipole/Utility/PDFRatio.h
+++ b/Shower/Dipole/Utility/PDFRatio.h
@@ -1,178 +1,178 @@
// -*- C++ -*-
//
// PDFRatio.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PDFRatio_H
#define HERWIG_PDFRatio_H
//
// This is the declaration of the PDFRatio class.
//
#include "ThePEG/Handlers/HandlerBase.h"
#include "ThePEG/PDF/PDF.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup DipoleShower
* \author Simon Platzer
*
* \brief PDFRatio implements numerically stable PDF ratios.
*
* @see \ref PDFRatioInterfaces "The interfaces"
* defined for PDFRatio.
*/
class PDFRatio: public HandlerBase {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
PDFRatio();
/**
* The destructor.
*/
virtual ~PDFRatio();
//@}
public:
/**
* For the given PDF, scale and partons from and to and
* x,z values return the ratio xf_to(x/z) / xf_from(x)
*/
double operator() (const PDF& pdf,
Energy2 scale,
tcPDPtr from, tcPDPtr to,
double x, double z) const;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The x from which on extrapolation should
* be done for valence partons.
*/
double theValenceExtrapolation;
/**
* The x from which on extrapolation should
* be done for sea partons.
*/
double theSeaExtrapolation;
/**
* The scale below which the PDF will be frozen
*/
Energy theFreezingScale;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<PDFRatio> initPDFRatio;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PDFRatio & operator=(const PDFRatio &);
+ PDFRatio & operator=(const PDFRatio &) = delete;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of PDFRatio. */
template <>
struct BaseClassTrait<Herwig::PDFRatio,1> {
/** Typedef of the first base class of PDFRatio. */
typedef HandlerBase NthBase;
};
/** This template specialization informs ThePEG about the name of
* the PDFRatio class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::PDFRatio>
: public ClassTraitsBase<Herwig::PDFRatio> {
/** Return a platform-independent class name */
static string className() { return "Herwig::PDFRatio"; }
/**
* The name of a file containing the dynamic library where the class
* PDFRatio is implemented. It may also include several, space-separated,
* libraries if the class PDFRatio depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwDipoleShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_PDFRatio_H */
diff --git a/Shower/QTilde/Base/Branching.h b/Shower/QTilde/Base/Branching.h
--- a/Shower/QTilde/Base/Branching.h
+++ b/Shower/QTilde/Base/Branching.h
@@ -1,69 +1,69 @@
// -*- C++ -*-
#ifndef HERWIG_Branching_H
#define HERWIG_Branching_H
//
// This is the declaration of the Branching struct.
//
#include "Herwig/Shower/QTilde/ShowerConfig.h"
#include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
* The branching struct is used to store information on the branching.
* The kinematics variable is a pointer to the ShowerKinematics for the branching
* The sudakov variable is a pointer to the SudakovFormFactor for the branching
* The ids variable is the list of particles in the branching
*/
struct Branching {
/**
* Pointer to the ShowerKinematics object for the branching
*/
ShoKinPtr kinematics;
/**
* PDG codes of the particles in the branching
*/
IdList ids;
/**
* The SudakovFormFactor for the branching
*/
tSudakovPtr sudakov;
/**
* The type of radiation line
*/
ShowerPartnerType type;
/**
* Whether or not it keep from forced hard emisson
*/
bool hard;
/**
* Which of the children is same as incoming
*/
unsigned int iout;
/**
* Constructor for the struct
* @param a pointer to the ShowerKinematics object for the branching
* @param c PDG codes of the particles in the branching
* @param d The SudakovFormFactor for the branching
*/
Branching(ShoKinPtr a, IdList c,tSudakovPtr d,ShowerPartnerType t)
: kinematics(a), ids(c), sudakov(d), type(t), hard(false), iout(0) {}
/**
* Default constructor
*/
- Branching() : hard(false), iout(0) {}
+ Branching() : type(ShowerPartnerType::Undefined), hard(false), iout(0) {}
};
}
#endif /* HERWIG_Branching_H */
diff --git a/Shower/QTilde/Base/FullShowerVeto.h b/Shower/QTilde/Base/FullShowerVeto.h
--- a/Shower/QTilde/Base/FullShowerVeto.h
+++ b/Shower/QTilde/Base/FullShowerVeto.h
@@ -1,155 +1,155 @@
// -*- C++ -*-
#ifndef Herwig_FullShowerVeto_H
#define Herwig_FullShowerVeto_H
//
// This is the declaration of the FullShowerVeto class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "FullShowerVeto.fh"
#include "Herwig/Shower/QTilde/Base/ShowerTree.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the FullShowerVeto class.
*
* @see \ref FullShowerVetoInterfaces "The interfaces"
* defined for FullShowerVeto.
*/
class FullShowerVeto: public Interfaced {
public:
/**
* The default constructor.
*/
FullShowerVeto() : type_(1), behaviour_(0) {}
/**
* Apply the veto
*/
int applyVeto(ShowerTreePtr);
/**
* Which type of processes to consider
*/
unsigned int type() const {return type_;}
/**
* What to do if the event is vetoed
*/
unsigned int behaviour() const {return behaviour_;}
protected:
/**
* Determine whether to not to veto the shower, to be implemented in inheriting classes
*/
virtual bool vetoShower() = 0;
/**
* Incoming particles to the hard process
*/
const vector<tPPtr> & incoming() {return incoming_;}
/**
* Outgoing particles from the hard process
*/
const vector<tPPtr> & outgoing() {return outgoing_;}
/**
* The final-state particles at the end of the shower
*/
const vector<tPPtr> & finalState();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FullShowerVeto & operator=(const FullShowerVeto &);
+ FullShowerVeto & operator=(const FullShowerVeto &) = delete;
private:
/**
* Switches
*/
//@{
/**
* Which type of processes to consider
*/
unsigned int type_;
/**
* What to do if the event is vetoed
*/
unsigned int behaviour_;
//}
/**
* Temporary storage
*/
//@{
/**
* Incoming to hard process
*/
vector<tPPtr> incoming_;
/**
* Outgoing from the hard process
*/
vector<tPPtr> outgoing_;
/**
* Final State particles
*/
vector<tPPtr> finalState_;
//@}
};
}
#endif /* Herwig_FullShowerVeto_H */
diff --git a/Shower/QTilde/Base/PartnerFinder.h b/Shower/QTilde/Base/PartnerFinder.h
--- a/Shower/QTilde/Base/PartnerFinder.h
+++ b/Shower/QTilde/Base/PartnerFinder.h
@@ -1,230 +1,230 @@
// -*- C++ -*-
//
// PartnerFinder.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PartnerFinder_H
#define HERWIG_PartnerFinder_H
//
// This is the declaration of the PartnerFinder class.
//
#include "Herwig/Shower/QTilde/ShowerConfig.h"
#include "ThePEG/Interface/Interfaced.h"
#include "PartnerFinder.fh"
namespace Herwig {
using namespace ThePEG;
/**
* typedef of a pair of particle for calculating the evolution scales
*/
typedef pair<tShowerParticlePtr,tShowerParticlePtr> ShowerPPair;
/** \ingroup Shower
*
* This class is responsible of two related tasks:
* - it finds the partners
* - for each pair of partners (and interaction therefore)
* it sets the initial evolution scales of both of them.
*
* In general the finding of the partners is performed by this class but
* the calculation of the initial evolution scales should be implemented
* for different shower evolution models in classes inheriting from this one.
* Notice that a given particle has, in general, a different partner
* for each different interaction; however, given a partner, its
* initial evolution scale, Q, is purely a kinematical relationship
* between the pair, without dependence on the dynamics (i.e. type of interaction).
*
* @see \ref PartnerFinderInterfaces "The interfaces"
* defined for PartnerFinder.
*/
class PartnerFinder: public Interfaced {
public:
/**
* The default constructor.
*/
PartnerFinder() : partnerMethod_(0), QEDPartner_(0), scaleChoice_(0) {}
/**
* Given in input a collection of particles (ShowerParticle objects),
* each of these methods set the initial evolution scales of those particles,
* between the ones given in input, that do not have yet their
* evolution scale set.
* The input collection of particles can be either the full collection of
* showering particles (kept in the main class ShowerHandler,
* in the case isDecayCase is false, or simply, in the case isDecayCase
* is true, the decaying particle and its decay products.
* The methods returns true, unless something wrong (inconsistencies,
* or undefined values) happens.
*
* These methods are virtual but in most cases inheriting classes should not
* need to overide them as they simply find the relevant partner and call
* one of the calculateScale members to calculate the scale.
*/
//@{
/**
* Set the initial scales
* @param particles The particles to be considered
* @param isDecayCase Whether or not this is a decay
* @param setPartners Whether to set the colour partners or just the scales
*/
virtual void setInitialEvolutionScales(const ShowerParticleVector &particles,
const bool isDecayCase,
ShowerInteraction,
const bool setPartners=true);
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Members to set the scales for different interactions
*/
//@{
/**
* Set initial scales for a QCD interaction
*/
virtual void setInitialQCDEvolutionScales(const ShowerParticleVector &particles,
const bool isDecayCase,
const bool setPartners=true);
/**
* Set initial scales for a QED interaction
*/
virtual void setInitialQEDEvolutionScales(const ShowerParticleVector &particles,
const bool isDecayCase,
const bool setPartners=true);
//@}
/**
* Find the QCD partners
* @param particle The particle to find the partners for
* @param particles The full set of particles to search
*/
vector< pair<ShowerPartnerType, tShowerParticlePtr> >
findQCDPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles);
/**
* Find the QED partners
* @param particle The particle to find the partners for
* @param particles The full set of particles to search
*/
vector< pair<double, tShowerParticlePtr> >
findQEDPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles,
const bool isDecayCase);
public:
/**
* Given a pair of particles, supposedly partners w.r.t. an interaction,
* this method returns their initial evolution scales as a pair.
* If something wrong happens, it returns the null (ZERO,ZERO) pair.
* This method is used by the above setXXXInitialEvolutionScales
* methods.
* These methods must be overiden in inheriting classes
*/
//@{
/**
* General method to calculate the initial evolution scales
*/
pair<Energy,Energy> calculateInitialEvolutionScales(const ShowerPPair &,
const bool isDecayCase);
/**
* Calculate the initial evolution scales given momenta
*/
pair<Energy,Energy> calculateFinalFinalScales(const Lorentz5Momentum & p1,
const Lorentz5Momentum & p2);
/**
* Calculate the initial evolution scales given momenta
*/
pair<Energy,Energy> calculateInitialInitialScales(const Lorentz5Momentum& p1,
const Lorentz5Momentum& p2);
/**
* Calculate the initial evolution scales given momenta
*/
pair<Energy,Energy> calculateInitialFinalScales(const Lorentz5Momentum& pb, const Lorentz5Momentum& pc,
const bool isDecayCase);
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PartnerFinder & operator=(const PartnerFinder &);
+ PartnerFinder & operator=(const PartnerFinder &) = delete;
private:
/**
* Method for choosing colour partner
*/
int partnerMethod_;
/**
* Choice for the QED radiation partner
*/
int QEDPartner_;
/**
* Choice of the scale
*/
int scaleChoice_;
};
}
#endif /* HERWIG_PartnerFinder_H */
diff --git a/Shower/QTilde/Base/ShowerParticle.h b/Shower/QTilde/Base/ShowerParticle.h
--- a/Shower/QTilde/Base/ShowerParticle.h
+++ b/Shower/QTilde/Base/ShowerParticle.h
@@ -1,523 +1,523 @@
// -*- C++ -*-
//
// ShowerParticle.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ShowerParticle_H
#define HERWIG_ShowerParticle_H
//
// This is the declaration of the ShowerParticle class.
//
#include "ThePEG/EventRecord/Particle.h"
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.fh"
#include "Herwig/Shower/QTilde/ShowerConfig.h"
#include "Herwig/Shower/QTilde/Kinematics/ShowerBasis.h"
#include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.h"
#include "ShowerParticle.fh"
#include <iosfwd>
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
* This class represents a particle in the showering process.
* It inherits from the Particle class of ThePEG and has some
* specifics information useful only during the showering process.
*
* Notice that:
* - for forward evolution, it is clear what is meant by parent/child;
* for backward evolution, however, it depends whether we want
* to keep a physical picture or a Monte-Carlo effective one.
* In the former case, an incoming particle (emitting particle)
* splits into an emitted particle and the emitting particle after
* the emission: the latter two are then children of the
* emitting particle, the parent. In the Monte-Carlo effective
* picture, we have that the particle close to the hard subprocess,
* with higher (space-like) virtuality, splits into an emitted particle
* and the emitting particle at lower virtuality: the latter two are,
* in this case, the children of the first one, the parent. However we
* choose a more physical picture where the new emitting particle is the
* parented of the emitted final-state particle and the original emitting
* particle.
* - the pointer to a SplitFun object is set only in the case
* that the particle has undergone a shower emission. This is similar to
* the case of the decay of a normal Particle where
* the pointer to a Decayer object is set only in the case
* that the particle has undergone to a decay.
* In the case of particle connected directly to the hard subprocess,
* there is no pointer to the hard subprocess, but there is a method
* isFromHardSubprocess() which returns true only in this case.
*
* @see Particle
* @see ShowerConfig
* @see ShowerKinematics
*/
class ShowerParticle: public Particle {
public:
/**
* Struct for all the info on an evolution partner
*/
struct EvolutionPartner {
/**
* Constructor
*/
EvolutionPartner(tShowerParticlePtr p,double w, ShowerPartnerType t,
Energy s) : partner(p), weight(w), type(t), scale(s)
{}
/**
* The partner
*/
tShowerParticlePtr partner;
/**
* Weight
*/
double weight;
/**
* Type
*/
ShowerPartnerType type;
/**
* The assoicated evolution scale
*/
Energy scale;
};
/**
* Struct to store the evolution scales
*/
struct EvolutionScales {
/**
* Constructor
*/
EvolutionScales() : QED(),QCD_c(),QCD_ac(),
QED_noAO(),QCD_c_noAO(),QCD_ac_noAO()
{}
/**
* QED scale
*/
Energy QED;
/**
* QCD colour scale
*/
Energy QCD_c;
/**
* QCD anticolour scale
*/
Energy QCD_ac;
/**
* QED scale
*/
Energy QED_noAO;
/**
* QCD colour scale
*/
Energy QCD_c_noAO;
/**
* QCD anticolour scale
*/
Energy QCD_ac_noAO;
};
/** @name Construction and descruction functions. */
//@{
/**
* Standard Constructor. Note that the default constructor is
* private - there is no particle without a pointer to a
* ParticleData object.
* @param x the ParticleData object
* @param fs Whether or not the particle is an inital or final-state particle
* @param tls Whether or not the particle initiates a time-like shower
*/
ShowerParticle(tcEventPDPtr x, bool fs, bool tls=false)
: Particle(x), _isFinalState(fs),
_perturbative(0), _initiatesTLS(tls), _x(1.0), _showerKinematics(),
_vMass(ZERO), _thePEGBase() {}
/**
* Copy constructor from a ThePEG Particle
* @param x ThePEG particle
* @param pert Where the particle came from
* @param fs Whether or not the particle is an inital or final-state particle
* @param tls Whether or not the particle initiates a time-like shower
*/
ShowerParticle(const Particle & x, unsigned int pert, bool fs, bool tls=false)
: Particle(x), _isFinalState(fs),
_perturbative(pert), _initiatesTLS(tls), _x(1.0), _showerKinematics(),
_vMass(ZERO), _thePEGBase(&x) {}
//@}
public:
/**
* Set a preliminary momentum for the particle
*/
void setShowerMomentum(bool timelike);
/**
* Construct the spin info object for a shower particle
*/
void constructSpinInfo(bool timelike);
/**
* Perform any initial calculations needed after the branching has been selected
*/
void initializeDecay();
/**
* Perform any initial calculations needed after the branching has been selected
* @param parent The beam particle
*/
void initializeInitialState(PPtr parent);
/**
* Perform any initial calculations needed after the branching has been selected
*/
void initializeFinalState();
/**
* Access/Set various flags about the state of the particle
*/
//@{
/**
* Access the flag that tells if the particle is final state
* or initial state.
*/
bool isFinalState() const { return _isFinalState; }
/**
* Access the flag that tells if the particle is initiating a
* time like shower when it has been emitted in an initial state shower.
*/
bool initiatesTLS() const { return _initiatesTLS; }
/**
* Access the flag which tells us where the particle came from
* This is 0 for a particle produced in the shower, 1 if the particle came
* from the hard sub-process and 2 is it came from a decay.
*/
unsigned int perturbative() const { return _perturbative; }
//@}
/**
* Set/Get the momentum fraction for initial-state particles
*/
//@{
/**
* For an initial state particle get the fraction of the beam momentum
*/
void x(double x) { _x = x; }
/**
* For an initial state particle set the fraction of the beam momentum
*/
double x() const { return _x; }
//@}
/**
* Set/Get methods for the ShowerKinematics objects
*/
//@{
/**
* Access/ the ShowerKinematics object.
*/
const ShoKinPtr & showerKinematics() const { return _showerKinematics; }
/**
* Set the ShowerKinematics object.
*/
void showerKinematics(const ShoKinPtr in) { _showerKinematics = in; }
//@}
/**
* Set/Get methods for the ShowerBasis objects
*/
//@{
/**
* Access/ the ShowerBasis object.
*/
const ShowerBasisPtr & showerBasis() const { return _showerBasis; }
/**
* Set the ShowerBasis object.
*/
void showerBasis(const ShowerBasisPtr in, bool copy) {
if(!copy)
_showerBasis = in;
else {
_showerBasis = new_ptr(ShowerBasis());
_showerBasis->setBasis(in->pVector(),in->nVector(),in->frame());
}
}
//@}
/**
* Members relating to the initial evolution scale and partner for the particle
*/
//@{
/**
* Veto emission at a given scale
*/
void vetoEmission(ShowerPartnerType type, Energy scale);
/**
* Access to the evolution scales
*/
const EvolutionScales & scales() const {return scales_;}
/**
* Access to the evolution scales
*/
EvolutionScales & scales() {return scales_;}
/**
* Return the virtual mass\f$
*/
Energy virtualMass() const { return _vMass; }
/**
* Set the virtual mass
*/
void virtualMass(Energy mass) { _vMass = mass; }
/**
* Return the partner
*/
tShowerParticlePtr partner() const { return _partner; }
/**
* Set the partner
*/
void partner(const tShowerParticlePtr partner) { _partner = partner; }
/**
* Get the possible partners
*/
vector<EvolutionPartner> & partners() { return partners_; }
/**
* Add a possible partners
*/
void addPartner(EvolutionPartner in );
/**
* Clear the evolution partners
*/
void clearPartners() { partners_.clear(); }
/**
* Return the progenitor of the shower
*/
tShowerParticlePtr progenitor() const { return _progenitor; }
/**
* Set the progenitor of the shower
*/
void progenitor(const tShowerParticlePtr progenitor) { _progenitor = progenitor; }
//@}
/**
* Members to store and provide access to variables for a specific
* shower evolution scheme
*/
//@{
struct Parameters {
Parameters() : alpha(1.), beta(), ptx(), pty(), pt() {}
double alpha;
double beta;
Energy ptx;
Energy pty;
Energy pt;
};
/**
* Set the vector containing dimensionless variables
*/
Parameters & showerParameters() { return _parameters; }
//@}
/**
* If this particle came from the hard process get a pointer to ThePEG particle
* it came from
*/
const tcPPtr thePEGBase() const { return _thePEGBase; }
public:
/**
* Extract the rho matrix including mapping needed in the shower
*/
RhoDMatrix extractRhoMatrix(bool forward);
/**
* For a particle which came from the hard process get the spin density and
* the mapping required to the basis used in the Shower
* @param rho The \f$\rho\f$ matrix
* @param mapping The mapping
* @param showerkin The ShowerKinematics object
*/
bool getMapping(SpinPtr &, RhoDMatrix & map);
protected:
/**
* Standard clone function.
*/
virtual PPtr clone() const;
/**
* Standard clone function.
*/
virtual PPtr fullclone() const;
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<ShowerParticle> initShowerParticle;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerParticle & operator=(const ShowerParticle &);
+ ShowerParticle & operator=(const ShowerParticle &) = delete;
private:
/**
* Whether the particle is in the final or initial state
*/
bool _isFinalState;
/**
* Whether the particle came from
*/
unsigned int _perturbative;
/**
* Does a particle produced in the backward shower initiate a time-like shower
*/
bool _initiatesTLS;
/**
* Dimensionless parameters
*/
Parameters _parameters;
/**
* The beam energy fraction for particle's in the initial state
*/
double _x;
/**
* The shower kinematics for the particle
*/
ShoKinPtr _showerKinematics;
/**
* The shower basis for the particle
*/
ShowerBasisPtr _showerBasis;
/**
* Storage of the evolution scales
*/
EvolutionScales scales_;
/**
* Virtual mass
*/
Energy _vMass;
/**
* Partners
*/
tShowerParticlePtr _partner;
/**
* Pointer to ThePEG Particle this ShowerParticle was created from
*/
const tcPPtr _thePEGBase;
/**
* Progenitor
*/
tShowerParticlePtr _progenitor;
/**
* Partners
*/
vector<EvolutionPartner> partners_;
};
inline ostream & operator<<(ostream & os, const ShowerParticle::EvolutionScales & es) {
os << "Scales: QED=" << es.QED / GeV
<< " QCD_c=" << es.QCD_c / GeV
<< " QCD_ac=" << es.QCD_ac / GeV
<< " QED_noAO=" << es.QED_noAO / GeV
<< " QCD_c_noAO=" << es.QCD_c_noAO / GeV
<< " QCD_ac_noAO=" << es.QCD_ac_noAO / GeV
<< '\n';
return os;
}
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of ShowerParticle. */
template <>
struct BaseClassTrait<Herwig::ShowerParticle,1> {
/** Typedef of the first base class of ShowerParticle. */
typedef Particle NthBase;
};
/** This template specialization informs ThePEG about the name of
* the ShowerParticle class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::ShowerParticle>
: public ClassTraitsBase<Herwig::ShowerParticle> {
/** Return a platform-independent class name */
static string className() { return "Herwig::ShowerParticle"; }
/** Create a Event object. */
static TPtr create() { return TPtr::Create(Herwig::ShowerParticle(tcEventPDPtr(),true)); }
};
/** @endcond */
}
#endif /* HERWIG_ShowerParticle_H */
diff --git a/Shower/QTilde/Base/ShowerTree.cc b/Shower/QTilde/Base/ShowerTree.cc
--- a/Shower/QTilde/Base/ShowerTree.cc
+++ b/Shower/QTilde/Base/ShowerTree.cc
@@ -1,914 +1,913 @@
// -*- C++ -*-
//
// ShowerTree.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#include "ThePEG/EventRecord/MultiColour.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ShowerTree.h"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
#include "Herwig/Shower/ShowerHandler.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Handlers/EventHandler.h"
#include "ThePEG/Handlers/XComb.h"
#include <cassert>
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/PDT/StandardMatchers.h"
using namespace Herwig;
using namespace ThePEG;
bool ShowerTree::_spaceTime = false;
Energy2 ShowerTree::_vmin2 = 0.1*GeV2;
namespace {
void findBeam(tPPtr & beam, PPtr incoming) {
if(beam==incoming) return;
while(!beam->children().empty()) {
bool found=false;
for(unsigned int ix=0;ix<beam->children().size();++ix) {
if(beam->children()[ix]==incoming) {
found = true;
break;
}
}
if(found) break;
beam = beam->children()[0];
}
}
}
ShowerTree::ShowerTree(PerturbativeProcessPtr process)
: _parent(), _hasShowered(false) {
// get the incoming and outgoing particles and make copies
vector<PPtr> original,copy;
for(unsigned int ix=0;ix<process->incoming().size();++ix) {
original.push_back(process->incoming()[ix].first);
copy .push_back(new_ptr(Particle(*original.back())));
}
for(unsigned int ix=0;ix<process->outgoing().size();++ix) {
original.push_back(process->outgoing()[ix].first);
copy .push_back(new_ptr(Particle(*original.back())));
}
// isolate the colour
colourIsolate(original,copy);
// hard process
unsigned int itype(1);
if(process->incoming().size()==2) {
_wasHard = true;
// set the beams and incoming particles
tPPair beam = CurrentGenerator::current().currentEvent()->incoming();
findBeam(beam.first ,process->incoming()[0].first);
findBeam(beam.second,process->incoming()[1].first);
_incoming = make_pair(process->incoming()[0].first,
process->incoming()[1].first);
double x1(_incoming.first ->momentum().rho()/beam.first ->momentum().rho());
double x2(_incoming.second->momentum().rho()/beam.second->momentum().rho());
// must have two incoming particles
assert(_incoming.first && _incoming.second);
// set the parent tree
_parent=ShowerTreePtr();
for(unsigned int ix=0;ix<2;++ix) {
ShowerParticlePtr temp=new_ptr(ShowerParticle(*copy[ix],itype,false));
fixColour(temp);
temp->x(ix==0 ? x1 : x2);
_incomingLines.insert(make_pair(new_ptr(ShowerProgenitor(original[ix],
copy[ix],temp)),temp));
}
}
// decay process
else if(process->incoming().size()==1) {
_wasHard = false;
itype=2;
// create the parent shower particle
ShowerParticlePtr sparent(new_ptr(ShowerParticle(*copy[0],itype,false)));
fixColour(sparent);
_incomingLines.insert(make_pair(new_ptr(ShowerProgenitor(original[0],copy[0],sparent))
,sparent));
// return if not decayed
if(original.size()==1) return;
}
else
assert(false);
// create the children
assert(copy.size() == original.size());
for (unsigned int ix=process->incoming().size();ix<original.size();++ix) {
ShowerParticlePtr stemp= new_ptr(ShowerParticle(*copy[ix],itype,true));
fixColour(stemp);
_outgoingLines.insert(make_pair(new_ptr(ShowerProgenitor(original[ix],copy[ix],
stemp)),
stemp));
_forward.insert(stemp);
}
}
void ShowerTree::updateFinalStateShowerProduct(ShowerProgenitorPtr progenitor,
ShowerParticlePtr parent,
const ShowerParticleVector & children) {
assert(children.size()==2);
bool matches[2];
for(unsigned int ix=0;ix<2;++ix) {
matches[ix] = children[ix]->id()==progenitor->id();
}
ShowerParticlePtr newpart;
if(matches[0]&&matches[1]) {
if(parent->showerKinematics()->z()>0.5) newpart=children[0];
else newpart=children[1];
}
else if(matches[0]) newpart=children[0];
else if(matches[1]) newpart=children[1];
_outgoingLines[progenitor]=newpart;
}
void ShowerTree::updateInitialStateShowerProduct(ShowerProgenitorPtr progenitor,
ShowerParticlePtr newParent) {
_incomingLines[progenitor]=newParent;
}
void ShowerTree::insertHard(StepPtr pstep, bool ISR, bool) {
assert(_incomingLines.size()==2);
colourLines().clear();
map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator cit;
// construct the map of colour lines for hard process
for(cit=_incomingLines.begin();cit!=_incomingLines.end();++cit) {
if(!cit->first->perturbative()) continue;
mapColour(cit->first->original(),cit->first->copy());
}
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator cjt;
for(cjt=_outgoingLines.begin();cjt!=_outgoingLines.end();++cjt) {
if(!cjt->first->perturbative()) continue;
mapColour(cjt->first->original(),cjt->first->copy());
}
// initial-state radiation
if(ISR) {
for(cit=incomingLines().begin();cit!=incomingLines().end();++cit) {
ShowerParticlePtr init=(*cit).first->progenitor();
assert(init->thePEGBase());
PPtr original = (*cit).first->original();
if(original->parents().empty()) continue;
PPtr hadron= original->parents()[0];
assert(!original->children().empty());
PPtr copy=cit->first->copy();
ParticleVector intermediates=original->children();
for(unsigned int ix=0;ix<intermediates.size();++ix) {
init->abandonChild(intermediates[ix]);
copy->abandonChild(intermediates[ix]);
}
// if not from a matrix element correction
if(cit->first->perturbative()) {
// break mother/daugther relations
init->addChild(original);
hadron->abandonChild(original);
// if particle showers add shower
if(cit->first->hasEmitted()) {
addInitialStateShower(init,hadron,pstep,false);
}
// no showering for this particle
else {
updateColour(init,false);
hadron->addChild(init);
pstep->addIntermediate(init);
init->setLifeLength(Lorentz5Distance());
init->setVertex(LorentzPoint());
}
}
// from matrix element correction
else {
// break mother/daugther relations
hadron->abandonChild(original);
copy->addChild(original);
updateColour(copy,false);
init->addChild(copy);
pstep->addIntermediate(copy);
copy->setLifeLength(Lorentz5Distance());
copy->setVertex(LorentzPoint());
// if particle showers add shower
if(cit->first->hasEmitted()) {
addInitialStateShower(init,hadron,pstep,false);
}
// no showering for this particle
else {
updateColour(init,false);
hadron->addChild(init);
pstep->addIntermediate(init);
init->setLifeLength(Lorentz5Distance());
init->setVertex(LorentzPoint());
}
}
}
}
else {
for(cit=incomingLines().begin();cit!=incomingLines().end();++cit) {
ShowerParticlePtr init=(*cit).first->progenitor();
assert(init->thePEGBase());
PPtr original = (*cit).first->original();
if(original->parents().empty()) continue;
PPtr hadron= original->parents()[0];
assert(!original->children().empty());
PPtr copy=cit->first->copy();
ParticleVector intermediates=original->children();
for(unsigned int ix=0;ix<intermediates.size();++ix) {
init->abandonChild(intermediates[ix]);
copy->abandonChild(intermediates[ix]);
}
// break mother/daugther relations
init->addChild(original);
hadron->abandonChild(original);
// no showering for this particle
updateColour(init,false);
hadron->addChild(init);
pstep->addIntermediate(init);
init->setLifeLength(Lorentz5Distance());
init->setVertex(LorentzPoint());
original->setLifeLength(Lorentz5Distance());
original->setVertex(LorentzPoint());
}
}
// final-state radiation
for(cjt=outgoingLines().begin();cjt!=outgoingLines().end();++cjt) {
ShowerParticlePtr init=(*cjt).first->progenitor();
assert(init->thePEGBase());
// ZERO the distance of original
(*cjt).first->original()->setLifeLength(Lorentz5Distance());
(*cjt).first->original()->setVertex(LorentzPoint());
// if not from a matrix element correction
if(cjt->first->perturbative()) {
// register the shower particle as a
// copy of the one from the hard process
tParticleVector parents=init->parents();
for(unsigned int ix=0;ix<parents.size();++ix)
parents[ix]->abandonChild(init);
(*cjt).first->original()->addChild(init);
pstep->addDecayProduct(init);
}
// from a matrix element correction
else {
if(cjt->first->original()==_incoming.first||
cjt->first->original()==_incoming.second) {
updateColour((*cjt).first->copy(),false);
(*cjt).first->original()->parents()[0]->
addChild((*cjt).first->copy());
pstep->addDecayProduct((*cjt).first->copy());
(*cjt).first->copy()->addChild(init);
pstep->addDecayProduct(init);
}
else {
updateColour((*cjt).first->copy(),false);
(*cjt).first->original()->addChild((*cjt).first->copy());
pstep->addDecayProduct((*cjt).first->copy());
(*cjt).first->copy()->addChild(init);
pstep->addDecayProduct(init);
}
// ZERO the distance of copy ??? \todo change if add space-time
(*cjt).first->copy()->setLifeLength(Lorentz5Distance());
(*cjt).first->copy()->setVertex(LorentzPoint());
}
// copy so travels no distance
init->setLifeLength(Lorentz5Distance());
init->setVertex(init->parents()[0]->decayVertex());
// sort out the colour
updateColour(init,false);
// insert shower products
addFinalStateShower(init,pstep);
}
colourLines().clear();
}
void ShowerTree::addFinalStateShower(PPtr p, StepPtr s) {
// if endpoint assume doesn't travel
if(p->children().empty()) {
if(p->dataPtr()->stable()||ShowerHandler::currentHandler()->decaysInShower(p->id()))
p->setLifeLength(Lorentz5Distance());
else {
Energy mass = p->mass()!=ZERO ? p->mass() : p->dataPtr()->mass();
Length ctau = p->dataPtr()->generateLifeTime(mass, p->dataPtr()->width());
Lorentz5Distance lifeLength(ctau,p->momentum().vect()*(ctau/mass));
p->setLifeLength(lifeLength);
}
return;
}
// set the space-time distance
else {
p->setLifeLength(spaceTimeDistance(p));
}
ParticleVector::const_iterator child;
for(child=p->children().begin(); child != p->children().end(); ++child) {
updateColour(*child,false);
s->addDecayProduct(*child);
(**child).setVertex(p->decayVertex());
addFinalStateShower(*child,s);
}
}
void ShowerTree::addInitialStateShower(PPtr p, PPtr hadron,
StepPtr s, bool addchildren) {
// Each parton here should only have one parent
if(!p->parents().empty()) {
if(p->parents().size()!=1)
throw Exception() << "Particle must only have one parent in ShowerTree"
<< "::addInitialStateShower" << Exception::runerror;
// set the space-time distances
if(addchildren) {
p->setLifeLength(spaceTimeDistance(p));
p->setVertex(p->children()[0]->vertex()-p->lifeLength());
}
else {
p->setLifeLength(spaceTimeDistance(p));
p->setVertex(-p->lifeLength());
}
// recurse
addInitialStateShower(p->parents()[0],hadron,s);
}
else {
hadron->addChild(p);
s->addIntermediate(p);
p->setVertex(p->children()[0]->vertex());
p->setLifeLength(Lorentz5Distance());
}
updateColour(p,false);
// if not adding children return
if(!addchildren) return;
// add children
ParticleVector::const_iterator child;
for(child = p->children().begin(); child != p->children().end(); ++child) {
// if a final-state particle update the colour
ShowerParticlePtr schild =
dynamic_ptr_cast<ShowerParticlePtr>(*child);
(**child).setVertex(p->decayVertex());
if(schild && schild->isFinalState()) updateColour(*child,false);
// if there are grandchildren of p
if(!(*child)->children().empty()) {
// Add child as intermediate
s->addIntermediate(*child);
// If child is shower particle and final-state, add children
if(schild && schild->isFinalState()) addFinalStateShower(schild,s);
}
else
s->addDecayProduct(*child);
}
}
void ShowerTree::update(PerturbativeProcessPtr newProcess) {
// must be one incoming particle
assert(_incomingLines.size()==1);
colourLines().clear();
// copy the particles and isolate the colour
vector<PPtr> original,copy;
for(unsigned int ix=0;ix<newProcess->incoming().size();++ix) {
original.push_back(newProcess->incoming()[ix].first);
copy .push_back(new_ptr(Particle(*original.back())));
}
for(unsigned int ix=0;ix<newProcess->outgoing().size();++ix) {
original.push_back(newProcess->outgoing()[ix].first);
copy .push_back(new_ptr(Particle(*original.back())));
}
// isolate the colour
colourIsolate(original,copy);
// make the new progenitor
ShowerParticlePtr stemp=new_ptr(ShowerParticle(*copy[0],2,false));
fixColour(stemp);
ShowerProgenitorPtr newprog=new_ptr(ShowerProgenitor(original[0],copy[0],stemp));
_incomingLines.clear();
_incomingLines.insert(make_pair(newprog,stemp));
// create the children
assert(copy.size() == original.size());
for (unsigned int ix=newProcess->incoming().size();ix<original.size();++ix) {
ShowerParticlePtr stemp= new_ptr(ShowerParticle(*copy[ix],2,true));
fixColour(stemp);
_outgoingLines.insert(make_pair(new_ptr(ShowerProgenitor(original[ix],copy[ix],
stemp)),
stemp));
_forward.insert(stemp);
}
}
void ShowerTree::insertDecay(StepPtr pstep,bool ISR, bool) {
assert(_incomingLines.size()==1);
colourLines().clear();
// find final particle from previous tree
PPtr final;
if(_parent&&!_parent->_treelinks.empty())
final = _parent->_treelinks[this].second;
else
final=_incomingLines.begin()->first->original();
// construct the map of colour lines
PPtr copy=_incomingLines.begin()->first->copy();
mapColour(final,copy);
// now this is the ONE instance of the particle which should have a life length
// \todo change if space-time picture added
// set the lifelength, need this so that still in right direction after
// any ISR recoils
Length ctau = copy->lifeTime();
Lorentz5Distance lifeLength(ctau,final->momentum().vect()*(ctau/final->mass()));
final->setLifeLength(lifeLength);
// initial-state radiation
if(ISR&&!_incomingLines.begin()->first->progenitor()->children().empty()) {
ShowerParticlePtr init=_incomingLines.begin()->first->progenitor();
updateColour(init,false);
final->addChild(init);
pstep->addDecayProduct(init);
// just a copy doesn't travel
init->setLifeLength(Lorentz5Distance());
init->setVertex(final->decayVertex());
// insert shower products
addFinalStateShower(init,pstep);
// sort out colour
final=_incomingLines.begin()->second;
colourLines().clear();
mapColour(final,copy);
}
// get the decaying particles
// make the copy
tColinePair cline=make_pair(copy->colourLine(),copy->antiColourLine());
updateColour(copy,false);
// sort out sinks and sources if needed
if(cline.first) {
if(cline.first->sourceNeighbours().first) {
copy->colourLine()->setSourceNeighbours(cline.first->sourceNeighbours().first,
cline.first->sourceNeighbours().second);
}
else if (cline.first->sinkNeighbours().first) {
copy->colourLine()->setSinkNeighbours(cline.first->sinkNeighbours().first,
cline.first->sinkNeighbours().second);
}
}
if(cline.second) {
if(cline.second->sourceNeighbours().first) {
copy->antiColourLine()->setSourceNeighbours(cline.second->sourceNeighbours().first,
cline.second->sourceNeighbours().second);
}
else if (cline.second->sinkNeighbours().first) {
copy->antiColourLine()->setSinkNeighbours(cline.second->sinkNeighbours().first,
cline.second->sinkNeighbours().second);
}
}
// copy of the one from the hard process
tParticleVector dpar=copy->parents();
for(unsigned int ix=0;ix<dpar.size();++ix) dpar[ix]->abandonChild(copy);
final->addChild(copy);
pstep->addDecayProduct(copy);
// just a copy does not move
copy->setLifeLength(Lorentz5Distance());
copy->setVertex(final->decayVertex());
// final-state radiation
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator cit;
for(cit=outgoingLines().begin();cit!=outgoingLines().end();++cit) {
ShowerParticlePtr init=cit->first->progenitor();
// ZERO the distance
init->setLifeLength(Lorentz5Distance());
if(!init->thePEGBase())
throw Exception() << "Final-state particle must have a ThePEGBase"
<< " in ShowerTree::insertDecay()"
<< Exception::runerror;
// if not from matrix element correction
if(cit->first->perturbative()) {
// add the child
updateColour(cit->first->copy(),false);
PPtr orig=cit->first->original();
orig->setLifeLength(Lorentz5Distance());
orig->setVertex(copy->decayVertex());
copy->addChild(orig);
pstep->addDecayProduct(orig);
orig->addChild(cit->first->copy());
pstep->addDecayProduct(cit->first->copy());
// register the shower particle as a
// copy of the one from the hard process
tParticleVector parents=init->parents();
for(unsigned int ix=0;ix<parents.size();++ix)
{parents[ix]->abandonChild(init);}
(*cit).first->copy()->addChild(init);
pstep->addDecayProduct(init);
updateColour(init,false);
}
// from a matrix element correction
else {
if(copy->children().end()==
find(copy->children().begin(),copy->children().end(),
cit->first->original())) {
updateColour(cit->first->original(),false);
copy->addChild(cit->first->original());
pstep->addDecayProduct(cit->first->original());
}
updateColour(cit->first->copy(),false);
cit->first->original()->addChild(cit->first->copy());
pstep->addDecayProduct(cit->first->copy());
// register the shower particle as a
// copy of the one from the hard process
tParticleVector parents=init->parents();
for(unsigned int ix=0;ix<parents.size();++ix)
{parents[ix]->abandonChild(init);}
(*cit).first->copy()->addChild(init);
pstep->addDecayProduct(init);
updateColour(init,false);
}
// ZERO the distances as just copies
cit->first->copy()->setLifeLength(Lorentz5Distance());
init->setLifeLength(Lorentz5Distance());
cit->first->copy()->setVertex(copy->decayVertex());
init->setVertex(copy->decayVertex());
// insert shower products
addFinalStateShower(init,pstep);
}
colourLines().clear();
}
void ShowerTree::clear() {
// reset the has showered flag
_hasShowered=false;
// clear the colour map
colourLines().clear();
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator cit;
map<ShowerProgenitorPtr, ShowerParticlePtr>::const_iterator cjt;
// abandon the children of the outgoing particles
for(cit=_outgoingLines.begin();cit!=_outgoingLines.end();++cit) {
ShowerParticlePtr orig=cit->first->progenitor();
orig->set5Momentum(cit->first->copy()->momentum());
ParticleVector children=orig->children();
for(unsigned int ix=0;ix<children.size();++ix) orig->abandonChild(children[ix]);
_outgoingLines[cit->first]=orig;
cit->first->hasEmitted(false);
cit->first->reconstructed(ShowerProgenitor::notReconstructed);
}
// forward products
_forward.clear();
for(cit=_outgoingLines.begin();cit!=_outgoingLines.end();++cit)
_forward.insert(cit->first->progenitor());
// if a decay
if(!_wasHard) {
ShowerParticlePtr orig=_incomingLines.begin()->first->progenitor();
orig->set5Momentum(_incomingLines.begin()->first->copy()->momentum());
ParticleVector children=orig->children();
for(unsigned int ix=0;ix<children.size();++ix) orig->abandonChild(children[ix]);
_incomingLines.begin()->first->reconstructed(ShowerProgenitor::notReconstructed);
}
// if a hard process
else {
for(cjt=_incomingLines.begin();cjt!=_incomingLines.end();++cjt) {
tPPtr parent = cjt->first->original()->parents().empty() ?
tPPtr() : cjt->first->original()->parents()[0];
ShowerParticlePtr temp=
new_ptr(ShowerParticle(*cjt->first->copy(),
cjt->first->progenitor()->perturbative(),
cjt->first->progenitor()->isFinalState()));
fixColour(temp);
temp->x(cjt->first->progenitor()->x());
cjt->first->hasEmitted(false);
if(!(cjt->first->progenitor()==cjt->second)&&cjt->second&&parent)
parent->abandonChild(cjt->second);
cjt->first->progenitor(temp);
_incomingLines[cjt->first]=temp;
cjt->first->reconstructed(ShowerProgenitor::notReconstructed);
}
}
clearTransforms();
}
void ShowerTree::resetShowerProducts() {
map<ShowerProgenitorPtr, ShowerParticlePtr>::const_iterator cit;
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator cjt;
_forward.clear();
for(cjt=_outgoingLines.begin();cjt!=_outgoingLines.end();++cjt)
_forward.insert(cjt->second);
}
void ShowerTree::updateAfterShower(ShowerDecayMap & decay) {
// update the links
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator mit;
map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::iterator tit;
for(tit=_treelinks.begin();tit!=_treelinks.end();++tit) {
if(tit->second.first) {
mit=_outgoingLines.find(tit->second.first);
if(mit!=_outgoingLines.end()) tit->second.second=mit->second;
}
}
// get the particles coming from those in the hard process
set<tShowerParticlePtr> hard;
for(mit=_outgoingLines.begin();mit!=_outgoingLines.end();++mit)
hard.insert(mit->second);
// find the shower particles which should be decayed in the
// shower but didn't come from the hard process
set<tShowerParticlePtr>::const_iterator cit;
// TODO construct _forward here?
for(cit=_forward.begin();cit!=_forward.end();++cit) {
if((ShowerHandler::currentHandler()->decaysInShower((**cit).id())&&
!(**cit).dataPtr()->stable()) &&
hard.find(*cit)==hard.end()) {
PerturbativeProcessPtr newProcess(new_ptr(PerturbativeProcess()));
newProcess->incoming().push_back(make_pair(*cit,PerturbativeProcessPtr()));
ShowerTreePtr newtree=new_ptr(ShowerTree(newProcess));
newtree->setParents();
newtree->_parent=this;
Energy width=(**cit).dataPtr()->generateWidth((**cit).mass());
decay.insert(make_pair(width,newtree));
_treelinks.insert(make_pair(newtree,
make_pair(tShowerProgenitorPtr(),*cit)));
}
}
}
void ShowerTree::addFinalStateBranching(ShowerParticlePtr parent,
const ShowerParticleVector & children) {
assert(children.size()==2);
_forward.erase(parent);
for(unsigned int ix=0; ix<children.size(); ++ix) {
_forward.insert(children[ix]);
}
}
-void ShowerTree::addInitialStateBranching(ShowerParticlePtr oldParent,
- ShowerParticlePtr newParent,
+void ShowerTree::addInitialStateBranching(ShowerParticlePtr , ShowerParticlePtr ,
ShowerParticlePtr otherChild) {
_forward.insert(otherChild);
}
void ShowerTree::setParents() {
// set the parent tree of the children
map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator tit;
for(tit=_treelinks.begin();tit!=_treelinks.end();++tit)
tit->first->_parent=this;
}
vector<ShowerProgenitorPtr> ShowerTree::extractProgenitors() {
// extract the particles from the ShowerTree
map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator mit;
vector<ShowerProgenitorPtr> ShowerHardJets;
for(mit=incomingLines().begin();mit!=incomingLines().end();++mit)
ShowerHardJets.push_back((*mit).first);
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator mjt;
for(mjt=outgoingLines().begin();mjt!=outgoingLines().end();++mjt)
ShowerHardJets.push_back((*mjt).first);
return ShowerHardJets;
}
void ShowerTree::transform(const LorentzRotation & boost, bool applyNow) {
if(applyNow) {
// now boost all the particles
map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator cit;
// incoming
for(cit=_incomingLines.begin();cit!=_incomingLines.end();++cit) {
cit->first->progenitor()->deepTransform(boost);
cit->first->copy()->deepTransform(boost);
}
// outgoing
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator cjt;
for(cjt=_outgoingLines.begin();cjt!=_outgoingLines.end();++cjt) {
cjt->first->progenitor()->deepTransform(boost);
cjt->first->copy()->deepTransform(boost);
}
}
else {
_transforms.transform(boost);
}
// child trees
for(map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator
tit=_treelinks.begin();tit!=_treelinks.end();++tit)
tit->first->transform(boost,applyNow);
}
void ShowerTree::applyTransforms() {
// now boost all the particles
map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator cit;
// incoming
for(cit=_incomingLines.begin();cit!=_incomingLines.end();++cit) {
cit->first->progenitor()->deepTransform(_transforms);
cit->first->copy()->deepTransform(_transforms);
}
// outgoing
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator cjt;
for(cjt=_outgoingLines.begin();cjt!=_outgoingLines.end();++cjt) {
cjt->first->progenitor()->deepTransform(_transforms);
cjt->first->copy()->deepTransform(_transforms);
}
// child trees
for(map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator
tit=_treelinks.begin();tit!=_treelinks.end();++tit)
tit->first->applyTransforms();
_transforms = LorentzRotation();
}
void ShowerTree::clearTransforms() {
_transforms = LorentzRotation();
// // child trees
// for(map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator
// tit=_treelinks.begin();tit!=_treelinks.end();++tit)
// tit->first->clearTransforms();
}
void ShowerTree::fixColour(tShowerParticlePtr part) {
if(!part->colourInfo()->colourLines().empty()) {
if(part->colourInfo()->colourLines().size()==1) {
ColinePtr line=part->colourLine();
if(line) {
line->removeColoured(part);
line->addColoured(part);
}
}
else {
Ptr<MultiColour>::pointer colour =
dynamic_ptr_cast<Ptr<MultiColour>::pointer>(part->colourInfo());
vector<tcColinePtr> lines = colour->colourLines();
for(unsigned int ix=0;ix<lines.size();++ix) {
ColinePtr line = const_ptr_cast<ColinePtr>(lines[ix]);
if(line) {
line->removeColoured(part);
line->addColoured(part);
}
}
}
}
if(!part->colourInfo()->antiColourLines().empty()) {
if(part->colourInfo()->antiColourLines().size()==1) {
ColinePtr line=part->antiColourLine();
if(line) {
line->removeAntiColoured(part);
line->addAntiColoured(part);
}
}
else {
Ptr<MultiColour>::pointer colour =
dynamic_ptr_cast<Ptr<MultiColour>::pointer>(part->colourInfo());
vector<tcColinePtr> lines = colour->antiColourLines();
for(unsigned int ix=0;ix<lines.size();++ix) {
ColinePtr line = const_ptr_cast<ColinePtr>(lines[ix]);
if(line) {
line->removeAntiColoured(part);
line->addAntiColoured(part);
}
}
}
}
}
vector<ShowerParticlePtr> ShowerTree::extractProgenitorParticles() {
vector<ShowerParticlePtr> particles;
// incoming particles
for(map<ShowerProgenitorPtr, ShowerParticlePtr>::const_iterator
cit=incomingLines().begin(); cit!=incomingLines().end();++cit)
particles.push_back(cit->first->progenitor());
// outgoing particles
for(map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator
cjt=outgoingLines().begin(); cjt!=outgoingLines().end();++cjt)
particles.push_back(cjt->first->progenitor());
return particles;
}
Lorentz5Distance ShowerTree::spaceTimeDistance(tPPtr particle) {
if(!_spaceTime) return Lorentz5Distance();
Energy2 q2 = particle->mass() > ZERO ? sqr(particle->mass()) : -sqr(particle->mass());
const tcPDPtr data = particle->dataPtr();
// calculate width imposing min value
Energy conMass = max(data->constituentMass(),200*MeV);
Energy width = max(data->generateWidth(particle->mass()),_vmin2/conMass);
// offshellness
Energy2 offShell = q2-sqr(data->constituentMass());
if(abs(offShell)<1e-10*GeV2) offShell = ZERO;
InvEnergy2 fact = UseRandom::rndExp(1./sqrt((sqr(offShell)+sqr(q2*width/conMass))));
Lorentz5Distance output = (hbarc*fact)*particle->momentum();
return output;
}
void ShowerTree::constructTrees(ShowerTreePtr & hardTree,
ShowerDecayMap & decayTrees,
PerturbativeProcessPtr hard,
DecayProcessMap decay) {
map<PerturbativeProcessPtr,ShowerTreePtr> treeMap;
// convert the hard process
if(hardTree) {
if(hardTree->isDecay()) hardTree->update(hard);
}
else {
hardTree = new_ptr(ShowerTree(hard));
}
treeMap.insert(make_pair(hard,hardTree));
for(DecayProcessMap::const_iterator it=decay.begin();it!=decay.end();++it) {
ShowerTreePtr newTree = new_ptr(ShowerTree(it->second));
treeMap.insert(make_pair(it->second,newTree));
decayTrees.insert(make_pair(it->first,newTree));
}
// set up the links between the trees
for(map<PerturbativeProcessPtr,ShowerTreePtr>::const_iterator it=treeMap.begin();
it!=treeMap.end();++it) {
// links to daughter trees
map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator mit;
for(mit=it->second->_outgoingLines.begin();
mit!=it->second->_outgoingLines.end();++mit) {
unsigned int iloc=0;
for(;iloc<it->first->outgoing().size();++iloc) {
if(it->first->outgoing()[iloc].first==mit->first->original())
break;
}
if(it->first->outgoing()[iloc].second)
it->second->_treelinks.insert(make_pair(treeMap[it->first->outgoing()[iloc].second],
make_pair(mit->first,mit->first->progenitor())));
}
// links to parent trees
if(it->first->incoming()[0].second) {
it->second->_parent = treeMap[it->first->incoming()[0].second];
}
}
}
namespace {
Lorentz5Momentum sumMomenta(tPPtr particle) {
if(particle->children().empty())
return particle->momentum();
Lorentz5Momentum output;
for(unsigned int ix=0;ix<particle->children().size();++ix) {
output += sumMomenta(particle->children()[ix]);
}
return output;
}
}
void ShowerTree::checkMomenta() {
vector<Lorentz5Momentum> pin;
for(map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator it=_incomingLines.begin();
it!=_incomingLines.end();++it) {
if(isDecay()) {
tPPtr parent = it->first->progenitor();
pin.push_back(parent->momentum());
while(!parent->children().empty()) {
pin.back() -= sumMomenta(parent->children()[1]);
parent = parent->children()[0];
}
}
else {
tPPtr parent = it->second;
pin.push_back(parent->momentum());
while(!parent->children().empty()&&parent->children().size()==2) {
pin.back() -= sumMomenta(parent->children()[1]);
parent = parent->children()[0];
if(parent==it->first->progenitor()) break;
}
}
}
vector<Lorentz5Momentum> pout;
for(map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator it= _outgoingLines.begin();
it!=_outgoingLines.end();++it) {
pout.push_back(sumMomenta(it->first->progenitor()));
}
Lorentz5Momentum psum;
for(unsigned int ix=0;ix< pin.size();++ix) {
CurrentGenerator::log() << "pin " << ix << pin[ix]/GeV << "\n";
psum +=pin[ix];
}
CurrentGenerator::log() << "In total " << psum/GeV << " " << psum.m()/GeV << "\n";
Lorentz5Momentum psum2;
for(unsigned int ix=0;ix< pout.size();++ix) {
CurrentGenerator::log() << "pout " << ix << pout[ix]/GeV << "\n";
psum2 +=pout[ix];
}
CurrentGenerator::log() << "Out total " << psum2/GeV << " " << psum2.m()/GeV << "\n";
CurrentGenerator::log() << "Total " << (psum-psum2)/GeV << "\n";
}
RealEmissionProcessPtr ShowerTree::perturbativeProcess() {
RealEmissionProcessPtr output(new_ptr(RealEmissionProcess()));
// add the incoming particles
unsigned int ix=0;
pair<double,double> x;
for(map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator it=_incomingLines.begin();
it!=_incomingLines.end();++it) {
output->bornIncoming().push_back(it->first->progenitor());
if(!it->first->original()->parents().empty())
output->hadrons().push_back(it->first->original()->parents()[0]);
else
output->hadrons().push_back(it->first->progenitor());
if(ix==0) x.first = it->second->x();
else x.second = it->second->x();
++ix;
}
output->x(x);
// add the outgoing particles
for(map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator it= _outgoingLines.begin();
it!=_outgoingLines.end();++it) {
output->bornOutgoing().push_back(it->first->progenitor());
}
return output;
}
void ShowerTree::setVetoes(const map<ShowerInteraction,Energy> & pTs,
unsigned int type) {
if(type==1||type==3) {
for(map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator it=_incomingLines.begin();
it!=_incomingLines.end();++it) {
for(map<ShowerInteraction,Energy>::const_iterator jt=pTs.begin();jt!=pTs.end();++jt)
it->first->maximumpT(jt->second,jt->first);
}
}
if(type==2||type==3) {
for(map<ShowerProgenitorPtr,tShowerParticlePtr>::const_iterator it= _outgoingLines.begin();
it!=_outgoingLines.end();++it) {
for(map<ShowerInteraction,Energy>::const_iterator jt=pTs.begin();jt!=pTs.end();++jt)
it->first->maximumpT(jt->second,jt->first);
}
}
}
diff --git a/Shower/QTilde/Base/ShowerVertex.h b/Shower/QTilde/Base/ShowerVertex.h
--- a/Shower/QTilde/Base/ShowerVertex.h
+++ b/Shower/QTilde/Base/ShowerVertex.h
@@ -1,147 +1,147 @@
// -*- C++ -*-
//
// ShowerVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ShowerVertex_H
#define HERWIG_ShowerVertex_H
//
// This is the declaration of the ShowerVertex class.
//
#include "ThePEG/EventRecord/HelicityVertex.h"
#include "Herwig/Decay/DecayMatrixElement.h"
#include "ShowerVertex.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Helicity
* \author Peter Richardson
*
* The ShowerVertex class is designed to implement the vertex for a branching
* in the shower for use with the spin correlation alogorithm.
* It inherits from HelicityVertex class of ThePEG and implements
* the methods to calculate the \f$\rho\f$ and \f$D\f$ matrices.
*
* It uses the DecayMatrixElement class to store the matrix element and
* it is this class which performs the calculations of the matrices.
*
* @see HelicityVertex
* @see DecayMatrixElement
*
* @see \ref ShowerVertexInterfaces "The interfaces"
* defined for ShowerVertex.
*/
class ShowerVertex: public HelicityVertex {
public:
/**
* Default constructor
*/
ShowerVertex() : convertIn_(false), convertOut_(2,false), outMatrix_(2,RhoDMatrix())
{}
public:
/**
* Access to the matrix element
*/
//@{
/**
* Get the matrix element
*/
inline const DecayMEPtr ME() const {
return matrixElement_;
}
/**
* Set the matrix element
*/
inline void ME(DecayMEPtr in) const {
matrixElement_ = in;
}
//@}
/**
* Set the change of basis for the incoming particle
*/
inline void incomingBasisTransform(RhoDMatrix conv) {
convertIn_ = true;
inMatrix_ = conv;
}
public:
/**
* Method to calculate the \f$\rho\f$ matrix for one of the decay products
* @param iprod The product we are calculating the \f$\rho\f$ matrix for.
*/
virtual RhoDMatrix getRhoMatrix(int iprod, bool ) const;
/**
* Method to calculate the \f$D\f$ matrix for the decaying particle. It this
* case the argument is a dummy.
*/
virtual RhoDMatrix getDMatrix(int) const;
/**
* Get the transformed rho matrix
*/
RhoDMatrix mapIncoming(RhoDMatrix rho) const;
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerVertex & operator=(const ShowerVertex &);
+ ShowerVertex & operator=(const ShowerVertex &) = delete;
private:
/**
* Storage of the decay matrix element.
*/
mutable DecayMEPtr matrixElement_;
/**
* Whether or not the incoming spin density matrices need to be converted
*/
bool convertIn_;
/**
* Whether or not the outgoing spin density matrices need to be converted
*/
vector<bool> convertOut_;
/**
* Storage of conversion for incoming particle
*/
RhoDMatrix inMatrix_;
/**
* Storage of conversion for outgoing particles
*/
vector<RhoDMatrix> outMatrix_;
};
}
#endif /* HERWIG_ShowerVertex_H */
diff --git a/Shower/QTilde/Base/ShowerVeto.h b/Shower/QTilde/Base/ShowerVeto.h
--- a/Shower/QTilde/Base/ShowerVeto.h
+++ b/Shower/QTilde/Base/ShowerVeto.h
@@ -1,139 +1,139 @@
// -*- C++ -*-
//
// ShowerVeto.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ShowerVeto_H
#define HERWIG_ShowerVeto_H
//
// This is the declaration of the ShowerVeto class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ShowerVeto.fh"
#include "Herwig/Shower/QTilde/ShowerConfig.h"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.fh"
#include "Herwig/Shower/QTilde/Base/ShowerProgenitor.fh"
#include "Herwig/Shower/QTilde/Base/ShowerTree.fh"
namespace Herwig {
struct Branching;
using namespace ThePEG;
/**\ingroup Shower
* Exception class for vetoing a showering
*/
struct VetoShower { };
/**\ingroup Shower
* ShowerVeto is a general interface for performing
* vetoes during showering.
*
* @see \ref ShowerVetoInterfaces "The interfaces"
* defined for ShowerVeto.
*/
class ShowerVeto: public Interfaced {
public:
/**
* Define types of ShowerVetoes
*/
enum ShowerVetoType {
/**
* Throw away emission, if veto encountered. Set the scale to
* the scale of vetoed emission.
*/
Emission = 1,
/**
* Throw away showering
*/
Shower,
/**
* Throw away event
*/
Event
};
public:
/**
* Constructor giving the behaviour of this veto
*/
ShowerVeto (ShowerVetoType vetoType) : _vetoType(vetoType) {}
/**
* Return the type of this veto
*/
ShowerVetoType vetoType () const {return _vetoType;}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
public:
/**
* Return true, if the selected emission off the given
* particle and progenitor is vetoed.
*/
virtual bool vetoTimeLike (tcShowerProgenitorPtr, tcShowerParticlePtr,
const Branching&,tcShowerTreePtr) = 0;
/**
* Return true, if the selected emission off the given
* particle and progenitor is vetoed.
*/
virtual bool vetoSpaceLike (tcShowerProgenitorPtr, tcShowerParticlePtr,
const Branching&,tcShowerTreePtr) = 0;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerVeto & operator=(const ShowerVeto &);
+ ShowerVeto & operator=(const ShowerVeto &) = delete;
private:
/**
* The type of this veto.
*/
ShowerVetoType _vetoType;
};
}
#endif /* HERWIG_ShowerVeto_H */
diff --git a/Shower/QTilde/Couplings/ShowerAlphaQED.h b/Shower/QTilde/Couplings/ShowerAlphaQED.h
--- a/Shower/QTilde/Couplings/ShowerAlphaQED.h
+++ b/Shower/QTilde/Couplings/ShowerAlphaQED.h
@@ -1,193 +1,193 @@
// -*- C++ -*-
//
// ShowerAlphaQED.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ShowerAlphaQED_H
#define HERWIG_ShowerAlphaQED_H
//
// This is the declaration of the ShowerAlphaQED class.
//
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This concrete class provides the definition of the
* pure virtual function value(scale) for \f$\alpha_{\rm QED}\f$.
* N.B. as we always use \f$\alpha(0)\f$ for the radiation of photons
* this class is very simple.
*
* @see ShowerAlpha
* @see ShowerAlphaQCD
*
* @see \ref ShowerAlphaQEDInterfaces "The interfaces"
* defined for ShowerAlphaQED.
*/
class ShowerAlphaQED: public ShowerAlpha {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ShowerAlphaQED() : ShowerAlpha(), _alpha(1./137.), couplingSource_(1)
{}
//@}
public:
/**
* Methods to return the coupling.
* The methods are equivalent to the QCD ones
* and are necessary to make use of the virtuality of ShowerAlpha
* at other places.
*/
//@{
/**
* It returns the running coupling value evaluated at the input scale
* multiplied by the scale factor scaleFactor().
* @param scale The scale
* @return The coupling
*/
virtual double value(const Energy2 scale) const;
/**
* It returns the overestimiate of the coupling
* multiplied by the scale factor scaleFactor().
*/
virtual double overestimateValue() const;
/**
* Return the ratio of the coupling at the scale to the overestimated value
*/
virtual double ratio(const Energy2 scale,double factor=1.) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<ShowerAlphaQED> initShowerAlphaQED;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerAlphaQED & operator=(const ShowerAlphaQED &);
+ ShowerAlphaQED & operator=(const ShowerAlphaQED &) = delete;
private:
/**
* The value of the coupling, as we are producing real photons
* this is always \f$\alpha(q^2=0)\f$.
*/
double _alpha;
/**
* Source of coupling value
*/
unsigned int couplingSource_;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of ShowerAlphaQED. */
template <>
struct BaseClassTrait<Herwig::ShowerAlphaQED,1> {
/** Typedef of the first base class of ShowerAlphaQED. */
typedef Herwig::ShowerAlpha NthBase;
};
/** This template specialization informs ThePEG about the name of
* the ShowerAlphaQED class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::ShowerAlphaQED>
: public ClassTraitsBase<Herwig::ShowerAlphaQED> {
/** Return a platform-independent class name */
static string className() { return "Herwig::ShowerAlphaQED"; }
/**
* The name of a file containing the dynamic library where the class
* ShowerAlphaQED is implemented. It may also include several, space-separated,
* libraries if the class ShowerAlphaQED depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwShower.so"; }
};
/** @endcond */
}
#endif /* HERWIG_ShowerAlphaQED_H */
diff --git a/Shower/QTilde/Kinematics/FS_QTildeShowerKinematics1to2.cc b/Shower/QTilde/Kinematics/FS_QTildeShowerKinematics1to2.cc
--- a/Shower/QTilde/Kinematics/FS_QTildeShowerKinematics1to2.cc
+++ b/Shower/QTilde/Kinematics/FS_QTildeShowerKinematics1to2.cc
@@ -1,196 +1,196 @@
// -*- C++ -*-
//
// FS_QTildeShowerKinematics1to2.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FS_QTildeShowerKinematics1to2 class.
//
#include "FS_QTildeShowerKinematics1to2.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
#include "ThePEG/Utilities/Debug.h"
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include "Herwig/Shower/QTilde/Base/PartnerFinder.h"
#include "Herwig/Shower/QTilde/Kinematics/KinematicsReconstructor.h"
#include "Herwig/Shower/QTilde/Kinematics/KinematicHelpers.h"
#include "Herwig/Shower/QTilde/Base/ShowerVertex.h"
using namespace Herwig;
void FS_QTildeShowerKinematics1to2::
updateParameters(tShowerParticlePtr theParent,
tShowerParticlePtr theChild0,
tShowerParticlePtr theChild1,
bool setAlpha) const {
const ShowerParticle::Parameters & parent = theParent->showerParameters();
ShowerParticle::Parameters & child0 = theChild0->showerParameters();
ShowerParticle::Parameters & child1 = theChild1->showerParameters();
// determine alphas of children according to interpretation of z
if ( setAlpha ) {
child0.alpha = z() * parent.alpha;
child1.alpha = (1.-z()) * parent.alpha;
}
// set the values
double cphi = cos(phi());
double sphi = sin(phi());
child0.ptx = pT() * cphi + z() * parent.ptx;
child0.pty = pT() * sphi + z() * parent.pty;
child0.pt = sqrt( sqr(child0.ptx) + sqr(child0.pty) );
child1.ptx = -pT() * cphi + (1.-z())* parent.ptx;
child1.pty = -pT() * sphi + (1.-z())* parent.pty;
child1.pt = sqrt( sqr(child1.ptx) + sqr(child1.pty) );
}
void FS_QTildeShowerKinematics1to2::
updateChildren(const tShowerParticlePtr parent,
const ShowerParticleVector & children,
ShowerPartnerType partnerType) const {
assert(children.size()==2);
// calculate the scales
splittingFn()->evaluateFinalStateScales(partnerType,scale(),z(),parent,
children[0],children[1]);
// update the parameters
updateParameters(parent, children[0], children[1], true);
// set up the colour connections
splittingFn()->colourConnection(parent,children[0],children[1],partnerType,false);
// make the products children of the parent
parent->addChild(children[0]);
parent->addChild(children[1]);
// set the momenta of the children
for(ShowerParticleVector::const_iterator pit=children.begin();
pit!=children.end();++pit) {
(**pit).showerBasis(parent->showerBasis(),true);
(**pit).setShowerMomentum(true);
}
// sort out the helicity stuff
if(! dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->correlations()) return;
SpinPtr pspin(parent->spinInfo());
if(!pspin || !dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->spinCorrelations() ) return;
Energy2 t = sqr(scale())*z()*(1.-z());
IdList ids;
ids.push_back(parent->dataPtr());
ids.push_back(children[0]->dataPtr());
ids.push_back(children[1]->dataPtr());
// create the vertex
SVertexPtr vertex(new_ptr(ShowerVertex()));
// set the matrix element
vertex->ME(splittingFn()->matrixElement(z(),t,ids,phi(),true));
RhoDMatrix mapping;
SpinPtr inspin;
bool needMapping = parent->getMapping(inspin,mapping);
if(needMapping) vertex->incomingBasisTransform(mapping);
// set the incoming particle for the vertex
parent->spinInfo()->decayVertex(vertex);
for(ShowerParticleVector::const_iterator pit=children.begin();
pit!=children.end();++pit) {
// construct the spin info for the children
(**pit).constructSpinInfo(true);
// connect the spinInfo object to the vertex
(*pit)->spinInfo()->productionVertex(vertex);
}
}
void FS_QTildeShowerKinematics1to2::
reconstructParent(const tShowerParticlePtr parent,
const ParticleVector & children ) const {
assert(children.size() == 2);
ShowerParticlePtr c1 = dynamic_ptr_cast<ShowerParticlePtr>(children[0]);
ShowerParticlePtr c2 = dynamic_ptr_cast<ShowerParticlePtr>(children[1]);
parent->showerParameters().beta=
c1->showerParameters().beta + c2->showerParameters().beta;
Lorentz5Momentum pnew = c1->momentum() + c2->momentum();
Energy2 m2 = sqr(pT())/z()/(1.-z()) + sqr(c1->mass())/z()
+ sqr(c2->mass())/(1.-z());
pnew.setMass(sqrt(m2));
parent->set5Momentum( pnew );
}
void FS_QTildeShowerKinematics1to2::reconstructLast(const tShowerParticlePtr last,
Energy mass) const {
// set beta component and consequently all missing data from that,
// using the nominal (i.e. PDT) mass.
Energy theMass =ZERO;
if(!(mass > ZERO) && ShowerHandler::currentHandler()->retConstituentMasses())
theMass = last->data().constituentMass();
else
theMass = mass > ZERO ? mass : last->data().mass();
Lorentz5Momentum pVector = last->showerBasis()->pVector();
ShowerParticle::Parameters & lastParam = last->showerParameters();
Energy2 denom = 2. * lastParam.alpha * last->showerBasis()->p_dot_n();
if(abs(denom)/(sqr(pVector.e())+pVector.rho2())<1e-10) {
throw KinematicsReconstructionVeto();
}
lastParam.beta = ( sqr(theMass) + sqr(lastParam.pt)
- sqr(lastParam.alpha) * pVector.m2() )
/ denom;
// set that new momentum
Lorentz5Momentum newMomentum = last->showerBasis()->
sudakov2Momentum( lastParam.alpha, lastParam.beta,
lastParam.ptx , lastParam.pty);
newMomentum.setMass(theMass);
newMomentum.rescaleEnergy();
if(last->data().stable()) {
last->set5Momentum( newMomentum );
}
else {
last->boost(last->momentum().findBoostToCM());
last->boost(newMomentum.boostVector());
}
}
void FS_QTildeShowerKinematics1to2::updateParent(const tShowerParticlePtr parent,
const ShowerParticleVector & children,
ShowerPartnerType) const {
IdList ids(3);
ids[0] = parent->dataPtr();
ids[1] = children[0]->dataPtr();
ids[2] = children[1]->dataPtr();
const vector<Energy> & virtualMasses = SudakovFormFactor()->virtualMasses(ids);
if(children[0]->children().empty()) children[0]->virtualMass(virtualMasses[1]);
if(children[1]->children().empty()) children[1]->virtualMass(virtualMasses[2]);
// compute the new pT of the branching
Energy2 m02 = (ids[0]->id()!=ParticleID::g && ids[0]->id()!=ParticleID::gamma) ?
sqr(virtualMasses[0]) : Energy2();
- Energy2 pt2 = QTildeKinematics::pT2_FSR(
- sqr(scale()), z(), m02, sqr(children[0]->virtualMass()), sqr(children[1]->virtualMass())
- );
+ Energy2 pt2 = QTildeKinematics::pT2_FSR(sqr(scale()), z(), m02,
+ sqr(children[0]->virtualMass()), sqr(children[1]->virtualMass()),
+ sqr(children[0]->virtualMass()), sqr(children[1]->virtualMass()));
if(pt2>ZERO) {
pT(sqrt(pt2));
}
else {
pt2=ZERO;
pT(ZERO);
}
Energy2 q2 = QTildeKinematics::q2_FSR(
pt2, z(), sqr(children[0]->virtualMass()), sqr(children[1]->virtualMass())
);
parent->virtualMass(sqrt(q2));
}
void FS_QTildeShowerKinematics1to2::
resetChildren(const tShowerParticlePtr parent,
const ShowerParticleVector & children) const {
updateParameters(parent, children[0], children[1], false);
for(unsigned int ix=0;ix<children.size();++ix) {
if(children[ix]->children().empty()) continue;
ShowerParticleVector newChildren;
for(unsigned int iy=0;iy<children[ix]->children().size();++iy)
newChildren.push_back(dynamic_ptr_cast<ShowerParticlePtr>
(children[ix]->children()[iy]));
children[ix]->showerKinematics()->resetChildren(children[ix],newChildren);
}
}
diff --git a/Shower/QTilde/Kinematics/KinematicHelpers.h b/Shower/QTilde/Kinematics/KinematicHelpers.h
--- a/Shower/QTilde/Kinematics/KinematicHelpers.h
+++ b/Shower/QTilde/Kinematics/KinematicHelpers.h
@@ -1,56 +1,59 @@
// -*- C++ -*-
//
// KinematicHelpers.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2018 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_KinematicHelpers_H
#define HERWIG_KinematicHelpers_H
namespace QTildeKinematics {
-inline Energy2 pT2_FSR(Energy2 qt2, double z, Energy2 m02, Energy2 m12, Energy2 m22) {
- const double z1z = z*(1.-z);
- return z1z*(z1z*qt2 + m02) - m12*(1.-z) - m22*z;
+inline Energy2 pT2_FSR(Energy2 qt2, double z, Energy2 m02, Energy2 m12, Energy2 m22,
+ Energy2 q12, Energy2 q22) {
+ const double z1z = z*(1.-z);
+ return z1z*(z1z*qt2 + m02 -m12-m22) - q12*sqr(1.-z) - q22*sqr(z);
+ //return z1z*(z1z*qt2 + m02) - q12*(1.-z) - q22*z;
}
inline Energy2 pT2_ISR(Energy2 qt2, double z, Energy2 m22) {
- return sqr(1.-z)*qt2 - m22*z;
+ return sqr(1.-z)*qt2 - m22*z;
}
inline Energy2 pT2_Decay(Energy2 qt2, double z, Energy2 m02, Energy2 m22) {
- return sqr(1.-z)*(qt2 - m02) - m22*z;
+ return sqr(1.-z)*(qt2 - m02) - m22*z;
}
-inline Energy pT_FSR(Energy2 qt2, double z, Energy2 m02, Energy2 m12, Energy2 m22) {
- return sqrt( pT2_FSR(qt2,z,m02,m12,m22) );
+inline Energy pT_FSR(Energy2 qt2, double z, Energy2 m02, Energy2 m12, Energy2 m22,
+ Energy2 q12, Energy2 q22) {
+ return sqrt( pT2_FSR(qt2,z,m02,m12,m22,q12,q22) );
}
inline Energy pT_ISR(Energy2 qt2, double z, Energy2 m22) {
- return sqrt( pT2_ISR(qt2,z,m22) );
+ return sqrt( pT2_ISR(qt2,z,m22) );
}
inline Energy pT_Decay(Energy2 qt2, double z, Energy2 m02, Energy2 m22) {
- return sqrt( pT2_Decay(qt2,z,m02,m22) );
+ return sqrt( pT2_Decay(qt2,z,m02,m22) );
}
inline Energy2 q2_FSR(Energy2 pt2, double z, Energy2 m12, Energy2 m22) {
return m12/z + m22/(1.-z) + pt2/z/(1.-z);
}
// inline Energy2 q2_ISR(Energy2 pt2, double z, Energy2 m22) {
// return m22/(1.-z) + pt2/z/(1.-z);
// }
}
#endif
diff --git a/Shower/QTilde/Kinematics/KinematicsReconstructor.cc b/Shower/QTilde/Kinematics/KinematicsReconstructor.cc
--- a/Shower/QTilde/Kinematics/KinematicsReconstructor.cc
+++ b/Shower/QTilde/Kinematics/KinematicsReconstructor.cc
@@ -1,2944 +1,2825 @@
// -*- C++ -*-
//
// KinematicsReconstructor.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the KinematicsReconstructor class.
//
#include "KinematicsReconstructor.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/EventRecord/Event.h"
#include "ThePEG/Interface/Parameter.h"
+#include "ThePEG/Interface/Deleted.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/RefVector.h"
#include "Herwig/Shower/QTilde/Base/PartnerFinder.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/EventRecord/ColourLine.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include <cassert>
+#include "KinematicsReconstructor.tcc"
using namespace Herwig;
DescribeClass<KinematicsReconstructor,Interfaced>
describeKinematicsReconstructor("Herwig::KinematicsReconstructor", "HwShower.so");
namespace {
/**
* Struct to order the jets in off-shellness
*/
struct JetOrdering {
bool operator() (const JetKinStruct & j1, const JetKinStruct & j2) {
Energy diff1 = j1.q.m()-j1.p.m();
Energy diff2 = j2.q.m()-j2.p.m();
if(diff1!=diff2) {
return diff1>diff2;
}
else if( j1.q.e() != j2.q.e() )
return j1.q.e()>j2.q.e();
else
return j1.parent->uniqueId>j2.parent->uniqueId;
}
};
}
void KinematicsReconstructor::persistentOutput(PersistentOStream & os) const {
os << _reconopt << _initialBoost << ounit(_minQ,GeV) << _noRescale
- << _noRescaleVector << _finalStateReconOption
- << _initialStateReconOption;
+ << _noRescaleVector << _initialStateReconOption << _finalFinalWeight;
}
void KinematicsReconstructor::persistentInput(PersistentIStream & is, int) {
is >> _reconopt >> _initialBoost >> iunit(_minQ,GeV) >> _noRescale
- >> _noRescaleVector >> _finalStateReconOption
- >> _initialStateReconOption;
+ >> _noRescaleVector >> _initialStateReconOption >> _finalFinalWeight;
}
void KinematicsReconstructor::Init() {
static ClassDocumentation<KinematicsReconstructor> documentation
( "This class is responsible for the kinematics reconstruction of the showering,",
" including the kinematics reshuffling necessary to compensate for the recoil"
"of the emissions." );
static Switch<KinematicsReconstructor,unsigned int> interfaceReconstructionOption
("ReconstructionOption",
"Option for the kinematics reconstruction",
&KinematicsReconstructor::_reconopt, 0, false, false);
static SwitchOption interfaceReconstructionOptionGeneral
(interfaceReconstructionOption,
"General",
"Use the general solution which ignores the colour structure for all processes",
0);
static SwitchOption interfaceReconstructionOptionColour
(interfaceReconstructionOption,
"Colour",
"Use the colour structure of the process to determine the reconstruction procedure.",
1);
static SwitchOption interfaceReconstructionOptionColour2
(interfaceReconstructionOption,
"Colour2",
"Make the most use possible of the colour structure of the process to determine the reconstruction procedure. "
"Start with FF, then IF then II colour connections",
2);
static SwitchOption interfaceReconstructionOptionColour3
(interfaceReconstructionOption,
"Colour3",
"Make the most use possible of the colour structure of the process to determine the reconstruction procedure. "
"Do the colour connections in order of the pT's emitted in the shower starting with the hardest."
" The colour partner is fully reconstructed at the same time.",
3);
static SwitchOption interfaceReconstructionOptionColour4
(interfaceReconstructionOption,
"Colour4",
"Make the most use possible of the colour structure of the process to determine the reconstruction procedure. "
"Do the colour connections in order of the pT's emitted in the shower starting with the hardest, while leaving"
" the colour partner on mass-shell",
4);
static Parameter<KinematicsReconstructor,Energy> interfaceMinimumQ2
("MinimumQ2",
"The minimum Q2 for the reconstruction of initial-final systems",
&KinematicsReconstructor::_minQ, GeV, 0.001*GeV, 1e-6*GeV, 10.0*GeV,
false, false, Interface::limited);
static RefVector<KinematicsReconstructor,ParticleData> interfaceNoRescale
("NoRescale",
"Particles which shouldn't be rescaled to be on shell by the shower",
&KinematicsReconstructor::_noRescaleVector, -1, false, false, true, false, false);
static Switch<KinematicsReconstructor,unsigned int> interfaceInitialInitialBoostOption
("InitialInitialBoostOption",
"Option for how the boost from the system before ISR to that after ISR is applied.",
&KinematicsReconstructor::_initialBoost, 0, false, false);
static SwitchOption interfaceInitialInitialBoostOptionOneBoost
(interfaceInitialInitialBoostOption,
"OneBoost",
"Apply one boost from old CMS to new CMS",
0);
static SwitchOption interfaceInitialInitialBoostOptionLongTransBoost
(interfaceInitialInitialBoostOption,
"LongTransBoost",
"First apply a longitudinal and then a transverse boost",
1);
- static Switch<KinematicsReconstructor,unsigned int> interfaceFinalStateReconOption
- ("FinalStateReconOption",
- "Option for how to reconstruct the momenta of the final-state system",
- &KinematicsReconstructor::_finalStateReconOption, 0, false, false);
- static SwitchOption interfaceFinalStateReconOptionDefault
- (interfaceFinalStateReconOption,
- "Default",
- "All the momenta are rescaled in the rest frame",
- 0);
- static SwitchOption interfaceFinalStateReconOptionMostOffShell
- (interfaceFinalStateReconOption,
- "MostOffShell",
- "All particles put on the new-mass shell and then the most off-shell and"
- " recoiling system are rescaled to ensure 4-momentum is conserved.",
- 1);
- static SwitchOption interfaceFinalStateReconOptionRecursive
- (interfaceFinalStateReconOption,
- "Recursive",
- "Recursively put on shell by putting the most off-shell particle which"
- " hasn't been rescaled on-shell by rescaling the particles and the recoiling system. ",
- 2);
- static SwitchOption interfaceFinalStateReconOptionRestMostOffShell
- (interfaceFinalStateReconOption,
- "RestMostOffShell",
- "The most off-shell is put on shell by rescaling it and the recoiling system,"
- " the recoiling system is then put on-shell in its rest frame.",
- 3);
- static SwitchOption interfaceFinalStateReconOptionRestRecursive
- (interfaceFinalStateReconOption,
- "RestRecursive",
- "As 3 but recursive treated the currently most-off shell,"
- " only makes a difference if more than 3 partons.",
- 4);
-
+ static Deleted<KinematicsReconstructor> delFinalStateReconOption
+ ("FinalStateReconOption", "The old default (0) is now the only choice");
+
static Switch<KinematicsReconstructor,unsigned int> interfaceInitialStateReconOption
("InitialStateReconOption",
"Option for the reconstruction of initial state radiation",
&KinematicsReconstructor::_initialStateReconOption, 0, false, false);
static SwitchOption interfaceInitialStateReconOptionRapidity
(interfaceInitialStateReconOption,
"Rapidity",
"Preserve shat and rapidity",
0);
static SwitchOption interfaceInitialStateReconOptionLongitudinal
(interfaceInitialStateReconOption,
"Longitudinal",
"Preserve longitudinal momentum",
1);
static SwitchOption interfaceInitialStateReconOptionSofterFraction
(interfaceInitialStateReconOption,
"SofterFraction",
"Preserve the momentum fraction of the parton which has emitted softer.",
2);
+ static Switch<KinematicsReconstructor,bool> interfaceFinalFinalWeight
+ ("FinalFinalWeight",
+ "Apply kinematic rejection weight for final-states",
+ &KinematicsReconstructor::_finalFinalWeight, false, false, false);
+ static SwitchOption interfaceFinalFinalWeightNo
+ (interfaceFinalFinalWeight,
+ "No",
+ "Don't apply the weight",
+ false);
+ static SwitchOption interfaceFinalFinalWeightYes
+ (interfaceFinalFinalWeight,
+ "Yes",
+ "Apply the weight",
+ true);
+
}
void KinematicsReconstructor::doinit() {
Interfaced::doinit();
_noRescale = set<cPDPtr>(_noRescaleVector.begin(),_noRescaleVector.end());
}
bool KinematicsReconstructor::
reconstructTimeLikeJet(const tShowerParticlePtr particleJetParent) const {
assert(particleJetParent);
bool emitted=true;
// if this is not a fixed point in the reconstruction
if( !particleJetParent->children().empty() ) {
// if not a reconstruction fixpoint, dig deeper for all children:
for ( ParticleVector::const_iterator cit =
particleJetParent->children().begin();
cit != particleJetParent->children().end(); ++cit )
reconstructTimeLikeJet(dynamic_ptr_cast<ShowerParticlePtr>(*cit));
}
// it is a reconstruction fixpoint, ie kinematical data has to be available
else {
// check if the parent was part of the shower
ShowerParticlePtr jetGrandParent;
if(!particleJetParent->parents().empty())
jetGrandParent= dynamic_ptr_cast<ShowerParticlePtr>
(particleJetParent->parents()[0]);
// update if so
if (jetGrandParent) {
if (jetGrandParent->showerKinematics()) {
if(particleJetParent->id()==_progenitor->id()&&
!_progenitor->data().stable()&&abs(_progenitor->data().id())!=ParticleID::tauminus) {
jetGrandParent->showerKinematics()->reconstructLast(particleJetParent,
_progenitor->mass());
}
else {
jetGrandParent->showerKinematics()->reconstructLast(particleJetParent);
}
}
}
// otherwise
else {
Energy dm = ShowerHandler::currentHandler()->retConstituentMasses()?
particleJetParent->data().constituentMass():
particleJetParent->data().mass();
if (abs(dm-particleJetParent->momentum().m())>0.001*MeV
&&(particleJetParent->dataPtr()->stable() || abs(particleJetParent->id())==ParticleID::tauminus)
&&particleJetParent->id()!=ParticleID::gamma
&&_noRescale.find(particleJetParent->dataPtr())==_noRescale.end()) {
Lorentz5Momentum dum = particleJetParent->momentum();
dum.setMass(dm);
dum.rescaleEnergy();
particleJetParent->set5Momentum(dum);
}
else {
emitted=false;
}
}
}
// recursion has reached an endpoint once, ie we can reconstruct the
// kinematics from the children.
if( !particleJetParent->children().empty() )
particleJetParent->showerKinematics()
->reconstructParent( particleJetParent, particleJetParent->children() );
return emitted;
}
bool KinematicsReconstructor::
reconstructHardJets(ShowerTreePtr hard,
const map<tShowerProgenitorPtr,
pair<Energy,double> > & intrinsic,
ShowerInteraction type,
bool switchRecon) const {
_currentTree = hard;
_intrinsic=intrinsic;
// extract the particles from the ShowerTree
vector<ShowerProgenitorPtr> ShowerHardJets=hard->extractProgenitors();
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
_boosts[ShowerHardJets[ix]->progenitor()] = vector<LorentzRotation>();
}
for(map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator
tit = _currentTree->treelinks().begin();
tit != _currentTree->treelinks().end();++tit) {
_treeBoosts[tit->first] = vector<LorentzRotation>();
}
try {
// old recon method, using new member functions
if(_reconopt == 0 || switchRecon ) {
reconstructGeneralSystem(ShowerHardJets);
}
// reconstruction based on coloured systems
else if( _reconopt == 1) {
reconstructColourSinglets(ShowerHardJets,type);
}
// reconstruction of FF, then IF, then II
else if( _reconopt == 2) {
reconstructFinalFirst(ShowerHardJets);
}
// reconstruction based on coloured systems
else if( _reconopt == 3 || _reconopt == 4) {
reconstructColourPartner(ShowerHardJets);
}
else
assert(false);
}
catch(KinematicsReconstructionVeto) {
_progenitor=tShowerParticlePtr();
_intrinsic.clear();
for(map<tPPtr,vector<LorentzRotation> >::const_iterator bit=_boosts.begin();bit!=_boosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot);
}
}
_boosts.clear();
for(map<tShowerTreePtr,vector<LorentzRotation> >::const_iterator bit=_treeBoosts.begin();bit!=_treeBoosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot,false);
}
}
_currentTree = tShowerTreePtr();
_treeBoosts.clear();
return false;
}
catch (Exception & ex) {
_progenitor=tShowerParticlePtr();
_intrinsic.clear();
_currentTree = tShowerTreePtr();
_boosts.clear();
_treeBoosts.clear();
throw ex;
}
_progenitor=tShowerParticlePtr();
_intrinsic.clear();
// ensure x<1
for(map<ShowerProgenitorPtr,ShowerParticlePtr>::const_iterator
cit=hard->incomingLines().begin();cit!=hard->incomingLines().end();++cit) {
tPPtr parent = cit->first->progenitor();
while (!parent->parents().empty()) {
parent = parent->parents()[0];
}
tPPtr hadron;
if ( cit->first->original()->parents().empty() ) {
hadron = cit->first->original();
}
else {
hadron = cit->first->original()->parents()[0];
}
if( ! (hadron->id() == parent->id() && hadron->children().size() <= 1)
&& parent->momentum().rho() > hadron->momentum().rho()) {
_progenitor=tShowerParticlePtr();
_intrinsic.clear();
for(map<tPPtr,vector<LorentzRotation> >::const_iterator bit=_boosts.begin();bit!=_boosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot);
}
}
_boosts.clear();
for(map<tShowerTreePtr,vector<LorentzRotation> >::const_iterator bit=_treeBoosts.begin();bit!=_treeBoosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot,false);
}
}
_currentTree = tShowerTreePtr();
_treeBoosts.clear();
return false;
}
}
_boosts.clear();
_treeBoosts.clear();
_currentTree = tShowerTreePtr();
return true;
}
double
KinematicsReconstructor::solveKfactor(const Energy & root_s,
- const JetKinVect & jets) const {
+ const JetKinVect & jets) const {
Energy2 s = sqr(root_s);
// must be at least two jets
if ( jets.size() < 2) throw KinematicsReconstructionVeto();
// sum of jet masses must be less than roots
if(momConsEq( 0.0, root_s, jets )>ZERO) throw KinematicsReconstructionVeto();
// if two jets simple solution
if ( jets.size() == 2 ) {
static const Energy2 eps = 1.0e-4 * MeV2;
if ( sqr(jets[0].p.x()+jets[1].p.x()) < eps &&
sqr(jets[0].p.y()+jets[1].p.y()) < eps &&
sqr(jets[0].p.z()+jets[1].p.z()) < eps ) {
Energy test = (jets[0].p+jets[1].p).vect().mag();
if(test > 1.0e-4 * MeV) throw KinematicsReconstructionVeto();
if ( jets[0].p.vect().mag2() < eps ) throw KinematicsReconstructionVeto();
Energy2 m1sq(jets[0].q.m2()),m2sq(jets[1].q.m2());
return sqrt( ( sqr(s - m1sq - m2sq) - 4.*m1sq*m2sq )
/(4.*s*jets[0].p.vect().mag2()) );
}
else throw KinematicsReconstructionVeto();
}
// i.e. jets.size() > 2, numerically
// check convergence, if it's a problem maybe use Newton iteration?
else {
double k1 = 0.,k2 = 1.,k = 0.;
if ( momConsEq( k1, root_s, jets ) < ZERO ) {
while ( momConsEq( k2, root_s, jets ) < ZERO ) {
k1 = k2;
k2 *= 2;
}
while ( fabs( (k1 - k2)/(k1 + k2) ) > 1.e-10 ) {
if( momConsEq( k2, root_s, jets ) == ZERO ) {
return k2;
} else {
k = (k1+k2)/2.;
if ( momConsEq( k, root_s, jets ) > ZERO ) {
k2 = k;
} else {
k1 = k;
}
}
}
return k1;
} else throw KinematicsReconstructionVeto();
}
throw KinematicsReconstructionVeto();
}
bool KinematicsReconstructor::
reconstructSpaceLikeJet( const tShowerParticlePtr p) const {
bool emitted = true;
tShowerParticlePtr child;
tShowerParticlePtr parent;
if(!p->parents().empty())
parent = dynamic_ptr_cast<ShowerParticlePtr>(p->parents()[0]);
if(parent) {
emitted=true;
reconstructSpaceLikeJet(parent);
}
// if branching reconstruct time-like child
if(p->children().size()==2)
child = dynamic_ptr_cast<ShowerParticlePtr>(p->children()[1]);
if(p->perturbative()==0 && child) {
dynamic_ptr_cast<ShowerParticlePtr>(p->children()[0])->
showerKinematics()->reconstructParent(p,p->children());
if(!child->children().empty()) {
_progenitor=child;
reconstructTimeLikeJet(child);
// calculate the momentum of the particle
Lorentz5Momentum pnew=p->momentum()-child->momentum();
pnew.rescaleMass();
p->children()[0]->set5Momentum(pnew);
}
}
return emitted;
}
Boost KinematicsReconstructor::
solveBoostBeta( const double k, const Lorentz5Momentum & newq,
const Lorentz5Momentum & oldp ) {
// try something different, purely numerical first:
// a) boost to rest frame of newq, b) boost with kp/E
Energy q = newq.vect().mag();
Energy2 qs = sqr(q);
Energy2 Q2 = newq.m2();
Energy kp = k*(oldp.vect().mag());
Energy2 kps = sqr(kp);
// usually we take the minus sign, since this boost will be smaller.
// we only require |k \vec p| = |\vec q'| which leaves the sign of
// the boost open but the 'minus' solution gives a smaller boost
// parameter, i.e. the result should be closest to the previous
// result. this is to be changed if we would get many momentum
// conservation violations at the end of the shower from a hard
// process.
double betam = (q*sqrt(qs + Q2) - kp*sqrt(kps + Q2))/(kps + qs + Q2);
// move directly to 'return'
Boost beta = -betam*(k/kp)*oldp.vect();
// note that (k/kp)*oldp.vect() = oldp.vect()/oldp.vect().mag() but cheaper.
// leave this out if it's running properly!
if ( betam >= 0 ) return beta;
else return Boost(0., 0., 0.);
}
bool KinematicsReconstructor::
reconstructDecayJets(ShowerTreePtr decay,
ShowerInteraction) const {
_currentTree = decay;
// extract the particles from the ShowerTree
vector<ShowerProgenitorPtr> ShowerHardJets=decay->extractProgenitors();
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
_boosts[ShowerHardJets[ix]->progenitor()] = vector<LorentzRotation>();
}
for(map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator
tit = _currentTree->treelinks().begin();
tit != _currentTree->treelinks().end();++tit) {
_treeBoosts[tit->first] = vector<LorentzRotation>();
}
try {
bool radiated[2]={false,false};
// find the decaying particle and check if particles radiated
ShowerProgenitorPtr initial;
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
// only consider initial-state jets
if(ShowerHardJets[ix]->progenitor()->isFinalState()) {
radiated[1] |=ShowerHardJets[ix]->hasEmitted();
}
else {
initial=ShowerHardJets[ix];
radiated[0]|=ShowerHardJets[ix]->hasEmitted();
}
}
// find boost to the rest frame if needed
Boost boosttorest=-initial->progenitor()->momentum().boostVector();
double gammarest =
initial->progenitor()->momentum().e()/
initial->progenitor()->momentum().mass();
// check if need to boost to rest frame
bool gottaBoost = (boosttorest.mag() > 1e-12);
// if initial state radiation reconstruct the jet and set up the basis vectors
Lorentz5Momentum pjet;
Lorentz5Momentum nvect;
// find the partner
ShowerParticlePtr partner = initial->progenitor()->partner();
Lorentz5Momentum ppartner[2];
if(partner) ppartner[0]=partner->momentum();
// get the n reference vector
if(partner) {
if(initial->progenitor()->showerKinematics()) {
nvect = initial->progenitor()->showerBasis()->getBasis()[1];
}
else {
Lorentz5Momentum ppartner=initial->progenitor()->partner()->momentum();
if(gottaBoost) ppartner.boost(boosttorest,gammarest);
nvect = Lorentz5Momentum( ZERO,0.5*initial->progenitor()->mass()*
ppartner.vect().unit());
nvect.boost(-boosttorest,gammarest);
}
}
// if ISR
if(radiated[0]) {
// reconstruct the decay jet
reconstructDecayJet(initial->progenitor());
// momentum of decaying particle after ISR
pjet=initial->progenitor()->momentum()
-decay->incomingLines().begin()->second->momentum();
pjet.rescaleMass();
}
// boost initial state jet and basis vector if needed
if(gottaBoost) {
pjet.boost(boosttorest,gammarest);
nvect.boost(boosttorest,gammarest);
ppartner[0].boost(boosttorest,gammarest);
}
// loop over the final-state particles and do the reconstruction
JetKinVect possiblepartners;
JetKinVect jetKinematics;
bool atLeastOnce = radiated[0];
LorentzRotation restboost(boosttorest,gammarest);
Energy inmass(ZERO);
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
// only consider final-state jets
if(!ShowerHardJets[ix]->progenitor()->isFinalState()) {
inmass=ShowerHardJets[ix]->progenitor()->mass();
continue;
}
// do the reconstruction
JetKinStruct tempJetKin;
tempJetKin.parent = ShowerHardJets[ix]->progenitor();
if(ShowerHardJets.size()==2) {
Lorentz5Momentum dum=ShowerHardJets[ix]->progenitor()->momentum();
dum.setMass(inmass);
dum.rescaleRho();
tempJetKin.parent->set5Momentum(dum);
}
tempJetKin.p = ShowerHardJets[ix]->progenitor()->momentum();
if(gottaBoost) tempJetKin.p.boost(boosttorest,gammarest);
_progenitor=tempJetKin.parent;
if(ShowerHardJets[ix]->reconstructed()==ShowerProgenitor::notReconstructed) {
atLeastOnce |= reconstructTimeLikeJet(tempJetKin.parent);
ShowerHardJets[ix]->reconstructed(ShowerProgenitor::done);
}
if(gottaBoost) deepTransform(tempJetKin.parent,restboost);
tempJetKin.q = ShowerHardJets[ix]->progenitor()->momentum();
jetKinematics.push_back(tempJetKin);
}
if(partner) ppartner[1]=partner->momentum();
// calculate the rescaling parameters
double k1,k2;
Lorentz5Momentum qt;
if(!solveDecayKFactor(initial->progenitor()->mass(),nvect,pjet,
jetKinematics,partner,ppartner,k1,k2,qt)) {
for(map<tPPtr,vector<LorentzRotation> >::const_iterator bit=_boosts.begin();bit!=_boosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot);
}
}
_boosts.clear();
for(map<tShowerTreePtr,vector<LorentzRotation> >::const_iterator bit=_treeBoosts.begin();bit!=_treeBoosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot,false);
}
}
_treeBoosts.clear();
_currentTree = tShowerTreePtr();
return false;
}
// apply boosts and rescalings to final-state jets
for(JetKinVect::iterator it = jetKinematics.begin();
it != jetKinematics.end(); ++it) {
LorentzRotation Trafo = LorentzRotation();
if(it->parent!=partner) {
// boost for rescaling
if(atLeastOnce) {
map<tShowerTreePtr,pair<tShowerProgenitorPtr,
tShowerParticlePtr> >::const_iterator tit;
for(tit = _currentTree->treelinks().begin();
tit != _currentTree->treelinks().end();++tit) {
if(tit->second.first && tit->second.second==it->parent)
break;
}
if(it->parent->children().empty()&&!it->parent->spinInfo() &&
tit==_currentTree->treelinks().end()) {
Lorentz5Momentum pnew(k2*it->p.vect(),
sqrt(sqr(k2*it->p.vect().mag())+it->q.mass2()),
it->q.mass());
it->parent->set5Momentum(pnew);
}
else {
// rescaling boost can't ever work in this case
if(k2<0. && it->q.mass()==ZERO)
throw KinematicsReconstructionVeto();
Trafo = solveBoost(k2, it->q, it->p);
}
}
if(gottaBoost) Trafo.boost(-boosttorest,gammarest);
if(atLeastOnce || gottaBoost) deepTransform(it->parent,Trafo);
}
else {
Lorentz5Momentum pnew=ppartner[0];
pnew *=k1;
pnew-=qt;
pnew.setMass(ppartner[1].mass());
pnew.rescaleEnergy();
LorentzRotation Trafo=solveBoost(1.,ppartner[1],pnew);
if(gottaBoost) Trafo.boost(-boosttorest,gammarest);
deepTransform(partner,Trafo);
}
}
}
catch(KinematicsReconstructionVeto) {
for(map<tPPtr,vector<LorentzRotation> >::const_iterator bit=_boosts.begin();bit!=_boosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot);
}
}
_boosts.clear();
for(map<tShowerTreePtr,vector<LorentzRotation> >::const_iterator bit=_treeBoosts.begin();bit!=_treeBoosts.end();++bit) {
for(vector<LorentzRotation>::const_reverse_iterator rit=bit->second.rbegin();rit!=bit->second.rend();++rit) {
LorentzRotation rot = rit->inverse();
bit->first->transform(rot,false);
}
}
_treeBoosts.clear();
_currentTree = tShowerTreePtr();
return false;
}
catch (Exception & ex) {
_currentTree = tShowerTreePtr();
_boosts.clear();
_treeBoosts.clear();
throw ex;
}
_boosts.clear();
_treeBoosts.clear();
_currentTree = tShowerTreePtr();
return true;
}
bool KinematicsReconstructor::
reconstructDecayJet( const tShowerParticlePtr p) const {
if(p->children().empty()) return false;
tShowerParticlePtr child;
// if branching reconstruct time-like child
child = dynamic_ptr_cast<ShowerParticlePtr>(p->children()[1]);
if(child) {
_progenitor=child;
reconstructTimeLikeJet(child);
// calculate the momentum of the particle
Lorentz5Momentum pnew=p->momentum()-child->momentum();
pnew.rescaleMass();
p->children()[0]->set5Momentum(pnew);
child=dynamic_ptr_cast<ShowerParticlePtr>(p->children()[0]);
reconstructDecayJet(child);
return true;
}
return false;
}
bool KinematicsReconstructor::
solveDecayKFactor(Energy mb,
const Lorentz5Momentum & n,
const Lorentz5Momentum & pjet,
const JetKinVect & jetKinematics,
ShowerParticlePtr partner,
Lorentz5Momentum ppartner[2],
double & k1, double & k2,
Lorentz5Momentum & qt) const {
Energy2 pjn = partner ? pjet.vect()*n.vect() : ZERO;
Energy2 pcn = partner ? ppartner[0].vect()*n.vect() : 1.*MeV2;
Energy2 nmag = n.vect().mag2();
Lorentz5Momentum pn = partner ? (pjn/nmag)*n : Lorentz5Momentum();
qt=pjet-pn; qt.setE(ZERO);
Energy2 pt2=qt.vect().mag2();
Energy Ejet = pjet.e();
// magnitudes of the momenta for fast access
vector<Energy2> pmag;
Energy total(Ejet);
for(unsigned int ix=0;ix<jetKinematics.size();++ix) {
pmag.push_back(jetKinematics[ix].p.vect().mag2());
total+=jetKinematics[ix].q.mass();
}
// return if no possible solution
if(total>mb) return false;
Energy2 pcmag=ppartner[0].vect().mag2();
// used newton-raphson to get the rescaling
static const Energy eps=1e-8*GeV;
long double d1(1.),d2(1.);
Energy roots, ea, ec, ds;
unsigned int ix=0;
do {
++ix;
d2 = d1 + pjn/pcn;
roots = Ejet;
ds = ZERO;
for(unsigned int iy=0;iy<jetKinematics.size();++iy) {
if(jetKinematics[iy].parent==partner) continue;
ea = sqrt(sqr(d2)*pmag[iy]+jetKinematics[iy].q.mass2());
roots += ea;
ds += d2/ea*pmag[iy];
}
if(partner) {
ec = sqrt(sqr(d1)*pcmag + pt2 + ppartner[1].mass2());
roots += ec;
ds += d1/ec*pcmag;
}
d1 += (mb-roots)/ds;
d2 = d1 + pjn/pcn;
}
while(abs(mb-roots)>eps && ix<100);
k1=d1;
k2=d2;
// return true if N-R succeed, otherwise false
return ix<100;
}
bool KinematicsReconstructor::
deconstructDecayJets(HardTreePtr decay,ShowerInteraction) const {
// extract the momenta of the particles
vector<Lorentz5Momentum> pin;
vector<Lorentz5Momentum> pout;
// on-shell masses of the decay products
vector<Energy> mon;
Energy mbar(-GeV);
// the hard branchings of the particles
set<HardBranchingPtr>::iterator cit;
set<HardBranchingPtr> branchings=decay->branchings();
// properties of the incoming particle
bool ISR = false;
HardBranchingPtr initial;
Lorentz5Momentum qisr;
// find the incoming particle, both before and after
// any ISR
for(cit=branchings.begin();cit!=branchings.end();++cit){
if((*cit)->status()==HardBranching::Incoming||
(*cit)->status()==HardBranching::Decay) {
// search back up isr if needed
HardBranchingPtr branch = *cit;
while(branch->parent()) branch=branch->parent();
initial=branch;
// momentum or original parent
pin.push_back(branch->branchingParticle()->momentum());
// ISR?
ISR = !branch->branchingParticle()->children().empty();
// ISR momentum
qisr = pin.back()-(**cit).branchingParticle()->momentum();
qisr.rescaleMass();
}
}
assert(pin.size()==1);
// compute boost to rest frame
Boost boostv=-pin[0].boostVector();
// partner for ISR
ShowerParticlePtr partner;
Lorentz5Momentum ppartner;
if(initial->branchingParticle()->partner()) {
partner=initial->branchingParticle()->partner();
ppartner=partner->momentum();
}
// momentum of the decay products
for(cit=branchings.begin();cit!=branchings.end();++cit) {
if((*cit)->status()!=HardBranching::Outgoing) continue;
// find the mass of the particle
// including special treatment for off-shell resonances
// to preserve off-shell mass
Energy mass;
if(!(**cit).branchingParticle()->dataPtr()->stable()) {
HardBranchingPtr branch=*cit;
while(!branch->children().empty()) {
for(unsigned int ix=0;ix<branch->children().size();++ix) {
if(branch->children()[ix]->branchingParticle()->id()==
(**cit).branchingParticle()->id()) {
branch = branch->children()[ix];
continue;
}
}
};
mass = branch->branchingParticle()->mass();
}
else {
mass = (**cit).branchingParticle()->dataPtr()->mass();
}
// if not evolution partner of decaying particle
if((*cit)->branchingParticle()!=partner) {
pout.push_back((*cit)->branchingParticle()->momentum());
mon.push_back(mass);
}
// evolution partner of decaying particle
else {
mbar = mass;
}
}
// boost all the momenta to the rest frame of the decaying particle
for(unsigned int ix=0;ix<pout.size();++ix) pout[ix].boost(boostv);
if(initial->branchingParticle()->partner()) {
ppartner.boost(boostv);
qisr.boost(boostv);
}
// compute the rescaling factors
double k1,k2;
if(!ISR) {
if(partner) {
pout.push_back(ppartner);
mon.push_back(mbar);
}
k1=k2=inverseRescalingFactor(pout,mon,pin[0].mass());
if(partner) {
pout.pop_back();
mon.pop_back();
}
}
else {
if(!inverseDecayRescalingFactor(pout,mon,pin[0].mass(),
ppartner,mbar,k1,k2)) return false;
}
// now calculate the p reference vectors
unsigned int ifinal=0;
for(cit=branchings.begin();cit!=branchings.end();++cit) {
if((**cit).status()!=HardBranching::Outgoing) continue;
// for partners other than colour partner of decaying particle
if((*cit)->branchingParticle()!=partner) {
Lorentz5Momentum pvect = (*cit)->branchingParticle()->momentum();
pvect.boost(boostv);
pvect /= k1;
pvect.setMass(mon[ifinal]);
++ifinal;
pvect.rescaleEnergy();
pvect.boost(-boostv);
(*cit)->pVector(pvect);
(*cit)->showerMomentum(pvect);
}
// for colour partner of decaying particle
else {
Lorentz5Momentum pvect = (*cit)->branchingParticle()->momentum();
pvect.boost(boostv);
Lorentz5Momentum qtotal;
for(unsigned int ix=0;ix<pout.size();++ix) qtotal+=pout[ix];
Lorentz5Momentum qperp =
qisr-(qisr.vect()*qtotal.vect())/(qtotal.vect().mag2())*qtotal;
pvect +=qperp;
pvect /=k2;
pvect.setMass(mbar);
pvect.rescaleEnergy();
pvect.boost(-boostv);
(*cit)->pVector(pvect);
(*cit)->showerMomentum(pvect);
}
}
// For initial-state if needed
if(initial) {
tShowerParticlePtr newPartner=initial->branchingParticle()->partner();
if(newPartner) {
tHardBranchingPtr branch;
for( set<HardBranchingPtr>::iterator clt = branchings.begin();
clt != branchings.end(); ++clt ) {
if((**clt).branchingParticle()==newPartner) {
initial->colourPartner(*clt);
branch=*clt;
break;
}
}
Lorentz5Momentum pvect = initial->branchingParticle()->momentum();
initial->pVector(pvect);
Lorentz5Momentum ptemp = branch->pVector();
ptemp.boost(boostv);
Lorentz5Momentum nvect = Lorentz5Momentum( ZERO,
0.5*initial->branchingParticle()->mass()*
ptemp.vect().unit());
nvect.boost(-boostv);
initial->nVector(nvect);
}
}
// calculate the reference vectors, then for outgoing particles
for(cit=branchings.begin();cit!=branchings.end();++cit){
if((**cit).status()!=HardBranching::Outgoing) continue;
// find the partner branchings
tShowerParticlePtr newPartner=(*cit)->branchingParticle()->partner();
if(!newPartner) continue;
tHardBranchingPtr branch;
for( set<HardBranchingPtr>::iterator clt = branchings.begin();
clt != branchings.end(); ++clt ) {
if(cit==clt) continue;
if((**clt).branchingParticle()==newPartner) {
(**cit).colourPartner(*clt);
branch=*clt;
break;
}
}
if((**decay->incoming().begin()).branchingParticle()==newPartner) {
(**cit).colourPartner(*decay->incoming().begin());
branch = *decay->incoming().begin();
}
// final-state colour partner
if(branch->status()==HardBranching::Outgoing) {
Boost boost=((*cit)->pVector()+branch->pVector()).findBoostToCM();
Lorentz5Momentum pcm = branch->pVector();
pcm.boost(boost);
Lorentz5Momentum nvect = Lorentz5Momentum(ZERO,pcm.vect());
nvect.boost( -boost);
(*cit)->nVector(nvect);
}
// initial-state colour partner
else {
Boost boost=branch->pVector().findBoostToCM();
Lorentz5Momentum pcm = (*cit)->pVector();
pcm.boost(boost);
Lorentz5Momentum nvect = Lorentz5Momentum( ZERO, -pcm.vect());
nvect.boost( -boost);
(*cit)->nVector(nvect);
}
}
// now compute the new momenta
// and calculate the shower variables
for(cit=branchings.begin();cit!=branchings.end();++cit) {
if((**cit).status()!=HardBranching::Outgoing) continue;
LorentzRotation B=LorentzRotation(-boostv);
LorentzRotation A=LorentzRotation(boostv),R;
if((*cit)->branchingParticle()==partner) {
Lorentz5Momentum qnew;
Energy2 dot=(*cit)->pVector()*(*cit)->nVector();
double beta = 0.5*((*cit)->branchingParticle()->momentum().m2()
-sqr((*cit)->pVector().mass()))/dot;
qnew=(*cit)->pVector()+beta*(*cit)->nVector();
qnew.rescaleMass();
// compute the boost
R=B*solveBoost(A*qnew,A*(*cit)->branchingParticle()->momentum())*A;
}
else {
Lorentz5Momentum qnew;
if((*cit)->branchingParticle()->partner()) {
Energy2 dot=(*cit)->pVector()*(*cit)->nVector();
double beta = 0.5*((*cit)->branchingParticle()->momentum().m2()
-sqr((*cit)->pVector().mass()))/dot;
qnew=(*cit)->pVector()+beta*(*cit)->nVector();
qnew.rescaleMass();
}
else {
qnew = (*cit)->pVector();
}
// compute the boost
R=B*solveBoost(A*qnew,A*(*cit)->branchingParticle()->momentum())*A;
}
// reconstruct the momenta
(*cit)->setMomenta(R,1.0,Lorentz5Momentum());
}
if(initial) {
initial->setMomenta(LorentzRotation(),1.0,Lorentz5Momentum());
}
return true;
}
double KinematicsReconstructor::
inverseRescalingFactor(vector<Lorentz5Momentum> pout,
vector<Energy> mon, Energy roots) const {
double lambda=1.;
if(pout.size()==2) {
double mu_q1(pout[0].m()/roots), mu_q2(pout[1].m()/roots);
double mu_p1(mon[0]/roots) , mu_p2(mon[1]/roots);
lambda =
((1.+mu_q1+mu_q2)*(1.-mu_q1-mu_q2)*(mu_q1-1.-mu_q2)*(mu_q2-1.-mu_q1))/
((1.+mu_p1+mu_p2)*(1.-mu_p1-mu_p2)*(mu_p1-1.-mu_p2)*(mu_p2-1.-mu_p1));
if(lambda<0.)
throw Exception() << "Rescaling factor is imaginary in KinematicsReconstructor::"
<< "inverseRescalingFactor lambda^2= " << lambda
<< Exception::eventerror;
lambda = sqrt(lambda);
}
else {
unsigned int ntry=0;
// compute magnitudes once for speed
vector<Energy2> pmag;
for(unsigned int ix=0;ix<pout.size();++ix) {
pmag.push_back(pout[ix].vect().mag2());
}
// Newton-Raphson for the rescaling
vector<Energy> root(pout.size());
do {
// compute new energies
Energy sum(ZERO);
for(unsigned int ix=0;ix<pout.size();++ix) {
root[ix] = sqrt(pmag[ix]/sqr(lambda)+sqr(mon[ix]));
sum+=root[ix];
}
// if accuracy reached exit
if(abs(sum/roots-1.)<1e-10) break;
// use Newton-Raphson to compute new guess for lambda
Energy numer(ZERO),denom(ZERO);
for(unsigned int ix=0;ix<pout.size();++ix) {
numer +=root[ix];
denom +=pmag[ix]/root[ix];
}
numer-=roots;
double fact = 1.+sqr(lambda)*numer/denom;
if(fact<0.) fact=0.5;
lambda *=fact;
++ntry;
}
while(ntry<100);
}
if(std::isnan(lambda))
throw Exception() << "Rescaling factor is nan in KinematicsReconstructor::"
<< "inverseRescalingFactor "
<< Exception::eventerror;
return lambda;
}
bool KinematicsReconstructor::
deconstructGeneralSystem(HardTreePtr tree,
ShowerInteraction type) const {
// extract incoming and outgoing particles
ColourSingletShower in,out;
for(set<HardBranchingPtr>::const_iterator it=tree->branchings().begin();
it!=tree->branchings().end();++it) {
if((**it).status()==HardBranching::Incoming) in .jets.push_back(*it);
else out.jets.push_back(*it);
}
LorentzRotation toRest,fromRest;
bool applyBoost(false);
// do the initial-state reconstruction
deconstructInitialInitialSystem(applyBoost,toRest,fromRest,
tree,in.jets,type);
// do the final-state reconstruction
deconstructFinalStateSystem(toRest,fromRest,tree,
out.jets,type);
// only at this point that we can be sure all the reference vectors
// are correct
for(set<HardBranchingPtr>::const_iterator it=tree->branchings().begin();
it!=tree->branchings().end();++it) {
if((**it).status()==HardBranching::Incoming) continue;
if((**it).branchingParticle()->coloured())
(**it).setMomenta(LorentzRotation(),1.,Lorentz5Momentum(),false);
}
for(set<HardBranchingPtr>::const_iterator it=tree->incoming().begin();
it!=tree->incoming().end();++it) {
(**it).setMomenta(LorentzRotation(),1.,Lorentz5Momentum(),false);
}
return true;
}
bool KinematicsReconstructor::deconstructHardJets(HardTreePtr tree,
ShowerInteraction type) const {
// inverse of old recon method
if(_reconopt == 0) {
return deconstructGeneralSystem(tree,type);
}
else if(_reconopt == 1) {
return deconstructColourSinglets(tree,type);
}
else if(_reconopt == 2) {
throw Exception() << "Inverse reconstruction is not currently supported for ReconstructionOption Colour2 "
<< "in KinematicsReconstructor::deconstructHardJets(). Please use one of the other options\n"
<< Exception::runerror;
}
else if(_reconopt == 3 || _reconopt == 4 ) {
return deconstructColourPartner(tree,type);
}
else
assert(false);
}
bool KinematicsReconstructor::
deconstructColourSinglets(HardTreePtr tree,
ShowerInteraction type) const {
// identify the colour singlet systems
unsigned int nnun(0),nnii(0),nnif(0),nnf(0),nni(0);
vector<ColourSingletShower>
systems(identifySystems(tree->branchings(),nnun,nnii,nnif,nnf,nni));
// now decide what to do
LorentzRotation toRest,fromRest;
bool applyBoost(false);
bool general(false);
// initial-initial connection and final-state colour singlet systems
// Drell-Yan type
if(nnun==0&&nnii==1&&nnif==0&&nnf>0&&nni==0) {
// reconstruct initial-initial system
for(unsigned int ix=0;ix<systems.size();++ix) {
if(systems[ix].type==II)
deconstructInitialInitialSystem(applyBoost,toRest,fromRest,tree,
systems[ix].jets,type);
}
if(type!=ShowerInteraction::QCD) {
combineFinalState(systems);
general=false;
}
}
// DIS and VBF type
else if(nnun==0&&nnii==0&&((nnif==1&&nnf>0&&nni==1)||
(nnif==2&& nni==0))) {
for(unsigned int ix=0;ix<systems.size();++ix) {
if(systems[ix].type==IF)
deconstructInitialFinalSystem(tree,systems[ix].jets,type);
}
}
// e+e- type
else if(nnun==0&&nnii==0&&nnif==0&&nnf>0&&nni==2) {
// only FS needed
// but need to boost to rest frame if QED ISR
Lorentz5Momentum ptotal;
for(unsigned int ix=0;ix<systems.size();++ix) {
if(systems[ix].type==I)
ptotal += systems[ix].jets[0]->branchingParticle()->momentum();
}
toRest = LorentzRotation(ptotal.findBoostToCM());
fromRest = toRest;
fromRest.invert();
if(type!=ShowerInteraction::QCD) {
combineFinalState(systems);
general=false;
}
}
// general type
else {
general = true;
}
// final-state systems except for general recon
if(!general) {
for(unsigned int ix=0;ix<systems.size();++ix) {
if(systems[ix].type==F)
deconstructFinalStateSystem(toRest,fromRest,tree,
systems[ix].jets,type);
}
// only at this point that we can be sure all the reference vectors
// are correct
for(set<HardBranchingPtr>::const_iterator it=tree->branchings().begin();
it!=tree->branchings().end();++it) {
if((**it).status()==HardBranching::Incoming) continue;
if((**it).branchingParticle()->coloured())
(**it).setMomenta(LorentzRotation(),1.,Lorentz5Momentum(),false);
}
for(set<HardBranchingPtr>::const_iterator it=tree->incoming().begin();
it!=tree->incoming().end();++it) {
(**it).setMomenta(LorentzRotation(),1.,Lorentz5Momentum(),false);
}
return true;
}
else {
return deconstructGeneralSystem(tree,type);
}
return true;
}
bool KinematicsReconstructor::
deconstructColourPartner(HardTreePtr tree,
ShowerInteraction type) const {
Lorentz5Momentum ptotal;
HardBranchingPtr emitter;
ColourSingletShower incomingShower,outgoingShower;
for(set<HardBranchingPtr>::const_iterator it=tree->branchings().begin();
it!=tree->branchings().end();++it) {
if((**it).status()==HardBranching::Incoming) {
incomingShower.jets.push_back(*it);
ptotal += (*it)->branchingParticle()->momentum();
// check for emitting particle
if((**it).parent() ) {
if(!emitter)
emitter = *it;
else
throw Exception() << "Only one emitting particle allowed in "
<< "KinematicsReconstructor::deconstructColourPartner()"
<< Exception::runerror;
}
}
else if ((**it).status()==HardBranching::Outgoing) {
outgoingShower.jets.push_back(*it);
// check for emitting particle
if(!(**it).children().empty() ) {
if(!emitter)
emitter = *it;
else
throw Exception() << "Only one emitting particle allowed in "
<< "KinematicsReconstructor::deconstructColourPartner()"
<< Exception::runerror;
}
}
}
assert(emitter);
assert(emitter->colourPartner());
ColourSingletShower system;
system.jets.push_back(emitter);
system.jets.push_back(emitter->colourPartner());
LorentzRotation toRest,fromRest;
bool applyBoost(false);
// identify the colour singlet system
if(emitter->status() == HardBranching::Outgoing &&
emitter->colourPartner()->status() == HardBranching::Outgoing ) {
system.type=F;
// need to boost to rest frame if QED ISR
if( !incomingShower.jets[0]->branchingParticle()->coloured() &&
!incomingShower.jets[1]->branchingParticle()->coloured() ) {
Boost boost = ptotal.findBoostToCM();
toRest = LorentzRotation( boost);
fromRest = LorentzRotation(-boost);
}
else
findInitialBoost(ptotal,ptotal,toRest,fromRest);
deconstructFinalStateSystem(toRest,fromRest,tree,
system.jets,type);
}
else if (emitter->status() == HardBranching::Incoming &&
emitter->colourPartner()->status() == HardBranching::Incoming) {
system.type=II;
deconstructInitialInitialSystem(applyBoost,toRest,fromRest,tree,system.jets,type);
// make sure the recoil gets applied
deconstructFinalStateSystem(toRest,fromRest,tree,
outgoingShower.jets,type);
}
else if ((emitter->status() == HardBranching::Outgoing &&
emitter->colourPartner()->status() == HardBranching::Incoming ) ||
(emitter->status() == HardBranching::Incoming &&
emitter->colourPartner()->status() == HardBranching::Outgoing)) {
system.type=IF;
// enusre incoming first
if(system.jets[0]->status() == HardBranching::Outgoing)
swap(system.jets[0],system.jets[1]);
deconstructInitialFinalSystem(tree,system.jets,type);
}
else {
throw Exception() << "Unknown type of system in "
<< "KinematicsReconstructor::deconstructColourPartner()"
<< Exception::runerror;
}
// only at this point that we can be sure all the reference vectors
// are correct
for(set<HardBranchingPtr>::const_iterator it=tree->branchings().begin();
it!=tree->branchings().end();++it) {
if((**it).status()==HardBranching::Incoming) continue;
if((**it).branchingParticle()->coloured())
(**it).setMomenta(LorentzRotation(),1.,Lorentz5Momentum(),false);
}
for(set<HardBranchingPtr>::const_iterator it=tree->incoming().begin();
it!=tree->incoming().end();++it) {
(**it).setMomenta(LorentzRotation(),1.,Lorentz5Momentum(),false);
}
for(set<HardBranchingPtr>::const_iterator it=tree->branchings().begin();
it!=tree->branchings().end();++it) {
if((**it).status()!=HardBranching::Incoming) continue;
if(*it==system.jets[0] || *it==system.jets[1]) continue;
if((**it).branchingParticle()->momentum().z()>ZERO) {
(**it).z((**it).branchingParticle()->momentum().plus()/(**it).beam()->momentum().plus());
}
else {
(**it).z((**it).branchingParticle()->momentum().minus()/(**it).beam()->momentum().minus());
}
}
return true;
}
void KinematicsReconstructor::
reconstructInitialFinalSystem(vector<ShowerProgenitorPtr> jets) const {
Lorentz5Momentum pin[2],pout[2],pbeam;
for(unsigned int ix=0;ix<jets.size();++ix) {
// final-state parton
if(jets[ix]->progenitor()->isFinalState()) {
pout[0] +=jets[ix]->progenitor()->momentum();
_progenitor = jets[ix]->progenitor();
if(jets[ix]->reconstructed()==ShowerProgenitor::notReconstructed) {
reconstructTimeLikeJet(jets[ix]->progenitor());
jets[ix]->reconstructed(ShowerProgenitor::done);
}
}
// initial-state parton
else {
pin[0] +=jets[ix]->progenitor()->momentum();
if(jets[ix]->progenitor()->showerKinematics()) {
pbeam = jets[ix]->progenitor()->showerBasis()->getBasis()[0];
}
else {
if ( jets[ix]->original()->parents().empty() ) {
pbeam = jets[ix]->progenitor()->momentum();
}
else {
pbeam = jets[ix]->original()->parents()[0]->momentum();
}
}
if(jets[ix]->reconstructed()==ShowerProgenitor::notReconstructed) {
reconstructSpaceLikeJet(jets[ix]->progenitor());
jets[ix]->reconstructed(ShowerProgenitor::done);
}
assert(!jets[ix]->original()->parents().empty());
}
}
// add intrinsic pt if needed
addIntrinsicPt(jets);
// momenta after showering
for(unsigned int ix=0;ix<jets.size();++ix) {
if(jets[ix]->progenitor()->isFinalState())
pout[1] += jets[ix]->progenitor()->momentum();
else
pin[1] += jets[ix]->progenitor()->momentum();
}
// work out the boost to the Breit frame
Lorentz5Momentum pa = pout[0]-pin[0];
Axis axis(pa.vect().unit());
LorentzRotation rot;
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
if ( sinth > 1.e-9 )
rot.setRotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
rot.rotateX(Constants::pi);
rot.boostZ( pa.e()/pa.vect().mag());
Lorentz5Momentum ptemp=rot*pbeam;
Boost trans = -1./ptemp.e()*ptemp.vect();
trans.setZ(0.);
if ( trans.mag2() - 1. >= 0. ) throw KinematicsReconstructionVeto();
rot.boost(trans);
pa *=rot;
// project and calculate rescaling
// reference vectors
Lorentz5Momentum n1(ZERO,ZERO,-pa.z(),-pa.z());
Lorentz5Momentum n2(ZERO,ZERO, pa.z(),-pa.z());
Energy2 n1n2 = n1*n2;
// decompose the momenta
Lorentz5Momentum qbp=rot*pin[1],qcp=rot*pout[1];
qbp.rescaleMass();
qcp.rescaleMass();
double a[2],b[2];
a[0] = n2*qbp/n1n2;
b[0] = n1*qbp/n1n2;
Lorentz5Momentum qperp = qbp-a[0]*n1-b[0]*n2;
b[1] = 0.5;
a[1] = 0.5*(qcp.m2()-qperp.m2())/n1n2/b[1];
double kb;
if(a[0]!=0.) {
double A(0.5*a[0]),B(b[0]*a[0]-a[1]*b[1]-0.25),C(-0.5*b[0]);
if(sqr(B)-4.*A*C<0.) throw KinematicsReconstructionVeto();
kb = 0.5*(-B+sqrt(sqr(B)-4.*A*C))/A;
}
else {
kb = 0.5*b[0]/(b[0]*a[0]-a[1]*b[1]-0.25);
}
// changed to improve stability
if(kb==0.) throw KinematicsReconstructionVeto();
if ( a[1]>b[1] && abs(a[1]) < 1e-12 )
throw KinematicsReconstructionVeto();
if ( a[1]<=b[1] && abs(0.5+b[0]/kb) < 1e-12 )
throw KinematicsReconstructionVeto();
double kc = (a[1]>b[1]) ? (a[0]*kb-0.5)/a[1] : b[1]/(0.5+b[0]/kb);
if(kc==0.) throw KinematicsReconstructionVeto();
Lorentz5Momentum pnew[2] = { a[0]*kb*n1+b[0]/kb*n2+qperp,
a[1]*kc*n1+b[1]/kc*n2+qperp};
LorentzRotation rotinv=rot.inverse();
for(unsigned int ix=0;ix<jets.size();++ix) {
if(jets[ix]->progenitor()->isFinalState()) {
deepTransform(jets[ix]->progenitor(),rot);
deepTransform(jets[ix]->progenitor(),solveBoost(pnew[1],qcp));
Energy delta = jets[ix]->progenitor()->momentum().m()-jets[ix]->progenitor()->momentum().mass();
if ( abs(delta) > MeV ) throw KinematicsReconstructionVeto();
deepTransform(jets[ix]->progenitor(),rotinv);
}
else {
tPPtr parent;
boostChain(jets[ix]->progenitor(),rot,parent);
boostChain(jets[ix]->progenitor(),solveBoostZ(pnew[0],qbp),parent);
// check the first boost worked, and if not apply small correction to
// fix energy/momentum conservation
// this is a kludge but it reduces momentum non-conservation dramatically
Lorentz5Momentum pdiff = pnew[0]-jets[ix]->progenitor()->momentum();
Energy2 delta = sqr(pdiff.x())+sqr(pdiff.y())+sqr(pdiff.z())+sqr(pdiff.t());
unsigned int ntry=0;
while(delta>1e-6*GeV2 && ntry<5 ) {
ntry +=1;
boostChain(jets[ix]->progenitor(),solveBoostZ(pnew[0],jets[ix]->progenitor()->momentum()),parent);
pdiff = pnew[0]-jets[ix]->progenitor()->momentum();
delta = sqr(pdiff.x())+sqr(pdiff.y())+sqr(pdiff.z())+sqr(pdiff.t());
}
// apply test in breit-frame
Lorentz5Momentum ptest1 = parent->momentum();
Lorentz5Momentum ptest2 = rot*pbeam;
if(ptest1.z()/ptest2.z()<0. || ptest1.z()/ptest2.z()>1.)
throw KinematicsReconstructionVeto();
boostChain(jets[ix]->progenitor(),rotinv,parent);
}
}
}
bool KinematicsReconstructor::addIntrinsicPt(vector<ShowerProgenitorPtr> jets) const {
bool added=false;
// add the intrinsic pt if needed
for(unsigned int ix=0;ix<jets.size();++ix) {
// only for initial-state particles which haven't radiated
if(jets[ix]->progenitor()->isFinalState()||
jets[ix]->hasEmitted()||
jets[ix]->reconstructed()==ShowerProgenitor::dontReconstruct) continue;
if(_intrinsic.find(jets[ix])==_intrinsic.end()) continue;
pair<Energy,double> pt=_intrinsic[jets[ix]];
Energy etemp = jets[ix]->original()->parents()[0]->momentum().z();
Lorentz5Momentum
p_basis(ZERO, ZERO, etemp, abs(etemp)),
n_basis(ZERO, ZERO,-etemp, abs(etemp));
double alpha = jets[ix]->progenitor()->x();
double beta = 0.5*(sqr(jets[ix]->progenitor()->data().mass())+
sqr(pt.first))/alpha/(p_basis*n_basis);
Lorentz5Momentum pnew=alpha*p_basis+beta*n_basis;
pnew.setX(pt.first*cos(pt.second));
pnew.setY(pt.first*sin(pt.second));
pnew.rescaleMass();
jets[ix]->progenitor()->set5Momentum(pnew);
added = true;
}
return added;
}
namespace {
double defaultSolveBoostGamma(const double & betam,const Energy2 & kps,
const Energy2 & qs, const Energy2 & Q2,
const Energy & kp,
const Energy & q, const Energy & qE) {
if(betam<0.5) {
return 1./sqrt(1.-sqr(betam));
}
else {
return ( kps+ qs + Q2)/
sqrt(2.*kps*qs + kps*Q2 + qs*Q2 + sqr(Q2) + 2.*q*qE*kp*sqrt(kps + Q2));
}
}
}
LorentzRotation KinematicsReconstructor::
solveBoost(const double k, const Lorentz5Momentum & newq,
const Lorentz5Momentum & oldp ) const {
Energy q = newq.vect().mag();
Energy2 qs = sqr(q);
Energy2 Q2 = newq.mass2();
Energy kp = k*(oldp.vect().mag());
Energy2 kps = sqr(kp);
double betam = (q*newq.e() - kp*sqrt(kps + Q2))/(kps + qs + Q2);
if ( abs(betam) - 1. >= 0. ) throw KinematicsReconstructionVeto();
Boost beta = -betam*(k/kp)*oldp.vect();
double gamma = 0.;
if(Q2/sqr(oldp.e())>1e-4) {
gamma = defaultSolveBoostGamma(betam,kps,qs,Q2,kp,q,newq.e());
}
else {
if(k>0) {
gamma = 4.*kps*qs/sqr(kps +qs) + 2.*sqr(kps-qs)*Q2/pow<3,1>(kps +qs)
- 0.25*( sqr(kps) + 14.*kps*qs + sqr(qs))*sqr(kps-qs)/(pow<4,1>(kps +qs)*kps*qs)*sqr(Q2);
}
else {
gamma = 0.25*sqr(Q2)/(kps*qs)*(1. - 0.5*(kps+qs)/(kps*qs)*Q2);
}
if(gamma<=0.) throw KinematicsReconstructionVeto();
gamma = 1./sqrt(gamma);
if(gamma>2.) gamma = defaultSolveBoostGamma(betam,kps,qs,Q2,kp,q,newq.e());
}
// note that (k/kp)*oldp.vect() = oldp.vect()/oldp.vect().mag() but cheaper.
ThreeVector<Energy2> ax = newq.vect().cross( oldp.vect() );
double delta;
if (newq.x()*oldp.x()+newq.y()*oldp.y()+newq.z()*oldp.z()< 1e-16*GeV2) {
throw KinematicsReconstructionVeto();
}else{
delta = newq.vect().angle( oldp.vect() );
}
LorentzRotation R;
using Constants::pi;
Energy2 scale1 = sqr(newq.x())+ sqr(newq.y())+sqr(newq.z());
Energy2 scale2 = sqr(oldp.x())+ sqr(oldp.y())+sqr(oldp.z());
if ( ax.mag2()/scale1/scale2 > 1e-28 ) {
R.rotate( delta, unitVector(ax) ).boost( beta , gamma );
}
else if(abs(delta-pi)/pi < 0.001) {
double phi=2.*pi*UseRandom::rnd();
Axis axis(cos(phi),sin(phi),0.);
axis.rotateUz(newq.vect().unit());
R.rotate(delta,axis).boost( beta , gamma );
}
else {
R.boost( beta , gamma );
}
return R;
}
LorentzRotation KinematicsReconstructor::solveBoost(const Lorentz5Momentum & q,
const Lorentz5Momentum & p ) const {
Energy modp = p.vect().mag();
Energy modq = q.vect().mag();
double betam = (p.e()*modp-q.e()*modq)/(sqr(modq)+sqr(modp)+p.mass2());
if ( abs(betam)-1. >= 0. ) throw KinematicsReconstructionVeto();
Boost beta = -betam*q.vect().unit();
ThreeVector<Energy2> ax = p.vect().cross( q.vect() );
double delta = p.vect().angle( q.vect() );
LorentzRotation R;
using Constants::pi;
if ( beta.mag2() - 1. >= 0. ) throw KinematicsReconstructionVeto();
if ( ax.mag2()/GeV2/MeV2 > 1e-16 ) {
R.rotate( delta, unitVector(ax) ).boost( beta );
}
else {
R.boost( beta );
}
return R;
}
LorentzRotation KinematicsReconstructor::solveBoostZ(const Lorentz5Momentum & q,
const Lorentz5Momentum & p ) const {
static const double eps = 1e-6;
LorentzRotation R;
double beta;
Energy2 mt2 = p.mass()<ZERO ? -sqr(p.mass())+sqr(p.x())+sqr(p.y()) : sqr(p.mass())+sqr(p.x())+sqr(p.y()) ;
double ratio = mt2/(sqr(p.t())+sqr(q.t()));
if(abs(ratio)>eps) {
double erat = (q.t()+q.z())/(p.t()+p.z());
Energy2 den = mt2*(erat+1./erat);
Energy2 num = (q.z()-p.z())*(q.t()+p.t()) + (p.z()+q.z())*(p.t()-q.t());
beta = num/den;
if ( abs(beta) - 1. >= 0. ) throw KinematicsReconstructionVeto();
R.boostZ(beta);
}
else {
double er = sqr(p.t()/q.t());
double x = ratio+0.125*(er+10.+1./er)*sqr(ratio);
beta = -(p.t()-q.t())*(p.t()+q.t())/(sqr(p.t())+sqr(q.t()))*(1.+x);
double gamma = (4.*sqr(p.t()*q.t()) +sqr(p.t()-q.t())*sqr(p.t()+q.t())*
(-2.*x+sqr(x)))/sqr(sqr(p.t())+sqr(q.t()));
if ( abs(beta) - 1. >= 0. ) throw KinematicsReconstructionVeto();
gamma = 1./sqrt(gamma);
R.boost(0.,0.,beta,gamma);
}
Lorentz5Momentum ptest = R*p;
if(ptest.z()/q.z() < 0. || ptest.t()/q.t() < 0. ) {
throw KinematicsReconstructionVeto();
}
return R;
}
void KinematicsReconstructor::
reconstructFinalStateSystem(bool applyBoost,
const LorentzRotation & toRest,
const LorentzRotation & fromRest,
vector<ShowerProgenitorPtr> jets) const {
LorentzRotation trans = applyBoost? toRest : LorentzRotation();
// special for case of individual particle
if(jets.size()==1) {
deepTransform(jets[0]->progenitor(),trans);
deepTransform(jets[0]->progenitor(),fromRest);
return;
}
bool radiated(false);
// find the hard process centre-of-mass energy
Lorentz5Momentum pcm;
// check if radiated and calculate total momentum
for(unsigned int ix=0;ix<jets.size();++ix) {
radiated |=jets[ix]->hasEmitted();
pcm += jets[ix]->progenitor()->momentum();
}
if(applyBoost) pcm *= trans;
// check if in CMF frame
Boost beta_cm = pcm.findBoostToCM();
bool gottaBoost(false);
if(beta_cm.mag() > 1e-12) {
gottaBoost = true;
trans.boost(beta_cm);
}
// collection of pointers to initial hard particle and jet momenta
// for final boosts
JetKinVect jetKinematics;
vector<ShowerProgenitorPtr>::const_iterator cit;
for(cit = jets.begin(); cit != jets.end(); cit++) {
JetKinStruct tempJetKin;
tempJetKin.parent = (*cit)->progenitor();
if(applyBoost || gottaBoost) {
deepTransform(tempJetKin.parent,trans);
}
tempJetKin.p = (*cit)->progenitor()->momentum();
_progenitor=tempJetKin.parent;
if((**cit).reconstructed()==ShowerProgenitor::notReconstructed) {
radiated |= reconstructTimeLikeJet((*cit)->progenitor());
(**cit).reconstructed(ShowerProgenitor::done);
}
else {
radiated |= !(*cit)->progenitor()->children().empty();
}
tempJetKin.q = (*cit)->progenitor()->momentum();
jetKinematics.push_back(tempJetKin);
}
+ if(_finalFinalWeight && jetKinematics.size()==2) {
+ Energy m1 = jetKinematics[0].q.m();
+ Energy m2 = jetKinematics[1].q.m();
+ Energy m0 = pcm.m();
+ if(m0<m1+m2) throw KinematicsReconstructionVeto();
+ Energy4 lambdaNew = (sqr(m0)-sqr(m1-m2))*(sqr(m0)-sqr(m1+m2));
+ m1 = jetKinematics[0].p.m();
+ m2 = jetKinematics[1].p.m();
+ Energy4 lambdaOld = (sqr(m0)-sqr(m1-m2))*(sqr(m0)-sqr(m1+m2));
+ if(UseRandom::rnd()>sqrt(lambdaNew/lambdaOld))
+ throw KinematicsReconstructionVeto();
+ }
// default option rescale everything with the same factor
- if( _finalStateReconOption == 0 || jetKinematics.size() <= 2 ) {
- // find the rescaling factor
- double k = 0.0;
- if(radiated) {
- k = solveKfactor(pcm.m(), jetKinematics);
- // perform the rescaling and boosts
- for(JetKinVect::iterator it = jetKinematics.begin();
- it != jetKinematics.end(); ++it) {
- LorentzRotation Trafo = solveBoost(k, it->q, it->p);
- deepTransform(it->parent,Trafo);
- }
+ // find the rescaling factor
+ double k = 0.0;
+ if(radiated) {
+ k = solveKfactor(pcm.m(), jetKinematics);
+ // perform the rescaling and boosts
+ for(JetKinVect::iterator it = jetKinematics.begin();
+ it != jetKinematics.end(); ++it) {
+ LorentzRotation Trafo = solveBoost(k, it->q, it->p);
+ deepTransform(it->parent,Trafo);
}
}
- // different treatment of most off-shell
- else if ( _finalStateReconOption <= 4 ) {
- // sort the jets by virtuality
- std::sort(jetKinematics.begin(),jetKinematics.end(),JetOrdering());
- // Bryan's procedures from FORTRAN
- if( _finalStateReconOption <=2 ) {
- // loop over the off-shell partons, _finalStateReconOption==1 only first ==2 all
- JetKinVect::const_iterator jend = _finalStateReconOption==1 ? jetKinematics.begin()+1 : jetKinematics.end();
- for(JetKinVect::const_iterator jit=jetKinematics.begin(); jit!=jend;++jit) {
- // calculate the 4-momentum of the recoiling system
- Lorentz5Momentum psum;
- bool done = true;
- for(JetKinVect::const_iterator it=jetKinematics.begin();it!=jetKinematics.end();++it) {
- if(it==jit) {
- done = false;
- continue;
- }
- // first option put on-shell and sum 4-momenta
- if( _finalStateReconOption == 1 ) {
- LorentzRotation Trafo = solveBoost(1., it->q, it->p);
- deepTransform(it->parent,Trafo);
- psum += it->parent->momentum();
- }
- // second option, sum momenta
- else {
- // already rescaled
- if(done) psum += it->parent->momentum();
- // still needs to be rescaled
- else psum += it->p;
- }
- }
- // set the mass
- psum.rescaleMass();
- // calculate the 3-momentum rescaling factor
- Energy2 s(pcm.m2());
- Energy2 m1sq(jit->q.m2()),m2sq(psum.m2());
- Energy4 num = sqr(s - m1sq - m2sq) - 4.*m1sq*m2sq;
- if(num<ZERO) throw KinematicsReconstructionVeto();
- double k = sqrt( num / (4.*s*jit->p.vect().mag2()) );
- // boost the off-shell parton
- LorentzRotation B1 = solveBoost(k, jit->q, jit->p);
- deepTransform(jit->parent,B1);
- // boost everything else to rescale
- LorentzRotation B2 = solveBoost(k, psum, psum);
- for(JetKinVect::iterator it=jetKinematics.begin();it!=jetKinematics.end();++it) {
- if(it==jit) continue;
- deepTransform(it->parent,B2);
- it->p *= B2;
- it->q *= B2;
- }
- }
- }
- // Peter's C++ procedures
- else {
- reconstructFinalFinalOffShell(jetKinematics,pcm.m2(), _finalStateReconOption == 4);
- }
- }
- else
- assert(false);
// apply the final boosts
if(gottaBoost || applyBoost) {
LorentzRotation finalBoosts;
if(gottaBoost) finalBoosts.boost(-beta_cm);
if(applyBoost) finalBoosts.transform(fromRest);
for(JetKinVect::iterator it = jetKinematics.begin();
it != jetKinematics.end(); ++it) {
deepTransform(it->parent,finalBoosts);
}
}
}
void KinematicsReconstructor::
reconstructInitialInitialSystem(bool & applyBoost,
LorentzRotation & toRest,
LorentzRotation & fromRest,
vector<ShowerProgenitorPtr> jets) const {
bool radiated = false;
Lorentz5Momentum pcm;
// check whether particles radiated and calculate total momentum
for( unsigned int ix = 0; ix < jets.size(); ++ix ) {
radiated |= jets[ix]->hasEmitted();
pcm += jets[ix]->progenitor()->momentum();
if(jets[ix]->original()->parents().empty()) return;
}
pcm.rescaleMass();
// check if intrinsic pt to be added
radiated |= !_intrinsic.empty();
// if no radiation return
if(!radiated) {
for(unsigned int ix=0;ix<jets.size();++ix) {
if(jets[ix]->reconstructed()==ShowerProgenitor::notReconstructed)
jets[ix]->reconstructed(ShowerProgenitor::done);
}
return;
}
// initial state shuffling
applyBoost=false;
vector<Lorentz5Momentum> p, pq, p_in;
vector<Energy> pts;
for(unsigned int ix=0;ix<jets.size();++ix) {
// add momentum to vector
p_in.push_back(jets[ix]->progenitor()->momentum());
// reconstruct the jet
if(jets[ix]->reconstructed()==ShowerProgenitor::notReconstructed) {
radiated |= reconstructSpaceLikeJet(jets[ix]->progenitor());
jets[ix]->reconstructed(ShowerProgenitor::done);
}
assert(!jets[ix]->original()->parents().empty());
Energy etemp = jets[ix]->original()->parents()[0]->momentum().z();
Lorentz5Momentum ptemp = Lorentz5Momentum(ZERO, ZERO, etemp, abs(etemp));
pq.push_back(ptemp);
pts.push_back(jets[ix]->highestpT());
}
// add the intrinsic pt if needed
radiated |=addIntrinsicPt(jets);
for(unsigned int ix=0;ix<jets.size();++ix) {
p.push_back(jets[ix]->progenitor()->momentum());
}
double x1 = p_in[0].z()/pq[0].z();
double x2 = p_in[1].z()/pq[1].z();
vector<double> beta=initialStateRescaling(x1,x2,p_in[0]+p_in[1],p,pq,pts);
// if not need don't apply boosts
if(!(radiated && p.size() == 2 && pq.size() == 2)) return;
applyBoost=true;
// apply the boosts
Lorentz5Momentum newcmf;
for(unsigned int ix=0;ix<jets.size();++ix) {
tPPtr toBoost = jets[ix]->progenitor();
Boost betaboost(0, 0, beta[ix]);
tPPtr parent;
boostChain(toBoost, LorentzRotation(0.,0.,beta[ix]),parent);
if(parent->momentum().e()/pq[ix].e()>1.||
parent->momentum().z()/pq[ix].z()>1.) throw KinematicsReconstructionVeto();
newcmf+=toBoost->momentum();
}
if(newcmf.m()<ZERO||newcmf.e()<ZERO) throw KinematicsReconstructionVeto();
findInitialBoost(pcm,newcmf,toRest,fromRest);
}
void KinematicsReconstructor::
deconstructInitialInitialSystem(bool & applyBoost,
LorentzRotation & toRest,
LorentzRotation & fromRest,
HardTreePtr tree,
vector<HardBranchingPtr> jets,
ShowerInteraction) const {
assert(jets.size()==2);
// put beam with +z first
if(jets[0]->beam()->momentum().z()<ZERO) swap(jets[0],jets[1]);
// get the momenta of the particles
vector<Lorentz5Momentum> pin,pq;
for(unsigned int ix=0;ix<jets.size();++ix) {
pin.push_back(jets[ix]->branchingParticle()->momentum());
Energy etemp = jets[ix]->beam()->momentum().z();
pq.push_back(Lorentz5Momentum(ZERO, ZERO,etemp, abs(etemp)));
}
// calculate the rescaling
double x[2];
Lorentz5Momentum pcm=pin[0]+pin[1];
assert(pcm.mass2()>ZERO);
pcm.rescaleMass();
vector<double> boost = inverseInitialStateRescaling(x[0],x[1],pcm,pin,pq);
set<HardBranchingPtr>::const_iterator cjt=tree->incoming().begin();
HardBranchingPtr incoming[2];
incoming[0] = *cjt;
++cjt;
incoming[1] = *cjt;
if((*tree->incoming().begin())->beam()->momentum().z()/pq[0].z()<0.)
swap(incoming[0],incoming[1]);
// apply the boost the the particles
unsigned int iswap[2]={1,0};
for(unsigned int ix=0;ix<2;++ix) {
LorentzRotation R(0.,0.,-boost[ix]);
incoming[ix]->pVector(pq[ix]);
incoming[ix]->nVector(pq[iswap[ix]]);
incoming[ix]->setMomenta(R,1.,Lorentz5Momentum());
jets[ix]->showerMomentum(x[ix]*jets[ix]->pVector());
}
// and calculate the boosts
applyBoost=true;
// do one boost
if(_initialBoost==0) {
toRest = LorentzRotation(-pcm.boostVector());
}
else if(_initialBoost==1) {
// first the transverse boost
Energy pT = sqrt(sqr(pcm.x())+sqr(pcm.y()));
double beta = -pT/pcm.t();
toRest=LorentzRotation(Boost(beta*pcm.x()/pT,beta*pcm.y()/pT,0.));
// the longitudinal
beta = pcm.z()/sqrt(pcm.m2()+sqr(pcm.z()));
toRest.boost(Boost(0.,0.,-beta));
}
else
assert(false);
fromRest = LorentzRotation((jets[0]->showerMomentum()+
jets[1]->showerMomentum()).boostVector());
}
void KinematicsReconstructor::
deconstructFinalStateSystem(const LorentzRotation & toRest,
const LorentzRotation & fromRest,
HardTreePtr tree, vector<HardBranchingPtr> jets,
ShowerInteraction type) const {
LorentzRotation trans = toRest;
if(jets.size()==1) {
Lorentz5Momentum pnew = toRest*(jets[0]->branchingParticle()->momentum());
pnew *= fromRest;
jets[0]-> original(pnew);
jets[0]->showerMomentum(pnew);
// find the colour partners
ShowerParticleVector particles;
vector<Lorentz5Momentum> ptemp;
set<HardBranchingPtr>::const_iterator cjt;
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
ptemp.push_back((**cjt).branchingParticle()->momentum());
(**cjt).branchingParticle()->set5Momentum((**cjt).showerMomentum());
particles.push_back((**cjt).branchingParticle());
}
dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->partnerFinder()
->setInitialEvolutionScales(particles,false,type,false);
// calculate the reference vectors
unsigned int iloc(0);
set<HardBranchingPtr>::iterator clt;
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
// reset the momentum
(**cjt).branchingParticle()->set5Momentum(ptemp[iloc]);
++iloc;
// sort out the partners
tShowerParticlePtr partner =
(*cjt)->branchingParticle()->partner();
if(!partner) continue;
for(clt=tree->branchings().begin();clt!=tree->branchings().end();++clt) {
if((**clt).branchingParticle()==partner) {
(**cjt).colourPartner(*clt);
break;
}
}
tHardBranchingPtr branch;
for(clt=tree->branchings().begin();clt!=tree->branchings().end();++clt) {
if(clt==cjt) continue;
if((*clt)->branchingParticle()==partner) {
branch=*clt;
break;
}
}
}
return;
}
vector<HardBranchingPtr>::iterator cit;
vector<Lorentz5Momentum> pout;
vector<Energy> mon;
Lorentz5Momentum pin;
for(cit=jets.begin();cit!=jets.end();++cit) {
pout.push_back((*cit)->branchingParticle()->momentum());
mon.push_back(findMass(*cit));
pin+=pout.back();
}
// boost all the momenta to the rest frame of the decaying particle
pin.rescaleMass();
pin *=trans;
Boost beta_cm = pin.findBoostToCM();
bool gottaBoost(false);
if(beta_cm.mag() > 1e-12) {
gottaBoost = true;
trans.boost(beta_cm);
pin.boost(beta_cm);
}
for(unsigned int ix=0;ix<pout.size();++ix) {
pout[ix].transform(trans);
}
// rescaling factor
double lambda=inverseRescalingFactor(pout,mon,pin.mass());
if (lambda< 1.e-10) throw KinematicsReconstructionVeto();
// now calculate the p reference vectors
for(unsigned int ix=0;ix<jets.size();++ix) {
Lorentz5Momentum pvect = jets[ix]->branchingParticle()->momentum();
pvect.transform(trans);
pvect /= lambda;
pvect.setMass(mon[ix]);
pvect.rescaleEnergy();
if(gottaBoost) pvect.boost(-beta_cm);
pvect.transform(fromRest);
jets[ix]->pVector(pvect);
jets[ix]->showerMomentum(pvect);
}
// find the colour partners
ShowerParticleVector particles;
vector<Lorentz5Momentum> ptemp;
set<HardBranchingPtr>::const_iterator cjt;
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
ptemp.push_back((**cjt).branchingParticle()->momentum());
(**cjt).branchingParticle()->set5Momentum((**cjt).showerMomentum());
particles.push_back((**cjt).branchingParticle());
}
dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->partnerFinder()
->setInitialEvolutionScales(particles,false,type,false);
// calculate the reference vectors
unsigned int iloc(0);
set<HardBranchingPtr>::iterator clt;
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
// reset the momentum
(**cjt).branchingParticle()->set5Momentum(ptemp[iloc]);
++iloc;
}
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
// sort out the partners
tShowerParticlePtr partner =
(*cjt)->branchingParticle()->partner();
if(!partner) continue;
for(clt=tree->branchings().begin();clt!=tree->branchings().end();++clt) {
if((**clt).branchingParticle()==partner) {
(**cjt).colourPartner(*clt);
break;
}
}
tHardBranchingPtr branch;
for(clt=tree->branchings().begin();clt!=tree->branchings().end();++clt) {
if(clt==cjt) continue;
if((*clt)->branchingParticle()==partner) {
branch=*clt;
break;
}
}
// compute the reference vectors
// both incoming, should all ready be done
if((**cjt).status()==HardBranching::Incoming &&
(**clt).status()==HardBranching::Incoming) {
continue;
}
// both outgoing
else if((**cjt).status()!=HardBranching::Incoming&&
branch->status()==HardBranching::Outgoing) {
Boost boost=((*cjt)->pVector()+branch->pVector()).findBoostToCM();
Lorentz5Momentum pcm = branch->pVector();
pcm.boost(boost);
Lorentz5Momentum nvect = Lorentz5Momentum(ZERO,pcm.vect());
nvect.boost( -boost);
(**cjt).nVector(nvect);
}
else if((**cjt).status()==HardBranching::Incoming) {
Lorentz5Momentum pa = -(**cjt).showerMomentum()+branch->showerMomentum();
Lorentz5Momentum pb = (**cjt).showerMomentum();
Axis axis(pa.vect().unit());
LorentzRotation rot;
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
rot.setRotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
rot.rotateX(Constants::pi);
rot.boostZ( pa.e()/pa.vect().mag());
pb*=rot;
Boost trans = -1./pb.e()*pb.vect();
trans.setZ(0.);
rot.boost(trans);
Energy scale=(**cjt).beam()->momentum().e();
Lorentz5Momentum pbasis(ZERO,(**cjt).beam()->momentum().vect().unit()*scale);
Lorentz5Momentum pcm = rot*pbasis;
rot.invert();
(**cjt).nVector(rot*Lorentz5Momentum(ZERO,-pcm.vect()));
tHardBranchingPtr branch2 = *cjt;;
while (branch2->parent()) {
branch2=branch2->parent();
branch2->nVector(rot*Lorentz5Momentum(ZERO,-pcm.vect()));
}
}
else if(branch->status()==HardBranching::Incoming) {
(**cjt).nVector(Lorentz5Momentum(ZERO,branch->showerMomentum().vect()));
}
}
// now compute the new momenta
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
if(!(*cjt)->branchingParticle()->isFinalState()) continue;
Lorentz5Momentum qnew;
if((*cjt)->branchingParticle()->partner()) {
Energy2 dot=(*cjt)->pVector()*(*cjt)->nVector();
double beta = 0.5*((*cjt)->branchingParticle()->momentum().m2()
-sqr((*cjt)->pVector().mass()))/dot;
qnew=(*cjt)->pVector()+beta*(*cjt)->nVector();
qnew.rescaleMass();
}
else {
qnew = (*cjt)->pVector();
}
// qnew is the unshuffled momentum in the rest frame of the p basis vectors,
// for the simple case Z->q qbar g this was checked against analytic formulae.
// compute the boost
LorentzRotation R=solveBoost(qnew,
toRest*(*cjt)->branchingParticle()->momentum())*toRest;
(*cjt)->setMomenta(R,1.0,Lorentz5Momentum());
}
}
Energy KinematicsReconstructor::momConsEq(double k,
const Energy & root_s,
const JetKinVect & jets) const {
static const Energy2 eps=1e-8*GeV2;
Energy dum = ZERO;
for(JetKinVect::const_iterator it = jets.begin(); it != jets.end(); ++it) {
Energy2 dum2 = (it->q).m2() + sqr(k)*(it->p).vect().mag2();
if(dum2 < ZERO) {
if(dum2 < -eps) throw KinematicsReconstructionVeto();
dum2 = ZERO;
}
dum += sqrt(dum2);
}
return dum - root_s;
}
void KinematicsReconstructor::boostChain(tPPtr p, const LorentzRotation &bv,
tPPtr & parent) const {
if(!p->parents().empty()) boostChain(p->parents()[0], bv,parent);
else parent=p;
p->transform(bv);
if(p->children().size()==2) {
if(dynamic_ptr_cast<ShowerParticlePtr>(p->children()[1]))
deepTransform(p->children()[1],bv);
}
}
namespace {
bool sortJets(ShowerProgenitorPtr j1, ShowerProgenitorPtr j2) {
return j1->highestpT()>j2->highestpT();
}
}
void KinematicsReconstructor::
reconstructGeneralSystem(vector<ShowerProgenitorPtr> & ShowerHardJets) const {
// find initial- and final-state systems
ColourSingletSystem in,out;
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
if(ShowerHardJets[ix]->progenitor()->isFinalState())
out.jets.push_back(ShowerHardJets[ix]);
else
in.jets.push_back(ShowerHardJets[ix]);
}
// reconstruct initial-initial system
LorentzRotation toRest,fromRest;
bool applyBoost(false);
// reconstruct initial-initial system
reconstructInitialInitialSystem(applyBoost,toRest,fromRest,in.jets);
// reconstruct the final-state systems
reconstructFinalStateSystem(applyBoost,toRest,fromRest,out.jets);
}
void KinematicsReconstructor::
reconstructFinalFirst(vector<ShowerProgenitorPtr> & ShowerHardJets) const {
static const Energy2 minQ2 = 1e-4*GeV2;
map<ShowerProgenitorPtr,bool> used;
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
used[ShowerHardJets[ix]] = false;
} // first to the final-state reconstruction of any systems which need it
set<ShowerProgenitorPtr> outgoing;
// first find any particles with final state partners
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
if(ShowerHardJets[ix]->progenitor()->isFinalState()&&
ShowerHardJets[ix]->progenitor()->partner()&&
ShowerHardJets[ix]->progenitor()->partner()->isFinalState()) outgoing.insert(ShowerHardJets[ix]);
}
// then find the colour partners
if(!outgoing.empty()) {
set<ShowerProgenitorPtr> partners;
for(set<ShowerProgenitorPtr>::const_iterator it=outgoing.begin();it!=outgoing.end();++it) {
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
if((**it).progenitor()->partner()==ShowerHardJets[ix]->progenitor()) {
partners.insert(ShowerHardJets[ix]);
break;
}
}
}
outgoing.insert(partners.begin(),partners.end());
}
// do the final-state reconstruction if needed
if(!outgoing.empty()) {
assert(outgoing.size()!=1);
LorentzRotation toRest,fromRest;
vector<ShowerProgenitorPtr> outgoingJets(outgoing.begin(),outgoing.end());
reconstructFinalStateSystem(false,toRest,fromRest,outgoingJets);
}
// Now do any initial-final systems which are needed
vector<ColourSingletSystem> IFSystems;
// find the systems N.B. can have duplicates
// find initial-state with FS partners or FS with IS partners
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
if(!ShowerHardJets[ix]->progenitor()->isFinalState()&&
ShowerHardJets[ix]->progenitor()->partner()&&
ShowerHardJets[ix]->progenitor()->partner()->isFinalState()) {
IFSystems.push_back(ColourSingletSystem(IF,ShowerHardJets[ix]));
}
else if(ShowerHardJets[ix]->progenitor()->isFinalState()&&
ShowerHardJets[ix]->progenitor()->partner()&&
!ShowerHardJets[ix]->progenitor()->partner()->isFinalState()) {
IFSystems.push_back(ColourSingletSystem(IF,ShowerHardJets[ix]));
}
}
// then add the partners
for(unsigned int is=0;is<IFSystems.size();++is) {
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
if(IFSystems[is].jets[0]->progenitor()->partner()==ShowerHardJets[ix]->progenitor()) {
IFSystems[is].jets.push_back(ShowerHardJets[ix]);
}
}
// ensure incoming first
if(IFSystems[is].jets[0]->progenitor()->isFinalState())
swap(IFSystems[is].jets[0],IFSystems[is].jets[1]);
}
if(!IFSystems.empty()) {
unsigned int istart = UseRandom::irnd(IFSystems.size());
unsigned int istop=IFSystems.size();
for(unsigned int is=istart;is<=istop;++is) {
if(is==IFSystems.size()) {
if(istart!=0) {
istop = istart-1;
is=0;
}
else break;
}
// skip duplicates
if(used[IFSystems[is].jets[0]] &&
used[IFSystems[is].jets[1]] ) continue;
if(IFSystems[is].jets[0]->original()&&IFSystems[is].jets[0]->original()->parents().empty()) continue;
Lorentz5Momentum psum;
for(unsigned int ix=0;ix<IFSystems[is].jets.size();++ix) {
if(IFSystems[is].jets[ix]->progenitor()->isFinalState())
psum += IFSystems[is].jets[ix]->progenitor()->momentum();
else
psum -= IFSystems[is].jets[ix]->progenitor()->momentum();
}
if(-psum.m2()>minQ2) {
reconstructInitialFinalSystem(IFSystems[is].jets);
for(unsigned int ix=0;ix<IFSystems[is].jets.size();++ix) {
used[IFSystems[is].jets[ix]] = true;
}
}
}
}
// now we finally need to handle the initial state system
ColourSingletSystem in,out;
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
if(ShowerHardJets[ix]->progenitor()->isFinalState())
out.jets.push_back(ShowerHardJets[ix]);
else
in.jets.push_back(ShowerHardJets[ix]);
}
// reconstruct initial-initial system
bool doRecon = false;
for(unsigned int ix=0;ix<in.jets.size();++ix) {
if(!used[in.jets[ix]]) {
doRecon = true;
break;
}
}
LorentzRotation toRest,fromRest;
bool applyBoost(false);
if(doRecon) {
reconstructInitialInitialSystem(applyBoost,toRest,fromRest,in.jets);
}
// reconstruct the final-state systems
if(!doRecon) {
for(unsigned int ix=0;ix<out.jets.size();++ix) {
if(!used[out.jets[ix]]) {
doRecon = true;
break;
}
}
}
if(doRecon) {
reconstructFinalStateSystem(applyBoost,toRest,fromRest,out.jets);
}
}
void KinematicsReconstructor::
reconstructColourPartner(vector<ShowerProgenitorPtr> & ShowerHardJets) const {
static const Energy2 minQ2 = 1e-4*GeV2;
// sort the vector by hardness of emission
std::sort(ShowerHardJets.begin(),ShowerHardJets.end(),sortJets);
// map between particles and progenitors for easy lookup
map<ShowerParticlePtr,ShowerProgenitorPtr> progenitorMap;
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
progenitorMap[ShowerHardJets[ix]->progenitor()] = ShowerHardJets[ix];
}
// check that the IF systems can be reconstructed
bool canReconstruct = true;
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
tShowerParticlePtr progenitor = ShowerHardJets[ix]->progenitor();
tShowerParticlePtr partner = progenitor->partner();
if(!partner) continue;
else if((progenitor->isFinalState() &&
!partner->isFinalState()) ||
(!progenitor->isFinalState() &&
partner->isFinalState()) ) {
vector<ShowerProgenitorPtr> jets(2);
jets[0] = ShowerHardJets[ix];
jets[1] = progenitorMap[partner];
Lorentz5Momentum psum;
for(unsigned int iy=0;iy<jets.size();++iy) {
if(jets[iy]->progenitor()->isFinalState())
psum += jets[iy]->progenitor()->momentum();
else
psum -= jets[iy]->progenitor()->momentum();
}
if(-psum.m2()<minQ2) {
canReconstruct = false;
break;
}
}
}
if(!canReconstruct) {
reconstructGeneralSystem(ShowerHardJets);
return;
}
map<ShowerProgenitorPtr,bool> used;
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
used[ShowerHardJets[ix]] = false;
}
for(unsigned int ix=0;ix<ShowerHardJets.size();++ix) {
// skip jets which have already been handled
if(ShowerHardJets[ix]->reconstructed()==ShowerProgenitor::done) continue;
// already reconstructed
if(used[ShowerHardJets[ix]]) continue;
// no partner continue
tShowerParticlePtr progenitor = ShowerHardJets[ix]->progenitor();
tShowerParticlePtr partner = progenitor->partner();
if(!partner) {
// check if there's a daughter tree which also needs boosting
Lorentz5Momentum porig = progenitor->momentum();
map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator tit;
for(tit = _currentTree->treelinks().begin();
tit != _currentTree->treelinks().end();++tit) {
// if there is, boost it
if(tit->second.first && tit->second.second==progenitor) {
Lorentz5Momentum pnew = tit->first->incomingLines().begin()
->first->progenitor()->momentum();
pnew *= tit->first->transform();
Lorentz5Momentum pdiff = porig-pnew;
Energy2 test = sqr(pdiff.x()) + sqr(pdiff.y()) +
sqr(pdiff.z()) + sqr(pdiff.t());
LorentzRotation rot;
if(test>1e-6*GeV2) rot = solveBoost(porig,pnew);
tit->first->transform(rot,false);
_treeBoosts[tit->first].push_back(rot);
}
}
ShowerHardJets[ix]->reconstructed(ShowerProgenitor::done);
continue;
}
// do the reconstruction
// final-final
if(progenitor->isFinalState() &&
partner->isFinalState() ) {
LorentzRotation toRest,fromRest;
vector<ShowerProgenitorPtr> jets(2);
jets[0] = ShowerHardJets[ix];
jets[1] = progenitorMap[partner];
if(_reconopt==4 && jets[1]->reconstructed()==ShowerProgenitor::notReconstructed)
jets[1]->reconstructed(ShowerProgenitor::dontReconstruct);
reconstructFinalStateSystem(false,toRest,fromRest,jets);
if(_reconopt==4 && jets[1]->reconstructed()==ShowerProgenitor::dontReconstruct)
jets[1]->reconstructed(ShowerProgenitor::notReconstructed);
used[jets[0]] = true;
if(_reconopt==3) used[jets[1]] = true;
}
// initial-final
else if((progenitor->isFinalState() &&
!partner->isFinalState()) ||
(!progenitor->isFinalState() &&
partner->isFinalState()) ) {
vector<ShowerProgenitorPtr> jets(2);
jets[0] = ShowerHardJets[ix];
jets[1] = progenitorMap[partner];
if(jets[0]->progenitor()->isFinalState()) swap(jets[0],jets[1]);
if(jets[0]->original()&&jets[0]->original()->parents().empty()) continue;
Lorentz5Momentum psum;
for(unsigned int iy=0;iy<jets.size();++iy) {
if(jets[iy]->progenitor()->isFinalState())
psum += jets[iy]->progenitor()->momentum();
else
psum -= jets[iy]->progenitor()->momentum();
}
if(_reconopt==4 && progenitorMap[partner]->reconstructed()==ShowerProgenitor::notReconstructed)
progenitorMap[partner]->reconstructed(ShowerProgenitor::dontReconstruct);
reconstructInitialFinalSystem(jets);
if(_reconopt==4 && progenitorMap[partner]->reconstructed()==ShowerProgenitor::dontReconstruct)
progenitorMap[partner]->reconstructed(ShowerProgenitor::notReconstructed);
used[ShowerHardJets[ix]] = true;
if(_reconopt==3) used[progenitorMap[partner]] = true;
}
// initial-initial
else if(!progenitor->isFinalState() &&
!partner->isFinalState() ) {
ColourSingletSystem in,out;
in.jets.push_back(ShowerHardJets[ix]);
in.jets.push_back(progenitorMap[partner]);
for(unsigned int iy=0;iy<ShowerHardJets.size();++iy) {
if(ShowerHardJets[iy]->progenitor()->isFinalState())
out.jets.push_back(ShowerHardJets[iy]);
}
LorentzRotation toRest,fromRest;
bool applyBoost(false);
if(_reconopt==4 && in.jets[1]->reconstructed()==ShowerProgenitor::notReconstructed)
in.jets[1]->reconstructed(ShowerProgenitor::dontReconstruct);
reconstructInitialInitialSystem(applyBoost,toRest,fromRest,in.jets);
if(_reconopt==4 && in.jets[1]->reconstructed()==ShowerProgenitor::dontReconstruct)
in.jets[1]->reconstructed(ShowerProgenitor::notReconstructed);
used[in.jets[0]] = true;
if(_reconopt==3) used[in.jets[1]] = true;
for(unsigned int iy=0;iy<out.jets.size();++iy) {
if(out.jets[iy]->reconstructed()==ShowerProgenitor::notReconstructed)
out.jets[iy]->reconstructed(ShowerProgenitor::dontReconstruct);
}
// reconstruct the final-state systems
LorentzRotation finalBoosts;
finalBoosts.transform( toRest);
finalBoosts.transform(fromRest);
for(unsigned int iy=0;iy<out.jets.size();++iy) {
deepTransform(out.jets[iy]->progenitor(),finalBoosts);
}
for(unsigned int iy=0;iy<out.jets.size();++iy) {
if(out.jets[iy]->reconstructed()==ShowerProgenitor::dontReconstruct)
out.jets[iy]->reconstructed(ShowerProgenitor::notReconstructed);
}
}
}
}
bool KinematicsReconstructor::
inverseDecayRescalingFactor(vector<Lorentz5Momentum> pout,
vector<Energy> mon,Energy roots,
Lorentz5Momentum ppartner, Energy mbar,
double & k1, double & k2) const {
ThreeVector<Energy> qtotal;
vector<Energy2> pmag;
for(unsigned int ix=0;ix<pout.size();++ix) {
pmag.push_back(pout[ix].vect().mag2());
qtotal+=pout[ix].vect();
}
Energy2 dot1 = qtotal*ppartner.vect();
Energy2 qmag2=qtotal.mag2();
double a = -dot1/qmag2;
static const Energy eps=1e-10*GeV;
unsigned int itry(0);
Energy numer(ZERO),denom(ZERO);
k1=1.;
do {
++itry;
numer=denom=0.*GeV;
double k12=sqr(k1);
for(unsigned int ix=0;ix<pout.size();++ix) {
Energy en = sqrt(pmag[ix]/k12+sqr(mon[ix]));
numer += en;
denom += pmag[ix]/en;
}
Energy en = sqrt(qmag2/k12+sqr(mbar));
numer += en-roots;
denom += qmag2/en;
k1 += numer/denom*k12*k1;
if(abs(k1)>1e10) return false;
}
while (abs(numer)>eps&&itry<100);
k1 = abs(k1);
k2 = a*k1;
return itry<100;
}
void KinematicsReconstructor::
deconstructInitialFinalSystem(HardTreePtr tree,vector<HardBranchingPtr> jets,
ShowerInteraction type) const {
HardBranchingPtr incoming;
Lorentz5Momentum pin[2],pout[2],pbeam;
HardBranchingPtr initial;
Energy mc(ZERO);
for(unsigned int ix=0;ix<jets.size();++ix) {
// final-state parton
if(jets[ix]->status()==HardBranching::Outgoing) {
pout[0] += jets[ix]->branchingParticle()->momentum();
mc = jets[ix]->branchingParticle()->thePEGBase() ?
jets[ix]->branchingParticle()->thePEGBase()->mass() :
jets[ix]->branchingParticle()->dataPtr()->mass();
}
// initial-state parton
else {
pin[0] += jets[ix]->branchingParticle()->momentum();
initial = jets[ix];
pbeam = jets[ix]->beam()->momentum();
Energy scale=pbeam.t();
pbeam = Lorentz5Momentum(ZERO,pbeam.vect().unit()*scale);
incoming = jets[ix];
while(incoming->parent()) incoming = incoming->parent();
}
}
if(jets.size()>2) {
pout[0].rescaleMass();
mc = pout[0].mass();
}
// work out the boost to the Breit frame
Lorentz5Momentum pa = pout[0]-pin[0];
Axis axis(pa.vect().unit());
LorentzRotation rot;
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
if(axis.perp2()>0.) {
rot.setRotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
rot.rotateX(Constants::pi);
rot.boostZ( pa.e()/pa.vect().mag());
}
// transverse part
Lorentz5Momentum paxis=rot*pbeam;
Boost trans = -1./paxis.e()*paxis.vect();
trans.setZ(0.);
rot.boost(trans);
pa *= rot;
// reference vectors
Lorentz5Momentum n1(ZERO,ZERO,-pa.z(),-pa.z());
Lorentz5Momentum n2(ZERO,ZERO, pa.z(),-pa.z());
Energy2 n1n2 = n1*n2;
// decompose the momenta
Lorentz5Momentum qbp=rot*pin[0],qcp= rot*pout[0];
double a[2],b[2];
a[0] = n2*qbp/n1n2;
b[0] = n1*qbp/n1n2;
a[1] = n2*qcp/n1n2;
b[1] = n1*qcp/n1n2;
Lorentz5Momentum qperp = qbp-a[0]*n1-b[0]*n2;
// before reshuffling
Energy Q = abs(pa.z());
double c = sqr(mc/Q);
Lorentz5Momentum pb(ZERO,ZERO,0.5*Q*(1.+c),0.5*Q*(1.+c));
Lorentz5Momentum pc(ZERO,ZERO,0.5*Q*(c-1.),0.5*Q*(1.+c));
double anew[2],bnew[2];
anew[0] = pb*n2/n1n2;
bnew[0] = 0.5*(qbp.m2()-qperp.m2())/n1n2/anew[0];
bnew[1] = pc*n1/n1n2;
anew[1] = 0.5*qcp.m2()/bnew[1]/n1n2;
Lorentz5Momentum qnewb = (anew[0]*n1+bnew[0]*n2+qperp);
Lorentz5Momentum qnewc = (anew[1]*n1+bnew[1]*n2);
// initial-state boost
LorentzRotation rotinv=rot.inverse();
LorentzRotation transb=rotinv*solveBoostZ(qnewb,qbp)*rot;
// final-state boost
LorentzRotation transc=rotinv*solveBoost(qnewc,qcp)*rot;
// this will need changing for more than one outgoing particle
// set the pvectors
for(unsigned int ix=0;ix<jets.size();++ix) {
if(jets[ix]->status()==HardBranching::Incoming) {
jets[ix]->pVector(pbeam);
jets[ix]->showerMomentum(rotinv*pb);
incoming->pVector(jets[ix]->pVector());
}
else {
jets[ix]->pVector(rotinv*pc);
jets[ix]->showerMomentum(jets[ix]->pVector());
}
}
// find the colour partners
ShowerParticleVector particles;
vector<Lorentz5Momentum> ptemp;
set<HardBranchingPtr>::const_iterator cjt;
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
ptemp.push_back((**cjt).branchingParticle()->momentum());
(**cjt).branchingParticle()->set5Momentum((**cjt).showerMomentum());
particles.push_back((**cjt).branchingParticle());
}
dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->partnerFinder()
->setInitialEvolutionScales(particles,false,type,false);
unsigned int iloc(0);
for(cjt=tree->branchings().begin();cjt!=tree->branchings().end();++cjt) {
// reset the momentum
(**cjt).branchingParticle()->set5Momentum(ptemp[iloc]);
++iloc;
}
for(vector<HardBranchingPtr>::const_iterator cjt=jets.begin();
cjt!=jets.end();++cjt) {
// sort out the partners
tShowerParticlePtr partner =
(*cjt)->branchingParticle()->partner();
if(!partner) continue;
tHardBranchingPtr branch;
for(set<HardBranchingPtr>::const_iterator
clt=tree->branchings().begin();clt!=tree->branchings().end();++clt) {
if((**clt).branchingParticle()==partner) {
(**cjt).colourPartner(*clt);
branch=*clt;
break;
}
}
// compute the reference vectors
// both incoming, should all ready be done
if((**cjt).status()==HardBranching::Incoming &&
branch->status()==HardBranching::Incoming) {
Energy etemp = (*cjt)->beam()->momentum().z();
Lorentz5Momentum nvect(ZERO, ZERO,-etemp, abs(etemp));
tHardBranchingPtr branch2 = *cjt;
(**cjt).nVector(nvect);
while (branch2->parent()) {
branch2=branch2->parent();
branch2->nVector(nvect);
}
}
// both outgoing
else if((**cjt).status()==HardBranching::Outgoing&&
branch->status()==HardBranching::Outgoing) {
Boost boost=((*cjt)->pVector()+branch->pVector()).findBoostToCM();
Lorentz5Momentum pcm = branch->pVector();
pcm.boost(boost);
Lorentz5Momentum nvect = Lorentz5Momentum(ZERO,pcm.vect());
nvect.boost( -boost);
(**cjt).nVector(nvect);
}
else if((**cjt).status()==HardBranching::Incoming) {
Lorentz5Momentum pa = -(**cjt).showerMomentum()+branch->showerMomentum();
Lorentz5Momentum pb = (**cjt).showerMomentum();
Axis axis(pa.vect().unit());
LorentzRotation rot;
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
if(axis.perp2()>1e-20) {
rot.setRotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
rot.rotateX(Constants::pi);
}
if(abs(1.-pa.e()/pa.vect().mag())>1e-6) rot.boostZ( pa.e()/pa.vect().mag());
pb*=rot;
Boost trans = -1./pb.e()*pb.vect();
trans.setZ(0.);
rot.boost(trans);
Energy scale=(**cjt).beam()->momentum().t();
Lorentz5Momentum pbasis(ZERO,(**cjt).beam()->momentum().vect().unit()*scale);
Lorentz5Momentum pcm = rot*pbasis;
rot.invert();
Lorentz5Momentum nvect = rot*Lorentz5Momentum(ZERO,-pcm.vect());
(**cjt).nVector(nvect);
tHardBranchingPtr branch2 = *cjt;
while (branch2->parent()) {
branch2=branch2->parent();
branch2->nVector(nvect);
}
}
else if(branch->status()==HardBranching::Incoming) {
Lorentz5Momentum nvect=Lorentz5Momentum(ZERO,branch->showerMomentum().vect());
(**cjt).nVector(nvect);
}
}
// now compute the new momenta
for(vector<HardBranchingPtr>::const_iterator cjt=jets.begin();
cjt!=jets.end();++cjt) {
if((**cjt).status()==HardBranching::Outgoing) {
(**cjt).setMomenta(transc,1.,Lorentz5Momentum());
}
}
incoming->setMomenta(transb,1.,Lorentz5Momentum());
}
void KinematicsReconstructor::deepTransform(PPtr particle,
const LorentzRotation & r,
bool match,
PPtr original) const {
if(_boosts.find(particle)!=_boosts.end()) {
_boosts[particle].push_back(r);
}
Lorentz5Momentum porig = particle->momentum();
if(!original) original = particle;
for ( int i = 0, N = particle->children().size(); i < N; ++i ) {
deepTransform(particle->children()[i],r,
particle->children()[i]->id()==original->id()&&match,original);
}
particle->transform(r);
// transform the p and n vectors
ShowerParticlePtr sparticle = dynamic_ptr_cast<ShowerParticlePtr>(particle);
if(sparticle && sparticle->showerBasis()) {
sparticle->showerBasis()->transform(r);
}
if ( particle->next() ) deepTransform(particle->next(),r,match,original);
if(!match) return;
if(!particle->children().empty()) return;
// force the mass shell
if(particle->dataPtr()->stable()) {
Lorentz5Momentum ptemp = particle->momentum();
ptemp.rescaleEnergy();
particle->set5Momentum(ptemp);
}
// check if there's a daughter tree which also needs boosting
map<tShowerTreePtr,pair<tShowerProgenitorPtr,tShowerParticlePtr> >::const_iterator tit;
for(tit = _currentTree->treelinks().begin();
tit != _currentTree->treelinks().end();++tit) {
// if there is, boost it
if(tit->second.first && tit->second.second==original) {
Lorentz5Momentum pnew = tit->first->incomingLines().begin()
->first->progenitor()->momentum();
pnew *= tit->first->transform();
Lorentz5Momentum pdiff = porig-pnew;
Energy2 test = sqr(pdiff.x()) + sqr(pdiff.y()) +
sqr(pdiff.z()) + sqr(pdiff.t());
LorentzRotation rot;
if(test>1e-6*GeV2) rot = solveBoost(porig,pnew);
tit->first->transform(r*rot,false);
_treeBoosts[tit->first].push_back(r*rot);
}
}
}
-void KinematicsReconstructor::reconstructFinalFinalOffShell(JetKinVect orderedJets,
- Energy2 s,
- bool recursive) const {
- JetKinVect::iterator jit;
- jit = orderedJets.begin(); ++jit;
- // 4-momentum of recoiling system
- Lorentz5Momentum psum;
- for( ; jit!=orderedJets.end(); ++jit) psum += jit->p;
- psum.rescaleMass();
- // calculate the 3-momentum rescaling factor
- Energy2 m1sq(orderedJets.begin()->q.m2()),m2sq(psum.m2());
- Energy4 num = sqr(s - m1sq - m2sq) - 4.*m1sq*m2sq;
- if(num<ZERO) throw KinematicsReconstructionVeto();
- double k = sqrt( num / (4.*s*orderedJets.begin()->p.vect().mag2()) );
- // boost the most off-shell
- LorentzRotation B1 = solveBoost(k, orderedJets.begin()->q, orderedJets.begin()->p);
- deepTransform(orderedJets.begin()->parent,B1);
- // boost everything else
- // first to rescale
- LorentzRotation B2 = solveBoost(k, psum, psum);
- // and then to rest frame of new system
- Lorentz5Momentum pnew = B2*psum;
- pnew.rescaleMass();
- B2.transform(pnew.findBoostToCM());
- // apply transform (calling routine ensures at least 3 elements)
- jit = orderedJets.begin(); ++jit;
- for(;jit!=orderedJets.end();++jit) {
- deepTransform(jit->parent,B2);
- jit->p *= B2;
- jit->q *= B2;
- }
- JetKinVect newJets(orderedJets.begin()+1,orderedJets.end());
- // final reconstruction
- if(newJets.size()==2 || !recursive ) {
- // rescaling factor
- double k = solveKfactor(psum.m(), newJets);
- // rescale jets in the new CMF
- for(JetKinVect::iterator it = newJets.begin(); it != newJets.end(); ++it) {
- LorentzRotation Trafo = solveBoost(k, it->q, it->p);
- deepTransform(it->parent,Trafo);
- }
- }
- // recursive
- else {
- std::sort(newJets.begin(),newJets.end(),JetOrdering());
- reconstructFinalFinalOffShell(newJets,psum.m2(),recursive);
- }
- // finally boost back from new CMF
- LorentzRotation back(-pnew.findBoostToCM());
- for(JetKinVect::iterator it = newJets.begin(); it != newJets.end(); ++it) {
- deepTransform(it->parent,back);
- }
-}
-
Energy KinematicsReconstructor::findMass(HardBranchingPtr branch) const {
// KH - 230909 - If the particle has no children then it will
// not have showered and so it should be "on-shell" so we can
// get it's mass from it's momentum. This means that the
// inverseRescalingFactor doesn't give any nans or do things
// it shouldn't if it gets e.g. two Z bosons generated with
// off-shell masses. This is for sure not the best solution.
// PR 1/1/10 modification to previous soln
// PR 28/8/14 change to procedure and factorize into a function
if(branch->children().empty()) {
return branch->branchingParticle()->mass();
}
else if(!branch->children().empty() &&
!branch->branchingParticle()->dataPtr()->stable() ) {
for(unsigned int ix=0;ix<branch->children().size();++ix) {
if(branch->branchingParticle()->id()==
branch->children()[ix]->branchingParticle()->id())
return findMass(branch->children()[ix]);
}
}
return branch->branchingParticle()->dataPtr()->mass();
}
vector<double>
KinematicsReconstructor::inverseInitialStateRescaling(double & x1, double & x2,
const Lorentz5Momentum & pold,
const vector<Lorentz5Momentum> & p,
const vector<Lorentz5Momentum> & pq) const {
// hadronic CMS
Energy2 s = (pq[0] +pq[1] ).m2();
// partonic CMS
Energy MDY = pold.m();
// find alpha, beta and pt
Energy2 p12=pq[0]*pq[1];
double a[2],b[2];
Lorentz5Momentum pt[2];
for(unsigned int ix=0;ix<2;++ix) {
a[ix] = p[ix]*pq[1]/p12;
b [ix] = p[ix]*pq[0]/p12;
pt[ix] = p[ix]-a[ix]*pq[0]-b[ix]*pq[1];
}
// compute kappa
// we always want to preserve the mass of the system
double k1(1.),k2(1.);
if(_initialStateReconOption==0) {
double rap=pold.rapidity();
x2 = MDY/sqrt(s*exp(2.*rap));
x1 = sqr(MDY)/s/x2;
k1=a[0]/x1;
k2=b[1]/x2;
}
// longitudinal momentum
else if(_initialStateReconOption==1) {
double A = 1.;
double C = -sqr(MDY)/s;
double B = 2.*pold.z()/sqrt(s);
if(abs(B)>1e-10) {
double discrim = 1.-4.*A*C/sqr(B);
if(discrim < 0.) throw KinematicsReconstructionVeto();
x1 = B>0. ? 0.5*B/A*(1.+sqrt(discrim)) : 0.5*B/A*(1.-sqrt(discrim));
}
else {
x1 = -C/A;
if( x1 <= 0.) throw KinematicsReconstructionVeto();
x1 = sqrt(x1);
}
x2 = sqr(MDY)/s/x1;
k1=a[0]/x1;
k2=b[1]/x2;
}
// preserve mass and don't scale the softer system
// to reproduce the dipole kinematics
else if(_initialStateReconOption==2) {
// in this case kp = k1 or k2 depending on who's the harder guy
k1 = a[0]*b[1]*s/sqr(MDY);
if ( pt[0].perp2() < pt[1].perp2() ) swap(k1,k2);
x1 = a[0]/k1;
x2 = b[1]/k2;
}
else
assert(false);
// decompose the momenta
double anew[2] = {a[0]/k1,a[1]*k2};
double bnew[2] = {b[0]*k1,b[1]/k2};
vector<double> boost(2);
for(unsigned int ix=0;ix<2;++ix) {
boost[ix] = getBeta(a [ix]+b [ix], a[ix] -b [ix],
anew[ix]+bnew[ix], anew[ix]-bnew[ix]);
}
return boost;
}
vector<double>
KinematicsReconstructor::initialStateRescaling(double x1, double x2,
const Lorentz5Momentum & pold,
const vector<Lorentz5Momentum> & p,
const vector<Lorentz5Momentum> & pq,
const vector<Energy>& highestpts) const {
Energy2 S = (pq[0]+pq[1]).m2();
// find alphas and betas in terms of desired basis
Energy2 p12 = pq[0]*pq[1];
double a[2] = {p[0]*pq[1]/p12,p[1]*pq[1]/p12};
double b[2] = {p[0]*pq[0]/p12,p[1]*pq[0]/p12};
Lorentz5Momentum p1p = p[0] - a[0]*pq[0] - b[0]*pq[1];
Lorentz5Momentum p2p = p[1] - a[1]*pq[0] - b[1]*pq[1];
// compute kappa
// we always want to preserve the mass of the system
Energy MDY = pold.m();
Energy2 A = a[0]*b[1]*S;
Energy2 B = Energy2(sqr(MDY)) - (a[0]*b[0]+a[1]*b[1])*S - (p1p+p2p).m2();
Energy2 C = a[1]*b[0]*S;
double rad = 1.-4.*A*C/sqr(B);
if(rad < 0.) throw KinematicsReconstructionVeto();
double kp = B/(2.*A)*(1.+sqrt(rad));
// now compute k1
// conserve rapidity
double k1(0.);
double k2(0.);
if(_initialStateReconOption==0) {
rad = kp*(b[0]+kp*b[1])/(kp*a[0]+a[1]);
rad *= pq[0].z()<ZERO ? exp(-2.*pold.rapidity()) : exp(2.*pold.rapidity());
if(rad <= 0.) throw KinematicsReconstructionVeto();
k1 = sqrt(rad);
k2 = kp/k1;
}
// conserve longitudinal momentum
else if(_initialStateReconOption==1) {
double a2 = (a[0]+a[1]/kp);
double b2 = -x2+x1;
double c2 = -(b[1]*kp+b[0]);
if(abs(b2)>1e-10) {
double discrim = 1.-4.*a2*c2/sqr(b2);
if(discrim < 0.) throw KinematicsReconstructionVeto();
k1 = b2>0. ? 0.5*b2/a2*(1.+sqrt(discrim)) : 0.5*b2/a2*(1.-sqrt(discrim));
}
else {
k1 = -c2/a2;
if( k1 <= 0.) throw KinematicsReconstructionVeto();
k1 = sqrt(k1);
}
k2 = kp/k1;
}
// preserve mass and don't scale the softer system
// to reproduce the dipole kinematics
else if(_initialStateReconOption==2) {
// in this case kp = k1 or k2 depending on who's the harder guy
k1 = kp; k2 = 1.;
if ( highestpts[0] < highestpts[1] )
swap(k1,k2);
}
else
assert(false);
// calculate the boosts
vector<double> beta(2);
beta[0] = getBeta((a[0]+b[0]), (a[0]-b[0]), (k1*a[0]+b[0]/k1), (k1*a[0]-b[0]/k1));
beta[1] = getBeta((a[1]+b[1]), (a[1]-b[1]), (a[1]/k2+k2*b[1]), (a[1]/k2-k2*b[1]));
if (pq[0].z() > ZERO) {
beta[0] = -beta[0];
beta[1] = -beta[1];
}
return beta;
}
void KinematicsReconstructor::
reconstructColourSinglets(vector<ShowerProgenitorPtr> & ShowerHardJets,
ShowerInteraction type) const {
// identify and catagorize the colour singlet systems
unsigned int nnun(0),nnii(0),nnif(0),nnf(0),nni(0);
vector<ColourSingletSystem>
systems(identifySystems(set<ShowerProgenitorPtr>(ShowerHardJets.begin(),ShowerHardJets.end()),
nnun,nnii,nnif,nnf,nni));
// now decide what to do
// initial-initial connection and final-state colour singlet systems
LorentzRotation toRest,fromRest;
bool applyBoost(false),general(false);
// Drell-Yan type
if(nnun==0&&nnii==1&&nnif==0&&nnf>0&&nni==0) {
// reconstruct initial-initial system
for(unsigned int ix=0;ix<systems.size();++ix) {
if(systems[ix].type==II)
reconstructInitialInitialSystem(applyBoost,toRest,fromRest,
systems[ix].jets);
}
if(type!=ShowerInteraction::QCD) {
combineFinalState(systems);
general=false;
}
}
// DIS and VBF type
else if(nnun==0&&nnii==0&&((nnif==1&&nnf>0&&nni==1)||
(nnif==2&& nni==0))) {
// check these systems can be reconstructed
for(unsigned int ix=0;ix<systems.size();++ix) {
// compute q^2
if(systems[ix].type!=IF) continue;
Lorentz5Momentum q;
for(unsigned int iy=0;iy<systems[ix].jets.size();++iy) {
if(systems[ix].jets[iy]->progenitor()->isFinalState())
q += systems[ix].jets[iy]->progenitor()->momentum();
else
q -= systems[ix].jets[iy]->progenitor()->momentum();
}
q.rescaleMass();
// check above cut
if(abs(q.m())>=_minQ) continue;
if(nnif==1&&nni==1) {
throw KinematicsReconstructionVeto();
}
else {
general = true;
break;
}
}
if(!general) {
for(unsigned int ix=0;ix<systems.size();++ix) {
if(systems[ix].type==IF)
reconstructInitialFinalSystem(systems[ix].jets);
}
}
}
// e+e- type
else if(nnun==0&&nnii==0&&nnif==0&&nnf>0&&nni==2) {
general = type!=ShowerInteraction::QCD;
}
// general type
else {
general = true;
}
// final-state systems except for general recon
if(!general) {
for(unsigned int ix=0;ix<systems.size();++ix) {
if(systems[ix].type==F)
reconstructFinalStateSystem(applyBoost,toRest,fromRest,
systems[ix].jets);
}
}
else {
reconstructGeneralSystem(ShowerHardJets);
}
}
void KinematicsReconstructor::findInitialBoost(const Lorentz5Momentum & pold,
const Lorentz5Momentum & pnew,
LorentzRotation & toRest,
LorentzRotation & fromRest) const {
// do one boost
if(_initialBoost==0) {
toRest = LorentzRotation(pold.findBoostToCM());
fromRest = LorentzRotation(pnew.boostVector());
}
else if(_initialBoost==1) {
// boost to rest frame
// first transverse
toRest = Boost(-pold.x()/pold.t(),-pold.y()/pold.t(),0.);
// then longitudinal
double beta = pold.z()/sqrt(pold.m2()+sqr(pold.z()));
toRest.boost((Boost(0.,0.,-beta)));
// boost from rest frame
// first apply longitudinal boost
beta = pnew.z()/sqrt(pnew.m2()+sqr(pnew.z()));
fromRest=LorentzRotation(Boost(0.,0.,beta));
// then transverse one
fromRest.boost(Boost(pnew.x()/pnew.t(),
pnew.y()/pnew.t(),0.));
}
else
assert(false);
}
diff --git a/Shower/QTilde/Kinematics/KinematicsReconstructor.h b/Shower/QTilde/Kinematics/KinematicsReconstructor.h
--- a/Shower/QTilde/Kinematics/KinematicsReconstructor.h
+++ b/Shower/QTilde/Kinematics/KinematicsReconstructor.h
@@ -1,656 +1,661 @@
// -*- C++ -*-
//
// KinematicsReconstructor.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_KinematicsReconstructor_H
#define HERWIG_KinematicsReconstructor_H
//
// This is the declaration of the KinematicsReconstructor class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
#include "Herwig/Shower/QTilde/Base/ShowerProgenitor.h"
#include "Herwig/Shower/QTilde/Base/ShowerTree.h"
#include "Herwig/Shower/QTilde/Base/HardTree.h"
#include "KinematicsReconstructor.fh"
#include <cassert>
namespace Herwig {
using namespace ThePEG;
/**\ingroup Shower
* Exception class
* used to communicate failure of kinematics
* reconstruction.
*/
struct KinematicsReconstructionVeto {};
/** \ingroup Shower
* A simple struct to store the information we need on the
* showering
*/
struct JetKinStruct {
/**
* Parent particle of the jet
*/
tShowerParticlePtr parent;
/**
* Momentum of the particle before reconstruction
*/
Lorentz5Momentum p;
/**
* Momentum of the particle after reconstruction
*/
Lorentz5Momentum q;
};
/**
* typedef for a vector of JetKinStruct
*/
typedef vector<JetKinStruct> JetKinVect;
/**
* Enum to identify types of colour singlet systems
*/
enum SystemType { UNDEFINED=-1, II, IF, F ,I };
/**
* Struct to store colour singlets
*/
template<typename Value> struct ColourSinglet {
typedef vector<ColourSinglet<Value> > VecType;
ColourSinglet() : type(UNDEFINED) {}
ColourSinglet(SystemType intype,Value inpart)
: type(intype),jets(1,inpart) {}
/**
* The type of system
*/
SystemType type;
/**
* The jets in the system
*/
vector<Value> jets;
};
/**
* Struct to store a colour singlet system of particles
*/
typedef ColourSinglet<ShowerProgenitorPtr> ColourSingletSystem;
/**
* Struct to store a colour singlet shower
*/
typedef ColourSinglet<HardBranchingPtr> ColourSingletShower;
/** \ingroup Shower
*
* This class is responsible for the kinematical reconstruction
* after each showering step, and also for the necessary Lorentz boosts
* in order to preserve energy-momentum conservation in the overall collision,
* and also the invariant mass and the rapidity of the hard subprocess system.
* In the case of multi-step showering, there will be not unnecessary
* kinematical reconstructions.
*
* There is also the option of taking a set of momenta for the particles
* and inverting the reconstruction to give the evolution variables for the
* shower.
*
* Notice:
* - although we often use the term "jet" in either methods or variables names,
* or in comments, which could appear applicable only for QCD showering,
* there is indeed no "dynamics" represented in this class: only kinematics
* is involved, as the name of this class remainds. Therefore it can be used
* for any kind of showers (QCD-,QED-,EWK-,... bremsstrahlung).
*
* @see ShowerParticle
* @see ShowerKinematics
* @see \ref KinematicsReconstructorInterfaces "The interfaces"
* defined for KinematicsReconstructor.
*/
class KinematicsReconstructor: public Interfaced {
public:
/**
* Default constructor
*/
- KinematicsReconstructor() : _reconopt(0), _initialBoost(0),
- _finalStateReconOption(0),
- _initialStateReconOption(0), _minQ(MeV) {};
+ KinematicsReconstructor() : _reconopt(0), _initialBoost(0),
+ _finalStateReconOption(0),
+ _initialStateReconOption(0),
+ _finalFinalWeight(false), _minQ(MeV) {};
/**
* Methods to reconstruct the kinematics of a scattering or decay process
*/
//@{
/**
* Given in input a vector of the particles which initiated the showers
* the method does the reconstruction of such jets,
* including the appropriate boosts (kinematics reshufflings)
* needed to conserve the total energy-momentum of the collision
* and preserving the invariant mass and the rapidity of the
* hard subprocess system.
*/
virtual bool reconstructHardJets(ShowerTreePtr hard,
const map<tShowerProgenitorPtr,
pair<Energy,double> > & pt,
ShowerInteraction type,
bool switchRecon) const;
/**
* Given in input a vector of the particles which initiated the showers
* the method does the reconstruction of such jets,
* including the appropriate boosts (kinematics reshufflings)
* needed to conserve the total energy-momentum of the collision
* and preserving the invariant mass and the rapidity of the
* hard subprocess system.
*/
virtual bool reconstructDecayJets(ShowerTreePtr decay,
ShowerInteraction type) const;
//@}
/**
* Methods to invert the reconstruction of the shower for
* a scattering or decay process and calculate
* the variables used to generate the
* shower given the particles produced.
* This is needed for the CKKW and POWHEG approaches
*/
//@{
/**
* Given the particles, with a history which we wish to interpret
* as a shower reconstruct the variables used to generate the
* shower
*/
virtual bool deconstructDecayJets(HardTreePtr,ShowerInteraction) const;
/**
* Given the particles, with a history which we wish to interpret
* as a shower reconstruct the variables used to generate the shower
* for a hard process
*/
virtual bool deconstructHardJets(HardTreePtr,ShowerInteraction) const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Methods to reconstruct the kinematics of individual jets
*/
//@{
/**
* Given the particle (ShowerParticle object) that
* originates a forward (time-like) jet, this method reconstructs the kinematics
* of the jet. That is, by starting from the final grand-children (which
* originates directly or indirectly from particleJetParent,
* and which don't have children), and moving "backwards" (in a physical
* time picture), towards the particleJetParent, the
* ShowerKinematics objects associated with the various particles,
* which have been created during the showering, are now completed.
* In particular, at the end, we get the mass of the jet, which is the
* main information we want.
* This methods returns false if there was no radiation or rescaling required
*/
virtual bool reconstructTimeLikeJet(const tShowerParticlePtr particleJetParent) const;
/**
* Exactly similar to the previous one, but for a space-like jet.
* Also in this case we start from the final grand-children (which
* are childless) of the particle which originates the jet, but in
* this case we proceed "forward" (in the physical time picture)
* towards the particleJetParent.
* This methods returns false if there was no radiation or rescaling required
*/
bool reconstructSpaceLikeJet(const tShowerParticlePtr particleJetParent) const;
/**
* Exactly similar to the previous one, but for a decay jet
* This methods returns false if there was no radiation or rescaling required
*/
bool reconstructDecayJet(const tShowerParticlePtr particleJetParent) const;
//@}
/**
* Methods to perform the reconstruction of various types of colour
* singlet systems
*/
//@{
/**
* Perform the reconstruction of a system with one incoming and at least one
* outgoing particle
*/
void reconstructInitialFinalSystem(vector<ShowerProgenitorPtr>) const;
/**
* Perform the reconstruction of a system with only final-state
* particles
*/
void reconstructFinalStateSystem(bool applyBoost,
const LorentzRotation & toRest,
const LorentzRotation & fromRest,
vector<ShowerProgenitorPtr>) const;
/**
* Reconstruction of a general coloured system
*/
void reconstructGeneralSystem(vector<ShowerProgenitorPtr> & ShowerHardJets) const;
/**
* Reconstruction of a general coloured system doing
* final-final, then initial-final and then initial-initial
*/
void reconstructFinalFirst(vector<ShowerProgenitorPtr> & ShowerHardJets) const;
/**
* Reconstruction of a general coloured system doing
* colour parners
*/
void reconstructColourPartner(vector<ShowerProgenitorPtr> & ShowerHardJets) const;
/**
* Reconstruction based on colour singlet systems
*/
void reconstructColourSinglets(vector<ShowerProgenitorPtr> & ShowerHardJets,
ShowerInteraction type) const;
/**
* Perform the reconstruction of a system with only final-state
* particles
*/
void reconstructInitialInitialSystem(bool & applyBoost,
LorentzRotation & toRest,
LorentzRotation & fromRest,
vector<ShowerProgenitorPtr>) const;
//@}
/**
* Methods to perform the inverse reconstruction of various types of
* colour singlet systems
*/
//@{
/**
* Perform the inverse reconstruction of a system with only final-state
* particles
*/
void deconstructFinalStateSystem(const LorentzRotation & toRest,
const LorentzRotation & fromRest,
HardTreePtr,
vector<HardBranchingPtr>,
ShowerInteraction) const;
/**
* Perform the inverse reconstruction of a system with only initial-state
* particles
*/
void deconstructInitialInitialSystem(bool & applyBoost,
LorentzRotation & toRest,
LorentzRotation & fromRest,
HardTreePtr,
vector<HardBranchingPtr>,
ShowerInteraction ) const;
/**
* Perform the inverse reconstruction of a system with only initial-state
* particles
*/
void deconstructInitialFinalSystem(HardTreePtr,
vector<HardBranchingPtr>,
ShowerInteraction ) const;
bool deconstructGeneralSystem(HardTreePtr,
ShowerInteraction) const;
bool deconstructColourSinglets(HardTreePtr,
ShowerInteraction) const;
bool deconstructColourPartner(HardTreePtr,
ShowerInteraction) const;
//@}
/**
* Recursively treat the most off-shell paricle seperately
* for final-final reconstruction
*/
void reconstructFinalFinalOffShell(JetKinVect orderedJets, Energy2 s,
bool recursive) const;
/**
* Various methods for the Lorentz transforms needed to do the
* rescalings
*/
//@{
/**
* Compute the boost to get from the the old momentum to the new
*/
LorentzRotation solveBoost(const double k,
const Lorentz5Momentum & newq,
const Lorentz5Momentum & oldp) const;
/**
* Compute the boost to get from the the old momentum to the new
*/
LorentzRotation solveBoost(const Lorentz5Momentum & newq,
const Lorentz5Momentum & oldq) const;
/**
* Compute the boost to get from the the old momentum to the new
*/
LorentzRotation solveBoostZ(const Lorentz5Momentum & newq,
const Lorentz5Momentum & oldq) const;
/**
* Recursively boost the initial-state shower
* @param p The particle
* @param bv The boost
* @param parent The parent of the chain
*/
void boostChain(tPPtr p, const LorentzRotation & bv, tPPtr & parent) const;
/**
* Given a 5-momentum and a scale factor, the method returns the
* Lorentz boost that transforms the 3-vector vec{momentum} --->
* k*vec{momentum}. The method returns the null boost in the case no
* solution exists. This will only work in the case where the
* outgoing jet-momenta are parallel to the momenta of the particles
* leaving the hard subprocess.
*/
Boost solveBoostBeta( const double k, const Lorentz5Momentum & newq,
const Lorentz5Momentum & oldp);
/**
* Compute boost parameter along z axis to get (Ep, any perp, qp)
* from (E, same perp, q).
*/
double getBeta(const double E, const double q,
const double Ep, const double qp) const
{return (q*E-qp*Ep)/(sqr(qp)+sqr(E));}
//@}
/**
* Methods to calculate the various scaling factors
*/
//@{
/**
* Given a vector of 5-momenta of jets, where the 3-momenta are the initial
* ones before showering and the masses are reconstructed after the showering,
* this method returns the overall scaling factor for the 3-momenta of the
* vector of particles, vec{P}_i -> k * vec{P}_i, such to preserve energy-
* momentum conservation, i.e. after the rescaling the center of mass 5-momentum
* is equal to the one specified in input, cmMomentum.
* The method returns 0 if such factor cannot be found.
* @param root_s Centre-of-mass energy
* @param jets The jets
*/
double solveKfactor( const Energy & root_s, const JetKinVect & jets ) const;
/**
* Calculate the rescaling factors for the jets in a particle decay where
* there was initial-state radiation
* @param mb The mass of the decaying particle
* @param n The reference vector for the initial state radiation
* @param pjet The momentum of the initial-state jet
* @param jetKinematics The JetKinStruct objects for the jets
* @param partner The colour partner
* @param ppartner The momentum of the colour partner of the decaying particle
* before and after radiation
* @param k1 The rescaling parameter for the partner
* @param k2 The rescaling parameter for the outgoing singlet
* @param qt The transverse momentum vector
*/
bool solveDecayKFactor(Energy mb,
const Lorentz5Momentum & n,
const Lorentz5Momentum & pjet,
const JetKinVect & jetKinematics,
ShowerParticlePtr partner,
Lorentz5Momentum ppartner[2],
double & k1,
double & k2,
Lorentz5Momentum & qt) const;
/**
* Compute the momentum rescaling factor needed to invert the shower
* @param pout The momenta of the outgoing particles
* @param mon The on-shell masses
* @param roots The mass of the decaying particle
*/
double inverseRescalingFactor(vector<Lorentz5Momentum> pout,
vector<Energy> mon,Energy roots) const;
/**
* Compute the momentum rescaling factor needed to invert the shower
* @param pout The momenta of the outgoing particles
* @param mon The on-shell masses
* @param roots The mass of the decaying particle
* @param ppartner The momentum of the colour partner
* @param mbar The mass of the decaying particle
* @param k1 The first scaling factor
* @param k2 The second scaling factor
*/
bool inverseDecayRescalingFactor(vector<Lorentz5Momentum> pout,
vector<Energy> mon,Energy roots,
Lorentz5Momentum ppartner, Energy mbar,
double & k1, double & k2) const;
/**
* Check the rescaling conserves momentum
* @param k The rescaling
* @param root_s The centre-of-mass energy
* @param jets The jets
*/
Energy momConsEq(double k, const Energy & root_s,
const JetKinVect & jets) const;
void findInitialBoost(const Lorentz5Momentum & pold, const Lorentz5Momentum & pnew,
LorentzRotation & toRest, LorentzRotation & fromRest) const;
//@}
/**
* Find the colour partners of a particle to identify the colour singlet
* systems for the reconstruction.
*/
template<typename Value> void findPartners(Value branch,set<Value> & done,
const set<Value> & branchings,
vector<Value> & jets) const;
/**
* Add the intrinsic \f$p_T\f$ to the system if needed
*/
bool addIntrinsicPt(vector<ShowerProgenitorPtr>) const;
/**
* Apply a transform to the particle and any child, including child ShowerTree
* objects
* @param particle The particle
* @param r The Lorentz transformation
* @param match Whether or not to look at children etc
* @param original The original particle
*/
void deepTransform(PPtr particle,const LorentzRotation & r,
bool match=true,PPtr original=PPtr()) const;
/**
* Find the mass of a particle in the hard branching
*/
Energy findMass(HardBranchingPtr) const;
/**
* Calculate the initial-state rescaling factors
*/
vector<double> initialStateRescaling(double x1, double x2,
const Lorentz5Momentum & pold,
const vector<Lorentz5Momentum> & p,
const vector<Lorentz5Momentum> & pq,
const vector<Energy>& highespts) const;
/**
* Calculate the inverse of the initial-state rescaling factor
*/
vector<double> inverseInitialStateRescaling(double & x1, double & x2,
const Lorentz5Momentum & pold,
const vector<Lorentz5Momentum> & p,
const vector<Lorentz5Momentum> & pq) const;
/**
* Find the colour singlet systems
*/
template<typename Value >
typename ColourSinglet<Value>::VecType identifySystems(set<Value> jets,
unsigned int & nnun,unsigned int & nnii,
unsigned int & nnif,unsigned int & nnf,
unsigned int & nni) const;
/**
* Combine final-state colour systems
*/
template<typename Value>
void combineFinalState(vector<ColourSinglet<Value> > & systems) const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
KinematicsReconstructor & operator=(const KinematicsReconstructor &) = delete;
private:
/**
* Option for handling the reconstruction
*/
unsigned int _reconopt;
/**
* Option for the boost for initial-initial reconstruction
*/
unsigned int _initialBoost;
/**
* Option for the reconstruction of final state systems
*/
unsigned int _finalStateReconOption;
/**
* Option for the initial state reconstruction
*/
unsigned int _initialStateReconOption;
/**
+ * Option for FF kinematic factor
+ */
+ bool _finalFinalWeight;
+
+ /**
* Minimum invariant mass for initial-final dipoles to allow the
* reconstruction
*/
Energy _minQ;
/**
* The progenitor of the jet currently being reconstructed
*/
mutable tShowerParticlePtr _progenitor;
/**
* Storage of the intrinsic \f$p_T\f$
*/
mutable map<tShowerProgenitorPtr,pair<Energy,double> > _intrinsic;
/**
* Current ShowerTree
*/
mutable tShowerTreePtr _currentTree;
/**
* Particles which shouldn't have their masses rescaled as
* vector for the interface
*/
PDVector _noRescaleVector;
/**
* Particles which shouldn't have their masses rescaled as
* set for quick access
*/
set<cPDPtr> _noRescale;
/**
* Storage of the boosts applied to enable resetting after failure
*/
mutable map<tPPtr,vector<LorentzRotation> > _boosts;
/**
* Storage of the boosts applied to enable resetting after failure
*/
mutable map<tShowerTreePtr,vector<LorentzRotation> > _treeBoosts;
};
}
-#include "KinematicsReconstructor.tcc"
#endif /* HERWIG_KinematicsReconstructor_H */
diff --git a/Shower/QTilde/Kinematics/ShowerBasis.h b/Shower/QTilde/Kinematics/ShowerBasis.h
--- a/Shower/QTilde/Kinematics/ShowerBasis.h
+++ b/Shower/QTilde/Kinematics/ShowerBasis.h
@@ -1,130 +1,130 @@
// -*- C++ -*-
#ifndef Herwig_ShowerBasis_H
#define Herwig_ShowerBasis_H
//
// This is the declaration of the ShowerBasis class.
//
#include "ShowerBasis.fh"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.fh"
#include "Herwig/Shower/QTilde/ShowerConfig.h"
#include "ThePEG/Config/ThePEG.h"
#include "ThePEG/Vectors/Lorentz5Vector.h"
namespace Herwig {
using namespace ThePEG;
/**
* The ShowerBasis class stores the basis vectors used by the shower
*/
class ShowerBasis: public Base {
public:
/**
* enum for the frame definition
*/
enum Frame {BackToBack,Rest};
public:
/**
* The default constructor.
*/
ShowerBasis() {}
/**
* Access to the frame definition
*/
Frame frame() const {return frame_;}
/**
* Implementation of the virtual function returning a set of basis vectors, specific to
* the type of evolution. This function will be used by the
* ForwardShowerEvolver in order to access \f$p\f$
* and \f$n\f$.
*/
virtual vector<Lorentz5Momentum> getBasis() const;
/**
* Set the basis vectors
*/
void setBasis(const Lorentz5Momentum &p, const Lorentz5Momentum & n,
Frame frame);
/**
* Access to the \f$p\f$ vector used to describe the kinematics.
*/
const Lorentz5Momentum & pVector() const {return pVector_;}
/**
* Access to the \f$n\f$ vector used to describe the kinematics.
*/
const Lorentz5Momentum & nVector() const {return nVector_;}
/**
* Dot product of thew basis vectors
*/
Energy2 p_dot_n() const {return pVector_*nVector_;}
/**
* Transform the shower kinematics (usually the reference vectors)
*/
virtual void transform(const LorentzRotation & r);
/**
* Converts a Sudakov parametrization of a momentum w.r.t. the given
* basis \f$p\f$ and \f$n\f$ into a 5 momentum.
* @param alpha The \f$\alpha\f$ parameter of the Sudakov parameterisation
* @param beta The \f$\beta\f$ parameter of the Sudakov parameterisation
* @param px The \f$x\f$-component of the transverse momentum in the Sudakov
* parameterisation
* @param py The \f$x\f$-component of the transverse momentum in the Sudakov
* parameterisation
*/
Lorentz5Momentum sudakov2Momentum(double alpha, double beta,
Energy px, Energy py) const {
return alpha*pVector_ + beta*nVector_ + px*xPerp_ + py*yPerp_;
}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerBasis & operator=(const ShowerBasis &);
+ ShowerBasis & operator=(const ShowerBasis &) = delete;
private:
/**
* The frame in which the basis vectors are defined
*/
Frame frame_;
/**
* The \f$p\f$ reference vector
*/
Lorentz5Momentum pVector_;
/**
* The \f$n\f$ reference vector
*/
Lorentz5Momentum nVector_;
/**
* x \f$q_\perp\f$ reference vector
*/
LorentzVector<double> xPerp_;
/**
* y \f$q_\perp\f$reference vector
*/
LorentzVector<double> yPerp_;
};
}
#endif /* Herwig_ShowerBasis_H */
diff --git a/Shower/QTilde/Makefile.am b/Shower/QTilde/Makefile.am
--- a/Shower/QTilde/Makefile.am
+++ b/Shower/QTilde/Makefile.am
@@ -1,45 +1,45 @@
SUBDIRS = Matching
pkglib_LTLIBRARIES = HwShower.la
-HwShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 25:2:0
+HwShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 26:0:0
HwShower_la_SOURCES = \
Couplings/ShowerAlphaQCD.h Couplings/ShowerAlphaQCD.cc \
Couplings/ShowerAlphaQED.h Couplings/ShowerAlphaQED.cc\
QTildeShowerHandler.h QTildeShowerHandler.fh QTildeShowerHandler.cc \
SplittingFunctions/HalfHalfOneSplitFn.h SplittingFunctions/HalfHalfOneSplitFn.cc\
SplittingFunctions/OneOneOneSplitFn.h SplittingFunctions/OneOneOneSplitFn.cc\
SplittingFunctions/OneOneOneMassiveSplitFn.h SplittingFunctions/OneOneOneMassiveSplitFn.cc\
SplittingFunctions/ZeroZeroOneSplitFn.h SplittingFunctions/ZeroZeroOneSplitFn.cc\
SplittingFunctions/OneHalfHalfSplitFn.h SplittingFunctions/OneHalfHalfSplitFn.cc\
SplittingFunctions/HalfOneHalfSplitFn.h SplittingFunctions/HalfOneHalfSplitFn.cc\
SplittingFunctions/CMWOneOneOneSplitFn.h SplittingFunctions/CMWOneOneOneSplitFn.cc\
SplittingFunctions/CMWHalfHalfOneSplitFn.h SplittingFunctions/CMWHalfHalfOneSplitFn.cc\
Kinematics/Decay_QTildeShowerKinematics1to2.cc \
Kinematics/Decay_QTildeShowerKinematics1to2.h \
Kinematics/IS_QTildeShowerKinematics1to2.cc Kinematics/IS_QTildeShowerKinematics1to2.h \
Kinematics/FS_QTildeShowerKinematics1to2.cc Kinematics/FS_QTildeShowerKinematics1to2.h \
Kinematics/KinematicsReconstructor.cc \
Kinematics/KinematicsReconstructor.tcc \
Kinematics/KinematicsReconstructor.h \
Kinematics/KinematicsReconstructor.fh \
Base/HardTree.cc Base/HardTree.h Base/HardTree.fh \
Base/HardBranching.h Base/HardBranching.fh Base/HardBranching.cc\
Base/PartnerFinder.h Base/PartnerFinder.fh Base/PartnerFinder.cc \
Base/ShowerVeto.h Base/ShowerVeto.fh Base/ShowerVeto.cc \
Base/FullShowerVeto.h Base/FullShowerVeto.fh Base/FullShowerVeto.cc \
SplittingFunctions/SplittingGenerator.cc SplittingFunctions/SplittingGenerator.h\
SplittingFunctions/SplittingGenerator.fh \
Base/ShowerTree.h Base/ShowerTree.fh Base/ShowerTree.cc \
ShowerConfig.h ShowerConfig.cc \
Base/Branching.h \
Base/ShowerParticle.cc Base/ShowerParticle.fh Base/ShowerParticle.h \
Kinematics/ShowerKinematics.fh Kinematics/ShowerKinematics.h Kinematics/ShowerKinematics.cc \
Kinematics/ShowerBasis.fh Kinematics/ShowerBasis.h Kinematics/ShowerBasis.cc \
Base/ShowerProgenitor.fh Base/ShowerProgenitor.h \
SplittingFunctions/SudakovFormFactor.cc SplittingFunctions/SudakovFormFactor.h SplittingFunctions/SudakovFormFactor.fh \
SplittingFunctions/SudakovCutOff.cc SplittingFunctions/SudakovCutOff.h SplittingFunctions/SudakovCutOff.fh \
SplittingFunctions/PTCutOff.cc SplittingFunctions/PTCutOff.h \
SplittingFunctions/MassCutOff.cc SplittingFunctions/MassCutOff.h \
SplittingFunctions/VariableMassCutOff.cc SplittingFunctions/VariableMassCutOff.h \
SplittingFunctions/SplittingFunction.h SplittingFunctions/SplittingFunction.fh \
SplittingFunctions/SplittingFunction.cc \
Base/ShowerVertex.cc Base/ShowerVertex.fh Base/ShowerVertex.h
diff --git a/Shower/QTilde/Matching/Makefile.am b/Shower/QTilde/Matching/Makefile.am
--- a/Shower/QTilde/Matching/Makefile.am
+++ b/Shower/QTilde/Matching/Makefile.am
@@ -1,8 +1,8 @@
pkglib_LTLIBRARIES = HwMatching.la
-HwMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0
+HwMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0
HwMatching_la_SOURCES = \
PowhegShowerHandler.h PowhegShowerHandler.cc \
CKKWTree.h CKKWTree.fh CKKWTree.cc \
ProtoTree.h ProtoBranching.h PotentialTree.h
diff --git a/Shower/QTilde/Matching/MatchingHandler.h b/Shower/QTilde/Matching/MatchingHandler.h
--- a/Shower/QTilde/Matching/MatchingHandler.h
+++ b/Shower/QTilde/Matching/MatchingHandler.h
@@ -1,448 +1,448 @@
// -*- C++ -*-
#ifndef Herwig_MatchingHandler_H
#define Herwig_MatchingHandler_H
//
// This is the declaration of the MatchingHandler class.
//
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include "ThePEG/MatrixElement/MEBase.h"
#include "Herwig/MatrixElement/HwMEBase.h"
#include "ThePEG/MatrixElement/DiagramBase.fh"
#include "ThePEG/PDF/PartonExtractor.h"
#include "Herwig/Shower/QTilde/Base/HardBranching.h"
#include "ProtoTree.h"
#include "PotentialTree.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the MatchingHandler class.
*
* @see \ref MatchingHandlerInterfaces "The interfaces"
* defined for MatchingHandler.
*/
class MatchingHandler: public ShowerHandler {
public:
/**
* The default constructor.
*/
MatchingHandler(bool reWeight = false);
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Access to the core matrix element
*/
MEPtr matrixElement() const {return matrixElement_;}
/**
* Access to the core Hw++ matrix element
*/
HwMEBasePtr HWMatrixElement() const {return HWmatrixElement_;}
/**
* The PartonExtractor object used to construct remnants.
*/
PExtrPtr partonExtractor() { return partonExtractor_;}
/**
* The pairs of PartonBin objects describing the partons which can
* be extracted by the PartonExtractor object.
*/
PartonPairVec partonBins() {return partonBins_;}
/**
* The pairs of PartonBin objects describing the partons which can
* be extracted by the PartonExtractor object.
*/
void partonBins(PartonPairVec bins) {partonBins_ = bins;}
/**
* The Cuts object to be used for this reader.
*/
CutsPtr & cuts() {return cuts_;}
/**
* Initialise the matching
*/
void initialiseMatching(int minMult, int maxMult);
protected:
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr alphaS() {return alphaS_;}
/**
* whether to just reject event if there are no angular ordered histories (true)
* or to choose one of the non angular ordered histories (false)
*/
bool rejectNonAngularOrdered() {return rejectNonAO_;}
/**
* whether to reject events (true) for which there is no parton shower interpretation
* or just shower them with no reweighting
*/
bool rejectNoShowerHistory() {return rejectNOHistories_;}
/**
* Access to basic info on the event
*/
//@{
/**
* Centre of mass energy
*/
Energy2 sHat() const {return sHat_;}
/**
* Centre of mass energy
*/
void sHat(Energy2 in) {sHat_ = in;}
/**
* The fixed factorization scale used in the MEs.
*/
Energy pdfScale() const {return pdfScale_;}
/**
* The fixed factorization scale used in the MEs.
*/
void pdfScale(Energy in) {pdfScale_ = in;}
/**
* The fixed alphaS value that was used to generate parton configurations
*/
double alphaSMG() const {return alphaSMG_;}
/**
* The fixed alphaS value that was used to generate parton configurations
*/
void alphaSMG(double in) {alphaSMG_ = in;}
/**
* Whether we are treating an event with no shower interpretation
*/
bool noShowerHistory() {return noShowerHists_;}
/**
* whether the current event is a highest multiplicity event.
*/
bool highestMult() const {return highestMult_;}
/**
* whether the current event is a lowest multiplicity event
*/
bool lowestMult() const {return lowestMult_;}
//@}
/**
* Storage of potential shower interpretations
*/
//@{
/**
* Access to the potential branchings
*/
set<ProtoBranchingPtr> & protoBranchings() {return protoBranchings_;}
/**
* The ProtoTrees which will become CKKWTrees
*/
set< ProtoTreePtr > & protoTrees() {return protoTrees_;}
/**
* Access to the select tree
*/
PotentialTree & hardTree() {return hardTree_;}
/**
* Access to the select tree
*/
void hardTree(PotentialTree in) {hardTree_ = in;}
/**
* access to the hard tree object
*/
CKKWTreePtr getCKKWTree() const {return hardTree_.tree();}
/**
* The possible shower configurations that are angular-ordered
*/
vector< pair< PotentialTree, double > > & hardTrees() {
return hardTrees_;
}
/**
* The possible shower configurations that are not angular-ordered
*/
vector< pair< PotentialTree, double > > & nonOrderedTrees() {
return nonOrderedTrees_;
}
//@}
/**
* Returns the diagram corresponding to the (leading-order) hardTree
*/
double getDiagram(PotentialTree &);
/**
* Recursive function to find all possible clustered trees.
* Does not produce any repeated trees.
*/
void fillProtoTrees( ProtoTreePtr );
/**
* update sub process based on the CKKWTree and Diagram
*/
bool updateSubProcess();
/**
* Creates all (ordered) cluster histories and selects one.
*/
PotentialTree doClustering();
/**
* Calculate the Sudakov weight
*/
virtual double sudakovWeight( CKKWTreePtr ) = 0;
/**
* Select the hard tree
*/
virtual PotentialTree chooseHardTree(double totalWeight,
double nonOrderedWeight) = 0;
/**
* Function looks to see if a cluster of the branchings already exists
* in protoBranchings_ if so returns the pointer to that protoBranching
* if not creates the hardBranchings, adds it
* to protoBranchings and returns the pointer
*/
tProtoBranchingPtr getCluster( tProtoBranchingPtr, tProtoBranchingPtr );
/**
* Checks whether a ProtoTree containing the same branchings already
* exists in protoTrees_ in which case the current tree is a repeat
* and should be removed (and not recursed)
*/
bool repeatProtoTree( ProtoTreePtr currentProtoTree );
/**
* Returns the branching element for an FS-FS clustering
*/
BranchingElement allowedFinalStateBranching( tProtoBranchingPtr &,
tProtoBranchingPtr &);
/**
* Returns the branching element for an IS-FS clustering
*/
BranchingElement allowedInitialStateBranching( tProtoBranchingPtr & ,
tProtoBranchingPtr &);
/**
* Find decaying particles
*/
void findDecayingParticles(PPtr parent);
/**
* Check if a decayed particle
*/
map<PPtr,ParticleVector>::const_iterator parent(PPtr parent);
/**
* Add the decay products of a particle to the new SubProcess
*/
void addDecayProducts(SubProPtr subProcess, PPtr parent,
map<PPtr,ParticleVector>::const_iterator decay,
const LorentzRotation & boost) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MatchingHandler & operator=(const MatchingHandler &);
+ MatchingHandler & operator=(const MatchingHandler &) = delete;
private:
/**
* Whether or not to reweight
*/
bool reWeight_;
/**
* whether to just reject event if there are no angular ordered histories (true)
* or to choose one of the non angular ordered histories (false)
*/
bool rejectNonAO_;
/**
* whether to reject events (true) for which there is no parton shower interpretation
* or just shower them with no reweighting
*/
bool rejectNOHistories_;
/**
* Include decaying particles
*/
bool includeDecays_;
/**
* The matrix element for the core process
*/
MEPtr matrixElement_;
/**
* The cast matrix element
*/
HwMEBasePtr HWmatrixElement_;
/**
* The PartonExtractor object used to construct remnants.
*/
PExtrPtr partonExtractor_;
/**
* The pairs of PartonBin objects describing the partons which can
* be extracted by the PartonExtractor object.
*/
PartonPairVec partonBins_;
/**
* The Cuts object to be used for this reader.
*/
CutsPtr cuts_;
/**
* Centre of mass energy
*/
Energy2 sHat_;
/**
* Pointer to the object calculating the strong coupling
*/
ShowerAlphaPtr alphaS_;
/**
* The fixed factorization scale used in the MEs.
*/
Energy pdfScale_;
/**
* The fixed alphaS value that was used to generate parton configurations
*/
double alphaSMG_;
private:
/**
* Storage of the potential shower interpretation
*/
//@{
/**
* All the Protobranchings used in finding the shower histories
*/
set<ProtoBranchingPtr> protoBranchings_;
/**
* The ProtoTrees which will become CKKWTrees
*/
set< ProtoTreePtr > protoTrees_;
/**
* The chosen hard tree
*/
PotentialTree hardTree_;
/**
* The possible shower configurations that are angular-ordered
*/
vector< pair< PotentialTree, double > > hardTrees_;
/**
* The possible shower configurations that are not angular-ordered
*/
vector< pair< PotentialTree, double > > nonOrderedTrees_;
/**
* Any decays
*/
map<PPtr,ParticleVector> decayingParticles_;
/**
* Whether we are treating an event with no shower interpretation
*/
bool noShowerHists_;
/**
* Whether we are treating the highest multiplicity contribution
*/
bool highestMult_;
/**
* Whether we are treating the lowest multiplicity contribution
*/
bool lowestMult_;
//@}
/**
* Which branchings are allowed?
*/
//@{
/**
* The allowed final-state branchings
*/
map<pair<long,long>,pair<SudakovPtr,IdList> > allowedFinal_;
/**
* The allowed initial-state branchings
*/
multimap<long, pair<SudakovPtr,IdList> > allowedInitial_;
//@}
};
}
#endif /* Herwig_MatchingHandler_H */
diff --git a/Shower/QTilde/Matching/PowhegHandler.h b/Shower/QTilde/Matching/PowhegHandler.h
--- a/Shower/QTilde/Matching/PowhegHandler.h
+++ b/Shower/QTilde/Matching/PowhegHandler.h
@@ -1,117 +1,117 @@
// -*- C++ -*-
#ifndef Herwig_PowhegHandler_H
#define Herwig_PowhegHandler_H
//
// This is the declaration of the PowhegHandler class.
//
#include "MatchingHandler.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the PowhegHandler class.
*
* @see \ref PowhegHandlerInterfaces "The interfaces"
* defined for PowhegHandler.
*/
class PowhegHandler: public MatchingHandler {
public:
/**
* The default constructor.
*/
PowhegHandler() : MatchingHandler(false), pTDefinition_(0), maxpT_(GeV)
{}
/**
* Perform CKKW reweighting
*/
virtual double reweightCKKW(int minMult, int maxMult);
/**
* Generate hard emissions for CKKW etc
*/
virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const;
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* Calculate the Sudakov weight
*/
virtual double sudakovWeight( CKKWTreePtr ) {
return 1.;
}
virtual PotentialTree chooseHardTree(double totalWeight,
double nonOrderedWeight);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PowhegHandler & operator=(const PowhegHandler &);
+ PowhegHandler & operator=(const PowhegHandler &) = delete;
private:
/**
* Control over the selection of the maximum \f$p_T\f$ for emission
*/
unsigned int pTDefinition_;
/**
* Maximum pT for the shower for non-emission events
*/
Energy maxpT_;
};
}
#endif /* Herwig_PowhegHandler_H */
diff --git a/Shower/QTilde/Matching/PowhegShowerHandler.h b/Shower/QTilde/Matching/PowhegShowerHandler.h
--- a/Shower/QTilde/Matching/PowhegShowerHandler.h
+++ b/Shower/QTilde/Matching/PowhegShowerHandler.h
@@ -1,298 +1,298 @@
// -*- C++ -*-
//
// PowhegShowerHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_PowhegShowerHandler_H
#define HERWIG_PowhegShowerHandler_H
//
// This is the declaration of the PowhegShowerHandler class.
//
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include "Herwig/MatrixElement/Matchbox/MatchboxFactory.h"
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/Shower/QTilde/Base/HardBranching.h"
#include "Herwig/Shower/QTilde/Matching/CKKWTree.h"
#include "Herwig/Shower/QTilde/Matching/ProtoTree.h"
#include "Herwig/Shower/QTilde/Matching/ProtoBranching.h"
#include "Herwig/Shower/QTilde/Matching/PotentialTree.h"
#include "ThePEG/MatrixElement/DiagramBase.fh"
#include "ThePEG/MatrixElement/MEBase.h"
#include "ThePEG/PDF/PartonExtractor.h"
#include "Herwig/Shower/QTilde/Base/HardTree.h"
// #include "Herwig/Shower/QTilde/SplittingFunctions/SplittingGenerator.h"
// #include "Herwig/Shower/QTilde/Base/ShowerModel.h"
// #include "ThePEG/PDF/BeamParticleData.h"
// #include "Herwig/Shower/QTilde/Base/ShowerTree.h"
// #include "Herwig/Shower/QTilde/Base/ShowerProgenitor.fh"
// #include "Herwig/Shower/QTilde/QTildeShowerHandler.fh"
// #include "Herwig/Shower/QTilde/Base/Branching.h"
// #include "Herwig/Shower/QTilde/Base/ShowerVeto.h"
// #include "ThePEG/Handlers/XComb.h"
// #include "Herwig/Decay/HwDecayerBase.h"
namespace Herwig {
using namespace ThePEG;
class PowhegShowerHandler: public QTildeShowerHandler {
public:
/**
* The default constructor.
*/
PowhegShowerHandler() : subtractionIntegral_(false),
enforceColourConsistency_(false),
forcePartners_(false),
decayRadiation_(0)
{}
public:
Ptr<MatchboxFactory>::tptr Factory() const{return MatchboxFactory::currentFactory();}
/**
* Return true, if the shower handler can generate a truncated
* shower for POWHEG style events generated using Matchbox
*/
virtual bool canHandleMatchboxTrunc() const { return true; }
protected:
/**
* Generate hard emissions for CKKW etc
*/
virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const;
protected:
/**
* Access to the core matrix element
*/
MEPtr matrixElement() const {return matrixElement_;}
/**
* Creates all (ordered) cluster histories and selects one.
*/
PotentialTree doClustering(tSubProPtr sub,ShowerTreePtr showerTree) const;
/**
* Access to the select tree
*/
PotentialTree & hardTree() {return hardTree_;}
const PotentialTree & hardTree() const {return hardTree_;}
/**
* Access to the select tree
*/
void hardTree(PotentialTree in) const {hardTree_ = in;}
/**
* Check if two momenta are equal within 1%
*/
bool fuzzyEqual(Lorentz5Momentum a, Lorentz5Momentum b) const;
/**
* Access to the potential branchings
*/
set<ProtoBranchingPtr> & protoBranchings() const {return protoBranchings_;}
/**
* The ProtoTrees which will become CKKWTrees
*/
set< ProtoTreePtr > & protoTrees() const {return protoTrees_;}
/**
* Recursive function to find all possible clustered trees.
* Does not produce any repeated trees.
*/
void fillProtoTrees( ProtoTreePtr , long id ) const;
/**
* Function looks to see if a cluster of the branchings already exists
* in protoBranchings_ if so returns the pointer to that protoBranching
* if not creates the hardBranchings, adds it
* to protoBranchings and returns the pointer
*/
tProtoBranchingPtr getCluster( tProtoBranchingPtr, tProtoBranchingPtr ) const;
/**
* Checks whether a ProtoTree containing the same branchings already
* exists in protoTrees_ in which case the current tree is a repeat
* and should be removed (and not recursed)
*/
bool repeatProtoTree( ProtoTreePtr currentProtoTree ) const;
/**
* Returns the branching element for an FS-FS clustering
*/
BranchingElement allowedFinalStateBranching( tProtoBranchingPtr &,
tProtoBranchingPtr &) const;
/**
* Returns the branching element for an IS-FS clustering
*/
BranchingElement allowedInitialStateBranching( tProtoBranchingPtr & ,
tProtoBranchingPtr &) const;
/**
* Returns the diagram corresponding to the (leading-order) hardTree
*/
bool checkDiagram(PotentialTree &,tcDiagPtr) const;
bool subtractionIntegral() const {return subtractionIntegral_;}
void setSubtractionIntegral(bool subInt) const { subtractionIntegral_=subInt;}
private:
/**
* The matrix element for the core process
*/
mutable MEPtr matrixElement_;
/**
* The chosen hard tree
*/
mutable PotentialTree hardTree_;
/**
* All the Protobranchings used in finding the shower histories
*/
mutable set<ProtoBranchingPtr> protoBranchings_;
/**
* The ProtoTrees which will become CKKWTrees
*/
mutable set< ProtoTreePtr > protoTrees_;
/**
* The possible shower configurations that are angular-ordered
*/
mutable vector< pair< PotentialTree, double > > hardTrees_;
/**
* Which branchings are allowed?
*/
//@{
/**
* The allowed final-state branchings
*/
mutable map<pair<long,long>,BranchingElement > allowedFinal_;
/**
* The allowed initial-state branchings
*/
mutable multimap<long, BranchingElement > allowedInitial_;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- PowhegShowerHandler & operator=(const PowhegShowerHandler &);
+ PowhegShowerHandler & operator=(const PowhegShowerHandler &) = delete;
private:
/**
* Emitter particle from the original generation
*/
mutable int emitter_;
/**
* Spectator particle from the original generation
*/
mutable int spectator_;
/**
* Whether or not a subtraction integral
*/
mutable bool subtractionIntegral_;
/**
* Whether or not do enforce consistency of the Born and real colour flows
*/
bool enforceColourConsistency_;
/**
* Force emitter and spectator partners
*/
bool forcePartners_;
/**
* Handling of radiation in decays
*/
unsigned int decayRadiation_;
};
}
#endif /* HERWIG_PowhegShowerHandler_H */
diff --git a/Shower/QTilde/QTildeShowerHandler.h b/Shower/QTilde/QTildeShowerHandler.h
--- a/Shower/QTilde/QTildeShowerHandler.h
+++ b/Shower/QTilde/QTildeShowerHandler.h
@@ -1,846 +1,846 @@
// -*- C++ -*-
#ifndef Herwig_QTildeShowerHandler_H
#define Herwig_QTildeShowerHandler_H
//
// This is the declaration of the QTildeShowerHandler class.
//
#include "QTildeShowerHandler.fh"
#include "Herwig/Shower/ShowerHandler.h"
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingGenerator.h"
#include "Herwig/Shower/QTilde/Base/ShowerTree.h"
#include "Herwig/Shower/QTilde/Base/ShowerProgenitor.fh"
#include "Herwig/Shower/QTilde/Base/HardTree.h"
#include "Herwig/Shower/QTilde/Base/Branching.h"
#include "Herwig/Shower/QTilde/Base/ShowerVeto.h"
#include "Herwig/Shower/QTilde/Base/FullShowerVeto.h"
#include "Herwig/Shower/QTilde/Kinematics/KinematicsReconstructor.fh"
#include "Herwig/Shower/QTilde/Base/PartnerFinder.fh"
#include "Herwig/Shower/QTilde/SplittingFunctions/SudakovFormFactor.fh"
#include "Herwig/MatrixElement/HwMEBase.h"
#include "Herwig/Decay/HwDecayerBase.h"
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
#include "Herwig/Shower/RealEmissionProcess.h"
#include "Herwig/Utilities/Statistic.h"
namespace Herwig {
using namespace ThePEG;
/**
* The QTildeShowerHandler class.
*
* @see \ref QTildeShowerHandlerInterfaces "The interfaces"
* defined for QTildeShowerHandler.
*/
class QTildeShowerHandler: public ShowerHandler {
public:
/**
* Pointer to an XComb object
*/
typedef Ptr<XComb>::pointer XCPtr;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
QTildeShowerHandler();
/**
* The destructor.
*/
virtual ~QTildeShowerHandler();
//@}
public:
/**
* At the end of the Showering, transform ShowerParticle objects
* into ThePEG particles and fill the event record with them.
* Notice that the parent/child relationships and the
* transformation from ShowerColourLine objects into ThePEG
* ColourLine ones must be properly handled.
*/
void fillEventRecord();
/**
* Return the relevant hard scale to be used in the profile scales
*/
virtual Energy hardScale() const {
return muPt;
}
/**
* Hook to allow vetoing of event after showering hard sub-process
* as in e.g. MLM merging.
*/
virtual bool showerHardProcessVeto() const { return false; }
/**
* Generate hard emissions for CKKW etc
*/
virtual HardTreePtr generateCKKW(ShowerTreePtr tree) const;
/**
* Members to perform the shower
*/
//@{
/**
* Perform the shower of the hard process
*/
virtual void showerHardProcess(ShowerTreePtr,XCPtr);
/**
* Perform the shower of a decay
*/
virtual void showerDecay(ShowerTreePtr);
//@}
/**
* Access to the flags and shower variables
*/
//@{
/**
* Get the SplittingGenerator
*/
tSplittingGeneratorPtr splittingGenerator() const { return _splittingGenerator; }
/**
* Mode for hard emissions
*/
int hardEmission() const {return _hardEmission;}
//@}
/**
* Connect the Hard and Shower trees
*/
virtual void connectTrees(ShowerTreePtr showerTree, HardTreePtr hardTree, bool hard );
/**
* Access to switches for spin correlations
*/
//@{
/**
* Soft correlations
*/
unsigned int softCorrelations() const {
return _softOpt;
}
/**
* Any correlations
*/
virtual bool correlations() const {
return spinCorrelations()!=0||_softOpt!=0;
}
//@}
public:
/**
* Access methods to access the objects
*/
//@{
/**
* Access to the KinematicsReconstructor object
*/
tKinematicsReconstructorPtr kinematicsReconstructor() const { return _reconstructor; }
/**
* Access to the PartnerFinder object
*/
tPartnerFinderPtr partnerFinder() const { return _partnerfinder; }
//@}
protected:
/**
* Perform the shower
*/
void doShowering(bool hard,XCPtr);
/**
* Generate the hard matrix element correction
*/
virtual RealEmissionProcessPtr hardMatrixElementCorrection(bool);
/**
* Generate the hardest emission
*/
virtual void hardestEmission(bool hard);
/**
* Set up for applying a matrix element correction
*/
void setupMECorrection(RealEmissionProcessPtr real);
/**
* Extract the particles to be showered, set the evolution scales
* and apply the hard matrix element correction
* @param hard Whether this is a hard process or decay
* @return The particles to be showered
*/
virtual vector<ShowerProgenitorPtr> setupShower(bool hard);
/**
* set the colour partners
*/
virtual void setEvolutionPartners(bool hard,ShowerInteraction,
bool clear);
/**
* Methods to perform the evolution of an individual particle, including
* recursive calling on the products
*/
//@{
/**
* It does the forward evolution of the time-like input particle
* (and recursively for all its radiation products).
* accepting only emissions which conforms to the showerVariables
* and soft matrix element correction.
* If at least one emission has occurred then the method returns true.
* @param particle The particle to be showered
*/
virtual bool timeLikeShower(tShowerParticlePtr particle, ShowerInteraction,
Branching fb, bool first);
/**
* It does the backward evolution of the space-like input particle
* (and recursively for all its time-like radiation products).
* accepting only emissions which conforms to the showerVariables.
* If at least one emission has occurred then the method returns true
* @param particle The particle to be showered
* @param beam The beam particle
*/
virtual bool spaceLikeShower(tShowerParticlePtr particle,PPtr beam,
ShowerInteraction);
/**
* If does the forward evolution of the input on-shell particle
* involved in a decay
* (and recursively for all its time-like radiation products).
* accepting only emissions which conforms to the showerVariables.
* @param particle The particle to be showered
* @param maxscale The maximum scale for the shower.
* @param minimumMass The minimum mass of the final-state system
*/
virtual bool
spaceLikeDecayShower(tShowerParticlePtr particle,
const ShowerParticle::EvolutionScales & maxScales,
Energy minimumMass,ShowerInteraction,
Branching fb);
/**
* Truncated shower from a time-like particle
*/
virtual bool truncatedTimeLikeShower(tShowerParticlePtr particle,
HardBranchingPtr branch,
ShowerInteraction type,
Branching fb, bool first);
/**
* Truncated shower from a space-like particle
*/
virtual bool truncatedSpaceLikeShower(tShowerParticlePtr particle,PPtr beam,
HardBranchingPtr branch,
ShowerInteraction type);
/**
* Truncated shower from a time-like particle
*/
virtual bool truncatedSpaceLikeDecayShower(tShowerParticlePtr particle,
const ShowerParticle::EvolutionScales & maxScales,
Energy minimumMass, HardBranchingPtr branch,
ShowerInteraction type, Branching fb);
//@}
/**
* Switches for matrix element corrections
*/
//@{
/**
* Any ME correction?
*/
bool MECOn() const {
return _hardEmission == 1;
}
/**
* Any hard ME correction?
*/
bool hardMEC() const {
return _hardEmission == 1 && (_meCorrMode == 1 || _meCorrMode == 2);
}
/**
* Any soft ME correction?
*/
bool softMEC() const {
return _hardEmission == 1 && (_meCorrMode == 1 || _meCorrMode > 2);
}
//@}
/**
* Is the truncated shower on?
*/
bool isTruncatedShowerON() const {return _trunc_Mode;}
/**
* Switch for intrinsic pT
*/
//@{
/**
* Any intrinsic pT?
*/
bool ipTon() const {
return _iptrms != ZERO || ( _beta == 1.0 && _gamma != ZERO && _iptmax !=ZERO );
}
//@}
/**@name Additional shower vetoes */
//@{
/**
* Insert a veto.
*/
void addVeto (ShowerVetoPtr v) { _vetoes.push_back(v); }
/**
* Remove a veto.
*/
void removeVeto (ShowerVetoPtr v) {
vector<ShowerVetoPtr>::iterator vit = find(_vetoes.begin(),_vetoes.end(),v);
if (vit != _vetoes.end())
_vetoes.erase(vit);
}
//@}
/**
* Switches for vetoing hard emissions
*/
//@{
/**
* Returns true if the hard veto read-in is to be applied to only
* the primary collision and false otherwise.
*/
bool hardVetoReadOption() const {return _hardVetoReadOption;}
//@}
/**
* Enhancement factors for radiation needed to generate the soft matrix
* element correction.
*/
//@{
/**
* Access the enhancement factor for initial-state radiation
*/
double initialStateRadiationEnhancementFactor() const { return _initialenhance; }
/**
* Access the enhancement factor for final-state radiation
*/
double finalStateRadiationEnhancementFactor() const { return _finalenhance; }
/**
* Set the enhancement factor for initial-state radiation
*/
void initialStateRadiationEnhancementFactor(double in) { _initialenhance=in; }
/**
* Set the enhancement factor for final-state radiation
*/
void finalStateRadiationEnhancementFactor(double in) { _finalenhance=in; }
//@}
/**
* Access to set/get the HardTree currently beinging showered
*/
//@{
/**
* The HardTree currently being showered
*/
tHardTreePtr hardTree() {return _hardtree;}
/**
* The HardTree currently being showered
*/
void hardTree(tHardTreePtr in) {_hardtree = in;}
//@}
/**
* Access/set the beam particle for the current initial-state shower
*/
//@{
/**
* Get the beam particle data
*/
Ptr<BeamParticleData>::const_pointer beamParticle() const { return _beam; }
/**
* Set the beam particle data
*/
void setBeamParticle(Ptr<BeamParticleData>::const_pointer in) { _beam=in; }
//@}
/**
* Set/Get the current tree being evolver for inheriting classes
*/
//@{
/**
* Get the tree
*/
tShowerTreePtr currentTree() { return _currenttree; }
/**
* Set the tree
*/
void currentTree(tShowerTreePtr tree) { _currenttree=tree; }
//@}
/**
* Access the maximum number of attempts to generate the shower
*/
unsigned int maximumTries() const { return _maxtry; }
/**
* Set/Get the ShowerProgenitor for the current shower
*/
//@{
/**
* Access the progenitor
*/
ShowerProgenitorPtr progenitor() { return _progenitor; }
/**
* Set the progenitor
*/
void progenitor(ShowerProgenitorPtr in) { _progenitor=in; }
//@}
/**
* Calculate the intrinsic \f$p_T\f$.
*/
virtual void generateIntrinsicpT(vector<ShowerProgenitorPtr>);
/**
* Access to the intrinsic \f$p_T\f$ for inheriting classes
*/
map<tShowerProgenitorPtr,pair<Energy,double> > & intrinsicpT() { return _intrinsic; }
/**
* find the maximally allowed pt acc to the hard process.
*/
void setupMaximumScales(const vector<ShowerProgenitorPtr> &,XCPtr);
/**
* find the relevant hard scales for profile scales.
*/
void setupHardScales(const vector<ShowerProgenitorPtr> &,XCPtr);
/**
* Convert the HardTree into an extra shower emission
*/
void convertHardTree(bool hard,ShowerInteraction type);
protected:
/**
* Find the parton extracted from the incoming particle after ISR
*/
PPtr findFirstParton(tPPtr seed) const;
/**
* Fix Remnant connections after ISR
*/
tPPair remakeRemnant(tPPair oldp);
protected:
/**
* Start the shower of a timelike particle
*/
virtual bool startTimeLikeShower(ShowerInteraction);
/**
* Update of the time-like stuff
*/
void updateHistory(tShowerParticlePtr particle);
/**
* Start the shower of a spacelike particle
*/
virtual bool startSpaceLikeShower(PPtr,ShowerInteraction);
/**
* Start the shower of a spacelike particle
*/
virtual bool
startSpaceLikeDecayShower(const ShowerParticle::EvolutionScales & maxScales,
Energy minimumMass,ShowerInteraction);
/**
* Select the branching for the next time-like emission
*/
Branching selectTimeLikeBranching(tShowerParticlePtr particle,
ShowerInteraction type,
HardBranchingPtr branch);
/**
* Select the branching for the next space-like emission in a decay
*/
Branching selectSpaceLikeDecayBranching(tShowerParticlePtr particle,
const ShowerParticle::EvolutionScales & maxScales,
Energy minmass,ShowerInteraction type,
HardBranchingPtr branch);
/**
* Create the timelike child of a branching
*/
ShowerParticleVector createTimeLikeChildren(tShowerParticlePtr particle,
IdList ids);
/**
* Vetos for the timelike shower
*/
virtual bool timeLikeVetoed(const Branching &,ShowerParticlePtr);
/**
* Vetos for the spacelike shower
*/
virtual bool spaceLikeVetoed(const Branching &,ShowerParticlePtr);
/**
* Vetos for the spacelike shower
*/
virtual bool spaceLikeDecayVetoed(const Branching &,ShowerParticlePtr);
/**
* Only generate the hard emission, for testing only.
*/
bool hardOnly() const {return _limitEmissions==3;}
/**
* Check the flags
*/
void checkFlags();
/**
*
*/
void addFSRUsingDecayPOWHEG(HardTreePtr ISRTree);
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/**
* The main method which manages the showering of a subprocess.
*/
virtual tPPair cascade(tSubProPtr sub, XCPtr xcomb);
/**
* Decay a ShowerTree
*/
void decay(ShowerTreePtr tree, ShowerDecayMap & decay);
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- QTildeShowerHandler & operator=(const QTildeShowerHandler &);
+ QTildeShowerHandler & operator=(const QTildeShowerHandler &) = delete;
private:
/**
* Stuff from the ShowerHandler
*/
//@{
/**
* The ShowerTree for the hard process
*/
ShowerTreePtr hard_;
/**
* The ShowerTree for the decays
*/
ShowerDecayMap decay_;
/**
* The ShowerTrees for which the initial shower
*/
vector<ShowerTreePtr> done_;
//@}
private :
/**
* Pointer to the splitting generator
*/
SplittingGeneratorPtr _splittingGenerator;
/**
* Maximum number of tries to generate the shower of a particular tree
*/
unsigned int _maxtry;
/**
* Matrix element correction switch
*/
unsigned int _meCorrMode;
/**
* Control of the reconstruction option
*/
unsigned int _reconOpt;
/**
* If hard veto pT scale is being read-in this determines
* whether the read-in value is applied to primary and
* secondary (MPI) scatters or just the primary one, with
* the usual computation of the veto being performed for
* the secondary (MPI) scatters.
*/
bool _hardVetoReadOption;
/**
* rms intrinsic pT of Gaussian distribution
*/
Energy _iptrms;
/**
* Proportion of inverse quadratic intrinsic pT distribution
*/
double _beta;
/**
* Parameter for inverse quadratic: 2*Beta*Gamma/(sqr(Gamma)+sqr(intrinsicpT))
*/
Energy _gamma;
/**
* Upper bound on intrinsic pT for inverse quadratic
*/
Energy _iptmax;
/**
* Limit the number of emissions for testing
*/
unsigned int _limitEmissions;
/**
* The progenitor of the current shower
*/
ShowerProgenitorPtr _progenitor;
/**
* Matrix element
*/
HwMEBasePtr _hardme;
/**
* Decayer
*/
HwDecayerBasePtr _decayme;
/**
* The ShowerTree currently being showered
*/
ShowerTreePtr _currenttree;
/**
* The HardTree currently being showered
*/
HardTreePtr _hardtree;
/**
* Radiation enhancement factors for use with the veto algorithm
* if needed by the soft matrix element correction
*/
//@{
/**
* Enhancement factor for initial-state radiation
*/
double _initialenhance;
/**
* Enhancement factor for final-state radiation
*/
double _finalenhance;
//@}
/**
* The beam particle data for the current initial-state shower
*/
Ptr<BeamParticleData>::const_pointer _beam;
/**
* Storage of the intrinsic \f$p_t\f$ of the particles
*/
map<tShowerProgenitorPtr,pair<Energy,double> > _intrinsic;
/**
* Vetoes
*/
vector<ShowerVetoPtr> _vetoes;
/**
* Full Shower Vetoes
*/
vector<FullShowerVetoPtr> _fullShowerVetoes;
/**
* Number of iterations for reweighting
*/
unsigned int _nReWeight;
/**
* Whether or not we are reweighting
*/
bool _reWeight;
/**
* number of IS emissions
*/
unsigned int _nis;
/**
* Number of FS emissions
*/
unsigned int _nfs;
/**
* The option for wqhich interactions to use
*/
ShowerInteraction interaction_;
/**
* Truncated shower switch
*/
bool _trunc_Mode;
/**
* Count of the number of truncated emissions
*/
unsigned int _truncEmissions;
/**
* Mode for the hard emissions
*/
int _hardEmission;
/**
* Option for the kernal for soft correlations
*/
unsigned int _softOpt;
/**
* Option for hard radiation in POWHEG events
*/
bool _hardPOWHEG;
/**
* True if no warnings about incorrect hard emission
* mode setting have been issued yet
*/
static bool _hardEmissionWarn;
/**
* True if no warnings about missing truncated shower
* have been issued yet
*/
static bool _missingTruncWarn;
/**
* The relevant hard scale to be used in the profile scales
*/
Energy muPt;
private:
/**
* Pointer to the various objects
*/
//@{
/**
* Pointer to the KinematicsReconstructor object
*/
KinematicsReconstructorPtr _reconstructor;
/**
* Pointer to the PartnerFinder object
*/
PartnerFinderPtr _partnerfinder;
//@}
};
}
#endif /* HERWIG_QTildeShowerHandler_H */
diff --git a/Shower/QTilde/SplittingFunctions/CMWHalfHalfOneSplitFn.h b/Shower/QTilde/SplittingFunctions/CMWHalfHalfOneSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/CMWHalfHalfOneSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/CMWHalfHalfOneSplitFn.h
@@ -1,158 +1,158 @@
// -*- C++ -*-
//
// CMWHalfHalfOneSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_CMWHalfHalfOneSplitFn_H
#define HERWIG_CMWHalfHalfOneSplitFn_H
//
// This is the declaration of the CMWHalfHalfOneSplitFn class.
//
#include "HalfHalfOneSplitFn.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class provides the concrete implementation
* of the CMW enhanced expressions for the
* splitting function for \f$\frac12\to q\frac12 1\f$.
*
* The kernel uses the same overestimate as the
* corresponding HalfHalfOneSplitFn and thus only needs to
* implement the spitting function and ratio to the overestimate.
*
* TODO: For a more efficient sampling one needs can rewrite the
* overestimation to contain the alpha_max*Kgmax factors.
*
* @see \ref CMWHalfHalfOneSplitFnInterfaces "The interfaces"
* defined for CMWHalfHalfOneSplitFn.
*/
class CMWHalfHalfOneSplitFn: public HalfHalfOneSplitFn {
public:
/**
* Methods to return the splitting function.
*/
//@{
/**
* Very similar to HalfHalfOneSplitFn.
* Here the kernel only contains the soft part multiplied by the
* alphas/2pi * Kg from
* Nucl.Phys. B349 (1991) 635-654
*
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* Very similar to HalfHalfOneSplitFn.
* Since we use only the 1/1-z part for overestimating the kernel
* in the first place we can keep the same overestimation related functions
* for the CMW kernels.
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* Return the correction term from:
* Nucl.Phys. B349 (1991) 635-654
*/
double Kg(Energy2 )const{
//TODO: Should be t-dependent
int Nf=5;//alpha_->Nf(t)
return (3.*(67./18.-1./6.*sqr(Constants::pi))-5./9.*Nf);
}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit(){
HalfHalfOneSplitFn::doinit();
};
//@}
private:
// Pointer to the alpha_s object in use.
ShowerAlphaPtr alpha_;
// Provide information if the kernel is used for initial state.
// as the pt definition contains an additional factor of z.
bool isIS_=false;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- CMWHalfHalfOneSplitFn & operator=(const CMWHalfHalfOneSplitFn &);
+ CMWHalfHalfOneSplitFn & operator=(const CMWHalfHalfOneSplitFn &) = delete;
};
}
#endif /* HERWIG_CMWHalfHalfOneSplitFn_H */
diff --git a/Shower/QTilde/SplittingFunctions/CMWOneOneOneSplitFn.h b/Shower/QTilde/SplittingFunctions/CMWOneOneOneSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/CMWOneOneOneSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/CMWOneOneOneSplitFn.h
@@ -1,154 +1,154 @@
// -*- C++ -*-
//
// CMWOneOneOneSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_CMWOneOneOneSplitFn_H
#define HERWIG_CMWOneOneOneSplitFn_H
//
// This is the declaration of the CMWOneOneOneSplitFn class.
//
#include "OneOneOneSplitFn.h"
#include "Herwig/Shower/ShowerAlpha.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class provides the concrete implementation
* of the CMW enhanced expressions for the
* splitting function for \f$1\to 11\f$.
*
* The kernel uses the same overestimate as the
* corresponding OneOneOneSplitFn and thus only needs to
* implement the spitting function and ratio to the overestimate.
*
* TODO: For a more efficient sampling one needs can rewrite the
* overestimation to contain the alpha_max*Kgmax factors.
*
* @see \ref CMWOneOneOneSplitFnInterfaces "The interfaces"
* defined for CMWOneOneOneSplitFn.
*/
class CMWOneOneOneSplitFn: public OneOneOneSplitFn {
public:
/**
* Methods to return the splitting function.
*/
//@{
/**
* Very similar to HalfHalfOneSplitFn.
* Here the kernel only contains the soft part multiplied by the
* alphas/2pi * Kg from
* Nucl.Phys. B349 (1991) 635-654
*
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* Very similar to HalfHalfOneSplitFn.
* Since we use only the 1/1-z part for overestimating the kernel
* in the first place we can keep the same overestimation related functions
* for the CMW kernels.
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* Return the correction term from:
* Nucl.Phys. B349 (1991) 635-654
*/
double Kg(Energy2 )const{
//TODO: Might be t-dependent
int Nf=5;//alpha_->Nf(t)
return (3.*(67./18.-1./6.*sqr(Constants::pi))-5./9.*Nf);
}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit(){
OneOneOneSplitFn::doinit();
};
//@}
private:
// Pointer to the alpha_s object in use.
ShowerAlphaPtr alpha_;
// Provide information if the kernel is used for initial state.
// as the pt definition contains an additional factor of z.
bool isIS_=false;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- CMWOneOneOneSplitFn & operator=(const CMWOneOneOneSplitFn &);
+ CMWOneOneOneSplitFn & operator=(const CMWOneOneOneSplitFn &) = delete;
};
}
#endif /* HERWIG_CMWOneOneOneSplitFn_H */
diff --git a/Shower/QTilde/SplittingFunctions/HalfHalfOneSplitFn.h b/Shower/QTilde/SplittingFunctions/HalfHalfOneSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/HalfHalfOneSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/HalfHalfOneSplitFn.h
@@ -1,183 +1,183 @@
// -*- C++ -*-
//
// HalfHalfOneSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HalfHalfOneSplitFn_H
#define HERWIG_HalfHalfOneSplitFn_H
//
// This is the declaration of the HalfHalfOneSplitFn class.
//
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
namespace Herwig {
using namespace ThePEG;
/**\ingroup Shower
*
* This class provides the concrete implementation of the exact leading-order
* splitting function for \f$\frac12\to q\frac12 1\f$.
*
* In this case the splitting function is given by
* \f[P(z,t) =C\left(\frac{1+z^2}{1-z}-2\frac{m^2_q}{t}\right),\f]
* where \f$C\f$ is the corresponding colour factor.
* Our choice for the overestimate is
* \f[P_{\rm over}(z) = \frac{2C}{1-z},\f]
* therefore the integral is
* \f[\int P_{\rm over}(z) {\rm d}z = -2C\ln(1-z),\f]
* and its inverse is
* \f[1-\exp\left(\frac{r}{2C}\right).\f]
*
* @see \ref HalfHalfOneSplitFnInterfaces "The interfaces"
* defined for HalfHalfOneSplitFn.
*/
class HalfHalfOneSplitFn: public SplittingFunction {
public:
/**
* Concrete implementation of the method to determine whether this splitting
* function can be used for a given set of particles.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual bool accept(const IdList & ids) const;
/**
* Methods to return the splitting function.
*/
//@{
/**
* The concrete implementation of the splitting function, \f$P(z,t)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the overestimate of the splitting function,
* \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual double overestimateP(const double z, const IdList & ids) const;
/**
* The concrete implementation of the
* the ratio of the splitting function to the overestimate, i.e.
* \f$P(z,t)/P_{\rm over}(z)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double integOverP(const double z, const IdList & ids,
unsigned int PDFfactor=0) const;
/**
* The concrete implementation of the inverse of the indefinite integral.
* @param r Value of the splitting function to be inverted
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor=0) const;
//@}
/**
* Method to calculate the azimuthal angle
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiForward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Method to calculate the azimuthal angle for backward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Calculate the matrix element for the splitting
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
*/
virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
const IdList & ids, const double phi, bool timeLike);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HalfHalfOneSplitFn & operator=(const HalfHalfOneSplitFn &);
+ HalfHalfOneSplitFn & operator=(const HalfHalfOneSplitFn &) = delete;
};
}
#endif /* HERWIG_HalfHalfOneSplitFn_H */
diff --git a/Shower/QTilde/SplittingFunctions/HalfOneHalfSplitFn.h b/Shower/QTilde/SplittingFunctions/HalfOneHalfSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/HalfOneHalfSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/HalfOneHalfSplitFn.h
@@ -1,183 +1,183 @@
// -*- C++ -*-
//
// HalfOneHalfSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_HalfOneHalfSplitFn_H
#define HERWIG_HalfOneHalfSplitFn_H
//
// This is the declaration of the HalfOneHalfSplitFn class.
//
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This classs provides the concrete implementation of the exact leading-order
* splitting function for \f$\frac12\to 1\frac12\f$.
*
* In this case the splitting function is given by
* \f[P(z,t) = C\left(\frac{2(1-z)+z^2}{z}-2\frac{m^2_q}t\right),\f]
* where \f$C\f$ is the corresponding colour factor.
* Our choice for the overestimate is
* \f[P_{\rm over}(z) = 2C\frac1z,\f]
* therefore the integral is
* \f[\int P_{\rm over}(z) {\rm d}z = 2C\ln z,\f]
* and its inverse is
* \f[\exp\left(\frac{r}{2C}\right).\f]
*
* @see SplittingFunction
*/
class HalfOneHalfSplitFn: public SplittingFunction {
public:
/**
* Concrete implementation of the method to determine whether this splitting
* function can be used for a given set of particles.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual bool accept(const IdList & ids) const;
/**
* Methods to return the splitting function.
*/
//@{
/**
* The concrete implementation of the splitting function, \f$P(z,t)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the overestimate of the splitting function,
* \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual double overestimateP(const double z, const IdList & ids) const;
/**
* The concrete implementation of the
* the ratio of the splitting function to the overestimate, i.e.
* \f$P(z,t)/P_{\rm over}(z)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double integOverP(const double z, const IdList & ids,
unsigned int PDFfactor=0) const;
/**
* The concrete implementation of the inverse of the indefinite integral.
* @param r Value of the splitting function to be inverted
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor=0) const;
//@}
/**
* Method to calculate the azimuthal angle for forward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiForward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Method to calculate the azimuthal angle for backward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Calculate the matrix element for the splitting
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
*/
virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
const IdList & ids, const double phi, bool timeLike);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HalfOneHalfSplitFn & operator=(const HalfOneHalfSplitFn &);
+ HalfOneHalfSplitFn & operator=(const HalfOneHalfSplitFn &) = delete;
};
}
#endif /* HERWIG_HalfOneHalfSplitFn_H */
diff --git a/Shower/QTilde/SplittingFunctions/OneHalfHalfSplitFn.h b/Shower/QTilde/SplittingFunctions/OneHalfHalfSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/OneHalfHalfSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/OneHalfHalfSplitFn.h
@@ -1,188 +1,188 @@
// -*- C++ -*-
//
// OneHalfHalfSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_OneHalfHalfSplitFn_H
#define HERWIG_OneHalfHalfSplitFn_H
//
// This is the declaration of the OneHalfHalfSplitFn class.
//
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
namespace Herwig {
using namespace ThePEG;
/**\ingroup Shower
*
* This class provides the concrete implementation of the exact leading-order
* splitting function for \f$1\to \frac12\frac12\f$.
*
* In this case the splitting function is given by
* \f[P(z,t) =C\left(1-2z(1-z)+2\frac{m_q^2}{t}\right),\f]
* where \f$C\f$ is the corresponding colour factor
* Our choice for the overestimate is
* \f[P_{\rm over}(z) = C,\f]
* therefore the integral is
* \f[\int P_{\rm over}(z) {\rm d}z =Cz,\f]
* and its inverse is
* \f[\frac{r}{C}\f]
*
* @see \ref OneHalfHalfSplitFnInterfaces "The interfaces"
* defined for OneHalfHalfSplitFn.
*/
class OneHalfHalfSplitFn: public SplittingFunction {
public:
/**
* Concrete implementation of the method to determine whether this splitting
* function can be used for a given set of particles.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual bool accept(const IdList & ids) const;
/**
* Methods to return the splitting function.
*/
//@{
/**
* The concrete implementation of the splitting function, \f$P\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the overestimate of the splitting function,
* \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual double overestimateP(const double z, const IdList & ids) const;
/**
* The concrete implementation of the
* the ratio of the splitting function to the overestimate, i.e.
* \f$P(z,\tilde{q}^2)/P_{\rm over}(z)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double integOverP(const double z, const IdList & ids,
unsigned int PDFfactor=0) const;
/**
* The concrete implementation of the inverse of the indefinite integral.
* @param r Value of the splitting function to be inverted
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor=0) const;
//@}
/**
* Method to calculate the azimuthal angle
* @param particle The particle which is branching
* @param showerkin The ShowerKinematics object
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiForward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Method to calculate the azimuthal angle
* @param particle The particle which is branching
* @param showerkin The ShowerKinematics object
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Calculate the matrix element for the splitting
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
*/
virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
const IdList & ids, const double phi, bool timeLike);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- OneHalfHalfSplitFn & operator=(const OneHalfHalfSplitFn &);
+ OneHalfHalfSplitFn & operator=(const OneHalfHalfSplitFn &) = delete;
};
}
#endif /* HERWIG_OneHalfHalfSplitFn_H */
diff --git a/Shower/QTilde/SplittingFunctions/OneOneOneMassiveSplitFn.h b/Shower/QTilde/SplittingFunctions/OneOneOneMassiveSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/OneOneOneMassiveSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/OneOneOneMassiveSplitFn.h
@@ -1,184 +1,184 @@
// -*- C++ -*-
//
// OneOneOneSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_OneOneOneMassiveSplitFn_H
#define HERWIG_OneOneOneMassiveSplitFn_H
//
// This is the declaration of the OneOneOneMassiveSplitFn class.
//
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class provides the concrete implementation of the exact leading-order
* splitting function for \f$1\to 11\f$ where the emitting particle is massi e
*
* In this case the splitting function is given by
* \f[P(z) =2C\left( \frac{z}{1-z}-\frac{m^2}{q^2-m^2}) +2\rho_{00]\frac{(1-z)^2m^2}{q^2-m^2} + (1-\rho_{00})\left(\frac{1-z}{z}+z(1-z)-\frac{(1-z)^2m^2}{q^2-m^2}\right)\right),\f]
* where \f$C=\f$ is the corresponding colour factor.
* Our choice for the overestimate is
* \f[P_{\rm over}(z) = 2C\left(\frac1z+\frac1{1-z}\right),\f]
* therefore the integral is
* \f[\int P_{\rm over}(z) {\rm d}z =2C\ln\left(\frac{z}{1-z}\right),\f]
* and its inverse is
* \f[\frac{\exp\left(\frac{r}{2C}\right)}{(1+\exp\left(\frac{r}{2C}\right)}\f]
*
*
* @see \ref OneOneOneMassiveSplitFnInterfaces "The interfaces"
* defined for OneOneOneMassiveSplitFn.
*/
class OneOneOneMassiveSplitFn: public SplittingFunction {
public:
/**
* Concrete implementation of the method to determine whether this splitting
* function can be used for a given set of particles.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual bool accept(const IdList & ids) const;
/**
* Methods to return the splitting function.
*/
//@{
/**
* The concrete implementation of the splitting function, \f$P(z,t)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the overestimate of the splitting function,
* \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual double overestimateP(const double z, const IdList & ids) const;
/**
* The concrete implementation of the
* the ratio of the splitting function to the overestimate, i.e.
* \f$P(z,t)/P_{\rm over}(z)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double integOverP(const double z, const IdList & ids,
unsigned int PDFfactor=0) const;
/**
* The concrete implementation of the inverse of the indefinite integral.
* @param r Value of the splitting function to be inverted
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor=0) const;
//@}
/**
* Method to calculate the azimuthal angle for forward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiForward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Method to calculate the azimuthal angle for backward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Calculate the matrix element for the splitting
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
*/
virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
const IdList & ids, const double phi, bool timeLike);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- OneOneOneMassiveSplitFn & operator=(const OneOneOneMassiveSplitFn &);
+ OneOneOneMassiveSplitFn & operator=(const OneOneOneMassiveSplitFn &) = delete;
};
}
#endif /* HERWIG_OneOneOneMassiveSplitFn_H */
diff --git a/Shower/QTilde/SplittingFunctions/OneOneOneSplitFn.h b/Shower/QTilde/SplittingFunctions/OneOneOneSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/OneOneOneSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/OneOneOneSplitFn.h
@@ -1,184 +1,184 @@
// -*- C++ -*-
//
// OneOneOneSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_OneOneOneSplitFn_H
#define HERWIG_OneOneOneSplitFn_H
//
// This is the declaration of the OneOneOneSplitFn class.
//
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class provides the concrete implementation of the exact leading-order
* splitting function for \f$1\to 11\f$.
*
* In this case the splitting function is given by
* \f[P(z) =2C*\left(\frac{z}{1-z}+\frac{1-z}{z}+z(1-z)\right),\f]
* where \f$C=\f$ is the corresponding colour factor.
* Our choice for the overestimate is
* \f[P_{\rm over}(z) = 2C\left(\frac1z+\frac1{1-z}\right),\f]
* therefore the integral is
* \f[\int P_{\rm over}(z) {\rm d}z =2C\ln\left(\frac{z}{1-z}\right),\f]
* and its inverse is
* \f[\frac{\exp\left(\frac{r}{2C}\right)}{(1+\exp\left(\frac{r}{2C}\right)}\f]
*
*
* @see \ref OneOneOneSplitFnInterfaces "The interfaces"
* defined for OneOneOneSplitFn.
*/
class OneOneOneSplitFn: public SplittingFunction {
public:
/**
* Concrete implementation of the method to determine whether this splitting
* function can be used for a given set of particles.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual bool accept(const IdList & ids) const;
/**
* Methods to return the splitting function.
*/
//@{
/**
* The concrete implementation of the splitting function, \f$P(z,t)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the overestimate of the splitting function,
* \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual double overestimateP(const double z, const IdList & ids) const;
/**
* The concrete implementation of the
* the ratio of the splitting function to the overestimate, i.e.
* \f$P(z,t)/P_{\rm over}(z)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
* @param rho The spin density matrix
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double integOverP(const double z, const IdList & ids,
unsigned int PDFfactor=0) const;
/**
* The concrete implementation of the inverse of the indefinite integral.
* @param r Value of the splitting function to be inverted
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor=0) const;
//@}
/**
* Method to calculate the azimuthal angle for forward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiForward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Method to calculate the azimuthal angle for backward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Calculate the matrix element for the splitting
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
*/
virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
const IdList & ids, const double phi, bool timeLike);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- OneOneOneSplitFn & operator=(const OneOneOneSplitFn &);
+ OneOneOneSplitFn & operator=(const OneOneOneSplitFn &) = delete;
};
}
#endif /* HERWIG_OneOneOneSplitFn_H */
diff --git a/Shower/QTilde/SplittingFunctions/SplittingFunction.cc b/Shower/QTilde/SplittingFunctions/SplittingFunction.cc
--- a/Shower/QTilde/SplittingFunctions/SplittingFunction.cc
+++ b/Shower/QTilde/SplittingFunctions/SplittingFunction.cc
@@ -1,891 +1,900 @@
// -*- C++ -*-
//
// SplittingFunction.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SplittingFunction class.
//
#include "SplittingFunction.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Utilities/EnumIO.h"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
#include "ThePEG/Utilities/DescribeClass.h"
using namespace Herwig;
DescribeAbstractClass<SplittingFunction,Interfaced>
describeSplittingFunction ("Herwig::SplittingFunction","");
void SplittingFunction::Init() {
static ClassDocumentation<SplittingFunction> documentation
("The SplittingFunction class is the based class for 1->2 splitting functions"
" in Herwig");
static Switch<SplittingFunction,ColourStructure> interfaceColourStructure
("ColourStructure",
"The colour structure for the splitting function",
&SplittingFunction::_colourStructure, Undefined, false, false);
static SwitchOption interfaceColourStructureTripletTripletOctet
(interfaceColourStructure,
"TripletTripletOctet",
"3 -> 3 8",
TripletTripletOctet);
static SwitchOption interfaceColourStructureOctetOctetOctet
(interfaceColourStructure,
"OctetOctetOctet",
"8 -> 8 8",
OctetOctetOctet);
static SwitchOption interfaceColourStructureOctetTripletTriplet
(interfaceColourStructure,
"OctetTripletTriplet",
"8 -> 3 3bar",
OctetTripletTriplet);
static SwitchOption interfaceColourStructureTripletOctetTriplet
(interfaceColourStructure,
"TripletOctetTriplet",
"3 -> 8 3",
TripletOctetTriplet);
static SwitchOption interfaceColourStructureSextetSextetOctet
(interfaceColourStructure,
"SextetSextetOctet",
"6 -> 6 8",
SextetSextetOctet);
static SwitchOption interfaceColourStructureChargedChargedNeutral
(interfaceColourStructure,
"ChargedChargedNeutral",
"q -> q 0",
ChargedChargedNeutral);
static SwitchOption interfaceColourStructureNeutralChargedCharged
(interfaceColourStructure,
"NeutralChargedCharged",
"0 -> q qbar",
NeutralChargedCharged);
static SwitchOption interfaceColourStructureChargedNeutralCharged
(interfaceColourStructure,
"ChargedNeutralCharged",
"q -> 0 q",
ChargedNeutralCharged);
static Switch<SplittingFunction,ShowerInteraction>
interfaceInteractionType
("InteractionType",
"Type of the interaction",
&SplittingFunction::_interactionType,
ShowerInteraction::UNDEFINED, false, false);
static SwitchOption interfaceInteractionTypeQCD
(interfaceInteractionType,
"QCD","QCD",ShowerInteraction::QCD);
static SwitchOption interfaceInteractionTypeQED
(interfaceInteractionType,
"QED","QED",ShowerInteraction::QED);
static Switch<SplittingFunction,bool> interfaceAngularOrdered
("AngularOrdered",
"Whether or not this interaction is angular ordered, "
"normally only g->q qbar and gamma-> f fbar are the only ones which aren't.",
&SplittingFunction::angularOrdered_, true, false, false);
static SwitchOption interfaceAngularOrderedYes
(interfaceAngularOrdered,
"Yes",
"Interaction is angular ordered",
true);
static SwitchOption interfaceAngularOrderedNo
(interfaceAngularOrdered,
"No",
"Interaction isn't angular ordered",
false);
static Switch<SplittingFunction,unsigned int> interfaceScaleChoice
("ScaleChoice",
"The scale choice to be used",
&SplittingFunction::scaleChoice_, 2, false, false);
static SwitchOption interfaceScaleChoicepT
(interfaceScaleChoice,
"pT",
"pT of the branching",
0);
static SwitchOption interfaceScaleChoiceQ2
(interfaceScaleChoice,
"Q2",
"Q2 of the branching",
1);
static SwitchOption interfaceScaleChoiceFromAngularOrdering
(interfaceScaleChoice,
"FromAngularOrdering",
"If angular order use pT, otherwise Q2",
2);
}
void SplittingFunction::persistentOutput(PersistentOStream & os) const {
os << oenum(_interactionType)
<< oenum(_colourStructure) << _colourFactor
- << angularOrdered_ << scaleChoice_;
+ << angularOrdered_ << scaleChoice_ << strictAO_;
}
void SplittingFunction::persistentInput(PersistentIStream & is, int) {
is >> ienum(_interactionType)
>> ienum(_colourStructure) >> _colourFactor
- >> angularOrdered_ >> scaleChoice_;
+ >> angularOrdered_ >> scaleChoice_ >> strictAO_;
}
void SplittingFunction::colourConnection(tShowerParticlePtr parent,
tShowerParticlePtr first,
tShowerParticlePtr second,
ShowerPartnerType partnerType,
const bool back) const {
if(_colourStructure==TripletTripletOctet) {
if(!back) {
ColinePair cparent = ColinePair(parent->colourLine(),
parent->antiColourLine());
// ensure input consistency
assert(( cparent.first && !cparent.second &&
partnerType==ShowerPartnerType::QCDColourLine) ||
( !cparent.first && cparent.second &&
partnerType==ShowerPartnerType::QCDAntiColourLine));
// q -> q g
if(cparent.first) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(second);
newline->addColoured ( first);
newline->addAntiColoured (second);
}
// qbar -> qbar g
else {
ColinePtr newline=new_ptr(ColourLine());
cparent.second->addAntiColoured(second);
newline->addColoured(second);
newline->addAntiColoured(first);
}
// Set progenitor
first->progenitor(parent->progenitor());
second->progenitor(parent->progenitor());
}
else {
ColinePair cfirst = ColinePair(first->colourLine(),
first->antiColourLine());
// ensure input consistency
assert(( cfirst.first && !cfirst.second &&
partnerType==ShowerPartnerType::QCDColourLine) ||
( !cfirst.first && cfirst.second &&
partnerType==ShowerPartnerType::QCDAntiColourLine));
// q -> q g
if(cfirst.first) {
ColinePtr newline=new_ptr(ColourLine());
cfirst.first->addAntiColoured(second);
newline->addColoured(second);
newline->addColoured(parent);
}
// qbar -> qbar g
else {
ColinePtr newline=new_ptr(ColourLine());
cfirst.second->addColoured(second);
newline->addAntiColoured(second);
newline->addAntiColoured(parent);
}
// Set progenitor
parent->progenitor(first->progenitor());
second->progenitor(first->progenitor());
}
}
else if(_colourStructure==OctetOctetOctet) {
if(!back) {
ColinePair cparent = ColinePair(parent->colourLine(),
parent->antiColourLine());
// ensure input consistency
assert(cparent.first&&cparent.second);
// ensure first gluon is hardest
if( first->id()==second->id() && parent->showerKinematics()->z()<0.5 )
swap(first,second);
// colour line radiates
if(partnerType==ShowerPartnerType::QCDColourLine) {
// The colour line is radiating
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(second);
cparent.second->addAntiColoured(first);
newline->addColoured(first);
newline->addAntiColoured(second);
}
// anti colour line radiates
else if(partnerType==ShowerPartnerType::QCDAntiColourLine) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(first);
cparent.second->addAntiColoured(second);
newline->addColoured(second);
newline->addAntiColoured(first);
}
else
assert(false);
}
else {
ColinePair cfirst = ColinePair(first->colourLine(),
first->antiColourLine());
// ensure input consistency
assert(cfirst.first&&cfirst.second);
// The colour line is radiating
if(partnerType==ShowerPartnerType::QCDColourLine) {
ColinePtr newline=new_ptr(ColourLine());
cfirst.first->addAntiColoured(second);
cfirst.second->addAntiColoured(parent);
newline->addColoured(parent);
newline->addColoured(second);
}
// anti colour line radiates
else if(partnerType==ShowerPartnerType::QCDAntiColourLine) {
ColinePtr newline=new_ptr(ColourLine());
cfirst.first->addColoured(parent);
cfirst.second->addColoured(second);
newline->addAntiColoured(second);
newline->addAntiColoured(parent);
}
else
assert(false);
}
}
else if(_colourStructure == OctetTripletTriplet) {
if(!back) {
ColinePair cparent = ColinePair(parent->colourLine(),
parent->antiColourLine());
// ensure input consistency
assert(cparent.first&&cparent.second);
cparent.first ->addColoured ( first);
cparent.second->addAntiColoured(second);
// Set progenitor
first->progenitor(parent->progenitor());
second->progenitor(parent->progenitor());
}
else {
ColinePair cfirst = ColinePair(first->colourLine(),
first->antiColourLine());
// ensure input consistency
assert(( cfirst.first && !cfirst.second) ||
(!cfirst.first && cfirst.second));
// g -> q qbar
if(cfirst.first) {
ColinePtr newline=new_ptr(ColourLine());
cfirst.first->addColoured(parent);
newline->addAntiColoured(second);
newline->addAntiColoured(parent);
}
// g -> qbar q
else {
ColinePtr newline=new_ptr(ColourLine());
cfirst.second->addAntiColoured(parent);
newline->addColoured(second);
newline->addColoured(parent);
}
// Set progenitor
parent->progenitor(first->progenitor());
second->progenitor(first->progenitor());
}
}
else if(_colourStructure == TripletOctetTriplet) {
if(!back) {
ColinePair cparent = ColinePair(parent->colourLine(),
parent->antiColourLine());
// ensure input consistency
assert(( cparent.first && !cparent.second) ||
(!cparent.first && cparent.second));
// q -> g q
if(cparent.first) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(first);
newline->addColoured (second);
newline->addAntiColoured( first);
}
// qbar -> g qbar
else {
ColinePtr newline=new_ptr(ColourLine());
cparent.second->addAntiColoured(first);
newline->addColoured ( first);
newline->addAntiColoured(second);
}
// Set progenitor
first->progenitor(parent->progenitor());
second->progenitor(parent->progenitor());
}
else {
ColinePair cfirst = ColinePair(first->colourLine(),
first->antiColourLine());
// ensure input consistency
assert(cfirst.first&&cfirst.second);
// q -> g q
if(parent->id()>0) {
cfirst.first ->addColoured(parent);
cfirst.second->addColoured(second);
}
else {
cfirst.first ->addAntiColoured(second);
cfirst.second->addAntiColoured(parent);
}
// Set progenitor
parent->progenitor(first->progenitor());
second->progenitor(first->progenitor());
}
}
else if(_colourStructure==SextetSextetOctet) {
//make sure we're not doing backward evolution
assert(!back);
//make sure something sensible
assert(parent->colourLine() || parent->antiColourLine());
//get the colour lines or anti-colour lines
bool isAntiColour=true;
ColinePair cparent;
if(parent->colourLine()) {
cparent = ColinePair(const_ptr_cast<tColinePtr>(parent->colourInfo()->colourLines()[0]),
const_ptr_cast<tColinePtr>(parent->colourInfo()->colourLines()[1]));
isAntiColour=false;
}
else {
cparent = ColinePair(const_ptr_cast<tColinePtr>(parent->colourInfo()->antiColourLines()[0]),
const_ptr_cast<tColinePtr>(parent->colourInfo()->antiColourLines()[1]));
}
//check for sensible input
// assert(cparent.first && cparent.second);
// sextet has 2 colour lines
if(!isAntiColour) {
//pick at random which of the colour topolgies to take
double topology = UseRandom::rnd();
if(topology < 0.25) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(second);
cparent.second->addColoured(first);
newline->addColoured(first);
newline->addAntiColoured(second);
}
else if(topology >=0.25 && topology < 0.5) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(first);
cparent.second->addColoured(second);
newline->addColoured(first);
newline->addAntiColoured(second);
}
else if(topology >= 0.5 && topology < 0.75) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(second);
cparent.second->addColoured(first);
newline->addColoured(first);
newline->addAntiColoured(second);
}
else {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addColoured(first);
cparent.second->addColoured(second);
newline->addColoured(first);
newline->addAntiColoured(second);
}
}
// sextet has 2 anti-colour lines
else {
double topology = UseRandom::rnd();
if(topology < 0.25){
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addAntiColoured(second);
cparent.second->addAntiColoured(first);
newline->addAntiColoured(first);
newline->addColoured(second);
}
else if(topology >=0.25 && topology < 0.5) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addAntiColoured(first);
cparent.second->addAntiColoured(second);
newline->addAntiColoured(first);
newline->addColoured(second);
}
else if(topology >= 0.5 && topology < 0.75) {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addAntiColoured(second);
cparent.second->addAntiColoured(first);
newline->addAntiColoured(first);
newline->addColoured(second);
}
else {
ColinePtr newline=new_ptr(ColourLine());
cparent.first->addAntiColoured(first);
cparent.second->addAntiColoured(second);
newline->addAntiColoured(first);
newline->addColoured(second);
}
}
}
else if(_colourStructure == ChargedChargedNeutral) {
if(!parent->data().coloured()) return;
if(!back) {
ColinePair cparent = ColinePair(parent->colourLine(),
parent->antiColourLine());
// q -> q g
if(cparent.first) {
cparent.first->addColoured(first);
}
// qbar -> qbar g
if(cparent.second) {
cparent.second->addAntiColoured(first);
}
}
else {
ColinePair cfirst = ColinePair(first->colourLine(),
first->antiColourLine());
// q -> q g
if(cfirst.first) {
cfirst.first->addColoured(parent);
}
// qbar -> qbar g
if(cfirst.second) {
cfirst.second->addAntiColoured(parent);
}
}
}
else if(_colourStructure == ChargedNeutralCharged) {
if(!parent->data().coloured()) return;
if(!back) {
ColinePair cparent = ColinePair(parent->colourLine(),
parent->antiColourLine());
// q -> q g
if(cparent.first) {
cparent.first->addColoured(second);
}
// qbar -> qbar g
if(cparent.second) {
cparent.second->addAntiColoured(second);
}
}
else {
if (second->dataPtr()->iColour()==PDT::Colour3 ) {
ColinePtr newline=new_ptr(ColourLine());
newline->addColoured(second);
newline->addColoured(parent);
}
else if (second->dataPtr()->iColour()==PDT::Colour3bar ) {
ColinePtr newline=new_ptr(ColourLine());
newline->addAntiColoured(second);
newline->addAntiColoured(parent);
}
}
}
else if(_colourStructure == NeutralChargedCharged ) {
if(!back) {
if(first->dataPtr()->coloured()) {
ColinePtr newline=new_ptr(ColourLine());
if(first->dataPtr()->iColour()==PDT::Colour3) {
newline->addColoured (first );
newline->addAntiColoured(second);
}
else if (first->dataPtr()->iColour()==PDT::Colour3bar) {
newline->addColoured (second);
newline->addAntiColoured(first );
}
else
assert(false);
}
}
else {
ColinePair cfirst = ColinePair(first->colourLine(),
first->antiColourLine());
// gamma -> q qbar
if(cfirst.first) {
cfirst.first->addAntiColoured(second);
}
// gamma -> qbar q
else if(cfirst.second) {
cfirst.second->addColoured(second);
}
else
assert(false);
}
}
else {
assert(false);
}
}
void SplittingFunction::doinit() {
Interfaced::doinit();
assert(_interactionType!=ShowerInteraction::UNDEFINED);
assert((_colourStructure>0&&_interactionType==ShowerInteraction::QCD) ||
(_colourStructure<0&&_interactionType==ShowerInteraction::QED) );
if(_colourFactor>0.) return;
// compute the colour factors if need
if(_colourStructure==TripletTripletOctet) {
_colourFactor = 4./3.;
}
else if(_colourStructure==OctetOctetOctet) {
_colourFactor = 3.;
}
else if(_colourStructure==OctetTripletTriplet) {
_colourFactor = 0.5;
}
else if(_colourStructure==TripletOctetTriplet) {
_colourFactor = 4./3.;
}
else if(_colourStructure==SextetSextetOctet) {
_colourFactor = 10./3.;
}
else if(_colourStructure<0) {
_colourFactor = 1.;
}
else {
assert(false);
}
}
bool SplittingFunction::checkColours(const IdList & ids) const {
if(_colourStructure==TripletTripletOctet) {
if(ids[0]!=ids[1]) return false;
if((ids[0]->iColour()==PDT::Colour3||ids[0]->iColour()==PDT::Colour3bar) &&
ids[2]->iColour()==PDT::Colour8) return true;
return false;
}
else if(_colourStructure==OctetOctetOctet) {
for(unsigned int ix=0;ix<3;++ix) {
if(ids[ix]->iColour()!=PDT::Colour8) return false;
}
return true;
}
else if(_colourStructure==OctetTripletTriplet) {
if(ids[0]->iColour()!=PDT::Colour8) return false;
if(ids[1]->iColour()==PDT::Colour3&&ids[2]->iColour()==PDT::Colour3bar)
return true;
if(ids[1]->iColour()==PDT::Colour3bar&&ids[2]->iColour()==PDT::Colour3)
return true;
return false;
}
else if(_colourStructure==TripletOctetTriplet) {
if(ids[0]!=ids[2]) return false;
if((ids[0]->iColour()==PDT::Colour3||ids[0]->iColour()==PDT::Colour3bar) &&
ids[1]->iColour()==PDT::Colour8) return true;
return false;
}
else if(_colourStructure==SextetSextetOctet) {
if(ids[0]!=ids[1]) return false;
if((ids[0]->iColour()==PDT::Colour6 || ids[0]->iColour()==PDT::Colour6bar) &&
ids[2]->iColour()==PDT::Colour8) return true;
return false;
}
else if(_colourStructure==ChargedChargedNeutral) {
if(ids[0]!=ids[1]) return false;
if(ids[2]->iCharge()!=0) return false;
if(ids[0]->iCharge()==ids[1]->iCharge()) return true;
return false;
}
else if(_colourStructure==ChargedNeutralCharged) {
if(ids[0]!=ids[2]) return false;
if(ids[1]->iCharge()!=0) return false;
if(ids[0]->iCharge()==ids[2]->iCharge()) return true;
return false;
}
else if(_colourStructure==NeutralChargedCharged) {
if(ids[1]->id()!=-ids[2]->id()) return false;
if(ids[0]->iCharge()!=0) return false;
if(ids[1]->iCharge()==-ids[2]->iCharge()) return true;
return false;
}
else {
assert(false);
}
return false;
}
namespace {
bool hasColour(tPPtr p) {
PDT::Colour colour = p->dataPtr()->iColour();
return colour==PDT::Colour3 || colour==PDT::Colour8 || colour == PDT::Colour6;
}
bool hasAntiColour(tPPtr p) {
PDT::Colour colour = p->dataPtr()->iColour();
return colour==PDT::Colour3bar || colour==PDT::Colour8 || colour == PDT::Colour6bar;
}
}
void SplittingFunction::evaluateFinalStateScales(ShowerPartnerType partnerType,
Energy scale, double z,
tShowerParticlePtr parent,
tShowerParticlePtr emitter,
tShowerParticlePtr emitted) {
// identify emitter and emitted
double zEmitter = z, zEmitted = 1.-z;
bool bosonSplitting(false);
// special for g -> gg, particle highest z is emitter
if(emitter->id() == emitted->id() && emitter->id() == parent->id() &&
zEmitted > zEmitter) {
swap(zEmitted,zEmitter);
swap( emitted, emitter);
}
// otherwise if particle ID same
else if(emitted->id()==parent->id()) {
swap(zEmitted,zEmitter);
swap( emitted, emitter);
}
// no real emitter/emitted
else if(emitter->id()!=parent->id()) {
bosonSplitting = true;
}
// may need to add angularOrder flag here
// now the various scales
// QED
if(partnerType==ShowerPartnerType::QED) {
assert(colourStructure()==ChargedChargedNeutral ||
colourStructure()==ChargedNeutralCharged ||
colourStructure()==NeutralChargedCharged );
// normal case
if(!bosonSplitting) {
assert(colourStructure()==ChargedChargedNeutral ||
colourStructure()==ChargedNeutralCharged );
// set the scales
// emitter
emitter->scales().QED = zEmitter*scale;
emitter->scales().QED_noAO = scale;
- emitter->scales().QCD_c = min(scale,parent->scales().QCD_c );
+ if(strictAO_)
+ emitter->scales().QCD_c = min(zEmitter*scale,parent->scales().QCD_c );
+ else
+ emitter->scales().QCD_c = min( scale,parent->scales().QCD_c );
emitter->scales().QCD_c_noAO = min(scale,parent->scales().QCD_c_noAO );
- emitter->scales().QCD_ac = min(scale,parent->scales().QCD_ac );
+ if(strictAO_)
+ emitter->scales().QCD_ac = min(zEmitter*scale,parent->scales().QCD_ac );
+ else
+ emitter->scales().QCD_ac = min( scale,parent->scales().QCD_ac );
emitter->scales().QCD_ac_noAO = min(scale,parent->scales().QCD_ac_noAO);
// emitted
emitted->scales().QED = zEmitted*scale;
emitted->scales().QED_noAO = scale;
emitted->scales().QCD_c = ZERO;
emitted->scales().QCD_c_noAO = ZERO;
emitted->scales().QCD_ac = ZERO;
emitted->scales().QCD_ac_noAO = ZERO;
}
// gamma -> f fbar
else {
assert(colourStructure()==NeutralChargedCharged );
// emitter
emitter->scales().QED = zEmitter*scale;
emitter->scales().QED_noAO = scale;
if(hasColour(emitter)) {
emitter->scales().QCD_c = zEmitter*scale;
emitter->scales().QCD_c_noAO = scale;
}
if(hasAntiColour(emitter)) {
emitter->scales().QCD_ac = zEmitter*scale;
emitter->scales().QCD_ac_noAO = scale;
}
// emitted
emitted->scales().QED = zEmitted*scale;
emitted->scales().QED_noAO = scale;
if(hasColour(emitted)) {
emitted->scales().QCD_c = zEmitted*scale;
emitted->scales().QCD_c_noAO = scale;
}
if(hasAntiColour(emitted)) {
emitted->scales().QCD_ac = zEmitted*scale;
emitted->scales().QCD_ac_noAO = scale;
}
}
}
// QCD
else {
// normal case eg q -> q g and g -> g g
if(!bosonSplitting) {
- emitter->scales().QED = min(scale,parent->scales().QED );
+ if(strictAO_)
+ emitter->scales().QED = min(zEmitter*scale,parent->scales().QED );
+ else
+ emitter->scales().QED = min( scale,parent->scales().QED );
emitter->scales().QED_noAO = min(scale,parent->scales().QED_noAO);
if(partnerType==ShowerPartnerType::QCDColourLine) {
emitter->scales().QCD_c = zEmitter*scale;
emitter->scales().QCD_c_noAO = scale;
emitter->scales().QCD_ac = min(zEmitter*scale,parent->scales().QCD_ac );
emitter->scales().QCD_ac_noAO = min( scale,parent->scales().QCD_ac_noAO);
}
else {
emitter->scales().QCD_c = min(zEmitter*scale,parent->scales().QCD_c );
emitter->scales().QCD_c_noAO = min( scale,parent->scales().QCD_c_noAO );
emitter->scales().QCD_ac = zEmitter*scale;
emitter->scales().QCD_ac_noAO = scale;
}
// emitted
emitted->scales().QED = ZERO;
emitted->scales().QED_noAO = ZERO;
emitted->scales().QCD_c = zEmitted*scale;
emitted->scales().QCD_c_noAO = scale;
emitted->scales().QCD_ac = zEmitted*scale;
emitted->scales().QCD_ac_noAO = scale;
}
// g -> q qbar
else {
// emitter
if(emitter->dataPtr()->charged()) {
emitter->scales().QED = zEmitter*scale;
emitter->scales().QED_noAO = scale;
}
emitter->scales().QCD_c = zEmitter*scale;
emitter->scales().QCD_c_noAO = scale;
emitter->scales().QCD_ac = zEmitter*scale;
emitter->scales().QCD_ac_noAO = scale;
// emitted
if(emitted->dataPtr()->charged()) {
emitted->scales().QED = zEmitted*scale;
emitted->scales().QED_noAO = scale;
}
emitted->scales().QCD_c = zEmitted*scale;
emitted->scales().QCD_c_noAO = scale;
emitted->scales().QCD_ac = zEmitted*scale;
emitted->scales().QCD_ac_noAO = scale;
}
}
}
void SplittingFunction::evaluateInitialStateScales(ShowerPartnerType partnerType,
Energy scale, double z,
tShowerParticlePtr parent,
tShowerParticlePtr spacelike,
tShowerParticlePtr timelike) {
// scale for time-like child
Energy AOScale = (1.-z)*scale;
// QED
if(partnerType==ShowerPartnerType::QED) {
if(parent->id()==spacelike->id()) {
// parent
parent ->scales().QED = scale;
parent ->scales().QED_noAO = scale;
parent ->scales().QCD_c = min(scale,spacelike->scales().QCD_c );
parent ->scales().QCD_c_noAO = min(scale,spacelike->scales().QCD_c_noAO );
parent ->scales().QCD_ac = min(scale,spacelike->scales().QCD_ac );
parent ->scales().QCD_ac_noAO = min(scale,spacelike->scales().QCD_ac_noAO);
// timelike
timelike->scales().QED = AOScale;
timelike->scales().QED_noAO = scale;
timelike->scales().QCD_c = ZERO;
timelike->scales().QCD_c_noAO = ZERO;
timelike->scales().QCD_ac = ZERO;
timelike->scales().QCD_ac_noAO = ZERO;
}
else if(parent->id()==timelike->id()) {
parent ->scales().QED = scale;
parent ->scales().QED_noAO = scale;
if(hasColour(parent)) {
parent ->scales().QCD_c = scale;
parent ->scales().QCD_c_noAO = scale;
}
if(hasAntiColour(parent)) {
parent ->scales().QCD_ac = scale;
parent ->scales().QCD_ac_noAO = scale;
}
// timelike
timelike->scales().QED = AOScale;
timelike->scales().QED_noAO = scale;
if(hasColour(timelike)) {
timelike->scales().QCD_c = AOScale;
timelike->scales().QCD_c_noAO = scale;
}
if(hasAntiColour(timelike)) {
timelike->scales().QCD_ac = AOScale;
timelike->scales().QCD_ac_noAO = scale;
}
}
else {
parent ->scales().QED = scale;
parent ->scales().QED_noAO = scale;
parent ->scales().QCD_c = ZERO ;
parent ->scales().QCD_c_noAO = ZERO ;
parent ->scales().QCD_ac = ZERO ;
parent ->scales().QCD_ac_noAO = ZERO ;
// timelike
timelike->scales().QED = AOScale;
timelike->scales().QED_noAO = scale;
if(hasColour(timelike)) {
timelike->scales().QCD_c = min(AOScale,spacelike->scales().QCD_ac );
timelike->scales().QCD_c_noAO = min( scale,spacelike->scales().QCD_ac_noAO);
}
if(hasAntiColour(timelike)) {
timelike->scales().QCD_ac = min(AOScale,spacelike->scales().QCD_c );
timelike->scales().QCD_ac_noAO = min( scale,spacelike->scales().QCD_c_noAO );
}
}
}
// QCD
else {
// timelike
if(timelike->dataPtr()->charged()) {
timelike->scales().QED = AOScale;
timelike->scales().QED_noAO = scale;
}
if(hasColour(timelike)) {
timelike->scales().QCD_c = AOScale;
timelike->scales().QCD_c_noAO = scale;
}
if(hasAntiColour(timelike)) {
timelike->scales().QCD_ac = AOScale;
timelike->scales().QCD_ac_noAO = scale;
}
if(parent->id()==spacelike->id()) {
parent ->scales().QED = min(scale,spacelike->scales().QED );
parent ->scales().QED_noAO = min(scale,spacelike->scales().QED_noAO );
parent ->scales().QCD_c = min(scale,spacelike->scales().QCD_c );
parent ->scales().QCD_c_noAO = min(scale,spacelike->scales().QCD_c_noAO );
parent ->scales().QCD_ac = min(scale,spacelike->scales().QCD_ac );
parent ->scales().QCD_ac_noAO = min(scale,spacelike->scales().QCD_ac_noAO);
}
else {
if(parent->dataPtr()->charged()) {
parent ->scales().QED = scale;
parent ->scales().QED_noAO = scale;
}
if(hasColour(parent)) {
parent ->scales().QCD_c = scale;
parent ->scales().QCD_c_noAO = scale;
}
if(hasAntiColour(parent)) {
parent ->scales().QCD_ac = scale;
parent ->scales().QCD_ac_noAO = scale;
}
}
}
}
void SplittingFunction::evaluateDecayScales(ShowerPartnerType partnerType,
Energy scale, double z,
tShowerParticlePtr parent,
tShowerParticlePtr spacelike,
tShowerParticlePtr timelike) {
assert(parent->id()==spacelike->id());
// angular-ordered scale for 2nd child
Energy AOScale = (1.-z)*scale;
// QED
if(partnerType==ShowerPartnerType::QED) {
// timelike
timelike->scales().QED = AOScale;
timelike->scales().QED_noAO = scale;
timelike->scales().QCD_c = ZERO;
timelike->scales().QCD_c_noAO = ZERO;
timelike->scales().QCD_ac = ZERO;
timelike->scales().QCD_ac_noAO = ZERO;
// spacelike
spacelike->scales().QED = scale;
spacelike->scales().QED_noAO = scale;
}
// QCD
else {
// timelike
timelike->scales().QED = ZERO;
timelike->scales().QED_noAO = ZERO;
timelike->scales().QCD_c = AOScale;
timelike->scales().QCD_c_noAO = scale;
timelike->scales().QCD_ac = AOScale;
timelike->scales().QCD_ac_noAO = scale;
// spacelike
spacelike->scales().QED = max(scale,parent->scales().QED );
spacelike->scales().QED_noAO = max(scale,parent->scales().QED_noAO );
}
spacelike->scales().QCD_c = max(scale,parent->scales().QCD_c );
spacelike->scales().QCD_c_noAO = max(scale,parent->scales().QCD_c_noAO );
spacelike->scales().QCD_ac = max(scale,parent->scales().QCD_ac );
spacelike->scales().QCD_ac_noAO = max(scale,parent->scales().QCD_ac_noAO);
}
diff --git a/Shower/QTilde/SplittingFunctions/SplittingFunction.h b/Shower/QTilde/SplittingFunctions/SplittingFunction.h
--- a/Shower/QTilde/SplittingFunctions/SplittingFunction.h
+++ b/Shower/QTilde/SplittingFunctions/SplittingFunction.h
@@ -1,377 +1,382 @@
// -*- C++ -*-
//
// SplittingFunction.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SplittingFunction_H
#define HERWIG_SplittingFunction_H
//
// This is the declaration of the SplittingFunction class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "Herwig/Shower/QTilde/ShowerConfig.h"
#include "ThePEG/EventRecord/RhoDMatrix.h"
#include "Herwig/Decay/DecayMatrixElement.h"
#include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.fh"
#include "ThePEG/EventRecord/ColourLine.h"
#include "ThePEG/PDT/ParticleData.h"
#include "SplittingFunction.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
* Enum to define the possible types of colour structure which can occur in
* the branching.
*/
enum ColourStructure {Undefined=0,
TripletTripletOctet = 1,OctetOctetOctet =2,
OctetTripletTriplet = 3,TripletOctetTriplet=4,
SextetSextetOctet = 5,
ChargedChargedNeutral=-1,ChargedNeutralCharged=-2,
NeutralChargedCharged=-3};
/** \ingroup Shower
*
* This is an abstract class which defines the common interface
* for all \f$1\to2\f$ splitting functions, for both initial-state
* and final-state radiation.
*
* The SplittingFunction class contains a number of purely virtual members
* which must be implemented in the inheriting classes. The class also stores
* the interaction type of the spltting function.
*
* The inheriting classes need to specific the splitting function
* \f$P(z,2p_j\cdot p_k)\f$, in terms of the energy fraction \f$z\f$ and
* the evolution scale. In order to allow the splitting functions to be used
* with different choices of evolution functions the scale is given by
* \f[2p_j\cdot p_k=(p_j+p_k)^2-m_{jk}^2=Q^2-(p_j+p_k)^2=z(1-z)\tilde{q}^2=
* \frac{p_T^2}{z(1-z)}-m_{jk}^2+\frac{m_j^2}{z}+\frac{m_k^2}{1-z},\f]
* where \f$Q^2\f$ is the virtuality of the branching particle,
* $p_T$ is the relative transverse momentum of the branching products and
* \f$\tilde{q}^2\f$ is the angular variable described in hep-ph/0310083.
*
* In addition an overestimate of the
* splitting function, \f$P_{\rm over}(z)\f$ which only depends upon \f$z\f$,
* the integral, inverse of the integral for this overestimate and
* ratio of the true splitting function to the overestimate must be provided
* as they are necessary for the veto alogrithm used to implement the evolution.
*
* @see \ref SplittingFunctionInterfaces "The interfaces"
* defined for SplittingFunction.
*/
class SplittingFunction: public Interfaced {
public:
/**
* The default constructor.
* @param b All splitting functions must have an interaction order
*/
SplittingFunction()
: Interfaced(), _interactionType(ShowerInteraction::UNDEFINED),
_colourStructure(Undefined), _colourFactor(-1.),
- angularOrdered_(true), scaleChoice_(2) {}
+ angularOrdered_(true), scaleChoice_(2), strictAO_(false) {}
public:
/**
* Methods to return the interaction type and order for the splitting function
*/
//@{
/**
* Return the type of the interaction
*/
ShowerInteraction interactionType() const {return _interactionType;}
/**
* Return the colour structure
*/
ColourStructure colourStructure() const {return _colourStructure;}
/**
* Return the colour factor
*/
double colourFactor(const IdList &ids) const {
if(_colourStructure>0)
return _colourFactor;
else if(_colourStructure<0) {
if(_colourStructure==ChargedChargedNeutral ||
_colourStructure==ChargedNeutralCharged) {
return sqr(double(ids[0]->iCharge())/3.);
}
else if(_colourStructure==NeutralChargedCharged) {
double fact = sqr(double(ids[1]->iCharge())/3.);
if(ids[1]->coloured())
fact *= abs(double(ids[1]->iColour()));
return fact;
}
else
assert(false);
}
else
assert(false);
}
//@}
/**
* Purely virtual method which should determine whether this splitting
* function can be used for a given set of particles.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual bool accept(const IdList & ids) const = 0;
/**
* Method to check the colours are correct
*/
virtual bool checkColours(const IdList & ids) const;
/**
* Methods to return the splitting function.
*/
//@{
/**
* Purely virtual method which should return the exact value of the splitting function,
* \f$P\f$ evaluated in terms of the energy fraction, \f$z\f$, and the evolution scale
\f$\tilde{q}^2\f$.
* @param z The energy fraction.
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const = 0;
/**
* Purely virtual method which should return
* an overestimate of the splitting function,
* \f$P_{\rm over}\f$ such that the result \f$P_{\rm over}\geq P\f$. This function
* should be simple enough that it does not depend on the evolution scale.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual double overestimateP(const double z, const IdList & ids) const = 0;
/**
* Purely virtual method which should return
* the ratio of the splitting function to the overestimate, i.e.
* \f$P(z,\tilde{q}^2)/P_{\rm over}(z)\f$.
* @param z The energy fraction.
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
const bool mass, const RhoDMatrix & rho) const = 0;
/**
* Purely virtual method which should return the indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*
*/
virtual double integOverP(const double z, const IdList & ids,
unsigned int PDFfactor=0) const = 0;
/**
* Purely virtual method which should return the inverse of the
* indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$ which is used to
* generate the value of \f$z\f$.
* @param r Value of the splitting function to be inverted
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor=0) const = 0;
//@}
/**
* Purely virtual method which should make the proper colour connection
* between the emitting parent and the branching products.
* @param parent The parent for the branching
* @param first The first branching product
* @param second The second branching product
* @param partnerType The type of evolution partner
* @param back Whether this is foward or backward evolution.
*/
virtual void colourConnection(tShowerParticlePtr parent,
tShowerParticlePtr first,
tShowerParticlePtr second,
ShowerPartnerType partnerType,
const bool back) const;
/**
* Method to calculate the azimuthal angle for forward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiForward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &) = 0;
/**
* Method to calculate the azimuthal angle for backward evolution
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &) = 0;
/**
* Calculate the matrix element for the splitting
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param phi The azimuthal angle, \f$\phi\f$.
* @param timeLike Whether timelike or spacelike, affects inclusive of mass terms
*/
virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
const IdList & ids, const double phi,
bool timeLike) = 0;
/**
* Whether or not the interaction is angular ordered
*/
bool angularOrdered() const {return angularOrdered_;}
/**
* Scale choice
*/
bool pTScale() const {
return scaleChoice_ == 2 ? angularOrdered_ : scaleChoice_ == 0;
}
/**
* Functions to state scales after branching happens
*/
//@{
/**
* Sort out scales for final-state emission
*/
void evaluateFinalStateScales(ShowerPartnerType type,
Energy scale, double z,
tShowerParticlePtr parent,
tShowerParticlePtr first,
tShowerParticlePtr second);
/**
* Sort out scales for initial-state emission
*/
void evaluateInitialStateScales(ShowerPartnerType type,
Energy scale, double z,
tShowerParticlePtr parent,
tShowerParticlePtr first,
tShowerParticlePtr second);
/**
* Sort out scales for decay emission
*/
void evaluateDecayScales(ShowerPartnerType type,
Energy scale, double z,
tShowerParticlePtr parent,
tShowerParticlePtr first,
tShowerParticlePtr second);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
protected:
/**
* Set the colour factor
*/
void colourFactor(double in) {_colourFactor=in;}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SplittingFunction & operator=(const SplittingFunction &);
+ SplittingFunction & operator=(const SplittingFunction &) = delete;
private:
/**
* The interaction type for the splitting function.
*/
ShowerInteraction _interactionType;
/**
* The colour structure
*/
ColourStructure _colourStructure;
/**
* The colour factor
*/
double _colourFactor;
/**
* Whether or not this interaction is angular-ordered
*/
bool angularOrdered_;
/**
* The choice of scale
*/
unsigned int scaleChoice_;
+ /**
+ * Enforce strict AO
+ */
+ bool strictAO_;
+
};
}
#endif /* HERWIG_SplittingFunction_H */
diff --git a/Shower/QTilde/SplittingFunctions/SplittingGenerator.h b/Shower/QTilde/SplittingFunctions/SplittingGenerator.h
--- a/Shower/QTilde/SplittingFunctions/SplittingGenerator.h
+++ b/Shower/QTilde/SplittingFunctions/SplittingGenerator.h
@@ -1,321 +1,321 @@
// -*- C++ -*-
//
// SplittingGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_SplittingGenerator_H
#define HERWIG_SplittingGenerator_H
//
// This is the declaration of the SplittingGenerator class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "Herwig/Shower/QTilde/Base/Branching.h"
#include "Herwig/Shower/QTilde/SplittingFunctions/SudakovFormFactor.h"
#include "SplittingGenerator.fh"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
#include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class is responsible for creating, at the beginning of the Run,
* all the SplittingFunction objects and the corresponding
* SudakovFormFactor objects, and then of the generation of splittings
* (radiation emissions) during the event.
* Many switches are defined in this class which allowed the user to turn on/off:
* - each type of interaction (QCD, QED, EWK,...);
* - initial- and final-state radiation for all type of interactions;
* - initial- and final-state radiation for each type of interaction;
* - each type of splitting (\f$u\to ug\f$, \f$d\to dg\f$, \f$\ldots\f$,
* \f$g\to gg\f$, \f$g\to u\bar{u}\f$, \f$\ldots\f$).
*
* These switches are useful mainly for debugging, but eventually can
* also be used for a "quick and dirty" estimation of systematic errors.
*
* In the future it should be possible to implement in this class
*
* - the \f$1\to2\f$ azimuthal correlations for soft emission due to QCD coherence
* using the ShowerParticle object provided in the input.
* - Similarly having the \f$\rho-D\f$ matrix and the SplittingFunction pointer
* it should be possible to implement the spin correlations.
*
* @see SudakovFormFactor
* @see SplitFun
*
* @see \ref SplittingGeneratorInterfaces "The interfaces"
* defined for SplittingGenerator.
*/
class SplittingGenerator: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
SplittingGenerator() : _deTuning(1.) {}
//@}
public:
/**
* Methods to select the next branching and reconstruct the kinematics
*/
//@{
/**
* Choose a new forward branching for a time-like particle
* The method returns:
* - a pointer to a ShowerKinematics object, which
* contains the information about the new scale and all other
* kinematics variables that need to be generated simultaneously;
* - a pointer to the SudakovFormFactor object associated
* with the chosen emission.
* - The PDG codes of the particles in the branching,
* as a Branching struct.
*
* In the case no branching has been generated, both the returned
* pointers are null ( ShoKinPtr() , tSudakovFFPtr() ).
*
* @param particle The particle to be evolved
* @param enhance The factor by which to ehnace the emission of radiation
* @param type The type of interaction to generate
* @return The Branching struct for the branching
*/
Branching chooseForwardBranching(ShowerParticle & particle,
double enhance,
ShowerInteraction type) const;
/**
* Select the next branching of a particles for the initial-state shower
* in the particle's decay.
* @param particle The particle being showerwed
* @param maxscale The maximum scale
* @param minmass Minimum mass of the particle after the branching
* @param enhance The factor by which to ehnace the emission of radiation
* @param type The type of interaction to generate
* @return The Branching struct for the branching
*/
Branching chooseDecayBranching(ShowerParticle & particle,
const ShowerParticle::EvolutionScales & maxScales,
Energy minmass,double enhance,
ShowerInteraction type) const;
/**
* Choose a new backward branching for a space-like particle.
* The method returns:
* - a pointer to a ShowerKinematics object, which
* contains the information about the new scale and all other
* kinematics variables that need to be generated simultaneously;
* - a pointer to the SudakovFormFactor object associated
* with the chosen emission.
* - The PDG codes of the particles in the branching,
* as a Branching struct.
*
* In the case no branching has been generated, both the returned
* pointers are null ( ShoKinPtr() , tSudakovFFPtr() ).
*
* @param particle The particle to be evolved
* @param enhance The factor by which to ehnace the emission of radiation
* @param beamparticle The beam particle
* @param beam The BeamParticleData object
* @param type The type of interaction to generate
* @return The Branching struct for the branching
*/
Branching
chooseBackwardBranching(ShowerParticle & particle,
PPtr beamparticle,
double enhance,
Ptr<BeamParticleData>::transient_const_pointer beam,
ShowerInteraction type,
tcPDFPtr , Energy ) const;
//@}
public:
/**
* Methods to parse the information from the input files to create the
* branchings
*/
//@{
/**
* Add a final-state splitting
*/
string addFinalSplitting(string arg) { return addSplitting(arg,true); }
/**
* Add an initial-state splitting
*/
string addInitialSplitting(string arg) { return addSplitting(arg,false); }
/**
* Add a final-state splitting
*/
string deleteFinalSplitting(string arg) { return deleteSplitting(arg,true); }
/**
* Add an initial-state splitting
*/
string deleteInitialSplitting(string arg) { return deleteSplitting(arg,false); }
//@}
/**
* Access to the splittings
*/
//@{
/**
* Access the final-state branchings
*/
const BranchingList & finalStateBranchings() const { return _fbranchings; }
/**
* Access the initial-state branchings
*/
const BranchingList & initialStateBranchings() const { return _bbranchings; }
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given
* pointer.
*/
virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this
* object.
* @return a vector of pointers.
*/
virtual IVector getReferences();
//@}
private:
/**
* Add a branching to the map
* @param ids PDG coeds of the particles in the branching
* @param sudakov The SudakovFormFactor for the branching
* @param final Whether this is an initial- or final-state branching
*/
void addToMap(const IdList & ids, const SudakovPtr & sudakov, bool final);
/**
* Remove a branching to the map
* @param ids PDG coeds of the particles in the branching
* @param sudakov The SudakovFormFactor for the branching
* @param final Whether this is an initial- or final-state branching
*/
void deleteFromMap(const IdList & ids, const SudakovPtr & sudakov, bool final);
/**
* Obtain the reference vectors for a final-state particle
* @param particle The particle
* @param p The p reference vector
* @param n The n reference vector
*/
void finalStateBasisVectors(ShowerParticle particle, Lorentz5Momentum & p,
Lorentz5Momentum & n) const;
/**
* Add a splitting
* @param in string to be parsed
* @param final Whether this is an initial- or final-state branching
*/
string addSplitting(string in ,bool final);
/**
* Delete a splitting
* @param in string to be parsed
* @param final Whether this is an initial- or final-state branching
*/
string deleteSplitting(string in ,bool final);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- SplittingGenerator & operator=(const SplittingGenerator &);
+ SplittingGenerator & operator=(const SplittingGenerator &) = delete;
private:
/**
* List of the branchings and the appropriate Sudakovs for forward branchings
*/
BranchingList _fbranchings;
/**
* Lists of the branchings and the appropriate Sudakovs for backward branchings.
*/
BranchingList _bbranchings;
/**
* The detuning parameter
*/
double _deTuning;
};
}
#endif /* HERWIG_SplittingGenerator_H */
diff --git a/Shower/QTilde/SplittingFunctions/SudakovFormFactor.cc b/Shower/QTilde/SplittingFunctions/SudakovFormFactor.cc
--- a/Shower/QTilde/SplittingFunctions/SudakovFormFactor.cc
+++ b/Shower/QTilde/SplittingFunctions/SudakovFormFactor.cc
@@ -1,1223 +1,1224 @@
// -*- C++ -*-
//
// SudakovFormFactor.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the SudakovFormFactor class.
//
#include "SudakovFormFactor.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "Herwig/Shower/QTilde/Kinematics/ShowerKinematics.h"
#include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "Herwig/Shower/QTilde/QTildeShowerHandler.h"
#include "Herwig/Shower/QTilde/Kinematics/FS_QTildeShowerKinematics1to2.h"
#include "Herwig/Shower/QTilde/Kinematics/IS_QTildeShowerKinematics1to2.h"
#include "Herwig/Shower/QTilde/Kinematics/Decay_QTildeShowerKinematics1to2.h"
#include "Herwig/Shower/QTilde/Kinematics/KinematicHelpers.h"
#include "SudakovCutOff.h"
#include <array>
using std::array;
using namespace Herwig;
DescribeClass<SudakovFormFactor,Interfaced>
describeSudakovFormFactor ("Herwig::SudakovFormFactor","");
void SudakovFormFactor::persistentOutput(PersistentOStream & os) const {
os << splittingFn_ << alpha_ << pdfmax_ << particles_ << pdffactor_ << cutoff_;
}
void SudakovFormFactor::persistentInput(PersistentIStream & is, int) {
is >> splittingFn_ >> alpha_ >> pdfmax_ >> particles_ >> pdffactor_ >> cutoff_;
}
void SudakovFormFactor::Init() {
static ClassDocumentation<SudakovFormFactor> documentation
("The SudakovFormFactor class is the base class for the implementation of Sudakov"
" form factors in Herwig");
static Reference<SudakovFormFactor,SplittingFunction>
interfaceSplittingFunction("SplittingFunction",
"A reference to the SplittingFunction object",
&Herwig::SudakovFormFactor::splittingFn_,
false, false, true, false);
static Reference<SudakovFormFactor,ShowerAlpha>
interfaceAlpha("Alpha",
"A reference to the Alpha object",
&Herwig::SudakovFormFactor::alpha_,
false, false, true, false);
static Reference<SudakovFormFactor,SudakovCutOff>
interfaceCutoff("Cutoff",
"A reference to the SudakovCutOff object",
&Herwig::SudakovFormFactor::cutoff_,
false, false, true, false);
static Parameter<SudakovFormFactor,double> interfacePDFmax
("PDFmax",
"Maximum value of PDF weight. ",
&SudakovFormFactor::pdfmax_, 35.0, 1.0, 1000000.0,
false, false, Interface::limited);
static Switch<SudakovFormFactor,unsigned int> interfacePDFFactor
("PDFFactor",
"Include additional factors in the overestimate for the PDFs",
&SudakovFormFactor::pdffactor_, 0, false, false);
static SwitchOption interfacePDFFactorNo
(interfacePDFFactor,
"No",
"Don't include any factors",
0);
static SwitchOption interfacePDFFactorOverZ
(interfacePDFFactor,
"OverZ",
"Include an additional factor of 1/z",
1);
static SwitchOption interfacePDFFactorOverOneMinusZ
(interfacePDFFactor,
"OverOneMinusZ",
"Include an additional factor of 1/(1-z)",
2);
static SwitchOption interfacePDFFactorOverZOneMinusZ
(interfacePDFFactor,
"OverZOneMinusZ",
"Include an additional factor of 1/z/(1-z)",
3);
static SwitchOption interfacePDFFactorOverRootZ
(interfacePDFFactor,
"OverRootZ",
"Include an additional factor of 1/sqrt(z)",
4);
static SwitchOption interfacePDFFactorRootZ
(interfacePDFFactor,
"RootZ",
"Include an additional factor of sqrt(z)",
5);
}
bool SudakovFormFactor::alphaSVeto(Energy2 pt2) const {
double ratio=alphaSVetoRatio(pt2,1.);
return UseRandom::rnd() > ratio;
}
double SudakovFormFactor::alphaSVetoRatio(Energy2 pt2, double factor) const {
factor *= ShowerHandler::currentHandler()->renormalizationScaleFactor();
return alpha_->ratio(pt2, factor);
}
bool SudakovFormFactor::PDFVeto(const Energy2 t, const double x,
const tcPDPtr parton0, const tcPDPtr parton1,
Ptr<BeamParticleData>::transient_const_pointer beam) const {
double ratio=PDFVetoRatio(t,x,parton0,parton1,beam,1.);
return UseRandom::rnd() > ratio;
}
double SudakovFormFactor::PDFVetoRatio(const Energy2 t, const double x,
const tcPDPtr parton0, const tcPDPtr parton1,
Ptr<BeamParticleData>::transient_const_pointer beam,double factor) const {
assert(pdf_);
Energy2 theScale = t * sqr(ShowerHandler::currentHandler()->factorizationScaleFactor()*factor);
if (theScale < sqr(freeze_)) theScale = sqr(freeze_);
const double newpdf=pdf_->xfx(beam,parton0,theScale,x/z());
if(newpdf<=0.) return 0.;
const double oldpdf=pdf_->xfx(beam,parton1,theScale,x);
if(oldpdf<=0.) return 1.;
const double ratio = newpdf/oldpdf;
double maxpdf = pdfmax_;
switch (pdffactor_) {
case 0: break;
case 1: maxpdf /= z(); break;
case 2: maxpdf /= 1.-z(); break;
case 3: maxpdf /= (z()*(1.-z())); break;
case 4: maxpdf /= sqrt(z()); break;
case 5: maxpdf *= sqrt(z()); break;
default :
throw Exception() << "SudakovFormFactor::PDFVetoRatio invalid PDFfactor = "
<< pdffactor_ << Exception::runerror;
}
if (ratio > maxpdf) {
generator()->log() << "PDFVeto warning: Ratio > " << name()
<< ":PDFmax (by a factor of "
<< ratio/maxpdf <<") for "
<< parton0->PDGName() << " to "
<< parton1->PDGName() << "\n";
}
return ratio/maxpdf ;
}
void SudakovFormFactor::addSplitting(const IdList & in) {
bool add=true;
for(unsigned int ix=0;ix<particles_.size();++ix) {
if(particles_[ix].size()==in.size()) {
bool match=true;
for(unsigned int iy=0;iy<in.size();++iy) {
if(particles_[ix][iy]!=in[iy]) {
match=false;
break;
}
}
if(match) {
add=false;
break;
}
}
}
if(add) particles_.push_back(in);
}
void SudakovFormFactor::removeSplitting(const IdList & in) {
for(vector<IdList>::iterator it=particles_.begin();
it!=particles_.end();++it) {
if(it->size()==in.size()) {
bool match=true;
for(unsigned int iy=0;iy<in.size();++iy) {
if((*it)[iy]!=in[iy]) {
match=false;
break;
}
}
if(match) {
vector<IdList>::iterator itemp=it;
--itemp;
particles_.erase(it);
it = itemp;
}
}
}
}
void SudakovFormFactor::guesstz(Energy2 t1,unsigned int iopt,
const IdList &ids,
double enhance,bool ident,
double detune,
Energy2 &t_main, double &z_main){
unsigned int pdfopt = iopt!=1 ? 0 : pdffactor_;
double lower = splittingFn_->integOverP(zlimits_.first ,ids,pdfopt);
double upper = splittingFn_->integOverP(zlimits_.second,ids,pdfopt);
double c = 1./((upper - lower)
* alpha_->overestimateValue()/Constants::twopi*enhance*detune);
double r = UseRandom::rnd();
assert(iopt<=2);
if(iopt==1) {
c/=pdfmax_;
//symmetry of FS gluon splitting
if(ident) c*=0.5;
}
else if(iopt==2) c*=-1.;
// guessing t
if(iopt!=2 || c*log(r)<log(Constants::MaxEnergy2/t1)) {
t_main = t1*pow(r,c);
}
else
t_main = Constants::MaxEnergy2;
// guessing z
z_main = splittingFn_->invIntegOverP(lower + UseRandom::rnd()
*(upper - lower),ids,pdfopt);
}
bool SudakovFormFactor::guessTimeLike(Energy2 &t,Energy2 tmin,double enhance,
double detune) {
Energy2 told = t;
// calculate limits on z and if lower>upper return
if(!computeTimeLikeLimits(t)) return false;
// guess values of t and z
guesstz(told,0,ids_,enhance,ids_[1]==ids_[2],detune,t,z_);
// actual values for z-limits
if(!computeTimeLikeLimits(t)) return false;
if(t<tmin) {
t=-1.0*GeV2;
return false;
}
else
return true;
}
bool SudakovFormFactor::guessSpaceLike(Energy2 &t, Energy2 tmin, const double x,
double enhance,
double detune) {
Energy2 told = t;
// calculate limits on z if lower>upper return
if(!computeSpaceLikeLimits(t,x)) return false;
// guess values of t and z
guesstz(told,1,ids_,enhance,ids_[1]==ids_[2],detune,t,z_);
// actual values for z-limits
if(!computeSpaceLikeLimits(t,x)) return false;
if(t<tmin) {
t=-1.0*GeV2;
return false;
}
else
return true;
}
bool SudakovFormFactor::PSVeto(const Energy2 t) {
// still inside PS, return true if outside
// check vs overestimated limits
if (z() < zlimits_.first || z() > zlimits_.second) return true;
Energy2 m02 = (ids_[0]->id()!=ParticleID::g && ids_[0]->id()!=ParticleID::gamma) ?
masssquared_[0] : Energy2();
- Energy2 pt2 = QTildeKinematics::pT2_FSR(t,z(),m02,masssquared_[1],masssquared_[2]);
+ Energy2 pt2 = QTildeKinematics::pT2_FSR(t,z(),m02,masssquared_[1],masssquared_[2],
+ masssquared_[1],masssquared_[2]);
// if pt2<0 veto
if (pt2<cutoff_->pT2min()) return true;
// otherwise calculate pt and return
pT_ = sqrt(pt2);
return false;
}
ShoKinPtr SudakovFormFactor::generateNextTimeBranching(const Energy startingScale,
const IdList &ids,
const RhoDMatrix & rho,
double enhance,
double detuning) {
// First reset the internal kinematics variables that can
// have been eventually set in the previous call to the method.
q_ = ZERO;
z_ = 0.;
phi_ = 0.;
// perform initialization
Energy2 tmax(sqr(startingScale)),tmin;
initialize(ids,tmin);
// check max > min
if(tmax<=tmin) return ShoKinPtr();
// calculate next value of t using veto algorithm
Energy2 t(tmax);
// no shower variations to calculate
if(ShowerHandler::currentHandler()->showerVariations().empty()){
// Without variations do the usual Veto algorithm
// No need for more if-statements in this loop.
do {
if(!guessTimeLike(t,tmin,enhance,detuning)) break;
}
while(PSVeto(t) ||
SplittingFnVeto(z()*(1.-z())*t,ids,true,rho,detuning) ||
alphaSVeto(splittingFn()->pTScale() ? sqr(z()*(1.-z()))*t : z()*(1.-z())*t));
}
else {
bool alphaRew(true),PSRew(true),SplitRew(true);
do {
if(!guessTimeLike(t,tmin,enhance,detuning)) break;
PSRew=PSVeto(t);
if (PSRew) continue;
SplitRew=SplittingFnVeto(z()*(1.-z())*t,ids,true,rho,detuning);
alphaRew=alphaSVeto(splittingFn()->pTScale() ? sqr(z()*(1.-z()))*t : z()*(1.-z())*t);
double factor=alphaSVetoRatio(splittingFn()->pTScale() ? sqr(z()*(1.-z()))*t : z()*(1.-z())*t,1.)*
SplittingFnVetoRatio(z()*(1.-z())*t,ids,true,rho,detuning);
tShowerHandlerPtr ch = ShowerHandler::currentHandler();
if( !(SplitRew || alphaRew) ) {
//Emission
q_ = t > ZERO ? Energy(sqrt(t)) : -1.*MeV;
if (q_ <= ZERO) break;
}
for ( map<string,ShowerVariation>::const_iterator var =
ch->showerVariations().begin();
var != ch->showerVariations().end(); ++var ) {
if ( ( ch->firstInteraction() && var->second.firstInteraction ) ||
( !ch->firstInteraction() && var->second.secondaryInteractions ) ) {
double newfactor = alphaSVetoRatio(splittingFn()->pTScale() ?
sqr(z()*(1.-z()))*t :
z()*(1.-z())*t,var->second.renormalizationScaleFactor)
* SplittingFnVetoRatio(z()*(1.-z())*t,ids,true,rho,detuning);
double varied;
if ( SplitRew || alphaRew ) {
// No Emission
varied = (1. - newfactor) / (1. - factor);
} else {
// Emission
varied = newfactor / factor;
}
map<string,double>::iterator wi = ch->currentWeights().find(var->first);
if ( wi != ch->currentWeights().end() )
wi->second *= varied;
else {
assert(false);
//ch->currentWeights()[var->first] = varied;
}
}
}
}
while(PSRew || SplitRew || alphaRew);
}
q_ = t > ZERO ? Energy(sqrt(t)) : -1.*MeV;
if(q_ < ZERO) return ShoKinPtr();
// return the ShowerKinematics object
return new_ptr(FS_QTildeShowerKinematics1to2(q_,z(),phi(),pT(),this));
}
ShoKinPtr SudakovFormFactor::
generateNextSpaceBranching(const Energy startingQ,
const IdList &ids,
double x,
const RhoDMatrix & rho,
double enhance,
Ptr<BeamParticleData>::transient_const_pointer beam,
double detuning) {
// First reset the internal kinematics variables that can
// have been eventually set in the previous call to the method.
q_ = ZERO;
z_ = 0.;
phi_ = 0.;
// perform the initialization
Energy2 tmax(sqr(startingQ)),tmin;
initialize(ids,tmin);
// check max > min
if(tmax<=tmin) return ShoKinPtr();
// calculate next value of t using veto algorithm
Energy2 t(tmax),pt2(ZERO);
// no shower variations
if(ShowerHandler::currentHandler()->showerVariations().empty()){
// Without variations do the usual Veto algorithm
// No need for more if-statements in this loop.
do {
if(!guessSpaceLike(t,tmin,x,enhance,detuning)) break;
pt2 = QTildeKinematics::pT2_ISR(t,z(),masssquared_[2]);
}
while(pt2 < cutoff_->pT2min()||
z() > zlimits_.second||
SplittingFnVeto((1.-z())*t/z(),ids,false,rho,detuning)||
alphaSVeto(splittingFn()->pTScale() ? sqr(1.-z())*t : (1.-z())*t)||
PDFVeto(t,x,ids[0],ids[1],beam));
}
// shower variations
else
{
bool alphaRew(true),PDFRew(true),ptRew(true),zRew(true),SplitRew(true);
do {
if(!guessSpaceLike(t,tmin,x,enhance,detuning)) break;
pt2 = QTildeKinematics::pT2_ISR(t,z(),masssquared_[2]);
ptRew=pt2 < cutoff_->pT2min();
zRew=z() > zlimits_.second;
if (ptRew||zRew) continue;
SplitRew=SplittingFnVeto((1.-z())*t/z(),ids,false,rho,detuning);
alphaRew=alphaSVeto(splittingFn()->pTScale() ? sqr(1.-z())*t : (1.-z())*t);
PDFRew=PDFVeto(t,x,ids[0],ids[1],beam);
double factor=PDFVetoRatio(t,x,ids[0],ids[1],beam,1.)*
alphaSVetoRatio(splittingFn()->pTScale() ? sqr(1.-z())*t : (1.-z())*t,1.)*
SplittingFnVetoRatio((1.-z())*t/z(),ids,false,rho,detuning);
tShowerHandlerPtr ch = ShowerHandler::currentHandler();
if( !(PDFRew || SplitRew || alphaRew) ) {
//Emission
q_ = t > ZERO ? Energy(sqrt(t)) : -1.*MeV;
if (q_ <= ZERO) break;
}
for ( map<string,ShowerVariation>::const_iterator var =
ch->showerVariations().begin();
var != ch->showerVariations().end(); ++var ) {
if ( ( ch->firstInteraction() && var->second.firstInteraction ) ||
( !ch->firstInteraction() && var->second.secondaryInteractions ) ) {
double newfactor = PDFVetoRatio(t,x,ids[0],ids[1],beam,var->second.factorizationScaleFactor)*
alphaSVetoRatio(splittingFn()->pTScale() ?
sqr(1.-z())*t : (1.-z())*t,var->second.renormalizationScaleFactor)
*SplittingFnVetoRatio((1.-z())*t/z(),ids,false,rho,detuning);
double varied;
if( PDFRew || SplitRew || alphaRew) {
// No Emission
varied = (1. - newfactor) / (1. - factor);
} else {
// Emission
varied = newfactor / factor;
}
map<string,double>::iterator wi = ch->currentWeights().find(var->first);
if ( wi != ch->currentWeights().end() )
wi->second *= varied;
else {
assert(false);
//ch->currentWeights()[var->first] = varied;
}
}
}
}
while( PDFRew || SplitRew || alphaRew);
}
if(t > ZERO && zlimits_.first < zlimits_.second) q_ = sqrt(t);
else return ShoKinPtr();
pT_ = sqrt(pt2);
// create the ShowerKinematics and return it
return new_ptr(IS_QTildeShowerKinematics1to2(q_,z(),phi(),pT(),this));
}
void SudakovFormFactor::initialize(const IdList & ids, Energy2 & tmin) {
ids_=ids;
tmin = 4.*cutoff_->pT2min();
masses_ = cutoff_->virtualMasses(ids);
masssquared_.clear();
for(unsigned int ix=0;ix<masses_.size();++ix) {
masssquared_.push_back(sqr(masses_[ix]));
if(ix>0) tmin=max(masssquared_[ix],tmin);
}
}
ShoKinPtr SudakovFormFactor::generateNextDecayBranching(const Energy startingScale,
const Energy stoppingScale,
const Energy minmass,
const IdList &ids,
const RhoDMatrix & rho,
double enhance,
double detuning) {
// First reset the internal kinematics variables that can
// have been eventually set in the previous call to this method.
q_ = Constants::MaxEnergy;
z_ = 0.;
phi_ = 0.;
// perform initialisation
Energy2 tmax(sqr(stoppingScale)),tmin;
initialize(ids,tmin);
tmin=sqr(startingScale);
// check some branching possible
if(tmax<=tmin) return ShoKinPtr();
// perform the evolution
Energy2 t(tmin),pt2(-MeV2);
do {
if(!guessDecay(t,tmax,minmass,enhance,detuning)) break;
pt2 = QTildeKinematics::pT2_Decay(t,z(),masssquared_[0],masssquared_[2]);
}
while(SplittingFnVeto((1.-z())*t/z(),ids,true,rho,detuning)||
alphaSVeto(splittingFn()->pTScale() ? sqr(1.-z())*t : (1.-z())*t ) ||
pt2<cutoff_->pT2min() ||
t*(1.-z())>masssquared_[0]-sqr(minmass));
if(t > ZERO) {
q_ = sqrt(t);
pT_ = sqrt(pt2);
}
else return ShoKinPtr();
phi_ = 0.;
// create the ShowerKinematics object
return new_ptr(Decay_QTildeShowerKinematics1to2(q_,z(),phi(),pT(),this));
}
bool SudakovFormFactor::guessDecay(Energy2 &t,Energy2 tmax, Energy minmass,
double enhance, double detune) {
// previous scale
Energy2 told = t;
// overestimated limits on z
if(tmax<masssquared_[0]) {
t=-1.0*GeV2;
return false;
}
Energy2 tm2 = tmax-masssquared_[0];
Energy tm = sqrt(tm2);
zlimits_ = make_pair(sqr(minmass/masses_[0]),
1.-sqrt(masssquared_[2]+cutoff_->pT2min()+
0.25*sqr(masssquared_[2])/tm2)/tm
+0.5*masssquared_[2]/tm2);
if(zlimits_.second<zlimits_.first) {
t=-1.0*GeV2;
return false;
}
// guess values of t and z
guesstz(told,2,ids_,enhance,ids_[1]==ids_[2],detune,t,z_);
// actual values for z-limits
if(t<masssquared_[0]) {
t=-1.0*GeV2;
return false;
}
tm2 = t-masssquared_[0];
tm = sqrt(tm2);
zlimits_ = make_pair(sqr(minmass/masses_[0]),
1.-sqrt(masssquared_[2]+cutoff_->pT2min()+
0.25*sqr(masssquared_[2])/tm2)/tm
+0.5*masssquared_[2]/tm2);
if(t>tmax||zlimits_.second<zlimits_.first) {
t=-1.0*GeV2;
return false;
}
else
return true;
}
bool SudakovFormFactor::computeTimeLikeLimits(Energy2 & t) {
if (t < 1e-20 * GeV2) {
t=-1.*GeV2;
return false;
}
const Energy2 pT2min = cutoff_->pT2min();
// special case for gluon radiating
if(ids_[0]->id()==ParticleID::g||ids_[0]->id()==ParticleID::gamma) {
// no emission possible
if(t<16.*(masssquared_[1]+pT2min)) {
t=-1.*GeV2;
return false;
}
// overestimate of the limits
zlimits_.first = 0.5*(1.-sqrt(1.-4.*sqrt((masssquared_[1]+pT2min)/t)));
zlimits_.second = 1.-zlimits_.first;
}
// special case for radiated particle is gluon
else if(ids_[2]->id()==ParticleID::g||ids_[2]->id()==ParticleID::gamma) {
zlimits_.first = sqrt((masssquared_[1]+pT2min)/t);
zlimits_.second = 1.-sqrt((masssquared_[2]+pT2min)/t);
}
else if(ids_[1]->id()==ParticleID::g||ids_[1]->id()==ParticleID::gamma) {
zlimits_.second = sqrt((masssquared_[2]+pT2min)/t);
zlimits_.first = 1.-sqrt((masssquared_[1]+pT2min)/t);
}
else {
zlimits_.first = (masssquared_[1]+pT2min)/t;
zlimits_.second = 1.-(masssquared_[2]+pT2min)/t;
}
if(zlimits_.first>=zlimits_.second) {
t=-1.*GeV2;
return false;
}
return true;
}
bool SudakovFormFactor::computeSpaceLikeLimits(Energy2 & t, double x) {
if (t < 1e-20 * GeV2) {
t=-1.*GeV2;
return false;
}
// compute the limits
zlimits_.first = x;
double yy = 1.+0.5*masssquared_[2]/t;
zlimits_.second = yy - sqrt(sqr(yy)-1.+cutoff_->pT2min()/t);
// return false if lower>upper
if(zlimits_.second<zlimits_.first) {
t=-1.*GeV2;
return false;
}
else
return true;
}
namespace {
tShowerParticlePtr findCorrelationPartner(ShowerParticle & particle,
bool forward,
ShowerInteraction inter) {
tPPtr child = &particle;
tShowerParticlePtr mother;
if(forward) {
mother = !particle.parents().empty() ?
dynamic_ptr_cast<tShowerParticlePtr>(particle.parents()[0]) : tShowerParticlePtr();
}
else {
mother = particle.children().size()==2 ?
dynamic_ptr_cast<tShowerParticlePtr>(&particle) : tShowerParticlePtr();
}
tShowerParticlePtr partner;
while(mother) {
tPPtr otherChild;
if(forward) {
for (unsigned int ix=0;ix<mother->children().size();++ix) {
if(mother->children()[ix]!=child) {
otherChild = mother->children()[ix];
break;
}
}
}
else {
otherChild = mother->children()[1];
}
tShowerParticlePtr other = dynamic_ptr_cast<tShowerParticlePtr>(otherChild);
if((inter==ShowerInteraction::QCD && otherChild->dataPtr()->coloured()) ||
(inter==ShowerInteraction::QED && otherChild->dataPtr()->charged())) {
partner = other;
break;
}
if(forward && !other->isFinalState()) {
partner = dynamic_ptr_cast<tShowerParticlePtr>(mother);
break;
}
child = mother;
if(forward) {
mother = ! mother->parents().empty() ?
dynamic_ptr_cast<tShowerParticlePtr>(mother->parents()[0]) : tShowerParticlePtr();
}
else {
if(mother->children()[0]->children().size()!=2)
break;
tShowerParticlePtr mtemp =
dynamic_ptr_cast<tShowerParticlePtr>(mother->children()[0]);
if(!mtemp)
break;
else
mother=mtemp;
}
}
if(!partner) {
if(forward) {
partner = dynamic_ptr_cast<tShowerParticlePtr>( child)->partner();
}
else {
if(mother) {
tShowerParticlePtr parent;
if(!mother->children().empty()) {
parent = dynamic_ptr_cast<tShowerParticlePtr>(mother->children()[0]);
}
if(!parent) {
parent = dynamic_ptr_cast<tShowerParticlePtr>(mother);
}
partner = parent->partner();
}
else {
partner = dynamic_ptr_cast<tShowerParticlePtr>(&particle)->partner();
}
}
}
return partner;
}
pair<double,double> softPhiMin(double phi0, double phi1, double A, double B, double C, double D) {
double c01 = cos(phi0 - phi1);
double s01 = sin(phi0 - phi1);
double s012(sqr(s01)), c012(sqr(c01));
double A2(A*A), B2(B*B), C2(C*C), D2(D*D);
if(abs(B/A)<1e-10 && abs(D/C)<1e-10) return make_pair(phi0,phi0+Constants::pi);
double root = sqr(B2)*C2*D2*sqr(s012) + 2.*A*B2*B*C2*C*D*c01*s012 + 2.*A*B2*B*C*D2*D*c01*s012
+ 4.*A2*B2*C2*D2*c012 - A2*B2*C2*D2*s012 - A2*B2*sqr(D2)*s012 - sqr(B2)*sqr(C2)*s012
- sqr(B2)*C2*D2*s012 - 4.*A2*A*B*C*D2*D*c01 - 4.*A*B2*B*C2*C*D*c01 + sqr(A2)*sqr(D2)
+ 2.*A2*B2*C2*D2 + sqr(B2)*sqr(C2);
if(root<0.) return make_pair(phi0,phi0+Constants::pi);
root = sqrt(root);
double denom = (-2.*A*B*C*D*c01 + A2*D2 + B2*C2);
double denom2 = (-B*C*c01 + A*D);
double num = B2*C*D*s012;
double y1 = B*s01*(-C*(num + root) + D*denom) / denom2;
double y2 = B*s01*(-C*(num - root) + D*denom) / denom2;
double x1 = -(num + root );
double x2 = -(num - root );
if(denom<0.) {
y1*=-1.;
y2*=-1.;
x1*=-1.;
x2*=-1.;
}
return make_pair(atan2(y1,x1) + phi0,atan2(y2,x2) + phi0);
}
}
double SudakovFormFactor::generatePhiForward(ShowerParticle & particle,
const IdList & ids,
ShoKinPtr kinematics,
const RhoDMatrix & rho) {
// no correlations, return flat phi
if(! dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->correlations())
return Constants::twopi*UseRandom::rnd();
// get the kinematic variables
double z = kinematics->z();
Energy2 t = z*(1.-z)*sqr(kinematics->scale());
Energy pT = kinematics->pT();
// if soft correlations
Energy2 pipj,pik;
bool canBeSoft[2] = {ids[1]->id()==ParticleID::g || ids[1]->id()==ParticleID::gamma,
ids[2]->id()==ParticleID::g || ids[2]->id()==ParticleID::gamma };
array<Energy2,3> pjk;
array<Energy,3> Ek;
Energy Ei,Ej;
Energy2 m12(ZERO),m22(ZERO);
InvEnergy2 aziMax(ZERO);
bool softAllowed = dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()&&
(canBeSoft[0] || canBeSoft[1]);
if(softAllowed) {
// find the partner for the soft correlations
tShowerParticlePtr partner=findCorrelationPartner(particle,true,splittingFn()->interactionType());
// remember we want the softer gluon
bool swapOrder = !canBeSoft[1] || (canBeSoft[0] && canBeSoft[1] && z < 0.5);
double zFact = !swapOrder ? (1.-z) : z;
// compute the transforms to the shower reference frame
// first the boost
Lorentz5Momentum pVect = particle.showerBasis()->pVector();
Lorentz5Momentum nVect = particle.showerBasis()->nVector();
Boost beta_bb;
if(particle.showerBasis()->frame()==ShowerBasis::BackToBack) {
beta_bb = -(pVect + nVect).boostVector();
}
else if(particle.showerBasis()->frame()==ShowerBasis::Rest) {
beta_bb = -pVect.boostVector();
}
else
assert(false);
pVect.boost(beta_bb);
nVect.boost(beta_bb);
Axis axis;
if(particle.showerBasis()->frame()==ShowerBasis::BackToBack) {
axis = pVect.vect().unit();
}
else if(particle.showerBasis()->frame()==ShowerBasis::Rest) {
axis = nVect.vect().unit();
}
else
assert(false);
// and then the rotation
LorentzRotation rot;
if(axis.perp2()>0.) {
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
rot.rotate(acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
}
else if(axis.z()<0.) {
rot.rotate(Constants::pi,Axis(1.,0.,0.));
}
rot.invert();
pVect *= rot;
nVect *= rot;
// shower parameters
Energy2 pn = pVect*nVect, m2 = pVect.m2();
double alpha0 = particle.showerParameters().alpha;
double beta0 = 0.5/alpha0/pn*
(sqr(particle.dataPtr()->mass())-sqr(alpha0)*m2+sqr(particle.showerParameters().pt));
Lorentz5Momentum qperp0(particle.showerParameters().ptx,
particle.showerParameters().pty,ZERO,ZERO);
assert(partner);
Lorentz5Momentum pj = partner->momentum();
pj.boost(beta_bb);
pj *= rot;
// compute the two phi independent dot products
pik = 0.5*zFact*(sqr(alpha0)*m2 - sqr(particle.showerParameters().pt) + 2.*alpha0*beta0*pn )
+0.5*sqr(pT)/zFact;
Energy2 dot1 = pj*pVect;
Energy2 dot2 = pj*nVect;
Energy2 dot3 = pj*qperp0;
pipj = alpha0*dot1+beta0*dot2+dot3;
// compute the constants for the phi dependent dot product
pjk[0] = zFact*(alpha0*dot1+dot3-0.5*dot2/pn*(alpha0*m2-sqr(particle.showerParameters().pt)/alpha0))
+0.5*sqr(pT)*dot2/pn/zFact/alpha0;
pjk[1] = (pj.x() - dot2/alpha0/pn*qperp0.x())*pT;
pjk[2] = (pj.y() - dot2/alpha0/pn*qperp0.y())*pT;
m12 = sqr(particle.dataPtr()->mass());
m22 = sqr(partner->dataPtr()->mass());
if(swapOrder) {
pjk[1] *= -1.;
pjk[2] *= -1.;
}
Ek[0] = zFact*(alpha0*pVect.t()-0.5*nVect.t()/pn*(alpha0*m2-sqr(particle.showerParameters().pt)/alpha0))
+0.5*sqr(pT)*nVect.t()/pn/zFact/alpha0;
Ek[1] = -nVect.t()/alpha0/pn*qperp0.x()*pT;
Ek[2] = -nVect.t()/alpha0/pn*qperp0.y()*pT;
if(swapOrder) {
Ek[1] *= -1.;
Ek[2] *= -1.;
}
Energy mag2=sqrt(sqr(Ek[1])+sqr(Ek[2]));
Ei = alpha0*pVect.t()+beta0*nVect.t();
Ej = pj.t();
double phi0 = atan2(-pjk[2],-pjk[1]);
if(phi0<0.) phi0 += Constants::twopi;
double phi1 = atan2(-Ek[2],-Ek[1]);
if(phi1<0.) phi1 += Constants::twopi;
double xi_min = pik/Ei/(Ek[0]+mag2), xi_max = pik/Ei/(Ek[0]-mag2), xi_ij = pipj/Ei/Ej;
if(xi_min>xi_max) swap(xi_min,xi_max);
if(xi_min>xi_ij) softAllowed = false;
Energy2 mag = sqrt(sqr(pjk[1])+sqr(pjk[2]));
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==1) {
aziMax = -m12/sqr(pik) -m22/sqr(pjk[0]+mag) +2.*pipj/pik/(pjk[0]-mag);
}
else if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==2) {
double A = (pipj*Ek[0]- Ej*pik)/Ej/sqr(Ej);
double B = -sqrt(sqr(pipj)*(sqr(Ek[1])+sqr(Ek[2])))/Ej/sqr(Ej);
double C = pjk[0]/sqr(Ej);
double D = -sqrt(sqr(pjk[1])+sqr(pjk[2]))/sqr(Ej);
pair<double,double> minima = softPhiMin(phi0,phi1,A,B,C,D);
aziMax = 0.5/pik/(Ek[0]-mag2)*(Ei-m12*(Ek[0]-mag2)/pik + max(Ej*(A+B*cos(minima.first -phi1))/(C+D*cos(minima.first -phi0)),
Ej*(A+B*cos(minima.second-phi1))/(C+D*cos(minima.second-phi0))));
}
else
assert(false);
}
// if spin correlations
vector<pair<int,Complex> > wgts;
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->spinCorrelations()) {
// calculate the weights
wgts = splittingFn()->generatePhiForward(z,t,ids,rho);
}
else {
wgts = {{ {0, 1.} }};
}
// generate the azimuthal angle
double phi,wgt;
static const Complex ii(0.,1.);
unsigned int ntry(0);
double phiMax(0.),wgtMax(0.);
do {
phi = Constants::twopi*UseRandom::rnd();
// first the spin correlations bit (gives 1 if correlations off)
Complex spinWgt = 0.;
for(unsigned int ix=0;ix<wgts.size();++ix) {
if(wgts[ix].first==0)
spinWgt += wgts[ix].second;
else
spinWgt += exp(double(wgts[ix].first)*ii*phi)*wgts[ix].second;
}
wgt = spinWgt.real();
if(wgt-1.>1e-10) {
generator()->log() << "Forward spin weight problem " << wgt << " " << wgt-1.
<< " " << ids[0]->id() << " " << ids[1]->id() << " " << ids[2]->id() << " " << " " << phi << "\n";
generator()->log() << "Weights \n";
for(unsigned int ix=0;ix<wgts.size();++ix)
generator()->log() << wgts[ix].first << " " << wgts[ix].second << "\n";
}
// soft correlations bit
double aziWgt = 1.;
if(softAllowed) {
Energy2 dot = pjk[0]+pjk[1]*cos(phi)+pjk[2]*sin(phi);
Energy Eg = Ek[0]+Ek[1]*cos(phi)+Ek[2]*sin(phi);
if(pipj*Eg>pik*Ej) {
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==1) {
aziWgt = (-m12/sqr(pik) -m22/sqr(dot) +2.*pipj/pik/dot)/aziMax;
}
else if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==2) {
aziWgt = max(ZERO,0.5/pik/Eg*(Ei-m12*Eg/pik + (pipj*Eg - Ej*pik)/dot)/aziMax);
}
if(aziWgt-1.>1e-10||aziWgt<-1e-10) {
generator()->log() << "Forward soft weight problem " << aziWgt << " " << aziWgt-1.
<< " " << ids[0]->id() << " " << ids[1]->id() << " " << ids[2]->id() << " " << " " << phi << "\n";
}
}
else {
aziWgt = 0.;
}
}
wgt *= aziWgt;
if(wgt>wgtMax) {
phiMax = phi;
wgtMax = wgt;
}
++ntry;
}
while(wgt<UseRandom::rnd()&&ntry<10000);
if(ntry==10000) {
generator()->log() << "Too many tries to generate phi in forward evolution\n";
phi = phiMax;
}
// return the azimuthal angle
return phi;
}
double SudakovFormFactor::generatePhiBackward(ShowerParticle & particle,
const IdList & ids,
ShoKinPtr kinematics,
const RhoDMatrix & rho) {
// no correlations, return flat phi
if(! dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->correlations())
return Constants::twopi*UseRandom::rnd();
// get the kinematic variables
double z = kinematics->z();
Energy2 t = (1.-z)*sqr(kinematics->scale())/z;
Energy pT = kinematics->pT();
// if soft correlations
bool softAllowed = dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations() &&
(ids[2]->id()==ParticleID::g || ids[2]->id()==ParticleID::gamma);
Energy2 pipj,pik,m12(ZERO),m22(ZERO);
array<Energy2,3> pjk;
Energy Ei,Ej,Ek;
InvEnergy2 aziMax(ZERO);
if(softAllowed) {
// find the partner for the soft correlations
tShowerParticlePtr partner=findCorrelationPartner(particle,false,splittingFn()->interactionType());
double zFact = (1.-z);
// compute the transforms to the shower reference frame
// first the boost
Lorentz5Momentum pVect = particle.showerBasis()->pVector();
Lorentz5Momentum nVect = particle.showerBasis()->nVector();
assert(particle.showerBasis()->frame()==ShowerBasis::BackToBack);
Boost beta_bb = -(pVect + nVect).boostVector();
pVect.boost(beta_bb);
nVect.boost(beta_bb);
Axis axis = pVect.vect().unit();
// and then the rotation
LorentzRotation rot;
if(axis.perp2()>0.) {
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
rot.rotate(acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
}
else if(axis.z()<0.) {
rot.rotate(Constants::pi,Axis(1.,0.,0.));
}
rot.invert();
pVect *= rot;
nVect *= rot;
// shower parameters
Energy2 pn = pVect*nVect;
Energy2 m2 = pVect.m2();
double alpha0 = particle.x();
double beta0 = -0.5/alpha0/pn*sqr(alpha0)*m2;
Lorentz5Momentum pj = partner->momentum();
pj.boost(beta_bb);
pj *= rot;
double beta2 = 0.5*(1.-zFact)*(sqr(alpha0*zFact/(1.-zFact))*m2+sqr(pT))/alpha0/zFact/pn;
// compute the two phi independent dot products
Energy2 dot1 = pj*pVect;
Energy2 dot2 = pj*nVect;
pipj = alpha0*dot1+beta0*dot2;
pik = alpha0*(alpha0*zFact/(1.-zFact)*m2+pn*(beta2+zFact/(1.-zFact)*beta0));
// compute the constants for the phi dependent dot product
pjk[0] = alpha0*zFact/(1.-zFact)*dot1+beta2*dot2;
pjk[1] = pj.x()*pT;
pjk[2] = pj.y()*pT;
m12 = ZERO;
m22 = sqr(partner->dataPtr()->mass());
Energy2 mag = sqrt(sqr(pjk[1])+sqr(pjk[2]));
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==1) {
aziMax = -m12/sqr(pik) -m22/sqr(pjk[0]+mag) +2.*pipj/pik/(pjk[0]-mag);
}
else if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==2) {
Ek = alpha0*zFact/(1.-zFact)*pVect.t()+beta2*nVect.t();
Ei = alpha0*pVect.t()+beta0*nVect.t();
Ej = pj.t();
if(pipj*Ek> Ej*pik) {
aziMax = 0.5/pik/Ek*(Ei-m12*Ek/pik + (pipj*Ek- Ej*pik)/(pjk[0]-mag));
}
else {
aziMax = 0.5/pik/Ek*(Ei-m12*Ek/pik);
}
}
else {
assert(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==0);
}
}
// if spin correlations
vector<pair<int,Complex> > wgts;
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->spinCorrelations()) {
// get the weights
wgts = splittingFn()->generatePhiBackward(z,t,ids,rho);
}
else {
wgts = {{ {0, 1.} }};
}
// generate the azimuthal angle
double phi,wgt;
static const Complex ii(0.,1.);
unsigned int ntry(0);
double phiMax(0.),wgtMax(0.);
do {
phi = Constants::twopi*UseRandom::rnd();
Complex spinWgt = 0.;
for(unsigned int ix=0;ix<wgts.size();++ix) {
if(wgts[ix].first==0)
spinWgt += wgts[ix].second;
else
spinWgt += exp(double(wgts[ix].first)*ii*phi)*wgts[ix].second;
}
wgt = spinWgt.real();
if(wgt-1.>1e-10) {
generator()->log() << "Backward weight problem " << wgt << " " << wgt-1.
<< " " << ids[0]->id() << " " << ids[1]->id() << " " << ids[2]->id() << " " << " " << z << " " << phi << "\n";
generator()->log() << "Weights \n";
for(unsigned int ix=0;ix<wgts.size();++ix)
generator()->log() << wgts[ix].first << " " << wgts[ix].second << "\n";
}
// soft correlations bit
double aziWgt = 1.;
if(softAllowed) {
Energy2 dot = pjk[0]+pjk[1]*cos(phi)+pjk[2]*sin(phi);
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==1) {
aziWgt = (-m12/sqr(pik) -m22/sqr(dot) +2.*pipj/pik/dot)/aziMax;
}
else if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==2) {
aziWgt = max(ZERO,0.5/pik/Ek*(Ei-m12*Ek/pik + pipj*Ek/dot - Ej*pik/dot)/aziMax);
}
if(aziWgt-1.>1e-10||aziWgt<-1e-10) {
generator()->log() << "Backward soft weight problem " << aziWgt << " " << aziWgt-1.
<< " " << ids[0]->id() << " " << ids[1]->id() << " " << ids[2]->id() << " " << " " << phi << "\n";
}
}
wgt *= aziWgt;
if(wgt>wgtMax) {
phiMax = phi;
wgtMax = wgt;
}
++ntry;
}
while(wgt<UseRandom::rnd()&&ntry<10000);
if(ntry==10000) {
generator()->log() << "Too many tries to generate phi in backward evolution\n";
phi = phiMax;
}
// return the azimuthal angle
return phi;
}
double SudakovFormFactor::generatePhiDecay(ShowerParticle & particle,
const IdList & ids,
ShoKinPtr kinematics,
const RhoDMatrix &) {
// only soft correlations in this case
// no correlations, return flat phi
if( !(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations() &&
(ids[2]->id()==ParticleID::g || ids[2]->id()==ParticleID::gamma )))
return Constants::twopi*UseRandom::rnd();
// get the kinematic variables
double z = kinematics->z();
Energy pT = kinematics->pT();
// if soft correlations
// find the partner for the soft correlations
tShowerParticlePtr partner = findCorrelationPartner(particle,true,splittingFn()->interactionType());
double zFact(1.-z);
// compute the transforms to the shower reference frame
// first the boost
Lorentz5Momentum pVect = particle.showerBasis()->pVector();
Lorentz5Momentum nVect = particle.showerBasis()->nVector();
assert(particle.showerBasis()->frame()==ShowerBasis::Rest);
Boost beta_bb = -pVect.boostVector();
pVect.boost(beta_bb);
nVect.boost(beta_bb);
Axis axis = nVect.vect().unit();
// and then the rotation
LorentzRotation rot;
if(axis.perp2()>0.) {
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
rot.rotate(acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
}
else if(axis.z()<0.) {
rot.rotate(Constants::pi,Axis(1.,0.,0.));
}
rot.invert();
pVect *= rot;
nVect *= rot;
// shower parameters
Energy2 pn = pVect*nVect;
Energy2 m2 = pVect.m2();
double alpha0 = particle.showerParameters().alpha;
double beta0 = 0.5/alpha0/pn*
(sqr(particle.dataPtr()->mass())-sqr(alpha0)*m2+sqr(particle.showerParameters().pt));
Lorentz5Momentum qperp0(particle.showerParameters().ptx,
particle.showerParameters().pty,ZERO,ZERO);
Lorentz5Momentum pj = partner->momentum();
pj.boost(beta_bb);
pj *= rot;
// compute the two phi independent dot products
Energy2 pik = 0.5*zFact*(sqr(alpha0)*m2 - sqr(particle.showerParameters().pt) + 2.*alpha0*beta0*pn )
+0.5*sqr(pT)/zFact;
Energy2 dot1 = pj*pVect;
Energy2 dot2 = pj*nVect;
Energy2 dot3 = pj*qperp0;
Energy2 pipj = alpha0*dot1+beta0*dot2+dot3;
// compute the constants for the phi dependent dot product
array<Energy2,3> pjk;
pjk[0] = zFact*(alpha0*dot1+dot3-0.5*dot2/pn*(alpha0*m2-sqr(particle.showerParameters().pt)/alpha0))
+0.5*sqr(pT)*dot2/pn/zFact/alpha0;
pjk[1] = (pj.x() - dot2/alpha0/pn*qperp0.x())*pT;
pjk[2] = (pj.y() - dot2/alpha0/pn*qperp0.y())*pT;
Energy2 m12 = sqr(particle.dataPtr()->mass());
Energy2 m22 = sqr(partner->dataPtr()->mass());
Energy2 mag = sqrt(sqr(pjk[1])+sqr(pjk[2]));
InvEnergy2 aziMax;
array<Energy,3> Ek;
Energy Ei,Ej;
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==1) {
aziMax = -m12/sqr(pik) -m22/sqr(pjk[0]+mag) +2.*pipj/pik/(pjk[0]-mag);
}
else if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==2) {
Ek[0] = zFact*(alpha0*pVect.t()+-0.5*nVect.t()/pn*(alpha0*m2-sqr(particle.showerParameters().pt)/alpha0))
+0.5*sqr(pT)*nVect.t()/pn/zFact/alpha0;
Ek[1] = -nVect.t()/alpha0/pn*qperp0.x()*pT;
Ek[2] = -nVect.t()/alpha0/pn*qperp0.y()*pT;
Energy mag2=sqrt(sqr(Ek[1])+sqr(Ek[2]));
Ei = alpha0*pVect.t()+beta0*nVect.t();
Ej = pj.t();
aziMax = 0.5/pik/(Ek[0]-mag2)*(Ei-m12*(Ek[0]-mag2)/pik + pipj*(Ek[0]+mag2)/(pjk[0]-mag) - Ej*pik/(pjk[0]-mag) );
}
else
assert(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==0);
// generate the azimuthal angle
double phi,wgt(0.);
unsigned int ntry(0);
double phiMax(0.),wgtMax(0.);
do {
phi = Constants::twopi*UseRandom::rnd();
Energy2 dot = pjk[0]+pjk[1]*cos(phi)+pjk[2]*sin(phi);
if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==1) {
wgt = (-m12/sqr(pik) -m22/sqr(dot) +2.*pipj/pik/dot)/aziMax;
}
else if(dynamic_ptr_cast<tcQTildeShowerHandlerPtr>(ShowerHandler::currentHandler())->softCorrelations()==2) {
if(qperp0.m2()==ZERO) {
wgt = 1.;
}
else {
Energy Eg = Ek[0]+Ek[1]*cos(phi)+Ek[2]*sin(phi);
wgt = max(ZERO,0.5/pik/Eg*(Ei-m12*Eg/pik + (pipj*Eg - Ej*pik)/dot)/aziMax);
}
}
if(wgt-1.>1e-10||wgt<-1e-10) {
generator()->log() << "Decay soft weight problem " << wgt << " " << wgt-1.
<< " " << ids[0]->id() << " " << ids[1]->id() << " " << ids[2]->id() << " " << " " << phi << "\n";
}
if(wgt>wgtMax) {
phiMax = phi;
wgtMax = wgt;
}
++ntry;
}
while(wgt<UseRandom::rnd()&&ntry<10000);
if(ntry==10000) {
phi = phiMax;
generator()->log() << "Too many tries to generate phi\n";
}
// return the azimuthal angle
return phi;
}
Energy SudakovFormFactor::calculateScale(double zin, Energy pt, IdList ids,
unsigned int iopt) {
Energy2 tmin;
initialize(ids,tmin);
// final-state branching
if(iopt==0) {
Energy2 scale=(sqr(pt)+masssquared_[1]*(1.-zin)+masssquared_[2]*zin);
if(ids[0]->id()!=ParticleID::g) scale -= zin*(1.-zin)*masssquared_[0];
scale /= sqr(zin*(1-zin));
return scale<=ZERO ? sqrt(tmin) : sqrt(scale);
}
else if(iopt==1) {
Energy2 scale=(sqr(pt)+zin*masssquared_[2])/sqr(1.-zin);
return scale<=ZERO ? sqrt(tmin) : sqrt(scale);
}
else if(iopt==2) {
Energy2 scale = (sqr(pt)+zin*masssquared_[2])/sqr(1.-zin)+masssquared_[0];
return scale<=ZERO ? sqrt(tmin) : sqrt(scale);
}
else {
throw Exception() << "Unknown option in SudakovFormFactor::calculateScale() "
<< "iopt = " << iopt << Exception::runerror;
}
}
diff --git a/Shower/QTilde/SplittingFunctions/ZeroZeroOneSplitFn.h b/Shower/QTilde/SplittingFunctions/ZeroZeroOneSplitFn.h
--- a/Shower/QTilde/SplittingFunctions/ZeroZeroOneSplitFn.h
+++ b/Shower/QTilde/SplittingFunctions/ZeroZeroOneSplitFn.h
@@ -1,186 +1,186 @@
// -*- C++ -*-
//
// ZeroZeroOneSplitFn.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ZeroZeroOneSplitFn_H
#define HERWIG_ZeroZeroOneSplitFn_H
//
// This is the declaration of the ZeroZeroOneSplitFn class.
//
#include "Herwig/Shower/QTilde/SplittingFunctions/SplittingFunction.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
* This class provides the concrete implementation of the exact leading-order
* splitting function for \f$\phi\to \phi g\f$.
*
* In this case the splitting function is given by
* \f[P(z,t) = 2C\left(\frac{z}{1-z}-\frac{m^2_\phi}{t}\right),\f]
* where \f$C\f$ is the corresponding colour factor.
* Our choice for the overestimate is
* \f[P_{\rm over}(z) = \frac{2C}{1-z},\f]
* therefore the integral is
* \f[\int P_{\rm over}(z) {\rm d}z = -2C\ln(1-z),\f]
* and its inverse is
* \f[1-\exp\left(\frac{r}{2C}\right).\f]
*
* @see \ref ZeroZeroOneSplitFnInterfaces "The interfaces"
* defined for ZeroZeroOneSplitFn.
*/
class ZeroZeroOneSplitFn: public SplittingFunction {
public:
/**
* Concrete implementation of the method to determine whether this splitting
* function can be used for a given set of particles.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual bool accept(const IdList & ids) const;
/**
* Methods to return the splitting function.
*/
//@{
/**
* The concrete implementation of the splitting function, \f$P\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
*/
virtual double P(const double z, const Energy2 t, const IdList & ids,
bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the overestimate of the splitting function,
* \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
*/
virtual double overestimateP(const double z, const IdList & ids) const;
/**
* The concrete implementation of the
* the ratio of the splitting function to the overestimate, i.e.
* \f$P(z,\tilde{q}^2)/P_{\rm over}(z)\f$.
* @param z The energy fraction.
* @param t The scale.
* @param ids The PDG codes for the particles in the splitting.
* @param mass Whether or not to include the mass dependent terms
*/
virtual double ratioP(const double z, const Energy2 t, const IdList & ids,
bool mass, const RhoDMatrix & rho) const;
/**
* The concrete implementation of the indefinite integral of the
* overestimated splitting function, \f$P_{\rm over}\f$.
* @param z The energy fraction.
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double integOverP(const double z, const IdList & ids,
unsigned int PDFfactor=0) const;
/**
* The concrete implementation of the inverse of the indefinite integral.
* @param r Value of the splitting function to be inverted
* @param ids The PDG codes for the particles in the splitting.
* @param PDFfactor Which additional factor to include for the PDF
* 0 is no additional factor,
* 1 is \f$1/z\f$, 2 is \f$1/(1-z)\f$ and 3 is \f$1/z/(1-z)\f$
*/
virtual double invIntegOverP(const double r, const IdList & ids,
unsigned int PDFfactor=0) const;
//@}
/**
* Method to calculate the azimuthal angle for forward evolution
* @param particle The particle which is branching
* @param showerkin The ShowerKinematics object
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiForward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Method to calculate the azimuthal angle for backward
* Shouldn't be needed and NOT IMPLEMENTED
* @param particle The particle which is branching
* @param showerkin The ShowerKinematics object
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
* @return The weight
*/
virtual vector<pair<int,Complex> >
generatePhiBackward(const double z, const Energy2 t, const IdList & ids,
const RhoDMatrix &);
/**
* Calculate the matrix element for the splitting
* @param particle The particle which is branching
* @param showerkin The ShowerKinematics object
* @param z The energy fraction
* @param t The scale \f$t=2p_j\cdot p_k\f$.
* @param ids The PDG codes for the particles in the splitting.
* @param The azimuthal angle, \f$\phi\f$.
*/
virtual DecayMEPtr matrixElement(const double z, const Energy2 t,
const IdList & ids, const double phi, bool timeLike);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZeroZeroOneSplitFn & operator=(const ZeroZeroOneSplitFn &);
+ ZeroZeroOneSplitFn & operator=(const ZeroZeroOneSplitFn &) = delete;
};
}
#endif /* HERWIG_ZeroZeroOneSplitFn_H */
diff --git a/Shower/ShowerAlpha.h b/Shower/ShowerAlpha.h
--- a/Shower/ShowerAlpha.h
+++ b/Shower/ShowerAlpha.h
@@ -1,150 +1,150 @@
// -*- C++ -*-
//
// ShowerAlpha.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ShowerAlpha_H
#define HERWIG_ShowerAlpha_H
//
// This is the declaration of the ShowerAlpha class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ShowerAlpha.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class is the abstract class from which all types of running couplings
* used in the Showering derive from.
* The main purpose of this class, and the ones that derive from it, is
* to allow systematic uncertainties for the initial-state radiation and,
* independently, the final-state radiation effects, to be evaluated.
*
* This is achieved by allowing a multiplicative factor,
* which is 1.0 for the "central value",
* for the scale argument, \f$\mu^2\f$, of the running coupling. This
* factor, \f$f\f$ is given by the scaleFactor() member and the coupling
* returned by the value() member is such that
* \f[\alpha(\mu^2)\to \alpha(f\times\mu^2).\f]
* This scale factor is a parameter which is settable by the user, via the
* interface.
* Although, of course, it is not clear my how much we should scale
* in order to get a \f$1\sigma\f$ systematic error (but factors:
* 1/2 and 2 are quite common), this method provides a double side error,
* and it appears more sensible than the rough and one-sided evaluation
* obtained
* via turning off the I.S.R. and/or F.S.R. (possibilities which are,
* anyway, provided by Herwig).
*
* @see \ref ShowerAlphaInterfaces "The interfaces"
* defined for ShowerAlpha.
*/
class ShowerAlpha: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ShowerAlpha() : _scaleFactor( 1.0 ) {}
//@}
public:
/**
* Methods to return the coupling and the scaleFactor
*/
//@{
/**
* Pure virtual method that is supposed to return the
* running alpha value evaluated at the input scale.
* @param scale The scale
* @return The coupling
*/
virtual double value(const Energy2 scale) const = 0;
/**
* Virtual method, which
* should be overridden in a derived class to provide an
* overestimate approximation of the alpha value.
*/
virtual double overestimateValue() const = 0;
/**
* Virtual method which returns the ratio of the running alpha
* value at the input scale to the overestimated value.
* @param scale The scale
* @return The ratio
*/
virtual double ratio(const Energy2 scale,double factor=1.) const = 0;
/**
* It returns the factor that multiplies the
* scale argument, \f$\mu^2\f$, of the running coupling.
* This is supposed to be <I>1.0</I> in normal conditions (central values)
* whereas different values can be useful for systematics evaluation
* for Initial State radiation or Final State radiation effects.
*/
double scaleFactor() const {return _scaleFactor;}
/**
* Initialize this coupling.
*/
virtual void initialize () {}
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerAlpha & operator=(const ShowerAlpha &);
+ ShowerAlpha & operator=(const ShowerAlpha &) = delete;
private:
/**
* The scale factor
*/
double _scaleFactor;
};
}
#endif /* HERWIG_ShowerAlpha_H */
diff --git a/Shower/ShowerEventRecord.h b/Shower/ShowerEventRecord.h
--- a/Shower/ShowerEventRecord.h
+++ b/Shower/ShowerEventRecord.h
@@ -1,319 +1,319 @@
// -*- C++ -*-
#ifndef Herwig_ShowerEventRecord_H
#define Herwig_ShowerEventRecord_H
//
// This is the declaration of the ShowerEventRecord class.
//
#include "ThePEG/Config/ThePEG.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/PDF/PDF.h"
#include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the ShowerEventRecord class.
*/
class ShowerEventRecord: public Base {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ShowerEventRecord();
/**
* The destructor.
*/
virtual ~ShowerEventRecord();
//@}
public:
/**
* Return the subprocess currently showered
*/
tSubProPtr subProcess() const { return subProcess_; }
/**
* Return the XComb describing the hard process.
*/
tStdXCombPtr xcombPtr() const { return XComb_; }
/**
* Set the XComb describing the hard process.
*/
void xcombPtr(tStdXCombPtr in) { XComb_ = in; }
/**
* Return the XComb describing the hard process.
*/
const StandardXComb& xcomb() const { return *XComb_; }
public:
/**
* Return the incoming partons at the current
* stage of the evolution.
*/
PPair& incoming() { return incoming_; }
/**
* Return the incoming partons at the current
* stage of the evolution.
*/
const PPair& incoming() const { return incoming_; }
/**
* Return the outgoing partons at the current
* stage of the evolution.
*/
PList& outgoing() { return outgoing_; }
/**
* Return the outgoing partons at the current
* stage of the evolution.
*/
const PList& outgoing() const { return outgoing_; }
/**
* Return the intermediate particles at the current
* stage of the evolution.
*/
PList& intermediates() { return intermediates_; }
/**
* Return the intermediate particles at the current
* stage of the evolution.
*/
const PList& intermediates() const { return intermediates_; }
/**
* Return the momentum fractions.
*/
const pair<double,double>& fractions() const { return fractions_; }
/**
* Return the momentum fractions.
*/
pair<double,double>& fractions() { return fractions_; }
/**
* Return the PDFs
*/
const pair<PDF,PDF>& pdfs() const { return PDFs_; }
public:
/** @name MC@NLO diagnostics */
//@{
/**
* True, if Matchbox MC@NLO S-event
*/
bool isMCatNLOSEvent() const { return isMCatNLOSEvent_; }
/**
* True, if matchbox MC@NLO H-event
*/
bool isMCatNLOHEvent() const { return isMCatNLOHEvent_; }
/**
* True, if Matchbox MC@NLO S-event
*/
bool isPowhegSEvent() const { return isPowhegSEvent_; }
/**
* True, if matchbox MC@NLO H-event
*/
bool isPowhegHEvent() const { return isPowhegHEvent_; }
/**
* True, if Matchbox MC@NLO S-event
*/
void isMCatNLOSEvent(bool in) { isMCatNLOSEvent_ = in; }
/**
* True, if matchbox MC@NLO H-event
*/
void isMCatNLOHEvent(bool in) { isMCatNLOHEvent_ = in; }
/**
* Access to the shower approximation
*/
Ptr<ShowerApproximation>::tptr showerApproximation() {
return showerApproximation_;
}
/**
* True if truncated shower required
*/
bool truncatedShower() const { return truncatedShower_; }
/**
* True if truncated shower required
*/
void truncatedShower(bool in) { truncatedShower_=in; }
//@}
public:
/**
* Clear the event record: Give up ownership
* on any object involved in the evolution.
*/
virtual void clear();
protected:
/**
* Set the subprocess
*/
void subProcess(tSubProPtr in) { subProcess_ = in; }
/**
* Return the PDFs
*/
pair<PDF,PDF>& pdfs() { return PDFs_; }
public:
/**
* Identify the type of event
*/
void identifyEventType();
protected:
/**
* Map of colour lines used to reset colours when inserted into the event
*/
map<ColinePtr,ColinePtr> & colourLines() {return colourLines_;}
/**
* Isolate the colour of the process from the rest of the event.
* Called in the constructor
*/
void colourIsolate(const vector<PPtr> & original, const vector<PPtr> & copy);
/**
* Update the colour information of a particle prior to insertion into the
* event record.
*/
void updateColour(PPtr particle, bool recursive);
/**
* Map the colours for a given particle
*/
void mapColour(PPtr original, PPtr copy);
private:
/**
* Isolate a specific colour line
*/
void isolateLine(vector<PPair>::const_iterator cit,
vector<PPair> & particles,
tcColinePtr oldline,
tColinePtr newline);
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerEventRecord & operator=(const ShowerEventRecord &);
+ ShowerEventRecord & operator=(const ShowerEventRecord &) = delete;
private:
/**
* The subprocess currently showered.
*/
SubProPtr subProcess_;
/**
* Pointer to the XComb which generated the hard process.
*/
StdXCombPtr XComb_;
/**
* The incoming partons at the current
* stage of the evolution.
*/
PPair incoming_;
/**
* The outgoing partons at the current stage of the evolution.
*/
PList outgoing_;
/**
* The intermediate particles at the current
* stage of the evolution.
*/
PList intermediates_;
/**
* The PDFs to be considered.
*/
pair<PDF,PDF> PDFs_;
/**
* Momentum fractions of the incoming partons.
*/
pair<double,double> fractions_;
private:
/**
* Type of event
*/
//@{
/**
* True, if Matchbox MC@NLO S-event
*/
bool isMCatNLOSEvent_;
/**
* True, if matchbox MC@NLO H-event
*/
bool isMCatNLOHEvent_;
/**
* True, if Matchbox Powheg S-event
*/
bool isPowhegSEvent_;
/**
* True, if matchbox Powheg H-event
*/
bool isPowhegHEvent_;
/**
* The shower approximation to provide the hard scale profile
*/
Ptr<ShowerApproximation>::tptr showerApproximation_;
/**
* Map of colour lines used to reset colours when inserted into the event
*/
map<ColinePtr,ColinePtr> colourLines_;
/**
* Whether or ont needs truncated shower
*/
bool truncatedShower_;
//@}
};
}
#endif /* Herwig_ShowerEventRecord_H */
diff --git a/Shower/ShowerHandler.cc b/Shower/ShowerHandler.cc
--- a/Shower/ShowerHandler.cc
+++ b/Shower/ShowerHandler.cc
@@ -1,1130 +1,1130 @@
// -*- C++ -*-
//
// ShowerHandler.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ShowerHandler class.
//
#include "ShowerHandler.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Command.h"
#include "ThePEG/PDF/PartonExtractor.h"
#include "ThePEG/PDF/PartonBinInstance.h"
#include "Herwig/PDT/StandardMatchers.h"
#include "ThePEG/Cuts/Cuts.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/Utilities/Throw.h"
#include "ThePEG/Utilities/StringUtils.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/Utilities/EnumParticles.h"
#include "Herwig/PDF/MPIPDF.h"
#include "Herwig/PDF/MinBiasPDF.h"
#include "ThePEG/Handlers/EventHandler.h"
#include "Herwig/PDF/HwRemDecayer.h"
#include <cassert>
#include "ThePEG/Utilities/DescribeClass.h"
#include "Herwig/Decay/DecayIntegrator.h"
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
using namespace Herwig;
DescribeClass<ShowerHandler,CascadeHandler>
describeShowerHandler ("Herwig::ShowerHandler","HwShower.so");
ShowerHandler::~ShowerHandler() {}
tShowerHandlerPtr ShowerHandler::currentHandler_ = tShowerHandlerPtr();
void ShowerHandler::doinit() {
CascadeHandler::doinit();
// copy particles to decay before showering from input vector to the
// set used in the simulation
if ( particlesDecayInShower_.empty() ) {
for(unsigned int ix=0;ix<inputparticlesDecayInShower_.size();++ix)
particlesDecayInShower_.insert(abs(inputparticlesDecayInShower_[ix]));
}
if ( profileScales() ) {
if ( profileScales()->unrestrictedPhasespace() &&
restrictPhasespace() ) {
generator()->log()
<< "ShowerApproximation warning: The scale profile chosen requires an unrestricted phase space,\n"
<< "however, the phase space was set to be restricted. Will switch to unrestricted phase space.\n"
<< flush;
restrictPhasespace_ = false;
}
}
}
IBPtr ShowerHandler::clone() const {
return new_ptr(*this);
}
IBPtr ShowerHandler::fullclone() const {
return new_ptr(*this);
}
ShowerHandler::ShowerHandler() :
maxtry_(10),maxtryMPI_(10),maxtryDP_(10),maxtryDecay_(100),
factorizationScaleFactor_(1.0),
renormalizationScaleFactor_(1.0),
hardScaleFactor_(1.0),
restrictPhasespace_(true), maxPtIsMuF_(false),
spinOpt_(1), pdfFreezingScale_(2.5*GeV),
doFSR_(true), doISR_(true),
splitHardProcess_(true),
includeSpaceTime_(false), vMin_(0.1*GeV2),
reweight_(1.0) {
inputparticlesDecayInShower_.push_back( 6 ); // top
inputparticlesDecayInShower_.push_back( 23 ); // Z0
inputparticlesDecayInShower_.push_back( 24 ); // W+/-
inputparticlesDecayInShower_.push_back( 25 ); // h0
}
void ShowerHandler::doinitrun(){
CascadeHandler::doinitrun();
//can't use isMPIOn here, because the EventHandler is not set at that stage
if(MPIHandler_) {
MPIHandler_->initialize();
if(MPIHandler_->softInt())
remDec_->initSoftInteractions(MPIHandler_->Ptmin(), MPIHandler_->beta());
}
}
void ShowerHandler::dofinish() {
CascadeHandler::dofinish();
if(MPIHandler_) MPIHandler_->finalize();
}
void ShowerHandler::persistentOutput(PersistentOStream & os) const {
os << remDec_ << ounit(pdfFreezingScale_,GeV) << maxtry_
<< maxtryMPI_ << maxtryDP_ << maxtryDecay_
<< inputparticlesDecayInShower_
<< particlesDecayInShower_ << MPIHandler_ << PDFA_ << PDFB_
<< PDFARemnant_ << PDFBRemnant_
<< includeSpaceTime_ << ounit(vMin_,GeV2)
<< factorizationScaleFactor_ << renormalizationScaleFactor_
<< hardScaleFactor_
<< restrictPhasespace_ << maxPtIsMuF_ << hardScaleProfile_
<< showerVariations_ << doFSR_ << doISR_ << splitHardProcess_
<< spinOpt_ << useConstituentMasses_;
}
void ShowerHandler::persistentInput(PersistentIStream & is, int) {
is >> remDec_ >> iunit(pdfFreezingScale_,GeV) >> maxtry_
>> maxtryMPI_ >> maxtryDP_ >> maxtryDecay_
>> inputparticlesDecayInShower_
>> particlesDecayInShower_ >> MPIHandler_ >> PDFA_ >> PDFB_
>> PDFARemnant_ >> PDFBRemnant_
>> includeSpaceTime_ >> iunit(vMin_,GeV2)
>> factorizationScaleFactor_ >> renormalizationScaleFactor_
>> hardScaleFactor_
>> restrictPhasespace_ >> maxPtIsMuF_ >> hardScaleProfile_
>> showerVariations_ >> doFSR_ >> doISR_ >> splitHardProcess_
>> spinOpt_ >> useConstituentMasses_;
}
void ShowerHandler::Init() {
static ClassDocumentation<ShowerHandler> documentation
("Main driver class for the showering.");
static Reference<ShowerHandler,HwRemDecayer>
interfaceRemDecayer("RemDecayer",
"A reference to the Remnant Decayer object",
&Herwig::ShowerHandler::remDec_,
false, false, true, false);
static Parameter<ShowerHandler,Energy> interfacePDFFreezingScale
("PDFFreezingScale",
"The PDF freezing scale",
&ShowerHandler::pdfFreezingScale_, GeV, 2.5*GeV, 2.0*GeV, 10.0*GeV,
false, false, Interface::limited);
static Parameter<ShowerHandler,unsigned int> interfaceMaxTry
("MaxTry",
"The maximum number of attempts for the main showering loop",
&ShowerHandler::maxtry_, 10, 1, 100,
false, false, Interface::limited);
static Parameter<ShowerHandler,unsigned int> interfaceMaxTryMPI
("MaxTryMPI",
"The maximum number of regeneration attempts for an additional scattering",
&ShowerHandler::maxtryMPI_, 10, 0, 100,
false, false, Interface::limited);
static Parameter<ShowerHandler,unsigned int> interfaceMaxTryDP
("MaxTryDP",
"The maximum number of regeneration attempts for an additional hard scattering",
&ShowerHandler::maxtryDP_, 10, 0, 100,
false, false, Interface::limited);
static ParVector<ShowerHandler,long> interfaceDecayInShower
("DecayInShower",
"PDG codes of the particles to be decayed in the shower",
&ShowerHandler::inputparticlesDecayInShower_, -1, 0l, -10000000l, 10000000l,
false, false, Interface::limited);
static Reference<ShowerHandler,UEBase> interfaceMPIHandler
("MPIHandler",
"The object that administers all additional scatterings.",
&ShowerHandler::MPIHandler_, false, false, true, true);
static Reference<ShowerHandler,PDFBase> interfacePDFA
("PDFA",
"The PDF for beam particle A. Overrides the particle's own PDF setting."
"By default used for both the shower and forced splitting in the remnant",
&ShowerHandler::PDFA_, false, false, true, true, false);
static Reference<ShowerHandler,PDFBase> interfacePDFB
("PDFB",
"The PDF for beam particle B. Overrides the particle's own PDF setting."
"By default used for both the shower and forced splitting in the remnant",
&ShowerHandler::PDFB_, false, false, true, true, false);
static Reference<ShowerHandler,PDFBase> interfacePDFARemnant
("PDFARemnant",
"The PDF for beam particle A used to generate forced splittings of the remnant."
" This overrides both the particle's own PDF setting and the value set by PDFA if used.",
&ShowerHandler::PDFARemnant_, false, false, true, true, false);
static Reference<ShowerHandler,PDFBase> interfacePDFBRemnant
("PDFBRemnant",
"The PDF for beam particle B used to generate forced splittings of the remnant."
" This overrides both the particle's own PDF setting and the value set by PDFB if used.",
&ShowerHandler::PDFBRemnant_, false, false, true, true, false);
static Switch<ShowerHandler,bool> interfaceIncludeSpaceTime
("IncludeSpaceTime",
"Whether to include the model for the calculation of space-time distances",
&ShowerHandler::includeSpaceTime_, false, false, false);
static SwitchOption interfaceIncludeSpaceTimeYes
(interfaceIncludeSpaceTime,
"Yes",
"Include the model",
true);
static SwitchOption interfaceIncludeSpaceTimeNo
(interfaceIncludeSpaceTime,
"No",
"Only include the displacement from the particle-s lifetime for decaying particles",
false);
static Parameter<ShowerHandler,Energy2> interfaceMinimumVirtuality
("MinimumVirtuality",
"The minimum virtuality for the space-time model",
&ShowerHandler::vMin_, GeV2, 0.1*GeV2, 0.0*GeV2, 1000.0*GeV2,
false, false, Interface::limited);
static Parameter<ShowerHandler,double> interfaceFactorizationScaleFactor
("FactorizationScaleFactor",
"The factorization scale factor.",
&ShowerHandler::factorizationScaleFactor_, 1.0, 0.0, 0,
false, false, Interface::lowerlim);
static Parameter<ShowerHandler,double> interfaceRenormalizationScaleFactor
("RenormalizationScaleFactor",
"The renormalization scale factor.",
&ShowerHandler::renormalizationScaleFactor_, 1.0, 0.0, 0,
false, false, Interface::lowerlim);
static Parameter<ShowerHandler,double> interfaceHardScaleFactor
("HardScaleFactor",
"The hard scale factor.",
&ShowerHandler::hardScaleFactor_, 1.0, 0.0, 0,
false, false, Interface::lowerlim);
static Parameter<ShowerHandler,unsigned int> interfaceMaxTryDecay
("MaxTryDecay",
"The maximum number of attempts to generate a decay",
&ShowerHandler::maxtryDecay_, 200, 10, 0,
false, false, Interface::lowerlim);
static Reference<ShowerHandler,HardScaleProfile> interfaceHardScaleProfile
("HardScaleProfile",
"The hard scale profile to use.",
&ShowerHandler::hardScaleProfile_, false, false, true, true, false);
static Switch<ShowerHandler,bool> interfaceMaxPtIsMuF
("MaxPtIsMuF",
"",
&ShowerHandler::maxPtIsMuF_, false, false, false);
static SwitchOption interfaceMaxPtIsMuFYes
(interfaceMaxPtIsMuF,
"Yes",
"",
true);
static SwitchOption interfaceMaxPtIsMuFNo
(interfaceMaxPtIsMuF,
"No",
"",
false);
static Switch<ShowerHandler,bool> interfaceRestrictPhasespace
("RestrictPhasespace",
"Switch on or off phasespace restrictions",
&ShowerHandler::restrictPhasespace_, true, false, false);
static SwitchOption interfaceRestrictPhasespaceYes
(interfaceRestrictPhasespace,
"Yes",
"Perform phasespace restrictions",
true);
static SwitchOption interfaceRestrictPhasespaceNo
(interfaceRestrictPhasespace,
"No",
"Do not perform phasespace restrictions",
false);
static Command<ShowerHandler> interfaceAddVariation
("AddVariation",
"Add a shower variation.",
&ShowerHandler::doAddVariation, false);
static Switch<ShowerHandler,bool> interfaceDoFSR
("DoFSR",
"Switch on or off final state radiation.",
&ShowerHandler::doFSR_, true, false, false);
static SwitchOption interfaceDoFSRYes
(interfaceDoFSR,
"Yes",
"Switch on final state radiation.",
true);
static SwitchOption interfaceDoFSRNo
(interfaceDoFSR,
"No",
"Switch off final state radiation.",
false);
static Switch<ShowerHandler,bool> interfaceDoISR
("DoISR",
"Switch on or off initial state radiation.",
&ShowerHandler::doISR_, true, false, false);
static SwitchOption interfaceDoISRYes
(interfaceDoISR,
"Yes",
"Switch on initial state radiation.",
true);
static SwitchOption interfaceDoISRNo
(interfaceDoISR,
"No",
"Switch off initial state radiation.",
false);
static Switch<ShowerHandler,bool> interfaceSplitHardProcess
("SplitHardProcess",
"Whether or not to try and split the hard process into production and decay processes",
&ShowerHandler::splitHardProcess_, true, false, false);
static SwitchOption interfaceSplitHardProcessYes
(interfaceSplitHardProcess,
"Yes",
"Split the hard process",
true);
static SwitchOption interfaceSplitHardProcessNo
(interfaceSplitHardProcess,
"No",
"Don't split the hard process",
false);
static Switch<ShowerHandler,unsigned int> interfaceSpinCorrelations
("SpinCorrelations",
"Treatment of spin correlations in the parton shower",
&ShowerHandler::spinOpt_, 1, false, false);
static SwitchOption interfaceSpinCorrelationsNo
(interfaceSpinCorrelations,
"No",
"No spin correlations",
0);
static SwitchOption interfaceSpinCorrelationsSpin
(interfaceSpinCorrelations,
"Yes",
"Include the azimuthal spin correlations",
1);
static Switch<ShowerHandler,bool> interfaceUseConstituentMasses
("UseConstituentMasses",
"Whether or not to use constituent masses for the reconstruction of the particle after showering.",
&ShowerHandler::useConstituentMasses_, true, false, false);
static SwitchOption interfaceUseConstituentMassesYes
(interfaceUseConstituentMasses,
"Yes",
"Use constituent masses.",
true);
static SwitchOption interfaceUseConstituentMassesNo
(interfaceUseConstituentMasses,
"No",
"Don't use constituent masses.",
false);
}
Energy ShowerHandler::hardScale() const {
assert(false);
}
void ShowerHandler::cascade() {
useMe();
// Initialise the weights in the event object
// so that any variations are output regardless of
// whether showering occurs for the given event
initializeWeights();
// get the PDF's from ThePEG (if locally overridden use the local versions)
tcPDFPtr first = PDFA_ ? tcPDFPtr(PDFA_) : firstPDF().pdf();
tcPDFPtr second = PDFB_ ? tcPDFPtr(PDFB_) : secondPDF().pdf();
resetPDFs(make_pair(first,second));
// set the PDFs for the remnant
if( ! rempdfs_.first)
rempdfs_.first = PDFARemnant_ ? PDFPtr(PDFARemnant_) : const_ptr_cast<PDFPtr>(first);
if( ! rempdfs_.second)
rempdfs_.second = PDFBRemnant_ ? PDFPtr(PDFBRemnant_) : const_ptr_cast<PDFPtr>(second);
// get the incoming partons
tPPair incomingPartons =
eventHandler()->currentCollision()->primarySubProcess()->incoming();
// and the parton bins
PBIPair incomingBins =
make_pair(lastExtractor()->partonBinInstance(incomingPartons.first),
lastExtractor()->partonBinInstance(incomingPartons.second));
// and the incoming hadrons
tPPair incomingHadrons =
eventHandler()->currentCollision()->incoming();
remnantDecayer()->setHadronContent(incomingHadrons);
// check if incoming hadron == incoming parton
// and get the incoming hadron if exists or parton otherwise
incoming_ = make_pair(incomingBins.first ?
incomingBins.first ->particle() : incomingPartons.first,
incomingBins.second ?
incomingBins.second->particle() : incomingPartons.second);
// check the collision is of the beam particles
// and if not boost collision to the right frame
// i.e. the hadron-hadron CMF of the collision
bool btotal(false);
LorentzRotation rtotal;
if(incoming_.first != incomingHadrons.first ||
incoming_.second != incomingHadrons.second ) {
btotal = true;
boostCollision(false);
}
// set the current ShowerHandler
setCurrentHandler();
// first shower the hard process
try {
SubProPtr sub = eventHandler()->currentCollision()->primarySubProcess();
incomingPartons = cascade(sub,lastXCombPtr());
}
catch(ShowerTriesVeto &veto){
throw Exception() << "Failed to generate the shower after "
<< veto.tries
<< " attempts in ShowerHandler::cascade()"
<< Exception::eventerror;
}
if(showerHardProcessVeto()) throw Veto();
// if a non-hadron collision return (both incoming non-hadronic)
if( ( !incomingBins.first||
!isResolvedHadron(incomingBins.first ->particle()))&&
( !incomingBins.second||
!isResolvedHadron(incomingBins.second->particle()))) {
// boost back to lab if needed
if(btotal) boostCollision(true);
// perform the reweighting for the hard process shower
combineWeights();
// unset the current ShowerHandler
unSetCurrentHandler();
return;
}
// get the remnants for hadronic collision
pair<tRemPPtr,tRemPPtr> remnants(getRemnants(incomingBins));
// set the starting scale of the forced splitting to the PDF freezing scale
remnantDecayer()->initialize(remnants, incoming_, *currentStep(), pdfFreezingScale());
// do the first forcedSplitting
try {
remnantDecayer()->doSplit(incomingPartons, make_pair(rempdfs_.first,rempdfs_.second), true);
}
catch (ExtraScatterVeto) {
throw Exception() << "Remnant extraction failed in "
<< "ShowerHandler::cascade() from primary interaction"
<< Exception::eventerror;
}
// perform the reweighting for the hard process shower
combineWeights();
// if no MPI return
if( !isMPIOn() ) {
remnantDecayer()->finalize();
// boost back to lab if needed
if(btotal) boostCollision(true);
// unset the current ShowerHandler
unSetCurrentHandler();
return;
}
// generate the multiple scatters use modified pdf's now:
setMPIPDFs();
// additional "hard" processes
unsigned int tries(0);
// This is the loop over additional hard scatters (most of the time
// only one, but who knows...)
for(unsigned int i=1; i <= getMPIHandler()->additionalHardProcs(); i++){
//counter for regeneration
unsigned int multSecond = 0;
// generate the additional scatters
while( multSecond < getMPIHandler()->multiplicity(i) ) {
// generate the hard scatter
tStdXCombPtr lastXC = getMPIHandler()->generate(i);
SubProPtr sub = lastXC->construct();
// add to the Step
newStep()->addSubProcess(sub);
// increment the counters
tries++;
multSecond++;
if(tries == maxtryDP_)
throw Exception() << "Failed to establish the requested number "
<< "of additional hard processes. If this error "
<< "occurs often, your selection of additional "
<< "scatter is probably unphysical"
<< Exception::eventerror;
// Generate the shower. If not possible veto the event
try {
incomingPartons = cascade(sub,lastXC);
}
catch(ShowerTriesVeto &veto){
throw Exception() << "Failed to generate the shower of "
<< "a secondary hard process after "
<< veto.tries
<< " attempts in Evolver::showerHardProcess()"
<< Exception::eventerror;
}
try {
// do the forcedSplitting
remnantDecayer()->doSplit(incomingPartons, make_pair(remmpipdfs_.first,remmpipdfs_.second), false);
}
catch(ExtraScatterVeto){
//remove all particles associated with the subprocess
newStep()->removeParticle(incomingPartons.first);
newStep()->removeParticle(incomingPartons.second);
//remove the subprocess from the list
newStep()->removeSubProcess(sub);
//regenerate the scattering
multSecond--;
continue;
}
// connect with the remnants but don't set Remnant colour,
// because that causes problems due to the multiple colour lines.
if ( !remnants.first ->extract(incomingPartons.first , false) ||
!remnants.second->extract(incomingPartons.second, false) )
throw Exception() << "Remnant extraction failed in "
<< "ShowerHandler::cascade() for additional scatter"
<< Exception::runerror;
}
// perform the reweighting for the additional hard scatter shower
combineWeights();
}
// the underlying event processes
unsigned int ptveto(1), veto(0);
unsigned int max(getMPIHandler()->multiplicity());
for(unsigned int i=0; i<max; i++) {
// check how often this scattering has been regenerated
if(veto > maxtryMPI_) break;
//generate PSpoint
tStdXCombPtr lastXC = getMPIHandler()->generate();
SubProPtr sub = lastXC->construct();
//If Algorithm=1 additional scatters of the signal type
// with pt > ptmin have to be vetoed
//with probability 1/(m+1), where m is the number of occurances in this event
if( getMPIHandler()->Algorithm() == 1 ){
//get the pT
Energy pt = sub->outgoing().front()->momentum().perp();
if(pt > getMPIHandler()->PtForVeto() && UseRandom::rnd() < 1./(ptveto+1) ){
ptveto++;
i--;
continue;
}
}
// add to the SubProcess to the step
newStep()->addSubProcess(sub);
// Run the Shower. If not possible veto the scattering
try {
incomingPartons = cascade(sub,lastXC);
}
// discard this extra scattering, but try the next one
catch(ShowerTriesVeto) {
newStep()->removeSubProcess(sub);
//regenerate the scattering
veto++;
i--;
continue;
}
try{
//do the forcedSplitting
remnantDecayer()->doSplit(incomingPartons, make_pair(remmpipdfs_.first,remmpipdfs_.second), false);
}
catch (ExtraScatterVeto) {
//remove all particles associated with the subprocess
newStep()->removeParticle(incomingPartons.first);
newStep()->removeParticle(incomingPartons.second);
//remove the subprocess from the list
newStep()->removeSubProcess(sub);
//regenerate the scattering
veto++;
i--;
continue;
}
//connect with the remnants but don't set Remnant colour,
//because that causes problems due to the multiple colour lines.
if ( !remnants.first ->extract(incomingPartons.first , false) ||
!remnants.second->extract(incomingPartons.second, false) )
throw Exception() << "Remnant extraction failed in "
<< "ShowerHandler::cascade() for MPI hard scattering"
<< Exception::runerror;
//reset veto counter
veto = 0;
// perform the reweighting for the MPI process shower
combineWeights();
}
// finalize the remnants
remnantDecayer()->finalize(getMPIHandler()->colourDisrupt(),
getMPIHandler()->softMultiplicity());
// boost back to lab if needed
if(btotal) boostCollision(true);
// unset the current ShowerHandler
unSetCurrentHandler();
getMPIHandler()->clean();
resetPDFs(make_pair(first,second));
}
void ShowerHandler::initializeWeights() {
if ( !showerVariations().empty() ) {
tEventPtr event = eventHandler()->currentEvent();
for ( map<string,ShowerVariation>::const_iterator var =
showerVariations().begin();
var != showerVariations().end(); ++var ) {
// Check that this is behaving as intended
//map<string,double>::iterator wi = event->optionalWeights().find(var->first);
//assert(wi == event->optionalWeights().end() );
event->optionalWeights()[var->first] = 1.0;
currentWeights_[var->first] = 1.0;
}
}
reweight_ = 1.0;
}
void ShowerHandler::resetWeights() {
for ( map<string,double>::iterator w = currentWeights_.begin();
w != currentWeights_.end(); ++w ) {
w->second = 1.0;
}
reweight_ = 1.0;
}
void ShowerHandler::combineWeights() {
tEventPtr event = eventHandler()->currentEvent();
for ( map<string,double>::const_iterator w =
currentWeights_.begin(); w != currentWeights_.end(); ++w ) {
map<string,double>::iterator ew = event->optionalWeights().find(w->first);
if ( ew != event->optionalWeights().end() )
ew->second *= w->second;
else {
assert(false && "Weight name unknown.");
//event->optionalWeights()[w->first] = w->second;
}
}
if ( reweight_ != 1.0 ) {
Ptr<StandardEventHandler>::tptr eh =
dynamic_ptr_cast<Ptr<StandardEventHandler>::tptr>(eventHandler());
if ( !eh ) {
throw Exception() << "ShowerHandler::combineWeights() : Cross section reweighting "
<< "through the shower is currently only available with standard "
<< "event generators" << Exception::runerror;
}
eh->reweight(reweight_);
}
}
string ShowerHandler::doAddVariation(string in) {
if ( in.empty() )
return "expecting a name and a variation specification";
string name = StringUtils::car(in);
ShowerVariation var;
string res = var.fromInFile(StringUtils::cdr(in));
if ( res.empty() ) {
if ( !var.firstInteraction && !var.secondaryInteractions ) {
// TODO what about decay showers?
return "variation does not apply to any shower";
}
if ( var.renormalizationScaleFactor == 1.0 &&
var.factorizationScaleFactor == 1.0 ) {
return "variation does not vary anything";
}
/*
Repository::clog() << "adding a variation with tag '" << name << "' using\nxir = "
<< var.renormalizationScaleFactor
<< " xif = "
<< var.factorizationScaleFactor
<< "\napplying to:\n"
<< "first interaction = " << var.firstInteraction << " "
<< "secondary interactions = " << var.secondaryInteractions << "\n"
<< flush;
*/
showerVariations()[name] = var;
}
return res;
}
tPPair ShowerHandler::cascade(tSubProPtr, XCPtr) {
assert(false);
}
ShowerHandler::RemPair
ShowerHandler::getRemnants(PBIPair incomingBins) {
RemPair remnants;
// first beam particle
if(incomingBins.first&&!incomingBins.first->remnants().empty()) {
remnants.first =
dynamic_ptr_cast<tRemPPtr>(incomingBins.first->remnants()[0] );
if(remnants.first) {
ParticleVector children=remnants.first->children();
for(unsigned int ix=0;ix<children.size();++ix) {
if(children[ix]->dataPtr()==remnants.first->dataPtr())
remnants.first = dynamic_ptr_cast<RemPPtr>(children[ix]);
}
//remove existing colour lines from the remnants
if(remnants.first->colourLine())
remnants.first->colourLine()->removeColoured(remnants.first);
if(remnants.first->antiColourLine())
remnants.first->antiColourLine()->removeAntiColoured(remnants.first);
}
}
// seconnd beam particle
if(incomingBins.second&&!incomingBins. second->remnants().empty()) {
remnants.second =
dynamic_ptr_cast<tRemPPtr>(incomingBins.second->remnants()[0] );
if(remnants.second) {
ParticleVector children=remnants.second->children();
for(unsigned int ix=0;ix<children.size();++ix) {
if(children[ix]->dataPtr()==remnants.second->dataPtr())
remnants.second = dynamic_ptr_cast<RemPPtr>(children[ix]);
}
//remove existing colour lines from the remnants
if(remnants.second->colourLine())
remnants.second->colourLine()->removeColoured(remnants.second);
if(remnants.second->antiColourLine())
remnants.second->antiColourLine()->removeAntiColoured(remnants.second);
}
}
assert(remnants.first || remnants.second);
return remnants;
}
namespace {
void addChildren(tPPtr in,set<tPPtr> & particles) {
particles.insert(in);
for(unsigned int ix=0;ix<in->children().size();++ix)
addChildren(in->children()[ix],particles);
}
}
void ShowerHandler::boostCollision(bool boost) {
// calculate boost from lab to rest
if(!boost) {
Lorentz5Momentum ptotal=incoming_.first ->momentum()+incoming_.second->momentum();
boost_ = LorentzRotation(-ptotal.boostVector());
Axis axis((boost_*incoming_.first ->momentum()).vect().unit());
if(axis.perp2()>0.) {
double sinth(sqrt(sqr(axis.x())+sqr(axis.y())));
boost_.rotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.));
}
}
// first call performs the boost and second inverse
// get the particles to be boosted
set<tPPtr> particles;
addChildren(incoming_.first,particles);
addChildren(incoming_.second,particles);
// apply the boost
for(set<tPPtr>::const_iterator cit=particles.begin();
cit!=particles.end();++cit) {
(*cit)->transform(boost_);
}
if(!boost) boost_.invert();
}
void ShowerHandler::setMPIPDFs() {
if ( !mpipdfs_.first ) {
// first have to check for MinBiasPDF
tcMinBiasPDFPtr first = dynamic_ptr_cast<tcMinBiasPDFPtr>(firstPDF().pdf());
if(first)
mpipdfs_.first = new_ptr(MPIPDF(first->originalPDF()));
else
mpipdfs_.first = new_ptr(MPIPDF(firstPDF().pdf()));
}
if ( !mpipdfs_.second ) {
tcMinBiasPDFPtr second = dynamic_ptr_cast<tcMinBiasPDFPtr>(secondPDF().pdf());
if(second)
mpipdfs_.second = new_ptr(MPIPDF(second->originalPDF()));
else
mpipdfs_.second = new_ptr(MPIPDF(secondPDF().pdf()));
}
if( !remmpipdfs_.first ) {
tcMinBiasPDFPtr first = dynamic_ptr_cast<tcMinBiasPDFPtr>(rempdfs_.first);
if(first)
remmpipdfs_.first = new_ptr(MPIPDF(first->originalPDF()));
else
remmpipdfs_.first = new_ptr(MPIPDF(rempdfs_.first));
}
if( !remmpipdfs_.second ) {
tcMinBiasPDFPtr second = dynamic_ptr_cast<tcMinBiasPDFPtr>(rempdfs_.second);
if(second)
remmpipdfs_.second = new_ptr(MPIPDF(second->originalPDF()));
else
remmpipdfs_.second = new_ptr(MPIPDF(rempdfs_.second));
}
// reset the PDFs stored in the base class
resetPDFs(mpipdfs_);
}
bool ShowerHandler::isResolvedHadron(tPPtr particle) {
if(!HadronMatcher::Check(particle->data())) return false;
for(unsigned int ix=0;ix<particle->children().size();++ix) {
if(particle->children()[ix]->id()==ParticleID::Remnant) return true;
}
return false;
}
namespace {
bool decayProduct(tSubProPtr subProcess,
tPPtr particle) {
// must be time-like and not incoming
if(particle->momentum().m2()<=ZERO||
particle == subProcess->incoming().first||
particle == subProcess->incoming().second) return false;
// if only 1 outgoing and this is it
if(subProcess->outgoing().size()==1 &&
subProcess->outgoing()[0]==particle) return true;
// must not be the s-channel intermediate otherwise
if(find(subProcess->incoming().first->children().begin(),
subProcess->incoming().first->children().end(),particle)!=
subProcess->incoming().first->children().end()&&
find(subProcess->incoming().second->children().begin(),
subProcess->incoming().second->children().end(),particle)!=
subProcess->incoming().second->children().end()&&
subProcess->incoming().first ->children().size()==1&&
subProcess->incoming().second->children().size()==1)
return false;
// if non-coloured this is enough
if(!particle->dataPtr()->coloured()) return true;
// if coloured must be unstable
if(particle->dataPtr()->stable()) return false;
// must not have same particle type as a child
int id = particle->id();
for(unsigned int ix=0;ix<particle->children().size();++ix)
if(particle->children()[ix]->id()==id) return false;
// otherwise its a decaying particle
return true;
}
PPtr findParent(PPtr original, bool & isHard,
set<PPtr> outgoingset,
tSubProPtr subProcess) {
PPtr parent=original;
isHard |=(outgoingset.find(original) != outgoingset.end());
if(!original->parents().empty()) {
PPtr orig=original->parents()[0];
if(decayProduct(subProcess,orig))
parent=findParent(orig,isHard,outgoingset,subProcess);
}
return parent;
}
}
void ShowerHandler::findDecayProducts(PPtr in,PerturbativeProcessPtr hard,
DecayProcessMap & decay) const {
ParticleVector children=in->children();
for(ParticleVector::const_iterator it=children.begin(); it!=children.end();++it) {
// if decayed or should be decayed in shower make the PerturbaitveProcess
bool radiates = false;
if(!(**it).children().empty()) {
// remove d,u,s,c,b quarks and leptons other than on-shell taus
if( StandardQCDPartonMatcher::Check((**it).id()) ||
( LeptonMatcher::Check((**it).id()) && !(abs((**it).id())==ParticleID::tauminus &&
abs((**it).mass()-(**it).dataPtr()->mass())<MeV))) {
radiates = true;
}
else {
bool foundParticle(false),foundGauge(false);
for(unsigned int iy=0;iy<(**it).children().size();++iy) {
if((**it).children()[iy]->id()==(**it).id()) {
foundParticle = true;
}
else if((**it).children()[iy]->id()==ParticleID::g ||
(**it).children()[iy]->id()==ParticleID::gamma) {
foundGauge = true;
}
}
radiates = foundParticle && foundGauge;
}
}
if(radiates) {
findDecayProducts(*it,hard,decay);
}
else if(!(**it).children().empty()||
(decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) {
createDecayProcess(*it,hard,decay);
}
else {
hard->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr()));
}
}
}
void ShowerHandler::splitHardProcess(tPVector tagged, PerturbativeProcessPtr & hard,
DecayProcessMap & decay) const {
// temporary storage of the particles
set<PPtr> hardParticles;
// tagged particles in a set
set<PPtr> outgoingset(tagged.begin(),tagged.end());
bool isHard=false;
// loop over the tagged particles
for (tParticleVector::const_iterator taggedP = tagged.begin();
taggedP != tagged.end(); ++taggedP) {
// skip remnants
if (eventHandler()->currentCollision()&&
eventHandler()->currentCollision()->isRemnant(*taggedP)) continue;
// find the parent and whether its a decaying particle
bool isDecayProd=false;
// check if hard
isHard |=(outgoingset.find(*taggedP) != outgoingset.end());
if(splitHardProcess_) {
tPPtr parent = *taggedP;
// check if from s channel decaying colourless particle
while(parent&&!parent->parents().empty()&&!isDecayProd) {
parent = parent->parents()[0];
if(parent == subProcess_->incoming().first ||
parent == subProcess_->incoming().second ) break;
isDecayProd = decayProduct(subProcess_,parent);
}
if (isDecayProd)
hardParticles.insert(findParent(parent,isHard,outgoingset,subProcess_));
}
if (!isDecayProd)
hardParticles.insert(*taggedP);
}
// there must be something to shower
if(hardParticles.empty())
throw Exception() << "No particles to shower in "
<< "ShowerHandler::splitHardProcess()"
<< Exception::eventerror;
// must be a hard process
if(!isHard)
throw Exception() << "Starting on decay not yet implemented in "
<< "ShowerHandler::splitHardProcess()"
<< Exception::runerror;
// create the hard process
hard = new_ptr(PerturbativeProcess());
// incoming particles
hard->incoming().push_back(make_pair(subProcess_->incoming().first ,PerturbativeProcessPtr()));
hard->incoming().push_back(make_pair(subProcess_->incoming().second,PerturbativeProcessPtr()));
// outgoing particles
for(set<PPtr>::const_iterator it=hardParticles.begin();it!=hardParticles.end();++it) {
// if decayed or should be decayed in shower make the tree
PPtr orig = *it;
bool radiates = false;
if(!orig->children().empty()) {
// remove d,u,s,c,b quarks and leptons other than on-shell taus
if( StandardQCDPartonMatcher::Check(orig->id()) ||
( LeptonMatcher::Check(orig->id()) &&
!(abs(orig->id())==ParticleID::tauminus && abs(orig->mass()-orig->dataPtr()->mass())<MeV))) {
radiates = true;
}
else {
bool foundParticle(false),foundGauge(false);
for(unsigned int iy=0;iy<orig->children().size();++iy) {
if(orig->children()[iy]->id()==orig->id()) {
foundParticle = true;
}
else if(orig->children()[iy]->id()==ParticleID::g ||
orig->children()[iy]->id()==ParticleID::gamma) {
foundGauge = true;
}
}
radiates = foundParticle && foundGauge;
}
}
if(radiates) {
findDecayProducts(orig,hard,decay);
}
else if(!(**it).children().empty()||
(decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) {
createDecayProcess(*it,hard,decay);
}
else {
hard->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr()));
}
}
}
void ShowerHandler::createDecayProcess(PPtr in,PerturbativeProcessPtr hard, DecayProcessMap & decay) const {
// there must be an incoming particle
assert(in);
// create the new process and connect with the parent
PerturbativeProcessPtr newDecay=new_ptr(PerturbativeProcess());
newDecay->incoming().push_back(make_pair(in,hard));
Energy width=in->dataPtr()->generateWidth(in->mass());
decay.insert(make_pair(width,newDecay));
hard->outgoing().push_back(make_pair(in,newDecay));
// we need to deal with the decay products if decayed
ParticleVector children = in->children();
if(!children.empty()) {
for(ParticleVector::const_iterator it = children.begin();
it!= children.end(); ++it) {
// if decayed or should be decayed in shower make the tree
in->abandonChild(*it);
bool radiates = false;
if(!(**it).children().empty()) {
if(StandardQCDPartonMatcher::Check((**it).id())||
(LeptonMatcher::Check((**it).id())&& !(abs((**it).id())==ParticleID::tauminus &&
abs((**it).mass()-(**it).dataPtr()->mass())<MeV))) {
radiates = true;
}
else {
bool foundParticle(false),foundGauge(false);
for(unsigned int iy=0;iy<(**it).children().size();++iy) {
if((**it).children()[iy]->id()==(**it).id()) {
foundParticle = true;
}
else if((**it).children()[iy]->id()==ParticleID::g ||
(**it).children()[iy]->id()==ParticleID::gamma) {
foundGauge = true;
}
}
radiates = foundParticle && foundGauge;
}
// finally assume all non-decaying particles are in this class
// pr 27/11/15 not sure about this bit
// if(!radiates) {
// radiates = !decaysInShower((**it).id());
// }
}
if(radiates) {
findDecayProducts(*it,newDecay,decay);
}
else if(!(**it).children().empty()||
(decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) {
createDecayProcess(*it,newDecay,decay);
}
else {
newDecay->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr()));
}
}
}
}
tDMPtr ShowerHandler::decay(PerturbativeProcessPtr process,
DecayProcessMap & decayMap,
bool radPhotons ) const {
PPtr parent = process->incoming()[0].first;
assert(parent);
if(parent->spinInfo()) parent->spinInfo()->decay(true);
unsigned int ntry = 0;
ParticleVector children;
tDMPtr dm = DMPtr();
while (true) {
// exit if fails
if (++ntry>=maxtryDecay_)
throw Exception() << "Failed to perform decay in ShowerHandler::decay()"
<< " after " << maxtryDecay_
<< " attempts for " << parent->PDGName()
<< Exception::eventerror;
// select decay mode
dm = parent->data().selectMode(*parent);
if(!dm)
throw Exception() << "Failed to select decay mode in ShowerHandler::decay()"
<< "for " << parent->PDGName()
<< Exception::eventerror;
if(!dm->decayer())
throw Exception() << "No Decayer for selected decay mode "
<< " in ShowerHandler::decay()"
<< Exception::runerror;
// start of try block
try {
children = dm->decayer()->decay(*dm, *parent);
// if no children have another go
if(children.empty()) continue;
if(radPhotons){
// generate radiation in the decay
tDecayIntegratorPtr hwdec=dynamic_ptr_cast<tDecayIntegratorPtr>(dm->decayer());
if (hwdec && hwdec->canGeneratePhotons())
children = hwdec->generatePhotons(*parent,children);
}
// set up parent
parent->decayMode(dm);
// add children
for (unsigned int i = 0, N = children.size(); i < N; ++i ) {
children[i]->setLabVertex(parent->labDecayVertex());
//parent->addChild(children[i]);
}
// if succeeded break out of loop
break;
}
catch(Veto) {
}
}
assert(!children.empty());
for(ParticleVector::const_iterator it = children.begin();
it!= children.end(); ++it) {
if(!(**it).children().empty()||
(decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) {
createDecayProcess(*it,process,decayMap);
}
else {
process->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr()));
}
}
return dm;
}
// Note: The tag must be constructed from an ordered particle container.
tDMPtr ShowerHandler::findDecayMode(const string & tag) const {
static map<string,DMPtr> cache;
map<string,DMPtr>::const_iterator pos = cache.find(tag);
if ( pos != cache.end() )
return pos->second;
tDMPtr dm = CurrentGenerator::current().findDecayMode(tag);
cache[tag] = dm;
return dm;
}
/**
* Operator for the particle ordering
* @param p1 The first ParticleData object
* @param p2 The second ParticleData object
*/
-bool ShowerHandler::ParticleOrdering::operator() (tcPDPtr p1, tcPDPtr p2) {
+bool ShowerHandler::ParticleOrdering::operator() (tcPDPtr p1, tcPDPtr p2) const {
return abs(p1->id()) > abs(p2->id()) ||
( abs(p1->id()) == abs(p2->id()) && p1->id() > p2->id() ) ||
( p1->id() == p2->id() && p1->fullName() > p2->fullName() );
}
diff --git a/Shower/ShowerHandler.h b/Shower/ShowerHandler.h
--- a/Shower/ShowerHandler.h
+++ b/Shower/ShowerHandler.h
@@ -1,898 +1,898 @@
// -*- C++ -*-
//
// ShowerHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ShowerHandler_H
#define HERWIG_ShowerHandler_H
//
// This is the declaration of the ShowerHandler class.
//
#include "ThePEG/Handlers/EventHandler.h"
#include "ThePEG/Handlers/CascadeHandler.h"
#include "ShowerVariation.h"
#include "Herwig/PDF/HwRemDecayer.fh"
#include "ThePEG/EventRecord/RemnantParticle.fh"
#include "UEBase.h"
#include "PerturbativeProcess.h"
#include "Herwig/MatrixElement/Matchbox/Matching/HardScaleProfile.h"
#include "ShowerHandler.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class is the main driver of the shower: it is responsible for
* the proper handling of all other specific collaborating classes
* and for the storing of the produced particles in the event record.
*
* @see \ref ShowerHandlerInterfaces "The interfaces"
*
* @see ThePEG::CascadeHandler
* @see MPIHandler
* @see HwRemDecayer
*/
class ShowerHandler: public CascadeHandler {
public:
/**
* Typedef for a pair of ThePEG::RemnantParticle pointers.
*/
typedef pair<tRemPPtr, tRemPPtr> RemPair;
public:
/**
* Default constructor
*/
ShowerHandler();
/**
* Destructor
*/
virtual ~ShowerHandler();
public:
/**
* The main method which manages the multiple interactions and starts
* the shower by calling cascade(sub, lastXC).
*/
virtual void cascade();
/**
* pointer to "this", the current ShowerHandler.
*/
static const tShowerHandlerPtr currentHandler() {
assert(currentHandler_);
return currentHandler_;
}
/**
* pointer to "this", the current ShowerHandler.
*/
static bool currentHandlerIsSet() {
return currentHandler_;
}
public:
/**
* Hook to allow vetoing of event after showering hard sub-process
* as in e.g. MLM merging.
*/
virtual bool showerHardProcessVeto() const { return false; }
/**
* Return true, if this cascade handler will perform reshuffling from hard
* process masses.
*/
virtual bool isReshuffling() const { return true; }
/**
* Return true, if this cascade handler will put the final state
* particles to their constituent mass. If false the nominal mass is used.
*/
virtual bool retConstituentMasses() const { return useConstituentMasses_; }
/**
* Return true, if the shower handler can generate a truncated
* shower for POWHEG style events generated using Matchbox
*/
virtual bool canHandleMatchboxTrunc() const { return false; }
/**
* Get the PDF freezing scale
*/
Energy pdfFreezingScale() const { return pdfFreezingScale_; }
/**
* Get the local PDFs.
*/
PDFPtr getPDFA() const {return PDFA_;}
/**
* Get the local PDFs.
*/
PDFPtr getPDFB() const {return PDFB_;}
/**
* Return true if currently the primary subprocess is showered.
*/
bool firstInteraction() const {
if (!eventHandler()->currentCollision())return true;
return ( subProcess_ ==
eventHandler()->currentCollision()->primarySubProcess() );
}
/**
* Return the remnant decayer.
*/
tHwRemDecPtr remnantDecayer() const { return remDec_; }
/**
* Split the hard process into production and decays
* @param tagged The tagged particles from the StepHandler
* @param hard The hard perturbative process
* @param decay The decay particles
*/
void splitHardProcess(tPVector tagged, PerturbativeProcessPtr & hard,
DecayProcessMap & decay) const;
/**
* Information if the Showerhandler splits the hard process.
*/
bool doesSplitHardProcess()const {return splitHardProcess_;}
/**
* Decay a particle.
* radPhotons switches the generation of photon
* radiation on/off.
* Required for Dipole Shower but not QTilde Shower.
*/
tDMPtr decay(PerturbativeProcessPtr,
DecayProcessMap & decay,
bool radPhotons = false) const;
/**
* Cached lookup of decay modes.
* Generator::findDecayMode() is not efficient.
*/
tDMPtr findDecayMode(const string & tag) const;
/**
* A struct to order the particles in the same way as in the DecayMode's
*/
struct ParticleOrdering {
- bool operator() (tcPDPtr p1, tcPDPtr p2);
+ bool operator() (tcPDPtr p1, tcPDPtr p2) const;
};
/**
* A container for ordered particles required
* for constructing tags for decay mode lookup.
*/
typedef multiset<tcPDPtr,ParticleOrdering> OrderedParticles;
public:
/**
* @name Switches for initial- and final-state radiation
*/
//@{
/**
* Switch for any radiation
*/
bool doRadiation() const {return doFSR_ || doISR_;}
/**
* Switch on or off final state radiation.
*/
bool doFSR() const { return doFSR_;}
/**
* Switch on or off initial state radiation.
*/
bool doISR() const { return doISR_;}
//@}
public:
/**
* @name Switches for scales
*/
//@{
/**
* Return true if maximum pt should be deduced from the factorization scale
*/
bool hardScaleIsMuF() const { return maxPtIsMuF_; }
/**
* The factorization scale factor.
*/
double factorizationScaleFactor() const {
return factorizationScaleFactor_;
}
/**
* The renormalization scale factor.
*/
double renFac() const {
return renormalizationScaleFactor_;
}
/**
* The factorization scale factor.
*/
double facFac() const {
return factorizationScaleFactor_;
}
/**
* The renormalization scale factor.
*/
double renormalizationScaleFactor() const {
return renormalizationScaleFactor_;
}
/**
* The scale factor for the hard scale
*/
double hardScaleFactor() const {
return hardScaleFactor_;
}
/**
* Return true, if the phase space restrictions of the dipole shower should
* be applied.
*/
bool restrictPhasespace() const { return restrictPhasespace_; }
/**
* Return profile scales
*/
Ptr<HardScaleProfile>::tptr profileScales() const { return hardScaleProfile_; }
/**
* Return the relevant hard scale to be used in the profile scales
*/
virtual Energy hardScale() const;
/**
* Return information about shower phase space choices
*/
virtual int showerPhaseSpaceOption() const {
assert(false && "not implemented in general");
return -1;
}
//@}
public:
/**
* Access the shower variations
*/
map<string,ShowerVariation>& showerVariations() {
return showerVariations_;
}
/**
* Return the shower variations
*/
const map<string,ShowerVariation>& showerVariations() const {
return showerVariations_;
}
/**
* Access the current Weights
*/
map<string,double>& currentWeights() {
return currentWeights_;
}
/**
* Return the current Weights
*/
const map<string,double>& currentWeights() const {
return currentWeights_;
}
/**
* Change the current reweighting factor
*/
void reweight(double w) {
reweight_ = w;
}
/**
* Return the current reweighting factor
*/
double reweight() const {
return reweight_;
}
public :
/**
* Access to switches for spin correlations
*/
//@{
/**
* Spin Correlations
*/
unsigned int spinCorrelations() const {
return spinOpt_;
}
/**
* Any correlations
*/
virtual bool correlations() const {
return spinOpt_!=0;
}
//@}
public:
/**
* struct that is used to catch exceptions which are thrown
* due to energy conservation issues of additional scatters
*/
struct ExtraScatterVeto {};
/**
* struct that is used to catch exceptions which are thrown
* due to fact that the Shower has been invoked more than
* a defined threshold on a certain configuration
*/
struct ShowerTriesVeto {
/** variable to store the number of attempts */
const int tries;
/** constructor */
ShowerTriesVeto(int t) : tries(t) {}
};
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Functions to perform the cascade
*/
//@{
/**
* The main method which manages the showering of a subprocess.
*/
virtual tPPair cascade(tSubProPtr sub, XCPtr xcomb);
/**
* Set up for the cascade
*/
void prepareCascade(tSubProPtr sub) {
current_ = currentStep();
subProcess_ = sub;
}
/**
* Boost all the particles in the collision so that the collision always occurs
* in the rest frame with the incoming particles along the z axis
*/
void boostCollision(bool boost);
//@}
protected:
/**
* Set/unset the current shower handler
*/
//@{
/**
* Set the current handler
*/
void setCurrentHandler() {
currentHandler_ = tShowerHandlerPtr(this);
}
/**
* Unset the current handler
*/
void unSetCurrentHandler() {
currentHandler_ = tShowerHandlerPtr();
}
//@}
protected:
/**
* @name Members relating to the underlying event and MPI
*/
//@{
/**
* Return true if multiple parton interactions are switched on
* and can be used for this beam setup.
*/
bool isMPIOn() const {
return MPIHandler_ && MPIHandler_->beamOK();
}
/**
* Access function for the MPIHandler, it should only be called after
* checking with isMPIOn.
*/
tUEBasePtr getMPIHandler() const {
assert(MPIHandler_);
return MPIHandler_;
}
/**
* Is a beam particle where hadronic structure is resolved
*/
bool isResolvedHadron(tPPtr);
/**
* Get the remnants from the ThePEG::PartonBinInstance es and
* do some checks.
*/
RemPair getRemnants(PBIPair incbins);
/**
* Reset the PDF's after the hard collision has been showered
*/
void setMPIPDFs();
//@}
public:
/**
* Check if a particle decays in the shower
* @param id The PDG code for the particle
*/
bool decaysInShower(long id) const {
return ( particlesDecayInShower_.find( abs(id) ) !=
particlesDecayInShower_.end() );
}
protected:
/**
* Members to handle splitting up of hard process and decays
*/
//@{
/**
* Find decay products from the hard process and create decay processes
* @param parent The parent particle
* @param hard The hard process
* @param decay The decay processes
*/
void findDecayProducts(PPtr parent, PerturbativeProcessPtr hard, DecayProcessMap & decay) const;
/**
* Find decay products from the hard process and create decay processes
* @param parent The parent particle
* @param hard The parent hard process
* @param decay The decay processes
*/
void createDecayProcess(PPtr parent,PerturbativeProcessPtr hard, DecayProcessMap & decay) const;
//@}
/**
* @name Functions to return information relevant to the process being showered
*/
//@{
/**
* Return the currently used SubProcess.
*/
tSubProPtr currentSubProcess() const {
assert(subProcess_);
return subProcess_;
}
/**
* Access to the incoming beam particles
*/
tPPair incomingBeams() const {
return incoming_;
}
//@}
protected:
/**
* Weight handling for shower variations
*/
//@
/**
* Combine the variation weights which have been encountered
*/
void combineWeights();
/**
* Initialise the weights in currentEvent()
*/
void initializeWeights();
/**
* Reset the current weights
*/
void resetWeights();
//@}
protected:
/**
* Return the maximum number of attempts for showering
* a given subprocess.
*/
unsigned int maxtry() const { return maxtry_; }
protected:
/**
* Parameters for the space-time model
*/
//@{
/**
* Whether or not to include spa-cetime distances in the shower
*/
bool includeSpaceTime() const {return includeSpaceTime_;}
/**
* The minimum virtuality for the space-time model
*/
Energy2 vMin() const {return vMin_;}
//@}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ShowerHandler & operator=(const ShowerHandler &);
+ ShowerHandler & operator=(const ShowerHandler &) = delete;
private:
/**
* pointer to "this", the current ShowerHandler.
*/
static tShowerHandlerPtr currentHandler_;
/**
* a MPIHandler to administer the creation of several (semihard)
* partonic interactions.
*/
UEBasePtr MPIHandler_;
/**
* Pointer to the HwRemDecayer
*/
HwRemDecPtr remDec_;
private:
/**
* Maximum tries for various stages of the showering process
*/
//@{
/**
* Maximum number of attempts for the
* main showering loop
*/
unsigned int maxtry_;
/**
* Maximum number of attempts for the regeneration of an additional
* scattering, before the number of scatters is reduced.
*/
unsigned int maxtryMPI_;
/**
* Maximum number of attempts for the regeneration of an additional
* hard scattering, before this event is vetoed.
*/
unsigned int maxtryDP_;
/**
* Maximum number of attempts to generate a decay
*/
unsigned int maxtryDecay_;
//@}
private:
/**
* Factors for the various scales
*/
//@{
/**
* The factorization scale factor.
*/
double factorizationScaleFactor_;
/**
* The renormalization scale factor.
*/
double renormalizationScaleFactor_;
/**
* The scale factor for the hard scale
*/
double hardScaleFactor_;
/**
* True, if the phase space restrictions of the dipole shower should
* be applied.
*/
bool restrictPhasespace_;
/**
* True if maximum pt should be deduced from the factorization scale
*/
bool maxPtIsMuF_;
/**
* The profile scales
*/
Ptr<HardScaleProfile>::ptr hardScaleProfile_;
//@}
/**
* Option to include spin correlations
*/
unsigned int spinOpt_;
private:
/**
* Storage of information about the current event
*/
//@{
/**
* The incoming beam particles for the current collision
*/
tPPair incoming_;
/**
* Boost to get back to the lab
*/
LorentzRotation boost_;
/**
* Const pointer to the currently handeled ThePEG::SubProcess
*/
tSubProPtr subProcess_;
/**
* Const pointer to the current step
*/
tcStepPtr current_;
//@}
private:
/**
* PDFs to be used for the various stages and related parameters
*/
//@{
/**
* The PDF freezing scale
*/
Energy pdfFreezingScale_;
/**
* PDFs to be used for the various stages and related parameters
*/
//@{
/**
* The PDF for beam particle A. Overrides the particle's own PDF setting.
*/
PDFPtr PDFA_;
/**
* The PDF for beam particle B. Overrides the particle's own PDF setting.
*/
PDFPtr PDFB_;
/**
* The PDF for beam particle A for remnant splitting. Overrides the particle's own PDF setting.
*/
PDFPtr PDFARemnant_;
/**
* The PDF for beam particle B for remnant splitting. Overrides the particle's own PDF setting.
*/
PDFPtr PDFBRemnant_;
/**
* The MPI PDF's to be used for secondary scatters.
*/
pair <PDFPtr, PDFPtr> mpipdfs_;
/**
* The MPI PDF's to be used for secondary scatters.
*/
pair <PDFPtr, PDFPtr> rempdfs_;
/**
* The MPI PDF's to be used for secondary scatters.
*/
pair <PDFPtr, PDFPtr> remmpipdfs_;
//@}
private:
/**
* @name Parameters for initial- and final-state radiation
*/
//@{
/**
* Switch on or off final state radiation.
*/
bool doFSR_;
/**
* Switch on or off initial state radiation.
*/
bool doISR_;
//@}
private:
/**
* @name Parameters for particle decays
*/
//@{
/**
* Whether or not to split into hard and decay trees
*/
bool splitHardProcess_;
/**
* PDG codes of the particles which decay during showering
* this is fast storage for use during running
*/
set<long> particlesDecayInShower_;
/**
* PDG codes of the particles which decay during showering
* this is a vector that is interfaced so they can be changed
*/
vector<long> inputparticlesDecayInShower_;
//@}
private:
/**
* Parameters for the space-time model
*/
//@{
/**
* Whether or not to include spa-cetime distances in the shower
*/
bool includeSpaceTime_;
/**
* The minimum virtuality for the space-time model
*/
Energy2 vMin_;
//@}
private:
/**
* Parameters for the constituent mass treatment.
*/
//@{
// True if shower should return constituent masses.
bool useConstituentMasses_=true;
//@}
private:
/**
* Parameters relevant for reweight and variations
*/
//@{
/**
* The shower variations
*/
map<string,ShowerVariation> showerVariations_;
/**
* Command to add a shower variation
*/
string doAddVariation(string);
/**
* A reweighting factor applied by the showering
*/
double reweight_;
/**
* The shower variation weights
*/
map<string,double> currentWeights_;
//@}
};
}
#endif /* HERWIG_ShowerHandler_H */
diff --git a/Shower/UEBase.h b/Shower/UEBase.h
--- a/Shower/UEBase.h
+++ b/Shower/UEBase.h
@@ -1,131 +1,131 @@
// -*- C++ -*-
#ifndef HERWIG_UEBase_H
#define HERWIG_UEBase_H
//
// This is the declaration of the UEBase class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/Handlers/StandardXComb.fh"
#include "UEBase.fh"
namespace Herwig {
using namespace ThePEG;
/**
* Abstract base class used to minimize the dependence between
* MPIHandler and all Shower classes.
*
* \author Manuel B\"ahr
*
* @see \ref UEBaseInterfaces "The interfaces"
* defined for UEBase.
*/
class UEBase: public Interfaced {
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/** @name Virtual functions used for the generation of additional
interactions . */
//@{
/**
* Some initialization code eventually.
*/
virtual void initialize() {}
/**
* Return true or false depending on the generator setup.
*/
virtual bool beamOK() const = 0;
/**
* Return true or false depending on whether soft interactions are enabled.
*/
virtual bool softInt() const {return false;}
/**
* Return the value of the pt cutoff.
*/
virtual Energy Ptmin() const = 0;
/**
* Return the slope of the soft pt spectrum. Only necessary when the
* soft part is modelled.
*/
virtual InvEnergy2 beta() const {return ZERO;}
/**
* Some finalize code eventually.
*/
virtual void finalize() {}
/**
* Clean up method called after each event.
*/
virtual void clean() {}
/**
* Return the number of different hard processes. Use 0 as default to
* not require implementation.
*/
virtual unsigned int additionalHardProcs() const {return 0;}
/**
* return the hard multiplicity of process i. Can't be constant in my
* case because drawing from the probability distribution also
* specifies the soft multiplicity that has to be stored....
*/
virtual unsigned int multiplicity(unsigned int i=0) = 0;
/**
* Generate a additional interaction for ProcessHandler sel. Method
* can't be const because it saves the state of the underlying XComb
* object on it's way.
*/
virtual tStdXCombPtr generate(unsigned int sel=0) = 0;
/**
* Return the type of algorithm.
*/
virtual int Algorithm() const = 0;
/**
* Return the value of the hard Process pt cutoff for vetoing.
*/
virtual Energy PtForVeto() const = 0;
/**
* Return the fraction of colour disrupted subprocesses. Use default 0
* so that it is not required to implement.
*/
virtual double colourDisrupt() const {return 0.0;}
/**
* Return the soft multiplicity. Use 0 as default to not require
* implementation.
*/
virtual unsigned int softMultiplicity() const {return 0;}
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- UEBase & operator=(const UEBase &);
+ UEBase & operator=(const UEBase &) = delete;
};
}
#endif /* HERWIG_UEBase_H */
diff --git a/Tests/DIS/DISTest.h b/Tests/DIS/DISTest.h
--- a/Tests/DIS/DISTest.h
+++ b/Tests/DIS/DISTest.h
@@ -1,104 +1,104 @@
// -*- C++ -*-
#ifndef HERWIG_DISTest_H
#define HERWIG_DISTest_H
//
// This is the declaration of the DISTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the DISTest class.
*
* @see \ref DISTestInterfaces "The interfaces"
* defined for DISTest.
*/
class DISTest: public AnalysisHandler {
public:
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- DISTest & operator=(const DISTest &);
+ DISTest & operator=(const DISTest &) = delete;
private:
HistogramPtr _q2,_ecmf, _nu,_x,_y,_phi;
};
}
#endif /* HERWIG_DISTest_H */
diff --git a/Tests/Gamma/GammaMETest.h b/Tests/Gamma/GammaMETest.h
--- a/Tests/Gamma/GammaMETest.h
+++ b/Tests/Gamma/GammaMETest.h
@@ -1,103 +1,103 @@
// -*- C++ -*-
#ifndef HERWIG_GammaMETest_H
#define HERWIG_GammaMETest_H
//
// This is the declaration of the GammaMETest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the GammaMETest class.
*
* @see \ref GammaMETestInterfaces "The interfaces"
* defined for GammaMETest.
*/
class GammaMETest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GammaMETest & operator=(const GammaMETest &);
+ GammaMETest & operator=(const GammaMETest &) = delete;
private:
/**
* Histograms
*/
map<int,HistogramPtr> _cos,_phi,_y,_pt;
};
}
#endif /* HERWIG_GammaMETest_H */
diff --git a/Tests/Gamma/GammaPMETest.h b/Tests/Gamma/GammaPMETest.h
--- a/Tests/Gamma/GammaPMETest.h
+++ b/Tests/Gamma/GammaPMETest.h
@@ -1,110 +1,110 @@
// -*- C++ -*-
#ifndef HERWIG_GammaPMETest_H
#define HERWIG_GammaPMETest_H
//
// This is the declaration of the GammaPMETest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the GammaPMETest class.
*
* @see \ref GammaPMETestInterfaces "The interfaces"
* defined for GammaPMETest.
*/
class GammaPMETest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GammaPMETest & operator=(const GammaPMETest &);
+ GammaPMETest & operator=(const GammaPMETest &) = delete;
private:
/**
* Histograms
*/
HistogramPtr _rap,_phi,_pt,_mhat,_yhat;
};
}
#endif /* HERWIG_GammaPMETest_H */
diff --git a/Tests/Hadron/HTest.h b/Tests/Hadron/HTest.h
--- a/Tests/Hadron/HTest.h
+++ b/Tests/Hadron/HTest.h
@@ -1,129 +1,129 @@
// -*- C++ -*-
#ifndef HERWIG_HTest_H
#define HERWIG_HTest_H
//
// This is the declaration of the HTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HTest class.
*
* @see \ref HTestInterfaces "The interfaces"
* defined for HTest.
*/
class HTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HTest & operator=(const HTest &);
+ HTest & operator=(const HTest &) = delete;
private:
HistogramPtr _higgspt,_jetpt;
HistogramPtr _yj[3];
HistogramPtr _yjyh[3];
HistogramPtr _njet[3];
};
}
#endif /* HERWIG_HTest_H */
diff --git a/Tests/Hadron/HadronVBFTest.h b/Tests/Hadron/HadronVBFTest.h
--- a/Tests/Hadron/HadronVBFTest.h
+++ b/Tests/Hadron/HadronVBFTest.h
@@ -1,109 +1,109 @@
// -*- C++ -*-
#ifndef HERWIG_HadronVBFTest_H
#define HERWIG_HadronVBFTest_H
//
// This is the declaration of the HadronVBFTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HadronVBFTest class.
*
* @see \ref HadronVBFTestInterfaces "The interfaces"
* defined for HadronVBFTest.
*/
class HadronVBFTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HadronVBFTest & operator=(const HadronVBFTest &);
+ HadronVBFTest & operator=(const HadronVBFTest &) = delete;
private:
HistogramPtr _mH ,_yH ,_pTH[2] ,_phiH ;
HistogramPtr _yjet,_pTjet[2],_phijet;
HistogramPtr _mjj;
};
}
#endif /* HERWIG_HadronVBFTest_H */
diff --git a/Tests/Hadron/HadronVVTest.h b/Tests/Hadron/HadronVVTest.h
--- a/Tests/Hadron/HadronVVTest.h
+++ b/Tests/Hadron/HadronVVTest.h
@@ -1,113 +1,113 @@
// -*- C++ -*-
#ifndef HERWIG_HadronVVTest_H
#define HERWIG_HadronVVTest_H
//
// This is the declaration of the HadronVVTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the HadronVVTest class.
*
* @see \ref HadronVVTestInterfaces "The interfaces"
* defined for HadronVVTest.
*/
class HadronVVTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- HadronVVTest & operator=(const HadronVVTest &);
+ HadronVVTest & operator=(const HadronVVTest &) = delete;
private:
/**
* Histograms
*/
HistogramPtr _ptWp ,_ptWm ,_ptZ;
HistogramPtr _rapWp,_rapWm,_rapZ;
HistogramPtr _phiWp,_phiWm,_phiZ;
HistogramPtr _mass;
};
}
#endif /* HERWIG_HadronVVTest_H */
diff --git a/Tests/Hadron/QQHTest.h b/Tests/Hadron/QQHTest.h
--- a/Tests/Hadron/QQHTest.h
+++ b/Tests/Hadron/QQHTest.h
@@ -1,138 +1,138 @@
// -*- C++ -*-
#ifndef HERWIG_QQHTest_H
#define HERWIG_QQHTest_H
//
// This is the declaration of the QQHTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the QQHTest class.
*
* @see \ref QQHTestInterfaces "The interfaces"
* defined for QQHTest.
*/
class QQHTest: public AnalysisHandler {
public:
/**
* The default constructor.
*/
QQHTest();
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- QQHTest & operator=(const QQHTest &);
+ QQHTest & operator=(const QQHTest &) = delete;
private:
HistogramPtr Qrap_,QBrap_,Hrap_;
HistogramPtr Qphi_,QBphi_,Hphi_;
HistogramPtr QpT_,QBpT_,HpT_;
HistogramPtr mass_;
HistogramPtr y12_,y13_,y23_;
int quarkFlavour_;
};
}
#endif /* HERWIG_QQHTest_H */
diff --git a/Tests/Hadron/VGammaTest.h b/Tests/Hadron/VGammaTest.h
--- a/Tests/Hadron/VGammaTest.h
+++ b/Tests/Hadron/VGammaTest.h
@@ -1,112 +1,112 @@
// -*- C++ -*-
#ifndef HERWIG_VGammaTest_H
#define HERWIG_VGammaTest_H
//
// This is the declaration of the VGammaTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VGammaTest class.
*
* @see \ref VGammaTestInterfaces "The interfaces"
* defined for VGammaTest.
*/
class VGammaTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VGammaTest & operator=(const VGammaTest &);
+ VGammaTest & operator=(const VGammaTest &) = delete;
private:
/**
* Histograms
*/
HistogramPtr _ptWp ,_ptWm ,_ptZ,_ptGamma;
HistogramPtr _rapWp,_rapWm,_rapZ,_rapGamma;
HistogramPtr _phiWp,_phiWm,_phiZ,_phiGamma;
HistogramPtr _mass;
};
}
#endif /* HERWIG_VGammaTest_H */
diff --git a/Tests/Hadron/VHTest.h b/Tests/Hadron/VHTest.h
--- a/Tests/Hadron/VHTest.h
+++ b/Tests/Hadron/VHTest.h
@@ -1,129 +1,129 @@
// -*- C++ -*-
#ifndef HERWIG_VHTest_H
#define HERWIG_VHTest_H
//
// This is the declaration of the VHTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VHTest class.
*
* @see \ref VHTestInterfaces "The interfaces"
* defined for VHTest.
*/
class VHTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VHTest & operator=(const VHTest &);
+ VHTest & operator=(const VHTest &) = delete;
private:
HistogramPtr _higgspt,_jetpt,_vpt,_vhpt;
HistogramPtr _yj[3];
HistogramPtr _yjyh[3],_yjyv[3],_yjyhv[3];
HistogramPtr _njet[3];
};
}
#endif /* HERWIG_VHTest_H */
diff --git a/Tests/Hadron/VTest.h b/Tests/Hadron/VTest.h
--- a/Tests/Hadron/VTest.h
+++ b/Tests/Hadron/VTest.h
@@ -1,129 +1,129 @@
// -*- C++ -*-
#ifndef HERWIG_VTest_H
#define HERWIG_VTest_H
//
// This is the declaration of the VTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VTest class.
*
* @see \ref VTestInterfaces "The interfaces"
* defined for VTest.
*/
class VTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VTest & operator=(const VTest &);
+ VTest & operator=(const VTest &) = delete;
private:
HistogramPtr _vpt,_jetpt;
HistogramPtr _yj[3];
HistogramPtr _yjyv[3];
HistogramPtr _njet[3];
};
}
#endif /* HERWIG_VTest_H */
diff --git a/Tests/Hadron/WHTest.h b/Tests/Hadron/WHTest.h
--- a/Tests/Hadron/WHTest.h
+++ b/Tests/Hadron/WHTest.h
@@ -1,107 +1,107 @@
// -*- C++ -*-
#ifndef HERWIG_WHTest_H
#define HERWIG_WHTest_H
//
// This is the declaration of the WHTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the WHTest class.
*
* @see \ref WHTestInterfaces "The interfaces"
* defined for WHTest.
*/
class WHTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- WHTest & operator=(const WHTest &);
+ WHTest & operator=(const WHTest &) = delete;
private:
HistogramPtr _mH,_mW[3],_ptH,_ptW[3],_yH,_yW[3],_phiH,_phiW[3],_ptl[4],_yl[4],_phil[4];
};
}
#endif /* HERWIG_WHTest_H */
diff --git a/Tests/Hadron/WJetTest.h b/Tests/Hadron/WJetTest.h
--- a/Tests/Hadron/WJetTest.h
+++ b/Tests/Hadron/WJetTest.h
@@ -1,104 +1,104 @@
// -*- C++ -*-
#ifndef HERWIG_WJetTest_H
#define HERWIG_WJetTest_H
//
// This is the declaration of the WJetTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the WJetTest class.
*
* @see \ref WJetTestInterfaces "The interfaces"
* defined for WJetTest.
*/
class WJetTest: public AnalysisHandler {
public:
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- WJetTest & operator=(const WJetTest &);
+ WJetTest & operator=(const WJetTest &) = delete;
private:
HistogramPtr _ptW[3],_mW[3],_yW[3],_phiW[3],_ptl[4],_yl[4],_phil[4];
};
}
#endif /* HERWIG_WJetTest_H */
diff --git a/Tests/Hadron/ZHTest.h b/Tests/Hadron/ZHTest.h
--- a/Tests/Hadron/ZHTest.h
+++ b/Tests/Hadron/ZHTest.h
@@ -1,107 +1,107 @@
// -*- C++ -*-
#ifndef HERWIG_ZHTest_H
#define HERWIG_ZHTest_H
//
// This is the declaration of the ZHTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the ZHTest class.
*
* @see \ref ZHTestInterfaces "The interfaces"
* defined for ZHTest.
*/
class ZHTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZHTest & operator=(const ZHTest &);
+ ZHTest & operator=(const ZHTest &) = delete;
private:
HistogramPtr _mH,_mZ,_ptH,_ptZ,_yH,_yZ,_phiH,_phiZ,_ptl[2],_yl[2],_phil[2];
};
}
#endif /* HERWIG_ZHTest_H */
diff --git a/Tests/Hadron/ZJetTest.h b/Tests/Hadron/ZJetTest.h
--- a/Tests/Hadron/ZJetTest.h
+++ b/Tests/Hadron/ZJetTest.h
@@ -1,104 +1,104 @@
// -*- C++ -*-
#ifndef HERWIG_ZJetTest_H
#define HERWIG_ZJetTest_H
//
// This is the declaration of the ZJetTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the ZJetTest class.
*
* @see \ref ZJetTestInterfaces "The interfaces"
* defined for ZJetTest.
*/
class ZJetTest: public AnalysisHandler {
public:
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ZJetTest & operator=(const ZJetTest &);
+ ZJetTest & operator=(const ZJetTest &) = delete;
private:
HistogramPtr _ptZ,_mZ,_yZ,_phiZ,_ptl[4],_yl[4],_phil[4];
};
}
#endif /* HERWIG_ZJetTest_H */
diff --git a/Tests/Lepton/FermionTest.h b/Tests/Lepton/FermionTest.h
--- a/Tests/Lepton/FermionTest.h
+++ b/Tests/Lepton/FermionTest.h
@@ -1,103 +1,103 @@
// -*- C++ -*-
#ifndef HERWIG_FermionTest_H
#define HERWIG_FermionTest_H
//
// This is the declaration of the FermionTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the FermionTest class.
*
* @see \ref FermionTestInterfaces "The interfaces"
* defined for FermionTest.
*/
class FermionTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- FermionTest & operator=(const FermionTest &);
+ FermionTest & operator=(const FermionTest &) = delete;
private:
/**
* Histograms
*/
map<int,HistogramPtr> _cos,_phi,_y,_pt;
};
}
#endif /* HERWIG_FermionTest_H */
diff --git a/Tests/Lepton/TopDecay.h b/Tests/Lepton/TopDecay.h
--- a/Tests/Lepton/TopDecay.h
+++ b/Tests/Lepton/TopDecay.h
@@ -1,125 +1,125 @@
// -*- C++ -*-
#ifndef HERWIG_TopDecay_H
#define HERWIG_TopDecay_H
//
// This is the declaration of the TopDecay class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the TopDecay class.
*
* @see \ref TopDecayInterfaces "The interfaces"
* defined for TopDecay.
*/
class TopDecay: public AnalysisHandler {
public:
/**
* The default constructor.
*/
TopDecay() : y3_(-4.,-1.,100) {}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- TopDecay & operator=(const TopDecay &);
+ TopDecay & operator=(const TopDecay &) = delete;
private:
Histogram y3_;
};
}
#endif /* HERWIG_TopDecay_H */
diff --git a/Tests/Lepton/VBFTest.h b/Tests/Lepton/VBFTest.h
--- a/Tests/Lepton/VBFTest.h
+++ b/Tests/Lepton/VBFTest.h
@@ -1,111 +1,111 @@
// -*- C++ -*-
#ifndef HERWIG_VBFTest_H
#define HERWIG_VBFTest_H
//
// This is the declaration of the VBFTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VBFTest class.
*
* @see \ref VBFTestInterfaces "The interfaces"
* defined for VBFTest.
*/
class VBFTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VBFTest & operator=(const VBFTest &);
+ VBFTest & operator=(const VBFTest &) = delete;
private:
HistogramPtr _mH ,_cosH ,_eH ,_phiH ;
HistogramPtr _cosnu ,_enu ,_phinu ;
HistogramPtr _cosnub,_enub,_phinub;
HistogramPtr _cosem ,_eem ,_phiem ;
HistogramPtr _cosep ,_eep ,_phiep ;
};
}
#endif /* HERWIG_VBFTest_H */
diff --git a/Tests/Lepton/VHTest.h b/Tests/Lepton/VHTest.h
--- a/Tests/Lepton/VHTest.h
+++ b/Tests/Lepton/VHTest.h
@@ -1,107 +1,107 @@
// -*- C++ -*-
#ifndef HERWIG_VHTest_H
#define HERWIG_VHTest_H
//
// This is the declaration of the VHTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VHTest class.
*
* @see \ref VHTestInterfaces "The interfaces"
* defined for VHTest.
*/
class VHTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const {return new_ptr(*this);}
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VHTest & operator=(const VHTest &);
+ VHTest & operator=(const VHTest &) = delete;
private:
HistogramPtr _mH,_mZ,_thetaH,_thetaZ,_phiH,_phiZ,_thetal[2],_phil[2];
};
}
#endif /* HERWIG_VHTest_H */
diff --git a/Tests/Lepton/VVTest.h b/Tests/Lepton/VVTest.h
--- a/Tests/Lepton/VVTest.h
+++ b/Tests/Lepton/VVTest.h
@@ -1,111 +1,111 @@
// -*- C++ -*-
#ifndef HERWIG_VVTest_H
#define HERWIG_VVTest_H
//
// This is the declaration of the VVTest class.
//
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "Herwig/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VVTest class.
*
* @see \ref VVTestInterfaces "The interfaces"
* defined for VVTest.
*/
class VVTest: public AnalysisHandler {
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
//@}
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- VVTest & operator=(const VVTest &);
+ VVTest & operator=(const VVTest &) = delete;
private:
/**
* Histograms
*/
HistogramPtr _cosWp,_cosWm,_cosZ;
HistogramPtr _phiWp,_phiWm,_phiZ;
};
}
#endif /* HERWIG_VVTest_H */
diff --git a/Tests/Makefile.am b/Tests/Makefile.am
--- a/Tests/Makefile.am
+++ b/Tests/Makefile.am
@@ -1,389 +1,370 @@
AM_LDFLAGS += -module -avoid-version -rpath /dummy/path/not/used
EXTRA_DIST = Inputs python Rivet
EXTRA_LTLIBRARIES = LeptonTest.la GammaTest.la HadronTest.la DISTest.la
if WANT_LIBFASTJET
EXTRA_LTLIBRARIES += HadronJetTest.la LeptonJetTest.la
HadronJetTest_la_SOURCES = \
Hadron/VHTest.h Hadron/VHTest.cc\
Hadron/VTest.h Hadron/VTest.cc\
Hadron/HTest.h Hadron/HTest.cc
HadronJetTest_la_CPPFLAGS = $(AM_CPPFLAGS) $(FASTJETINCLUDE) \
-I$(FASTJETPATH)
HadronJetTest_la_LIBADD = $(FASTJETLIBS)
LeptonJetTest_la_SOURCES = \
Lepton/TopDecay.h Lepton/TopDecay.cc
LeptonJetTest_la_CPPFLAGS = $(AM_CPPFLAGS) $(FASTJETINCLUDE) \
-I$(FASTJETPATH)
LeptonJetTest_la_LIBADD = $(FASTJETLIBS)
endif
LeptonTest_la_SOURCES = \
Lepton/VVTest.h Lepton/VVTest.cc \
Lepton/VBFTest.h Lepton/VBFTest.cc \
Lepton/VHTest.h Lepton/VHTest.cc \
Lepton/FermionTest.h Lepton/FermionTest.cc
GammaTest_la_SOURCES = \
Gamma/GammaMETest.h Gamma/GammaMETest.cc \
Gamma/GammaPMETest.h Gamma/GammaPMETest.cc
DISTest_la_SOURCES = \
DIS/DISTest.h DIS/DISTest.cc
HadronTest_la_SOURCES = \
Hadron/HadronVVTest.h Hadron/HadronVVTest.cc\
Hadron/HadronVBFTest.h Hadron/HadronVBFTest.cc\
Hadron/WHTest.h Hadron/WHTest.cc\
Hadron/ZHTest.h Hadron/ZHTest.cc\
Hadron/VGammaTest.h Hadron/VGammaTest.cc\
Hadron/ZJetTest.h Hadron/ZJetTest.cc\
Hadron/WJetTest.h Hadron/WJetTest.cc\
Hadron/QQHTest.h Hadron/QQHTest.cc
REPO = $(top_builddir)/src/HerwigDefaults.rpo
HERWIG = $(top_builddir)/src/Herwig
HWREAD = $(HERWIG) read --repo $(REPO) -L $(builddir)/.libs -i $(top_builddir)/src
HWBUILD = $(HERWIG) build --repo $(REPO) -L $(builddir)/.libs -i $(top_builddir)/src
HWINTEGRATE = $(HERWIG) integrate
HWRUN = $(HERWIG) run -N $${NUMEVENTS:-10000}
tests : tests-LEP tests-DIS tests-LHC tests-Gamma
LEPDEPS = \
test-LEP-VV \
test-LEP-VH \
test-LEP-VBF \
test-LEP-BB \
test-LEP-Quarks \
test-LEP-Leptons
if WANT_LIBFASTJET
LEPDEPS += test-LEP-TopDecay
endif
tests-LEP : $(LEPDEPS)
tests-DIS : test-DIS-Charged test-DIS-Neutral
LHCDEPS = \
test-LHC-WW test-LHC-WZ test-LHC-ZZ \
test-LHC-ZGamma test-LHC-WGamma \
test-LHC-ZH test-LHC-WH \
test-LHC-ZJet test-LHC-WJet \
test-LHC-Z test-LHC-W \
test-LHC-ZZVBF test-LHC-VBF \
test-LHC-WWVBF \
test-LHC-bbH test-LHC-ttH \
test-LHC-GammaGamma test-LHC-GammaJet \
test-LHC-Higgs test-LHC-HiggsJet \
test-LHC-QCDFast test-LHC-QCD \
test-LHC-Top
if WANT_LIBFASTJET
LHCDEPS += \
test-LHC-Bottom \
test-LHC-WHJet test-LHC-ZHJet test-LHC-HJet \
test-LHC-ZShower test-LHC-WShower \
test-LHC-WHJet-Powheg test-LHC-ZHJet-Powheg test-LHC-HJet-Powheg \
test-LHC-ZShower-Powheg test-LHC-WShower-Powheg
endif
tests-LHC : $(LHCDEPS)
tests-Gamma : test-Gamma-FF test-Gamma-WW test-Gamma-P
LEPLIBS = LeptonTest.la
HADLIBS = HadronTest.la
if WANT_LIBFASTJET
LEPLIBS += LeptonJetTest.la
HADLIBS += HadronJetTest.la
endif
test-LEP-% : Inputs/LEP-%.in $(LEPLIBS)
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<))
test-Gamma-% : Inputs/Gamma-%.in GammaTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<))
test-DIS-% : Inputs/DIS-%.in DISTest.la
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<))
test-LHC-% : Inputs/LHC-%.in GammaTest.la $(HADLIBS)
$(HWREAD) $<
$(HWRUN) $(notdir $(subst .in,.run,$<))
tests-Rivet : Rivet-LEP Rivet-BFactory Rivet-DIS Rivet-Star Rivet-SppS \
Rivet-TVT-WZ Rivet-TVT-Photon Rivet-TVT-Jets \
Rivet-LHC-Jets Rivet-LHC-EW Rivet-LHC-Photon Rivet-LHC-Higgs
Rivet-%.run : Rivet/%.in
$(HWBUILD) -c .cache/$(subst .run,,$@) $<
Rivet-Matchbox-%.yoda : Rivet-Matchbox-%.run
$(HWINTEGRATE) -c .cache/$(subst .run,,$<) $<
$(HWRUN) -c .cache/$(subst .run,,$<) $<
Rivet-%.yoda : Rivet-%.run
$(HWRUN) $<
Rivet/%.in :
python/make_input_files.py $(notdir $(subst .in,,$@))
Rivet-inputfiles: $(shell echo Rivet/LEP{,-Powheg,-Matchbox,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox-Powheg,-Merging}-{9.4,12,13,17,27.6,29,30.2,30.7,30.75,30,31.3,34.8,43.6,50,52,55,56,57,60.8,60,61.4,10,12.8,22,26.8,35,44,48.0,91,93.0,130,133,136,161,172,177,183,189,192,196,197,200,202,206,91-nopi}.in) \
$(shell echo Rivet/LEP{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Powheg,-Matchbox-Powheg}-14.in) \
$(shell echo Rivet/LEP{,-Dipole}-{10.5,11.96,12.8,13.96,16.86,21.84,26.8,28.48,35.44,48.0,97.0}-gg.in) \
$(shell echo Rivet/BFactory{,-Powheg,-Matchbox,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox-Powheg}-{10.52,10.52-sym,10.54,10.45}.in) \
$(shell echo Rivet/BFactory{,-Dipole}-{Upsilon,Upsilon2,Upsilon4,Tau,10.58-res}.in) \
$(shell echo Rivet/DIS{,-NoME,-Powheg,-Matchbox,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox-Powheg,-Merging}-{e--LowQ2,e+-LowQ2,e+-HighQ2}.in) \
$(shell echo Rivet/TVT{,-Powheg,-Matchbox,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox-Powheg,-Merging}-{Run-I-Z,Run-I-W,Run-I-WZ,Run-II-Z-e,Run-II-Z-{,LowMass-,HighMass-}mu,Run-II-W}.in) \
$(shell echo Rivet/TVT{,-Dipole}-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet,PromptPhoton}.in) \
$(shell echo Rivet/TVT-Powheg-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet}.in) \
$(shell echo Rivet/TVT{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-{Run-II-Jets-{0..11},Run-I-Jets-{1..8}}.in ) \
$(shell echo Rivet/TVT{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-{630-Jets-{1..3},300-Jets-1,900-Jets-1}.in ) \
$(shell echo Rivet/TVT{,-Dipole}-{Run-I,Run-II,300,630,900}-UE.in) \
$(shell echo Rivet/LHC{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-7-DiJets-{1..7}-{A,B,C}.in ) \
$(shell echo Rivet/LHC{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-{7,8,13}-Jets-{0..10}.in ) \
$(shell echo Rivet/LHC{,-Dipole}-{900,2360,2760,7,8,13}-UE.in ) \
$(shell echo Rivet/LHC{,-Dipole}-{900,7,13}-UE-Long.in ) \
$(shell echo Rivet/LHC{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-7-Charm-{1..5}.in) \
$(shell echo Rivet/LHC{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-7-Bottom-{0..8}.in) \
- $(shell echo Rivet/LHC{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-{7,8,13}-Top-{All,L,SL}.in) \
+ $(shell echo Rivet/LHC{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-7-Top-{L,SL}.in) \
+ $(shell echo Rivet/LHC{,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Matchbox,-Matchbox-Powheg,-Merging}-{8,13}-Top-{All,L,SL}.in) \
$(shell echo Rivet/Star{,-Dipole}-{UE,Jets-{1..4}}.in ) \
$(shell echo Rivet/SppS{,-Dipole}-{200,500,900,546}-UE.in ) \
$(shell echo Rivet/LHC{,-Matchbox,-Matchbox-Powheg,-Powheg,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Merging}-{W-{e,mu},13-Z-{e,mu},Z-HighMass{1,2}-e,{8,13}-W-mu,8-Z-Mass{1..4}-{e,mu},Z-{e,mu,mu-SOPHTY},Z-LowMass-{e,mu},Z-MedMass-e,WZ,WW-{emu,ll},ZZ-{ll,lv},{8,13}-WZ,8-ZZ-lv,8-WW-ll,W-Z-{e,mu}}.in) \
$(shell echo Rivet/LHC{,-Dipole}-7-{W,Z}Gamma-{e,mu}.in) \
$(shell echo Rivet/LHC{,-Matchbox,-Matchbox-Powheg,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Merging}-{7-W-Jet-{1..3}-e,7-Z-Jet-{0..3}-e,7-Z-Jet-0-mu}.in) \
$(shell echo Rivet/LHC{-Matchbox,-Matchbox-Powheg,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Merging}-{Z-b,Z-bb,8-Z-b,8-Z-bb,W-b,8-Z-jj}.in) \
- $(shell echo Rivet/LHC{,-Dipole}-{7,8}-PromptPhoton-{1..4}.in) Rivet/LHC-GammaGamma-7.in \
+ $(shell echo Rivet/LHC{,-Dipole}-{7,8,13}-PromptPhoton-{1..4}.in) Rivet/LHC-GammaGamma-7.in \
$(shell echo Rivet/LHC{,-Powheg}-{7,8}-{DiPhoton-GammaGamma,DiPhoton-GammaJet}.in) \
$(shell echo Rivet/LHC{,-Powheg,-Matchbox,-Matchbox-Powheg,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Merging}-{ggH,VBF,WH,ZH}.in) \
$(shell echo Rivet/LHC{,-Powheg,-Matchbox,-Matchbox-Powheg,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Merging}-8-{{ggH,VBF,WH,ZH}{,-GammaGamma},ggH-WW}.in) \
$(shell echo Rivet/LHC{,-Matchbox,-Matchbox-Powheg,-Dipole,-Dipole-MCatNLO,-Dipole-Matchbox-Powheg,-Merging}-ggHJet.in)
# $(shell echo Rivet/ISR-{30,44,53,62}-UE.in ) $(shell echo Rivet/SppS-{53,63}-UE.in )
Rivet-LEP : Rivet-LEP/done
touch $@
Rivet-LEP/done : $(shell echo Rivet-LEP-{9.4,12,13,14,17,27.6,29,30.2,30.7,30.75,30,31.3,34.8,43.6,50,52,55,56,57,60.8,60,61.4,10,12.8,22,26.8,35,44,48.0,91,93.0,130,133,136,161,172,177,183,189,192,196,197,200,202,206,91-nopi}.yoda) \
$(shell echo Rivet-LEP-{10.5,11.96,12.8,13.96,16.86,21.84,26.8,28.48,35.44,48.0,97.0}-gg.yoda)
rm -rf Rivet-LEP
python/merge-LEP --with-gg LEP
rivet-mkhtml -o Rivet-LEP LEP.yoda:Hw
touch $@
Rivet-BFactory : Rivet-BFactory/done
touch $@
Rivet-BFactory/done: $(shell echo Rivet-BFactory-{10.52,10.52-sym,10.54,10.45,Upsilon,Upsilon2,Upsilon4,Tau,10.58-res,10.58}.yoda)
rm -rf Rivet-BFactory
python/merge-BFactory BFactory
rivet-mkhtml -o Rivet-BFactory BFactory.yoda:Hw
touch $@
Rivet-DIS : Rivet-DIS/done
touch $@
Rivet-DIS/done: $(shell echo Rivet{-DIS,-DIS-NoME,-Powheg-DIS,-Matchbox-DIS,-Dipole-DIS}-{e--LowQ2,e+-LowQ2,e+-HighQ2}.yoda)
rm -rf Rivet-DIS
python/merge-DIS DIS
python/merge-DIS Powheg-DIS
python/merge-DIS DIS-NoME
python/merge-DIS Matchbox-DIS
python/merge-DIS Dipole-DIS
rivet-mkhtml -o Rivet-DIS DIS.yoda:Hw Powheg-DIS.yoda:Hw-Powheg DIS-NoME.yoda:Hw-NoME Matchbox-DIS.yoda:Hw-Matchbox Dipole-DIS.yoda:Hw-Dipole
touch $@
Rivet-TVT-EW : Rivet-TVT-EW/done
touch $@
-Rivet-TVT-EW/done: $(shell echo Rivet{,-Powheg,-Matchbox,-Dipole}-TVT-{Run-I-Z,Run-I-W,Run-I-WZ,Run-II-Z-{e,{,LowMass-,HighMass-}mu},Run-II-W}.yoda)
- rm -rf Rivet-TVT-WZ
+Rivet-TVT-EW/done: $(shell echo Rivet{,-Powheg}-TVT-{Run-I-Z,Run-I-W,Run-I-WZ,Run-II-Z-{e,{,LowMass-,HighMass-}mu},Run-II-W}.yoda)
+ rm -rf Rivet-TVT-EW
python/merge-TVT-EW TVT
- python/merge-TVT-EW TVT-Powheg
- python/merge-TVT-EW TVT-Matchbox
- python/merge-TVT-EW TVT-Dipole
- rivet-mkhtml -o Rivet-TVT-EW TVT-EW.yoda:Hw TVT-Powheg-EW.yoda:Hw-Powheg TVT-Matchbox-EW.yoda:Hw-Matchbox TVT-Dipole-EW.yoda:Hw-Dipole
+ python/merge-TVT-EW Powheg-TVT
+ rivet-mkhtml -o Rivet-TVT-EW TVT-EW.yoda:Hw Powheg-TVT-EW.yoda:Hw-Powheg
touch $@
-
-
Rivet-TVT-Photon : Rivet-TVT-Photon/done
touch $@
-Rivet-TVT-Photon/done: $(shell echo Rivet-TVT-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet,PromptPhoton}.yoda) \
- $(shell echo Rivet-Powheg-TVT-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet}.yoda)
+Rivet-TVT-Photon/done: $(shell echo Rivet{,-Powheg}-TVT-Run-II-{DiPhoton-GammaGamma,DiPhoton-GammaJet}.yoda Rivet-TVT-Run-II-PromptPhoton.yoda)
rm -rf Rivet-TVT-Photon
- python/merge-TVT-Photon TVT -o TVT-Photon.yoda
- python/merge-TVT-Photon TVT-Powheg -o TVT-Powheg-Photon.yoda
- rivet-mkhtml -o Rivet-TVT-Photon TVT-Photon.yoda:Hw TVT-Powheg-Photon.yoda:Hw-Powheg
+ python/merge-TVT-Photon TVT
+ python/merge-TVT-Photon Powheg-TVT
+ rivet-mkhtml -o Rivet-TVT-Photon TVT-Photon.yoda:Hw Powheg-TVT-Photon.yoda:Hw-Powheg
touch $@
Rivet-TVT-Jets : Rivet-TVT-Jets/done
touch $@
Rivet-TVT-Jets/done: $(shell echo Rivet-TVT-{Run-II-Jets-{0..11},Run-I-Jets-{1..8}}.yoda ) \
$(shell echo Rivet-TVT-{630-Jets-{1..3},300-Jets-1,900-Jets-1}.yoda ) \
$(shell echo Rivet-TVT-{Run-I,Run-II,300,630,900}-UE.yoda)
rm -rf Rivet-TVT-Jets
python/merge-TVT-Jets TVT
rivet-mkhtml -o Rivet-TVT-Jets TVT-Jets.yoda:Hw
touch $@
-
-
-
-#python/merge-TVT-Energy TVT
-#rivet-merge-CDF_2012_NOTE10874 TVT-300-Energy.yoda TVT-900-Energy.yoda TVT-1960-Energy.yoda
-#flat2yoda RatioPlots.dat -o TVT-RatioPlots.yoda
-
-
-
-
-
Rivet-Star : Rivet-Star/done
touch $@
Rivet-Star/done : $(shell echo Rivet-Star-{UE,Jets-{1..4}}.yoda )
rm -rf Rivet-Star
python/merge-Star Star
- ## broken DVI? ## rivet-mkhtml -v -o Rivet-Star Star.yoda
- mkdir -p Rivet-Star # remove when fixed
+ rivet-mkhtml -o Rivet-Star Star.yoda
touch $@
Rivet-SppS : Rivet-SppS/done
touch $@
## $(shell echo Rivet-ISR-{30,44,53,62}-UE.yoda ) \
## {53,63,200,500,900,546}
Rivet-SppS/done : $(shell echo Rivet-SppS-{200,500,900,546}-UE.yoda )
rm -rf Rivet-SppS
python/merge-SppS SppS
rivet-mkhtml -o Rivet-SppS SppS.yoda
touch $@
Rivet-LHC-Jets : Rivet-LHC-Jets/done
touch $@
Rivet-LHC-Jets/done : \
$(shell echo Rivet-LHC-7-DiJets-{1..7}-{A,B,C}.yoda ) \
$(shell echo Rivet-LHC-{7,8,13}-Jets-{0..10}.yoda ) \
+ $(shell echo Rivet-LHC-2760-Jets-{1..3}.yoda ) \
$(shell echo Rivet-LHC-{900,2360,2760,7,8,13}-UE.yoda ) \
$(shell echo Rivet-LHC-{900,7,13}-UE-Long.yoda ) \
$(shell echo Rivet-LHC-7-Charm-{1..5}.yoda ) \
$(shell echo Rivet-LHC-7-Bottom-{0..8}.yoda ) \
$(shell echo Rivet-LHC-{7,8,13}-Top-{L,SL}.yoda ) \
- $(shell echo Rivet-LHC-{7,8}-Top-All.yoda )
+ $(shell echo Rivet-LHC-{8,13}-Top-All.yoda )
rm -rf Rivet-LHC-Jets
python/merge-LHC-Jets LHC
rivet-mkhtml -o Rivet-LHC-Jets LHC-Jets.yoda:Hw
touch $@
Rivet-LHC-EW : Rivet-LHC-EW/done
touch $@
Rivet-LHC-EW/done: \
- $(shell echo Rivet{,-Matchbox,-Powheg,-Dipole}-LHC-{13-Z-{e,mu},{8,13}-W-mu,Z-HighMass{1,2}-e,8-Z-Mass{1..4}-{e,mu},W-{e,mu},Z-{e,mu,mu-SOPHTY},Z-LowMass-{e,mu},Z-MedMass-e,WZ,WW-{emu,ll},ZZ-{ll,lv},{8,13}-WZ,8-ZZ-lv,8-WW-ll,W-Z-{e,mu}}.yoda) \
- $(shell echo Rivet{,-Matchbox,-Dipole}-LHC-{7-W-Jet-{1..3}-e,7-Z-Jet-{0..3}-e,7-Z-Jet-0-mu}.yoda) \
- $(shell echo Rivet{-Matchbox,-Dipole}-LHC-{Z-b,Z-bb,8-Z-b,8-Z-bb,W-b,8-Z-jj}.yoda) \
+ $(shell echo Rivet{,-Powheg}-LHC-{13-Z-{e,mu},{8,13}-W-mu,Z-HighMass{1,2}-e,8-Z-Mass{1..4}-{e,mu},W-{e,mu},Z-{e,mu,mu-SOPHTY},Z-LowMass-{e,mu},Z-MedMass-e,WZ,WW-{emu,ll},ZZ-{ll,lv},{8,13}-WZ,8-ZZ-lv,8-WW-ll,W-Z-{e,mu}}.yoda) \
+ $(shell echo Rivet-LHC-{7-W-Jet-{1..3}-e,7-Z-Jet-{0..3}-e,7-Z-Jet-0-mu}.yoda) \
$(shell echo Rivet-LHC-7-{W,Z}Gamma-{e,mu}.yoda)
rm -rf Rivet-LHC-EW;
python/merge-LHC-EW LHC
- python/merge-LHC-EW LHC-Matchbox
- python/merge-LHC-EW LHC-Dipole
- python/merge-LHC-EW LHC-Powheg
- rivet-mkhtml -o Rivet-LHC-EW LHC-EW.yoda:Hw LHC-Powheg-EW.yoda:Hw-Powheg LHC-Matchbox-EW.yoda:Hw-Matchbox LHC-Matchbox-Z-b.yoda:Hw-Matchbox-Zb \
- LHC-Matchbox-Z-bb.yoda:Hw-Matchbox-Zbb LHC-Matchbox-W-b.yoda:Hw-Matchbox-W-bb LHC-Dipole-EW.yoda:Hw-Dipole \
- LHC-Dipole-Z-b.yoda:Hw-Dipole-Zb LHC-Dipole-Z-bb.yoda:Hw-Dipole-Zbb LHC-Dipole-W-b.yoda:Hw-Dipole-W-bb \
- LHC-Z-mu-SOPHTY.yoda:Hw LHC-Powheg-Z-mu-SOPHTY.yoda:Hw-Powheg LHC-Matchbox-Z-mu-SOPHTY.yoda:Hw-Matchbox \
- LHC-Matchbox-8-Z-b.yoda:Hw-Matchbox-Zb LHC-Matchbox-8-Z-bb.yoda:Hw-Matchbox-Zbb \
- LHC-Dipole-8-Z-b.yoda:Hw-Dipole-Zb LHC-Dipole-8-Z-bb.yoda:Hw-Dipole-Zbb
+ python/merge-LHC-EW Powheg-LHC
+ rivet-mkhtml -o Rivet-LHC-EW LHC-EW.yoda:Hw Powheg-LHC-EW.yoda:Hw-Powheg \
+ LHC-Z-mu-SOPHTY.yoda:Hw Powheg-LHC-Z-mu-SOPHTY.yoda:Hw-Powheg
touch $@
Rivet-LHC-Photon : Rivet-LHC-Photon/done
touch $@
Rivet-LHC-Photon/done: \
- $(shell echo Rivet-LHC-{7,8}-PromptPhoton-{1..4}.yoda) \
+ $(shell echo Rivet-LHC-{7,8,13}-PromptPhoton-{1..4}.yoda) \
Rivet-LHC-GammaGamma-7.yoda \
$(shell echo Rivet{,-Powheg}-LHC-{7,8}-{DiPhoton-GammaGamma,DiPhoton-GammaJet}.yoda)
rm -rf Rivet-LHC-Photon
- python/merge-LHC-Photon LHC -o LHC-Photon.yoda
- python/merge-LHC-Photon LHC-Powheg -o LHC-Powheg-Photon.yoda
- rivet-mkhtml -o Rivet-LHC-Photon LHC-Photon.yoda:Hw LHC-Powheg-Photon.yoda:Hw-Powheg
+ python/merge-LHC-Photon LHC
+ python/merge-LHC-Photon Powheg-LHC
+ rivet-mkhtml -o Rivet-LHC-Photon LHC-Photon.yoda:Hw Powheg-LHC-Photon.yoda:Hw-Powheg
touch $@
Rivet-LHC-Higgs : Rivet-LHC-Higgs/done
touch $@
Rivet-LHC-Higgs/done: \
$(shell echo Rivet{,-Powheg}-LHC-{ggH,VBF,WH,ZH}.yoda) \
$(shell echo Rivet{,-Powheg}-LHC-8-{{ggH,VBF,WH,ZH}{,-GammaGamma},ggH-WW}.yoda) \
Rivet-LHC-ggHJet.yoda
+ yodamerge Rivet-Powheg-LHC-8-{ggH{-GammaGamma,-WW,},{VBF,ZH,WH}{,-GammaGamma}}.yoda -o Powheg-LHC-Higgs.yoda
+ yodamerge Rivet-LHC-8-{ggH{-GammaGamma,-WW,},{VBF,ZH,WH}{,-GammaGamma}}.yoda -o LHC-Higgs.yoda
rm -rf Rivet-LHC-Higgs
- rivet-mkhtml -o Rivet-LHC-Higgs LHC-Powheg-ggH.yoda:gg-Powheg LHC-ggH.yoda:gg LHC-ggHJet.yoda:HJet \
- LHC-Powheg-VBF.yoda:VBF-Powheg LHC-VBF.yoda:VBF LHC-WH.yoda:WH LHC-ZH.yoda:ZH \
- LHC-Powheg-WH.yoda:WH-Powheg LHC-Powheg-ZH.yoda:ZH-Powheg
+ rivet-mkhtml -o Rivet-LHC-Higgs Powheg-LHC-Higgs.yoda:Hw-Powheg LHC-Higgs.yoda:Hw\
+ Rivet-Powheg-LHC-ggH.yoda:gg-Powheg Rivet-LHC-ggH.yoda:gg Rivet-LHC-ggHJet.yoda:HJet \
+ Rivet-Powheg-LHC-VBF.yoda:VBF-Powheg Rivet-LHC-VBF.yoda:VBF Rivet-LHC-WH.yoda:WH Rivet-LHC-ZH.yoda:ZH \
+ Rivet-Powheg-LHC-WH.yoda:WH-Powheg Rivet-Powheg-LHC-ZH.yoda:ZH-Powheg
touch $@
clean-local:
rm -f *.out *.log *.tex *.top *.run *.dump *.mult *.Bmult *.yoda Rivet/*.in
rm -rf Rivet-*
distclean-local:
rm -rf .cache
diff --git a/Tests/Rivet/LHC/LHC-13-Jets-7.in b/Tests/Rivet/LHC/LHC-13-Jets-7.in
--- a/Tests/Rivet/LHC/LHC-13-Jets-7.in
+++ b/Tests/Rivet/LHC/LHC-13-Jets-7.in
@@ -1,4 +1,5 @@
# CMS Jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2016_I1459051
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_CONF_2016_092
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2018_I1682495
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2018_I1711114
diff --git a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in b/Tests/Rivet/LHC/LHC-13-PromptPhoton-1.in
copy from Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
copy to Tests/Rivet/LHC/LHC-13-PromptPhoton-1.in
--- a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
+++ b/Tests/Rivet/LHC/LHC-13-PromptPhoton-1.in
@@ -1,7 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS prompt photon
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1457605
-# ATLAS prompt photon + heavy flavour
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1632756
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1645627
diff --git a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in b/Tests/Rivet/LHC/LHC-13-PromptPhoton-2.in
copy from Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
copy to Tests/Rivet/LHC/LHC-13-PromptPhoton-2.in
--- a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
+++ b/Tests/Rivet/LHC/LHC-13-PromptPhoton-2.in
@@ -1,7 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS prompt photon
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1457605
-# ATLAS prompt photon + heavy flavour
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1632756
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1645627
diff --git a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in b/Tests/Rivet/LHC/LHC-13-PromptPhoton-3.in
copy from Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
copy to Tests/Rivet/LHC/LHC-13-PromptPhoton-3.in
--- a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
+++ b/Tests/Rivet/LHC/LHC-13-PromptPhoton-3.in
@@ -1,7 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS prompt photon
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1457605
-# ATLAS prompt photon + heavy flavour
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1632756
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1645627
diff --git a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in b/Tests/Rivet/LHC/LHC-13-PromptPhoton-4.in
copy from Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
copy to Tests/Rivet/LHC/LHC-13-PromptPhoton-4.in
--- a/Tests/Rivet/LHC/LHC-8-PromptPhoton-1.in
+++ b/Tests/Rivet/LHC/LHC-13-PromptPhoton-4.in
@@ -1,7 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS prompt photon
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1457605
-# ATLAS prompt photon + heavy flavour
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1632756
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1645627
diff --git a/Tests/Rivet/LHC/LHC-2760-Jets-1.in b/Tests/Rivet/LHC/LHC-2760-Jets-1.in
new file mode 100644
--- /dev/null
+++ b/Tests/Rivet/LHC/LHC-2760-Jets-1.in
@@ -0,0 +1,5 @@
+##################################################
+# select the analyses
+##################################################
+# underlying event
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1385107
diff --git a/Tests/Rivet/LHC/LHC-2760-Jets-2.in b/Tests/Rivet/LHC/LHC-2760-Jets-2.in
new file mode 100644
--- /dev/null
+++ b/Tests/Rivet/LHC/LHC-2760-Jets-2.in
@@ -0,0 +1,5 @@
+##################################################
+# select the analyses
+##################################################
+# underlying event
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1385107
diff --git a/Tests/Rivet/LHC/LHC-2760-Jets-3.in b/Tests/Rivet/LHC/LHC-2760-Jets-3.in
new file mode 100644
--- /dev/null
+++ b/Tests/Rivet/LHC/LHC-2760-Jets-3.in
@@ -0,0 +1,5 @@
+##################################################
+# select the analyses
+##################################################
+# underlying event
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1385107
diff --git a/Tests/Rivet/LHC/LHC-7-Jets-0.in b/Tests/Rivet/LHC/LHC-7-Jets-0.in
--- a/Tests/Rivet/LHC/LHC-7-Jets-0.in
+++ b/Tests/Rivet/LHC/LHC-7-Jets-0.in
@@ -1,17 +1,15 @@
##################################################
# select the analyses
##################################################
# CMS jet cross section
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S9086218
# ATLAS track jet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I919017
# CMS central and forward jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I1087342
# ATLAS charged particle in min bias
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1125575
-# CMS Jet/UE properties
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1261026
# ATLAS leading jet UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1298811
# CMS Jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1208923
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-7-Top-All.in b/Tests/Rivet/LHC/LHC-7-Top-All.in
deleted file mode 100644
--- a/Tests/Rivet/LHC/LHC-7-Top-All.in
+++ /dev/null
@@ -1,7 +0,0 @@
-##################################################
-# select the analyses
-##################################################
-# ATLAS b-jet shapes in top events
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1304688
-# ATLAS top cross sections
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1345452
diff --git a/Tests/Rivet/LHC/LHC-7-Top-SL.in b/Tests/Rivet/LHC/LHC-7-Top-SL.in
--- a/Tests/Rivet/LHC/LHC-7-Top-SL.in
+++ b/Tests/Rivet/LHC/LHC-7-Top-SL.in
@@ -1,7 +1,14 @@
##################################################
# select the analyses
##################################################
# MC analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_TTBAR
# ATLAS b-jet shapes in top events
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1243871
+##################################################
+# select the analyses
+##################################################
+# ATLAS b-jet shapes in top events
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1304688
+# ATLAS top cross sections
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1345452
diff --git a/Tests/Rivet/LHC/LHC-7-UE.in b/Tests/Rivet/LHC/LHC-7-UE.in
--- a/Tests/Rivet/LHC/LHC-7-UE.in
+++ b/Tests/Rivet/LHC/LHC-7-UE.in
@@ -1,95 +1,95 @@
##################################################
# select the analyses
##################################################
# ATLAS jet shapes
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S8924791
# ATLAS jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8817804
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1082936
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S8994773
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8894728
# ATLAS fragmentation function
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_CONF_2010_049
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8918562
# ALICE charged particles
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2010_S8625980
# CMS particle spectra
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S8978280
# CMS charged particle multiplicity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S8884919
# CMS charged particle pT and rapidity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2010_S8656010
# CMS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S9120041
# ATLAS track jet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I919017
# LHCB phi production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2011_I919315
# ATLAS phi production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1282441
# LHCB promt hadron productiom
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2012_I1119400
# ATLAS rap gap
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1084540
# CMS forward energy flow
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S9215166
# LHC K0s/Lambda
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2011_I917009
# TOTEM at large rapidity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 TOTEM_2012_I1115294
# ATLAS Azimuthal ordering of charged hadrons
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1091481
# ALICE single/double diffractive and inelastic sigma
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2012_I1181770
# ATLAS inelastic cross section
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I894867
# CMS inelastic cross section
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I1193338
# total transverse energy
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1183818
# underlying event forward rapidities
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1218372
# strange particles in underlying event
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_PAS_QCD_11_010
# CMS central and forward jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I1087342
# CMS dijet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I1184941
# ATLAS charged particle in min bias
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1125575
# ATLAS two particle correlation
#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1094061
# ATLAS correlations
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1093734
# LHCB energy flow
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2013_I1208105
# ATLAS charged particle event shapes
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1124167
# CMS Jet/UE properties
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1261026
# ATLAS leading jet UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1298811
# LHCB charged particles in min bias
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2014_I1281685
# ALICE identified particle spectra
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2015_I1357424
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2014_I1300380
# LHCB min bias
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2015_I1333223
# ALICE pion and eta pT
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2012_I1116147
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_PAS_FSQ_12_020
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_PAS_FSQ_12_020
# CMS charged particle rapidity
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_QCD_10_024
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2010_PAS_QCD_10_024
# diffractive analyses
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCF_2012_I1115479
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1356998
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 TOTEM_2012_I1220862
# atlas hadron ordering
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1624693
# LHCF
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCF_2015_I1351909
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCF_2016_I1385877
\ No newline at end of file
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCF_2016_I1385877
diff --git a/Tests/Rivet/LHC/LHC-7-WGamma-e.in b/Tests/Rivet/LHC/LHC-7-WGamma-e.in
--- a/Tests/Rivet/LHC/LHC-7-WGamma-e.in
+++ b/Tests/Rivet/LHC/LHC-7-WGamma-e.in
@@ -1,3 +1,2 @@
# ATLAS W Gamma analysis
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_W
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_W_EL
\ No newline at end of file
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863:LMODE=WEL
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-7-WGamma-mu.in b/Tests/Rivet/LHC/LHC-7-WGamma-mu.in
--- a/Tests/Rivet/LHC/LHC-7-WGamma-mu.in
+++ b/Tests/Rivet/LHC/LHC-7-WGamma-mu.in
@@ -1,2 +1,2 @@
# ATLAS W Gamma analysis
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_W_MU
\ No newline at end of file
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863:LMODE=WMU
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-7-ZGamma-e.in b/Tests/Rivet/LHC/LHC-7-ZGamma-e.in
--- a/Tests/Rivet/LHC/LHC-7-ZGamma-e.in
+++ b/Tests/Rivet/LHC/LHC-7-ZGamma-e.in
@@ -1,3 +1,2 @@
# ATLAS Z Gamma analysis
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_Z
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_Z_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863:LMODE=ZEL
diff --git a/Tests/Rivet/LHC/LHC-7-ZGamma-mu.in b/Tests/Rivet/LHC/LHC-7-ZGamma-mu.in
--- a/Tests/Rivet/LHC/LHC-7-ZGamma-mu.in
+++ b/Tests/Rivet/LHC/LHC-7-ZGamma-mu.in
@@ -1,2 +1,2 @@
# ATLAS Z Gamma analysis
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863_Z_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217863:LMODE=ZMU
diff --git a/Tests/Rivet/LHC/LHC-8-Top-L.in b/Tests/Rivet/LHC/LHC-8-Top-L.in
--- a/Tests/Rivet/LHC/LHC-8-Top-L.in
+++ b/Tests/Rivet/LHC/LHC-8-Top-L.in
@@ -1,18 +1,17 @@
##################################################
# select the analyses
##################################################
# ATLAS top + b jet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1390114
# CMS
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1397174
# ATLAS l +jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1397635
# ATLAS charge asymmetry
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1449082
# CMS diplepton charge asym
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2016_I1430892
# CMS spin correlations
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2016_I1413748
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1404878
# ATLAS lepton distributions
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1626105
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass1-e.in b/Tests/Rivet/LHC/LHC-8-Z-Mass1-e.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass1-e.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass1-e.in
@@ -1,5 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=EL
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass1-mu.in b/Tests/Rivet/LHC/LHC-8-Z-Mass1-mu.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass1-mu.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass1-mu.in
@@ -1,5 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=MU
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass2-e.in b/Tests/Rivet/LHC/LHC-8-Z-Mass2-e.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass2-e.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass2-e.in
@@ -1,5 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=EL
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass2-mu.in b/Tests/Rivet/LHC/LHC-8-Z-Mass2-mu.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass2-mu.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass2-mu.in
@@ -1,5 +1,5 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=MU
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass3-e.in b/Tests/Rivet/LHC/LHC-8-Z-Mass3-e.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass3-e.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass3-e.in
@@ -1,11 +1,11 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=EL
# ATLAS high mass drell-yan
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454:LMODE=EL
# ATLAS splittings
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1589844_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1589844:LMODE=EL
# CMS Z+b
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2017_I1499471
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass3-mu.in b/Tests/Rivet/LHC/LHC-8-Z-Mass3-mu.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass3-mu.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass3-mu.in
@@ -1,11 +1,11 @@
##################################################
# select the analyses
##################################################
# ATLAS Z + dijets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1279489
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=MU
# ATLAS high mass drell-yan
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454:LMODE=MU
# ATLAS splittings rivet problem with this at the moment)
-#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1589844_MU
\ No newline at end of file
+#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1589844:LMODE=MU
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass4-e.in b/Tests/Rivet/LHC/LHC-8-Z-Mass4-e.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass4-e.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass4-e.in
@@ -1,8 +1,8 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=EL
# ATLAS high mass drell-yan
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454:LMODE=EL
diff --git a/Tests/Rivet/LHC/LHC-8-Z-Mass4-mu.in b/Tests/Rivet/LHC/LHC-8-Z-Mass4-mu.in
--- a/Tests/Rivet/LHC/LHC-8-Z-Mass4-mu.in
+++ b/Tests/Rivet/LHC/LHC-8-Z-Mass4-mu.in
@@ -1,8 +1,8 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pT and phi*
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1408516:LMODE=MU
# ATLAS high mass drell-yan
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1467454:LMODE=MU
diff --git a/Tests/Rivet/LHC/LHC-8-ggH-GammaGamma.in b/Tests/Rivet/LHC/LHC-8-ggH-GammaGamma.in
--- a/Tests/Rivet/LHC/LHC-8-ggH-GammaGamma.in
+++ b/Tests/Rivet/LHC/LHC-8-ggH-GammaGamma.in
@@ -1,7 +1,6 @@
##################################################
# select the analyses
##################################################
# General analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1306615
-do /Herwig/Particles/h0:SelectDecayModes h0->gamma,gamma;
diff --git a/Tests/Rivet/LHC/LHC-900-UE.in b/Tests/Rivet/LHC/LHC-900-UE.in
--- a/Tests/Rivet/LHC/LHC-900-UE.in
+++ b/Tests/Rivet/LHC/LHC-900-UE.in
@@ -1,53 +1,53 @@
##################################################
# select the analyses
##################################################
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S8994773
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8918562
# ATLAS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8894728
# ATLAS charged particles
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8591806
# ALICE charged particles
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2010_S8706239
# ALICE charged particles
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2010_S8625980
# ALICE charged particles
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2010_S8624100
# ALICE particle spectra
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2011_S8945144
# ALICE strange particle production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2011_S8909580
# CMS particle spectra
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S8978280
# CMS charged particle multiplicity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S8884919
# CMS charged particle pT and rapidity
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2010_S8547297
# CMS UE
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S9120041
# LHCB k_s0
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2010_S8758301
# LHCB promt hadron production
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2012_I1119400
# CMS forward energy flow
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2011_S9215166
# LHC K0s/Lambda
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2011_I917009
# ATLAS Azimuthal ordering of charged hadrons
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1091481
# ALICE single/double diffractive and inelastic sigma
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2012_I1181770
# ATLAS inelastic cross section
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I894867
# underlying event forward rapidities
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1218372
# ATLAS two particle correlation
#insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1094061
# ATLAS correlations
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1093734
# ALICE pion and eta pT
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ALICE_2012_I1116147
# CMS charged particle rapidity
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_QCD_10_024
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2010_PAS_QCD_10_024
diff --git a/Tests/Rivet/LHC/LHC-W-e.in b/Tests/Rivet/LHC/LHC-W-e.in
--- a/Tests/Rivet/LHC/LHC-W-e.in
+++ b/Tests/Rivet/LHC/LHC-W-e.in
@@ -1,25 +1,24 @@
##################################################
# select the analyses
##################################################
# general analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_WJETS
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_WPOL
# ATLAS W+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8919674
# ATLAS W pT
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I925932
# ATLAS W kT scales
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217867
# W DPI
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1216670
# W +b
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1219109_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1219109:LMODE=EL
# ATLAS W
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I928289_W
# ATLAS W+jets
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1319490
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1319490_EL
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1319490:LMODE=EL
# ATLAS W+charm
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1282447
# ATLAS W inclusive cross section
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620_W_EL
\ No newline at end of file
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620:LMODE=WEL
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-W-mu.in b/Tests/Rivet/LHC/LHC-W-mu.in
--- a/Tests/Rivet/LHC/LHC-W-mu.in
+++ b/Tests/Rivet/LHC/LHC-W-mu.in
@@ -1,29 +1,29 @@
##################################################
# select the analyses
##################################################
# ATLAS W asymetry
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S9002537
# ATLAS W+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2010_S8919674
# ATLAS W pT
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I925932
# ATLAS W+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1083318
# ATLAS W kT scales
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1217867
# CMS double parton scattering
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1272853
# W DPI
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1216670
# CMS W+ jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2014_I1303894
# ATLAS W
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I928289_W
# ATLAS W+jets
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1319490_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1319490:LMODE=MU
# W +b
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1219109_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1219109:LMODE=MU
# ATLAS W+charm
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1282447
# ATLAS W inclusive cross section
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620_W_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620:LMODE=WMU
diff --git a/Tests/Rivet/LHC/LHC-Z-e.in b/Tests/Rivet/LHC/LHC-Z-e.in
--- a/Tests/Rivet/LHC/LHC-Z-e.in
+++ b/Tests/Rivet/LHC/LHC-Z-e.in
@@ -1,34 +1,34 @@
##################################################
# select the analyses
##################################################
# General analysis
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_ZINC
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 MC_ZJETS
# ATLAS pT
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S9131140
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1300647
# ATLAS Z+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I945498
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1230812
# ATLAS phi*
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1204784
# CMS Z + b-hadron
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1256943
# CMS Z pt and y
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I941555
# ATLAS Z + bjets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1306294
# ATLAS Z
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I928289_Z
# CMS Z AFB
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1122847
# CMS Z+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1310737
# ATLAS event shapes in Z events
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1424838
# ATLAS forwrd backward
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1351916_EL
# ATLAS forward backward
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2013_I1234228
# ATLAS Z inclusive cross section
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620_Z_EL
\ No newline at end of file
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620:LMODE=ZEL
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-Z-mu.in b/Tests/Rivet/LHC/LHC-Z-mu.in
--- a/Tests/Rivet/LHC/LHC-Z-mu.in
+++ b/Tests/Rivet/LHC/LHC-Z-mu.in
@@ -1,35 +1,35 @@
##################################################
# select the analyses
##################################################
# ATLAS Z pt
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_S9131140
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1300647
# ATLAS Z+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I945498
# ATLAS phi*
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2012_I1204784
# Z and real photon + jet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1258128
# CMS Z + b-hadron
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1256943
# CMS Z pt and y
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2012_I941555
# ATLAS MPI in Z events
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1315949
# ATLAS Z
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2011_I928289_Z
# CMS Z AFB
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2013_I1122847
# CMS Z+jets
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1310737
# ATLAS event shapes in Z events
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1424838
# CMS photon radiation in Z decays
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2015_I1346843
# ATLAS forwrd backward
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2015_I1351916_MU
# LHCB forward Z+jet
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 LHCB_2014_I1262703
# ATLAS Z inclusive cross section
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620_Z_MU
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1502620:LMODE=ZMU
diff --git a/Tests/python/make_input_files.py b/Tests/python/make_input_files.py
--- a/Tests/python/make_input_files.py
+++ b/Tests/python/make_input_files.py
@@ -1,1842 +1,1844 @@
#! /usr/bin/env python
import logging,sys,os
from string import strip, Template
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name [...]")
simulation=""
numberOfAddedProcesses=0
def addProcess(thefactory,theProcess,Oas,Oew,scale,mergedlegs,NLOprocesses):
global numberOfAddedProcesses
global simulation
numberOfAddedProcesses+=1
res ="set "+thefactory+":OrderInAlphaS "+Oas+"\n"
res+="set "+thefactory+":OrderInAlphaEW "+Oew+"\n"
res+="do "+thefactory+":Process "+theProcess+" "
if ( mergedlegs != 0 ):
if simulation!="Merging":
print "simulation is not Merging, trying to add merged legs."
sys.exit(1)
res+="["
for j in range(mergedlegs):
res+=" j "
res+="]"
res+="\n"
if (NLOprocesses!=0):
if simulation!="Merging":
print "simulation is not Merging, trying to add NLOProcesses."
sys.exit(1)
res+="set MergingFactory:NLOProcesses %s \n" % NLOprocesses
if ( scale != "" ):
res+="set "+thefactory+":ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/"+scale+"\n"
return res
def addLeptonPairCut(minmass,maxmass):
return "set /Herwig/Cuts/LeptonPairMassCut:MinMass "+minmass+"*GeV\nset /Herwig/Cuts/LeptonPairMassCut:MaxMass "+maxmass+"*GeV\n"
didaddfirstjet=False
def addFirstJet(ptcut):
global didaddfirstjet
if(didaddfirstjet):
logging.error("Can only add jetcut once.")
sys.exit(1)
res="set /Herwig/Cuts/Cuts:JetFinder /Herwig/Cuts/JetFinder\n"
res+="insert /Herwig/Cuts/Cuts:MultiCuts 0 /Herwig/Cuts/JetCuts\n"
res+="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/FirstJet\n"
if(ptcut!=""):
res+="set /Herwig/Cuts/FirstJet:PtMin "+ptcut+".*GeV\n"
didaddfirstjet=True
return res
didaddsecondjet=False
def addSecondJet(ptcut):
global didaddsecondjet
if(didaddsecondjet):
logging.error("Can only add second jetcut once.")
sys.exit(1)
res="insert /Herwig/Cuts/JetCuts:JetRegions 0 /Herwig/Cuts/SecondJet\n"
res+="set /Herwig/Cuts/SecondJet:PtMin "+ptcut+".*GeV\n"
didaddsecondjet=True
return res
didaddjetpair=False
def addJetPairCut(minmass):
global didaddjetpair
if(didaddjetpair):
logging.error("Can only add second jetcut once.")
sys.exit(1)
res="""\
create ThePEG::JetPairRegion /Herwig/Cuts/JetPairMass JetCuts.so
set /Herwig/Cuts/JetPairMass:FirstRegion /Herwig/Cuts/FirstJet
set /Herwig/Cuts/JetPairMass:SecondRegion /Herwig/Cuts/SecondJet
insert /Herwig/Cuts/JetCuts:JetPairRegions 0 /Herwig/Cuts/JetPairMass
set /Herwig/Cuts/JetPairMass:MassMin {mm}.*GeV
""".format(mm=minmass)
didaddjetpair=True
return res
addedBRReweighter=False
def addBRReweighter():
global addedBRReweighter
if(addedBRReweighter):
logging.error("Can only add BRReweighter once.")
sys.exit(1)
res="create Herwig::BranchingRatioReweighter /Herwig/Generators/BRReweighter\n"
res+="insert /Herwig/Generators/EventGenerator:EventHandler:PostHadronizationHandlers 0 /Herwig/Generators/BRReweighter\n"
addedBRReweighter=True
return res
def setHardProcessWidthToZero(list1):
res=""
for i in list1:
res+="set /Herwig/Particles/"+i+":HardProcessWidth 0.\n"
return res
selecteddecaymode=False
def selectDecayMode(particle,decaymodes):
global selecteddecaymode
res="do /Herwig/Particles/"+particle+":SelectDecayModes"
for decay in decaymodes:
res+=" /Herwig/Particles/"+particle+"/"+decay
res+="\n"
selecteddecaymode=True
return res
def jet_kt_cut(energy):
return "set /Herwig/Cuts/JetKtCut:MinKT {E}*GeV\n".format(E=energy)
def mhatmin_cut(energy):
return "set /Herwig/Cuts/Cuts:MHatMin {E}*GeV\n".format(E=energy)
def mhat_minm_maxm(e1,e2,e3):
return """\
set /Herwig/Cuts/Cuts:MHatMin {e1}*GeV
set /Herwig/Cuts/MassCut:MinM {e2}*GeV
set /Herwig/Cuts/MassCut:MaxM {e3}*GeV
""".format(**locals())
def collider_lumi(energy):
return "set /Herwig/Generators/EventGenerator:EventHandler:LuminosityFunction:Energy {E}*GeV\n".format(E=energy)
def insert_ME(me,process=None,ifname='Process'):
result = "insert /Herwig/MatrixElements/SubProcess:MatrixElements 0 /Herwig/MatrixElements/{me}\n".format(**locals())
if process is not None:
result += "set /Herwig/MatrixElements/{me}:{ifname} {process}".format(**locals())
return result
def particlegroup(name,*particles):
result = ["do /Herwig/MatrixElements/Matchbox/Factory:StartParticleGroup {n}".format(n=name)]
for p in particles:
result.append(
"insert /Herwig/MatrixElements/Matchbox/Factory:ParticleGroup 0 /Herwig/Particles/{p}".format(p=p)
)
result.append("do /Herwig/MatrixElements/Matchbox/Factory:EndParticleGroup")
return '\n'.join(result)
# settings for four flavour scheme
fourFlavour="""
read Matchbox/FourFlavourScheme.in
{bjetgroup}
set /Herwig/Cuts/MatchboxJetMatcher:Group bjet
""".format(bjetgroup=particlegroup('bjet','b','bbar','c', 'cbar',
's','sbar','d','dbar','u','ubar','g'))
ME_Upsilon = """\
create Herwig::MEee2VectorMeson /Herwig/MatrixElements/MEUpsilon HwMELepton.so
set /Herwig/MatrixElements/MEUpsilon:VectorMeson /Herwig/Particles/Upsilon(4S)
set /Herwig/MatrixElements/MEUpsilon:Coupling 0.0004151809
""" + insert_ME("MEUpsilon")
(opts, args) = parser.parse_args()
## Check args
if len(args) != 1:
logging.error("Must specify at least input file")
sys.exit(1)
name = args[0]
print name
# select the template to load
# collider
KNOWN_COLLIDERS = [
"BFactory",
"LEP",
"DIS",
"TVT",
"LHC-GammaGamma",
"LHC",
"ISR",
"SppS",
"Star",
]
collider = ""
for cand_collider in KNOWN_COLLIDERS:
if cand_collider in name:
collider = cand_collider
break
del cand_collider
assert collider
have_hadronic_collider = collider in ["TVT","LHC","ISR","SppS","Star"]
thefactory="Factory"
parameters = {
'shower' : '',
'bscheme' : '',
}
# istart determines how many name parts need to be skipped
istart = 1
# Dipole shower with Matchbox Powheg
if "Dipole-Matchbox-Powheg" in name :
istart = 4
simulation="Matchbox"
parameters["shower"] = "read Matchbox/Powheg-DipoleShower.in\n"
# Dipole shower with internal Powheg - Todo: Finish modifying template files.
'''
elif "Dipole-Powheg" in name :
istart = 3
simulation="Powheg"
parameters["shower"] = "set /Herwig/EventHandlers/EventHandler:CascadeHandler /Herwig/DipoleShower/DipoleShowerHandler\nread snippets/Dipole_AutoTune_prel.in\n"
'''
# Dipole shower with MCatNLO
elif "Dipole-MCatNLO" in name :
istart = 3
simulation="Matchbox"
parameters["shower"] = "read Matchbox/MCatNLO-DipoleShower.in\n"
# Dipole shower with Matchbox LO
elif "Dipole-Matchbox-LO" in name :
istart = 4
simulation="Matchbox"
parameters["shower"] = "read Matchbox/LO-DipoleShower.in\n"
# Dipole shower with internal LO
elif "Dipole" in name :
istart = 2
simulation=""
parameters["shower"] = "set /Herwig/EventHandlers/EventHandler:CascadeHandler /Herwig/DipoleShower/DipoleShowerHandler\nread snippets/Dipole_AutoTune_prel.in\n"
# AO shower with Matchbox Powheg
elif "Matchbox-Powheg" in name :
istart = 3
simulation="Matchbox"
parameters["shower"] = "read Matchbox/Powheg-DefaultShower.in\n"
# AO shower with MCatNLO
elif "Matchbox" in name :
istart = 2
simulation="Matchbox"
parameters["shower"] = "read Matchbox/MCatNLO-DefaultShower.in\n"
# AO shower with inernal Powheg
elif "Powheg" in name :
istart = 2
simulation="Powheg"
# Dipole shower with merging
elif "Merging" in name :
istart = 2
simulation="Merging"
thefactory="MergingFactory"
# Flavour settings for Matchbox
if simulation=="Matchbox" :
parameters["bscheme"] = "read Matchbox/FiveFlavourScheme.in\n"
if "Dipole" in parameters["shower"] :
parameters["bscheme"] += "read Matchbox/FiveFlavourNoBMassScheme.in\n"
if collider not in ['DIS','LEP'] :
parameters["nlo"] = "read Matchbox/MadGraph-OpenLoops.in\n"
# Flavour settings for dipole shower with internal ME
if simulation=="" and "Dipole" in parameters["shower"] :
parameters["bscheme"] = "read snippets/DipoleShowerFiveFlavours.in"
# find the template
if simulation=="" :
if collider=="LHC-GammaGamma" :
istart += 1
templateName="Hadron-Gamma.in"
elif have_hadronic_collider :
templateName="Hadron.in"
elif collider != "BFactory" :
templateName= "%s.in" % collider
else :
templateName= "LEP.in"
else :
if have_hadronic_collider :
templateName= "Hadron-%s.in" % simulation
elif collider != "BFactory" :
templateName= "%s-%s.in" % (collider,simulation)
else :
templateName= "LEP-%s.in" % simulation
# work out the name of the parameter file
parameterName="-".join(name.split("-")[istart:])
del istart
class StringBuilder(object):
"""
Avoid expensive string additions until the end
by building up a list first.
This helper class avoids rewriting all the += lower down
to list operations.
"""
def __init__(self, init = None):
self.lines = [] if init is None else [init]
def __iadd__(self, line):
self.lines.append(line)
return self
def __str__(self):
return '\n'.join(self.lines)
# work out the process and parameters
process=StringBuilder()
# Bfactory
if(collider=="BFactory") :
if(simulation=="") :
if(parameterName=="10.58-res") :
process += ME_Upsilon
elif(parameterName=="10.58") :
process += ME_Upsilon
process += "set /Herwig/MatrixElements/MEee2gZ2qq:MaximumFlavour 4\n"
else :
process+=insert_ME("MEee2gZ2qq")
process+= "set /Herwig/MatrixElements/MEee2gZ2qq:MaximumFlavour 4\n"
elif(simulation=="Powheg") :
process = StringBuilder("set /Herwig/MatrixElements/PowhegMEee2gZ2qq:MaximumFlavour 4\n")
elif(simulation=="Matchbox" ) :
process = StringBuilder(addProcess(thefactory,"e- e+ -> u ubar","0","2","",0,0))
process+=addProcess(thefactory,"e- e+ -> d dbar","0","2","",0,0)
process+=addProcess(thefactory,"e- e+ -> c cbar","0","2","",0,0)
process+=addProcess(thefactory,"e- e+ -> s sbar","0","2","",0,0)
elif(simulation=="Merging" ) :
logging.warning("BFactory not explicitly tested for %s " % simulation)
sys.exit(0)
# DIS
elif(collider=="DIS") :
if(simulation=="") :
if "NoME" in parameterName :
process = StringBuilder("set /Herwig/Shower/ShowerHandler:HardEmission None")
parameterName=parameterName.replace("NoME-","")
else :
process = StringBuilder("")
elif(simulation=="Powheg") :
process = StringBuilder("")
elif(simulation=="Matchbox" ) :
if "e-" in parameterName :
process = StringBuilder(addProcess(thefactory,"e- p -> e- j","0","2","",0,0))
else :
process = StringBuilder(addProcess(thefactory,"e+ p -> e+ j","0","2","",0,0))
elif(simulation=="Merging" ) :
if "e-" in parameterName :
process = StringBuilder(addProcess(thefactory,"e- p -> e- j","0","2","",2,2))
else :
process = StringBuilder(addProcess(thefactory,"e+ p -> e+ j","0","2","",2,2))
# LEP
elif(collider=="LEP") :
if(simulation=="") :
if "gg" in parameterName :
process = StringBuilder("create Herwig::MEee2Higgs2SM /Herwig/MatrixElements/MEee2Higgs2SM\n")
process+=insert_ME("MEee2Higgs2SM","Gluon","Allowed")
else :
process = StringBuilder(insert_ME("MEee2gZ2qq"))
if(parameterName=="10") :
process+="set /Herwig/MatrixElements/MEee2gZ2qq:MaximumFlavour 4"
elif(simulation=="Powheg") :
process = StringBuilder()
if(parameterName=="10") :
process = StringBuilder("set /Herwig/MatrixElements/PowhegMEee2gZ2qq:MaximumFlavour 4")
elif(simulation=="Matchbox" ) :
if(parameterName=="10") :
process = StringBuilder(addProcess(thefactory,"e- e+ -> u ubar","0","2","",0,0))
process+=addProcess(thefactory,"e- e+ -> d dbar","0","2","",0,0)
process+=addProcess(thefactory,"e- e+ -> c cbar","0","2","",0,0)
process+=addProcess(thefactory,"e- e+ -> s sbar","0","2","",0,0)
else :
process = StringBuilder(addProcess(thefactory,"e- e+ -> j j","0","2","",0,0))
elif(simulation=="Merging" ) :
if(parameterName=="10") :
process = StringBuilder(addProcess(thefactory,"e- e+ -> j j","0","2","",2,2))
process+="read Matchbox/FourFlavourScheme.in"
else :
process = StringBuilder(addProcess(thefactory,"e- e+ -> j j","0","2","",2,2))
# TVT
elif(collider=="TVT") :
process = StringBuilder("set /Herwig/Generators/EventGenerator:EventHandler:BeamB /Herwig/Particles/pbar-\n")
if "Run-II" in parameterName : process+=collider_lumi(1960.0)
elif "Run-I" in parameterName : process+=collider_lumi(1800.0)
elif "900" in parameterName : process+=collider_lumi(900.0)
elif "630" in parameterName : process+=collider_lumi(630.0)
elif "300" in parameterName : process+=collider_lumi(300.0)
if(simulation=="") :
if "PromptPhoton" in parameterName :
process+=insert_ME("MEGammaJet")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 15.\n"
elif "DiPhoton-GammaGamma" in parameterName :
process+=insert_ME("MEGammaGamma")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
parameterName=parameterName.replace("-GammaGamma","")
elif "DiPhoton-GammaJet" in parameterName :
process+=insert_ME("MEGammaJet")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
parameterName=parameterName.replace("-GammaJet","")
elif "UE" in parameterName :
if "Dipole" in parameters["shower"]:
process+="read snippets/MB-DipoleShower.in\n"
else:
process+="read snippets/MB.in\n"
process+="read snippets/Diffraction.in\n"
process += "set /Herwig/Decays/DecayHandler:LifeTimeOption 0\n"
process += "set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm\n"
elif "Jets" in parameterName :
process+=insert_ME("MEQCD2to2")
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "Run-II-Jets-10" in parameterName : process+=jet_kt_cut( 30.)+mhatmin_cut(500.)
elif "Run-II-Jets-11" in parameterName: process+=jet_kt_cut( 30.)+mhatmin_cut(900.)
elif "Run-I-Jets-1" in parameterName : process+=jet_kt_cut( 20.)
elif "Run-I-Jets-2" in parameterName : process+=jet_kt_cut( 40.)
elif "Run-I-Jets-3" in parameterName : process+=jet_kt_cut( 65.)
elif "Run-I-Jets-4" in parameterName : process+=jet_kt_cut( 90.)
elif "Run-I-Jets-5" in parameterName : process+=jet_kt_cut(160.)
elif "Run-I-Jets-6" in parameterName : process+=jet_kt_cut( 30.)+mhatmin_cut(100.)
elif "Run-I-Jets-7" in parameterName : process+=jet_kt_cut( 30.)+mhatmin_cut(400.)
elif "Run-I-Jets-8" in parameterName : process+=jet_kt_cut( 30.)+mhatmin_cut(700.)
elif "Run-II-Jets-0" in parameterName : process+=jet_kt_cut( 15.)
elif "Run-II-Jets-1" in parameterName : process+=jet_kt_cut( 25.)
elif "Run-II-Jets-2" in parameterName : process+=jet_kt_cut( 40.)
elif "Run-II-Jets-3" in parameterName : process+=jet_kt_cut( 60.)
elif "Run-II-Jets-4" in parameterName : process+=jet_kt_cut( 85.)
elif "Run-II-Jets-5" in parameterName : process+=jet_kt_cut(110.)
elif "Run-II-Jets-6" in parameterName : process+=jet_kt_cut(160.)
elif "Run-II-Jets-7" in parameterName : process+=jet_kt_cut(250.)
elif "Run-II-Jets-8" in parameterName : process+=jet_kt_cut( 30.)+mhatmin_cut(100.)
elif "Run-II-Jets-9" in parameterName : process+=jet_kt_cut( 30.)+mhatmin_cut(300.)
elif "900-Jets-1" in parameterName : process+=jet_kt_cut( 10.)
elif "300-Jets-1" in parameterName : process+=jet_kt_cut( 6.)
elif "630-Jets-1" in parameterName : process+=jet_kt_cut( 20.)
elif "630-Jets-2" in parameterName : process+=jet_kt_cut( 40.)
elif "630-Jets-3" in parameterName : process+=jet_kt_cut( 75.)
elif "900-Jets-1" in parameterName : process+=jet_kt_cut( 10.)
elif "Run-I-WZ" in parameterName :
process+=insert_ME("MEqq2W2ff","Electron")
process+=insert_ME("MEqq2gZ2ff","Electron")
elif "Run-II-W" in parameterName or "Run-I-W" in parameterName :
process+=insert_ME("MEqq2W2ff","Electron")
elif "Run-II-Z-e" in parameterName or "Run-I-Z" in parameterName :
process +=insert_ME("MEqq2gZ2ff","Electron")
elif "Run-II-Z-LowMass-mu" in parameterName :
process +=insert_ME("MEqq2gZ2ff","Muon")
process+=addLeptonPairCut("25","70")
elif "Run-II-Z-HighMass-mu" in parameterName :
process +=insert_ME("MEqq2gZ2ff","Muon")
process+=addLeptonPairCut("150","600")
elif "Run-II-Z-mu" in parameterName :
process +=insert_ME("MEqq2gZ2ff","Muon")
elif(simulation=="Powheg") :
if "Run-I-WZ" in parameterName :
process+=insert_ME("PowhegMEqq2W2ff","Electron")
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
elif "Run-II-W" in parameterName or "Run-I-W" in parameterName :
process+=insert_ME("PowhegMEqq2W2ff","Electron")
elif "Run-II-Z-e" in parameterName or "Run-I-Z" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
elif "Run-II-Z-LowMass-mu" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
process+=addLeptonPairCut("25","70")
elif "Run-II-Z-HighMass-mu" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
process+=addLeptonPairCut("150","600")
elif "Run-II-Z-mu" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "DiPhoton-GammaGamma" in parameterName :
process+=insert_ME("MEGammaGammaPowheg","GammaGamma")
process+=insert_ME("MEGammaGamma","gg")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
process+=jet_kt_cut(5.)
parameterName=parameterName.replace("-GammaGamma","")
elif "DiPhoton-GammaJet" in parameterName :
process+=insert_ME("MEGammaGammaPowheg","VJet")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
process+=jet_kt_cut(5.)
parameterName=parameterName.replace("-GammaJet","")
elif(simulation=="Matchbox" or simulation=="Merging" ) :
if "Jets" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p -> j j","2","0","MaxJetPtScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p -> j j","2","0","MaxJetPtScale",1,0)
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "Run-II-Jets-10" in parameterName :
process+=addFirstJet("30")
process+=addSecondJet("25")
process+=addJetPairCut("500")
elif "Run-II-Jets-11" in parameterName :
process+=addFirstJet("30")
process+=addSecondJet("25")
process+=addJetPairCut("900")
elif "Run-II-Jets-12" in parameterName :
process+=addFirstJet("30")
process+=addSecondJet("25")
process+=addJetPairCut("300")
elif "Run-I-Jets-1" in parameterName : process+=addFirstJet("20")
elif "Run-I-Jets-2" in parameterName : process+=addFirstJet("40")
elif "Run-I-Jets-3" in parameterName : process+=addFirstJet("65")
elif "Run-I-Jets-4" in parameterName : process+=addFirstJet("90")
elif "Run-I-Jets-5" in parameterName : process+=addFirstJet("160")
elif "Run-I-Jets-6" in parameterName : process+=addFirstJet("30")+addSecondJet("25")+addJetPairCut("100")
elif "Run-I-Jets-7" in parameterName : process+=addFirstJet("30")+addSecondJet("25")+addJetPairCut("400")
elif "Run-I-Jets-8" in parameterName : process+=addFirstJet("30")+addSecondJet("25")+addJetPairCut("700")
elif "Run-II-Jets-0" in parameterName : process+=addFirstJet("15")
elif "Run-II-Jets-1" in parameterName : process+=addFirstJet("25")
elif "Run-II-Jets-2" in parameterName : process+=addFirstJet("40")
elif "Run-II-Jets-3" in parameterName : process+=addFirstJet("60")
elif "Run-II-Jets-4" in parameterName : process+=addFirstJet("85")
elif "Run-II-Jets-5" in parameterName : process+=addFirstJet("110")
elif "Run-II-Jets-6" in parameterName : process+=addFirstJet("160")
elif "Run-II-Jets-7" in parameterName : process+=addFirstJet("250")
elif "Run-II-Jets-8" in parameterName : process+=addFirstJet("30")+addSecondJet("25")+addJetPairCut("100")
elif "Run-II-Jets-9" in parameterName : process+=addFirstJet("30")+addSecondJet("25")+addJetPairCut("300")
elif "900-Jets-1" in parameterName : process+=addFirstJet("10")
elif "300-Jets-1" in parameterName : process+=addFirstJet("6")
elif "630-Jets-1" in parameterName : process+=addFirstJet("20")
elif "630-Jets-2" in parameterName : process+=addFirstJet("40")
elif "630-Jets-3" in parameterName : process+=addFirstJet("75")
elif "900-Jets-1" in parameterName : process+=addFirstJet("10")
else :
logging.error("Exit 00007")
sys.exit(1)
elif "Run-I-WZ" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p pbar e+ e-","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p pbar e+ nu","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p pbar e- nu","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=particlegroup('epm','e+','e-')
process+=particlegroup('epmnu','e+','e-','nu_e','nu_ebar')
process+=addProcess(thefactory,"p pbar epm epmnu","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "Run-II-W" in parameterName or "Run-I-W" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p pbar e+ nu","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p pbar e- nu","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=particlegroup('epm','e+','e-')
process+=addProcess(thefactory,"p pbar epm nu","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "Run-II-Z-e" in parameterName or "Run-I-Z" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p pbar e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p pbar e+ e-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "Run-II-Z-LowMass-mu" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p pbar mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p pbar mu+ mu-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("25","70")
elif "Run-II-Z-HighMass-mu" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p pbar mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p pbar mu+ mu-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("150","600")
elif "Run-II-Z-mu" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p pbar mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p pbar mu+ mu-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
# Star
elif(collider=="Star" ) :
process = StringBuilder("set /Herwig/Decays/DecayHandler:LifeTimeOption 0\n")
process+= "set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm\n"
process+= "set /Herwig/Generators/EventGenerator:EventHandler:BeamB /Herwig/Particles/p+\n"
process+= collider_lumi(200.0)
process+= "set /Herwig/Cuts/Cuts:X2Min 0.01\n"
if(simulation=="") :
if "UE" in parameterName :
if "Dipole" in parameters["shower"]:
process+="read snippets/MB-DipoleShower.in\n"
else:
process+="read snippets/MB.in\n"
process+="read snippets/Diffraction.in\n"
else :
process+=insert_ME("MEQCD2to2")
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "Jets-1" in parameterName : process+=jet_kt_cut(2.)
elif "Jets-2" in parameterName : process+=jet_kt_cut(5.)
elif "Jets-3" in parameterName : process+=jet_kt_cut(20.)
elif "Jets-4" in parameterName : process+=jet_kt_cut(25.)
else :
logging.error("Star not supported for %s " % simulation)
sys.exit(1)
# ISR and SppS
elif(collider=="ISR" or collider =="SppS" ) :
process = StringBuilder("set /Herwig/Decays/DecayHandler:LifeTimeOption 0\n")
process+="set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm\n"
if(collider=="SppS") :
process = StringBuilder("set /Herwig/Generators/EventGenerator:EventHandler:BeamB /Herwig/Particles/pbar-\n")
if "30" in parameterName : process+=collider_lumi( 30.4)
elif "44" in parameterName : process+=collider_lumi( 44.4)
elif "53" in parameterName : process+=collider_lumi( 53.0)
elif "62" in parameterName : process+=collider_lumi( 62.2)
elif "63" in parameterName : process+=collider_lumi( 63.0)
elif "200" in parameterName : process+=collider_lumi(200.0)
elif "500" in parameterName : process+=collider_lumi(500.0)
elif "546" in parameterName : process+=collider_lumi(546.0)
elif "900" in parameterName : process+=collider_lumi(900.0)
if(simulation=="") :
if "Dipole" in parameters["shower"]:
process+="read snippets/MB-DipoleShower.in\n"
else:
process+="read snippets/MB.in\n"
process+="read snippets/Diffraction.in\n"
else :
logging.error(" SppS and ISR not supported for %s " % simulation)
sys.exit(1)
# LHC
elif(collider=="LHC") :
if parameterName.startswith("7-") : process = StringBuilder(collider_lumi(7000.0))
elif parameterName.startswith("8-") : process = StringBuilder(collider_lumi(8000.0))
elif parameterName.startswith("13-") : process = StringBuilder(collider_lumi(13000.0))
elif parameterName.startswith("900") : process = StringBuilder(collider_lumi(900.0))
elif parameterName.startswith("2360") : process = StringBuilder(collider_lumi(2360.0))
elif parameterName.startswith("2760") : process = StringBuilder(collider_lumi(2760.0))
else : process = StringBuilder(collider_lumi(7000.0))
if(simulation=="") :
if "VBF" in parameterName :
process+=insert_ME("MEPP2HiggsVBF")
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "8-" not in parameterName :
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
addedBRReweighter = True
process+="set /Herwig/Particles/tau-:Stable Stable\n"
elif "ggHJet" in parameterName :
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
addedBRReweighter = True
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+=insert_ME("MEHiggsJet")
process+=jet_kt_cut(20.)
elif "ggH" in parameterName :
process+=insert_ME("MEHiggs")
process+=insert_ME("MEHiggsJet","qqbar")
process+=jet_kt_cut(0.0)
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "8-" not in parameterName :
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
addedBRReweighter = True
process+="set /Herwig/Particles/tau-:Stable Stable\n"
elif "PromptPhoton" in parameterName :
process+=insert_ME("MEGammaJet")
if "PromptPhoton-1" in parameterName :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
elif "PromptPhoton-2" in parameterName :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 25.\n"
elif "PromptPhoton-3" in parameterName :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 80.\n"
elif "PromptPhoton-4" in parameterName :
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 150.\n"
elif "DiPhoton-GammaGamma" in parameterName :
process+=insert_ME("MEGammaGamma")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
parameterName=parameterName.replace("-GammaGamma","")
elif "DiPhoton-GammaJet" in parameterName :
process+=insert_ME("MEGammaJet")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
parameterName=parameterName.replace("-GammaJet","")
elif "8-WH" in parameterName :
process+=insert_ME("MEPP2WH")
process+=jet_kt_cut(0.0)
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "8-ZH" in parameterName :
process+=insert_ME("MEPP2ZH")
process+=jet_kt_cut(0.0)
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "WH" in parameterName :
process+=selectDecayMode("h0",["h0->b,bbar;"])
process+=selectDecayMode("W+",["W+->nu_e,e+;",
"W+->nu_mu,mu+;"])
addedBRReweighter = True
process+=insert_ME("MEPP2WH")
process+=jet_kt_cut(0.0)
elif "ZH" in parameterName :
process+=selectDecayMode("h0",["h0->b,bbar;"])
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;"])
addedBRReweighter = True
process+=insert_ME("MEPP2ZH")
process+=jet_kt_cut(0.0)
elif "UE" in parameterName :
if "Dipole" in parameters["shower"]:
process+="read snippets/MB-DipoleShower.in\n"
else:
process+="set /Herwig/Shower/ShowerHandler:IntrinsicPtGaussian 2.2*GeV\n"
process+="read snippets/MB.in\n"
process+="read snippets/Diffraction.in\n"
if "Long" in parameterName :
process += "set /Herwig/Decays/DecayHandler:MaxLifeTime 100*mm\n"
elif "8-DiJets" in parameterName or "7-DiJets" in parameterName :
process+=insert_ME("MEQCD2to2")
process+="set MEQCD2to2:MaximumFlavour 5\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "-A" in parameterName :
process+=jet_kt_cut(45.)
process+="set /Herwig/Cuts/JetKtCut:MinEta -3.\n"
process+="set /Herwig/Cuts/JetKtCut:MaxEta 3.\n"
elif "-B" in parameterName :
process+=jet_kt_cut(20.)
process+="set /Herwig/Cuts/JetKtCut:MinEta -2.7\n"
process+="set /Herwig/Cuts/JetKtCut:MaxEta 2.7\n"
elif "-C" in parameterName :
process+=jet_kt_cut(20.)
process+="set /Herwig/Cuts/JetKtCut:MinEta -4.8\n"
process+="set /Herwig/Cuts/JetKtCut:MaxEta 4.8\n"
if "DiJets-1" in parameterName : process+=mhatmin_cut(90.)
elif "DiJets-2" in parameterName : process+=mhatmin_cut(200.)
elif "DiJets-3" in parameterName : process+=mhatmin_cut(450.)
elif "DiJets-4" in parameterName : process+=mhatmin_cut(750.)
elif "DiJets-5" in parameterName : process+=mhatmin_cut(950.)
elif "DiJets-6" in parameterName : process+=mhatmin_cut(1550.)
elif "DiJets-7" in parameterName : process+=mhatmin_cut(2150.)
elif "DiJets-8" in parameterName : process+=mhatmin_cut(2750.)
elif( "7-Jets" in parameterName
or "8-Jets" in parameterName
or "13-Jets" in parameterName
+ or "2760-Jets" in parameterName
) :
process+=insert_ME("MEQCD2to2")
process+="set MEQCD2to2:MaximumFlavour 5\n"
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "Jets-10" in parameterName : process+=jet_kt_cut(1800.)
elif "Jets-0" in parameterName : process+=jet_kt_cut(5.)
elif "Jets-1" in parameterName : process+=jet_kt_cut(10.)
elif "Jets-2" in parameterName : process+=jet_kt_cut(20.)
elif "Jets-3" in parameterName : process+=jet_kt_cut(40.)
elif "Jets-4" in parameterName : process+=jet_kt_cut(70.)
elif "Jets-5" in parameterName : process+=jet_kt_cut(150.)
elif "Jets-6" in parameterName : process+=jet_kt_cut(200.)
elif "Jets-7" in parameterName : process+=jet_kt_cut(300.)
elif "Jets-8" in parameterName : process+=jet_kt_cut(500.)
elif "Jets-9" in parameterName : process+=jet_kt_cut(800.)
elif( "7-Charm" in parameterName or "7-Bottom" in parameterName
or "8-Bottom" in parameterName) :
if("8-Bottom" in parameterName) :
addBRReweighter()
process+=selectDecayMode("Jpsi",["Jpsi->mu-,mu+;"])
if "Bottom" in parameterName :
process+="cp MEHeavyQuark MEBottom\n"
process+="set MEBottom:QuarkType Bottom\n"
process+=insert_ME("MEBottom")
else :
process+="cp MEHeavyQuark MECharm\n"
process+="set MECharm:QuarkType Charm\n"
process+=insert_ME("MECharm")
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "-0" in parameterName :
if "Bottom" in parameterName :
process+="set MEBottom:Process Pair\n"
process+=jet_kt_cut(0.)
elif "-1" in parameterName : process+=jet_kt_cut(5.)
elif "-2" in parameterName : process+=jet_kt_cut(20.)
elif "-3" in parameterName : process+=jet_kt_cut(50.)
elif "-4" in parameterName : process+=jet_kt_cut(80.)
elif "-5" in parameterName : process+=jet_kt_cut(110.)
elif "-6" in parameterName : process+=jet_kt_cut(30.)+mhatmin_cut(90.)
elif "-7" in parameterName : process+=jet_kt_cut(30.)+mhatmin_cut(340.)
elif "-8" in parameterName : process+=jet_kt_cut(30.)+mhatmin_cut(500.)
elif "Top-L" in parameterName :
process+="set MEHeavyQuark:QuarkType Top\n"
process+=insert_ME("MEHeavyQuark")
process+=selectDecayMode("t",["t->nu_e,e+,b;",
"t->nu_mu,mu+,b;"])
process+=addBRReweighter()
elif "Top-SL" in parameterName :
process+="set MEHeavyQuark:QuarkType Top\n"
process+=insert_ME("MEHeavyQuark")
process+="set /Herwig/Particles/t:Synchronized Not_synchronized\n"
process+="set /Herwig/Particles/tbar:Synchronized Not_synchronized\n"
process+=selectDecayMode("t",["t->nu_e,e+,b;","t->nu_mu,mu+,b;"])
process+=selectDecayMode("tbar",["tbar->b,bbar,cbar;",
"tbar->bbar,cbar,d;",
"tbar->bbar,cbar,s;",
"tbar->bbar,s,ubar;",
"tbar->bbar,ubar,d;"])
process+=addBRReweighter()
elif "Top-All" in parameterName :
process+="set MEHeavyQuark:QuarkType Top\n"
process+=insert_ME("MEHeavyQuark")
elif "WZ" in parameterName :
process+=insert_ME("MEPP2VV","WZ")
process+=selectDecayMode("W+",["W+->nu_e,e+;",
"W+->nu_mu,mu+;"])
process+=selectDecayMode("W-",["W-->nu_ebar,e-;",
"W-->nu_mubar,mu-;"])
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;"])
addedBRReweighter = True
elif "WW-emu" in parameterName :
process+=insert_ME("MEPP2VV","WW")
process+="set /Herwig/Particles/W+:Synchronized 0\n"
process+="set /Herwig/Particles/W-:Synchronized 0\n"
process+=selectDecayMode("W+",["W+->nu_e,e+;"])
process+=selectDecayMode("W-",["W-->nu_mubar,mu-;"])
addedBRReweighter = True
elif "WW-ll" in parameterName :
process+=insert_ME("MEPP2VV","WW")
process+=selectDecayMode("W+",["W+->nu_e,e+;","W+->nu_mu,mu+;","W+->nu_tau,tau+;"])
addedBRReweighter = True
elif "ZZ-ll" in parameterName :
process+=insert_ME("MEPP2VV","ZZ")
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;",
"Z0->tau-,tau+;"])
addedBRReweighter = True
elif "ZZ-lv" in parameterName :
process+=insert_ME("MEPP2VV","ZZ")
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;",
"Z0->tau-,tau+;",
"Z0->nu_e,nu_ebar;",
"Z0->nu_mu,nu_mubar;",
"Z0->nu_tau,nu_taubar;"])
addedBRReweighter = True
elif "W-Z-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
process+=insert_ME("MEqq2W2ff","Electron")
elif "W-Z-mu" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Muon")
process+=insert_ME("MEqq2W2ff","Muon")
elif "W-e" in parameterName :
process+=insert_ME("MEqq2W2ff","Electron")
elif "W-mu" in parameterName :
process+=insert_ME("MEqq2W2ff","Muon")
elif "Z-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
elif "Z-mu" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Muon")
elif "Z-LowMass-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
process+=mhat_minm_maxm(20,20,70)
elif "Z-MedMass-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
process+=mhat_minm_maxm(40,40,130)
elif "Z-LowMass-mu" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Muon")
process+=mhat_minm_maxm(10,10,70)
elif "Z-Mass1" in parameterName :
process+=mhat_minm_maxm(10,10,35)
if "-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
else :
process+=insert_ME("MEqq2gZ2ff","Muon")
elif "Z-Mass2" in parameterName :
process+=mhat_minm_maxm(25,25,70)
if "-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
else :
process+=insert_ME("MEqq2gZ2ff","Muon")
elif "Z-Mass3" in parameterName :
process+=mhat_minm_maxm(60,60,120)
if "-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
else :
process+=insert_ME("MEqq2gZ2ff","Muon")
elif "Z-Mass4" in parameterName :
process+=mhat_minm_maxm(110,110,8000)
if "-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
else :
process+=insert_ME("MEqq2gZ2ff","Muon")
elif "Z-HighMass1" in parameterName :
process+=mhat_minm_maxm(116,116,400)
if "-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
else :
process+=insert_ME("MEqq2gZ2ff","Muon")
elif "Z-HighMass2" in parameterName :
process+=mhat_minm_maxm(400,400,7000)
if "-e" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Electron")
else :
process+=insert_ME("MEqq2gZ2ff","Muon")
elif "W-Jet" in parameterName :
process+=insert_ME("MEWJet","Electron","WDecay")
if "W-Jet-1-e" in parameterName :
process+="set /Herwig/Cuts/WBosonKtCut:MinKT 100.0*GeV\n"
parameterName=parameterName.replace("W-Jet-1-e","W-Jet-e")
elif "W-Jet-2-e" in parameterName :
process+="set /Herwig/Cuts/WBosonKtCut:MinKT 190.0*GeV\n"
parameterName=parameterName.replace("W-Jet-2-e","W-Jet-e")
elif "W-Jet-3-e" in parameterName :
process+="set /Herwig/Cuts/WBosonKtCut:MinKT 270.0*GeV\n"
parameterName=parameterName.replace("W-Jet-3-e","W-Jet-e")
elif "Z-Jet" in parameterName :
if "-e" in parameterName :
process+=insert_ME("MEZJet","Electron","ZDecay")
if "Z-Jet-0-e" in parameterName :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 35.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-0-e","Z-Jet-e")
elif "Z-Jet-1-e" in parameterName :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 100.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-1-e","Z-Jet-e")
elif "Z-Jet-2-e" in parameterName :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 190.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-2-e","Z-Jet-e")
elif "Z-Jet-3-e" in parameterName :
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 270.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-3-e","Z-Jet-e")
else :
process+=insert_ME("MEZJet","Muon","ZDecay")
process+="set /Herwig/Cuts/ZBosonKtCut:MinKT 35.0*GeV\n"
parameterName=parameterName.replace("Z-Jet-0-mu","Z-Jet-mu")
elif "WGamma" in parameterName :
process+=insert_ME("MEPP2VGamma","1")
process+="set MEPP2VGamma:MassOption 1"
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 10.\n"
if "-e" in parameterName :
process+=selectDecayMode("W+",["W+->nu_e,e+;"])
process+=addBRReweighter()
else :
process+=selectDecayMode("W+",["W+->nu_mu,mu+;"])
process+=addBRReweighter()
elif "ZGamma" in parameterName :
process+=insert_ME("MEPP2VGamma","2")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 10.\n"
if "-e" in parameterName :
process+=selectDecayMode("Z0",["Z0->e-,e+;"])
process+=addBRReweighter()
else :
process+=selectDecayMode("Z0",["Z0->mu-,mu+;"])
process+=addBRReweighter()
else :
logging.error(" Process %s not supported for internal matrix elements" % name)
sys.exit(1)
elif(simulation=="Powheg") :
if "VBF" in parameterName :
process+=insert_ME("PowhegMEPP2HiggsVBF")
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "8-" not in parameterName :
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
addedBRReweighter = True
process+="set /Herwig/Particles/tau-:Stable Stable\n"
elif "ggHJet" in parameterName :
logging.error(" Process %s not supported for POWHEG matrix elements" % name)
sys.exit(1)
elif "ggH" in parameterName :
process+=insert_ME("PowhegMEHiggs")
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "8-" not in parameterName :
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
addedBRReweighter = True
process+="set /Herwig/Particles/tau-:Stable Stable\n"
elif "8-WH" in parameterName :
process+=insert_ME("PowhegMEPP2WH")
process+=jet_kt_cut(0.0)
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "8-ZH" in parameterName :
process+=insert_ME("PowhegMEPP2ZH")
process+=jet_kt_cut(0.0)
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
addedBRReweighter = True
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
addedBRReweighter = True
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
addedBRReweighter = True
elif "WH" in parameterName :
process+=selectDecayMode("h0",["h0->b,bbar;"])
process+=selectDecayMode("W+",["W+->nu_e,e+;",
"W+->nu_mu,mu+;"])
addedBRReweighter = True
process+=insert_ME("PowhegMEPP2WH")
process+=jet_kt_cut(0.0)
elif "ZH" in parameterName :
process+=selectDecayMode("h0",["h0->b,bbar;"])
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;"])
addedBRReweighter = True
process+=insert_ME("PowhegMEPP2ZH")
process+=jet_kt_cut(0.0)
elif "UE" in parameterName :
logging.error(" Process %s not supported for powheg matrix elements" % name)
sys.exit(1)
elif "WZ" in parameterName :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="set /Herwig/Shower/ShowerHandler:SplitHardProcess No\n";
process+="set /Herwig/Decays/ZDecayer:PhotonGenerator NULL\n";
process+="set /Herwig/Decays/WDecayer:PhotonGenerator NULL\n";
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+=insert_ME("PowhegMEPP2VV","WZ")
process+=selectDecayMode("W+",["W+->nu_e,e+;",
"W+->nu_mu,mu+;"])
process+=selectDecayMode("W-",["W-->nu_ebar,e-;",
"W-->nu_mubar,mu-;"])
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;"])
addedBRReweighter = True
elif "WW-emu" in parameterName :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="set /Herwig/Shower/ShowerHandler:SplitHardProcess No\n";
process+="set /Herwig/Decays/ZDecayer:PhotonGenerator NULL\n";
process+="set /Herwig/Decays/WDecayer:PhotonGenerator NULL\n";
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+=insert_ME("PowhegMEPP2VV","WW")
process+="set /Herwig/Particles/W+:Synchronized 0\n"
process+="set /Herwig/Particles/W-:Synchronized 0\n"
process+=selectDecayMode("W+",["W+->nu_e,e+;"])
process+=selectDecayMode("W-",["W-->nu_mubar,mu-;"])
addedBRReweighter = True
elif "WW-ll" in parameterName :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="set /Herwig/Shower/ShowerHandler:SplitHardProcess No\n";
process+="set /Herwig/Decays/ZDecayer:PhotonGenerator NULL\n";
process+="set /Herwig/Decays/WDecayer:PhotonGenerator NULL\n";
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+=insert_ME("PowhegMEPP2VV","WW")
process+=selectDecayMode("W+",["W+->nu_e,e+;",
"W+->nu_mu,mu+;",
"W+->nu_tau,tau+;"])
addedBRReweighter = True
elif "ZZ-ll" in parameterName :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="set /Herwig/Shower/ShowerHandler:SplitHardProcess No\n";
process+="set /Herwig/Decays/ZDecayer:PhotonGenerator NULL\n";
process+="set /Herwig/Decays/WDecayer:PhotonGenerator NULL\n";
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+=insert_ME("PowhegMEPP2VV","ZZ")
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;",
"Z0->tau-,tau+;"])
addedBRReweighter = True
elif "ZZ-lv" in parameterName :
process+="create Herwig::HwDecayHandler /Herwig/NewPhysics/DecayHandler\n"
process+="set /Herwig/NewPhysics/DecayHandler:NewStep No\n"
process+="set /Herwig/Shower/ShowerHandler:SplitHardProcess No\n";
process+="set /Herwig/Decays/ZDecayer:PhotonGenerator NULL\n";
process+="set /Herwig/Decays/WDecayer:PhotonGenerator NULL\n";
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 0 /Herwig/Particles/tau-\n"
process+="insert /Herwig/NewPhysics/DecayHandler:Excluded 1 /Herwig/Particles/tau+\n"
process+="insert /Herwig/Generators/EventGenerator:EventHandler:PreCascadeHandlers 0 /Herwig/NewPhysics/DecayHandler\n"
process+=insert_ME("PowhegMEPP2VV","ZZ")
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;",
"Z0->tau-,tau+;",
"Z0->nu_e,nu_ebar;",
"Z0->nu_mu,nu_mubar;",
"Z0->nu_tau,nu_taubar;"])
addedBRReweighter = True
elif "W-Z-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
process+=insert_ME("PowhegMEqq2W2ff","Electron")
elif "W-Z-mu" in parameterName :
process+=insert_ME("MEqq2gZ2ff","Muon")
process+=insert_ME("MEqq2W2ff","Muon")
elif "W-e" in parameterName :
process+=insert_ME("PowhegMEqq2W2ff","Electron")
elif "W-mu" in parameterName :
process+=insert_ME("PowhegMEqq2W2ff","Muon")
elif "Z-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
elif "Z-mu" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "Z-LowMass-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
process+=mhat_minm_maxm(20,20,70)
elif "Z-MedMass-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
process+=mhat_minm_maxm(40,40,130)
elif "Z-LowMass-mu" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
process+=mhat_minm_maxm(10,10,70)
elif "Z-Mass1" in parameterName :
process+=mhat_minm_maxm(10,10,35)
if "-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
else :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "Z-Mass2" in parameterName :
process+=mhat_minm_maxm(25,25,70)
if "-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
else :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "Z-Mass3" in parameterName :
process+=mhat_minm_maxm(60,60,120)
if "-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
else :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "Z-Mass4" in parameterName :
process+=mhat_minm_maxm(110,110,8000)
if "-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
else :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "Z-HighMass1" in parameterName :
process+=mhat_minm_maxm(116,116,400)
if "-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
else :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "Z-HighMass2" in parameterName :
process+=mhat_minm_maxm(400,400,7000)
if "-e" in parameterName :
process+=insert_ME("PowhegMEqq2gZ2ff","Electron")
else :
process+=insert_ME("PowhegMEqq2gZ2ff","Muon")
elif "DiPhoton-GammaGamma" in parameterName :
process+=insert_ME("MEGammaGammaPowheg","GammaGamma")
process+=insert_ME("MEGammaGamma","gg")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
process+=jet_kt_cut(5.)
parameterName=parameterName.replace("-GammaGamma","")
elif "DiPhoton-GammaJet" in parameterName :
process+=insert_ME("MEGammaGammaPowheg","VJet")
process+="set /Herwig/Cuts/PhotonKtCut:MinKT 5.\n"
process+=jet_kt_cut(5.)
parameterName=parameterName.replace("-GammaJet","")
else :
logging.error(" Process %s not supported for internal POWHEG matrix elements" % name)
sys.exit(1)
elif( simulation=="Matchbox" or simulation=="Merging" ) :
if "VBF" in parameterName :
parameters["nlo"] = "read Matchbox/VBFNLO.in\n"
if(simulation=="Merging"):
process+="cd /Herwig/Merging/\n"
process+="insert "+thefactory+":DiagramGenerator:RestrictLines 0 /Herwig/Particles/Z0\n"
process+="insert "+thefactory+":DiagramGenerator:RestrictLines 0 /Herwig/Particles/W+\n"
process+="insert "+thefactory+":DiagramGenerator:RestrictLines 0 /Herwig/Particles/W-\n"
process+="insert "+thefactory+":DiagramGenerator:RestrictLines 0 /Herwig/Particles/gamma\n"
process+="do "+thefactory+":DiagramGenerator:TimeLikeRange 0 0\n"
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p h0 j j","0","3","FixedScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p h0 j j","0","3","FixedScale",1,1)
process+=setHardProcessWidthToZero(["h0"])
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
process+=addBRReweighter()
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
process+=addBRReweighter()
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
process+=addBRReweighter()
elif "8-" not in parameterName :
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
process+=addBRReweighter()
process+="set /Herwig/Particles/tau-:Stable Stable\n"
elif "ggHJet" in parameterName :
if(simulation=="Merging"):
logging.warning("ggHJet not explicitly tested for %s " % simulation)
sys.exit(0)
parameters["nlo"] = "read Matchbox/MadGraph-GoSam.in\nread Matchbox/HiggsEffective.in\n"
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
process+=addBRReweighter()
process+="set /Herwig/Particles/tau-:Stable Stable\n"
process+=setHardProcessWidthToZero(["h0"])
process+=addProcess(thefactory,"p p h0 j","3","1","FixedScale",0,0)
process+=addFirstJet("20")
process+="set "+thefactory+":ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/FixedScale\n"
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
elif "ggH" in parameterName :
parameters["nlo"] = "read Matchbox/MadGraph-GoSam.in\nread Matchbox/HiggsEffective.in\n"
if(simulation=="Merging"):
process+= "cd /Herwig/MatrixElements/Matchbox/Amplitudes\nset OpenLoops:HiggsEff On\nset MadGraph:Model heft\n"
process+="cd /Herwig/Merging/\n"
process+=setHardProcessWidthToZero(["h0"])
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p h0","2","1","FixedScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p h0","2","1","FixedScale",2,2)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
process+=addBRReweighter()
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
process+=addBRReweighter()
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
process+=addBRReweighter()
elif "8-" not in parameterName :
process+=selectDecayMode("h0",["h0->tau-,tau+;"])
process+=addBRReweighter()
process+="set /Herwig/Particles/tau-:Stable Stable\n"
elif "8-WH" in parameterName :
if(simulation=="Merging"):
logging.warning("8-WH not explicitly tested for %s " % simulation)
sys.exit(0)
process+=setHardProcessWidthToZero(["h0","W+","W-"])
process+=addProcess(thefactory,"p p W+ h0","0","2","FixedScale",0,0)
process+=addProcess(thefactory,"p p W- h0","0","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
process+=addBRReweighter()
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
process+=addBRReweighter()
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
process+=addBRReweighter()
elif "8-ZH" in parameterName :
if(simulation=="Merging"):
logging.warning("8-ZH not explicitly tested for %s " % simulation)
sys.exit(0)
process+=setHardProcessWidthToZero(["h0","Z0"])
process+=addProcess(thefactory,"p p Z0 h0","0","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 125.7\n"
if "GammaGamma" in parameterName :
process+=selectDecayMode("h0",["h0->gamma,gamma;"])
process+=addBRReweighter()
elif "WW" in parameterName :
process+=selectDecayMode("h0",["h0->W+,W-;"])
process+=addBRReweighter()
elif "ZZ" in parameterName :
process+=selectDecayMode("h0",["h0->Z0,Z0;"])
process+=addBRReweighter()
elif "WH" in parameterName :
if(simulation=="Merging"):
logging.warning("WH not explicitly tested for %s " % simulation)
sys.exit(0)
process+=selectDecayMode("h0",["h0->b,bbar;"])
process+=addBRReweighter()
process+=setHardProcessWidthToZero(["h0"])
process+=addProcess(thefactory,"p p e+ nu h0","0","3","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p e- nu h0","0","3","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p mu+ nu h0","0","3","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p mu- nu h0","0","3","LeptonPairMassScale",0,0)
process+=addLeptonPairCut("60","120")
elif "ZH" in parameterName :
if(simulation=="Merging"):
logging.warning("ZH not explicitly tested for %s " % simulation)
sys.exit(0)
process+=selectDecayMode("h0",["h0->b,bbar;"])
process+=addBRReweighter()
process+=setHardProcessWidthToZero(["h0"])
process+=addProcess(thefactory,"p p e+ e- h0","0","3","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p mu+ mu- h0","0","3","LeptonPairMassScale",0,0)
process+=addLeptonPairCut("60","120")
elif "UE" in parameterName :
logging.error(" Process %s not supported for Matchbox matrix elements" % name)
sys.exit(1)
elif "8-DiJets" in parameterName or "7-DiJets" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p j j","2","0","MaxJetPtScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p j j","2","0","MaxJetPtScale",1,1)
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "-A" in parameterName :
process+=addFirstJet("45")
process+=addSecondJet("25")
process+="set /Herwig/Cuts/FirstJet:YRange -3. 3.\n"
process+="set /Herwig/Cuts/SecondJet:YRange -3. 3.\n"
elif "-B" in parameterName :
process+=addFirstJet("20")
process+=addSecondJet("15")
process+="set /Herwig/Cuts/FirstJet:YRange -2.7 2.7\n"
process+="set /Herwig/Cuts/SecondJet:YRange -2.7 2.7\n"
elif "-C" in parameterName :
process+=addFirstJet("20")
process+=addSecondJet("15")
process+="set /Herwig/Cuts/FirstJet:YRange -4.8 4.8\n"
process+="set /Herwig/Cuts/SecondJet:YRange -4.8 4.8\n"
else :
logging.error("Exit 00001")
sys.exit(1)
if "DiJets-1" in parameterName : process+=addJetPairCut("90")
elif "DiJets-2" in parameterName : process+=addJetPairCut("200")
elif "DiJets-3" in parameterName : process+=addJetPairCut("450")
elif "DiJets-4" in parameterName : process+=addJetPairCut("750")
elif "DiJets-5" in parameterName : process+=addJetPairCut("950")
elif "DiJets-6" in parameterName : process+=addJetPairCut("1550")
elif "DiJets-7" in parameterName : process+=addJetPairCut("2150")
elif "DiJets-8" in parameterName : process+=addJetPairCut("2750")
else :
logging.error("Exit 00002")
sys.exit(1)
elif( "7-Jets" in parameterName
or "8-Jets" in parameterName
or "13-Jets" in parameterName
+ or "2760-Jets" in parameterName
) :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p j j","2","0","MaxJetPtScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p j j","2","0","MaxJetPtScale",1,1)
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "Jets-10" in parameterName : process+=addFirstJet("1800")
elif "Jets-0" in parameterName : process+=addFirstJet("5")
elif "Jets-1" in parameterName : process+=addFirstJet("10")
elif "Jets-2" in parameterName : process+=addFirstJet("20")
elif "Jets-3" in parameterName : process+=addFirstJet("40")
elif "Jets-4" in parameterName : process+=addFirstJet("70")
elif "Jets-5" in parameterName : process+=addFirstJet("150")
elif "Jets-6" in parameterName : process+=addFirstJet("200")
elif "Jets-7" in parameterName : process+=addFirstJet("300")
elif "Jets-8" in parameterName : process+=addFirstJet("500")
elif "Jets-9" in parameterName : process+=addFirstJet("800")
else :
logging.error("Exit 00003")
sys.exit(1)
elif( "7-Charm" in parameterName or "7-Bottom" in parameterName
or "8-Bottom" in parameterName) :
parameters["bscheme"]=fourFlavour
process+="set /Herwig/Particles/b:HardProcessMass 4.2*GeV\n"
process+="set /Herwig/Particles/bbar:HardProcessMass 4.2*GeV\n"
if("8-Bottom" in parameterName) :
addBRReweighter()
process+=selectDecayMode("Jpsi",["Jpsi->mu-,mu+;"])
if "Bottom" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p b bbar","2","0","MaxJetPtScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p b bbar","2","0","MaxJetPtScale",1,0)
else:
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p c cbar","2","0","MaxJetPtScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p c cbar","2","0","MaxJetPtScale",1,0)
process+="set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0\n"
if "-0" in parameterName : process+=addFirstJet("0")
elif "-1" in parameterName : process+=addFirstJet("5")
elif "-2" in parameterName : process+=addFirstJet("20")
elif "-3" in parameterName : process+=addFirstJet("50")
elif "-4" in parameterName : process+=addFirstJet("80")
elif "-5" in parameterName : process+=addFirstJet("110")
elif "-6" in parameterName :
process+=addFirstJet("30")
process+=addSecondJet("25")
process+=addJetPairCut("90")
elif "-7" in parameterName :
process+=addFirstJet("30")
process+=addSecondJet("25")
process+=addJetPairCut("340")
elif "-8" in parameterName :
process+=addFirstJet("30")
process+=addSecondJet("25")
process+=addJetPairCut("500")
else :
logging.error("Exit 00004")
sys.exit(1)
elif "Top-L" in parameterName :
process+=setHardProcessWidthToZero(["t","tbar"])
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p t tbar","2","0","TopPairMTScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p t tbar","2","0","TopPairMTScale",2,2)
process+=selectDecayMode("t",["t->nu_e,e+,b;",
"t->nu_mu,mu+,b;"])
process+=addBRReweighter()
elif "Top-SL" in parameterName :
process+=setHardProcessWidthToZero(["t","tbar"])
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p t tbar","2","0","TopPairMTScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p t tbar","2","0","TopPairMTScale",2,2)
process+="set /Herwig/Particles/t:Synchronized Not_synchronized\n"
process+="set /Herwig/Particles/tbar:Synchronized Not_synchronized\n"
process+=selectDecayMode("t",["t->nu_e,e+,b;",
"t->nu_mu,mu+,b;"])
process+=selectDecayMode("tbar",["tbar->b,bbar,cbar;",
"tbar->bbar,cbar,d;",
"tbar->bbar,cbar,s;",
"tbar->bbar,s,ubar;",
"tbar->bbar,ubar,d;"])
process+=addBRReweighter()
elif "Top-All" in parameterName :
process+=setHardProcessWidthToZero(["t","tbar"])
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p t tbar","2","0","TopPairMTScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p t tbar","2","0","TopPairMTScale",2,2)
elif "WZ" in parameterName :
if(simulation=="Merging"):
logging.warning("WZ not explicitly tested for %s " % simulation)
sys.exit(0)
process+=setHardProcessWidthToZero(["W+","W-","Z0"])
process+=addProcess(thefactory,"p p W+ Z0","0","2","FixedScale",0,0)
process+=addProcess(thefactory,"p p W- Z0","0","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 171.6*GeV\n\n"
process+=selectDecayMode("W+",["W+->nu_e,e+;",
"W+->nu_mu,mu+;"])
process+=selectDecayMode("W-",["W-->nu_ebar,e-;",
"W-->nu_mubar,mu-;"])
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;"])
process+=addBRReweighter()
process+=addLeptonPairCut("60","120")
elif "WW-emu" in parameterName :
if(simulation=="Merging"):
logging.warning("WW-emu not explicitly tested for %s " % simulation)
sys.exit(0)
process+=setHardProcessWidthToZero(["W+","W-","Z0"])
process+=addProcess(thefactory,"p p W+ W-","0","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 160.8*GeV\n"
process+="set /Herwig/Particles/W+:Synchronized 0\n"
process+="set /Herwig/Particles/W-:Synchronized 0\n"
process+=selectDecayMode("W+",["W+->nu_e,e+;"])
process+=selectDecayMode("W-",["W-->nu_mubar,mu-;"])
process+=addBRReweighter()
parameters["bscheme"] = "read Matchbox/FourFlavourScheme.in\n"
process+=addLeptonPairCut("60","120")
elif "WW-ll" in parameterName :
if(simulation=="Merging"):
logging.warning("WW-ll not explicitly tested for %s " % simulation)
sys.exit(0)
process+=setHardProcessWidthToZero(["W+","W-","Z0"])
process+=addProcess(thefactory,"p p W+ W-","0","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 160.8*GeV\n"
process+=selectDecayMode("W+",["W+->nu_e,e+;",
"W+->nu_mu,mu+;",
"W+->nu_tau,tau+;"])
process+=addBRReweighter()
process+=addLeptonPairCut("60","120")
parameters["bscheme"] = "read Matchbox/FourFlavourScheme.in\n"
elif "ZZ-ll" in parameterName :
if(simulation=="Merging"):
logging.warning("ZZ-ll not explicitly tested for %s " % simulation)
sys.exit(0)
process+=setHardProcessWidthToZero(["W+","W-","Z0"])
process+=addProcess(thefactory,"p p Z0 Z0","0","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 182.2*GeV\n"
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;",
"Z0->tau-,tau+;"])
process+=addBRReweighter()
process+=addLeptonPairCut("60","120")
elif "ZZ-lv" in parameterName :
if(simulation=="Merging"):
logging.warning("ZZ-lv not explicitly tested for %s " % simulation)
sys.exit(0)
process+=setHardProcessWidthToZero(["W+","W-","Z0"])
process+=addProcess(thefactory,"p p Z0 Z0","0","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 182.2*GeV\n"
process+=selectDecayMode("Z0",["Z0->e-,e+;",
"Z0->mu-,mu+;",
"Z0->tau-,tau+;",
"Z0->nu_e,nu_ebar;",
"Z0->nu_mu,nu_mubar;",
"Z0->nu_tau,nu_taubar;"])
process+=addBRReweighter()
process+=addLeptonPairCut("60","120")
elif "W-Z-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p e+ nu","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p e- nu","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=particlegroup('epm','e+','e-')
process+=particlegroup('epmnu','e+','e-','nu_e','nu_ebar')
process+=addProcess(thefactory,"p p epm epmnu","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "W-Z-mu" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p mu+ nu","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p mu- nu","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=particlegroup('mupm','mu+','mu-')
process+=particlegroup('mupmnu','mu+','mu-','nu_mu','nu_mubar')
process+=addProcess(thefactory,"p p mupm mupmnu","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "W-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ nu","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p e- nu","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=particlegroup('epm','e+','e-')
process+=addProcess(thefactory,"p p epm nu","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "W-mu" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ nu","0","2","LeptonPairMassScale",0,0)
process+=addProcess(thefactory,"p p mu- nu","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=particlegroup('mupm','mu+','mu-')
process+=addProcess(thefactory,"p p mupm nu","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "Z-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "Z-mu" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("60","120")
elif "Z-jj" in parameterName :
if(simulation=="Merging"):
logging.warning("Z-jj not explicitly tested for %s " % simulation)
sys.exit(0)
process+=addProcess(thefactory,"p p e+ e- j j","2","2","LeptonPairMassScale",0,0)
process+=addFirstJet("40")
process+=addSecondJet("30")
process+=addLeptonPairCut("60","120")
elif "Z-LowMass-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("20","70")
elif "Z-MedMass-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("40","130")
elif "Z-LowMass-mu" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
process+=addLeptonPairCut("10","70")
elif "Z-Mass1" in parameterName :
process+=addLeptonPairCut("10","35")
if "-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
else :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
elif "Z-Mass2" in parameterName :
process+=addLeptonPairCut("25","70")
if "-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
else :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
elif "Z-Mass3" in parameterName :
process+=addLeptonPairCut("60","120")
if "-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
else :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
elif "Z-Mass4" in parameterName :
process+=addLeptonPairCut("115","8000")
if "-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
else :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
elif "Z-HighMass1" in parameterName :
process+=addLeptonPairCut("116","400")
if "-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
else :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
elif "Z-HighMass2" in parameterName :
process+=addLeptonPairCut("400","7000")
if "-e" in parameterName :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p e+ e-","0","2","LeptonPairMassScale",2,2)
else :
if(simulation=="Matchbox"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",0,0)
elif(simulation=="Merging"):
process+=addProcess(thefactory,"p p mu+ mu-","0","2","LeptonPairMassScale",2,2)
elif "W-Jet" in parameterName :
if(simulation=="Merging"):
logging.warning("W-Jet not explicitly tested for %s " % simulation)
sys.exit(0)
process+=addProcess(thefactory,"p p e+ nu j","1","2","HTScale",0,0)
process+=addProcess(thefactory,"p p e- nu j","1","2","HTScale",0,0)
process+=addLeptonPairCut("60","120")
if "W-Jet-1-e" in parameterName :
process+=addFirstJet("100")
parameterName=parameterName.replace("W-Jet-1-e","W-Jet-e")
elif "W-Jet-2-e" in parameterName :
process+=addFirstJet("190")
parameterName=parameterName.replace("W-Jet-2-e","W-Jet-e")
elif "W-Jet-3-e" in parameterName :
process+=addFirstJet("270")
parameterName=parameterName.replace("W-Jet-3-e","W-Jet-e")
else :
logging.error("Exit 00005")
sys.exit(1)
elif "Z-Jet" in parameterName :
if(simulation=="Merging"):
logging.warning("Z-Jet not explicitly tested for %s " % simulation)
sys.exit(0)
if "-e" in parameterName :
process+=addProcess(thefactory,"p p e+ e- j","1","2","HTScale",0,0)
if "Z-Jet-0-e" in parameterName :
process+=addFirstJet("35")
parameterName=parameterName.replace("Z-Jet-0-e","Z-Jet-e")
elif "Z-Jet-1-e" in parameterName :
process+=addFirstJet("100")
parameterName=parameterName.replace("Z-Jet-1-e","Z-Jet-e")
elif "Z-Jet-2-e" in parameterName :
process+=addFirstJet("190")
parameterName=parameterName.replace("Z-Jet-2-e","Z-Jet-e")
elif "Z-Jet-3-e" in parameterName :
process+=addFirstJet("270")
parameterName=parameterName.replace("Z-Jet-3-e","Z-Jet-e")
else :
logging.error("Exit 00006")
sys.exit(1)
else :
process+=addProcess(thefactory,"p p mu+ mu- j","1","2","HTScale",0,0)
process+=addFirstJet("35")
parameterName=parameterName.replace("Z-Jet-0-mu","Z-Jet-mu")
process+=addLeptonPairCut("60","120")
elif "Z-bb" in parameterName :
if(simulation=="Merging"):
logging.warning("Z-bb not explicitly tested for %s " % simulation)
sys.exit(0)
parameters["bscheme"]=fourFlavour
process+="set /Herwig/Particles/b:HardProcessMass 4.2*GeV\nset /Herwig/Particles/bbar:HardProcessMass 4.2*GeV\n"
process+=addProcess(thefactory,"p p e+ e- b bbar","2","2","FixedScale",0,0)
process+=addLeptonPairCut("66","116")
process+=addFirstJet("18")
process+=addSecondJet("15")
process+=addLeptonPairCut("60","120")
elif "Z-b" in parameterName :
if(simulation=="Merging"):
logging.warning("Z-b not explicitly tested for %s " % simulation)
sys.exit(0)
process+=particlegroup('bjet','b','bbar')
process+=addProcess(thefactory,"p p e+ e- bjet","1","2","FixedScale",0,0)
process+="set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 91.2*GeV\n"
process+=addLeptonPairCut("60","120")
process+=addFirstJet("15")
elif "W-b" in parameterName :
if(simulation=="Merging"):
logging.warning("W-b not explicitly tested for %s " % simulation)
sys.exit(0)
parameters["bscheme"]=fourFlavour
process += "set /Herwig/Particles/b:HardProcessMass 4.2*GeV\nset /Herwig/Particles/bbar:HardProcessMass 4.2*GeV\n"
process+=addProcess(thefactory,"p p e- nu b bbar","2","2","FixedScale",0,0)
process+=addProcess(thefactory,"p p mu+ nu b bbar","2","2","FixedScale",0,0)
process += "set /Herwig/MatrixElements/Matchbox/Scales/FixedScale:FixedScale 80.4*GeV\n"
process+=addFirstJet("30")
process+=addLeptonPairCut("60","120")
else :
logging.error(" Process %s not supported for Matchbox matrix elements" % name)
sys.exit(1)
# LHC-GammaGamma
elif(collider=="LHC-GammaGamma" ) :
if "-7-" in parameterName : process = StringBuilder(collider_lumi(7000.0))
elif "-8-" in parameterName : process = StringBuilder(collider_lumi(8000.0))
else : process = StringBuilder(collider_lumi(7000.0))
if(simulation=="") :
if "7" in parameterName : process += insert_ME("MEgg2ff","Muon")
else :
logging.error(" Process %s not supported for default matrix elements" % name)
sys.exit(1)
else :
logging.error("LHC-GammaGamma not supported for %s " % simulation)
sys.exit(1)
parameters['parameterFile'] = os.path.join(collider,"{c}-{pn}.in".format(c=collider, pn=parameterName))
parameters['runname'] = 'Rivet-%s' % name
parameters['process'] = str(process)
#check if selecteddecaymode and addedBRReweighter is consistent
if selecteddecaymode and not addedBRReweighter:
logging.error("Decaymode was selected but no BRReweighter was added.")
sys.exit(1)
if addedBRReweighter and not selecteddecaymode:
logging.error("BRReweighter was added but no Decaymode was selected.")
sys.exit(1)
# check that we only add one process if in merging mode:
if numberOfAddedProcesses > 1 and simulation =="Merging":
logging.error("In Merging only one process is allowed at the moment. See ticket #403.")
sys.exit(1)
# Check if a process was added for Merging or Matchbox:
if numberOfAddedProcesses == 0 and (simulation =="Merging" or simulation =="Matchbox"):
logging.error("No process was selected.")
sys.exit(1)
# get template and write the file
with open(os.path.join("Rivet/Templates",templateName), 'r') as f:
templateText = f.read()
template = Template( templateText )
with open(os.path.join("Rivet",name+".in"), 'w') as f:
f.write( template.substitute(parameters) )
diff --git a/Tests/python/merge-BFactory b/Tests/python/merge-BFactory
--- a/Tests/python/merge-BFactory
+++ b/Tests/python/merge-BFactory
@@ -1,213 +1,214 @@
#! /usr/bin/env python
import logging
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda
# #############################################
def fillAbove(desthisto, sourcehistosbysqrts):
for sqrts, h in sorted(sourcehistosbysqrts.iteritems()) :
for i in range(0,h.numPoints) :
if(h.points[i].x-0.01<sqrts and
h.points[i].x+0.01>sqrts) :
desthisto.addPoint(h.points[i])
def merge(hpath):
global inhistos
global outhistos
try:
fillAbove(outhistos[hpath], inhistos[hpath])
except:
logging.error("Unknown analysis object" + hpath)
sys.exit(1)
def useOne(hpath, sqrts):
global inhistos
global outhistos
try:
outhistos[hpath] = inhistos[hpath][float(sqrts)]
except:
pass
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
# #######################################
yodafiles=["-10.52","-10.52-sym","-10.54",
"-10.58-res","-10.58","-Upsilon",
"-Upsilon2","-Upsilon4","-10.45","-Tau"]
## Get histos
inhistos = {}
outhistos={}
weights = {}
for f in yodafiles:
file = "Rivet-%s%s.yoda" % (args[0], f)
if(file.find("10.45")>0) :
sqrts=10.45
elif(file.find("10.52")>0) :
sqrts=10.52
elif(file.find("10.54")>0) :
sqrts=10.54
elif(file.find("10.58")>0) :
sqrts=10.58
elif(file.find("Tau")>0) :
sqrts=10.58
elif(file.find("Upsilon4")>0) :
sqrts=10.58
elif(file.find("Upsilon2")>0) :
sqrts=10.02
elif(file.find("Upsilon")>0) :
sqrts=9.46
if not os.access(file, os.R_OK):
if(file.find("Upsilon")>=0 or file.find("Tau")>=0) : continue
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as yoda" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
# jet shapes
if(aopath.find("6265367")>0 or aopath.find("6895344")>0 or
aopath.find("6181155")>0 or aopath.find("2789213")>0 or
aopath.find("2669951")>0) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
sqrttemp=sqrts
if(aopath.find("2669951")>0 and aopath.find("d01")>0 and
sqrts==10.45) :
sqrts=9.9
if not tmpE.has_key(sqrts):
tmpE[sqrts] = ao
else:
raise Exception("A set with sqrts = %s already exists" % ( sqrts))
sqrts=sqrttemp
else :
outhistos[aopath] = ao
## Make empty output histos if needed
for hpath,hsets in inhistos.iteritems():
if( hpath.find("2669951")>0) :
if(type(hsets.values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].path,hsets.values()[0].title)
else :
outhistos[hpath] = hsets.values()[0]
# BELLE
useOne("/BELLE_2006_S6265367/d01-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y03","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y04","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y05","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y06","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y07","10.52")
useOne("/BELLE_2006_S6265367/d01-x01-y08","10.52")
useOne("/BELLE_2006_S6265367/d02-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d02-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d03-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d03-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d04-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d04-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d05-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d05-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d06-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d06-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d07-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d07-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d08-x01-y01","10.52")
useOne("/BELLE_2006_S6265367/d08-x01-y02","10.52")
useOne("/BELLE_2006_S6265367/d09-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d09-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d10-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d10-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d11-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d11-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d12-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d12-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d13-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d13-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d14-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d14-x01-y02","10.58")
useOne("/BELLE_2006_S6265367/d15-x01-y01","10.58")
useOne("/BELLE_2006_S6265367/d15-x01-y02","10.58")
# BABAR
useOne("/BABAR_2007_S6895344/d01-x01-y01","10.54")
useOne("/BABAR_2007_S6895344/d02-x01-y01","10.54")
useOne("/BABAR_2007_S6895344/d03-x01-y01","10.58")
useOne("/BABAR_2007_S6895344/d04-x01-y01","10.58")
# BABAR
useOne("/BABAR_2005_S6181155/d01-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d02-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d02-x01-y02","10.54")
useOne("/BABAR_2005_S6181155/d03-x01-y01","10.54")
useOne("/BABAR_2005_S6181155/d04-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d05-x01-y01","10.58")
useOne("/BABAR_2005_S6181155/d05-x01-y02","10.54")
# ARGUS
useOne("/ARGUS_1993_S2789213/d01-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y02","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y03","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y04","10.45")
useOne("/ARGUS_1993_S2789213/d01-x01-y05","10.45")
useOne("/ARGUS_1993_S2789213/d02-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y02", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y03", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y04", "9.46")
useOne("/ARGUS_1993_S2789213/d02-x01-y05", "9.46")
useOne("/ARGUS_1993_S2789213/d03-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y02","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y03","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y04","10.58")
useOne("/ARGUS_1993_S2789213/d03-x01-y05","10.58")
useOne("/ARGUS_1993_S2789213/d04-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d05-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d06-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d07-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d08-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d09-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d10-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d11-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d12-x01-y01","10.58")
useOne("/ARGUS_1993_S2789213/d13-x01-y01","10.45")
useOne("/ARGUS_1993_S2789213/d14-x01-y01", "9.46")
useOne("/ARGUS_1993_S2789213/d15-x01-y01","10.58")
if("/ARGUS_1993_S2669951/d04-x01-y01" in outhistos) :
useOne("/ARGUS_1993_S2669951/d02-x01-y01","10.45")
useOne("/ARGUS_1993_S2669951/d03-x01-y01","9.46")
useOne("/ARGUS_1993_S2669951/d04-x01-y01","10.02")
merge("/ARGUS_1993_S2669951/d01-x01-y01")
merge("/ARGUS_1993_S2669951/d01-x01-y02")
merge("/ARGUS_1993_S2669951/d05-x01-y01")
# Choose output file
name = args[0]+".yoda"
# output the yoda file
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-DIS b/Tests/python/merge-DIS
--- a/Tests/python/merge-DIS
+++ b/Tests/python/merge-DIS
@@ -1,154 +1,155 @@
#! /usr/bin/env python
import logging
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda
# #############################################
def fillAbove(desthisto, sourcehistosbyq2):
q2high=1e100
q2low=-1e100
for q2,h in sorted(sourcehistosbyq2.iteritems(),reverse=True) :
q2low=q2
for i in range(0,h.numBins) :
if(h.bins[i].xMin >= q2low and
h.bins[i].xMin < q2high ) :
desthisto.bins[i] += h.bins[i]
q2high=q2
def merge(hpath):
global inhistos
global outhistos
try:
fillAbove(outhistos[hpath], inhistos[hpath])
except:
pass
def useOne(hpath, q2):
global inhistos
global outhistos
try:
outhistos[hpath] = inhistos[hpath][float(q2)]
except:
pass
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
# #######################################
yodafiles=["-e--LowQ2","-e+-LowQ2","-e+-HighQ2"]
## Get histos
inhistos = {}
outhistos={}
weights = {}
for f in yodafiles:
file = "Rivet-%s%s.yoda" % (args[0], f)
if(file.find("Low")> 0) :
q2=0
elif(file.find("High")>0) :
q2=50
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
break
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
break
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("4129130")>0 ) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
if not tmpE.has_key(q2):
tmpE[q2] = ao
else:
raise Exception("A set with q2 = %s already exists" % ( q2 ))
elif(aopath.find("2919893")>0 ) :
outhistos[aopath] = ao
elif(aopath.find("_XSEC")>=0 or aopath.find("_EVTCOUNT")>=0) :
continue
else :
logging.error("Analysis %s is unknown" % aopath)
sys.exit(1)
## Make empty output histos if needed
for hpath,hsets in inhistos.iteritems():
if( hpath.find("4129130")>0 and (hpath.find("d33")>0 or hpath.find("d34")>0)) :
if(type(hsets.values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].path,hsets.values()[0].title)
elif(type(hsets.values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].path,hsets.values()[0].title)
for i in range(0,hsets.values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].bins[i].xMin,hsets.values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
sys.exit(1)
# H1 transverse energy
useOne("/H1_2000_S4129130/d01-x01-y01","0")
useOne("/H1_2000_S4129130/d02-x01-y01","0")
useOne("/H1_2000_S4129130/d03-x01-y01","0")
useOne("/H1_2000_S4129130/d04-x01-y01","0")
useOne("/H1_2000_S4129130/d05-x01-y01","0")
useOne("/H1_2000_S4129130/d06-x01-y01","0")
useOne("/H1_2000_S4129130/d07-x01-y01","0")
useOne("/H1_2000_S4129130/d08-x01-y01","0")
useOne("/H1_2000_S4129130/d09-x01-y01","0")
useOne("/H1_2000_S4129130/d10-x01-y01","0")
useOne("/H1_2000_S4129130/d11-x01-y01","0")
useOne("/H1_2000_S4129130/d12-x01-y01","0")
useOne("/H1_2000_S4129130/d13-x01-y01","0")
useOne("/H1_2000_S4129130/d14-x01-y01","0")
useOne("/H1_2000_S4129130/d15-x01-y01","0")
useOne("/H1_2000_S4129130/d16-x01-y01","50")
useOne("/H1_2000_S4129130/d17-x01-y01","50")
useOne("/H1_2000_S4129130/d18-x01-y01","50")
useOne("/H1_2000_S4129130/d19-x01-y01","50")
useOne("/H1_2000_S4129130/d20-x01-y01","50")
useOne("/H1_2000_S4129130/d21-x01-y01","50")
useOne("/H1_2000_S4129130/d22-x01-y01","50")
useOne("/H1_2000_S4129130/d23-x01-y01","50")
useOne("/H1_2000_S4129130/d24-x01-y01","50")
useOne("/H1_2000_S4129130/d25-x01-y01","0")
useOne("/H1_2000_S4129130/d26-x01-y01","0")
useOne("/H1_2000_S4129130/d27-x01-y01","0")
useOne("/H1_2000_S4129130/d28-x01-y01","0")
useOne("/H1_2000_S4129130/d29-x01-y01","50")
useOne("/H1_2000_S4129130/d30-x01-y01","50")
useOne("/H1_2000_S4129130/d31-x01-y01","50")
useOne("/H1_2000_S4129130/d32-x01-y01","50")
merge("/H1_2000_S4129130/d33-x01-y01")
merge("/H1_2000_S4129130/d34-x01-y01")
# Choose output file
name = args[0]+".yoda"
# output the yoda file
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-LEP b/Tests/python/merge-LEP
--- a/Tests/python/merge-LEP
+++ b/Tests/python/merge-LEP
@@ -1,888 +1,889 @@
#! /usr/bin/env python
# import lighthisto
import logging
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda, copy
# # #############################################
def fillAbove(desthisto, sourcehistosbysqrts):
if type(desthisto) is yoda.core.Scatter2D :
if(desthisto.numPoints!=1) :
logging.error("Must have one bin for a specific sqrt(s) for %s" % desthisto.path)
sys.exit(1)
for sqrts, h in sorted(sourcehistosbysqrts.iteritems()) :
if(h.numPoints!=1) :
continue
if(desthisto.points[0].x != h.points[0].x) :
desthisto.addPoint(h.points[0])
elif(type(desthisto)==yoda.core.Profile1D) :
for sqrts, h in sorted(sourcehistosbysqrts.iteritems()) :
for i in range(0,h.numBins) :
if(sqrts>=h.bins[i].xMin and \
sqrts<=h.bins[i].xMax) :
desthisto.bins[i] += h.bins[i]
break
else :
logging.error("Unknown analysis object" + desthisto.path)
sys.exit(1)
def merge(hpath):
global inhistos
global outhistos
try:
fillAbove(outhistos[hpath], inhistos[hpath])
except:
pass
def useOne(hpath, sqrts):
global inhistos
global outhistos
try:
outhistos[hpath] = inhistos[hpath][float(sqrts)]
except:
pass
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
parser.add_option("--with-gg",
action='store_true' ,
dest="gg",
default=False,
help="Include gg analyese")
parser.add_option("--without-gg",
action='store_false',
dest="gg",
default=False,
help="Don\'t include gg analyses")
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
#######################################
yodafiles=["-130","-133","-136","-177","-192",
"-196","-202","-206","-91" ,"-91-nopi" ,\
"-161","-183","-197","-35" ,"-172",\
"-189","-200","-44","-14","-22","-10",\
"-12.8","-26.8","-48.0","-93.0",\
"-12","-13","-17","-27.6","-29","-30.2","-30.75",\
"-30.7","-30","-31.3","-34.8","-43.6","-50","-52",\
"-55","-56","-57","-60.8","-60","-61.4","-9.4" ]
# add gg if needed
if(opts.gg) :
yodafiles += ["-10.5-gg","-12.8-gg","-16.86-gg","-26.8-gg",\
"-35.44-gg","-97.0-gg","-11.96-gg","-13.96-gg",\
"-21.84-gg","-28.48-gg","-48.0-gg"]
## Get histos
inhistos = {}
outhistos={}
for f in yodafiles:
file = "Rivet-%s%s.yoda" % (args[0], f)
sqrts=float(f.split("-")[1].replace(".yoda",""))
if not os.access(file, os.R_OK):
logging.error("%s cannot be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s cannot be parsed as yoda" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
# jet shapes
if(aopath.find("4300807")>0 or aopath.find("6132243")>0 or
aopath.find("5765862")>0 or aopath.find("3612880")>0 or
aopath.find("4328825")>0 or aopath.find("5361494")>0 or
aopath.find("2148048")>0 or aopath.find("295160")>0 or
aopath.find("190818" )>0 or aopath.find("154270")>0 or
aopath.find("277658")>0 or
aopath.find("MULTIPLICITIES")>0) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
if not inhistos[aopath].has_key(sqrts):
inhistos[aopath][sqrts] = ao
else:
raise Exception("A set with sqrts = %s already exists" % ( sqrts))
elif(aopath.find("OPAL_2004_I648738")>=0) :
if(file.find("gg")>=0) :
if(aopath.find("y03")>=0) :
outhistos[aopath] = ao
else :
if(aopath.find("y03")<0) :
outhistos[aopath] = ao
else :
outhistos[aopath] = ao
# ## Make empty output histos if needed
for hpath,hsets in inhistos.iteritems():
if( hpath.find("4300807")>0 or hpath.find("6132243")>0 or
hpath.find("5765862")>0 or hpath.find("295160")>0 or
hpath.find("4328825")>0 or hpath.find("5361494")>0 or
hpath.find("190818")>0 or hpath.find("154270")>0 or
hpath.find("277658")>0) :
# workhisto = copy.deepcopy(hsets.values()[0])
# outhistos[hpath] = workhisto
outhistos[hpath] = hsets.values()[0]
# tasso
useOne("/TASSO_1990_S2148048/d06-x01-y01","14")
useOne("/TASSO_1990_S2148048/d07-x01-y01","14")
useOne("/TASSO_1990_S2148048/d08-x01-y01","14")
useOne("/TASSO_1990_S2148048/d06-x01-y02","22")
useOne("/TASSO_1990_S2148048/d07-x01-y02","22")
useOne("/TASSO_1990_S2148048/d08-x01-y02","22")
useOne("/TASSO_1990_S2148048/d06-x01-y03","35")
useOne("/TASSO_1990_S2148048/d07-x01-y03","35")
useOne("/TASSO_1990_S2148048/d08-x01-y03","35")
useOne("/TASSO_1990_S2148048/d06-x01-y04","44")
useOne("/TASSO_1990_S2148048/d07-x01-y04","44")
useOne("/TASSO_1990_S2148048/d08-x01-y04","44")
# jade
useOne("/JADE_1998_S3612880/d02-x01-y01","44")
useOne("/JADE_1998_S3612880/d03-x01-y01","44")
useOne("/JADE_1998_S3612880/d04-x01-y01","44")
useOne("/JADE_1998_S3612880/d05-x01-y01","44")
useOne("/JADE_1998_S3612880/d06-x01-y01","35")
useOne("/JADE_1998_S3612880/d07-x01-y01","35")
useOne("/JADE_1998_S3612880/d08-x01-y01","35")
useOne("/JADE_1998_S3612880/d09-x01-y01","35")
useOne("/JADE_1998_S3612880/d10-x01-y01","44")
useOne("/JADE_1998_S3612880/d11-x01-y01","35")
useOne("/JADE_1998_S3612880/d12-x01-y01","22")
# opal/jade
useOne("/JADE_OPAL_2000_S4300807/d07-x01-y01","35")
useOne("/JADE_OPAL_2000_S4300807/d07-x01-y02","35")
useOne("/JADE_OPAL_2000_S4300807/d07-x01-y03","35")
useOne("/JADE_OPAL_2000_S4300807/d07-x01-y04","35")
useOne("/JADE_OPAL_2000_S4300807/d07-x01-y05","35")
useOne("/JADE_OPAL_2000_S4300807/d08-x01-y01","44")
useOne("/JADE_OPAL_2000_S4300807/d08-x01-y02","44")
useOne("/JADE_OPAL_2000_S4300807/d08-x01-y03","44")
useOne("/JADE_OPAL_2000_S4300807/d08-x01-y04","44")
useOne("/JADE_OPAL_2000_S4300807/d08-x01-y05","44")
useOne("/JADE_OPAL_2000_S4300807/d09-x01-y01","91")
useOne("/JADE_OPAL_2000_S4300807/d09-x01-y02","91")
useOne("/JADE_OPAL_2000_S4300807/d09-x01-y03","91")
useOne("/JADE_OPAL_2000_S4300807/d09-x01-y04","91")
useOne("/JADE_OPAL_2000_S4300807/d09-x01-y05","91")
useOne("/JADE_OPAL_2000_S4300807/d10-x01-y01","133")
useOne("/JADE_OPAL_2000_S4300807/d10-x01-y02","133")
useOne("/JADE_OPAL_2000_S4300807/d10-x01-y03","133")
useOne("/JADE_OPAL_2000_S4300807/d10-x01-y04","133")
useOne("/JADE_OPAL_2000_S4300807/d10-x01-y05","133")
useOne("/JADE_OPAL_2000_S4300807/d11-x01-y01","161")
useOne("/JADE_OPAL_2000_S4300807/d11-x01-y02","161")
useOne("/JADE_OPAL_2000_S4300807/d11-x01-y03","161")
useOne("/JADE_OPAL_2000_S4300807/d11-x01-y04","161")
useOne("/JADE_OPAL_2000_S4300807/d11-x01-y05","161")
useOne("/JADE_OPAL_2000_S4300807/d12-x01-y01","172")
useOne("/JADE_OPAL_2000_S4300807/d12-x01-y02","172")
useOne("/JADE_OPAL_2000_S4300807/d12-x01-y03","172")
useOne("/JADE_OPAL_2000_S4300807/d12-x01-y04","172")
useOne("/JADE_OPAL_2000_S4300807/d12-x01-y05","172")
useOne("/JADE_OPAL_2000_S4300807/d13-x01-y01","183")
useOne("/JADE_OPAL_2000_S4300807/d13-x01-y02","183")
useOne("/JADE_OPAL_2000_S4300807/d13-x01-y03","183")
useOne("/JADE_OPAL_2000_S4300807/d13-x01-y04","183")
useOne("/JADE_OPAL_2000_S4300807/d13-x01-y05","183")
useOne("/JADE_OPAL_2000_S4300807/d14-x01-y01","189")
useOne("/JADE_OPAL_2000_S4300807/d14-x01-y02","189")
useOne("/JADE_OPAL_2000_S4300807/d14-x01-y03","189")
useOne("/JADE_OPAL_2000_S4300807/d14-x01-y04","189")
useOne("/JADE_OPAL_2000_S4300807/d14-x01-y05","189")
useOne("/JADE_OPAL_2000_S4300807/d16-x01-y01","35")
useOne("/JADE_OPAL_2000_S4300807/d16-x01-y02","35")
useOne("/JADE_OPAL_2000_S4300807/d16-x01-y03","35")
useOne("/JADE_OPAL_2000_S4300807/d16-x01-y04","35")
useOne("/JADE_OPAL_2000_S4300807/d16-x01-y05","35")
useOne("/JADE_OPAL_2000_S4300807/d17-x01-y01","44")
useOne("/JADE_OPAL_2000_S4300807/d17-x01-y02","44")
useOne("/JADE_OPAL_2000_S4300807/d17-x01-y03","44")
useOne("/JADE_OPAL_2000_S4300807/d17-x01-y04","44")
useOne("/JADE_OPAL_2000_S4300807/d17-x01-y05","44")
useOne("/JADE_OPAL_2000_S4300807/d18-x01-y01","91")
useOne("/JADE_OPAL_2000_S4300807/d18-x01-y02","91")
useOne("/JADE_OPAL_2000_S4300807/d18-x01-y03","91")
useOne("/JADE_OPAL_2000_S4300807/d18-x01-y04","91")
useOne("/JADE_OPAL_2000_S4300807/d18-x01-y05","91")
useOne("/JADE_OPAL_2000_S4300807/d19-x01-y01","133")
useOne("/JADE_OPAL_2000_S4300807/d19-x01-y02","133")
useOne("/JADE_OPAL_2000_S4300807/d19-x01-y03","133")
useOne("/JADE_OPAL_2000_S4300807/d19-x01-y04","133")
useOne("/JADE_OPAL_2000_S4300807/d19-x01-y05","133")
useOne("/JADE_OPAL_2000_S4300807/d20-x01-y01","161")
useOne("/JADE_OPAL_2000_S4300807/d20-x01-y02","161")
useOne("/JADE_OPAL_2000_S4300807/d20-x01-y03","161")
useOne("/JADE_OPAL_2000_S4300807/d20-x01-y04","161")
useOne("/JADE_OPAL_2000_S4300807/d20-x01-y05","161")
useOne("/JADE_OPAL_2000_S4300807/d21-x01-y01","172")
useOne("/JADE_OPAL_2000_S4300807/d21-x01-y02","172")
useOne("/JADE_OPAL_2000_S4300807/d21-x01-y03","172")
useOne("/JADE_OPAL_2000_S4300807/d21-x01-y04","172")
useOne("/JADE_OPAL_2000_S4300807/d21-x01-y05","172")
useOne("/JADE_OPAL_2000_S4300807/d22-x01-y01","183")
useOne("/JADE_OPAL_2000_S4300807/d22-x01-y02","183")
useOne("/JADE_OPAL_2000_S4300807/d22-x01-y03","183")
useOne("/JADE_OPAL_2000_S4300807/d22-x01-y04","183")
useOne("/JADE_OPAL_2000_S4300807/d22-x01-y05","183")
useOne("/JADE_OPAL_2000_S4300807/d23-x01-y01","189")
useOne("/JADE_OPAL_2000_S4300807/d23-x01-y02","189")
useOne("/JADE_OPAL_2000_S4300807/d23-x01-y03","189")
useOne("/JADE_OPAL_2000_S4300807/d23-x01-y04","189")
useOne("/JADE_OPAL_2000_S4300807/d23-x01-y05","189")
useOne("/JADE_OPAL_2000_S4300807/d24-x01-y01","35")
useOne("/JADE_OPAL_2000_S4300807/d24-x01-y02","35")
useOne("/JADE_OPAL_2000_S4300807/d24-x01-y03","35")
useOne("/JADE_OPAL_2000_S4300807/d24-x01-y04","35")
useOne("/JADE_OPAL_2000_S4300807/d25-x01-y01","44")
useOne("/JADE_OPAL_2000_S4300807/d25-x01-y02","44")
useOne("/JADE_OPAL_2000_S4300807/d25-x01-y03","44")
useOne("/JADE_OPAL_2000_S4300807/d25-x01-y04","44")
useOne("/JADE_OPAL_2000_S4300807/d26-x01-y01","91")
useOne("/JADE_OPAL_2000_S4300807/d26-x01-y02","91")
useOne("/JADE_OPAL_2000_S4300807/d26-x01-y03","91")
useOne("/JADE_OPAL_2000_S4300807/d26-x01-y04","91")
useOne("/JADE_OPAL_2000_S4300807/d27-x01-y01","133")
useOne("/JADE_OPAL_2000_S4300807/d27-x01-y02","133")
useOne("/JADE_OPAL_2000_S4300807/d27-x01-y03","133")
useOne("/JADE_OPAL_2000_S4300807/d27-x01-y04","133")
useOne("/JADE_OPAL_2000_S4300807/d28-x01-y01","161")
useOne("/JADE_OPAL_2000_S4300807/d28-x01-y02","161")
useOne("/JADE_OPAL_2000_S4300807/d28-x01-y03","161")
useOne("/JADE_OPAL_2000_S4300807/d28-x01-y04","161")
useOne("/JADE_OPAL_2000_S4300807/d29-x01-y01","172")
useOne("/JADE_OPAL_2000_S4300807/d29-x01-y02","172")
useOne("/JADE_OPAL_2000_S4300807/d29-x01-y03","172")
useOne("/JADE_OPAL_2000_S4300807/d29-x01-y04","172")
useOne("/JADE_OPAL_2000_S4300807/d30-x01-y01","183")
useOne("/JADE_OPAL_2000_S4300807/d30-x01-y02","183")
useOne("/JADE_OPAL_2000_S4300807/d30-x01-y03","183")
useOne("/JADE_OPAL_2000_S4300807/d30-x01-y04","183")
useOne("/JADE_OPAL_2000_S4300807/d31-x01-y01","189")
useOne("/JADE_OPAL_2000_S4300807/d31-x01-y02","189")
useOne("/JADE_OPAL_2000_S4300807/d31-x01-y03","189")
useOne("/JADE_OPAL_2000_S4300807/d31-x01-y04","189")
useOne("/OPAL_2004_S6132243/d01-x01-y01","91")
useOne("/OPAL_2004_S6132243/d01-x01-y02","133")
useOne("/OPAL_2004_S6132243/d01-x01-y03","177")
useOne("/OPAL_2004_S6132243/d01-x01-y04","197")
useOne("/OPAL_2004_S6132243/d02-x01-y01","91")
useOne("/OPAL_2004_S6132243/d02-x01-y02","133")
useOne("/OPAL_2004_S6132243/d02-x01-y03","177")
useOne("/OPAL_2004_S6132243/d02-x01-y04","197")
useOne("/OPAL_2004_S6132243/d03-x01-y01","91")
useOne("/OPAL_2004_S6132243/d03-x01-y02","133")
useOne("/OPAL_2004_S6132243/d03-x01-y03","177")
useOne("/OPAL_2004_S6132243/d03-x01-y04","197")
useOne("/OPAL_2004_S6132243/d04-x01-y01","91")
useOne("/OPAL_2004_S6132243/d04-x01-y02","133")
useOne("/OPAL_2004_S6132243/d04-x01-y03","177")
useOne("/OPAL_2004_S6132243/d04-x01-y04","197")
useOne("/OPAL_2004_S6132243/d05-x01-y01","91")
useOne("/OPAL_2004_S6132243/d05-x01-y02","133")
useOne("/OPAL_2004_S6132243/d05-x01-y03","177")
useOne("/OPAL_2004_S6132243/d05-x01-y04","197")
useOne("/OPAL_2004_S6132243/d06-x01-y01","91")
useOne("/OPAL_2004_S6132243/d06-x01-y02","133")
useOne("/OPAL_2004_S6132243/d06-x01-y03","177")
useOne("/OPAL_2004_S6132243/d06-x01-y04","197")
useOne("/OPAL_2004_S6132243/d07-x01-y01","91")
useOne("/OPAL_2004_S6132243/d07-x01-y02","133")
useOne("/OPAL_2004_S6132243/d07-x01-y03","177")
useOne("/OPAL_2004_S6132243/d07-x01-y04","197")
useOne("/OPAL_2004_S6132243/d08-x01-y01","91")
useOne("/OPAL_2004_S6132243/d08-x01-y02","133")
useOne("/OPAL_2004_S6132243/d08-x01-y03","177")
useOne("/OPAL_2004_S6132243/d08-x01-y04","197")
useOne("/OPAL_2004_S6132243/d09-x01-y01","91")
useOne("/OPAL_2004_S6132243/d09-x01-y02","133")
useOne("/OPAL_2004_S6132243/d09-x01-y03","177")
useOne("/OPAL_2004_S6132243/d09-x01-y04","197")
useOne("/OPAL_2004_S6132243/d10-x01-y01","91")
useOne("/OPAL_2004_S6132243/d10-x01-y02","133")
useOne("/OPAL_2004_S6132243/d10-x01-y03","177")
useOne("/OPAL_2004_S6132243/d10-x01-y04","197")
useOne("/OPAL_2004_S6132243/d11-x01-y01","91")
useOne("/OPAL_2004_S6132243/d11-x01-y02","133")
useOne("/OPAL_2004_S6132243/d11-x01-y03","177")
useOne("/OPAL_2004_S6132243/d11-x01-y04","197")
useOne("/OPAL_2004_S6132243/d12-x01-y01","91")
useOne("/OPAL_2004_S6132243/d12-x01-y02","133")
useOne("/OPAL_2004_S6132243/d12-x01-y03","177")
useOne("/OPAL_2004_S6132243/d12-x01-y04","197")
useOne("/OPAL_2004_S6132243/d13-x01-y01","91")
useOne("/OPAL_2004_S6132243/d13-x01-y02","133")
useOne("/OPAL_2004_S6132243/d13-x01-y03","177")
useOne("/OPAL_2004_S6132243/d13-x01-y04","197")
useOne("/OPAL_2004_S6132243/d14-x01-y01","91")
useOne("/OPAL_2004_S6132243/d14-x01-y02","133")
useOne("/OPAL_2004_S6132243/d14-x01-y03","177")
useOne("/OPAL_2004_S6132243/d14-x01-y04","197")
useOne("/OPAL_2004_S6132243/d15-x01-y01","91")
useOne("/OPAL_2004_S6132243/d15-x01-y02","133")
useOne("/OPAL_2004_S6132243/d15-x01-y03","177")
useOne("/OPAL_2004_S6132243/d15-x01-y04","197")
useOne("/OPAL_2004_S6132243/d16-x01-y01","91")
useOne("/OPAL_2004_S6132243/d16-x01-y02","133")
useOne("/OPAL_2004_S6132243/d16-x01-y03","177")
useOne("/OPAL_2004_S6132243/d16-x01-y04","197")
useOne("/OPAL_2004_S6132243/d17-x01-y01","91")
useOne("/OPAL_2004_S6132243/d17-x01-y02","133")
useOne("/OPAL_2004_S6132243/d17-x01-y03","177")
useOne("/OPAL_2004_S6132243/d17-x01-y04","197")
useOne("/OPAL_2004_S6132243/d18-x01-y01","91")
useOne("/OPAL_2004_S6132243/d18-x01-y02","133")
useOne("/OPAL_2004_S6132243/d18-x01-y03","177")
useOne("/OPAL_2004_S6132243/d18-x01-y04","197")
useOne("/OPAL_2004_S6132243/d19-x01-y01","91")
useOne("/OPAL_2004_S6132243/d19-x01-y02","133")
useOne("/OPAL_2004_S6132243/d19-x01-y03","177")
useOne("/OPAL_2004_S6132243/d19-x01-y04","197")
useOne("/OPAL_2004_S6132243/d20-x01-y01","91")
useOne("/OPAL_2004_S6132243/d20-x01-y02","133")
useOne("/OPAL_2004_S6132243/d20-x01-y03","177")
useOne("/OPAL_2004_S6132243/d20-x01-y04","197")
useOne("/OPAL_2004_S6132243/d21-x01-y01","91")
useOne("/OPAL_2004_S6132243/d21-x01-y02","133")
useOne("/OPAL_2004_S6132243/d21-x01-y03","177")
useOne("/OPAL_2004_S6132243/d21-x01-y04","197")
useOne("/OPAL_2004_S6132243/d22-x01-y01","91")
useOne("/OPAL_2004_S6132243/d22-x01-y02","133")
useOne("/OPAL_2004_S6132243/d22-x01-y03","177")
useOne("/OPAL_2004_S6132243/d22-x01-y04","197")
useOne("/OPAL_2004_S6132243/d23-x01-y01","91")
useOne("/OPAL_2004_S6132243/d23-x01-y02","133")
useOne("/OPAL_2004_S6132243/d23-x01-y03","177")
useOne("/OPAL_2004_S6132243/d23-x01-y04","197")
useOne("/OPAL_2004_S6132243/d24-x01-y01","91")
useOne("/OPAL_2004_S6132243/d24-x01-y02","133")
useOne("/OPAL_2004_S6132243/d24-x01-y03","177")
useOne("/OPAL_2004_S6132243/d24-x01-y04","197")
useOne("/OPAL_2004_S6132243/d25-x01-y01","91")
useOne("/OPAL_2004_S6132243/d25-x01-y02","133")
useOne("/OPAL_2004_S6132243/d25-x01-y03","177")
useOne("/OPAL_2004_S6132243/d25-x01-y04","197")
useOne("/OPAL_2004_S6132243/d26-x01-y01","91")
useOne("/OPAL_2004_S6132243/d26-x01-y02","133")
useOne("/OPAL_2004_S6132243/d26-x01-y03","177")
useOne("/OPAL_2004_S6132243/d26-x01-y04","197")
merge( "/OPAL_2002_S5361494/d01-x01-y01")
merge( "/OPAL_2002_S5361494/d01-x01-y02")
merge( "/OPAL_2002_S5361494/d01-x01-y03")
merge( "/OPAL_2002_S5361494/d01-x01-y04")
merge("/DELPHI_2000_S4328825/d01-x01-y01")
merge("/DELPHI_2000_S4328825/d01-x01-y02")
merge("/DELPHI_2000_S4328825/d01-x01-y03")
merge("/DELPHI_2000_S4328825/d01-x01-y04")
merge("/ALEPH_2004_S5765862/d01-x01-y01")
useOne("/ALEPH_2004_S5765862/d02-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d03-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d04-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d05-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d06-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d07-x01-y01","196")
useOne("/ALEPH_2004_S5765862/d08-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d09-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d11-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d12-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d13-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d14-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d15-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d16-x01-y01","196")
useOne("/ALEPH_2004_S5765862/d17-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d18-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d19-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d20-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d21-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d22-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d23-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d24-x01-y01","196")
useOne("/ALEPH_2004_S5765862/d25-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d26-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d27-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d28-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d29-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d30-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d31-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d32-x01-y01","196")
useOne("/ALEPH_2004_S5765862/d33-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d34-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d35-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d36-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d37-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d38-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d39-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d40-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d41-x01-y01","196")
useOne("/ALEPH_2004_S5765862/d42-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d43-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d44-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d45-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d46-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d47-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d48-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d49-x01-y01","196")
useOne("/ALEPH_2004_S5765862/d50-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d51-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d54-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d55-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d56-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d57-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d58-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d59-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d60-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d61-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d62-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d63-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d64-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d65-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d66-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d67-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d68-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d69-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d70-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d71-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d72-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d73-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d74-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d75-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d76-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d77-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d78-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d79-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d80-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d81-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d82-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d83-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d84-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d85-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d86-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d87-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d88-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d89-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d90-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d91-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d92-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d93-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d94-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d95-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d96-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d97-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d98-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d99-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d100-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d101-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d102-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d103-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d104-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d105-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d106-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d107-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d108-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d109-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d110-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d111-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d112-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d113-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d114-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d115-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d116-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d117-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d118-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d119-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d120-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d121-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d122-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d123-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d124-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d125-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d126-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d127-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d128-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d129-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d130-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d131-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d132-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d133-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d134-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d135-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d136-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d137-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d138-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d139-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d140-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d141-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d142-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d143-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d144-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d145-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d146-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d147-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d148-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d149-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d150-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d151-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d152-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d153-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d154-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d155-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d156-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d157-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d158-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d159-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d160-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d161-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d162-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d163-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d164-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d165-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d166-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d167-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d168-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d169-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d170-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d172-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d173-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d174-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d175-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d176-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d177-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d178-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d179-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d180-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d181-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d182-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d183-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d184-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d185-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d186-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d187-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d188-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d189-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d190-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d191-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d192-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d193-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d194-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d195-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d196-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d197-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d198-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d199-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d200-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d201-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d202-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d203-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d204-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d205-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d206-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d207-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d208-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d209-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d210-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d211-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d212-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d213-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d214-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d215-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d216-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d217-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d218-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d219-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d220-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d221-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d222-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d223-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d224-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d225-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d226-x01-y01","206")
useOne("/ALEPH_2004_S5765862/d227-x01-y01","91")
useOne("/ALEPH_2004_S5765862/d228-x01-y01","133")
useOne("/ALEPH_2004_S5765862/d229-x01-y01","161")
useOne("/ALEPH_2004_S5765862/d230-x01-y01","172")
useOne("/ALEPH_2004_S5765862/d231-x01-y01","183")
useOne("/ALEPH_2004_S5765862/d232-x01-y01","189")
useOne("/ALEPH_2004_S5765862/d233-x01-y01","200")
useOne("/ALEPH_2004_S5765862/d234-x01-y01","206")
# hadron multiplicities
useOne("/PDG_HADRON_MULTIPLICITIES/d01-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d02-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d03-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d04-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d05-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d06-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d07-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d08-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d09-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d13-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d15-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d17-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d18-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d19-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d20-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d21-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d22-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d23-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d25-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d31-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d38-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d39-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d40-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d44-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d45-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d46-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d47-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d48-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d49-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d50-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d51-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d53-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d54-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES/d01-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d02-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d03-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d04-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d05-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d06-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d07-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d08-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d09-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d13-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d15-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d18-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d19-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d20-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d21-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d22-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d31-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d33-x01-y01","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d34-x01-y01","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d38-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d39-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d44-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d46-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d47-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d48-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d50-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d51-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES/d01-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d02-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d03-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d04-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d05-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d06-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d07-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d08-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d09-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d10-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d11-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d12-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d13-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d14-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d15-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d16-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d17-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d18-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d19-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d20-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d21-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d23-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d24-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d25-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d26-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d27-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d28-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d29-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d30-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d31-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d32-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d34-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d35-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d36-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d37-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d38-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d39-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d40-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d41-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d42-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d43-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d44-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d45-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d46-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d47-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d48-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d49-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d50-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d51-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d52-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d54-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES/d01-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES/d03-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES/d04-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES/d38-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES/d39-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d02-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d03-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d04-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d05-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d06-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d07-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d08-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d09-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d13-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d15-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d17-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d18-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d19-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d20-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d21-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d22-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d23-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d25-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d31-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d38-x01-y01","10" )
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d39-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d40-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d44-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d45-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d46-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d47-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d48-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d49-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d50-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d51-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d53-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d54-x01-y01","10")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d02-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d03-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d04-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d05-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d06-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d07-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d08-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d09-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d13-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d15-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d18-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d19-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d20-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d21-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d22-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d31-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d33-x01-y01","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d34-x01-y01","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d38-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d39-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d44-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d46-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d47-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d48-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d50-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d51-x01-y02","35")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d02-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d03-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d04-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d05-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d06-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d07-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d08-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d09-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d10-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d11-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d12-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d13-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d14-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d15-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d16-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d17-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d18-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d19-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d20-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d21-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d23-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d24-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d25-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d26-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d27-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d28-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d29-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d30-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d31-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d32-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d34-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d35-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d36-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d37-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d38-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d39-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d40-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d41-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d42-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d43-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d44-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d45-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d46-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d47-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d48-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d49-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d50-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d51-x01-y03","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d52-x01-y01","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d54-x01-y02","91")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d03-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d04-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d38-x01-y04","177")
useOne("/PDG_HADRON_MULTIPLICITIES_RATIOS/d39-x01-y04","177")
# AMY analysis
useOne("/AMY_1990_I295160/d01-x01-y01","50")
useOne("/AMY_1990_I295160/d01-x01-y02","52")
useOne("/AMY_1990_I295160/d01-x01-y03","55")
useOne("/AMY_1990_I295160/d01-x01-y04","56")
useOne("/AMY_1990_I295160/d01-x01-y05","57")
useOne("/AMY_1990_I295160/d01-x01-y06","60")
useOne("/AMY_1990_I295160/d01-x01-y07","60.8")
useOne("/AMY_1990_I295160/d01-x01-y08","61.4")
useOne("/AMY_1990_I295160/d01-x01-y09","57")
useOne("/AMY_1990_I295160/d02-x02-y01","57")
merge("/AMY_1990_I295160/d02-x01-y01")
merge("/JADE_1983_I190818/d01-x01-y01")
useOne("/PLUTO_1980_I154270/d01-x02-y01","30.75")
merge("/PLUTO_1980_I154270/d01-x01-y01")
merge("/TASSO_1989_I277658/d02-x01-y01")
useOne("/TASSO_1989_I277658/d05-x01-y01","14")
useOne("/TASSO_1989_I277658/d05-x01-y02","22")
useOne("/TASSO_1989_I277658/d05-x01-y03","34.8")
useOne("/TASSO_1989_I277658/d05-x01-y04","43.6")
# Choose output file
name = args[0]+".yoda"
# output the yoda file
# print "Write yoda to ",name
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-LHC-EW b/Tests/python/merge-LHC-EW
--- a/Tests/python/merge-LHC-EW
+++ b/Tests/python/merge-LHC-EW
@@ -1,401 +1,402 @@
#! /usr/bin/env python
import logging
import sys
import os, yoda
"""%prog
Script for merging aida files
"""
def fillAbove(scale,desthisto, sourcehistosbyptmin) :
pthigh= 1e100
ptlow =-1e100
for pt, h in sorted(sourcehistosbyptmin.iteritems(),reverse=True):
ptlow=pt
if(type(desthisto)==yoda.core.Scatter2D) :
for i in range(0,h.numPoints) :
xMin = h.points[i].x-h.points[i].xErrs.minus
if( xMin*scale >= ptlow and
xMin*scale < pthigh ) :
desthisto.addPoint(h.points[i])
elif(type(desthisto)==yoda.core.Profile1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Histo1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
else :
logging.error("Can't merge %s, unknown type" % desthisto.path)
sys.exit(1)
pthigh=pt
def mergeByMass(hpath, sqrts, scale=1.):
global inhistos_mass
global outhistos
try:
fillAbove(scale,outhistos[hpath], inhistos_mass[hpath][float(sqrts)])
except:
pass
def useOneMass(hpath, sqrts, ptmin):
global inhistos_mass
global outhistos
try:
## Find best pT_min match
ptmins = inhistos_mass[hpath][float(sqrts)].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested pTmin=%s: " % ptmin + \
"using pTmin=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos_mass[hpath][float(sqrts)][closest_ptmin]
except:
pass
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog base")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
yodafiles=["-13-Z-e","-13-Z-mu","-Z-HighMass1-e","-Z-HighMass2-e",
"-8-Z-Mass1-e","-8-Z-Mass1-mu","-8-Z-Mass2-e","-8-Z-Mass2-mu","-8-Z-Mass3-e","-8-Z-Mass3-mu","-8-Z-Mass4-e","-8-Z-Mass4-mu",
"-W-e","-W-mu","-Z-e","-Z-mu","-Z-mu-Short","-Z-LowMass-e","-Z-LowMass-mu",
"-Z-MedMass-e","-W-Z-e","-W-Z-mu",
"-WW-emu","-WW-ll","-WZ","-ZZ-ll","-ZZ-lv","-8-WZ","-13-WZ","-8-ZZ-lv","-8-WW-ll",
"-7-W-Jet-1-e","-7-W-Jet-2-e","-7-W-Jet-3-e","-7-Z-Jet-1-e","-7-Z-Jet-2-e","-7-Z-Jet-3-e",
"-7-WGamma-e","-7-WGamma-mu","-7-ZGamma-e","-7-ZGamma-mu"]
## Get histos
outhistos={}
inhistos_mass = {}
for f in yodafiles:
file='Rivet-'+args[0]+f+".yoda"
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
break
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as yoda" % file)
break
mass=66
if(file.find("HighMass1")>=0) :
mass = 116
elif(file.find("HighMass2")>=0) :
mass = 400
elif(file.find("Mass1")>=0) :
mass = 12
elif(file.find("Mass2")>=0) :
mass = 30
elif(file.find("Mass3")>=0) :
mass = 66
elif(file.find("Mass4")>=0) :
mass = 116
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("ATLAS_2010_S8919674")>0) :
if((aopath.find("d01")>0 or aopath.find("d05")>0 or
aopath.find("d07")>0) and file.find("-e")>0) :
outhistos[aopath] = ao
elif((aopath.find("d02")>0 or aopath.find("d06")>0 or
aopath.find("d08")>0) and file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2011_S9131140")>0) :
if(aopath.find("d01")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif(aopath.find("d02")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2011_I925932")>0) :
if(aopath.find("d01")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif(aopath.find("d02")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2011_I945498")>0) :
if(aopath.find("y01")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif(aopath.find("y02")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif(aopath.find("y03")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2013_I1217867")>0) :
if(aopath.find("y01")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif(aopath.find("y02")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("CMS_2012_I941555")>0) :
if((aopath.find("y01")>0 or aopath.find("y03")>0 ) and file.find("-mu")>0) :
outhistos[aopath] = ao
elif(aopath.find("y02")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2014_I1300647" )>0) :
if(aopath.find("y01")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif((not aopath.find("y01")>0) and file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2014_I1288706" )>0) :
if(aopath.find("y02")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif(aopath.find("y01")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2012_I1204784" )>0) :
if( file.find("-e")>0 and
( aopath.find("d03")>0 or
((aopath.find("d01")>0 or aopath.find("d02")>0) and aopath.find("y01")>0))) :
outhistos[aopath] = ao
elif(file.find("-mu")>0 and
( aopath.find("d04")>0 or
((aopath.find("d01")>0 or aopath.find("d02")>0) and aopath.find("y02")>0))) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2014_I1312627_EL") >0) :
if(file.find("-e")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2014_I1312627_MU") >0) :
if(file.find("-mu")>0) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2014_I1312627") >0) :
if(file.find("-e")>0) :
outhistos[aopath] = ao
elif (aopath.find("CMS_2013_I1224539_WJET" )>0) :
if(file.find("-1-e")>0 and (aopath.find("d52")>0 or aopath.find("d53")>0 or aopath.find("d56")>0 or aopath.find("d57")>0 or aopath.find("d60")>0 or aopath.find("d61")>0 or aopath.find("d64")>0 or aopath.find("d65")>0 or aopath.find("d68")>0 or aopath.find("d69")>0 or aopath.find("d72")>0)) :
outhistos[aopath] = ao
elif(file.find("-2-e")>0 and (aopath.find("d54")>0 or aopath.find("d58")>0 or aopath.find("d62")>0 or aopath.find("d66")>0 or aopath.find("d70")>0 or aopath.find("d73")>0)) :
outhistos[aopath] = ao
elif(file.find("-3-e")>0 and (aopath.find("d55")>0 or aopath.find("d59")>0 or aopath.find("d63")>0 or aopath.find("d67")>0 or aopath.find("d71")>0 or aopath.find("d74")>0)) :
outhistos[aopath] = ao
elif (aopath.find("CMS_2013_I1224539_ZJET" )>0) :
if(file.find("-1-e")>0 and (aopath.find("d29")>0 or aopath.find("d30")>0 or aopath.find("d33")>0 or aopath.find("d34")>0 or aopath.find("d37")>0 or aopath.find("d38")>0 or aopath.find("d41")>0 or aopath.find("d42")>0 or aopath.find("d45")>0 or aopath.find("d46")>0 or aopath.find("d49")>0)) :
outhistos[aopath] = ao
elif(file.find("-2-e")>0 and (aopath.find("d31")>0 or aopath.find("d35")>0 or aopath.find("d39")>0 or aopath.find("d43")>0 or aopath.find("d47")>0 or aopath.find("d50")>0)) :
outhistos[aopath] = ao
elif(file.find("-3-e")>0 and (aopath.find("d32")>0 or aopath.find("d36")>0 or aopath.find("d40")>0 or aopath.find("d44")>0 or aopath.find("d48")>0 or aopath.find("d51")>0)) :
outhistos[aopath] = ao
elif (aopath.find("CMS_2013_I1258128")>0) :
if(aopath.find("d01")>0 or aopath.find("d02")>0 or
aopath.find("d03")>0 or aopath.find("d04")>0) :
outhistos[aopath] = ao
elif (aopath.find("CMS_2013_I1209721" )>0 and file.find("-0")>0 ) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2011_I928289")>0) :
if(file.find("-e")>=0 and (aopath.find("y01")>=0 or aopath.find("y02")>=0)) :
outhistos[aopath] = ao
elif(file.find("-mu")>=0 and (aopath.find("y03")>=0 or aopath.find("y04")>=0)) :
outhistos[aopath] = ao
elif (aopath.find("CMS_2013_I1122847")>0) :
if(file.find("-mu")>=0 and aopath.find("d01")>=0 ) :
outhistos[aopath] = ao
elif(file.find("-e")>=0 and (aopath.find("d02")>=0 or aopath.find("d03")>=0)) :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2016_I1424838")>0) :
if(file.find("-mu")>=0 and aopath.find("x02")>=0 ) :
outhistos[aopath] = ao
elif(file.find("-e")>=0 and (aopath.find("x01")>=0)) :
outhistos[aopath] = ao
elif (aopath.find("CMS_2015_I1310737")>0) :
if aopath in outhistos :
outhistos[aopath] += ao
else :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2015_I1351916")>=0) :
if(aopath.find("-y01")>=0) :
pathBase = aopath.replace("-y01","")
hp = aos[pathBase+"-y02"]
hm = aos[pathBase+"-y03"]
ratio = (hp-hm)/(hp+hm)
hnew = yoda.Scatter2D(aopath,ao.title)
hnew.combineWith(ratio)
outhistos[aopath] = hnew
else :
continue
elif (aopath.find("ATLAS_2014_I1282447")>=0) :
if((aopath.find("/ATLAS_2014_I1282447/d02-x01-y01")>=0 or
aopath.find("/ATLAS_2014_I1282447/d08-x01-y01")>=0 or
aopath.find("/ATLAS_2014_I1282447/d02-x01-y02")>=0 or
aopath.find("/ATLAS_2014_I1282447/d02-x01-y01")>=0 or
aopath.find("/ATLAS_2014_I1282447/d05-x01-y02")>=0 or
aopath.find("/ATLAS_2014_I1282447/d05-x01-y03")>=0 or
aopath.find("/ATLAS_2014_I1282447/d06-x01-y01")>=0 or
aopath.find("/ATLAS_2014_I1282447/d06-x01-y02")>=0 or
aopath.find("/ATLAS_2014_I1282447/d06-x01-y03")>=0 or
aopath.find("/ATLAS_2014_I1282447/d06-x01-y04")>=0) and
not (aopath.find("plus")>=0 or aopath.find("minus")>=0 or
aopath.find("inc")>=0)) :
continue
if aopath in outhistos :
outhistos[aopath] += ao
else :
outhistos[aopath] = ao
elif (aopath.find("ATLAS_2015_I1408516")>=0) :
if not inhistos_mass.has_key(aopath):
inhistos_mass[aopath] = {}
tmpE = inhistos_mass[aopath]
sqrts=8000
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if not tmpP.has_key(mass):
tmpP[mass] = ao
else:
raise Exception("A set with mass = %s already exists" % ( mass))
elif (aopath.find("ATLAS_2013_I1234228")>=0) :
if not inhistos_mass.has_key(aopath):
inhistos_mass[aopath] = {}
tmpE = inhistos_mass[aopath]
sqrts=7000
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if not tmpP.has_key(mass):
tmpP[mass] = ao
else:
raise Exception("A set with mass = %s already exists" % ( mass))
else :
outhistos[aopath] = ao
for hpath,hsets in inhistos_mass.iteritems():
if(hpath!="/ATLAS_2015_I1408516_EL/d41-x01-y01" and
hpath!="/ATLAS_2015_I1408516_MU/d41-x01-y02" and
hpath!="/ATLAS_2013_I1234228/d01-x01-y02" ) :
continue
if(type(hsets.values()[0].values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
elif(type(hsets.values()[0].values()[0])==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
sys.exit(1)
# sort out mass bins for ATLAS Z-> e,mu at 8 TeV
for ltype in ["EL","MU"] :
if(ltype=="EL") :
y = "y01"
mergeByMass("/ATLAS_2015_I1408516_EL/d41-x01-y01", "8000")
else :
y = "y04"
mergeByMass("/ATLAS_2015_I1408516_MU/d41-x01-y02", "8000")
for d in [2,3,04,14,26,38]:
useOneMass("/ATLAS_2015_I1408516_%s/d%02d-x01-%s" % (ltype,d,y), "8000", "30" )
for d in [5,6,7,8,9,10,15,17,18,19,20,21,22,27,29,30,31,32,33,34,39]:
useOneMass("/ATLAS_2015_I1408516_%s/d%02d-x01-%s" % (ltype,d,y), "8000", "66" )
for d in [11,12,13,16,28,40]:
useOneMass("/ATLAS_2015_I1408516_%s/d%02d-x01-%s" % (ltype,d,y), "8000", "116" )
for d in [23,35]:
useOneMass("/ATLAS_2015_I1408516_%s/d%02d-x01-%s" % (ltype,d,y), "8000", "12" )
for d in [24,36]:
useOneMass("/ATLAS_2015_I1408516_%s/d%02d-x01-%s" % (ltype,d,y), "8000", "12" )
for d in [25,37]:
useOneMass("/ATLAS_2015_I1408516_%s/d%02d-x01-%s" % (ltype,d,y), "8000", "30" )
# sort out ratios for ATLAS W+c
if("/ATLAS_2014_I1282447/d02-x01-y01_plus" in outhistos and
"/ATLAS_2014_I1282447/d02-x01-y01_minus" in outhistos) :
d02y01_plus = outhistos["/ATLAS_2014_I1282447/d02-x01-y01_plus"]
d02y01_minus = outhistos["/ATLAS_2014_I1282447/d02-x01-y01_minus"]
ratio_d02y01 = d02y01_plus/d02y01_minus
ratio_d02y01.path = "/ATLAS_2014_I1282447/d02-x01-y01"
del outhistos["/ATLAS_2014_I1282447/d02-x01-y01_plus"]
del outhistos["/ATLAS_2014_I1282447/d02-x01-y01_minus"]
outhistos["/ATLAS_2014_I1282447/d02-x01-y01"] = ratio_d02y01
if("/ATLAS_2014_I1282447/d02-x01-y02_plus" in outhistos and
"/ATLAS_2014_I1282447/d02-x01-y02_minus" in outhistos) :
d02y02_plus = outhistos["/ATLAS_2014_I1282447/d02-x01-y02_plus"]
d02y02_minus = outhistos["/ATLAS_2014_I1282447/d02-x01-y02_minus"]
ratio_d02y02 = d02y02_plus/d02y02_minus
ratio_d02y02.path = "/ATLAS_2014_I1282447/d02-x01-y02"
del outhistos["/ATLAS_2014_I1282447/d02-x01-y02_plus"]
del outhistos["/ATLAS_2014_I1282447/d02-x01-y02_minus"]
outhistos["/ATLAS_2014_I1282447/d02-x01-y02"] = ratio_d02y02
if("/ATLAS_2014_I1282447/d08-x01-y01_plus" in outhistos and
"/ATLAS_2014_I1282447/d08-x01-y01_minus" in outhistos) :
d08y01_plus = outhistos["/ATLAS_2014_I1282447/d08-x01-y01_plus"]
d08y01_minus = outhistos["/ATLAS_2014_I1282447/d08-x01-y01_minus"]
ratio_d08y01 = d08y01_plus/d08y01_minus
ratio_d08y01.path = "/ATLAS_2014_I1282447/d08-x01-y01"
del outhistos["/ATLAS_2014_I1282447/d08-x01-y01_plus"]
del outhistos["/ATLAS_2014_I1282447/d08-x01-y01_minus"]
outhistos["/ATLAS_2014_I1282447/d08-x01-y01"] = ratio_d08y01
if ("/ATLAS_2014_I1282447/d05-x01-y01" in outhistos and
"/ATLAS_2014_I1282447/d01-x01-y02" in outhistos) :
h_winc = outhistos["/ATLAS_2014_I1282447/d05-x01-y01"]
h_d = outhistos["/ATLAS_2014_I1282447/d01-x01-y02"]
ratio_wd = h_d/h_winc
ratio_wd.path = "/ATLAS_2014_I1282447/d05-x01-y02"
outhistos["/ATLAS_2014_I1282447/d05-x01-y02"] = ratio_wd
if ("/ATLAS_2014_I1282447/d05-x01-y01" in outhistos and
"/ATLAS_2014_I1282447/d01-x01-y03" in outhistos) :
h_winc = outhistos["/ATLAS_2014_I1282447/d05-x01-y01"]
h_dstar= outhistos["/ATLAS_2014_I1282447/d01-x01-y03"]
ratio_wdstar = h_dstar/h_winc
ratio_wdstar.path = "/ATLAS_2014_I1282447/d05-x01-y03"
outhistos["/ATLAS_2014_I1282447/d05-x01-y03"] = ratio_wdstar
if("/ATLAS_2014_I1282447/d06-x01-y01_winc" in outhistos and
"/ATLAS_2014_I1282447/d06-x01-y02_winc" in outhistos) :
h_winc_plus = outhistos["/ATLAS_2014_I1282447/d06-x01-y01_winc"]
h_winc_minus = outhistos["/ATLAS_2014_I1282447/d06-x01-y02_winc"]
if( "/ATLAS_2014_I1282447/d06-x01-y01_wplus" in outhistos ) :
h_wd_plus = outhistos["/ATLAS_2014_I1282447/d06-x01-y01_wplus"]
ratio_wd_plus = h_wd_plus/h_winc_plus
ratio_wd_plus.path = "/ATLAS_2014_I1282447/d06-x01-y01"
outhistos["/ATLAS_2014_I1282447/d06-x01-y01"] = ratio_wd_plus
del outhistos["/ATLAS_2014_I1282447/d06-x01-y01_wplus"]
if( "/ATLAS_2014_I1282447/d06-x01-y02_wminus" in outhistos ) :
h_wd_minus = outhistos["/ATLAS_2014_I1282447/d06-x01-y02_wminus"]
ratio_wd_minus = h_wd_minus/h_winc_minus
ratio_wd_minus.path = "/ATLAS_2014_I1282447/d06-x01-y02"
outhistos["/ATLAS_2014_I1282447/d06-x01-y02"] = ratio_wd_minus
del outhistos["/ATLAS_2014_I1282447/d06-x01-y02_wminus"]
if ( "/ATLAS_2014_I1282447/d06-x01-y03_wplus" in outhistos) :
h_wdstar_plus = outhistos["/ATLAS_2014_I1282447/d06-x01-y03_wplus"]
ratio_wdstar_plus = h_wdstar_plus/h_winc_plus
ratio_wdstar_plus.path = "/ATLAS_2014_I1282447/d06-x01-y03"
outhistos["/ATLAS_2014_I1282447/d06-x01-y03"] = ratio_wdstar_plus
del outhistos["/ATLAS_2014_I1282447/d06-x01-y03_wplus"]
if ( "/ATLAS_2014_I1282447/d06-x01-y04_wminus" in outhistos) :
h_wdstar_minus = outhistos["/ATLAS_2014_I1282447/d06-x01-y04_wminus"]
ratio_wdstar_minus = h_wdstar_minus/h_winc_minus
ratio_wdstar_minus.path = "/ATLAS_2014_I1282447/d06-x01-y04"
outhistos["/ATLAS_2014_I1282447/d06-x01-y04"] = ratio_wdstar_minus
del outhistos["/ATLAS_2014_I1282447/d06-x01-y04_wminus"]
del outhistos["/ATLAS_2014_I1282447/d06-x01-y01_winc"]
del outhistos["/ATLAS_2014_I1282447/d06-x01-y02_winc"]
mergeByMass("/ATLAS_2013_I1234228/d01-x01-y02", "7000")
# Choose output file
name = args[0]+"-EW.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-LHC-Jets b/Tests/python/merge-LHC-Jets
--- a/Tests/python/merge-LHC-Jets
+++ b/Tests/python/merge-LHC-Jets
@@ -1,1517 +1,1553 @@
#! /usr/bin/env python
import logging
import sys
import math
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda
# #############################################
+def rescale(path,scale) :
+ if(path not in outhistos) : return
+ outhistos[path].scaleW(scale)
def fillAbove(scale,desthisto, sourcehistosbyptmin) :
pthigh= 1e100
ptlow =-1e100
for pt, h in sorted(sourcehistosbyptmin.iteritems(),reverse=True):
ptlow=pt
if(type(desthisto)==yoda.core.Scatter2D) :
for i in range(0,h.numPoints) :
xMin = h.points[i].x-h.points[i].xErrs.minus
if( xMin*scale >= ptlow and
xMin*scale < pthigh ) :
desthisto.addPoint(h.points[i])
elif(type(desthisto)==yoda.core.Profile1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Histo1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Counter) :
desthisto += h
else :
logging.error("Can't merge %s, unknown type" % desthisto.path)
sys.exit(1)
pthigh=pt
def mergeByPt(hpath, sqrts, scale=1.) :
global inhistos_pt
global outhistos
try:
fillAbove(scale,outhistos[hpath], inhistos_pt[hpath][float(sqrts)])
except:
pass
def mergeByMass(hpath, sqrts, scale=1.):
global inhistos_mass
global outhistos
try:
fillAbove(scale,outhistos[hpath], inhistos_mass[hpath][float(sqrts)])
except:
pass
def useOnePt(hpath, sqrts, ptmin):
global inhistos_pt
global outhistos
try:
## Find best pT_min match
ptmins = inhistos_pt[hpath][float(sqrts)].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested pTmin=%s: " % ptmin + \
"using pTmin=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos_pt[hpath][float(sqrts)][closest_ptmin]
except:
pass
def useOneMass(hpath, sqrts, ptmin):
global inhistos_pt
global outhistos
try:
## Find best pT_min match
ptmins = inhistos_mass[hpath][float(sqrts)].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested mass=%s: " % ptmin + \
"using mass=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos_mass[hpath][float(sqrts)][closest_ptmin]
except:
pass
# #######################################
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
parser.add_option("--with-ue",
action='store_true' ,
dest="ue",
default=True,
help="Include UE analyses")
parser.add_option("--without-ue",
action='store_false',
dest="ue",
default=True,
help="Don\'t include UE analyses")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
(opts, args) = parser.parse_args()
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
yodafiles=["-7-Bottom-0.yoda","-7-Bottom-1.yoda","-7-Bottom-2.yoda",
"-7-Bottom-3.yoda","-7-Bottom-4.yoda","-7-Bottom-5.yoda",
"-7-Charm-1.yoda","-7-Charm-2.yoda",
"-7-Charm-3.yoda","-7-Charm-4.yoda","-7-Charm-5.yoda",
- "-7-Top-SL.yoda","-7-Top-L.yoda","-7-Top-All.yoda",
+ "-7-Top-SL.yoda","-7-Top-L.yoda",
"-8-Top-SL.yoda","-8-Top-L.yoda","-8-Top-All.yoda",
- "-13-Top-L.yoda","-13-Top-SL.yoda"]
+ "-13-Top-L.yoda","-13-Top-SL.yoda","-13-Top-All.yoda"]
for i in range(1,11) :
for j in [7,8,13] :
yodafiles.append("-%1.1i-Jets-%1.1i.yoda" % (j,i))
+
+for i in range(1,3) :
+ yodafiles.append("-2760-Jets-%1.1i.yoda" % i)
if(opts.ue) :
yodafiles += ["-7-Jets-0.yoda" ,"-8-Jets-0.yoda" ,
"-900-UE.yoda" ,"-2360-UE.yoda" ,
"-2760-UE.yoda" ,"-7-UE.yoda" ,"-900-UE-Long.yoda",
"-900-UE-Short.yoda","-8-UE.yoda" ,
"-7-UE-Long.yoda","-13-UE.yoda","-13-UE-Long.yoda"]
## Get histos
inhistos_pt = {}
inhistos_mass = {}
outhistos={}
weights = {}
for f in yodafiles:
file='Rivet-'+args[0]+f
ptmin=0.
sqrts=7000
# CMS energy
if(file.find("-900-")>0) :
sqrts=900
elif(file.find("-2360-")>0) :
sqrts=2360
elif(file.find("-2760-")>0) :
sqrts=2760
elif(file.find("-7-")>=0) :
sqrts=7000
elif(file.find("-8-")>=0) :
sqrts=8000
elif(file.find("-13-")>0) :
sqrts=13000
# pT min
if(file.find("UE")>0) :
ptmin=0.
elif(file.find("Jets-0")>0) :
ptmin=4.
elif(file.find("Jets-10")>0) :
ptmin=1900.
elif(file.find("Jets-1")>0) :
if( not opts.ue) :
ptmin = 10.
else :
ptmin = 20.
elif(file.find("Jets-2")>0) :
ptmin=40.
elif(file.find("Jets-3")>0) :
ptmin=80.
elif(file.find("Jets-4")>0) :
ptmin=110.
elif(file.find("Jets-5")>0) :
ptmin=210.
elif(file.find("Jets-6")>0) :
ptmin=260.
elif(file.find("Jets-7")>0) :
ptmin=400.
elif(file.find("Jets-8")>0) :
ptmin=600.
elif(file.find("Jets-9")>0) :
ptmin=900.
elif(file.find("Bottom-0")>0) :
ptmin=0.
elif(file.find("Bottom-1")>0 or file.find("Charm-1")>0) :
ptmin=10.
elif(file.find("Bottom-2")>0 or file.find("Charm-2")>0) :
ptmin=30.
elif(file.find("Bottom-3")>0 or file.find("Charm-3")>0) :
ptmin=70.
elif(file.find("Bottom-4")>0 or file.find("Charm-4")>0) :
ptmin=100.
elif(file.find("Bottom-5")>0 or file.find("Charm-5")>0) :
ptmin=130.
elif(file.find("Top-SL.yoda")>0 or file.find("Top-L.yoda")>0 or \
file.find("Top-All.yoda")>0):
ptmin=0.
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("S8924791")>0 or aopath.find("S8971293")>0 or
aopath.find("S8817804")>0 or aopath.find("I1082936")>0 or
aopath.find("S8994773")>0 or aopath.find("S8918562")>0 or
aopath.find("S8624100")>0 or aopath.find("S8625980")>0 or
aopath.find("S8894728")>0 or aopath.find("S8957746")>0 or
aopath.find("S9126244")>0 or aopath.find("S9120041")>0 or
aopath.find("S8950903")>0 or aopath.find("S9086218")>0 or
aopath.find("S9088458")>0 or aopath.find("I919017" )>0 or
aopath.find("I926145" )>0 or aopath.find("S8941262")>0 or
aopath.find("S8973270")>0 or aopath.find("I1118269")>0 or
aopath.find("I1188891")>0 or aopath.find("I1082009")>0 or
aopath.find("I1087342")>0 or aopath.find("S9035664")>0 or
aopath.find("I1125575")>0 or aopath.find("I1094564")>0 or
aopath.find("I930220" )>0 or aopath.find("I1224539")>0 or
aopath.find("I1273574")>0 or aopath.find("I1261026")>0 or
aopath.find("I1307243")>0 or aopath.find("I1325553")>0 or
aopath.find("I1298810")>0 or aopath.find("I1298811")>0 or
aopath.find("I1208923")>0 or aopath.find("I1305624")>0 or
aopath.find("I1419070")>0 or aopath.find("I1394679")>0 or
aopath.find("I929691" )>0 or aopath.find("I1393758")>0 or
aopath.find("I1459051")>0 or aopath.find("I1487277")>0 or
aopath.find("I1421646")>0 or aopath.find("I1111014")>0 or
aopath.find("I1605749")>0 or aopath.find("I1682495")>0 or
+ aopath.find("I1609253")>0 or aopath.find("1385107" )>0 or
aopath.find("ATLAS_2016_CONF_2016_092")>0 or
aopath.find("CMS_2012_PAS_QCD_11_010")>0) :
if not inhistos_pt.has_key(aopath):
inhistos_pt[aopath] = {}
tmpE = inhistos_pt[aopath]
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
if not tmpE[sqrts].has_key(ptmin):
tmpE[sqrts][ptmin] = ao
else:
tmpE[sqrts][ptmin] += ao
#raise Exception("A set with ptmin = %s already exists" % ( ptmin))
else :
if(aopath.find("I1243871")>0) :
if(aopath.find("x01")>0 and file.find("-7-Top-L.yoda")>0 ) :
outhistos[aopath] = ao
elif(aopath.find("x02")>0 and file.find("-7-Top-SL.yoda")>0 ) :
outhistos[aopath] = ao
elif(aopath.find("1467230")>0 or aopath.find("1419652")>0) :
if(aopath.find("y01")>0 and file.find("Long")>0 ) :
outhistos[aopath] = ao
elif(aopath.find("y02")>0 and file.find("Long")<0 ) :
outhistos[aopath] = ao
else :
outhistos[aopath] = ao
yodafiles=["-7-Bottom-6.yoda","-7-Bottom-7.yoda","-7-Bottom-8.yoda"]
for i in range(1,8) :
yodafiles.append("-7-DiJets-%1.1i-A.yoda" % i)
yodafiles.append("-7-DiJets-%1.1i-B.yoda" % i)
yodafiles.append("-7-DiJets-%1.1i-C.yoda" % i)
for f in yodafiles:
file='Rivet-'+args[0]+f
if(file.find("-7-Jets-1")>0) :
sqrts=7000
mass=0
if(file.find("-7-DiJets-1")>0) :
sqrts=7000
mass=100
elif(file.find("-7-DiJets-2")>0) :
sqrts=7000
mass=250
elif(file.find("-7-DiJets-3")>0) :
sqrts=7000
mass=500
elif(file.find("-7-DiJets-4")>0) :
sqrts=7000
mass=800
elif(file.find("-7-DiJets-5")>0) :
sqrts=7000
mass=1000
elif(file.find("-7-DiJets-6")>0) :
sqrts=7000
mass=1600
elif(file.find("-7-DiJets-7")>0) :
sqrts=7000
mass=2200
elif(file.find("-7-DiJets-8")>0) :
sqrts=7000
mass=2800
elif(file.find("-7-Bottom-6")>0) :
sqrts=7000
mass=110
elif(file.find("-7-Bottom-7")>0) :
sqrts=7000
mass=370
elif(file.find("-7-Bottom-8")>0) :
sqrts=7000
mass=550
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("8817804")>0 or
aopath.find("8968497")>0 or
aopath.find("1082936")>0 or
aopath.find("I930220")>0 or
aopath.find("1261026")>0 or
aopath.find("1090423")>0 or
aopath.find("1268975")>0 or
aopath.find("CMS_2013_I1208923")>0) :
if not inhistos_mass.has_key(aopath):
inhistos_mass[aopath] = {}
tmpE = inhistos_mass[aopath]
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if not tmpP.has_key(mass):
tmpP[mass] = ao
else:
print aopath
raise Exception("A set with mass = %s already exists" % ( mass))
## Make empty output histos if needed
for hpath,hsets in inhistos_pt.iteritems():
if( hpath.find("8924791")>0 or
hpath.find("8971293")>0 or
hpath.find("8817804")>0 or
hpath.find("8968497")>0 or
(hpath.find("9120041")>0 and (hpath.find("d01")>0 or hpath.find("d02")>0)) or
hpath.find("9126244")>0 or
hpath.find("926145") >0 or
hpath.find("9086218")>0 or
hpath.find("1082936")>0 or
hpath.find("8941262")>0 or
hpath.find("1118269")>0 or
hpath.find("1087342")>0 or
hpath.find("1188891")>0 or
hpath.find("919017")>0 or
hpath.find("9035664")>0 or
hpath.find("1125575")>0 or
hpath.find("1094564")>0 or
hpath.find("I930220")>0 or
hpath.find("S9088458")>0 or
hpath.find("I1273574")>0 or
hpath.find("I1261026")>0 or
hpath.find("I1090423")>0 or
hpath.find("QCD_11_010")>0 or
hpath.find("1298811" )>0 or
hpath.find("I1325553" )>0 or
hpath.find("I1298810" )>0 or
hpath.find("1307243" )>0 or
hpath.find("I1419070")>0 or
hpath.find("I1394679")>0 or
hpath.find("I1487277")>0 or
hpath.find("CMS_2013_I1208923")>0 or
hpath.find("1393758")>0 or
hpath.find("ATLAS_2016_CONF_2016_092")>0 or
- hpath.find("1111014" )>0 or
+ hpath.find("1111014" )>0 or hpath.find("1385107")>0 or
hpath.find("1459051")>0) :
if(type(hsets.values()[0].values()[0])==yoda.core.Counter) :
outhistos[hpath] = yoda.core.Counter(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
elif(type(hsets.values()[0].values()[0])==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
sys.exit(1)
## Make empty output histos if needed
for hpath,hsets in inhistos_mass.iteritems():
if(hpath.find("1268975")>0) :
if(type(hsets.values()[0].values()[0])==yoda.core.Counter) :
outhistos[hpath] = yoda.core.Counter(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
elif(type(hsets.values()[0].values()[0])==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
sys.exit(1)
logging.info("Processing CMS_2011_S8957746")
useOnePt("/CMS_2011_S8957746/d01-x01-y01", "7000", "80" )
useOnePt("/CMS_2011_S8957746/d02-x01-y01", "7000", "80" )
useOnePt("/CMS_2011_S8957746/d03-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8957746/d04-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8957746/d05-x01-y01", "7000", "210" )
useOnePt("/CMS_2011_S8957746/d06-x01-y01", "7000", "210" )
logging.info("Processing ATLAS_2010_S8894728")
useOnePt("/ATLAS_2010_S8894728/d01-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d01-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d01-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d02-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d02-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d02-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d03-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d03-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d03-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d04-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d04-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d04-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d05-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d06-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d07-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d08-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d09-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d09-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d09-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d10-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d10-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d10-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d11-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d11-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d11-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d12-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d12-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d12-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y04", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y04", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y04", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y04", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d17-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d17-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d17-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d18-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d18-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d18-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d19-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d19-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d19-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d20-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d20-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d20-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d21-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d22-x01-y01", "7000", "0" )
logging.info("Processing ATLAS_2011_S8994773")
useOnePt("/ATLAS_2011_S8994773/d01-x01-y01", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d02-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d03-x01-y01", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d04-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d13-x01-y01", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d13-x01-y02", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d13-x01-y03", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d14-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d14-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d14-x01-y03", "7000", "0" )
logging.info("Processing ALICE_2010_S8624100")
useOnePt("/ALICE_2010_S8624100/d11-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8624100/d12-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8624100/d13-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8624100/d17-x01-y01","2360", "0" )
useOnePt("/ALICE_2010_S8624100/d18-x01-y01","2360", "0" )
useOnePt("/ALICE_2010_S8624100/d19-x01-y01","2360", "0" )
logging.info("Processing ALICE_2010_S8625980")
useOnePt("/ALICE_2010_S8625980/d03-x01-y01", "7000", "0" )
useOnePt("/ALICE_2010_S8625980/d04-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8625980/d05-x01-y01", "2360", "0" )
useOnePt("/ALICE_2010_S8625980/d06-x01-y01", "7000", "0" )
logging.info("Processing ATLAS_2010_S8918562")
useOnePt("/ATLAS_2010_S8918562/d01-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d02-x01-y01", "2360", "0" )
useOnePt("/ATLAS_2010_S8918562/d03-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d04-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d05-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d06-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d07-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d08-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d09-x01-y01", "2360", "0" )
useOnePt("/ATLAS_2010_S8918562/d10-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d11-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d12-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d13-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d14-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d15-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d16-x01-y01", "2360", "0" )
useOnePt("/ATLAS_2010_S8918562/d17-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d18-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d19-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d20-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d21-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d22-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d23-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d24-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d25-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d26-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d27-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d28-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d29-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d30-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d31-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d32-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d33-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d34-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d35-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d36-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d37-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d38-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d39-x01-y01", "7000", "0" )
logging.info("Processing ATLAS_2011_S8971293")
useOnePt("/ATLAS_2011_S8971293/d01-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y03", "7000", "210" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y04", "7000", "260" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y05", "7000", "260" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y06", "7000", "400" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y07", "7000", "400" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y08", "7000", "600" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y09", "7000", "600" )
logging.info("Processing ATLAS_2011_S8924791")
if( not opts.ue) :
useOnePt("/ATLAS_2011_S8924791/d01-x01-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x01-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y02", "7000", "10" )
else :
useOnePt("/ATLAS_2011_S8924791/d01-x01-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x01-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d02-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x02-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x02-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x03-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x03-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x04-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x04-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x05-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x05-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x06-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x06-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x02-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x02-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x03-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x03-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x04-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x04-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x05-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x05-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x06-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x06-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d04-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x02-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x02-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x03-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x03-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x04-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x04-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x05-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x05-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x06-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x06-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d05-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x02-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x02-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x03-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x03-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x04-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x04-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x05-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x05-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x06-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x06-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x02-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x02-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x03-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x03-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x04-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x04-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x05-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x05-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x06-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x06-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d07-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x02-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x02-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x03-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x03-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x04-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x04-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x05-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x05-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x06-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x06-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d08-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x01-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x02-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x02-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x03-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x03-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x04-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x04-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x05-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x05-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x06-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x06-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x01-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x02-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x02-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x03-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x03-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x04-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x04-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x05-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x05-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x06-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x06-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d10-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x01-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x02-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x02-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x03-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x03-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x04-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x04-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x05-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x05-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x06-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x06-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x01-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x02-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x02-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x03-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x03-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x04-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x04-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x05-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x05-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x06-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x06-y02", "7000", "400" )
logging.info("Processing ATLAS_2010_S8817804")
mergeByPt("/ATLAS_2010_S8817804/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d06-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d07-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d08-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d09-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d10-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d11-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d12-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d13-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d14-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d15-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d16-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d17-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d18-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d19-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d20-x01-y01", "7000")
useOneMass("/ATLAS_2010_S8817804/d21-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d22-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d23-x01-y01", "7000", "650" )
useOneMass("/ATLAS_2010_S8817804/d24-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d25-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d26-x01-y01", "7000", "650" )
logging.info("Processing ATLAS_2011_I930220")
mergeByPt("/ATLAS_2011_I930220/d01-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d02-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d03-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d04-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d05-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d06-x01-y01", "7000" )
mergeByMass("/ATLAS_2011_I930220/d07-x01-y01", "7000")
useOneMass("/ATLAS_2011_I930220/d08-x01-y01", "7000", "110" )
useOneMass("/ATLAS_2011_I930220/d09-x01-y01", "7000", "110" )
useOneMass("/ATLAS_2011_I930220/d10-x01-y01", "7000", "370" )
logging.info("Processing ATLAS_2012_I1082936")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y03", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y04", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y05", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y06", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y07", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y03", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y04", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y05", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y06", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y07", "7000")
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y06", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y07", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y08", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y09", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y06", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y07", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y08", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y09", "7000", 1000.)
logging.info("Processing CMS_2011_S8968497")
useOneMass("/CMS_2011_S8968497/d01-x01-y01", "7000", "1700" )
useOneMass("/CMS_2011_S8968497/d02-x01-y01", "7000", "1700" )
useOneMass("/CMS_2011_S8968497/d03-x01-y01", "7000", "1100" )
useOneMass("/CMS_2011_S8968497/d04-x01-y01", "7000", "1100" )
useOneMass("/CMS_2011_S8968497/d05-x01-y01", "7000", "650" )
useOneMass("/CMS_2011_S8968497/d06-x01-y01", "7000", "650" )
useOneMass("/CMS_2011_S8968497/d07-x01-y01", "7000", "250" )
useOneMass("/CMS_2011_S8968497/d08-x01-y01", "7000", "250" )
useOneMass("/CMS_2011_S8968497/d09-x01-y01", "7000", "250" )
logging.info("Processing ATLAS_2011_S9126244")
mergeByPt("/ATLAS_2011_S9126244/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d03-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d04-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d05-x01-y02", "7000")
useOnePt("/ATLAS_2011_S9126244/d06-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d06-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d07-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d07-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d08-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d08-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d09-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d09-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d10-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d10-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d11-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d11-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d12-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d12-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d13-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d13-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d14-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d14-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d15-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d15-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d16-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d16-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d17-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d17-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d18-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d18-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d19-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d20-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d21-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d22-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d23-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d24-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d25-x01-y01", "7000", "210" )
mergeByPt("/ATLAS_2011_S9126244/d26-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d26-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d27-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d27-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d28-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d28-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d29-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d29-x01-y02", "7000")
useOnePt("/ATLAS_2011_S9126244/d30-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d31-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d32-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d33-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d34-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d35-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d36-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d37-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d37-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d38-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d38-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d39-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d39-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d40-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d40-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d41-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d41-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d42-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d42-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d43-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d43-x01-y02", "7000", "210" )
# CMS_2011_S9120041 UE analysis
logging.info("Processing CMS_2011_S9120041")
mergeByPt("/CMS_2011_S9120041/d01-x01-y01", "7000")
mergeByPt("/CMS_2011_S9120041/d02-x01-y01", "7000")
if(opts.ue) :
useOnePt("/CMS_2011_S9120041/d03-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d04-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d05-x01-y01", "7000", "0" )
useOnePt("/CMS_2011_S9120041/d06-x01-y01", "7000", "0" )
useOnePt("/CMS_2011_S9120041/d07-x01-y01", "7000", "0" )
useOnePt("/CMS_2011_S9120041/d11-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d12-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d13-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d08-x01-y01", "7000", "20" )
useOnePt("/CMS_2011_S9120041/d09-x01-y01", "7000", "20" )
useOnePt("/CMS_2011_S9120041/d10-x01-y01", "7000", "20" )
else :
useOnePt("/CMS_2011_S9120041/d08-x01-y01", "7000", "10" )
useOnePt("/CMS_2011_S9120041/d09-x01-y01", "7000", "10" )
useOnePt("/CMS_2011_S9120041/d10-x01-y01", "7000", "10" )
# CMS dijet decorrelation
logging.info("Processing CMS_2011_S8950903")
useOnePt("/CMS_2011_S8950903/d01-x01-y01", "7000", "80" )
useOnePt("/CMS_2011_S8950903/d02-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8950903/d03-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8950903/d04-x01-y01", "7000", "210" )
useOnePt("/CMS_2011_S8950903/d05-x01-y01", "7000", "260" )
# CMS jet cross section
logging.info("Processing CMS_2011_S9086218")
mergeByPt("/CMS_2011_S9086218/d01-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d02-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d03-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d04-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d05-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d06-x01-y01", "7000")
# CMS 2/3 jet cross section ratio
logging.info("Processing CMS_2011_S9086218")
mergeByPt("/CMS_2011_S9088458/d01-x01-y01", "7000",500.)
# ATLAS track jet
logging.info("Processing ATLAS_2011_I919017")
for d in range(1,3) :
for y in range(1,5) :
mergeByPt("/ATLAS_2011_I919017/d0%s-x01-y0%s" % (d,y), "7000")
if( opts.ue) :
for x in range(2,6) :
for y in ["01","02","06","07","11","12","16","17","21","22"] :
useOnePt("/ATLAS_2011_I919017/d0%s-x0%s-y%s" % (d,x,y), "7000", "0" )
for y in ["03","04","08","09","13","14","18","19","23","24"] :
useOnePt("/ATLAS_2011_I919017/d0%s-x0%s-y%s" % (d,x,y), "7000", "4" )
for y in range(5,30,5) :
useOnePt("/ATLAS_2011_I919017/d0%s-x%02d-y%02d" % (d,x,y) , "7000", "20" )
else :
for x in range(2,6) :
for y in range(5,30,5) :
useOnePt("/ATLAS_2011_I919017/d0%s-x%02d-y%02d" % (d,x,y) , "7000", "10" )
logging.info("Processing ATLAS_2011_I926145")
mergeByPt("/ATLAS_2011_I926145/d01-x01-y01", "7000",1.5)
mergeByPt("/ATLAS_2011_I926145/d02-x01-y01", "7000",1.5)
mergeByPt("/ATLAS_2011_I926145/d03-x01-y01", "7000",1.5)
logging.info("Processing CMS_2011_S8941262")
useOnePt("/CMS_2011_S8941262/d01-x01-y01", "7000", "10" )
useOnePt("/CMS_2011_S8941262/d03-x01-y01", "7000", "10" )
mergeByPt("/CMS_2011_S8941262/d02-x01-y01", "7000",1.5)
logging.info("Processing CMS_2011_S8973270")
useOnePt("/CMS_2011_S8973270/d01-x01-y01", "7000", "70" )
useOnePt("/CMS_2011_S8973270/d02-x01-y01", "7000", "100" )
useOnePt("/CMS_2011_S8973270/d03-x01-y01", "7000", "130" )
useOnePt("/CMS_2011_S8973270/d04-x01-y01", "7000", "70" )
useOnePt("/CMS_2011_S8973270/d05-x01-y01", "7000", "100" )
useOnePt("/CMS_2011_S8973270/d06-x01-y01", "7000", "130" )
logging.info("Processing ATLAS_2012_I1082009")
useOnePt("/ATLAS_2012_I1082009/d08-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2012_I1082009/d09-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2012_I1082009/d10-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2012_I1082009/d11-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2012_I1082009/d12-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2012_I1082009/d13-x01-y01", "7000", "40" )
logging.info("Processing ATLAS_2012_I1118269")
mergeByPt("/ATLAS_2012_I1118269/d01-x01-y01", "7000")
useOnePt("/ATLAS_2012_I1118269/d02-x01-y01", "7000", "10" )
logging.info("Processing ATLAS_2012_I1188891")
mergeByPt("/ATLAS_2012_I1188891/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d06-x01-y01", "7000")
logging.info("Processing CMS_2012_I1087342")
mergeByPt("/CMS_2012_I1087342/d01-x01-y01", "7000")
mergeByPt("/CMS_2012_I1087342/d02-x01-y01", "7000")
mergeByPt("/CMS_2012_I1087342/d03-x01-y01", "7000")
logging.info("Processing CMS_2012_PAS_QCD_11_010")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d01-x01-y01", "7000")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d02-x01-y01", "7000")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d03-x01-y01", "7000")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d04-x01-y01", "7000")
logging.info("Processing ATLAS_2011_S9035664")
mergeByPt("/ATLAS_2011_S9035664/d11-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d12-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d13-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d14-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d15-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d16-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d17-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d18-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d20-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d21-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d22-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d23-x01-y01", "7000")
logging.info("Processing ATLAS_2012_I1125575")
mergeByPt("/ATLAS_2012_I1125575/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x02-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x02-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x03-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x03-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x04-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x04-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x05-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x05-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x02-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x02-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x03-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x03-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x04-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x04-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x05-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x05-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x02-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x02-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x03-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x03-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x04-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x04-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x05-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x05-y02", "7000")
for d in range(4,7) :
for x in range(1,6) :
if(opts.ue) :
for y in range(1,9) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y0%s" % (d,x,y), "7000", "0" )
for y in ["09","10","11","12","13","14","15","16"] :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "0" )
for y in range(17,19) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "20" )
else :
for y in range(17,19) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "10" )
for y in range(19,21) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "40" )
# ATLAS_2012_I1094564
useOnePt("/ATLAS_2012_I1094564/d01-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d02-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d03-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d04-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d05-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d06-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d07-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d08-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d09-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d10-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d11-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d12-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d13-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d14-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d15-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d16-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d17-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d18-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d19-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d20-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d21-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d22-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d23-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d24-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d25-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d26-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d27-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d28-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d29-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d30-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d31-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d32-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d33-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d34-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d35-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d36-x01-y01", "7000", "400" )
logging.info("Processing CMS_2013_I1224539_DIJET")
useOnePt("/CMS_2013_I1224539_DIJET/d01-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d02-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d03-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d04-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d05-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d06-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d07-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d08-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d09-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d10-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d11-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d12-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d13-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d14-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d15-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d16-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d17-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d18-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d19-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d20-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d21-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d22-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d23-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d24-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d25-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d26-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d27-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d28-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1273574/d01-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d02-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1273574/d03-x01-y01", "7000", "80" )
useOnePt("/CMS_2013_I1273574/d04-x01-y01", "7000", "80" )
useOnePt("/CMS_2013_I1273574/d05-x01-y01", "7000", "80" )
useOnePt("/CMS_2013_I1273574/d06-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d07-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1273574/d08-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d09-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1273574/d10-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d11-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1261026/d01-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d02-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d03-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d04-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d05-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d06-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d07-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d08-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d09-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d10-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d11-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d12-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d13-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d14-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d15-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d16-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d17-x01-y01", "7000", "0" )
logging.info("Processing CMS_2012_I1090423")
useOneMass("/CMS_2012_I1090423/d01-x01-y01", "7000", "2900" )
useOneMass("/CMS_2012_I1090423/d02-x01-y01", "7000", "2300" )
useOneMass("/CMS_2012_I1090423/d03-x01-y01", "7000", "1700" )
useOneMass("/CMS_2012_I1090423/d04-x01-y01", "7000", "1100" )
useOneMass("/CMS_2012_I1090423/d05-x01-y01", "7000", "1100" )
useOneMass("/CMS_2012_I1090423/d06-x01-y01", "7000", "650" )
useOneMass("/CMS_2012_I1090423/d07-x01-y01", "7000", "650" )
useOneMass("/CMS_2012_I1090423/d08-x01-y01", "7000", "250" )
useOneMass("/CMS_2012_I1090423/d09-x01-y01", "7000", "250" )
logging.info("Processing ATLAS_2014_I1298811")
mergeByPt("/ATLAS_2014_I1298811/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d03-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d04-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d05-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d06-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d06-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d07-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d07-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d08-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d08-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d09-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d09-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d10-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d10-x01-y02", "7000")
useOnePt("/ATLAS_2014_I1298811/d11-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2014_I1298811/d12-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2014_I1298811/d13-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d13-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d14-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d14-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d15-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d15-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d25-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d25-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d26-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d26-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d27-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d27-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d16-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d16-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d17-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d17-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d18-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d18-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d28-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d28-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d29-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d29-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d30-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d30-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d19-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d19-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d20-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d20-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d21-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d21-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d31-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d31-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d32-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d32-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d33-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d33-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d22-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d22-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d23-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d23-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d24-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d24-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d34-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d34-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d35-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d35-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d36-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d36-x01-y02", "7000", "210" )
logging.info("Processing ATLAS_2014_I1268975")
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y06", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y06", "7000", 1000.)
logging.info("Processing ATLAS_2014_I1307243")
useOnePt( "/ATLAS_2014_I1307243/d01-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d02-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d03-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d04-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d05-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d06-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d07-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d08-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d09-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d10-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d11-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d12-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d13-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d14-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d15-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d16-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d17-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d18-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d19-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d20-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d21-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d22-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d23-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d24-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d25-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d26-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d27-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d28-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d29-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d30-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d31-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d32-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d33-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d34-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d35-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d36-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d37-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d38-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d39-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d40-x01-y01", "7000")
logging.info("Processing ATLAS_2014_I1325553")
mergeByPt("/ATLAS_2014_I1325553/d01-x01-y01", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d01-x01-y02", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d01-x01-y03", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d01-x01-y04", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d01-x01-y05", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d01-x01-y06", "7000")
mergeByPt("/ATLAS_2014_I1325553/d02-x01-y01", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d02-x01-y02", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d02-x01-y03", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d02-x01-y04", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d02-x01-y05", "7000")
-mergeByPt("/ATLAS_2014_I1325553/d02-x01-y06", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d03-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d04-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d05-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d06-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d07-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d08-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d09-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d10-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d11-x01-y01", "7000")
+mergeByPt("/ATLAS_2014_I1325553/d12-x01-y01", "7000")
logging.info("Processing ATLAS_2016_I1419070")
for i in range(1,13) :
if(i<10) :
mergeByPt("/ATLAS_2016_I1419070/d0%s-x01-y01" % i, "8000")
else :
mergeByPt("/ATLAS_2016_I1419070/d%s-x01-y01" % i, "8000")
# remake differences and sums
for ihist in range(1,4) :
if not ("/ATLAS_2016_I1419070/d0%s-x01-y01" % ihist) in outhistos :
continue
h1 = outhistos["/ATLAS_2016_I1419070/d0%s-x01-y01" % ihist ]
h2 = outhistos["/ATLAS_2016_I1419070/d0%s-x01-y01" % (ihist+3)]
sstring = "/ATLAS_2016_I1419070/d%s-x01-y01" % (9+ihist)
dstring = "/ATLAS_2016_I1419070/d0%s-x01-y01" % (6+ihist)
hdiff = yoda.Scatter2D(dstring,dstring)
hsum = yoda.Scatter2D(sstring,sstring)
outhistos[dstring]= hdiff
outhistos[sstring]= hsum
for nbin in range(0,h2.numBins) :
bsum = h1.bins[nbin]+h2.bins[nbin]
try:
ydiff = h2.bins[nbin].mean-h1.bins[nbin].mean
except:
ydiff = 0
try:
ysum = bsum.mean
bstderr = bsum.stdErr
except:
ysum = 0
bstderr = 0
try:
yerr = math.sqrt(h1.bins[nbin].stdErr**2+h2.bins[nbin].stdErr**2)
except:
yerr = 0
x = h1.bins[nbin].xMid
xerr = 0.5*h1.bins[nbin].xWidth
hdiff.addPoint(x,ydiff,xerr,yerr)
hsum.addPoint(x,ysum ,xerr,bstderr)
logging.info("ATLAS_2015_I1394679")
for i in range(1,5) :
mergeByPt("/ATLAS_2015_I1394679/d0%s-x01-y01" % i, "8000")
for i in range(5,11) :
if(i<10) :
useOnePt( "/ATLAS_2015_I1394679/d0%s-x01-y01" % i, "8000", "110" )
else :
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % i, "8000", "110" )
for i in range(0,4) :
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (11+4*i), "8000", "110" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (12+4*i), "8000", "260" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (13+4*i), "8000", "600" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (14+4*i), "8000", "900" )
for i in range(0,5) :
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (27+4*i), "8000", "110" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (28+4*i), "8000", "260" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (29+4*i), "8000", "400" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (30+4*i), "8000", "400" )
logging.info("Processing CMS_2013_I1208923")
for i in range(1,6) :
mergeByPt ("/CMS_2013_I1208923/d01-x01-y0%s" % i, "7000")
mergeByMass("/CMS_2013_I1208923/d02-x01-y0%s" % i, "7000", 1.)
logging.info("Processing CMS_2014_I1298810")
for i in range(1,19) :
if(i<10) :
mergeByPt("/CMS_2014_I1298810/d0"+str(i)+"-x01-y01", "7000")
else :
mergeByPt("/CMS_2014_I1298810/d"+str(i)+"-x01-y01", "7000")
logging.info("Processing CMS_2014_I1305624")
for x in range(1,6) :
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y01" % x, "7000", "110" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y02" % x, "7000", "110" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y03" % x, "7000", "260" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y04" % x, "7000", "260" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y05" % x, "7000", "400" )
logging.info("Processing ATLAS_2011_I929691")
for x in range(0,3) :
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 1), "7000", "20" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 2), "7000", "40" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 3), "7000", "40" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 4), "7000", "80" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 5), "7000", "110" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 6), "7000", "110" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 7), "7000", "210" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 8), "7000", "260" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 9), "7000", "260" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+10), "7000", "400" )
logging.info("Processing ATLAS_2015_I1393758")
for i in range(1,13) :
mergeByPt("/ATLAS_2015_I1393758/d%02d-x01-y01" % i, "8000")
logging.info("Processing CMS_2016_I1459051")
for i in range(1,15) :
mergeByPt("/CMS_2016_I1459051/d%02d-x01-y01" % i, "13000")
logging.info("Processing ATLAS_2016_CONF_2016_092")
for i in range(1,7) :
mergeByPt("/ATLAS_2016_CONF_2016_092/d%02d-x01-y01" % i, "13000")
logging.info("Processing ATLAS_2017_I1609253")
useOnePt( "/ATLAS_2017_I1609253/d01-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d02-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d03-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d04-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d05-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d06-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d07-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d08-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d09-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d10-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d11-x01-y01", "8000", "600" )
useOnePt( "/ATLAS_2017_I1609253/d12-x01-y01", "8000", "600" )
logging.info("Processing CMS_2016_I1487277")
mergeByPt("/CMS_2016_I1487277/d01-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d02-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d03-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d04-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d05-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d06-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d07-x01-y01", "8000")
logging.info("Processing CMS_2016_I1421646")
useOnePt( "/CMS_2016_I1421646/d01-x01-y01", "8000", "210" )
useOnePt( "/CMS_2016_I1421646/d02-x01-y01", "8000", "260" )
useOnePt( "/CMS_2016_I1421646/d03-x01-y01", "8000", "400" )
useOnePt( "/CMS_2016_I1421646/d04-x01-y01", "8000", "400" )
useOnePt( "/CMS_2016_I1421646/d05-x01-y01", "8000", "600" )
useOnePt( "/CMS_2016_I1421646/d06-x01-y01", "8000", "900" )
useOnePt( "/CMS_2016_I1421646/d07-x01-y01", "8000", "900" )
logging.info("Processing CMS_2017_I1605749")
for i in [1,2,3,4,5,6,7,8,9,10,13,16] :
useOnePt("/CMS_2017_I1605749/d%02d-x01-y01" % i, "8000", "400" )
for i in [11,14,17]:
useOnePt("/CMS_2017_I1605749/d%02d-x01-y01" % i, "8000", "600" )
for i in [12,15,18]:
useOnePt("/CMS_2017_I1605749/d%02d-x01-y01" % i, "8000", "900" )
def CMS_2012_I1111014_name(i,j) :
if(i+j<100) :
return "/CMS_2012_I1111014/d%02d-x01-y01" % (i+j)
else :
return "/CMS_2012_I1111014/d%03d-x01-y01" % (i+j)
logging.info("Processing CMS_2012_I1111014")
for j in [0,22,44,66,87,106]:
for i in [1,2,3] :
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "20" )
for i in [4,5,6,7]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "40" )
for i in [8,9,10]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "80" )
for i in [11,12,13,14,15,16]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "110" )
for i in [17,18]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "210" )
useOnePt(CMS_2012_I1111014_name(19,j), "7000", "260" )
if(j<87) :
for i in [20,21]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "400" )
if(j<66) :
useOnePt(CMS_2012_I1111014_name(22,j), "7000", "600" )
for i in [126,127,128] :
for j in [1,2] :
mergeByPt("/CMS_2012_I1111014/d%03d-x01-y%02d" % (i,j), "7000")
logging.info("Processing CMS_2018_I1682495")
for i in [0,1,2,3] :
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 1), "13000", "110" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 2), "13000", "260" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 3), "13000", "260" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 4), "13000", "400" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 5), "13000", "400" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 6), "13000", "600" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 7), "13000", "600" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 8), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 9), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+10), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+11), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+12), "13000", "900" )
-
+
+logging.info("Processing CMS_2015_I1385107")
+for i in range(1,9) :
+ mergeByPt("/CMS_2015_I1385107/d%02d-x01-y01" % i, "2760")
+
+# rescaling for semi-leptonic top decays (we only simulate 1 charge combination)
+for i in range(96,116,2) :
+ rescale("/ATLAS_2018_I1656578/d%s-x01-y01" % i,2.)
+for i in range(15,29,2) :
+ rescale("/ATLAS_2017_I1614149/d%s-x01-y01" % i,2.)
+for i in range(1,23,2) :
+ rescale("/ATLAS_2015_I1404878/d%02d-x01-y01" % i,2.)
+rescale("/ATLAS_2015_I1397637/d01-x01-y01",2.)
+for i in range(1,22,1) :
+ rescale("/ATLAS_2015_I1345452/d%02d-x01-y01" % i,2.)
+for i in range(1,10,1) :
+ rescale("/ATLAS_2014_I1304688/d%02d-x01-y01" % i,2.)
+for i in range(1,82) :
+ rescale("/CMS_2018_I1663958/d%02d-x01-y01" % i,2.)
+for i in range(169,173,1) :
+ rescale("/CMS_2018_I1663958/d%02d-x01-y01" % i,2.)
+for i in range(8,15) :
+ rescale("/CMS_2018_I1662081/d%02d-x01-y01" % i,2.)
+for i in range(1,41) :
+ rescale("/CMS_2016_I1491950/d%02d-x02-y01" % i,2.)
+for i in range(1,13) :
+ rescale("/CMS_2016_I1454211/d%02d-x01-y01" % i,2.)
+rescale("/CMS_2017_I1518399/d01-x01-y01",2.)
# Choose output file
name = args[0]+"-Jets.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-LHC-Photon b/Tests/python/merge-LHC-Photon
--- a/Tests/python/merge-LHC-Photon
+++ b/Tests/python/merge-LHC-Photon
@@ -1,288 +1,298 @@
#! /usr/bin/env python
import logging
import sys
import os, yoda
"""%prog
Script for merging aida files
"""
def fillAbove(scale,desthisto, sourcehistosbyptmin):
pthigh= 1e100
ptlow =-1e100
for pt, h in sorted(sourcehistosbyptmin.iteritems(),reverse=True):
ptlow=pt
if(type(desthisto)==yoda.core.Scatter2D) :
for i in range(0,h.numPoints) :
xMin = h.points[i].x-h.points[i].xErrs.minus
if( xMin*scale >= ptlow and
xMin*scale < pthigh ) :
desthisto.addPoint(h.points[i])
elif(type(desthisto)==yoda.core.Profile1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Histo1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin*scale >= ptlow and
h.bins[i].xMin*scale < pthigh ) :
desthisto.bins[i] += h.bins[i]
else :
logging.error("Can't merge %s, unknown type" % desthisto.path)
sys.exit(1)
pthigh=pt
def mergeByPt(hpath, scale=1.):
global inhistos
global outhistos
try:
fillAbove(scale,outhistos[hpath], inhistos[hpath])
except:
pass
def useOnePt(hpath, ptmin):
global inhistos
global outhistos
try:
## Find best pT_min match
ptmins = inhistos[hpath].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested pTmin=%s: " % ptmin + \
"using pTmin=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos[hpath][closest_ptmin]
except:
pass
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog base")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
-files=["-7-PromptPhoton-1.yoda","-7-PromptPhoton-2.yoda",
- "-7-PromptPhoton-3.yoda","-7-PromptPhoton-4.yoda",
- "-8-PromptPhoton-1.yoda","-8-PromptPhoton-2.yoda",
- "-8-PromptPhoton-3.yoda","-8-PromptPhoton-4.yoda",
- "-7-DiPhoton-GammaGamma.yoda","-7-DiPhoton-GammaJet.yoda","-GammaGamma-7.yoda",
+files=["-7-DiPhoton-GammaGamma.yoda","-7-DiPhoton-GammaJet.yoda","-GammaGamma-7.yoda",
"-8-DiPhoton-GammaGamma.yoda","-8-DiPhoton-GammaJet.yoda","-GammaGamma-8.yoda"]
+for i in [7,8,13] :
+ for j in range(1,5) :
+ files.append("-%s-PromptPhoton-%s.yoda" % (i,j))
+
## Get histos
inhistos = {}
outhistos={}
for f in files:
file='Rivet-'+args[0]+f
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as XML" % file)
break
if(file.find("PromptPhoton")>=0) :
if(file.find("PromptPhoton-1")>0) :
ptmin=0.
elif(file.find("PromptPhoton-2")>0) :
ptmin=35.
elif(file.find("PromptPhoton-3")>0) :
ptmin=90.
elif(file.find("PromptPhoton-4")>0) :
ptmin=170.
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
if (aopath.find("CMS_2013_I1258128")>0) :
if(aopath.find("d05")>0 or aopath.find("d06")>0 or
aopath.find("d07")>0 or aopath.find("d08")>0) :
inhistos[aopath][ptmin] = ao
else :
inhistos[aopath][ptmin] = ao
else :
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("XSEC")>=0 or aopath.find("EVTCOUNT")>=0) : continue
if ( aopath in outhistos ) :
aotype = type(ao)
if aotype in (yoda.Counter, yoda.Histo1D, yoda.Histo2D, yoda.Profile1D, yoda.Profile2D):
outhistos[aopath] += ao
else :
quit()
else:
outhistos[aopath] = ao
for hpath,hsets in inhistos.iteritems():
if( hpath.find("1263495")>0 or hpath.find("1093738")>0 or
hpath.find("921594" )>0 or hpath.find("8914702")>0 or
hpath.find("1244522")>0 or hpath.find("1457605")>0 or
- hpath.find("1632756")>0 or hpath.find("1266056")>0 ) :
+ hpath.find("1632756")>0 or hpath.find("1266056")>0 or
+ hpath.find("1645627")>0) :
if(type(hsets.values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].path,
hsets.values()[0].title)
elif(type(hsets.values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].path,
hsets.values()[0].title)
for i in range(0,hsets.values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].bins[i].xMin,
hsets.values()[0].bins[i].xMax)
elif(type(hsets.values()[0])==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(hsets.values()[0].path,
hsets.values()[0].title)
for i in range(0,hsets.values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].bins[i].xMin,
hsets.values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
print hpath,type(hsets.values()[0])
sys.exit(1)
logging.info("Processing ATLAS_2013_I1263495")
mergeByPt("/ATLAS_2013_I1263495/d01-x01-y01")
-mergeByPt("/ATLAS_2013_I1263495/d01-x01-y03")
-useOnePt("/ATLAS_2013_I1263495/d01-x02-y01", "90" )
+mergeByPt("/ATLAS_2013_I1263495/d02-x01-y01")
+useOnePt("/ATLAS_2013_I1263495/d03-x01-y01", "90" )
logging.info("Processing ATLAS_2012_I1093738")
mergeByPt("/ATLAS_2012_I1093738/d01-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d02-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d03-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d04-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d05-x01-y01")
mergeByPt("/ATLAS_2012_I1093738/d06-x01-y01")
logging.info("Processing ATLAS_2011_I921594")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y01")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y02")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y04")
mergeByPt("/ATLAS_2011_I921594/d01-x01-y05")
logging.info("Processing ATLAS_2010_S8914702")
mergeByPt("/ATLAS_2010_S8914702/d01-x01-y01")
mergeByPt("/ATLAS_2010_S8914702/d01-x01-y02")
mergeByPt("/ATLAS_2010_S8914702/d01-x01-y03")
logging.info("Processing CMS_2013_I1258128")
useOnePt("/CMS_2013_I1258128/d05-x01-y01", "35" )
useOnePt("/CMS_2013_I1258128/d06-x01-y01", "35" )
useOnePt("/CMS_2013_I1258128/d07-x01-y01", "35" )
useOnePt("/CMS_2013_I1258128/d08-x01-y01", "35" )
logging.info("Processing ATLAS_2013_I1244522")
mergeByPt("/ATLAS_2013_I1244522/d01-x01-y01")
mergeByPt("/ATLAS_2013_I1244522/d02-x01-y01")
useOnePt("/ATLAS_2013_I1244522/d03-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d04-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d05-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d06-x01-y01", "35" )
useOnePt("/ATLAS_2013_I1244522/d07-x01-y01", "35" )
logging.info("Processing ATLAS_2016_I1457605")
mergeByPt("/ATLAS_2016_I1457605/d01-x01-y01")
mergeByPt("/ATLAS_2016_I1457605/d02-x01-y01")
mergeByPt("/ATLAS_2016_I1457605/d03-x01-y01")
mergeByPt("/ATLAS_2016_I1457605/d04-x01-y01")
logging.info("Processing ATLAS_2017_I1632756")
mergeByPt("/ATLAS_2017_I1632756/d02-x01-y01")
mergeByPt("/ATLAS_2017_I1632756/d03-x01-y01")
mergeByPt("/ATLAS_2017_I1632756/d04-x01-y01")
mergeByPt("/ATLAS_2017_I1632756/d05-x01-y01")
logging.info("Processing CMS_2014_I1266056")
mergeByPt("/CMS_2014_I1266056/d01-x01-y01")
mergeByPt("/CMS_2014_I1266056/d01-x01-y02")
mergeByPt("/CMS_2014_I1266056/d02-x01-y01")
mergeByPt("/CMS_2014_I1266056/d02-x01-y02")
mergeByPt("/CMS_2014_I1266056/d03-x01-y01")
mergeByPt("/CMS_2014_I1266056/d03-x01-y02")
mergeByPt("/CMS_2014_I1266056/d04-x01-y01")
mergeByPt("/CMS_2014_I1266056/d04-x01-y02")
+logging.info("Processing ATLAS_2017_I1645627")
+mergeByPt("/ATLAS_2017_I1645627/d01-x01-y01")
+mergeByPt("/ATLAS_2017_I1645627/d02-x01-y01")
+useOnePt("/ATLAS_2017_I1645627/d03-x01-y01","90")
+useOnePt("/ATLAS_2017_I1645627/d04-x01-y01","90")
+useOnePt("/ATLAS_2017_I1645627/d05-x01-y01","90")
+
logging.info("Processing /MC_PHOTONJETS")
useOnePt("/MC_PHOTONJETS/jet_HT","0")
useOnePt("/MC_PHOTONJETS/jet_eta_1","0")
useOnePt("/MC_PHOTONJETS/jet_eta_2","0")
useOnePt("/MC_PHOTONJETS/jet_eta_3","0")
useOnePt("/MC_PHOTONJETS/jet_eta_4","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_1","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_2","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_3","0")
useOnePt("/MC_PHOTONJETS/jet_eta_pmratio_4","0")
useOnePt("/MC_PHOTONJETS/jet_mass_1","0")
useOnePt("/MC_PHOTONJETS/jet_mass_2","0")
useOnePt("/MC_PHOTONJETS/jet_mass_3","0")
useOnePt("/MC_PHOTONJETS/jet_mass_4","0")
useOnePt("/MC_PHOTONJETS/jet_multi_exclusive","0")
useOnePt("/MC_PHOTONJETS/jet_multi_inclusive","0")
useOnePt("/MC_PHOTONJETS/jet_multi_ratio","0")
useOnePt("/MC_PHOTONJETS/jet_pT_1","0")
useOnePt("/MC_PHOTONJETS/jet_pT_2","0")
useOnePt("/MC_PHOTONJETS/jet_pT_3","0")
useOnePt("/MC_PHOTONJETS/jet_pT_4","0")
useOnePt("/MC_PHOTONJETS/jet_y_1","0")
useOnePt("/MC_PHOTONJETS/jet_y_2","0")
useOnePt("/MC_PHOTONJETS/jet_y_3","0")
useOnePt("/MC_PHOTONJETS/jet_y_4","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_1","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_2","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_3","0")
useOnePt("/MC_PHOTONJETS/jet_y_pmratio_4","0")
useOnePt("/MC_PHOTONJETS/jets_dR_12","0")
useOnePt("/MC_PHOTONJETS/jets_dR_13","0")
useOnePt("/MC_PHOTONJETS/jets_dR_23","0")
useOnePt("/MC_PHOTONJETS/jets_deta_12","0")
useOnePt("/MC_PHOTONJETS/jets_deta_13","0")
useOnePt("/MC_PHOTONJETS/jets_deta_23","0")
useOnePt("/MC_PHOTONJETS/jets_dphi_12","0")
useOnePt("/MC_PHOTONJETS/jets_dphi_13","0")
useOnePt("/MC_PHOTONJETS/jets_dphi_23","0")
useOnePt("/MC_PHOTONJETS/photon_jet1_dR","0")
useOnePt("/MC_PHOTONJETS/photon_jet1_deta","0")
useOnePt("/MC_PHOTONJETS/photon_jet1_dphi","0")
useOnePt("/MC_PHOTONJETUE/gammajet-dR","0")
useOnePt("/MC_PHOTONJETUE/gammajet-dphi","0")
useOnePt("/MC_PHOTONJETUE/trans-maxnchg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-maxnchg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-maxptsum-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-maxptsum-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-minnchg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-minnchg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-minptsum-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-minptsum-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-nchg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-nchg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-ptavg-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-ptavg-jet","0")
useOnePt("/MC_PHOTONJETUE/trans-ptsum-gamma","0")
useOnePt("/MC_PHOTONJETUE/trans-ptsum-jet","0")
# Choose output file
name = args[0]+"-Photon.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-SppS b/Tests/python/merge-SppS
--- a/Tests/python/merge-SppS
+++ b/Tests/python/merge-SppS
@@ -1,164 +1,165 @@
#! /usr/bin/env python
# import lighthisto
import logging
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda, copy
# # #############################################
def useOne(hpath, sqrts):
global inhistos
global outhistos
try:
outhistos[hpath] = inhistos[hpath][float(sqrts)]
except:
pass
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
#######################################
yodafiles=["ISR-44-UE.yoda","ISR-62-UE.yoda",args[0]+"-63-UE.yoda","ISR-30-UE.yoda", \
"ISR-53-UE.yoda",args[0]+"-200-UE.yoda",args[0]+"-500-UE.yoda",args[0]+"-900-UE.yoda", \
args[0]+"-546-UE.yoda",args[0]+"-53-UE.yoda"]
## Get histos
inhistos = {}
outhistos={}
for file in yodafiles:
file = 'Rivet-'+file
if(file.find("44")>0) :
sqrts=44
elif(file.find("63")>0) :
sqrts=63
elif(file.find("30")>0) :
sqrts=30
elif(file.find("53")>0) :
sqrts=53
elif(file.find("200")>0) :
sqrts=200
elif(file.find("500")>0) :
sqrts=500
elif(file.find("900")>0) :
sqrts=900
elif(file.find("546")>0) :
sqrts=546
elif(file.find("53")>0) :
sqrts=53
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as yoda" % file)
break
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("1926373")>0 or aopath.find("1867512")>0 or
aopath.find("1583476")>0 or aopath.find("2044935")>0 or
aopath.find("1178091")>0 ) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
if not inhistos[aopath].has_key(sqrts):
inhistos[aopath][sqrts] = ao
else:
raise Exception("A set with sqrts = %s already exists" % ( sqrts))
else :
outhistos[aopath] = ao
# UA5_1989_S1926373
useOne("/UA5_1989_S1926373/d01-x01-y01","200")
useOne("/UA5_1989_S1926373/d02-x01-y01","900")
useOne("/UA5_1989_S1926373/d03-x01-y01","200")
useOne("/UA5_1989_S1926373/d04-x01-y01","200")
useOne("/UA5_1989_S1926373/d05-x01-y01","200")
useOne("/UA5_1989_S1926373/d06-x01-y01","200")
useOne("/UA5_1989_S1926373/d07-x01-y01","900")
useOne("/UA5_1989_S1926373/d08-x01-y01","900")
useOne("/UA5_1989_S1926373/d09-x01-y01","900")
useOne("/UA5_1989_S1926373/d10-x01-y01","900")
useOne("/UA5_1989_S1926373/d11-x01-y01","200")
useOne("/UA5_1989_S1926373/d12-x01-y01","900")
# UA5_1988_S1867512
useOne("/UA5_1988_S1867512/d02-x01-y01","200")
useOne("/UA5_1988_S1867512/d02-x01-y02","546")
useOne("/UA5_1988_S1867512/d02-x01-y03","900")
useOne("/UA5_1988_S1867512/d03-x01-y01","200")
useOne("/UA5_1988_S1867512/d03-x01-y02","546")
useOne("/UA5_1988_S1867512/d03-x01-y03","900")
# UA5_1986_S1583476
useOne("/UA5_1986_S1583476/d01-x01-y01","200")
useOne("/UA5_1986_S1583476/d01-x01-y02","200")
useOne("/UA5_1986_S1583476/d01-x01-y03","900")
useOne("/UA5_1986_S1583476/d01-x01-y04","900")
useOne("/UA5_1986_S1583476/d02-x01-y01","200")
useOne("/UA5_1986_S1583476/d02-x01-y02","200")
useOne("/UA5_1986_S1583476/d02-x01-y03","200")
useOne("/UA5_1986_S1583476/d02-x01-y04","200")
useOne("/UA5_1986_S1583476/d02-x01-y05","200")
useOne("/UA5_1986_S1583476/d02-x01-y06","200")
useOne("/UA5_1986_S1583476/d03-x01-y01","900")
useOne("/UA5_1986_S1583476/d03-x01-y02","900")
useOne("/UA5_1986_S1583476/d03-x01-y03","900")
useOne("/UA5_1986_S1583476/d03-x01-y04","900")
useOne("/UA5_1986_S1583476/d03-x01-y05","900")
useOne("/UA5_1986_S1583476/d03-x01-y06","900")
useOne("/UA5_1986_S1583476/d03-x01-y07","900")
useOne("/UA5_1986_S1583476/d03-x01-y08","900")
useOne("/UA5_1986_S1583476/d03-x01-y09","900")
# UA1_1990_S2044935
useOne("/UA1_1990_S2044935/d01-x01-y01","200")
useOne("/UA1_1990_S2044935/d01-x01-y02","500")
useOne("/UA1_1990_S2044935/d01-x01-y03","900")
useOne("/UA1_1990_S2044935/d02-x01-y01","200")
useOne("/UA1_1990_S2044935/d02-x01-y02","500")
useOne("/UA1_1990_S2044935/d02-x01-y03","900")
useOne("/UA1_1990_S2044935/d03-x01-y01","900")
useOne("/UA1_1990_S2044935/d04-x01-y01","900")
useOne("/UA1_1990_S2044935/d05-x01-y01","900")
useOne("/UA1_1990_S2044935/d06-x01-y01","200")
useOne("/UA1_1990_S2044935/d07-x01-y01","900")
useOne("/UA1_1990_S2044935/d08-x01-y01","63")
useOne("/UA1_1990_S2044935/d09-x01-y01","200")
useOne("/UA1_1990_S2044935/d10-x01-y01","500")
useOne("/UA1_1990_S2044935/d11-x01-y01","900")
useOne("/UA1_1990_S2044935/d12-x01-y01","200")
useOne("/UA1_1990_S2044935/d12-x01-y02","500")
useOne("/UA1_1990_S2044935/d12-x01-y03","900")
# SFM_1984_S1178091
useOne("/SFM_1984_S1178091/d01-x01-y01","30")
useOne("/SFM_1984_S1178091/d01-x01-y02","44")
useOne("/SFM_1984_S1178091/d01-x01-y03","53")
useOne("/SFM_1984_S1178091/d01-x01-y04","63")
useOne("/SFM_1984_S1178091/d02-x01-y01","30")
useOne("/SFM_1984_S1178091/d02-x01-y02","44")
useOne("/SFM_1984_S1178091/d02-x01-y03","53")
useOne("/SFM_1984_S1178091/d02-x01-y04","63")
# Choose output file
name = args[0]+".yoda"
# output the yoda file
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-Star b/Tests/python/merge-Star
--- a/Tests/python/merge-Star
+++ b/Tests/python/merge-Star
@@ -1,167 +1,168 @@
#! /usr/bin/env python
import logging
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda
# #############################################
def fillAbove(desthisto, sourcehistosbyptmin):
pthigh= 1e100
ptlow =-1e100
for pt, h in sorted(sourcehistosbyptmin.iteritems(),reverse=True):
ptlow=pt
if(type(desthisto)==yoda.core.Scatter2D) :
for i in range(0,h.numPoints) :
xMin = h.points[i].x-h.points[i].xErrs.minus
if( xMin >= ptlow and
xMin < pthigh ) :
desthisto.addPoint(h.points[i])
elif(type(desthisto)==yoda.core.Profile1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin >= ptlow and
h.bins[i].xMin < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Histo1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin >= ptlow and
h.bins[i].xMin < pthigh ) :
desthisto.bins[i] += h.bins[i]
else :
logging.error("Can't merge %s, unknown type" % desthisto.path)
sys.exit(1)
pthigh=pt
def mergeByPt(hpath, sqrts):
global inhistos
global outhistos
try:
fillAbove(outhistos[hpath], inhistos[hpath][float(sqrts)])
except:
pass
def useOnePt(hpath, sqrts, ptmin):
global inhistos
global outhistos
try:
## Find best pT_min match
ptmins = inhistos[hpath][float(sqrts)].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested pTmin=%s: " % ptmin + \
"using pTmin=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos[hpath][float(sqrts)][closest_ptmin]
except:
pass
# #######################################
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
yodafiles=["-UE.yoda","-Jets-1.yoda","-Jets-2.yoda","-Jets-3.yoda","-Jets-4.yoda"]
## Get histos
inhistos = {}
outhistos={}
weights = {}
for f in yodafiles:
file='Rivet-'+args[0]+f
if(file.find("-UE")>0) :
sqrts=200
ptmin=0.
elif(file.find("-Jets-1")>0) :
sqrts=200
ptmin=2.
elif(file.find("-Jets-2")>0) :
sqrts=200
ptmin=5.
elif(file.find("-Jets-3")>0) :
sqrts=200
ptmin=26.
elif(file.find("-Jets-4")>0) :
sqrts=200
ptmin=15.
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
break
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
break
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("6870392")>0 or aopath.find("HELEN")>0) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if not tmpP.has_key(ptmin):
tmpP[ptmin] = ao
else:
raise Exception("A set with ptmin = %s already exists" % ( ptmin))
else :
outhistos[aopath] = ao
## Make empty output histos if needed
for hpath,hsets in inhistos.iteritems():
if( (hpath.find("6870392")>0 and hpath.find("d02-x01-y01" )>0 ) or
hpath.find("HELEN")>0 ) :
if(type(hsets.values()[0].values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
elif(type(hsets.values()[0].values()[0])==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
print hpath,type(hsets.values()[0].values()[0])
sys.exit(1)
useOnePt("/STAR_2006_S6870392/d01-x01-y01","200","2")
mergeByPt("/STAR_2006_S6870392/d02-x01-y01","200")
mergeByPt("/STAR_2009_UE_HELEN/d01-x01-y01","200")
mergeByPt("/STAR_2009_UE_HELEN/d02-x01-y01","200")
mergeByPt("/STAR_2009_UE_HELEN/d03-x01-y01","200")
# Choose output file
name = args[0]+".yoda"
print "write to ",name
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-TVT-EW b/Tests/python/merge-TVT-EW
--- a/Tests/python/merge-TVT-EW
+++ b/Tests/python/merge-TVT-EW
@@ -1,73 +1,74 @@
#! /usr/bin/env python
import logging
import sys
import os, yoda
"""%prog
Script for merging yoda files
"""
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog base")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
yodafiles=["-Run-II-Z-e","-Run-II-Z-mu","-Run-II-Z-LowMass-mu","-Run-II-Z-HighMass-mu","-Run-I-W","-Run-I-Z","-Run-I-WZ"]
## Get histos
outhistos={}
for f in yodafiles:
file='Rivet-'+args[0]+f+".yoda"
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
- break
+ continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as yoda" % file)
- break
+ continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("D0_2010_S8821313")>0) :
if(aopath.find("d01")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif(aopath.find("d02")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif(aopath.find("D0_2015_I1324946")>0) :
if(file.find("LowMass")>0) :
if(aopath.find("d02")>0) :
outhistos[aopath] = ao
elif(file.find("HighMass")>0) :
if(aopath.find("d03")>0 or aopath.find("d04")>0) :
outhistos[aopath] = ao
else:
if(aopath.find("d01")>0) :
outhistos[aopath] = ao
else :
outhistos[aopath] = ao
# output the yoda file
name = args[0]+"-EW.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-TVT-Energy b/Tests/python/merge-TVT-Energy
deleted file mode 100755
--- a/Tests/python/merge-TVT-Energy
+++ /dev/null
@@ -1,144 +0,0 @@
-#! /usr/bin/env python
-import logging
-import sys
-
-if sys.version_info[:3] < (2,4,0):
- print "rivet scripts require Python version >= 2.4.0... exiting"
- sys.exit(1)
-
-import os, yoda
-
-# #############################################
-
-def fillAbove(desthisto, sourcehistosbyptmin):
- pthigh= 1e100
- ptlow =-1e100
- for pt, h in sorted(sourcehistosbyptmin.iteritems(),reverse=True):
- ptlow=pt
- for i in range(0,h.numBins) :
- if(h.bins[i].xMin >= ptlow and
- h.bins[i].xMin < pthigh ) :
- desthisto.bins[i] += h.bins[i]
- pthigh=pt
-
-def mergeByPt(hpath, sqrts):
- global inhistos
- global outhistos
- try:
- fillAbove(outhistos[hpath], inhistos[hpath][float(sqrts)])
- except:
- pass
-
-# #######################################
-
-if __name__ == "__main__":
- import logging
- from optparse import OptionParser, OptionGroup
- parser = OptionParser(usage="%prog name")
- verbgroup = OptionGroup(parser, "Verbosity control")
- verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
- default=logging.INFO, help="print debug (very verbose) messages")
- verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
- default=logging.INFO, help="be very quiet")
- parser.add_option_group(verbgroup)
- (opts, args) = parser.parse_args()
- logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
-
- ## Check args
- if len(args) < 1:
- logging.error("Must specify at least the name of the files")
- sys.exit(1)
-
-yodafiles=["-Run-II-UE.yoda","-Run-II-Jets-0.yoda",
- "-300-UE.yoda" ,"-300-Jets-1.yoda" ,
- "-900-UE.yoda" ,"-900-Jets-1.yoda" ]
-
-## Get histos
-inhistos = {}
-outhistos={}
-weights = {}
-for f in yodafiles:
- file='Rivet-'+args[0]+f
- if(file.find("Run-II-UE")>0) :
- sqrts=1960
- ptmin=0.
- elif(file.find("Run-II-Jets-0")>0) :
- sqrts=1960
- ptmin=15
- elif(file.find("300-UE")>0) :
- sqrts=300
- ptmin=0.
- elif(file.find("300-Jets-1")>0) :
- sqrts=300
- ptmin=6.
- elif(file.find("900-UE")>0) :
- sqrts=900
- ptmin=0.
- elif(file.find("900-Jets-1")>0) :
- sqrts=900
- ptmin=10.
- if not os.access(file, os.R_OK):
- logging.error("%s can not be read" % file)
- break
- try:
- aos = yoda.read(file)
- except:
- logging.error("%s can not be parsed as YODA" % file)
- break
- ## Get histos from this YODA file
- for aopath, ao in aos.iteritems() :
- if(aopath.find("NOTE10874")<0) : continue
- if not inhistos.has_key(aopath):
- inhistos[aopath] = {}
- tmpE = inhistos[aopath]
- if not tmpE.has_key(sqrts):
- tmpE[sqrts] = {}
- tmpP = tmpE[sqrts]
- if not tmpP.has_key(ptmin):
- tmpP[ptmin] = ao
- else:
- raise Exception("A set with ptmin = %s already exists" % ( ptmin))
-
-## Make empty output histos if needed
-for hpath,hsets in inhistos.iteritems():
- if(type(hsets.values()[0].values()[0])==yoda.core.Scatter2D) :
- outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].values()[0].path,
- hsets.values()[0].values()[0].title)
- elif(type(hsets.values()[0].values()[0])==yoda.core.Profile1D) :
- outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].values()[0].path,
- hsets.values()[0].values()[0].title)
- for i in range(0,hsets.values()[0].values()[0].numBins) :
- outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
- hsets.values()[0].values()[0].bins[i].xMax)
- else :
- logging.error("Histogram %s is of unknown type" % hpath)
- sys.exit(1)
-
-## Field analysis
-logging.info("Processing CDF_2012_NOTE10874")
-## Angular distributions in different pT bins
-mergeByPt("/CDF_2012_NOTE10874/d01-x01-y01", "300")
-mergeByPt("/CDF_2012_NOTE10874/d01-x01-y02", "900")
-mergeByPt("/CDF_2012_NOTE10874/d01-x01-y03","1960")
-mergeByPt("/CDF_2012_NOTE10874/d02-x01-y01", "300")
-mergeByPt("/CDF_2012_NOTE10874/d02-x01-y02", "900")
-mergeByPt("/CDF_2012_NOTE10874/d02-x01-y03","1960")
-mergeByPt("/CDF_2012_NOTE10874/d03-x01-y01", "300")
-mergeByPt("/CDF_2012_NOTE10874/d03-x01-y02", "900")
-mergeByPt("/CDF_2012_NOTE10874/d03-x01-y03","1960")
-
-# Choose output file
-for i in range(1,4) :
- if(i==1) :
- name = args[0]+"-300-Energy.yoda"
- elif(i==2) :
- name = args[0]+"-900-Energy.yoda"
- elif(i==3) :
- name = args[0]+"-1960-Energy.yoda"
- temphistos={}
- for hpath, h in sorted(outhistos.iteritems()):
- if(hpath.find("y0"+str(i))>0) :
- temphistos[hpath] = h
- yoda.writeYODA(temphistos,name)
-
-sys.exit(0)
diff --git a/Tests/python/merge-TVT-Jets b/Tests/python/merge-TVT-Jets
--- a/Tests/python/merge-TVT-Jets
+++ b/Tests/python/merge-TVT-Jets
@@ -1,557 +1,634 @@
#! /usr/bin/env python
import logging
import sys
+import math
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
import os, yoda
-# #############################################
+# Divide two profile histograms with different nos of bins
+def divide(name,numer,denom) :
+ output = yoda.Scatter2D(name,name)
+ size = min(numer.numBins,denom.numBins)
+ for i in range(0,size) :
+ b1 = numer.bin(i)
+ b2 = denom.bin(i)
+ # Assemble the x value and error
+ x = b1.xMid
+ exminus = x - b1.xMin
+ explus = b1.xMax - x
+ # Assemble the y value and error
+ # numerator
+ yupp=0.
+ relerr_1=0.
+ try :
+ yupp = b1.mean
+ try :
+ if b1.stdErr() != 0 :
+ relerr_1 = b1.stdErr()/b1.mean()
+ except:
+ relerr_1=0.
+ except :
+ yupp = 0.
+ relerr_1 =0.
+ # denominator
+ ylow=0.
+ relerr_2 = 0.
+ try :
+ ylow = b2.mean
+ try :
+ if b2.stdErr() != 0 :
+ relerr_2 = b2.stdErr()/b2.mean()
+ except:
+ relerr_2=0.
+ except :
+ ylow = 0.
+ relerr_2 = 0.
+ if yupp==0. or ylow== 0. :
+ y=0.
+ else :
+ y = yupp / ylow
+ ey = y * math.sqrt(relerr_1**2 + relerr_2**2)
+ output.addPoint(x, y, (exminus,explus), (ey,ey))
+ return output
def fillAbove(desthisto, sourcehistosbyptmin):
pthigh= 1e100
ptlow =-1e100
for pt, h in sorted(sourcehistosbyptmin.iteritems(),reverse=True):
ptlow=pt
if(type(desthisto)==yoda.core.Scatter2D) :
for i in range(0,h.numPoints) :
xMin = h.points[i].x-h.points[i].xErrs.minus
if( xMin >= ptlow and
xMin < pthigh ) :
desthisto.addPoint(h.points[i])
elif(type(desthisto)==yoda.core.Profile1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin >= ptlow and
h.bins[i].xMin < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Histo1D) :
for i in range(0,h.numBins) :
if(h.bins[i].xMin >= ptlow and
h.bins[i].xMin < pthigh ) :
desthisto.bins[i] += h.bins[i]
elif(type(desthisto)==yoda.core.Counter) :
desthisto += h
else :
logging.error("Can't merge %s, unknown type" % desthisto.path)
sys.exit(1)
pthigh=pt
def mergeByPt(hpath, sqrts):
global inhistos
global outhistos
try:
fillAbove(outhistos[hpath], inhistos[hpath][float(sqrts)])
except:
pass
def useOnePt(hpath, sqrts, ptmin):
global inhistos
global outhistos
try:
## Find best pT_min match
ptmins = inhistos[hpath][float(sqrts)].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested pTmin=%s: " % ptmin + \
"using pTmin=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos[hpath][float(sqrts)][closest_ptmin]
except:
pass
# #######################################
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%progbase")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option("--with-ue",
action='store_true' ,
dest="ue",
default=True,
help="Include UE analyses")
parser.add_option("--without-ue",
action='store_false',
dest="ue",
default=True,
help="Don\'t include UE analyses")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
yodafiles=["-Run-II-Jets-0.yoda","-Run-II-Jets-1.yoda",\
"-Run-II-Jets-2.yoda",\
"-Run-II-Jets-3.yoda","-Run-II-Jets-4.yoda","-Run-II-Jets-5.yoda",\
"-Run-II-Jets-6.yoda","-Run-II-Jets-7.yoda",\
"-Run-I-Jets-1.yoda","-Run-I-Jets-2.yoda",\
"-Run-I-Jets-3.yoda","-Run-I-Jets-4.yoda","-Run-I-Jets-5.yoda",\
"-630-Jets-1.yoda" ,"-630-Jets-2.yoda" ,\
- "-630-Jets-3.yoda", "-300-UE.yoda", "-900-UE.yoda"
-# "-RatioPlots.yoda"
- ]
+ "-630-Jets-3.yoda", "-300-UE.yoda", "-900-UE.yoda"]
if(opts.ue) :
- yodafiles += ["-Run-II-UE.yoda" ,"-Run-I-UE.yoda" ,"-630-UE.yoda" ,]
+ yodafiles += ["-Run-II-UE.yoda" ,"-Run-I-UE.yoda" ,"-630-UE.yoda" ,\
+ "-300-Jets-1.yoda", "-900-Jets-1.yoda"]
## Get histos
inhistos = {}
outhistos={}
for f in yodafiles:
file='Rivet-'+args[0]+f
if(file.find("Run-II-UE")>0) :
sqrts=1960
ptmin=0.
elif(file.find("Run-II-Jets-0")>0) :
sqrts=1960
ptmin=20.
elif(file.find("Run-II-Jets-1")>0) :
sqrts=1960
ptmin=36.
elif(file.find("Run-II-Jets-2")>0) :
sqrts=1960
ptmin=55.
elif(file.find("Run-II-Jets-3")>0) :
sqrts=1960
ptmin=75.
elif(file.find("Run-II-Jets-4")>0) :
sqrts=1960
ptmin=100.
elif(file.find("Run-II-Jets-5")>0) :
sqrts=1960
ptmin=125.
elif(file.find("Run-II-Jets-6")>0) :
ptmin=175.
sqrts=1960
elif(file.find("Run-II-Jets-7")>0) :
sqrts=1960
ptmin=265.
elif(file.find("300-UE")>0) :
sqrts=300
ptmin=0.
+ elif(file.find("300-Jets-1")>0) :
+ sqrts=300
+ ptmin=6.
elif(file.find("900-UE")>0) :
sqrts=900
ptmin=0.
+ elif(file.find("900-Jets-1")>0) :
+ sqrts=900
+ ptmin=10.
elif(file.find("630-UE")>0) :
sqrts=630
ptmin=0.
elif(file.find("630-Jets-1")>0) :
sqrts=630
ptmin=30.
elif(file.find("630-Jets-2")>0) :
sqrts=630
ptmin=55.
elif(file.find("630-Jets-3")>0) :
sqrts=630
ptmin=90.
elif(file.find("Run-I-UE")>0) :
sqrts=1800
ptmin=0.
elif(file.find("Run-I-Jets-1")>0) :
sqrts=1800
ptmin=30.
elif(file.find("Run-I-Jets-2")>0) :
sqrts=1800
ptmin=55.
elif(file.find("Run-I-Jets-3")>0) :
sqrts=1800
ptmin=80.
elif(file.find("Run-I-Jets-4")>0) :
sqrts=1800
ptmin=105.
elif(file.find("Run-I-Jets-5")>0) :
sqrts=1800
ptmin=175.
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
# di-jet decorrelations
# jet shapes
if(aopath.find("5992206")>0 or aopath.find("6217184")>0 or
aopath.find("LEADINGJETS")>0 or aopath.find("7662670")>0 or
aopath.find("7057202")>0 or aopath.find("6450792")>0 or
aopath.find("7828950")>0 or aopath.find("4751469")>0 or
aopath.find("5839831")>0 or aopath.find("4563131")>0 or
aopath.find("4517016")>0 or aopath.find("3618439")>0 or
aopath.find("8591881")>0 or aopath.find("1388868")>0 or
- aopath.find("398175")>0) :
+ aopath.find("NOTE10874")>0 or aopath.find("398175")>0) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if not tmpP.has_key(ptmin):
tmpP[ptmin] = ao
else:
raise Exception("A set with ptmin = %s already exists" % ( ptmin))
elif(aopath.find("8233977")>0 or aopath.find("NOTE_9936")>0 or
aopath.find("3905616")>0 or aopath.find("3324664")>0 or
aopath.find("4796047")>0 or aopath.find("1865951")>0 or
aopath.find("2089246")>0 or aopath.find("3108457")>0 or
aopath.find("3349578")>0 or aopath.find("3541940")>0 or
aopath.find("3214044")>0 or aopath.find("2952106")>0 or
- aopath.find("NOTE10874")>0 or aopath.find("895662")>0 ) :
- if( opts.ue ) :
- outhistos[aopath] = ao
- elif (aopath.find("NOTE10874")<0) :
- outhistos[aopath] = ao
+ aopath.find("895662")>0 ) :
+ outhistos[aopath] = ao
else :
if(aopath.find("/_EVTCOUNT")>=0 or
aopath.find("/_XSEC" )>=0 ) : continue
print aopath
quit()
yodafiles=["-Run-II-Jets-8.yoda","-Run-II-Jets-9.yoda","-Run-II-Jets-10.yoda","-Run-II-Jets-11.yoda",\
"-Run-I-Jets-6.yoda","-Run-I-Jets-7.yoda","-Run-I-Jets-8.yoda"]
for f in yodafiles:
file='Rivet-'+args[0]+f
if(file.find("Run-II-Jets-8")>0) :
sqrts=1960
ptmin=0.150
elif(file.find("Run-II-Jets-9")>0) :
sqrts=1960
ptmin=0.400
elif(file.find("Run-II-Jets-10")>0) :
sqrts=1960
ptmin=0.600
elif(file.find("Run-II-Jets-11")>0) :
sqrts=1960
ptmin=1.000
elif(file.find("Run-I-Jets-6")>0) :
sqrts=1800
ptmin=0.150
elif(file.find("Run-I-Jets-7")>0) :
sqrts=1800
ptmin=0.5
elif(file.find("Run-I-Jets-8")>0) :
sqrts=1800
ptmin=0.8
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
continue
- ## Get histos from this AIDA file
+ ## Get histos from this yoda file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("8566488")>0 or aopath.find("8320160")>0) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if not tmpP.has_key(ptmin):
tmpP[ptmin] = ao
else:
raise Exception("A set with ptmin = %s already exists" % ( ptmin))
elif(aopath.find("8093652")>0 or aopath.find("3418421")>0 or
aopath.find("4266730")>0) :
if not inhistos.has_key(aopath):
inhistos[aopath] = {}
tmpE = inhistos[aopath]
if not tmpE.has_key(sqrts):
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if not tmpP.has_key(1000.*ptmin):
tmpP[1000.*ptmin] = ao
else:
raise Exception("A set with ptmin = %s already exists" % ( 1000.*ptmin))
## Make empty output histos if needed
for hpath,hsets in inhistos.iteritems():
if( (hpath.find("6217184")>0 and hpath.find("d13-x01-y01")>0 ) or
hpath.find("LEADINGJETS")>0 or hpath.find("7662670")>0 or
hpath.find("7057202")>0 or hpath.find("6450792")>0 or
hpath.find("7828950")>0 or hpath.find("8566488")>0 or
hpath.find("8320160")>0 or hpath.find("8093652")>0 or
hpath.find("4751469")>0 or hpath.find("5839831")>0 or
hpath.find("4563131")>0 or hpath.find("4517016")>0 or
hpath.find("3618439")>0 or hpath.find("4266730")>0 or
hpath.find("3418421")>0 or hpath.find("8591881")>0 or
- hpath.find("1388868")>0) :
+ hpath.find("1388868")>0 or hpath.find("NOTE10874")>0) :
if(type(hsets.values()[0].values()[0])==yoda.core.Counter) :
outhistos[hpath] = yoda.core.Counter(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
elif(type(hsets.values()[0].values()[0])==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
elif(type(hsets.values()[0].values()[0])==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(hsets.values()[0].values()[0].path,
hsets.values()[0].values()[0].title)
for i in range(0,hsets.values()[0].values()[0].numBins) :
outhistos[hpath].addBin(hsets.values()[0].values()[0].bins[i].xMin,
hsets.values()[0].values()[0].bins[i].xMax)
else :
logging.error("Histogram %s is of unknown type" % hpath)
print hpath,type(hsets.values()[0].values()[0])
sys.exit(1)
## Field analysis
logging.info("Processing CDF_2001_S4751469")
## Angular distributions in different pT bins
if(opts.ue) :
useOnePt("/CDF_2001_S4751469/d01-x01-y01", "1800", "0")
useOnePt("/CDF_2001_S4751469/d01-x01-y02", "1800", "0")
useOnePt("/CDF_2001_S4751469/d02-x01-y01", "1800", "0")
useOnePt("/CDF_2001_S4751469/d02-x01-y02", "1800", "0")
useOnePt("/CDF_2001_S4751469/d01-x01-y03", "1800", "30")
useOnePt("/CDF_2001_S4751469/d02-x01-y03", "1800", "30")
## Number, profile in pT_lead (True?)
if(opts.ue) :
useOnePt("/CDF_2001_S4751469/d03-x01-y01", "1800", "0")
useOnePt("/CDF_2001_S4751469/d03-x01-y02", "1800", "0")
useOnePt("/CDF_2001_S4751469/d03-x01-y03", "1800", "0")
useOnePt("/CDF_2001_S4751469/d04-x01-y01", "1800", "30")
useOnePt("/CDF_2001_S4751469/d04-x01-y02", "1800", "30")
useOnePt("/CDF_2001_S4751469/d04-x01-y03", "1800", "30")
## pT sums, profile in pT_lead (True?)
if(opts.ue) :
useOnePt("/CDF_2001_S4751469/d05-x01-y01", "1800", "0")
useOnePt("/CDF_2001_S4751469/d05-x01-y02", "1800", "0")
useOnePt("/CDF_2001_S4751469/d05-x01-y03", "1800", "0")
useOnePt("/CDF_2001_S4751469/d06-x01-y01", "1800", "30")
useOnePt("/CDF_2001_S4751469/d06-x01-y02", "1800", "30")
useOnePt("/CDF_2001_S4751469/d06-x01-y03", "1800", "30")
## pT distributions (use a specific pT cut run)
if(opts.ue) :
useOnePt("/CDF_2001_S4751469/d07-x01-y01", "1800", "0")
useOnePt("/CDF_2001_S4751469/d07-x01-y02", "1800", "0")
useOnePt("/CDF_2001_S4751469/d07-x01-y03", "1800", "30")
## Acosta analysis
logging.info("Processing CDF_2004_S5839831")
## Mean pT, profile in ET_lead
mergeByPt("/CDF_2004_S5839831/d01-x01-y01", "1800")
mergeByPt("/CDF_2004_S5839831/d01-x01-y02", "1800")
## pT_max,min, profiles in ET_lead
mergeByPt("/CDF_2004_S5839831/d02-x01-y01", "1800")
mergeByPt("/CDF_2004_S5839831/d02-x01-y02", "1800")
mergeByPt("/CDF_2004_S5839831/d02-x01-y03", "1800")
## pT distributions (want to use a specific pT cut run)
useOnePt("/CDF_2004_S5839831/d03-x01-y01", "1800", "30")
useOnePt("/CDF_2004_S5839831/d03-x01-y02", "1800", "80")
useOnePt("/CDF_2004_S5839831/d03-x01-y03", "1800", "105")
useOnePt("/CDF_2004_S5839831/d03-x01-y04", "1800", "105")
useOnePt("/CDF_2004_S5839831/d03-x01-y05", "1800", "175")
## N_max,min, profiles in ET_lead
mergeByPt("/CDF_2004_S5839831/d04-x01-y01", "1800")
mergeByPt("/CDF_2004_S5839831/d04-x01-y02", "1800")
## Min bias dbs (want to use min bias pT cut)
if(opts.ue) :
useOnePt("/CDF_2004_S5839831/d05-x01-y01", "1800", "0")
useOnePt("/CDF_2004_S5839831/d06-x01-y01", "1800", "0")
## Swiss Cheese, profile in ET_lead
mergeByPt("/CDF_2004_S5839831/d07-x01-y01", "1800")
mergeByPt("/CDF_2004_S5839831/d07-x01-y02", "1800")
## pT_max,min, profiles in ET_lead
mergeByPt("/CDF_2004_S5839831/d08-x01-y01", "630")
mergeByPt("/CDF_2004_S5839831/d08-x01-y02", "630")
mergeByPt("/CDF_2004_S5839831/d08-x01-y03", "630")
## Swiss Cheese, profile in ET_lead
mergeByPt("/CDF_2004_S5839831/d09-x01-y01", "630")
mergeByPt("/CDF_2004_S5839831/d09-x01-y02", "630")
## Min bias dbs (want to use min bias pT cut)
if(opts.ue) :
useOnePt("/CDF_2004_S5839831/d10-x01-y01", "630", "0")
useOnePt("/CDF_2004_S5839831/d11-x01-y01", "630", "0")
## CDF jet shape analysis
logging.info("Processing CDF_2005_S6217184")
useOnePt("/CDF_2005_S6217184/d01-x01-y01", "1960", "36" )
useOnePt("/CDF_2005_S6217184/d01-x01-y02", "1960", "36" )
useOnePt("/CDF_2005_S6217184/d01-x01-y03", "1960", "55" )
useOnePt("/CDF_2005_S6217184/d02-x01-y01", "1960", "55" )
useOnePt("/CDF_2005_S6217184/d02-x01-y02", "1960", "55" )
useOnePt("/CDF_2005_S6217184/d02-x01-y03", "1960", "75" )
useOnePt("/CDF_2005_S6217184/d03-x01-y01", "1960", "75" )
useOnePt("/CDF_2005_S6217184/d03-x01-y02", "1960", "100")
useOnePt("/CDF_2005_S6217184/d03-x01-y03", "1960", "100")
useOnePt("/CDF_2005_S6217184/d04-x01-y01", "1960", "125")
useOnePt("/CDF_2005_S6217184/d04-x01-y02", "1960", "125")
useOnePt("/CDF_2005_S6217184/d04-x01-y03", "1960", "175")
useOnePt("/CDF_2005_S6217184/d05-x01-y01", "1960", "175")
useOnePt("/CDF_2005_S6217184/d05-x01-y02", "1960", "175")
useOnePt("/CDF_2005_S6217184/d05-x01-y03", "1960", "175")
useOnePt("/CDF_2005_S6217184/d06-x01-y01", "1960", "265")
useOnePt("/CDF_2005_S6217184/d06-x01-y02", "1960", "265")
useOnePt("/CDF_2005_S6217184/d06-x01-y03", "1960", "265")
useOnePt("/CDF_2005_S6217184/d07-x01-y01", "1960", "36" )
useOnePt("/CDF_2005_S6217184/d07-x01-y02", "1960", "36" )
useOnePt("/CDF_2005_S6217184/d07-x01-y03", "1960", "55" )
useOnePt("/CDF_2005_S6217184/d08-x01-y01", "1960", "55" )
useOnePt("/CDF_2005_S6217184/d08-x01-y02", "1960", "55" )
useOnePt("/CDF_2005_S6217184/d08-x01-y03", "1960", "75" )
useOnePt("/CDF_2005_S6217184/d09-x01-y01", "1960", "75" )
useOnePt("/CDF_2005_S6217184/d09-x01-y02", "1960", "100")
useOnePt("/CDF_2005_S6217184/d09-x01-y03", "1960", "100")
useOnePt("/CDF_2005_S6217184/d10-x01-y01", "1960", "125")
useOnePt("/CDF_2005_S6217184/d10-x01-y02", "1960", "125")
useOnePt("/CDF_2005_S6217184/d10-x01-y03", "1960", "175")
useOnePt("/CDF_2005_S6217184/d11-x01-y01", "1960", "175")
useOnePt("/CDF_2005_S6217184/d11-x01-y02", "1960", "175")
useOnePt("/CDF_2005_S6217184/d11-x01-y03", "1960", "175")
useOnePt("/CDF_2005_S6217184/d12-x01-y01", "1960", "265")
useOnePt("/CDF_2005_S6217184/d12-x01-y02", "1960", "265")
useOnePt("/CDF_2005_S6217184/d12-x01-y03", "1960", "265")
mergeByPt("/CDF_2005_S6217184/d13-x01-y01", "1960")
-# ## CDF dijet mass spectrum
+# CDF dijet mass spectrum
mergeByPt("/CDF_2008_S8093652/d01-x01-y01", "1960")
# ## Rick Field Run-II Leading Jets analysis
# logging.info("Processing CDF_2008_LEADINGJETS")
# ## charged particle density
# mergeByPt("/CDF_2008_LEADINGJETS/d01-x01-y01", "1960")
# mergeByPt("/CDF_2008_LEADINGJETS/d02-x01-y01", "1960")
# mergeByPt("/CDF_2008_LEADINGJETS/d03-x01-y01", "1960")
# mergeByPt("/CDF_2008_LEADINGJETS/d04-x01-y01", "1960")
# ## pT sum density
# mergeByPt("/CDF_2008_LEADINGJETS/d05-x01-y01", "1960")
# mergeByPt("/CDF_2008_LEADINGJETS/d06-x01-y01", "1960")
# mergeByPt("/CDF_2008_LEADINGJETS/d07-x01-y01", "1960")
# mergeByPt("/CDF_2008_LEADINGJETS/d08-x01-y01", "1960")
# ## mean pT
# mergeByPt("/CDF_2008_LEADINGJETS/d09-x01-y01", "1960")
## newer version
logging.info("Processing CDF_2010_S8591881_QCD")
mergeByPt("/CDF_2010_S8591881_QCD/d10-x01-y01", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d10-x01-y02", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d10-x01-y03", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d11-x01-y01", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d11-x01-y02", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d11-x01-y03", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d12-x01-y01", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d12-x01-y02", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d12-x01-y03", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d13-x01-y01", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d13-x01-y02", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d13-x01-y03", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d14-x01-y01", "1960")
mergeByPt("/CDF_2010_S8591881_QCD/d15-x01-y01", "1960")
## D0 dijet correlation analysis
logging.info("Processing D0_2004_S5992206")
useOnePt("/D0_2004_S5992206/d01-x02-y01", "1960", "75")
useOnePt("/D0_2004_S5992206/d02-x02-y01", "1960", "100")
useOnePt("/D0_2004_S5992206/d03-x02-y01", "1960", "125")
useOnePt("/D0_2004_S5992206/d04-x02-y01", "1960", "175")
## D0 incl jet cross-section analysis
logging.info("Processing D0_2008_S7662670")
mergeByPt("/D0_2008_S7662670/d01-x01-y01", "1960")
mergeByPt("/D0_2008_S7662670/d02-x01-y01", "1960")
mergeByPt("/D0_2008_S7662670/d03-x01-y01", "1960")
mergeByPt("/D0_2008_S7662670/d04-x01-y01", "1960")
mergeByPt("/D0_2008_S7662670/d05-x01-y01", "1960")
mergeByPt("/D0_2008_S7662670/d06-x01-y01", "1960")
mergeByPt("/D0_2010_S8566488/d01-x01-y01", "1960")
mergeByPt("/D0_2010_S8566488/d02-x01-y01", "1960")
mergeByPt("/D0_2010_S8566488/d03-x01-y01", "1960")
mergeByPt("/D0_2010_S8566488/d04-x01-y01", "1960")
mergeByPt("/D0_2010_S8566488/d05-x01-y01", "1960")
mergeByPt("/D0_2010_S8566488/d06-x01-y01", "1960")
# CDF jet cross section
mergeByPt("/CDF_2001_S4563131/d01-x01-y01", "1800")
mergeByPt("/CDF_2001_S4517016/d01-x01-y01", "1800")
mergeByPt("/CDF_2001_S4517016/d02-x01-y01", "1800")
mergeByPt("/CDF_2001_S4517016/d03-x01-y01", "1800")
mergeByPt("/CDF_2001_S4517016/d04-x01-y01", "1800")
useOnePt("/CDF_1998_S3618439/d01-x01-y01", "1800","105")
useOnePt("/CDF_1998_S3618439/d01-x01-y02", "1800","105")
mergeByPt("/CDF_2008_S7828950/d01-x01-y01", "1960")
mergeByPt("/CDF_2008_S7828950/d02-x01-y01", "1960")
mergeByPt("/CDF_2008_S7828950/d03-x01-y01", "1960")
mergeByPt("/CDF_2008_S7828950/d04-x01-y01", "1960")
mergeByPt("/CDF_2008_S7828950/d05-x01-y01", "1960")
mergeByPt("/CDF_2007_S7057202/d01-x01-y01", "1960")
mergeByPt("/CDF_2007_S7057202/d02-x01-y01", "1960")
mergeByPt("/CDF_2007_S7057202/d03-x01-y01", "1960")
mergeByPt("/CDF_2007_S7057202/d04-x01-y01", "1960")
mergeByPt("/CDF_2007_S7057202/d05-x01-y01", "1960")
mergeByPt("/CDF_2007_S7057202/d06-x01-y01", "1960")
mergeByPt("/CDF_2007_S7057202/d07-x01-y01", "1960")
mergeByPt("/CDF_2006_S6450792/d01-x01-y01", "1960")
mergeByPt("/CDF_2000_S4266730/d01-x01-y01", "1800")
useOnePt("/CDF_1996_S3418421/d01-x01-y01","1800","150")
useOnePt("/CDF_1996_S3418421/d01-x01-y02","1800","150")
useOnePt("/CDF_1996_S3418421/d01-x01-y03","1800","150")
useOnePt("/CDF_1996_S3418421/d01-x01-y04","1800","500")
useOnePt("/CDF_1996_S3418421/d01-x01-y05","1800","500")
mergeByPt("/CDF_1996_S3418421/d02-x01-y01","1800")
useOnePt("/D0_2009_S8320160/d01-x01-y01", "1960", "0.15" )
useOnePt("/D0_2009_S8320160/d02-x01-y01", "1960", "0.15" )
useOnePt("/D0_2009_S8320160/d03-x01-y01", "1960", "0.4" )
useOnePt("/D0_2009_S8320160/d04-x01-y01", "1960", "0.4" )
useOnePt("/D0_2009_S8320160/d05-x01-y01", "1960", "0.6" )
useOnePt("/D0_2009_S8320160/d06-x01-y01", "1960", "0.6" )
useOnePt("/D0_2009_S8320160/d07-x01-y01", "1960", "0.6" )
useOnePt("/D0_2009_S8320160/d08-x01-y01", "1960", "0.6" )
useOnePt("/D0_2009_S8320160/d09-x01-y01", "1960", "1.0" )
useOnePt("/D0_2009_S8320160/d10-x01-y01", "1960", "1.0" )
logging.info("Processing CDF_2015_I1388868")
for d in range(1,4) :
if d == 1 :
energy="1960"
elif d ==2 :
energy = "900"
elif d==3 :
energy = "300"
for y in [1,2,3,4,6,7,8,9]:
useOnePt("/CDF_2015_I1388868/d0%s-x01-y0%s" % (d,y) , energy, "0" )
# D0 jet shape
logging.info("Processing D0_1995_I398175")
useOnePt("/D0_1995_I398175/d01-x01-y01", "1800", "30" )
useOnePt("/D0_1995_I398175/d02-x01-y01", "1800", "55" )
useOnePt("/D0_1995_I398175/d03-x01-y01", "1800", "105" )
useOnePt("/D0_1995_I398175/d04-x01-y01", "1800", "105" )
useOnePt("/D0_1995_I398175/d05-x01-y01", "1800", "30" )
useOnePt("/D0_1995_I398175/d06-x01-y01", "1800", "55" )
-
+
+logging.info("CDF_2012_NOTE10874")
+mergeByPt("/CDF_2012_NOTE10874/d01-x01-y01", "300")
+mergeByPt("/CDF_2012_NOTE10874/d01-x01-y02", "900")
+mergeByPt("/CDF_2012_NOTE10874/d01-x01-y03","1960")
+mergeByPt("/CDF_2012_NOTE10874/d02-x01-y01", "300")
+mergeByPt("/CDF_2012_NOTE10874/d02-x01-y02", "900")
+mergeByPt("/CDF_2012_NOTE10874/d02-x01-y03","1960")
+mergeByPt("/CDF_2012_NOTE10874/d03-x01-y01", "300")
+mergeByPt("/CDF_2012_NOTE10874/d03-x01-y02", "900")
+mergeByPt("/CDF_2012_NOTE10874/d03-x01-y03","1960")
+
+for i in range(1,4) :
+ names = ["/CDF_2012_NOTE10874/d0%s-x01-y01" % i,
+ "/CDF_2012_NOTE10874/d0%s-x01-y02" % i,
+ "/CDF_2012_NOTE10874/d0%s-x01-y03" % i]
+ # ratio 1960/300
+ if names[0] in outhistos and names[2] in outhistos :
+ outhistos["/CDF_2012_NOTE10874/d0%s-x01-y04" % i] = \
+ divide("/CDF_2012_NOTE10874/d0%s-x01-y04" % i,outhistos[names[2]],outhistos[names[0]])
+ # ratio 900/300
+ if names[0] in outhistos and names[1] in outhistos :
+ outhistos["/CDF_2012_NOTE10874/d0%s-x01-y05" % i]= \
+ divide("/CDF_2012_NOTE10874/d0%s-x01-y05" % i,outhistos[names[1]],outhistos[names[0]])
+ # ratio 1960/900
+ if names[1] in outhistos and names[2] in outhistos :
+ outhistos["/CDF_2012_NOTE10874/d0%s-x01-y06" % i]= \
+ divide("/CDF_2012_NOTE10874/d0%s-x01-y06" %i,outhistos[names[2]],outhistos[names[1]])
+
# Choose output file
name = args[0]+"-Jets.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/Tests/python/merge-TVT-Photon b/Tests/python/merge-TVT-Photon
--- a/Tests/python/merge-TVT-Photon
+++ b/Tests/python/merge-TVT-Photon
@@ -1,65 +1,66 @@
#! /usr/bin/env python
import logging
import sys
import os, yoda
"""%prog
Script for merging aida files
"""
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog base")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
files=["-Run-II-PromptPhoton.yoda",
"-Run-II-DiPhoton-GammaGamma.yoda","-Run-II-DiPhoton-GammaJet.yoda"]
## Get histos
inhistos = {}
outhistos={}
for f in files:
file='Rivet-'+args[0]+f
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
- logging.error("%s can not be parsed as XML" % file)
- break
+ logging.error("%s can not be parsed as yoda" % file)
+ continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
+ if("RAW" in aopath) :continue
if(aopath.find("XSEC")>=0 or aopath.find("EVTCOUNT")>=0) : continue
if ( aopath in outhistos ) :
aotype = type(ao)
if aotype in (yoda.Counter, yoda.Histo1D, yoda.Histo2D, yoda.Profile1D, yoda.Profile2D):
outhistos[aopath] += ao
else :
quit()
else:
outhistos[aopath] = ao
# Choose output file
name = args[0]+"-Photon.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)
diff --git a/UnderlyingEvent/MPIHandler.h b/UnderlyingEvent/MPIHandler.h
--- a/UnderlyingEvent/MPIHandler.h
+++ b/UnderlyingEvent/MPIHandler.h
@@ -1,878 +1,878 @@
// -*- C++ -*-
//
// MPIHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_MPIHandler_H
#define HERWIG_MPIHandler_H
//
// This is the declaration of the MPIHandler class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/Handlers/StandardEventHandler.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "Herwig/PDT/StandardMatchers.h"
#include "Herwig/Utilities/GSLBisection.h"
//#include "Herwig/Utilities/GSLMultiRoot.h"
#include "Herwig/Utilities/GSLIntegrator.h"
#include "Herwig/Shower/UEBase.h"
#include <cassert>
#include "ProcessHandler.h"
#include "MPIHandler.fh"
namespace Herwig {
using namespace ThePEG;
/** \ingroup UnderlyingEvent
* \class MPIHandler
* This class is responsible for generating additional
* semi hard partonic interactions.
*
* \author Manuel B\"ahr
*
* @see \ref MPIHandlerInterfaces "The interfaces"
* defined for MPIHandler.
* @see ProcessHandler
* @see ShowerHandler
* @see HwRemDecayer
*/
class MPIHandler: public UEBase {
/**
* Maximum number of scatters
*/
static const unsigned int maxScatters_ = 99;
/**
* Class for the integration is a friend to access private members
*/
friend struct Eikonalization;
friend struct TotalXSecBisection;
friend struct slopeAndTotalXSec;
friend struct slopeInt;
friend struct slopeBisection;
public:
/** A vector of <code>SubProcessHandler</code>s. */
typedef vector<SubHdlPtr> SubHandlerList;
/** A vector of <code>Cut</code>s. */
typedef vector<CutsPtr> CutsList;
/** A vector of <code>ProcessHandler</code>s. */
typedef vector<ProHdlPtr> ProcessHandlerList;
/** A vector of cross sections. */
typedef vector<CrossSection> XSVector;
/** A pair of multiplicities: hard, soft. */
typedef pair<unsigned int, unsigned int> MPair;
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MPIHandler(): softMult_(0), identicalToUE_(-1),
PtOfQCDProc_(-1.0*GeV), Ptmin_(-1.0*GeV),
hardXSec_(0*millibarn), softXSec_(0*millibarn),
totalXSecExp_(0*millibarn),
softMu2_(ZERO), beta_(100.0/GeV2),
algorithm_(2), numSubProcs_(0),
colourDisrupt_(0.0), softInt_(true), twoComp_(true),
DLmode_(2), avgNhard_(0.0), avgNsoft_(0.0),
energyExtrapolation_(2), EEparamA_(0.6*GeV),
EEparamB_(37.5*GeV), refScale_(7000.*GeV),
pT0_(3.11*GeV), b_(0.21) {}
/**
* The destructor.
*/
virtual ~MPIHandler(){}
//@}
public:
/** @name Methods for the MPI generation. */
//@{
/*
* @return true if for this beam setup MPI can be generated
*/
virtual bool beamOK() const;
/**
* Return true or false depending on whether soft interactions are enabled.
*/
virtual bool softInt() const {return softInt_;}
/**
* Get the soft multiplicity from the pretabulated multiplicity
* distribution. Generated in multiplicity in the first place.
* @return the number of extra soft events in this collision
*/
virtual unsigned int softMultiplicity() const {return softMult_;}
/**
* Sample from the pretabulated multiplicity distribution.
* @return the number of extra events in this collision
*/
virtual unsigned int multiplicity(unsigned int sel=0);
/**
* Select a StandardXComb according to it's weight
* @return that StandardXComb Object
* @param sel is the subprocess that should be returned,
* if more than one is specified.
*/
virtual tStdXCombPtr generate(unsigned int sel=0);
//@}
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Initialize this Multiple Interaction handler and all related objects needed to
* generate additional events.
*/
virtual void initialize();
/**
* Finalize this Multiple Interaction handler and all related objects needed to
* generate additional events.
*/
virtual void finalize();
/**
* Clean up the XCombs from our subprocesses after each event.
* ThePEG cannot see them, so the usual cleaning misses these.
*/
virtual void clean();
/**
* Write out accumulated statistics about integrated cross sections.
*/
void statistics() const;
/**
* The level of statistics. Controlls the amount of statistics
* written out after each run to the <code>EventGenerator</code>s
* <code>.out</code> file. Simply the EventHandler method is called here.
*/
int statLevel() const {return eventHandler()->statLevel();}
/**
* Return the hard cross section above ptmin
*/
CrossSection hardXSec() const { return hardXSec_; }
/**
* Return the soft cross section below ptmin
*/
CrossSection softXSec() const { return softXSec_; }
/**
* Return the inelastic cross section
*/
CrossSection inelasticXSec() const { return inelXSec_; }
/** @name Simple access functions. */
//@{
/**
* Return the ThePEG::EventHandler assigned to this handler.
* This methods shadows ThePEG::StepHandler::eventHandler(), because
* it is not virtual in ThePEG::StepHandler. This is ok, because this
* method would give a null-pointer at some stages, whereas this method
* gives access to the explicitely copied pointer (in initialize())
* to the ThePEG::EventHandler.
*/
tEHPtr eventHandler() const {return theHandler;}
/**
* Return the current handler
*/
static const MPIHandler * currentHandler() {
return currentHandler_;
}
/**
* Return theAlgorithm.
*/
virtual int Algorithm() const {return algorithm_;}
/**
* Return the ptmin parameter of the model
*/
virtual Energy Ptmin() const {
if(Ptmin_ > ZERO)
return Ptmin_;
else
throw Exception() << "MPIHandler::Ptmin called without initialize before"
<< Exception::runerror;
}
/**
* Return the slope of the soft pt spectrum as calculated.
*/
virtual InvEnergy2 beta() const {
if(beta_ != 100.0/GeV2)
return beta_;
else
throw Exception() << "MPIHandler::beta called without initialization"
<< Exception::runerror;
}
/**
* Return the pt Cutoff of the Interaction that is identical to the UE
* one.
*/
virtual Energy PtForVeto() const {return PtOfQCDProc_;}
/**
* Return the number of additional "hard" processes ( = multiple
* parton scattering)
*/
virtual unsigned int additionalHardProcs() const {return numSubProcs_-1;}
/**
* Return the fraction of colour disrupted connections to the
* suprocesses.
*/
virtual double colourDisrupt() const {return colourDisrupt_;}
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Access the list of sub-process handlers.
*/
const SubHandlerList & subProcesses()
const {return theSubProcesses;}
/**
* Access the list of sub-process handlers.
*/
SubHandlerList & subProcesses() {return theSubProcesses;}
/**
* Access the list of cuts.
*/
const CutsList & cuts() const {return theCuts;}
/**
* Access the list of cuts.
*/
CutsList & cuts() {return theCuts;}
/**
* Access the list of sub-process handlers.
*/
const ProcessHandlerList & processHandlers()
const {return theProcessHandlers;}
/**
* Access the list of sub-process handlers.
*/
ProcessHandlerList & processHandlers() {return theProcessHandlers;}
/**
* Method to calculate the individual probabilities for N scatters in the event.
* @param UEXSecs is(are) the inclusiv cross section(s) for the UE process(es).
*/
void Probs(XSVector UEXSecs);
/**
* Debug method to check the individual probabilities.
* @param filename is the file the output gets written to
*/
void MultDistribution(string filename) const;
/**
* Return the value of the Overlap function A(b) for a given impact
* parameter \a b.
* @param b impact parameter
* @param mu2 = inv hadron radius squared. 0 will use the value of
* invRadius_
* @return inverse area.
*/
InvArea OverlapFunction(Length b, Energy2 mu2=ZERO) const;
/**
* Method to calculate the poisson probability for expectation value
* \f$<n> = A(b)\sigma\f$, and multiplicity N.
*/
double poisson(Length b, CrossSection sigma,
unsigned int N, Energy2 mu2=ZERO) const;
/**
* Return n!
*/
double factorial (unsigned int n) const;
/**
* Returns the total cross section for the current CMenergy. The
* decision which parametrization will be used is steered by a
* external parameter of this class.
*/
CrossSection totalXSecExp() const;
/**
* Difference of the calculated total cross section and the
* experimental one from totalXSecExp.
* @param softXSec = the soft cross section that is used
* @param softMu2 = the soft radius, if 0 the hard radius will be used
*/
CrossSection totalXSecDiff(CrossSection softXSec,
Energy2 softMu2=ZERO) const;
/**
* Difference of the calculated elastic slope and the
* experimental one from slopeExp.
* @param softXSec = the soft cross section that is used
* @param softMu2 = the soft radius, if 0 the hard radius will be used
*/
InvEnergy2 slopeDiff(CrossSection softXSec,
Energy2 softMu2=ZERO) const;
/**
* Returns the value of the elastic slope for the current CMenergy.
* The decision which parametrization will be used is steered by a
* external parameter of this class.
*/
InvEnergy2 slopeExp() const;
/**
* Calculate the minimal transverse momentum from the extrapolation
*/
void overrideUECuts();
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MPIHandler & operator=(const MPIHandler &);
+ MPIHandler & operator=(const MPIHandler &) = delete;
/**
* A pointer to the EventHandler that calls us. Has to be saved, because the
* method eventHandler() inherited from ThePEG::StepHandler returns a null-pointer
* sometimes. Leif changed that in r1053 so that a valid pointer is present, when
* calling doinitrun().
*/
tEHPtr theHandler;
/**
* The list of <code>SubProcessHandler</code>s.
*/
SubHandlerList theSubProcesses;
/**
* The kinematical cuts used for this collision handler.
*/
CutsList theCuts;
/**
* List of ProcessHandler used to sample different processes independently
*/
ProcessHandlerList theProcessHandlers;
/**
* A ThePEG::Selector where the individual Probabilities P_N are stored
* and the actual Multiplicities can be selected.
*/
Selector<MPair> theMultiplicities;
/**
* Variable to store the soft multiplicity generated for a event. This
* has to be stored as it is generated at the time of the hard
* additional interactions but used later on.
*/
unsigned int softMult_;
/**
* Variable to store the multiplicity of the second hard process
*/
vector<int> additionalMultiplicities_;
/**
* Variable to store the information, which process is identical to
* the UE one (QCD dijets).
* 0 means "real" hard one
* n>0 means the nth additional hard scatter
* -1 means no one!
*/
int identicalToUE_;
/**
* Variable to store the minimal pt of the process that is identical
* to the UE one. This only has to be set, if it can't be determined
* automatically (i.e. when reading QCD LesHouches files in).
*/
Energy PtOfQCDProc_;
/**
* Variable to store the parameter ptmin
*/
Energy Ptmin_;
/**
* Variable to store the hard cross section above ptmin
*/
CrossSection hardXSec_;
/**
* Variable to store the final soft cross section below ptmin
*/
CrossSection softXSec_;
/**
* Variable to store the inelastic cross section
*/
CrossSection inelXSec_;
/**
* Variable to store the total pp cross section (assuming rho=0!) as
* measured at LHC. If this variable is set, this value is used in the
* subsequent run instead of any of the Donnachie-Landshoff
* parametrizations.
*/
CrossSection totalXSecExp_;
/**
* Variable to store the soft radius, that is calculated during
* initialization for the two-component model.
*/
Energy2 softMu2_;
/**
* slope to the non-perturbative pt spectrum: \f$d\sigma/dp_T^2 = A \exp
* (- beta p_T^2)\f$. Its value is determined durint initialization.
*/
InvEnergy2 beta_;
/**
* Switch to be set from outside to determine the algorithm used for
* UE activity.
*/
int algorithm_;
/**
* Inverse hadron Radius squared \f$ (\mu^2) \f$. Used inside the overlap function.
*/
Energy2 invRadius_;
/**
* Member variable to store the actual number of separate SubProcesses
*/
unsigned int numSubProcs_;
/**
* Variable to store the relative number of colour disrupted
* connections to additional subprocesses. This variable is used in
* Herwig::HwRemDecayer but store here, to have access to all
* parameters through one Object.
*/
double colourDisrupt_;
/**
* Flag to store whether soft interactions, i.e. pt < ptmin should be
* simulated.
*/
bool softInt_;
/**
* Flag to steer wheather the soft part has a different radius, that
* will be dynamically fixed.
*/
bool twoComp_;
/**
* Switch to determine which Donnachie & Landshoff parametrization
* should be used.
*/
unsigned int DLmode_;
/**
* Variable to store the average hard multiplicity.
*/
double avgNhard_;
/**
* Variable to store the average soft multiplicity.
*/
double avgNsoft_;
/**
* The current handler
*/
static MPIHandler * currentHandler_;
/**
* Flag to store whether to calculate the minimal UE pt according to an
* extrapolation formula or whether to use MPIHandler:Cuts[0]:OneCuts[0]:MinKT
*/
unsigned int energyExtrapolation_;
/**
* Parameters for the energy extrapolation formula
*/
Energy EEparamA_;
Energy EEparamB_;
Energy refScale_;
Energy pT0_;
double b_;
protected:
/** @cond EXCEPTIONCLASSES */
/**
* Exception class used by the MultipleInteractionHandler, when something
* during initialization went wrong.
* \todo understand!!!
*/
class InitError: public Exception {};
/** @endcond */
};
}
namespace Herwig {
/**
* A struct for the 2D root finding that is necessary to determine the
* soft cross section and the soft radius that is needed to describe
* the total cross section correctly.
* NOT IN USE CURRENTLY
*/
struct slopeAndTotalXSec : public GSLHelper<CrossSection, CrossSection> {
public:
/**
* Constructor
*/
slopeAndTotalXSec(tcMPIHPtr handler): handler_(handler) {}
/** second argument type */
typedef Energy2 ArgType2;
/** second value type */
typedef InvEnergy2 ValType2;
/** first element of the vector like function to find root for
* @param softXSec soft cross-section
* @param softMu2 \f$\mu^2\f$
*/
CrossSection f1(ArgType softXSec, ArgType2 softMu2) const {
return handler_->totalXSecDiff(softXSec, softMu2);
}
/** second element of the vector like function to find root for
* @param softXSec soft cross-section
* @param softMu2 \f$\mu^2\f$
*/
InvEnergy2 f2(ArgType softXSec, ArgType2 softMu2) const {
return handler_->slopeDiff(softXSec, softMu2);
}
/** provide the actual units of use */
virtual ValType vUnit() const {return 1.0*millibarn;}
/** otherwise rounding errors may get significant */
virtual ArgType aUnit() const {return 1.0*millibarn;}
/** provide the actual units of use */
ValType2 vUnit2() const {return 1.0/GeV2;}
/** otherwise rounding errors may get significant */
ArgType2 aUnit2() const {return GeV2;}
private:
/**
* Pointer to the handler
*/
tcMPIHPtr handler_;
};
/**
* A struct for the root finding that is necessary to determine the
* slope of the soft pt spectrum to match the soft cross section
*/
struct betaBisection : public GSLHelper<Energy2, InvEnergy2>{
public:
/**
* Constructor.
* @param soft = soft cross section, i.e. the integral of the soft
* pt spectrum f(u=p_T^2) = dsig exp(-beta*u/u_min)
* @param dsig = dsigma_hard/dp_T^2 at the p_T cutoff
* @param ptmin = p_T cutoff
*/
betaBisection(CrossSection soft, DiffXSec dsig, Energy ptmin)
: softXSec_(soft), dsig_(dsig), ptmin_(ptmin) {}
/**
* Operator that is used inside the GSLBisection class
*/
virtual Energy2 operator ()(InvEnergy2 beta) const
{
if( fabs(beta*GeV2) < 1.E-4 )
beta = (beta > ZERO) ? 1.E-4/GeV2 : -1.E-4/GeV2;
return (exp(beta*sqr(ptmin_)) - 1.0)/beta - softXSec_/dsig_;
}
/** provide the actual units of use */
virtual ValType vUnit() const {return 1.0*GeV2;}
/** provide the actual units of use */
virtual ArgType aUnit() const {return 1.0/GeV2;}
private:
/** soft cross section */
CrossSection softXSec_;
/** dsigma/dp_T^2 at ptmin */
DiffXSec dsig_;
/** pt cutoff */
Energy ptmin_;
};
/**
* A struct for the root finding that is necessary to determine the
* soft cross section and soft mu2 that are needed to describe the
* total cross section AND elastic slope correctly.
*/
struct slopeBisection : public GSLHelper<InvEnergy2, Energy2> {
public:
/** Constructor */
slopeBisection(tcMPIHPtr handler) : handler_(handler) {}
/**
* Return the difference of the calculated elastic slope to the
* experimental one for a given value of the soft mu2. During that,
* the soft cross section get fixed.
*/
InvEnergy2 operator ()(Energy2 arg) const;
/** Return the soft cross section that has been calculated */
CrossSection softXSec() const {return softXSec_;}
private:
/** const pointer to the MPIHandler to give access to member functions.*/
tcMPIHPtr handler_;
/** soft cross section that is determined on the fly.*/
mutable CrossSection softXSec_;
};
/**
* A struct for the root finding that is necessary to determine the
* soft cross section that is needed to describe the total cross
* section correctly.
*/
struct TotalXSecBisection : public GSLHelper<CrossSection, CrossSection> {
public:
/**
* Constructor
* @param handler The handler
* @param softMu2 \f$\mu^2\f$
*/
TotalXSecBisection(tcMPIHPtr handler, Energy2 softMu2=ZERO):
handler_(handler), softMu2_(softMu2) {}
/**
* operator to return the cross section
* @param argument input cross section
*/
CrossSection operator ()(CrossSection argument) const {
return handler_->totalXSecDiff(argument, softMu2_);
}
/** provide the actual units of use */
virtual ValType vUnit() const {return 1.0*millibarn;}
/** otherwise rounding errors may get significant */
virtual ArgType aUnit() const {return 1.0*millibarn;}
private:
/**
* The handler
*/
tcMPIHPtr handler_;
/**
* \f$\mu^2\f$
*/
Energy2 softMu2_;
};
/**
* Typedef for derivative of the length
*/
typedef decltype(mm/GeV2) LengthDiff;
/**
* A struct for the integrand for the slope
*/
struct slopeInt : public GSLHelper<LengthDiff, Length>{
public:
/** Constructor
* @param handler The handler
* @param hard The hard cross section
* @param soft The soft cross section
* @param softMu2 \f$\mu^2\f$
*/
slopeInt(tcMPIHPtr handler, CrossSection hard,
CrossSection soft=0*millibarn, Energy2 softMu2=ZERO)
: handler_(handler), hardXSec_(hard),
softXSec_(soft), softMu2_(softMu2) {}
/**
* Operator to return the answer
* @param arg The argument
*/
ValType operator ()(ArgType arg) const;
private:
/**
* Pointer to the Handler that calls this integrand
*/
tcMPIHPtr handler_;
/**
* The hard cross section to be eikonalized
*/
CrossSection hardXSec_;
/**
* The soft cross section to be eikonalized. Default is zero
*/
CrossSection softXSec_;
/**
* The inv radius^2 of the soft interactions.
*/
Energy2 softMu2_;
};
/**
* A struct for the eikonalization of the inclusive cross section.
*/
struct Eikonalization : public GSLHelper<Length, Length>{
/**
* The constructor
* @param handler is the pointer to the MPIHandler to get access to
* MPIHandler::OverlapFunction and member variables of the MPIHandler.
* @param option is a flag, whether the inelastic or the total
* @param handler The handler
* @param hard The hard cross section
* @param soft The soft cross section
* @param softMu2 \f$\mu^2\f$
* cross section should be returned (-2 or -1). For option = N > 0 the integrand
* is N*(A(b)*sigma)^N/N! exp(-A(b)*sigma) this is the P_N*sigma where
* P_N is the Probability of having exactly N interaction (including the hard one)
* This is equation 14 from "Jimmy4: Multiparton Interactions in HERWIG for the LHC"
*/
Eikonalization(tcMPIHPtr handler, int option, CrossSection hard,
CrossSection soft=0*millibarn, Energy2 softMu2=ZERO)
: theHandler(handler), theoption(option), hardXSec_(hard),
softXSec_(soft), softMu2_(softMu2) {}
/**
* Get the function value
*/
Length operator ()(Length argument) const;
private:
/**
* Pointer to the Handler that calls this integrand
*/
tcMPIHPtr theHandler;
/**
* A flag to switch between the calculation of total and inelastic cross section
* or calculations for the individual probabilities. See the constructor
*/
int theoption;
/**
* The hard cross section to be eikonalized
*/
CrossSection hardXSec_;
/**
* The soft cross section to be eikonalized. Default is zero
*/
CrossSection softXSec_;
/**
* The inv radius^2 of the soft interactions.
*/
Energy2 softMu2_;
};
}
#endif /* HERWIG_MPIHandler_H */
diff --git a/UnderlyingEvent/MPISampler.h b/UnderlyingEvent/MPISampler.h
--- a/UnderlyingEvent/MPISampler.h
+++ b/UnderlyingEvent/MPISampler.h
@@ -1,382 +1,382 @@
// -*- C++ -*-
//
// MPISampler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MPISampler_H
#define Herwig_MPISampler_H
// This is the declaration of the MPISampler class.
#include "ThePEG/Handlers/SamplerBase.h"
#include "ThePEG/ACDC/ACDCGen.h"
#include "ThePEG/Repository/RandomGenerator.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Utilities/SimplePhaseSpace.xh"
#include "MPISampler.fh"
#include "ProcessHandler.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class inherits from SampleBase and implements
* the Auto Compensating Divide-and-Conquer phase space generator,
* ACDCGen. In contrast to a ThePEG::ACDCSampler, this
* class can be called by ProcessHandler.
*
* @see \ref MPISamplerInterfaces "The interfaces"
* defined for MPISampler.
* @see ACDCGen
* @see ProcessHandler
*/
class MPISampler: public SamplerBase {
public:
/** Typedef the underlying ACDCGen class. */
typedef ACDCGenerator::ACDCGen<UseRandom,tProHdlPtr> SamplerType;
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
inline MPISampler();
/**
* The copy constructor.
*/
inline MPISampler(const MPISampler &);
/**
* The destructor.
*/
virtual ~MPISampler();
//@}
public:
/** @name Virtual functions needed for SamplerBase */
//@{
/**
* Method to set the connected ProcessHandler pointer
*
*/
inline void setProcessHandler(tProHdlPtr mpih);
/**
* Initialize the sampler, possibly doing presampling of the
* phase space.
*/
virtual void initialize();
/**
* Generarate a new phase space point and return a weight associated
* with it. This weight should preferably be 1.
*/
virtual double generate();
/**
* ACDCSampler is able to sample several different functions
* separately. This function returns the last chosen
* function.
*/
virtual int lastBin() const;
/**
* Reject the last chosen phase space point.
*/
virtual void rejectLast();
/**
* Return the total integrated cross section determined from the
* Monte Carlo sampling so far.
*/
virtual CrossSection integratedXSec() const;
/**
* Return the error on the total integrated cross section determined
* from the Monte Carlo sampling so far.
*/
virtual CrossSection integratedXSecErr() const;
/**
* Return the overestimated integrated cross section.
*/
virtual CrossSection maxXSec() const;
/**
* Return the sum of the weights returned by generate() so far (of
* the events that were not rejeted).
*/
virtual double sumWeights() const;
/**
* Return the sum of the weights squared returned by generate() so far (of
* the events that were not rejeted).
*/
virtual double sumWeights2() const;
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const;
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Check sanity of the object during the setup phase.
*/
inline virtual void doupdate();
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
inline virtual void doinit();
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
/**
* Rebind pointer to other Interfaced objects. Called in the setup phase
* after all objects used in an EventGenerator has been cloned so that
* the pointers will refer to the cloned objects afterwards.
* @param trans a TranslationMap relating the original objects to
* their respective clones.
* @throws RebindException if no cloned object was found for a given pointer.
*/
inline virtual void rebind(const TranslationMap & trans)
;
/**
* Return a vector of all pointers to Interfaced objects used in this object.
* @return a vector of pointers.
*/
inline virtual IVector getReferences();
//@}
private:
/**
* The actual sampler object.
*/
SamplerType theSampler;
/**
* The ProcessHandler that calls us
*/
tProHdlPtr theProcessHandler;
/**
* The smallest possible division allowed.
*/
double theEps;
/**
* The factor controlling the loss of efficiency when compensating.
*/
double theMargin;
/**
* The number of points to use to find initial average.
*/
int theNTry;
protected:
/** @cond EXCEPTIONCLASSES */
/** Exception class used by ACDCSampler if the undelying ACDCGen was
still in a compensating mode when the run was finished */
struct ACDCStillCompensating: public Exception {};
/** Exception class used by ACDCSampler if a EventHandler
was not able to produce a non-zero cross section. */
struct EventInitNoXSec: public Exception {};
/** Exception class used if ACDCSampler was not able to produce a
phase space point within the maximum allowed number of
attempts. */
struct EventLoopException: public Exception {};
/** @endcond */
private:
/**
* Private and non-existent assignment operator.
*/
- MPISampler & operator=(const MPISampler &);
+ MPISampler & operator=(const MPISampler &) = delete;
};
}
namespace ACDCGenerator {
/** @cond TRAITSPECIALIZATIONS */
/** Specialized Traits class to define the interface to the
* EventHandler object to be sampled by ACDCGen.
*/
template <>
struct ACDCFncTraits<Herwig::tProHdlPtr>: public ACDCTraitsType {
/** Convenient typdef. */
typedef Herwig::tProHdlPtr tProHdlPtr;
/**
* Call a function to be sampled by ACDCGen.
* @return <code>(*f)(x)</code>.
*/
static inline double value(const tProHdlPtr & mpih, const DVector & x) {
using namespace ThePEG::Units;
try {
return mpih->dSigDR(x)/nanobarn;
}
catch ( ThePEG::ImpossibleKinematics & v ) {
breakThePEG();
}
catch ( std::exception & e ) {
breakThePEG();
}
catch ( ... ) {
breakThePEG();
}
return 0.0;
}
};
/** Specialized Traits class to inform ACDCGen how to use the
static UseRandom class. */
template <>
struct ACDCRandomTraits<ThePEG::UseRandom>: public ACDCTraitsType {
/** Convenient typedef. */
typedef ThePEG::UseRandom UseRandom;
/**
* Return a flat random number in the interval ]0,1[.
*/
static inline double rnd(UseRandom *) { return UseRandom::rnd(); }
/**
* Return a flat random number in the interval ]\a xl,\a xu[.
*/
static inline double rnd(UseRandom * r, double xl, double xu) {
return xl + (xu - xl)*rnd(r);
}
/**
* Generate a set of random numbers.
* @param r the random generator.
* @param l an input iterator giving the lower limit of the interval
* of the first requested random number.
* @param lend an input iterator marking the end of the range of
* requested random numbers.
* @param u an input iterator giving the upper limit of the interval
* of the first requested random number.
* @param res the ouput iterator used to output the random numbers.
*/
template <typename InputIterator, typename OutputIterator>
static inline void rnd(UseRandom * r,
InputIterator l, InputIterator lend,
InputIterator u, OutputIterator res) {
for ( ; l != lend; ++l ) *res++ = *l + (*u++ - *l)*rnd(r);
}
/**
* Generate \a D random numbers. The numbers are put into the
* OutputIterator \a res.
*/
template <typename OutputIterator>
static inline void rnd(UseRandom * r, int D, OutputIterator res) {
for ( int d = 0; d < D; ++d ) *res++ = rnd(r);
}
/**
* Return true with probability \a x.
*/
static inline bool rndBool(UseRandom, double x) {
return UseRandom::rndbool(x);
}
/**
* Return true with probability \a x(\a x + \a y).
*/
static inline bool rndBool(UseRandom *, double x, double y) {
return UseRandom::rndbool(x, y);
}
/**
* Return a random integer in the interval [0,\a x[.
*/
static inline long rndInt(UseRandom *, long x) {
return UseRandom::irnd(x);
}
};
/** @endcond */
}
#include "MPISampler.icc"
#endif /* Herwig_MPISampler_H */
diff --git a/UnderlyingEvent/MPIXSecReweighter.h b/UnderlyingEvent/MPIXSecReweighter.h
--- a/UnderlyingEvent/MPIXSecReweighter.h
+++ b/UnderlyingEvent/MPIXSecReweighter.h
@@ -1,133 +1,133 @@
// -*- C++ -*-
//
// MPIXSecReweighter.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MPIXSecReweighter_H
#define Herwig_MPIXSecReweighter_H
//
// This is the declaration of the MPIXSecReweighter class.
//
#include "ThePEG/Handlers/StepHandler.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup UnderlyingEvent
*
* \brief MPIXSecReweighter sets up the proper minimum bias cross
* section.
*
*/
class MPIXSecReweighter: public StepHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MPIXSecReweighter();
/**
* The destructor.
*/
virtual ~MPIXSecReweighter();
//@}
public:
/** @name Virtual functions required by the StepHandler class. */
//@{
/**
* The main function called by the EventHandler class to
* perform a step. Given the current state of an Event, this function
* performs the event generation step and includes the result in a new
* Step object int the Event record.
* @param eh the EventHandler in charge of the Event generation.
* @param tagged if not empty these are the only particles which should
* be considered by the StepHandler.
* @param hint a Hint object with possible information from previously
* performed steps.
* @throws Veto if the StepHandler requires the current step to be discarded.
* @throws Stop if the generation of the current Event should be stopped
* after this call.
* @throws Exception if something goes wrong.
*/
virtual void handle(EventHandler & eh, const tPVector & tagged,
const Hint & hint);
//@}
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- MPIXSecReweighter & operator=(const MPIXSecReweighter &);
+ MPIXSecReweighter & operator=(const MPIXSecReweighter &) = delete;
/**
* The sum of weights currently accumulated.
*/
double sumWeights;
/**
* The integrated (ME) cross section currently accumulated.
*/
CrossSection xSec;
};
}
#endif /* Herwig_MPIXSecReweighter_H */
diff --git a/UnderlyingEvent/Makefile.am b/UnderlyingEvent/Makefile.am
--- a/UnderlyingEvent/Makefile.am
+++ b/UnderlyingEvent/Makefile.am
@@ -1,11 +1,11 @@
pkglib_LTLIBRARIES = HwMPI.la
HwMPI_la_SOURCES = MPISampler.cc MPISampler.h MPISampler.icc \
MPISampler.fh MPIHandler.cc \
MPIHandler.fh MPIHandler.h \
ProcessHandler.cc ProcessHandler.icc \
ProcessHandler.fh ProcessHandler.h \
MPIXSecReweighter.h MPIXSecReweighter.cc \
stat.h
-HwMPI_la_LDFLAGS= $(AM_LDFLAGS) -module -version-info 14:0:0
+HwMPI_la_LDFLAGS= $(AM_LDFLAGS) -module -version-info 15:0:0
HwMPI_la_LIBADD= $(GSLLIBS)
HwMPI_la_CPPFLAGS= $(AM_CPPFLAGS) $(GSLINCLUDE)
diff --git a/UnderlyingEvent/ProcessHandler.h b/UnderlyingEvent/ProcessHandler.h
--- a/UnderlyingEvent/ProcessHandler.h
+++ b/UnderlyingEvent/ProcessHandler.h
@@ -1,422 +1,422 @@
// -*- C++ -*-
//
// ProcessHandler.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_ProcessHandler_H
#define HERWIG_ProcessHandler_H
//
// This is the declaration of the ProcessHandler class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "ThePEG/Handlers/StandardEventHandler.h"
#include "ThePEG/Handlers/StandardXComb.h"
#include "ThePEG/Handlers/SubProcessHandler.h"
#include "ThePEG/Handlers/LuminosityFunction.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Handlers/SamplerBase.h"
#include "ThePEG/Cuts/Cuts.h"
#include "ThePEG/MatrixElement/MEBase.h"
#include "ThePEG/Handlers/CascadeHandler.h"
#include <cassert>
#include "ProcessHandler.fh"
#include "stat.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup UnderlyingEvent
* \class ProcessHandler
* This class is for handling the sampling of
* semi hard partonic interactions. If several types of partonic interactions
* are needed. Each of them has it's own ProcessHandler. A reference to them is
* stored in MPIHandler, which administers everything.
*
* \author Manuel B\"ahr
*
* @see \ref ProcessHandlerInterfaces "The interfaces"
* defined for ProcessHandler.
* @see MPISampler
* @see MPIHandler
*/
class ProcessHandler: public Interfaced, public LastXCombInfo<> {
public:
/** A weighted list of pointers to StandardXComb objects. */
typedef Selector<StdXCombPtr> XSelector;
/** A vector of pointers to StandardXComb objects. */
typedef vector<StdXCombPtr> XVector;
/** A vector of cross sections. */
typedef vector<CrossSection> XSVector;
/** Map of pointers to StandardXComb objects indexed by pointers to
* the corresponding MEBase object. */
typedef map<tMEPtr,XVector> MEXMap;
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
ProcessHandler();
/**
* The copy constructor.
*/
ProcessHandler(const ProcessHandler &);
/**
* The destructor.
*/
virtual ~ProcessHandler();
//@}
public:
/** @name Methods for the MPI generation. */
//@{
/**
* Select a StandardXComb according to it's weight
* @return that StandardXComb Object
*/
inline tStdXCombPtr generate();
//@}
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Initialize this Multiple Interaction handler and all related objects needed to
* generate additional events.
*/
void initialize(tSubHdlPtr sub, tCutsPtr cuts, tEHPtr eh);
/**
* Return the integrated cross section.
*/
CrossSection integratedXSec() const;
/**
* Write out accumulated statistics about intergrated cross sections
* and stuff.
*/
void statistics(ostream &, Stat &) const;
/** @name Functions used for the actual generation */
//@{
/**
* Return the cross section for the chosen phase space point.
* @param r a vector of random numbers to be used in the generation
* of a phase space point.
*/
virtual CrossSection dSigDR(const vector<double> & r);
/** @name Simple access functions. */
//@{
/**
* The level of statistics. Controlls the amount of statistics
* written out after each run to the <code>EventGenerator</code>s
* <code>.out</code> file. Simply the EventHandler method is called here.
*/
inline int statLevel() const;
/**
* The pair of incoming particle types obtained via the EventHandler
*/
inline const cPDPair & incoming() const;
/**
* Access the luminosity function via the EventHandler.
*/
inline const LuminosityFunction & lumiFn() const;
/**
* The number of phase space dimensions used by the luminosity
* function. Calls the corresponding StandardEventHandler method.
*/
inline int lumiDim() const;
/**
* Return the number of separate bins of StandardXComb objects to
* sample.
*/
int nBins() const;
/**
* Return the number of phase space dimensions needed for the
* sampling of indicated bin of StandardXComb objects.
*/
inline int maxDim(int bin) const;
/**
* The number of dimensions of the basic phase space to generate
* sub-processes in for a given bin of StandardXComb objects.
*/
inline int nDim(int bin) const;
/**
* Return the maximum number attemts allowed to select a sub-process
* for each event. Calls the corresponding StandardEventHandler method.
*/
inline long maxLoop() const;
protected:
/**
* Generate a phase space point and return the corresponding cross
* section. Is called from sSigDR(const vector<double> &).
* @param ll a pair of doubles giving the logarithms of the (inverse
* energy fractions of the maximum CMS energy of the incoming
* particles.
* @param maxS the maximum squared CMS energy of the incoming particles.
* @param ibin the preselected bin of StandardXComb objects to choose
* sub-process from
* @param nr the number of random numbers availiable in \a r.
* @param r an array of random numbers to be used to generate a
* phase-space point.
*/
virtual CrossSection dSigDR(const pair<double,double> ll, Energy2 maxS,
int ibin, int nr, const double * r);
/**
* Select an StandardXComb. Given a preselected bin, \a ibin of
* StandardXComb objects pick one to generate the corresponding
* sub-process with the given \a weight.
*/
tStdXCombPtr select(int bin, double weight);
/**
* Create and add <code>StandardXComb</code> objects.
*
* @param maxEnergy the maximum CMS energy of the incoming particles.
* @param sub a pointer to the SubProcessHandler object.
* @param extractor a pointer to the PartonExtractor object.
* @param cuts a pointer to the Cuts object.
* @param ckkw a currently empty pointer to a CascadeHandler to be used for CKKW reweighting.
* @param me a pointer to the MEBase object.
* @param pBins a pair of <code>PartonBin</code>s describing the
* partons extracted from the particles
*/
void addME(Energy maxEnergy, tSubHdlPtr sub, tPExtrPtr extractor, tCutsPtr cuts,
tCascHdlPtr ckkw, tMEPtr me, const PBPair & pBins);
/**
* Return the vector of StandardXComb objects.
*/
inline const XVector & xCombs() const;
/**
* Return the vector of StandardXComb objects.
*/
inline XVector & xCombs();
/**
* Return the vector of cross sections.
*/
inline const XSVector & xSecs() const;
/**
* Return the vector of cross sections.
*/
inline XSVector & xSecs();
/**
* Return the strategy to be used when sampling different StandardXComb
* objects.
* @return 0 if all StandardXComb objects are sampled together. 1 if
* all StandardXComb objects which have the same matrix element object are
* sampled together. 2 if all StandardXComb objects are sampled separately.
*/
inline int binStrategy() const;
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const;
//@}
private:
/**
* Return the ThePEG::EventHandler assigned to this handler.
* This methods shadows ThePEG::StepHandler::eventHandler(), because
* it is not virtual in ThePEG::StepHandler. This is ok, because this
* method would give a null-pointer at some stages, whereas this method
* gives access to the explicitely copied pointer (in doinitrun())
* to the ThePEG::EventHandler.
*/
inline tEHPtr eventHandler() const;
/**
* Return the sampler assigned to this handler.
*/
inline tSamplerPtr sampler();
/**
* Return the sampler assigned to this handler.
*/
inline tcSamplerPtr sampler() const;
/**
* Return a reference to the Cuts of this
* MultipleInteractionHandler. Note that these cuts may be overridden by the
* SubProcess chosen.
*/
inline tCutsPtr cuts() const;
/**
* Access the sub-process handler.
*/
inline tSubHdlPtr subProcess();
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object. Called in the run phase just before
* a run begins.
*/
virtual void doinitrun();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- ProcessHandler & operator=(const ProcessHandler &);
+ ProcessHandler & operator=(const ProcessHandler &) = delete;
/**
* The phase space sampler responsible for generating phase space
* points according to the cross section given by this handler.
*/
SamplerPtr theSampler;
/**
* A pointer to the EventHandler that calls us. Has to be saved, because the
* method eventHandler() inherited from ThePEG::StepHandler returns a null-pointer
* sometimes. Leif changed that in r1053 so that a valid pointer is present, when
* calling doinitrun().
*/
tEHPtr theHandler;
/**
* The kinematical cuts used for this collision handler.
*/
tCutsPtr theCuts;//used a transient pointer,
//because regular pointer is already in MPIHandler
/**
* The SubProcessHandler that is connected to this ProcessHandler.
*/
tSubHdlPtr theSubProcess;//used a transient pointer,
//because regular pointer is already in MPIHandler
/**
* The StandardXComb objects.
*/
XVector theXCombs;
/**
* The (incrementally summed) cross sections associated with the
* StandardXComb objects for the last selected phase space point.
*/
XSVector theXSecs;
/**
* The strategy to be used when sampling different StandardXComb
* objects. 0 means all StandardXComb objects are sampled
* together. 1 means all StandardXComb objects which have the same
* matrix element object are sampled together. 2 means all
* StandardXComb objects are sampled separately.
*/
int theBinStrategy;
/**
* The map used to store all XBins with the same matrix element for
* option 1 in theBinStrategy.
*/
MEXMap theMEXMap;
/**
* The number of degrees of freedom needed to generate the phase
* space for the different bins.
*/
vector<int> theMaxDims;
protected:
/** @cond EXCEPTIONCLASSES */
/**
* Exception class used by the MultipleInteractionHandler, when something
* during initialization went wrong.
* \todo understand!!!
*/
class InitError: public Exception {};
/** @endcond */
};
}
#include "ProcessHandler.icc"
#endif /* HERWIG_ProcessHandler_H */
diff --git a/Utilities/GSLBisection.h b/Utilities/GSLBisection.h
--- a/Utilities/GSLBisection.h
+++ b/Utilities/GSLBisection.h
@@ -1,132 +1,132 @@
// -*- C++ -*-
//
// GSLBisection.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GSLBisection_H
#define HERWIG_GSLBisection_H
//
// This is the declaration of the GSLBisection class.
//
#include "ThePEG/Pointer/ReferenceCounted.h"
#include "Herwig/Utilities/GSLHelper.h"
#include <gsl/gsl_errno.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_roots.h>
namespace Herwig {
using namespace ThePEG;
/** \ingroup Utilities
* This class is designed to find the root of a given function between
* 2 limits using bisection methods.
*
* \author Manuel B\"ahr
*
* The function is supplied using a templated class that must define
* operator(argument). The units of the argument ArgType and return type
* ValType must be supplied in the integrand class using a typedef. In
* addition the baseunit should be supplied by static methods vUnit()
* and aUnit() to avoid numerical problems that arise when the centrally
* defined baseunit is several orders of magnitude off the one you
* need. As an example see: <br>
* <code> struct integrand { </code><br>
* <code> ... </code> <BR>
* <code>Energy operator(CrossSection arg) const;</code><BR>
* <code>typedef CrossSection ArgType</code><BR>
* <code>typedef Energy ValType</code><BR>
* <code>static ArgType aUnit(){return 1.*millibarn;} </code> <BR>
* <code>static ValType vUnit(){return 1.*MeV;} </code> <BR>
* <code> ... </code> <BR>
* <code>}</code> <BR>
* This can be facilitated by deriving from the GSLHelper struct. Which
* implents the vUnit() and aUnit() methods using the baseunit static
* method. Also the typedefs are written there.
*/
class GSLBisection : public Pointer::ReferenceCounted {
public:
/**
* Struct that is used to throw and catch GSL errors
*/
struct GSLerror {};
/**
* Struct that is used to throw and catch GSL errors
*/
struct IntervalError {};
/** @name Standard constructors and destructors. */
//@{
/**
* Default Constructor
*/
GSLBisection() : abserr_(0), relerr_(1.E-8), maxPoints_(100) {}
/**
* Specify all the parameters.
* @param abserr Absolute error.
* @param relerr Relative error.
* @param max Maximum number of intervals
*/
inline GSLBisection(double abserr, double relerr, int max) :
abserr_(abserr), relerr_(relerr), maxPoints_(max) {}
//@}
/**
* Function to overwrite the default GSL error handling
*/
static void GSLsubstHandler(const char *, const char *,
int, int){
throw GSLerror();
}
/**
* The result of the root finding.
* @param function The integrand class that defines operator()
* @param lower The lower limit of integration.
* @param upper The upper limit of integration.
*/
template <class T>
inline typename T::ArgType value(const T & function,
const typename T::ArgType lower,
const typename T::ArgType upper) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GSLBisection & operator=(const GSLBisection &);
+ GSLBisection & operator=(const GSLBisection &) = delete;
private:
/**
* The parameters controlling the absolute error.
*/
double abserr_;
/**
* The parameters controlling the relatve error.
*/
double relerr_;
/**
* The maximum number of evaluations to use.
*/
int maxPoints_;
};
}
#include "GSLBisection.tcc"
#endif /* HERWIG_GSLBisection_H */
diff --git a/Utilities/GSLHelper.h b/Utilities/GSLHelper.h
--- a/Utilities/GSLHelper.h
+++ b/Utilities/GSLHelper.h
@@ -1,89 +1,89 @@
// -*- C++ -*-
//
// GSLHelper.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GSLHelper_H
#define HERWIG_GSLHelper_H
//
// This is the declaration of the GSLHelper class.
//
namespace Herwig {
using namespace ThePEG;
/** \ingroup Utilities This class can be used to inherit data structures
* from, which can then be used by the GSL algorithms that need a
* pointer to a function and don't know about Units. This class defines
* the necessary typedefs and forces you to define the "()" operator. In
* addition it implements the vUnit and aUnit static methods which can
* be overwritten if the corresponding base unit is too far from the
* actual used unit. This removes the numerical problem that arises once
* the base unit is several orders of magnitude away from the used unit.
*/
template <typename V, typename T>
struct GSLHelper
{
public:
/**
* Constructor
*/
GSLHelper() {}
/**
* Destructor
*/
virtual ~GSLHelper() {}
/**
* Typedef for Agrument type
*/
typedef T ArgType;
/**
* Typedef for Value type
*/
typedef V ValType;
/**
* Value type
*/
virtual V vUnit() const {return TypeTraits<V>::baseunit();}
/**
* Agrument type
*/
virtual T aUnit() const {return TypeTraits<T>::baseunit();}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GSLHelper & operator=(const GSLHelper &);
+ GSLHelper & operator=(const GSLHelper &) = delete;
};
}
namespace {
template <class T> struct GSLparam {
//The function to find root for
const T & function;
};
}
#endif /* HERWIG_GSLHelper_H */
diff --git a/Utilities/GSLIntegrator.h b/Utilities/GSLIntegrator.h
--- a/Utilities/GSLIntegrator.h
+++ b/Utilities/GSLIntegrator.h
@@ -1,122 +1,122 @@
// -*- C++ -*-
//
// GSLIntegrator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GSLIntegrator_H
#define HERWIG_GSLIntegrator_H
//
// This is the declaration of the GSLIntegrator class.
//
#include "ThePEG/Pointer/ReferenceCounted.h"
#include "ThePEG/Repository/CurrentGenerator.h"
#include "gsl/gsl_integration.h"
#include "gsl/gsl_errno.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Utilities
* This class is designed to integrate a given function between
* 2 limits using the gsl QAGS integration subroutine.
*
* The function is supplied using a templated class that must define
* operator(argument). The units of the argument ArgType and return
* type ValType must be supplied in the integrand class using a typedef
* i.e. <br>
* <code> struct integrand { </code><br>
* <code> ... </code> <BR>
* <code>Energy operator(double arg) const;</code><BR>
* <code>typedef double ArgType</code><BR>
* <code>typedef Energy ValType</code><BR>
* <code> ... </code> <BR>
* <code>}</code> <BR>
*/
class GSLIntegrator : public Pointer::ReferenceCounted {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default Constructor uses values in GSL manual as parameters
**/
GSLIntegrator() : _abserr(1.0E-35), _relerr(1.0E-3), _nbins(1000) {}
/**
* Specify all the parameters.
* @param abserr Absolute error.
* @param relerr Relative error.
* @param nbins Number of bins
*/
GSLIntegrator(double abserr, double relerr, int nbins) :
_abserr(abserr), _relerr(relerr), _nbins(nbins) {}
//@}
/// helper type for the integration result
template <class T>
using ValT = decltype(std::declval<typename T::ValType>()
* std::declval<typename T::ArgType>());
/**
* The value of the integral
* @param function The integrand class that defines operator()
* @param lower The lower limit of integration.
* @param upper The upper limit of integration.
*/
template <class T>
inline ValT<T>
value(const T & function,
const typename T::ArgType lower,
const typename T::ArgType upper) const;
/**
* The value of the integral
* @param function The integrand class that defines operator()
* @param lower The lower limit of integration.
* @param upper The upper limit of integration.
* @param error Returns the estimated error of the integral
*/
template <class T>
inline ValT<T>
value(const T & function,
const typename T::ArgType lower,
const typename T::ArgType upper,
ValT<T> & error) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GSLIntegrator & operator=(const GSLIntegrator &);
+ GSLIntegrator & operator=(const GSLIntegrator &) = delete;
private:
/**
* The parameters controlling the absolute error.
*/
double _abserr;
/**
* The parameters controlling the relative error.
*/
double _relerr;
/**
* The maximum number of intervals to use.
*/
int _nbins;
};
}
#include "GSLIntegrator.tcc"
#endif /* HERWIG_GSLIntegrator_H */
diff --git a/Utilities/GaussianIntegrator.h b/Utilities/GaussianIntegrator.h
--- a/Utilities/GaussianIntegrator.h
+++ b/Utilities/GaussianIntegrator.h
@@ -1,132 +1,132 @@
// -*- C++ -*-
//
// GaussianIntegrator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_GaussianIntegrator_H
#define HERWIG_GaussianIntegrator_H
//
// This is the declaration of the GaussianIntegrator class.
//
#include "ThePEG/Pointer/ReferenceCounted.h"
#include "ThePEG/Repository/CurrentGenerator.h"
#include <vector>
namespace Herwig {
using namespace ThePEG;
/** \ingroup Utilities
* \author Peter Richardson
* This class is designed to perform the integral of a function
* using Gaussian quadrature.The method is adaptive based on using 6th,12th,
* 24th,48th, or 96th order Gaussian quadrature combined with
* subdivision of the integral if this is insufficient.
*
* The class is templated on a simple class which should provide a
* T::operator () (double) const which provides the integrand for the function.
*/
class GaussianIntegrator : public Pointer::ReferenceCounted {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Default Constructor
*/
GaussianIntegrator()
: _abserr(1.E-35), _relerr(5.E-5), _binwidth(1.E-5),
_maxint(100), _maxeval(100000) {
// setup the weights and abscissae
Init();
}
/**
* Specify all the parameters.
* @param abserr Absolute error.
* @param relerr Relative error.
* @param binwidth Width of the bin as a fraction of the integration region.
* @param maxint Maximum number of intervals
* @param maxeval Maximum number of function evaluations
*/
GaussianIntegrator(double abserr, double relerr, double binwidth,
int maxint, int maxeval)
: _abserr(abserr), _relerr(relerr),
_binwidth(binwidth), _maxint(maxint),
_maxeval(maxeval) {
// setup the weights and abscissae
Init();
}
/// helper type for the integration result
template <class T>
using ValT = decltype(std::declval<typename T::ValType>()
* std::declval<typename T::ArgType>());
/**
* The value of the integral
* @param lower The lower limit of integration.
* @param upper The upper limit of integration.
*/
template <class T>
inline ValT<T> value(const T &,
const typename T::ArgType lower,
const typename T::ArgType upper) const;
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- GaussianIntegrator & operator=(const GaussianIntegrator &);
+ GaussianIntegrator & operator=(const GaussianIntegrator &) = delete;
/**
* Initialise the weights and abscissae.
*/
void Init();
private:
/**
* The weights for the gaussian quadrature.
*/
std::vector< std::vector<double> > _weights;
/**
* The abscissae.
*/
std::vector< std::vector <double> > _abscissae;
/**
* The parameters controlling the error.
*/
double _abserr,_relerr;
/**
* The minimum width of a bin as a fraction of the integration region.
*/
double _binwidth;
/**
* Maximum number of bins.
*/
int _maxint;
/**
* Maximum number of function evaluations.
*/
int _maxeval;
};
}
#include "GaussianIntegrator.tcc"
#endif /* HERWIG_GaussianIntegrator_H */
diff --git a/Utilities/HerwigStrategy.h b/Utilities/HerwigStrategy.h
--- a/Utilities/HerwigStrategy.h
+++ b/Utilities/HerwigStrategy.h
@@ -1,75 +1,75 @@
// -*- C++ -*-
//
// HerwigStrategy.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2008-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_HerwigStrategy_H
#define Herwig_HerwigStrategy_H
// This is the declaration of the HerwigStrategy class.
#include "ThePEG/Repository/Strategy.h"
#include <string>
namespace Herwig {
using namespace ThePEG;
/**
* The HerwigStrategy class is a sub-class of the Strategy class,
* simply implementing the correct citation for Herwig in the
* ClassDocumentation interface.
*
* @see Strategy
*
*/
class HerwigStrategy: public ThePEG::Strategy {
public:
/**
* Standard Init function used to initialize the interface.
*/
static void Init();
/**
* Freeform version string
*/
static const std::string version;
/**
* Version string
*/
virtual const std::string versionstring() const;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* Private and non-existent assignment operator.
*/
- HerwigStrategy & operator=(const HerwigStrategy &);
+ HerwigStrategy & operator=(const HerwigStrategy &) = delete;
};
}
#endif /* Herwig_HerwigStrategy_H */
diff --git a/Utilities/Histogram.h b/Utilities/Histogram.h
--- a/Utilities/Histogram.h
+++ b/Utilities/Histogram.h
@@ -1,407 +1,407 @@
// -*- C++ -*-
//
// Histogram.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_Histogram_H
#define HERWIG_Histogram_H
//
// This is the declaration of the Histogram class.
//
#include "Histogram.fh"
#include "ThePEG/Interface/Interfaced.h"
#include "Statistic.h"
#include <string>
namespace Herwig {
using namespace ThePEG;
/**
* Options for histogram output.
* They can be combined using the '|' operator, e.g. 'Frame | Ylog'
*/
namespace HistogramOptions {
const unsigned int None = 0; /**< No options */
const unsigned int Frame = 1; /**< Plot on new frame */
const unsigned int Errorbars = 1 << 1; /**< Plot error bars */
const unsigned int Xlog = 1 << 2; /**< log scale for x-axis */
const unsigned int Ylog = 1 << 3; /**< log scale for y-axis */
const unsigned int Smooth = 1 << 4; /**< smooth the line */
const unsigned int Rawcount = 1 << 5; /**< don't normalize to unit area */
}
/**
* The Histogram class is a simple histogram for the Analysis handlers.
*
* @see \ref HistogramInterfaces "The interfaces"
* defined for Histogram.
*/
class Histogram: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
* @param lower The lower limit of the histogram
* @param upper The upper limit of the histogram
* @param nbin Number of bins
*/
Histogram(double lower=0., double upper=0., unsigned int nbin=0)
: _globalStats(), _havedata(false), _bins(nbin+2),_prefactor(1.),_total(0.) {
if (upper<lower) swap(upper,lower);
_bins[0].limit=-1.e100;
double limit(lower);
double width((upper-lower)/nbin);
for(unsigned int ix=1; ix <= nbin; ++ix) {
_bins[ix].limit=limit;
limit += width;
}
_bins.back().limit=limit;
}
/**
* Constructor for variable width bins
* @param limits The lower limits for the bins followed by the upper limit of the last bin
*/
Histogram(vector<double> limits)
: _globalStats(), _havedata(false), _bins(limits.size()+1), _prefactor(1.),_total(0.) {
_bins[0].limit=-1.e100;
for (size_t i=1; i<=limits.size(); ++i)
_bins[i].limit=limits[i-1];
}
/**
* Constructor with data included
* @param limits The lower limits for the bins followed by the upper limit of the last bin
* @param data The data
* @param dataerror The errors on the data
*/
Histogram(vector<double> limits, vector<double> data, vector<double> dataerror)
: _globalStats(), _havedata(true), _bins(limits.size()+1), _prefactor(1.),_total(0.) {
_bins[0].limit=-1.e100;
for (size_t i=1; i<=limits.size(); ++i)
_bins[i].limit=limits[i-1];
// no data goes into _bins[0] or _bins.back()!
for (size_t i=1; i<=min(limits.size()-1,data.size()); ++i)
_bins[i].data=data[i-1];
for (size_t i=1; i<=min(limits.size()-1,dataerror.size()); ++i)
_bins[i].dataerror=dataerror[i-1];
}
//@}
public:
/**
* Operator to add a point to the histogrma with unit weight
*/
void operator += (double input) {
addWeighted(input,1.0);
}
/**
* Function to add a weighted point to the histogram
*/
void addWeighted(double input, double weight) {
if(std::isnan(input)) return;
unsigned int ibin;
for(ibin=1; ibin<_bins.size(); ++ibin) {
if(input<_bins[ibin].limit)
break;
}
_bins[ibin-1].contents += weight;
_bins[ibin-1].contentsSq += sqr(weight);
_globalStats += weight * input;
_total += weight;
}
/**
* Number of bins (not counting the overflow)
*/
unsigned int numberOfBins() const {
return _bins.size()-2;
}
/**
* Get the prefactor
*/
double prefactor() const {
return _prefactor;
}
/**
* Set the prefactor
*/
void prefactor(double in ) {
_prefactor=in;
}
/**
* Access to the statistics on the total entry of the histogram
*/
const Statistic & globalStatistics() const {
return _globalStats;
}
/**
* Normalise the distributions to the data
*/
void normaliseToData();
/**
* Normalise the distributions to the total cross section
*/
void normaliseToCrossSection();
/**
* Return the chi squared
* @param chisq The chi squared
* @param ndegrees The number of points
* @param minfrac The minimum fractional error on the data point
*/
void chiSquared(double & chisq,
unsigned int & ndegrees, double minfrac=0.) const;
/**
* @brief Output as file ready for usage with flat2aida and other Rivet tools
* @param out The output stream
* @param histogramname The histogram name identifying the histogram. Required
* for comparisons (e.g. with rivet-mkhtml or with
* compare-histos)
* @param analysisname The analysis name
* @param title The title for the top of the plot in LaTeX format
* @param xlabel The x label in LaTeX format
* @param ylabel The y label in LaTeX format
* @param rawcount Don't normalise to unit area.
* @param multiplicator Factor the histogram is multiplied with.
* N.B. Experimental data is not output.
*/
void rivetOutput(ostream & out,
string histogramname = string("default"),
string analysisname = string("default"),
string title = string(),
string xlabel = string(),
string ylabel = string(),
bool rawcount = false,
double multiplicator = 1.0) const;
/**
* Output as a topdrawer file. The histogram is normalised to unit area
* @param out The output stream
* @param flags A bitmask of flags from HistogramOptions, e.g. Frame|Ylog
* @param colour The colour for the line
* @param title The title for the top of the plot
* @param titlecase topdraw format for the title
* @param left Left axis lable
* @param leftcase topdraw format for left axis label
* @param bottom Bottom axis lable
* @param bottomcase Bottom axis lable ofr topdraw
* N.B. in td smoothing only works for histograms with uniform binning.
*/
void topdrawOutput(ostream & out,
unsigned int flags = 0,
string colour = string("BLACK"),
string title = string(),
string titlecase = string(),
string left = string(),
string leftcase = string(),
string bottom = string(),
string bottomcase = string()
) const;
void topdrawMCatNLO(ostream & out,
unsigned int flags =0 ,
string colour = string("BLACK"),
string title = string()
) const;
/**
* Output as a topdrawer file. A bin by bin average is taken.
* @param out The output stream
* @param frame output on a new graph
* @param errorbars output data points with error bars
* @param xlog log scale on x axis
* @param ylog log scale on y axis
* @param colour The colour for the line
* @param title The title for the top of the plot
* @param titlecase topdraw format for the title
* @param left Left axis lable
* @param leftcase topdraw format for left axis label
* @param bottom Bottom axis lable
* @param bottomcase Bottom axis lable ofr topdraw
*/
void topdrawOutputAverage(ostream & out,
bool frame,
bool errorbars,
bool xlog, bool ylog,
string colour=string("BLACK"),
string title=string(),
string titlecase =string(),
string left=string(),
string leftcase =string(),
string bottom=string(),
string bottomcase =string()) const;
/**
* get the number of visible entries (all entries without those in the
* under- and overflow bins) in the histogram. This assumes integer
* entries, ie it gives wrong results for weighted histograms.
*/
unsigned int visibleEntries() const;
/**
* Compute the normalisation of the data.
*/
double dataNorm() const;
/**
* Output into a simple ascii file, easily readable by gnuplot.
*/
void simpleOutput(ostream & out, bool errorbars, bool normdata=false);
/**
* Dump bin data into a vector
*/
vector<double> dumpBins() const;
/**
* Returns a new histogram containing bin-by-bin ratios of two histograms
*/
Histogram ratioWith(const Histogram & h2) const;
/**
* @brief Returns limits for bins with exponentially increasing widths.
* For usage with the variable-bin-width Histogram constructor.
* @param xmin Lower limit of the first bin, needs to be > 0
* @param nbins Number of bins
* @param base The base, needs to be > 1
*/
static
vector<double> LogBins(double xmin, unsigned nbins, double base = 10.0);
public:
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const;
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Histogram & operator=(const Histogram &);
+ Histogram & operator=(const Histogram &) = delete;
private:
/**
* Global statistics of all data that went into the histogram.
*/
Statistic _globalStats;
/**
* Set to true if there is experimental data available
*/
bool _havedata;
/**
* One bin of the histogram. limit is the _lower_ bound of the bin.
*/
struct Bin {
/**
* Default constructor
*/
Bin() : contents(0.0), contentsSq(0.0),
limit(0.0), data(0.0), dataerror(0.0), points(0) {}
/**
* Contents of the bin
*/
double contents;
/**
* Contents squared for the error
*/
double contentsSq;
/**
* The limit for the bin
*/
double limit;
/**
* The experimental value for the bin
*/
double data;
/**
* The error on the experimental value for the bin
*/
double dataerror;
/**
* The number of points in the bin
*/
long points;
};
/**
* The histogram bins. _bins[0] is the underflow, _bins.back() the overflow
*/
vector<Bin> _bins;
/**
* Prefactors to multiply the output by
*/
double _prefactor;
/**
* Total entry
*/
double _total;
public:
/**
* The vector of bins
*/
vector<Bin> bins() const { return _bins; }
};
}
#endif /* HERWIG_Histogram_H */
diff --git a/Utilities/Interpolator.h b/Utilities/Interpolator.h
--- a/Utilities/Interpolator.h
+++ b/Utilities/Interpolator.h
@@ -1,249 +1,249 @@
// -*- C++ -*-
//
// Interpolator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_Interpolator_H
#define HERWIG_Interpolator_H
//
// This is the declaration of the Interpolator class.
//
#include "ThePEG/Interface/Interfaced.h"
#include <cassert>
namespace Herwig {
using namespace ThePEG;
/** \ingroup Utilities
* \author Peter Richardson
*
* This class implments a polynominal interpolation of a table of values, it is
* based on the interpolation code in FORTRAN HERWIG.
*
*/
template <typename ValT, typename ArgT>
class Interpolator: public Interfaced {
public:
/**
* Pointer to an Interpolator
*/
typedef typename Ptr<Interpolator<ValT,ArgT> >::pointer Ptr;
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
Interpolator() : _order(3), _copyx(5),_copyfun(5) {}
/**
* Constructor with data as vectors.
*/
Interpolator(const vector<ValT> & f,
const vector<ArgT> & x,
unsigned int order)
: _fun(f.size(),0.0),_xval(x.size(),0.0),_order(order),
_funit(TypeTraits<ValT>::baseunit()),
_xunit(TypeTraits<ArgT>::baseunit()),
_copyx(order+2),_copyfun(order+2) {
assert(_order>0);
assert(x.size() == f.size());
for (size_t i = 0; i < f.size(); ++i) {
_fun [i] = f[i] / _funit;
_xval[i] = x[i] / _xunit;
}
}
/**
* Constructor with data as arrays.
*/
template <size_t N>
Interpolator(const array<ValT,N> & f,
const array<ArgT,N> & x,
unsigned int order)
: _fun(N,0.0),_xval(N,0.0),_order(order),
_funit(TypeTraits<ValT>::baseunit()),
_xunit(TypeTraits<ArgT>::baseunit()),
_copyx(order+2),_copyfun(order+2) {
assert(_order>0);
for (size_t i = 0; i < N; ++i) {
_fun [i] = f[i] / _funit;
_xval[i] = x[i] / _xunit;
}
}
//@}
/**
* Constructor from bare arrays
*/
Interpolator(size_t size,
const double f[], ValT funit,
const double x[], ArgT xunit,
unsigned int order)
: _fun(size,0.0),_xval(size,0.0),_order(order),
_funit(funit),_xunit(xunit), _copyx(order+2),_copyfun(order+2) {
assert(_order>0);
for (size_t i = 0; i < size; ++i) {
_fun [i] = f[i];
_xval[i] = x[i];
}
}
//@}
/**
* Return the interpolated value
*/
ValT operator () (ArgT) const;
/** Return type for GaussianIntegrator */
typedef ValT ValType;
/** Argument type for GaussianIntegrator */
typedef ArgT ArgType;
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
virtual IBPtr clone() const { return new_ptr(*this); }
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
virtual IBPtr fullclone() const { return new_ptr(*this); }
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
- Interpolator & operator=(const Interpolator &);
+ Interpolator & operator=(const Interpolator &) = delete;
private:
/**
* the function values.
*/
vector<double> _fun;
/**
* The x values.
*/
vector<double> _xval;
/**
* the order of interpolation.
*/
unsigned int _order;
/**
* The Unit of the function values
*/
ValT _funit;
/**
* The Unit of the argument values
*/
ArgT _xunit;
/**
* Temporary storage vector
*/
mutable vector<double> _copyx;
/**
* Temporary storage vector
*/
mutable vector<double> _copyfun;
};
/**
* helper function to create InterpolatorPtr easily
* from bare arrays (analogous to make_pair() )
*/
template <typename ValT, typename ArgT>
inline typename Interpolator<ValT,ArgT>::Ptr
make_InterpolatorPtr(size_t size,
const double f[], ValT funit,
const double x[], ArgT xunit,
unsigned int order)
{
return new_ptr(Interpolator<ValT,ArgT>(size,
f,funit,
x,xunit,
order));
}
/**
* helper function to create InterpolatorPtr easily
* from vectors (analogous to make_pair() )
*/
template <typename ValT, typename ArgT>
inline typename Interpolator<ValT,ArgT>::Ptr
make_InterpolatorPtr(const typename std::vector<ValT> & f,
const typename std::vector<ArgT> & x,
unsigned int order)
{
return new_ptr(Interpolator<ValT,ArgT>(f,x,order));
}
/**
* helper function to create InterpolatorPtr easily
* from arrays (analogous to make_pair() )
*/
template <typename ValT, typename ArgT, size_t N>
inline typename Interpolator<ValT,ArgT>::Ptr
make_InterpolatorPtr(const typename std::array<ValT,N> & f,
const typename std::array<ArgT,N> & x,
unsigned int order)
{
return new_ptr(Interpolator<ValT,ArgT>(f,x,order));
}
}
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
#include "Interpolator.tcc"
#endif
#endif /* HERWIG_Interpolator_H */
diff --git a/lib/Makefile.am b/lib/Makefile.am
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,49 +1,49 @@
pkglib_LTLIBRARIES = Herwig.la
Herwig_la_SOURCES =
Herwig_la_LIBTOOLFLAGS = --tag=CXX
-Herwig_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 25:0:0
+Herwig_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 26:0:0
Herwig_la_LDFLAGS += $(THEPEGLDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(FCLIBS)
Herwig_la_LIBADD = \
$(top_builddir)/Hadronization/libHwHadronization.la \
$(top_builddir)/Models/libHwStandardModel.la \
$(top_builddir)/Decay/libHwDecay.la \
$(top_builddir)/Decay/libHwFormFactor.la \
$(top_builddir)/Decay/libHwDecRad.la \
$(top_builddir)/Utilities/libHwUtils.la \
$(top_builddir)/Models/libHwModelGenerator.la \
$(top_builddir)/Decay/General/libHwGeneralDecay.la \
$(top_builddir)/MatrixElement/General/libHwGeneralME.la \
$(top_builddir)/MatrixElement/libHwME.la \
$(top_builddir)/MatrixElement/Reweighters/libHwReweighters.la \
$(top_builddir)/MatrixElement/Matchbox/libHwMatchbox.la \
$(top_builddir)/Decay/libHwWeakCurrent.la \
$(top_builddir)/Looptools/libHwLooptools.la \
$(top_builddir)/Shower/libHwShower.la \
$(THEPEGLIB) -ldl
dist_noinst_SCRIPTS = fix-osx-path
POSTPROCESSING = done-all-links
if NEED_APPLE_FIXES
POSTPROCESSING += apple-fixes
endif
all-local: $(POSTPROCESSING)
done-all-links: Herwig.la
find $(top_builddir) \( -name '*.so.*' -or -name '*.so' \) \
-not -name 'lib*' -not -path '$(top_builddir)/lib/*' \
-not -path '$(top_builddir)/.hg/*' -exec $(LN_S) -f \{\} \;
$(LN_S) -f .libs/Herwig*so* .
echo "stamp" > $@
apple-fixes: fix-osx-path done-all-links
./$<
echo "stamp" > $@
clean-local:
rm -f *.so *.so.* done-all-links apple-fixes
diff --git a/src/defaults/HerwigCleanup.in b/src/defaults/HerwigCleanup.in
deleted file mode 100644
--- a/src/defaults/HerwigCleanup.in
+++ /dev/null
@@ -1,4 +0,0 @@
-# -*- ThePEG-repository -*-
-
-# Clean up all Herwig related directories
-rrmdir /Herwig
diff --git a/src/defaults/Makefile.am b/src/defaults/Makefile.am
--- a/src/defaults/Makefile.am
+++ b/src/defaults/Makefile.am
@@ -1,47 +1,47 @@
BUILT_SOURCES = done-all-links
defaultsdir = ${pkgdatadir}/defaults
INPUTFILES = Analysis.in \
baryon_decays.in baryons.in boson_decays.in \
bosons.in Cuts.in decayers.in \
Decays.in DiffractiveParticles.in diquarks.in \
-Hadronization.in HerwigDefaults.in HerwigCleanup.in \
+Hadronization.in HerwigDefaults.in \
lepton_decays.in leptons.in \
masses.in MatrixElements.in meson_decays.in mesons.in Model.in BSM.in \
Particles.in QEDRadiation.in quark_decays.in quarks.in \
setup.gosam.in Shower.in StandardModelVertices.in UnderlyingEvent.in widths.in Partons.in \
MatchboxDefaults.in DipoleShowerDefaults.in MatchboxLoopInduced.in Samplers.in \
EvtGenDecayer.in EvtGenBDecays.in HerwigBDecays.in MatchboxMergingDefaults.in
dist_defaults_DATA = $(INPUTFILES)
EXTRA_DIST = PDF.in.in
defaults_DATA = PDF.in
CLEANFILES = PDF.in done-all-links
## For an explanation of this magic, see autoconf book 4.7.2
edit = sed -e "s,@HERWIG_PDF_POMERON\@,`cd $(top_srcdir) && pwd`/PDF/diffraction/,"
## may still be broken and need $(DESTDIR)
installnamePOMERON = $(pkgdatadir)/PDF/diffraction/
install-data-hook:
rm -f $(DESTDIR)$(defaultsdir)/PDF.in
sed -e 's,@HERWIG_PDF_POMERON\@,$(installnamePOMERON),' \
$(srcdir)/PDF.in.in > $(DESTDIR)$(defaultsdir)/PDF.in
PDF.in: Makefile $(srcdir)/PDF.in.in
@echo "Updating PDF.in"
@rm -f PDF.in PDF.in.tmp
@$(edit) $(srcdir)/PDF.in.in > PDF.in.tmp
@mv PDF.in.tmp PDF.in
done-all-links: $(INPUTFILES)
@echo "Linking input files"
@for i in $(INPUTFILES); do \
if test -f $(srcdir)/$$i -a ! -e $$i; then \
$(LN_S) -f $(srcdir)/$$i; fi; done
@touch done-all-links
diff --git a/src/snippets/EPCollider.in b/src/snippets/EPCollider.in
--- a/src/snippets/EPCollider.in
+++ b/src/snippets/EPCollider.in
@@ -1,49 +1,49 @@
# -*- ThePEG-repository -*-
cd /Herwig/EventHandlers
create ThePEG::LuminosityFunction Luminosity
set EventHandler:BeamA /Herwig/Particles/e-
set Luminosity:BeamEMaxA 30.*GeV
set EventHandler:BeamB /Herwig/Particles/p+
set Luminosity:BeamEMaxB 920.*GeV
set EventHandler:LuminosityFunction Luminosity
set /Herwig/Shower/ShowerHandler:MPIHandler NULL
set /Herwig/Shower/PowhegShowerHandler:MPIHandler NULL
set /Herwig/DipoleShower/DipoleShowerHandler:MPIHandler NULL
# cuts for DIS
set EventHandler:Cuts:ScaleMin 1.0*GeV2
set EventHandler:Cuts:X1Min 1.0e-5
set EventHandler:Cuts:X2Min 1.0e-5
set EventHandler:Cuts:MHatMin 0.0*GeV
set /Herwig/Cuts/NeutralCurrentCut:MinW2 0
set /Herwig/Cuts/NeutralCurrentCut:MaxW2 1e10
set /Herwig/Cuts/ChargedCurrentCut:MinW2 0
set /Herwig/Cuts/ChargedCurrentCut:MaxW2 1e10
clear EventHandler:Cuts:OneCuts
clear EventHandler:Cuts:TwoCuts
clear EventHandler:Cuts:MultiCuts
insert EventHandler:Cuts:TwoCuts[0] /Herwig/Cuts/NeutralCurrentCut
insert EventHandler:Cuts:TwoCuts[1] /Herwig/Cuts/ChargedCurrentCut
# switch off final-state electron/muon FSR
do /Herwig/Shower/SplittingGenerator:DeleteFinalSplitting e-->e-,gamma; /Herwig/Shower/LtoLGammaSudakov
do /Herwig/Shower/SplittingGenerator:DeleteFinalSplitting mu-->mu-,gamma; /Herwig/Shower/LtoLGammaSudakov
do /Herwig/Shower/SplittingGenerator:DeleteFinalSplitting tau-->tau-,gamma; /Herwig/Shower/LtoLGammaSudakov
set /Herwig/Shower/KinematicsReconstructor:ReconstructionOption Colour
# Matchbox settings
cd /Herwig/MatrixElements/Matchbox
-set Factory:FirstPerturbativePDF Yes
-set Factory:SecondPerturbativePDF No
+set Factory:FirstPerturbativePDF No
+set Factory:SecondPerturbativePDF Yes
set Factory:PartonExtractor /Herwig/Partons/EPExtractor
set /Herwig/Merging/MergingFactory:FirstPerturbativePDF No
set /Herwig/Merging/MergingFactory:SecondPerturbativePDF Yes
set /Herwig/Merging/MergingFactory:PartonExtractor /Herwig/Partons/EPExtractor
# Erase the PDF for the lepton side (the one from Particle Data object is used)
set /Herwig/Shower/ShowerHandler:PDFA NULL
set /Herwig/DipoleShower/DipoleShowerHandler:PDFA NULL
cd /Herwig/Generators/
set /Herwig/MatrixElements/SubProcess:PartonExtractor /Herwig/Partons/EPExtractor

File Metadata

Mime Type
application/octet-stream
Expires
Tue, May 7, 3:48 AM (1 d, 23 h)
Storage Engine
chunks
Storage Format
Chunks
Storage Handle
d0gXbmMb1Vn4
Default Alt Text
(6 MB)

Event Timeline