diff --git a/ACDC/ACDCGen.h b/ACDC/ACDCGen.h --- a/ACDC/ACDCGen.h +++ b/ACDC/ACDCGen.h @@ -1,765 +1,765 @@ // -*- C++ -*- // // ACDCGen.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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 ACDCGen_H #define ACDCGen_H #include #include "ACDCGenConfig.h" #include "ACDCTraits.h" #include "ACDCGenCell.h" #include "ThePEG/Utilities/Exception.h" namespace ACDCGenerator { /** * ACDCGen is a general class for sampling multi-dimensional * functions. ACDCGen can sample several functions simultaneously, * selecting different functions according to the relative * probabilities determined by their total integrals. The functions * are sampled on a unit hypercube. Function object of any class can * be used as long as the ACDCFncTraits class is specialized * correctly. ACDCFncTraits can also be used to rescale values in the * unit hypercube to any desired range. ACDCGen needs a random number * generator. Again, random number generators of any class can be used * as long as the ACDCRandomTraits class is specialized correctly. * * To give an unweighted samlpe ACDCGen uses a compensating * algorithm. Before the production sampling begins, the functions are * sampled randomly in the hypercube a user-defined number of times to * find an approximate maxumum value. The hypercube is then divided * into cells each of which have an approximate maximum value of the * function, to enable efficient sampling. The maxima are only * approximate though and, if a function value is found above the * maximum in a cell the ACDCGen will go into a compensating mode. The * cell is then first subdivided further and in the following this * cell will be over-sampled to compensate for that fact that it was * under-sampled before. In this way the probability of obtaining a * biased sample is reduced. Also rather functions with large peaks * are then sampled rather efficiently. Functions with narrow peaks * should, however, be avoided since there is no guarantee that the * peack is actually hit. */ template class ACDCGen { public: /** Template argument typedef. */ typedef Rnd RndType; /** Template argument typedef. */ typedef ACDCRandomTraits RndTraits; /** Template argument typedef. */ typedef FncPtr FncPtrType; /** A vector of cells. */ typedef vector CellVector; /** A vector of function objects. */ typedef vector FncVector; /** A vector of integers. */ typedef vector DimVector; /** The size type of the vectors used. */ typedef DimVector::size_type size_type; /** Template argument typedef. */ typedef ACDCFncTraits FncTraits; public: /** * Standard constructor requiring a random generator object to be * used. */ inline ACDCGen(Rnd * r); /** * Default Constructor. */ inline ACDCGen(); /** * Destructor. */ inline ~ACDCGen(); /** * Add a function of a given dimension, \a dim, according to which * points will be generated. Note that each function, \a f, added * like this will have its own tree of cells. The \a maxrat argument * determines the lowest ratio of values allowed between the cell * with lowest and highest value. If negative it is given by 1/nTry(). */ inline bool addFunction(DimType dim, FncPtrType f, double maxrat = -1.0); /** * Remove all added functions and reset the generator; */ inline void clear(); public: /** * Generate a point, choosing between the different functions * specified. The chosen function is returned, while the generated * point is obtained by the function lastPoint(). */ inline FncPtrType generate(); /** * Reject the last generated point. Only used in the evaluation of * the total integral. */ inline void reject(); /** * Return the last generated point. * @return a vector of doubles, each in the interval ]0,1[. */ inline const DVector & lastPoint() const; /** * Return the value of the last chosen function in the last point. */ inline double lastF() const; /** * Return the function chosen for the last generated point. */ inline FncPtrType lastFunction() const; /** * return the index of the function chosen for the last generated * point. */ inline size_type last() const; public: /** @name Functions influencing the efficiency of the generation. */ //@{ /** * Set the minimum cell size considered for this generation. The * default is the machine limit for double precision times a * hundred. */ inline void eps(double newEps); /** * Set the safety margin used to multiply the highest found function * value in a cell when setting its overestimated value. (Default is * 1.1.) */ inline void margin(double newMargin); /** * Set the number of points (with non-zero function value) used to * initialize the tree of cells to use in the generation for each * function. */ inline void nTry(size_type newNTry); /** * Set the maximum number of attempts to generate a phase space * point, or to find non-zero points in the initialization. */ inline void maxTry(long); //@} public: /** @name Information about the current generation. */ //@{ /** * Return the current Monte Carlo estimate of the integral of the * specified function (or all functions if NULL) over the unit volume. */ inline double integral(FncPtrType f = FncPtrType()) const; /** * Return the error on the current Monte Carlo estimate of the * integral of the specified function (or all functions if NULL) * over the unit volume. */ inline double integralErr(FncPtrType f = FncPtrType()) const; /** * The number of accepted points so far. */ inline long n() const; /** * The number of calls to generate() so far. Note that the number of * calls to the specified functions may be larger. It is up to the * user to keep track of those. */ inline long N() const; /** * The ratio of the number of accepted and number of tried points * n()/N(); */ inline double efficiency() const; /** * Return the number of active cells created so far. */ inline int nBins() const; /** * Return the maximum depth of any tree of cells used. */ inline int depth() const; /** * Return the current overestimation of the full integral of all * specified functions over the unit volume. */ inline double maxInt() const; //@} /** @name Access to member variables. */ //@{ /** * The minimum cell size considered for this generation. */ inline double eps() const; /** * The safety margin used to multiply the highest found function * value in a cell when setting its overestimated value. */ inline double margin() const; /** * The number of points used to initialize the tree of cells to use * in the generation. */ inline size_type nTry() const; /** * The maximum number of attempts to generate a phase space point, * or to find non-zero points in the initialization. */ inline long maxTry() const; /** * Returns true if generating random numbers are so cheap that a new * one can be thrown everytime a sub-cell is chosen. Otherwise * random numbers used for this will be reused. */ inline bool cheapRandom() const; /** * The number of functions used. */ inline size_type size() const; /** * Returns true if the generator is currently in a state of * compensating an erroneous overestimation of one of the specified * functions. If so, the integral and the generated points are not * statistically correct. */ inline bool compensating(); /** * Return an estimate of how many points need to be sampled before * the generator finishes compensating. */ inline long compleft() const; /** * Return a vector with information about all cells. */ vector extractCellInfo() const; //@} public: /** @name Functions related to the random number generator. */ //@{ /** * Set to true if generating random numbers are so cheap that a new * one can be thrown everytime a sub-cell is chosen. Otherwise * random numbers used for this will be reused. */ inline void cheapRandom(bool b); /** * Set a new random number generator. */ inline void setRnd(Rnd * r); /** * Double precision number in the interval ]0,1[. */ inline double rnd() const; /** * Double precision number in the interval ]lo,up[. */ inline double rnd(double lo, double up) const; /** * Fill the r vector with doubles r[i] in the interval ]lo[i],up[i][. */ inline void rnd(const DVector & lo, const DVector & up, DVector & r)const; /** * Fill the D first elements in the r vector with doubles in the * interval ]0,1[. */ inline void rnd(DimType D, DVector & r) const; /** * Integer in the interval [0,x[ */ inline long rndInt(long x) const; //@} public: /** * This function is to be used in ThePEG for output to * a persistent stream and will not work properly for normal * ostreams. */ template void output(POStream &) const; /** * This function is to be used in ThePEG for input from a persistent * stream and will not work properly for normal istreams. */ template void input(PIStream &); private: /** * Calculate the overestimated integral for all functions. */ inline double doMaxInt(); /** * Return the vector of functions. */ inline const FncVector & functions() const; /** * Return the i'th function. */ inline FncPtrType function(size_type i) const; /** * Return a vector with the dimensions of all functions. */ inline const DimVector & dimensions() const; /** * Return the dimension of the i'th function. */ inline DimType dimension(size_type i) const; /** * Return the dimension of the function chosen for the last * generated point. */ inline DimType lastDimension() const; /** * Return the roots of all cell trees. */ inline const CellVector & cells() const; /** * Return the root cell for the i'th function. */ inline ACDCGenCell * cell(size_type i) const; /** * Return the root cell for the function chosen for the last * generated point. */ inline ACDCGenCell * lastPrimary() const; /** * Return a vector with the incremental sum of overestimated * integrals for each function. */ inline const DVector & sumMaxInts() const; /** * Return the cell chosen for the last generated point. */ inline ACDCGenCell * lastCell() const; /** * Choose a function according to its overestimated integral and * choose a cell to generate a point in. */ inline void chooseCell(DVector & lo, DVector & up); /** * Start the compensation procedure for the last chosen cell when a * function velue has been found which exceeds the previous * overestimation. */ inline void compensate(const DVector & lo, const DVector & up); private: /** * The random number generator to be used for this Generator. */ RndType * theRnd; /** * The number of accepted points (weight > 0) so far. */ long theNAcc; /** * The number of attempted points so far. */ long theN; /** * The number of attempts per function so far. */ vector theNI; /** * The summed weights per function so far. */ DVector theSumW; /** * The summed squared weights per function so far. */ DVector theSumW2; /** * 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. */ size_type theNTry; /** * The maximum number of attempts to generate a phase space point, * or to find non-zero points in the initialization. */ long theMaxTry; /** * True if generating random numbers are so cheap that a new one can * be thrown everytime a sub-cell is chosen. Otherwise random * numbers used for this will be reused. */ bool useCheapRandom; /** * A vector of functions. */ FncVector theFunctions; /** * The dimensions of the functions in theFunctions. */ DimVector theDimensions; /** * The root of the cell tree for the functions in theFunctions. */ CellVector thePrimaryCells; /** * The accumulated sum of overestimated integrals of the functions * in theFunctions. */ DVector theSumMaxInts; /** * The last index chosen */ size_type theLast; /** * The last cell chosen. */ ACDCGenCell * theLastCell; /** * The last point generated. */ DVector theLastPoint; /** * The function value of the last point. */ double theLastF; /** * A helper struct representing a level of compensation. */ struct Level { /** * The number of attempts after which this level disapprears. */ long lastN; /** * The previous max value in the Cell to compensate. */ double g; /** * The cell which is being compensated. */ ACDCGenCell * cell; /** * The index corresponding to the cell being compensated. */ size_type index; /** * The integration limits for the cell being compensated. */ DVector up; /** * The integration limits for the cell being compensated. */ DVector lo; }; /** * A vector (stack) of levels */ typedef vector LevelVector; /** * The vector (stack) of levels */ LevelVector levels; /** * This is a help struct to perform the divide-and-conquer slicing * of cells before starting the compensation procedure. */ struct Slicer { /** * The constructor takes the number of dimensions of the function * approximated by the current cell, the ACDCGen object * controlling the generation and the lower-left and upper-right * corners of the cell to be sliced. */ Slicer(DimType, ACDCGen &, const DVector &, const DVector &); /** * The constructor used internally when diagonally chopped-off * cells need to be sliced themselves. */ Slicer(DimType Din, const Slicer & s, ACDCGenCell * cellin, const DVector & loin, const DVector & xselin, const DVector & upin, double fselin); /** * Destructor. */ ~Slicer(); /** * Called from both constructors to do the actual work. */ void divideandconquer(); /** * Initialize the procedure, finding the slicing points around the * current point */ void init(); /** * Do the slicing and increase the overestimate of the function in * the resulting cell. If a point with a higher function value has * been found repeat the slicing around that point etc. */ void slice(); /** * After slicing a cell, find the maximum function value found in * the resulting cell. Also set the minimum value found. */ double shiftmaxmin(); /** * Find the slice point of the current cell in the direction given. */ void dohalf(DimType); /** * If split is in more than one dimensions check the overestimate * for the chopped-off cell. */ void checkdiag(ACDCGenCell * cell, DimType d, double lod, double upd); /** * The dimension of the cell to be sliced. */ DimType D; /** * The lower-left corner of the current cell. */ DVector lo; /** * The upper-right corner of the current cell. */ DVector up; /** * The lower-left point found closest to the current * point which gives a function value below the overestimate. */ DVector xcl; /** * The upper-right point found closest to the current point which * gives a function value below the overestimate. */ DVector xcu; /** * The lower-left point furthest away from the * current point which gives a function value abov the * overestimate. */ DVector xhl; /** * The upper-right point furthest away from the * current point which gives a function value abov the * overestimate. */ DVector xhu; /** * The function values found for the xhl point. */ DVector fhl; /** * The function values found for the xhu point. */ DVector fhu; /** * The current point around which we are slicing. */ DVector xsel; /** * The function value in the current point. */ double fsel; /** * The current cell. */ ACDCGenCell * current; /** * The cell which resulted from the first slicing procedure. This * is the first one to get an increased overestimate and is the * one to be compensated. All other cells with increased * overestimates are sub-cells to this one */ ACDCGenCell * first; /** * The lower-left corner of the 'first' cell. */ DVector firstlo; /** * The upper-right corner of the 'first' cell. */ DVector firstup; /** * A pointer to the function to be used. */ FncPtr f; /** * The epsilon() value obtained from the controlling * ACDCGen object. */ double epsilon; /** * The margin() value obtained from the controlling * ACDCGen object. */ double margin; /** * The dimensions to slice in rated by the resulting fractional * volume of the resulting slice. If the dimension is negative it * means that the cell should be slized from below. */ multimap rateslice; /** * The minimu function value found in the current sliced cell (set * by shiftmaxmin()). */ double minf; /** * If true, then the whole original cell should compensated in the * continued generation. */ bool wholecomp; }; public: /** The maximum recursion depth of the compensation so far. */ static size_type maxsize; private: /** * Copy constructor is private and not implemented. */ ACDCGen(const ACDCGen &); /** * Assignment is private and not implemented. */ - ACDCGen & operator=(const ACDCGen &); + ACDCGen & operator=(const ACDCGen &) = delete; }; } #include "ACDCGen.icc" #endif diff --git a/ACDC/ACDCGenCell.h b/ACDC/ACDCGenCell.h --- a/ACDC/ACDCGenCell.h +++ b/ACDC/ACDCGenCell.h @@ -1,284 +1,284 @@ // -*- C++ -*- // // ACDCGenCell.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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 ACDCGenCell_H #define ACDCGenCell_H #include "ACDCGenConfig.h" #include "ACDCTraits.h" namespace ACDCGenerator { struct ACDCGenCellInfo; /** ACDCGenCell is the class representing a generation cell in ACDCGen. */ class ACDCGenCell { public: /** * Constructor taking the maximum value as argument. */ inline ACDCGenCell(double newG); /** * Constructor taking the maximum value and the volume as argument. */ inline ACDCGenCell(double newG, double newV); /** * The destuctor will also delete all child cells. */ inline ~ACDCGenCell(); /** * Choose a cell recursively according to their relative * overestimated integrals. * @param lo the lower-left corner of the chosen cell. * @param up the upper-right corner of the chosen cell. * @param rnd the random generator object used to throw dice to * choose sub-cell. * @return a pointer to the chosen cell. */ template inline ACDCGenCell * generate(DVector & lo, DVector & up, RndType * rnd); /** * Choose a cell recursively according to their relative * overestimated integrals. * @param lo the lower-left corner of the chosen cell. * @param up the upper-right corner of the chosen cell. * @param rndv a pre-generated set of random numbers (one for each * dimension) used to choose sub-cell and then rescales that random * number to be reused by the sub-cell. * @return a pointer to the chosen cell. */ inline ACDCGenCell * generate(DVector & lo, DVector & up, DVector & rndv); /** * Find a cell. For a given phase space point, \a x, find the * corresponding cell. Afterwards, the \a up and \a lo vectors will * contain the upper-right and lower-left corners of the chosen * cell. */ inline ACDCGenCell * getCell(DVector & lo, const DVector & x, DVector & up); /** * Smooth out the levels. If one cell has an overestimated integral * which is less than \a frac of the adjacent one, rescale it to * avoid situations where it is never sampled. */ inline void smooth(double frac); /** * Returns true if this cell has been split. */ inline bool isSplit() const; /** * Recalculate (recursively) the overestimated integral for this * cell (and of the sub-cells) and return it. Optionally \a rescale * the overestimated integral. */ inline double doMaxInt(double rescale = 1.0); /** * Return the last calculated the overestimated integral for this * cell. */ inline double maxInt() const; /** * Split this cell into two. The cell is split along the \a newDim * direction, where the lower and upper limit is given by \a lo and * \a up and the point of division is given by \a newDiv. */ inline void splitme(double lo, double newDiv, double up, DimType newDim); /** * Set a new overestimated maximum function value in this cell. */ inline void g(double newG); /** * Return the overestimated maximum function value in this cell. */ inline double g() const; /** * Return the volume of this cell. */ inline double v() const; /** * Return the direction in which it has been split. Return -1 if it * has not been split. */ inline DimType dim() const; /** * Return the point of division in the dim() direction. Return -1.0 * if it has not been split. */ inline double div() const; /** * Return the upper sub-cell. Return null if it has not been split. */ inline ACDCGenCell * upper() const; /** * Return the lower sub-cell. Return null if it has not been split. */ inline ACDCGenCell * lower() const; /** * Return the number of cells in this sub-tree which have not been * split. */ inline int nBins() const; /** * Return the maximum depth of this sub-tree. */ inline int depth() const; /** * Append ACDCGenCellInfo objects describing this subtree to a given * vector. * @param lo the lower-left corner of this cell. * @param up the upper-right corner of this cell. * @param v the vector where the ACDCGenCellInfo objects will be appended. */ inline void extract(DVector & lo, DVector & up, vector & v) const; /** * Get the index of the given cell. */ inline long getIndex(const ACDCGenCell * c) const; /** * Helper function for getIndex(const ACDCGenCell *) with an extra * argument to use as counter. */ inline long getIndex(const ACDCGenCell * c, long & indx) const; /** * Return the cell corresponding to the given index \a i. */ inline ACDCGenCell * getCell(long i); /** * Helper function for getCell(long) with an extra argument to use as * counter. */ inline ACDCGenCell * getCell(long i, long & indx); public: /** * If the cell has not been split this is the overestimated maximum * function value in this cell. Otherwise it is the weighted * average of the sub-cells values. */ double theG; /** * The volume of this cell. */ double theV; /** * Pointers to the upper sub-cell. */ ACDCGenCell * theUpper; /** * Pointers to the lower sub-cell. */ ACDCGenCell * theLower; /** * The point of division in the dim() direction. */ double theDivision; /** * The direction in which it has been split. */ DimType theSplitDimension; private: /** * Default constructor is private and not implemented. */ ACDCGenCell(); /** * Copy constructor is private and not implemented. */ ACDCGenCell(const ACDCGenCell &); /** * Assignment is private and not implemented. */ - ACDCGenCell & operator=(const ACDCGenCell &); + ACDCGenCell & operator=(const ACDCGenCell &) = delete; }; /** * This is a class describing cells to the outside world to be used * for debugging purposes. They only make sense if extracted with the * ACDCGenCell::extract function. */ struct ACDCGenCellInfo { /** the integer used for indices. */ typedef vector::size_type Index; /** * The overestimated maximum function value of this cell. */ double g; /** * The volume of the corresponding cell. */ double v; /** * The upper-right corner of the corresponding cell. */ DVector up; /** * The lower-left corner of the corresponding cell. */ DVector lo; /** * The index of the upper sub-cells in the vector in which the * corresponding cell was inserted. */ Index iup; /** * The index of the lower sub-cell in the vector in which the * corresponding cell was inserted. */ Index ilo; }; } #include "ACDCGenCell.icc" #endif diff --git a/Analysis/FactoryBase.h b/Analysis/FactoryBase.h --- a/Analysis/FactoryBase.h +++ b/Analysis/FactoryBase.h @@ -1,551 +1,551 @@ // -*- C++ -*- // // FactoryBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_FactoryBase_H #define THEPEG_FactoryBase_H // // This is the declaration of the FactoryBase class. // #include "ThePEG/Interface/Interfaced.h" #include "FactoryBase.fh" namespace AIDA { class IHistogram1D; class IHistogram2D; class IDataPointSet; class IAnalysisFactory; class ITree; class IHistogramFactory; class IDataPointSetFactory; } namespace ThePEG { /** * Here is the documentation of the FactoryBase class. This * abstract class is used to wrap the interface to a particular * AIDA-compliant histogram package to be used in * AnalysisHandlers in ThePEG. Concrete subclasses must * implement the doinitrun() function to create an object of a class * inheriting from AIDA::IAnalysisFactory and assign it with the * analysisFactory(AIDA::IAnalysisFactory*) function before calling * doinitrun() for the FactoryBase base class. * * A FactoryBase object should be assigned to the EventGenerator * object controlling a run, and AnalysisHandlers should * access it via the Generator with the generator() function. * * @see \ref FactoryBaseInterfaces "The interfaces" * defined for FactoryBase. */ class FactoryBase: public Interfaced { public: /** * Convenient typedef for pointer to AIDA::IHistogram1D. */ typedef AIDA::IHistogram1D * tH1DPtr; /** * Convenient typedef for pointer to const AIDA::IHistogram1D. */ typedef const AIDA::IHistogram1D * tcH1DPtr; /** * Convenient typedef for pointer to AIDA::IHistogram2D. */ typedef AIDA::IHistogram2D * tH2DPtr; /** * Convenient typedef for pointer to const AIDA::IHistogram2D. */ typedef const AIDA::IHistogram2D * tcH2DPtr; /** * Convenient typedef for pointer to AIDA::IHistogram1D. */ typedef AIDA::IDataPointSet * tDSetPtr; /** * Convenient typedef for pointer to const AIDA::IHistogram1D. */ typedef const AIDA::IDataPointSet * tcDSetPtr; public: /** * DataFiller is a helper class to facilitate adding data to a * DataPointSet. For a D-dimensional DataPointSet N*3*D numbers should * be added with the standard << operator ordered as x-value, * x-upper-error, x-lower-error, y-value, y-upper-error, etc.. Only * when the DataFIller object is detleted will the points be added. */ class DataFiller { public: /** * The standard constructor needs a IDataPointSet as argument. */ DataFiller(AIDA::IDataPointSet * dps) : dset(dps) {} /** * Copy constructor. */ DataFiller(const DataFiller & df) : dset(df.dset) {} /** * Destructor. Will commit the pints filled to the underlying * IDataPointSet. */ ~DataFiller(); /** * Add a number to measurement currently being read. */ DataFiller & operator<<(double x) { v.push_back(x); return *this; } /** * Automatic conversion to the underlying IDataPointSet. */ operator AIDA::IDataPointSet * () { return dset; } private: /** * The underlying IDataPointSet. */ AIDA::IDataPointSet * dset; /** * The collected numbers to be committed to the IDataPointSet. */ deque v; }; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ FactoryBase(); /** * The copy constructor. */ FactoryBase(const FactoryBase &); /** * The destructor. */ virtual ~FactoryBase(); //@} public: /** @name Simple access functions. */ //@{ /** * Together with suffix(), the name of the file where the resulting * histograms will be stored. If empty, generator()->filename() will * be used instead. */ const string & filename() const { return theFilename; } /** * Together with filename(), the name of the file where the * resulting histograms will be stored. */ const string & suffix() const { return theSuffix; } /** * The format in which the histograms are stored in the output file. */ const string & storeType() const { return theStoreType; } //@} /** @name Manipulate histograms */ //@{ /** * Rescale the given \a histogram so that the integral over the bins * will give the correct integrated cross section for the observable * in the given \a unit. */ virtual void normalizeToXSec(tH1DPtr histogram, CrossSection unit = picobarn) const = 0; /** * Rescale the given \a histogram so that the integral over the bins * will give the correct integrated cross section for the observable * in the given \a unit. */ virtual void normalizeToXSec(tH2DPtr histogram, CrossSection unit = picobarn) const = 0; /** * Rescale the given \a histogram so that the integral over the bins * gives the fraction of the total cross section generated which is * contained in the bins. */ virtual void normalizeToXSecFraction(tH1DPtr histogram) const = 0; /** * Rescale the given \a histogram so that the integral over the bins * gives the fraction of the total cross section generated which is * contained in the bins. */ virtual void normalizeToXSecFraction(tH2DPtr histogram) const = 0; /** * Rescale the given \a histogram so that the integral over the bins * gives one. */ virtual void normalizeToUnity(tH1DPtr histogram) const = 0; /** * Rescale the given \a histogram so that the integral over the bins * gives one. */ virtual void normalizeToUnity(tH2DPtr histogram) const = 0; //@} /** @name Access the underlying AIDA objects. */ //@{ /** * Access the underlying AIDA::IAnalysisFactory object. */ AIDA::IAnalysisFactory & analysisFactory() const { return *theAnalysisFactory; } /** * Access the underlying AIDA::ITree object. */ AIDA::ITree & tree() const; /** * A pointer to the underlying AIDA::IHistogramFactory object. */ AIDA::IHistogramFactory & histogramFactory() const; /** * A pointer to the underlying AIDA::IDataPointSetFactory object. */ AIDA::IDataPointSetFactory & dataSetFactory() const; /** * Create a new directory in the underlying AIDA tree. */ void mkdir(const string & path); /** * Create a new directory in the underlying AIDA tree. */ void mkdirs(const string & path); /** * Set the default working directory for the underlying AIDA tree. */ void cd(const string & path); /** * Create and return a AIDA::IHistogram1D object in the underlying * AIDA histogram factory. Note that the histogram factory is * responsible for deleting this histogram. * @param path the full path of where the histogram should be placed * in the underlying AIDA tree (on the form * "/dir/subdir/histogramname"). Not that the directory part of the * path typically must already exist in the tree. The directories * can be created with mkdir(string) or mkdirs(string). * The title of the histogram will be set to the name part of the path. * @param nb the number of bins in the histogram. * @param lo the lower edge of the histogram. * @param up the upper edge of the histogram. * @return a pointer to the created AIDA::IHistogram1D object. */ tH1DPtr createHistogram1D(const string & path, int nb, double lo, double up); /** * Create and return a AIDA::IHistogram1D object in the underlying * AIDA histogram factory. Note that the histogram factory is * responsible for deleting this histogram. * @param path the full path of where the histogram should be placed * in the underlying AIDA tree (on the form * "/dir/subdir/histogramname"). Not that the directory part of the * path typically must already exist in the tree. The directories * can be created with mkdir(string) or mkdirs(string). * @param title the title of the histogram. * @param nb the number of bins in the histogram. * @param lo the lower edge of the histogram. * @param up the upper edge of the histogram. * @return a pointer to the created AIDA::IHistogram1D object. */ tH1DPtr createHistogram1D(const string & path, const string & title, int nb, double lo, double up); /** * Create and return a AIDA::IHistogram1D object in the underlying * AIDA histogram factory. Note that the histogram factory is * responsible for deleting this histogram. * @param path the full path of where the histogram should be placed * in the underlying AIDA tree (on the form * "/dir/subdir/histogramname"). Not that the directory part of the * path typically must already exist in the tree. The directories * can be created with mkdir(string) or mkdirs(string). * @param title the title of the histogram. * @param edges A vector of bin edges specifying th bins. * @return a pointer to the created AIDA::IHistogram1D object. */ tH1DPtr createHistogram1D(const string & path, const string & title, const std::vector & edges); /** * Create and return a AIDA::IHistogram2D object in the underlying * AIDA histogram factory. Note that the histogram factory is * responsible for deleting this histogram. * @param path the full path of where the histogram should be placed * in the underlying AIDA tree (on the form * "/dir/subdir/histogramname"). Not that the directory part of the * path typically must already exist in the tree. The directories * can be created with mkdir(string) or mkdirs(string). * The title of the histogram will be set to the name part of the path. * @param nbx the number of x-bins in the histogram. * @param xlo the lower x-edge of the histogram. * @param xup the upper x-edge of the histogram. * @param nbx the number of y-bins in the histogram. * @param xlo the lower y-edge of the histogram. * @param xup the upper y-edge of the histogram. * @return a pointer to the created AIDA::IHistogram1D object. */ tH2DPtr createHistogram2D(const string & path, int nbx, double xlo, double xup, int nby, double ylo, double yup); /** * Create and return a AIDA::IHistogram2D object in the underlying * AIDA histogram factory. Note that the histogram factory is * responsible for deleting this histogram. * @param path the full path of where the histogram should be placed * in the underlying AIDA tree (on the form * "/dir/subdir/histogramname"). Not that the directory part of the * path typically must already exist in the tree. The directories * can be created with mkdir(string) or mkdirs(string). * @param title the title of the histogram. * @param nbx the number of x-bins in the histogram. * @param xlo the lower x-edge of the histogram. * @param xup the upper x-edge of the histogram. * @param nby the number of y-bins in the histogram. * @param ylo the lower y-edge of the histogram. * @param yup the upper y-edge of the histogram. * @return a pointer to the created AIDA::IHistogram1D object. */ tH2DPtr createHistogram2D(const string & path, const string & title, int nbx, double xlo, double xup, int nby, double ylo, double yup); /** * Create and return a AIDA::IHistogram2D object in the underlying * AIDA histogram factory. Note that the histogram factory is * responsible for deleting this histogram. * @param path the full path of where the histogram should be placed * in the underlying AIDA tree (on the form * "/dir/subdir/histogramname"). Not that the directory part of the * path typically must already exist in the tree. The directories * can be created with mkdir(string) or mkdirs(string). * @param title the title of the histogram. * @param xedges A vector of bin edges specifying the x-bins. * @param yedges A vector of bin edges specifying the y-bins. * @return a pointer to the created AIDA::IHistogram1D object. */ tH2DPtr createHistogram2D(const string & path, const string & title, const std::vector & xedges, const std::vector & yedges); /** * Create a IDataPointSet with the given \a path and \a title and * containing points with the given number of dimensions, \a * dim. The returned object is a DataFiller which can be used to * facilitate the addition of data points to the set or be converted * to a pointer to the created IDataPointSet. */ DataFiller createDataSet(const string & path, const string & title, int dim); /** * Used by a \a client object to indicate that he has required * histograms from this factory. It is guaranteed that the clients * finish() function is called before the underlying AIDA::ITree is * committed and the AIDA::IHistogramFactory is deleted together * with all histograms. */ void registerClient(tIPtr client); //@} protected: /** * Set the underlying AIDA::IAnalysisFactory object. Note that this * surrenders the controll of the factory to the FactoryBase * object which will delete it in the finish() function. Typically * this function should be called by a concrete subclass in the * doinitrun() function before the doinitrun() function of this * class is called. */ void analysisFactory(AIDA::IAnalysisFactory * x) { theAnalysisFactory = x; } /** * Delete all associated AIDA objects. Note that the tree is not * explicitly committed. */ void 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); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for 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(); /** * Finalize this object. Called in the run phase just after a * run has ended. Used eg. to write out statistics. */ virtual void dofinish(); //@} private: /** * Together with theSuffix, the name of the file where the resulting * histograms will be stored. If empty, generator()->filename() will * be used instead. */ string theFilename; /** * Together with theFilename, the name of the file where the * resulting histograms will be stored. */ string theSuffix; /** * The format in which the histograms are stored in the output file. */ string theStoreType; /** * A pointer to the underlying AIDA::IAnalysisFactory object. */ AIDA::IAnalysisFactory * theAnalysisFactory; /** * A pointer to the underlying AIDA::ITree object. */ AIDA::ITree * theTree; /** * A pointer to the underlying AIDA::IHistogramFactory object. */ AIDA::IHistogramFactory * theHistogramFactory; /** * A pointer to the underlying AIDA::IDataPointSetFactory object. */ AIDA::IDataPointSetFactory * theDataSetFactory; /** * A set of client objects which have required histograms from this * factory. */ set clients; private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class with persistent data. */ static AbstractClassDescription initFactoryBase; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - FactoryBase & operator=(const FactoryBase &); + FactoryBase & operator=(const FactoryBase &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of FactoryBase. */ template <> struct BaseClassTrait { /** Typedef of the first base class of FactoryBase. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of * the FactoryBase class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::FactoryBase"; } }; /** @endcond */ } #endif /* THEPEG_FactoryBase_H */ diff --git a/Analysis/GraphvizPlot.h b/Analysis/GraphvizPlot.h --- a/Analysis/GraphvizPlot.h +++ b/Analysis/GraphvizPlot.h @@ -1,184 +1,184 @@ // -*- C++ -*- // // Graphviz.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_GraphvizPlot_H #define THEPEG_GraphvizPlot_H // // This is the declaration of the GraphvizPlot class. // #include "ThePEG/Repository/CurrentGenerator.h" #include "ThePEG/Handlers/AnalysisHandler.h" namespace ThePEG { /** \ingroup Analysis * The GraphvizPlot class generates * an output of the tree structure of the event which can be viewed using dot. * * @see \ref GraphvizPlotInterfaces "The interfaces" * defined for GraphvizPlot. */ class GraphvizPlot: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ GraphvizPlot() : _eventNumber(1), _quiet(false) {} //@} 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 {return new_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(); //@} /** * Helper function to obtain the name of a particle. */ string particleName(tcPPtr) 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 initGraphvizPlot; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - GraphvizPlot & operator=(const GraphvizPlot &); + GraphvizPlot & operator=(const GraphvizPlot &) = delete; private: /** * Event number that should be drawn */ long _eventNumber; /** * Tell the object not to write out messages to the standard output. */ bool _quiet; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of GraphvizPlot. */ template <> struct BaseClassTrait { /** Typedef of the first base class of GraphvizPlot. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the GraphvizPlot class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::GraphvizPlot"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the GraphvizPlot class and any other class on which it depends * (except the base class). */ static string library() { return "GraphvizPlot.so"; } }; /** @endcond */ } #endif /* THEPEG_GraphvizPlot_H */ diff --git a/Analysis/HIHepMCFile.h b/Analysis/HIHepMCFile.h --- a/Analysis/HIHepMCFile.h +++ b/Analysis/HIHepMCFile.h @@ -1,232 +1,232 @@ // -*- C++ -*- // // HIHepMCFile.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HIHepMCFile_H #define THEPEG_HIHepMCFile_H // // This is the declaration of the HIHepMCFile class. // #include #include #include #include "ThePEG/Handlers/AnalysisHandler.h" #include "ThePEG/Repository/CurrentGenerator.h" #include "ThePEG/Repository/EventGenerator.h" #include "ThePEG/Config/HepMCHelper.h" namespace ThePEG { /** \ingroup Analysis * The HIHepMCFile class outputs ThePEG events in HepMC format with additional Heavy Ion information. * * @see \ref HIHepMCFileInterfaces "The interfaces" * defined for HIHepMCFile. */ class HIHepMCFile: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ HIHepMCFile(); /** * The copy constructor. */ HIHepMCFile(const HIHepMCFile &); //@} 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 static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initHIHepMCFile; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - HIHepMCFile & operator=(const HIHepMCFile &); + HIHepMCFile & operator=(const HIHepMCFile &) = delete; private: /** * Last event that should be written out as HepMC format */ long _eventNumber; /** * The HepMC format */ int _format; /** * The HepMC filename */ string _filename; #ifdef HAVE_HEPMC_ROOTIO /** * The name of TTRee in ROOT file */ string _ttreename; /** * The name of branch in ROOT file */ string _tbranchname; #endif /** * The HepMC I/O handler */ #ifdef HAVE_HEPMC3 HepMC::Writer *_hepmcio; #else HepMC::IO_BaseClass *_hepmcio; #endif /** * The HepMC dump file */ ofstream _hepmcdump; /** * Selector for the choice of units */ int _unitchoice; /** * Choice of output precision in GenEvent format */ unsigned int _geneventPrecision; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of HIHepMCFile. */ template <> struct BaseClassTrait { /** Typedef of the first base class of HIHepMCFile. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the HIHepMCFile class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::HIHepMCFile"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the HIHepMCFile class and any other class on which it depends * (except the base class). */ static string library() { return "HepMCAnalysis.so"; } }; /** @endcond */ } #endif /* THEPEG_HIHepMCFile_H */ diff --git a/Analysis/HepMC3File.h b/Analysis/HepMC3File.h --- a/Analysis/HepMC3File.h +++ b/Analysis/HepMC3File.h @@ -1,205 +1,205 @@ // -*- C++ -*- // // HepMC3File.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HepMC3File_H #define THEPEG_HepMC3File_H // // This is the declaration of the HepMC3File class. // #include #include #include "ThePEG/Handlers/AnalysisHandler.h" #include "ThePEG/Repository/CurrentGenerator.h" #include "ThePEG/Repository/EventGenerator.h" #include "HepMC/IO/IO_Base.h" namespace ThePEG { /** \ingroup Analysis * The HepMC3File class outputs ThePEG events in HepMC format. * * @see \ref HepMC3FileInterfaces "The interfaces" * defined for HepMC3File. */ class HepMC3File: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ HepMC3File(); /** * The copy constructor. */ HepMC3File(const HepMC3File &); //@} 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 static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initHepMC3File; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - HepMC3File & operator=(const HepMC3File &); + HepMC3File & operator=(const HepMC3File &) = delete; private: /** * Last event that should be written out as HepMC format */ long _eventNumber; /** * The HepMC filename */ string _filename; /** * The HepMC I/O handler */ HepMC::IO_Base *_hepmcio; /** * Selector for the choice of units */ int _unitchoice; /** * Choice of output precision in GenEvent format */ unsigned int _geneventPrecision; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of HepMC3File. */ template <> struct BaseClassTrait { /** Typedef of the first base class of HepMC3File. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the HepMC3File class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::HepMCFile"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the HepMC3File class and any other class on which it depends * (except the base class). */ static string library() { return "HepMCAnalysis.so"; } }; /** @endcond */ } #endif /* THEPEG_HepMC3File_H */ diff --git a/Analysis/HepMCFile.h b/Analysis/HepMCFile.h --- a/Analysis/HepMCFile.h +++ b/Analysis/HepMCFile.h @@ -1,236 +1,236 @@ // -*- C++ -*- // // HepMCFile.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HepMCFile_H #define THEPEG_HepMCFile_H // // This is the declaration of the HepMCFile class. // #include #include #include #include "ThePEG/Handlers/AnalysisHandler.h" #include "ThePEG/Repository/CurrentGenerator.h" #include "ThePEG/Repository/EventGenerator.h" #include "ThePEG/Config/HepMCHelper.h" namespace ThePEG { /** \ingroup Analysis * The HepMCFile class outputs ThePEG events in HepMC format. * * @see \ref HepMCFileInterfaces "The interfaces" * defined for HepMCFile. */ class HepMCFile: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ HepMCFile(); /** * The copy constructor. */ HepMCFile(const HepMCFile &); //@} 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 static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initHepMCFile; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - HepMCFile & operator=(const HepMCFile &); + HepMCFile & operator=(const HepMCFile &) = delete; private: /** * Last event that should be written out as HepMC format */ long _eventNumber; /** * The HepMC format */ int _format; /** * The HepMC filename */ string _filename; #ifdef HAVE_HEPMC_ROOTIO /** * The name of TTRee in ROOT file */ string _ttreename; /** * The name of branch in ROOT file */ string _tbranchname; #endif /** * The HepMC I/O handler */ #ifdef HAVE_HEPMC3 HepMC::Writer *_hepmcio; #else HepMC::IO_BaseClass *_hepmcio; #endif /** * The HepMC dump file */ ofstream _hepmcdump; /** * Selector for the choice of units */ int _unitchoice; /** * Choice of output precision in GenEvent format */ unsigned int _geneventPrecision; /** * Choice of adding Heavy Ion information. */ int _addHI; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of HepMCFile. */ template <> struct BaseClassTrait { /** Typedef of the first base class of HepMCFile. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the HepMCFile class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::HepMCFile"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the HepMCFile class and any other class on which it depends * (except the base class). */ static string library() { return "HepMCAnalysis.so"; } }; /** @endcond */ } #endif /* THEPEG_HepMCFile_H */ diff --git a/Analysis/LWH/DataPoint.h b/Analysis/LWH/DataPoint.h --- a/Analysis/LWH/DataPoint.h +++ b/Analysis/LWH/DataPoint.h @@ -1,101 +1,106 @@ // -*- C++ -*- // // DataPoint.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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 LWH_DataPoint_H #define LWH_DataPoint_H // // This is the declaration of the DataPoint class representing // #include #include #include #include "AIDataPoint.h" #include "Measurement.h" namespace LWH { using namespace AIDA; /** * An DataPoint represents a binned histogram axis. A 1D Histogram would have * one DataPoint representing the X axis, while a 2D Histogram would have two * axes representing the X and Y DataPoint. */ class DataPoint: public IDataPoint { public: /** * Construct a data point with a given number of dimensions. */ DataPoint(int dim = 2) : m(dim) {} /** * Copy constructor. */ DataPoint(const DataPoint & d) : IDataPoint(d), m(d.m) {} /** * Copy from any IDataPoint. */ DataPoint(const IDataPoint & id) : m(id.dimension()) { for ( int i = 0, N = m.size(); i < N; ++i ) m[i] = Measurement(id.coordinate(i)->value(), id.coordinate(i)->errorPlus(), id.coordinate(i)->errorMinus()); } /** + * Default assignment operator (to avoid compiler warnings). + */ + DataPoint & operator=(const DataPoint &) = default; + + /** * Destructor. */ virtual ~DataPoint() {} /** * Get the dimension of the IDataPoint, i.e. the number * of coordinates the point has. * @return The dimension. */ int dimension() const { return m.size(); } /** * Get the IMeasurement for a given coordinate. * @param coord The coordinate. * @return The corresponding IMeasurement. */ IMeasurement * coordinate(int coord) { return &(m[coord]); } /** * Get the IMeasurement for a given coordinate. * @param coord The coordinate. * @return The corresponding IMeasurement. */ const IMeasurement * coordinate(int coord) const { return &(m[coord]); } private: /** * The included measurements. */ std::vector m; }; } #endif /* LWH_DataPoint_H */ diff --git a/Analysis/LWH/Measurement.h b/Analysis/LWH/Measurement.h --- a/Analysis/LWH/Measurement.h +++ b/Analysis/LWH/Measurement.h @@ -1,126 +1,131 @@ // -*- C++ -*- // // Measurement.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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 LWH_Measurement_H #define LWH_Measurement_H // // This is the declaration of the Measurement class representing // #include #include #include #include "AIMeasurement.h" namespace LWH { using namespace AIDA; /** * Basic user-level interface class for holding a single "measurement" * with positive and negative errors (to allow for asymmetric errors). * "IMeasurement" = "value" + "errorPlus" - "errorMinus" */ class Measurement: public IMeasurement { public: /** * Standard constructor. */ Measurement(double v = 0.0, double ep = 0.0, double em = 0.0) : val(v), errp(ep), errm(em) {} /** * Copy constructor. */ Measurement(const Measurement & m) :IMeasurement(m), val(m.val), errp(m.errp), errm(m.errm) {} /** + * Default assignment operator (to avoid compiler warnings). + */ + Measurement & operator=(const Measurement &) = default; + + /** * Destructor. */ virtual ~Measurement() { /* nop */; } /** * Get the value of the Measurement. * @return The value of the Measurement. */ double value() const { return val; } /** * Get the plus error of the IMeasurement. * @return The plus error. */ double errorPlus() const { return errp; } /** * Get the minus error of the IMeasurement. * @return The minus error. */ double errorMinus() const { return errm; } /** * Set the value of the IMeasurement. * @param v The new value of the IMeasurement. * @return false If the value cannot be set. */ bool setValue(double v) { val = v; return true; } /** * Set the plus error of the IMeasurement. * @param ep The new plus error of the IMeasurement. * @return false If the error cannot be set or it is negative. */ bool setErrorPlus(double ep) { errp = ep; return ep < 0.0; } /** * Set the minus error of the IMeasurement. * @param em The new minus error of the IMeasurement. * @return false If the error cannot be set or it is negative. */ bool setErrorMinus(double em) { errm = em; return em < 0.0; } private: /** * The value. */ double val; /** * The plus error. */ double errp; /** * The minus error. */ double errm; }; } #endif /* LWH_Measurement_H */ diff --git a/Analysis/LWHFactory.h b/Analysis/LWHFactory.h --- a/Analysis/LWHFactory.h +++ b/Analysis/LWHFactory.h @@ -1,192 +1,192 @@ // -*- C++ -*- // // LWHFactory.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_LWHFactory_H #define THEPEG_LWHFactory_H // // This is the declaration of the LWHFactory class. // #include "ThePEG/Analysis/FactoryBase.h" namespace ThePEG { /** * Here is the documentation of the LWHFactory class. It inherits from * the abstract FactoryBase class and implements the Light-Weight * Histogram package, LWH. This implements the most rudimentary * histogramming facilities according to the AIDA interface * specifications. Currently the only thing that is supported is * simple, equally binned, one dimensional histograms. It is mainly * intended to be used in applications where one needs to fill simple * histograms and output them. With LWH it is then possible to do this * without the overhead of a full AIDA implementation, but still * having the option to use a full implementation later on with * minimal changes. * * @see \ref LWHFactoryInterfaces "The interfaces" * defined for LWHFactory. */ class LWHFactory: public FactoryBase { public: /** @name Manipulate histograms */ //@{ /** * Rescale the given \a histogram so that the integral over the bins * will give the correct integrated cross section for the observable * in the given \a unit. */ virtual void normalizeToXSec(tH1DPtr histogram, CrossSection unit = picobarn) const; /** * Rescale the given \a histogram so that the integral over the bins * gives the fraction of the total cross section generated which is * contained in the bins. */ virtual void normalizeToXSecFraction(tH1DPtr histogram) const; /** * Rescale the given \a histogram so that the integral over the bins * gives one. */ virtual void normalizeToUnity(tH1DPtr histogram) const; /** * Rescale the given \a histogram so that the integral over the bins * will give the correct integrated cross section for the observable * in the given \a unit. */ virtual void normalizeToXSec(tH2DPtr histogram, CrossSection unit = picobarn) const; /** * Rescale the given \a histogram so that the integral over the bins * gives the fraction of the total cross section generated which is * contained in the bins. */ virtual void normalizeToXSecFraction(tH2DPtr histogram) const; /** * Rescale the given \a histogram so that the integral over the bins * gives one. */ virtual void normalizeToUnity(tH2DPtr histogram) 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 static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initLWHFactory; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - LWHFactory & operator=(const LWHFactory &); + LWHFactory & operator=(const LWHFactory &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of LWHFactory. */ template <> struct BaseClassTrait { /** Typedef of the first base class of LWHFactory. */ typedef FactoryBase NthBase; }; /** This template specialization informs ThePEG about the name of * the LWHFactory class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::LWHFactory"; } /** Return the name of the shared library be loaded to get access to * the LWHFactory class and every other class it uses * (except the base class). */ static string library() { return "LWHFactory.so"; } }; /** @endcond */ } #endif /* THEPEG_LWHFactory_H */ diff --git a/Analysis/NLOHepMC3File.h b/Analysis/NLOHepMC3File.h --- a/Analysis/NLOHepMC3File.h +++ b/Analysis/NLOHepMC3File.h @@ -1,182 +1,182 @@ // -*- C++ -*- #ifndef ThePEG_NLOHepMC3File_H #define ThePEG_NLOHepMC3File_H // // This is the declaration of the NLOHepMC3File class. // #include "ThePEG/Handlers/AnalysisHandler.h" #include "HepMC/IO/IO_Base.h" #include "ThePEG/Config/HepMCHelper.h" namespace ThePEG { /** * \author Simon Platzer * * \brief Write hard sub processes or sub process groups to HepMC. * */ class NLOHepMC3File: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ NLOHepMC3File(); /** * The copy constructor. */ NLOHepMC3File(const NLOHepMC3File &); /** * The destructor. */ virtual ~NLOHepMC3File() {} //@} 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); /** * 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; //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for 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(); /** * 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; /** Make a 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 ID to be used for remnants */ long _remnantId; /** * The HepMC filename */ string _filename; /** * The HepMC I/O handler */ HepMC::IO_Base *_hepmcio; /** * Selector for the choice of units */ int _unitchoice; /** * Choice of output precision in GenEvent format */ unsigned int _geneventPrecision; /** * Count events */ unsigned long _eventNumber; private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - NLOHepMC3File & operator=(const NLOHepMC3File &); + NLOHepMC3File & operator=(const NLOHepMC3File &) = delete; }; } #endif /* ThePEG_NLOHepMC3File_H */ diff --git a/Analysis/NLOHepMCFile.h b/Analysis/NLOHepMCFile.h --- a/Analysis/NLOHepMCFile.h +++ b/Analysis/NLOHepMCFile.h @@ -1,206 +1,206 @@ // -*- C++ -*- #ifndef ThePEG_NLOHepMCFile_H #define ThePEG_NLOHepMCFile_H // // This is the declaration of the NLOHepMCFile class. // #include #include "ThePEG/Handlers/AnalysisHandler.h" #include "ThePEG/Config/HepMCHelper.h" namespace ThePEG { /** * \author Simon Platzer * * \brief Write hard sub processes or sub process groups to HepMC. * */ class NLOHepMCFile: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ NLOHepMCFile(); /** * The copy constructor. */ NLOHepMCFile(const NLOHepMCFile &); /** * The destructor. */ virtual ~NLOHepMCFile() {} //@} 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); /** * 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; //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for 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(); /** * 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; /** Make a 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 ID to be used for remnants */ long _remnantId; /** * The HepMC format */ int _format; /** * The HepMC filename */ string _filename; #ifdef HAVE_HEPMC_ROOTIO /** * The name of TTRee in ROOT file */ string _ttreename; /** * The name of branch in ROOT file */ string _tbranchname; #endif /** * The HepMC I/O handler */ #ifdef HAVE_HEPMC3 HepMC::Writer *_hepmcio; #else HepMC::IO_BaseClass *_hepmcio; #endif /** * The HepMC dump file */ ofstream _hepmcdump; /** * Selector for the choice of units */ int _unitchoice; /** * Choice of output precision in GenEvent format */ unsigned int _geneventPrecision; /** * Count events */ unsigned long _eventNumber; private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - NLOHepMCFile & operator=(const NLOHepMCFile &); + NLOHepMCFile & operator=(const NLOHepMCFile &) = delete; }; } #endif /* ThePEG_NLOHepMCFile_H */ diff --git a/Analysis/NLORivetAnalysis.h b/Analysis/NLORivetAnalysis.h --- a/Analysis/NLORivetAnalysis.h +++ b/Analysis/NLORivetAnalysis.h @@ -1,223 +1,223 @@ // -*- C++ -*- #ifndef THEPEG_NLORivetAnalysis_H #define THEPEG_NLORivetAnalysis_H // // This is the declaration of the NLORivetAnalysis class. // #include "ThePEG/Handlers/AnalysisHandler.h" #include "Rivet/AnalysisHandler.hh" namespace ThePEG { /** * Here is the documentation of the NLORivetAnalysis class. * * @see \ref NLORivetAnalysisInterfaces "The interfaces" * defined for NLORivetAnalysis. */ class NLORivetAnalysis: public ThePEG::AnalysisHandler { public: /** * The default constructor. */ NLORivetAnalysis(); 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; //@} public: /** @name Functions 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 initNLORivetAnalysis; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - NLORivetAnalysis & operator=(const NLORivetAnalysis &); + NLORivetAnalysis & operator=(const NLORivetAnalysis &) = 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 _analyses; /** * The base name of the output file. */ string filename; /** * Enable debugging information from NLORivet */ bool debug; /** * The NLORivetAnalysisHandler */ Rivet::AnalysisHandler * _rivet; /** * Event count */ unsigned long _nevent; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of NLORivetAnalysis. */ template <> struct BaseClassTrait { /** Typedef of the first base class of NLORivetAnalysis. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the NLORivetAnalysis class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::NLORivetAnalysis"; } /** * The name of a file containing the dynamic library where the class * NLORivetAnalysis is implemented. It may also include several, space-separated, * libraries if the class NLORivetAnalysis 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 "RivetAnalysis.so"; } }; /** @endcond */ } #endif /* THEPEG_NLORivetAnalysis_H */ diff --git a/Analysis/ProgressLog.h b/Analysis/ProgressLog.h --- a/Analysis/ProgressLog.h +++ b/Analysis/ProgressLog.h @@ -1,226 +1,226 @@ // -*- C++ -*- #ifndef THEPEG_ProgressLog_H #define THEPEG_ProgressLog_H // // This is the declaration of the ProgressLog class. // #include "ThePEG/Handlers/AnalysisHandler.h" namespace ThePEG { /** * The ProgressLog class will not perform an actual analysis. Instead * it will write out a progress status on the standard log file. By * default it will write on event 1, 2, 5, 10, 20, 50, ... etc. But * optionally it can in addition also write out every given number of * seconds. * * The status line which is written out contains the current date and * time, the number of events processed so far and the total number of * events to be generated, two estimates of the time of completion * (one based on the current cpu usage and one based on the average * cpu usage [the usage is given in brackets]), and the host on which * the program is running, together with its process number. * * @see \ref ProgressLogInterfaces "The interfaces" * defined for ProgressLog. */ class ProgressLog: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ ProgressLog(); /** * The destructor. */ virtual ~ProgressLog(); //@} 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); //@} /** * Return the cpu clock in seconds. */ static double fclock(); /** * Check if it is time to write out a status line. */ bool statusTime(long i, long 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; //@} protected: /** @name Standard Interfaced functions. */ //@{ /** * Initialize this object. Called in the run phase just before * a run begins. */ virtual void doinitrun(); //@} private: /** * If larger than 0, a status line will be written every secstep second. */ int secstep; /** * The clock when the run was started. */ time_t time0; /** * The cpu clock when the run was started. */ double fcpu0; /** * The clock the last time a status line was written out. */ time_t time1; /** * The cpu clock the last time a status line was written out. */ double fcpu1; /** * The host on which we are running. */ string host; /** * The pid of the current process. */ pid_t pid; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initProgressLog; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - ProgressLog & operator=(const ProgressLog &); + ProgressLog & operator=(const ProgressLog &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of ProgressLog. */ template <> struct BaseClassTrait { /** Typedef of the first base class of ProgressLog. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the ProgressLog class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::ProgressLog"; } /** * The name of a file containing the dynamic library where the class * ProgressLog is implemented. It may also include several, space-separated, * libraries if the class ProgressLog 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 "ProgressLog.so"; } }; /** @endcond */ } #endif /* THEPEG_ProgressLog_H */ diff --git a/Analysis/RivetAnalysis.h b/Analysis/RivetAnalysis.h --- a/Analysis/RivetAnalysis.h +++ b/Analysis/RivetAnalysis.h @@ -1,201 +1,201 @@ // -*- C++ -*- #ifndef THEPEG_RivetAnalysis_H #define THEPEG_RivetAnalysis_H // // This is the declaration of the RivetAnalysis class. // #include "ThePEG/Handlers/AnalysisHandler.h" #include "Rivet/AnalysisHandler.hh" namespace ThePEG { /** * Here is the documentation of the RivetAnalysis class. * * @see \ref RivetAnalysisInterfaces "The interfaces" * defined for RivetAnalysis. */ class RivetAnalysis: public ThePEG::AnalysisHandler { public: /** * The default constructor. */ RivetAnalysis(); 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); //@} public: /** @name Functions 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 initRivetAnalysis; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - RivetAnalysis & operator=(const RivetAnalysis &); + RivetAnalysis & operator=(const RivetAnalysis &) = delete; private: /** * The Analyses to use */ vector _analyses; /** * Search paths for finding rivet analyses. */ vector _paths; /** * The base name of the output file. */ string filename; /** * Enable debugging information from Rivet */ bool debug; /** * The RivetAnalysisHandler */ Rivet::AnalysisHandler * _rivet; /** * Event count */ unsigned long _nevent; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of RivetAnalysis. */ template <> struct BaseClassTrait { /** Typedef of the first base class of RivetAnalysis. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the RivetAnalysis class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::RivetAnalysis"; } /** * The name of a file containing the dynamic library where the class * RivetAnalysis is implemented. It may also include several, space-separated, * libraries if the class RivetAnalysis 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 "RivetAnalysis.so"; } }; /** @endcond */ } #endif /* THEPEG_RivetAnalysis_H */ diff --git a/Analysis/XSecCheck.h b/Analysis/XSecCheck.h --- a/Analysis/XSecCheck.h +++ b/Analysis/XSecCheck.h @@ -1,205 +1,205 @@ // -*- C++ -*- #ifndef THEPEG_XSecCheck_H #define THEPEG_XSecCheck_H // // This is the declaration of the XSecCheck class. // #include "ThePEG/Handlers/AnalysisHandler.h" namespace ThePEG { /** * The XSecCheck class is a simple analysis class used for testing * purposes. If the total cross section does not match the one * specified by TargetXSec, an exception will * be thrown. * * @see \ref XSecCheckInterfaces "The interfaces" * defined for XSecCheck. */ class XSecCheck: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ XSecCheck() : target(ZERO), tol(0.01), sumw(0.0) {} /** * The destructor. */ virtual ~XSecCheck(); //@} public: /** * The exception class used if the target cross section was not met. */ struct UnexpectedXSec: public Exception {}; 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() { AnalysisHandler::doinitrun(); sumw = 0.0; } /** * 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 expected total cross section. */ CrossSection target; /** * The relative tolerance accepted when comparing the total cross * section with the target. */ double tol; /** * The sum of the weights of the events analyzed. */ double sumw; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initXSecCheck; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - XSecCheck & operator=(const XSecCheck &); + XSecCheck & operator=(const XSecCheck &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of XSecCheck. */ template <> struct BaseClassTrait { /** Typedef of the first base class of XSecCheck. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the XSecCheck class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::XSecCheck"; } /** * The name of a file containing the dynamic library where the class * XSecCheck is implemented. It may also include several, space-separated, * libraries if the class XSecCheck 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 "XSecCheck.so"; } }; /** @endcond */ } #endif /* THEPEG_XSecCheck_H */ diff --git a/Cuts/Cuts.h b/Cuts/Cuts.h --- a/Cuts/Cuts.h +++ b/Cuts/Cuts.h @@ -1,838 +1,838 @@ // -*- C++ -*- // // Cuts.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Cuts_H #define THEPEG_Cuts_H // // This is the declaration of the Cuts class. // #include "ThePEG/Interface/Interfaced.h" #include "Cuts.fh" #include "OneCutBase.h" #include "TwoCutBase.h" #include "MultiCutBase.h" #include "JetFinder.h" #include "FuzzyTheta.h" namespace ThePEG { /** * Cuts is a class for implementing kinematical cuts in ThePEG. The * class itself only implements cuts on the total momentum of the hard * sub-process, implemented as minimum and maximum values of \f$x_1\f$ * and \f$x_2\f$ (or \f$\hat{s}=x_1x_2S_{tot}\f$ and * \f$\hat{y}=\log(x_1/x_2)/2\f$. Further cuts can be implemented * either by inheriting from this base class, in which the virtual * cut() function should be overridden, or by assigning objects of * class OneCutBase, TwoCutBase and MultiCutBase defining cuts on * single particles, pairs of particles and groups of particles in the * hard sub-process respectively. * * The Cuts object must be initialized specifying the overall * laboratory frame, giving the total squared invariant mass, \f$S\f$, * and the rapidity, \f$Y\f$, of the colliding particles in this * frame. The colliding particles are thus assumed to be directed * along the \f$z\f$-axis. * * For each event, the Cuts object must also be initialized giving the * squared invarint mass, \f$\hat{s}\f$, and the total rapidity, * \f$\hat{y}\f$, of the hard sub-process in the center-of-mass frame * of the colliding particles. Note that this means that the * transformation between the lab frame and the rest frame of the hard * sub-process is assumed to be a simple boost along the z-axis. * * @see \ref CutsInterfaces "The interfaces" * defined for Cuts. */ class Cuts: public Interfaced { public: /** * A vector of OneCutBase pointers. */ typedef vector OneCutVector; /** * A vector of TwoCutBase pointers. */ typedef vector TwoCutVector; /** * A vector of MultiCutBase pointers. */ typedef vector MultiCutVector; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ Cuts(Energy MhatMin=2*GeV); /** * The destructor. */ virtual ~Cuts(); //@} public: /** @name Initialization functions. */ //@{ /** * Initialize this object specifying the maximum total invariant * mass squared, \a smax, and the total rapidity, \a Y, of the * colliding particles (for the maximum invariant mass). A sub-class * overriding this function must make sure the base-class function * is called. This function should be called once in the beginning * of a run. */ virtual void initialize(Energy2 smax, double Y); /** * Initialize this object for a new event. A sub-class overriding * this function must make sure the base-class function is called. * This function is called before the generation of a new * sub-process, before the incoming partons have been generated. */ virtual void initEvent(); /** * Set information about the invariant mass squared, \a shat, and * rapidity, \a yhat, of the hard sub-process. The rapidity should * be given wrt. the center of mass of the colliding particles. A * sub-class overriding this function must make sure the base-class * function is called. This function is called before the generation * of a new sub-process, after the incoming partons have been * generated. If \a mirror is true any questions regarding cuts on * the sub-process in the functions minYStar(tcPDPtr), * maxYStar(tcPDPtr p), passCuts(const tcPDVector &, const * vector &, tcPDPtr, tcPDPtr) and passCuts(const * tcPVector &, tcPDPtr t1, tcPDPtr) will assume that the z-axis is * reversed in the sub-process rest frame. Returns false if the * given values were outside of the cuts. */ virtual bool initSubProcess(Energy2 shat, double yhat, bool mirror = false) const; //@} /** @name Check functions to see if a state has passed the cuts or not. */ //@{ /** * Check if the outgoing particles, with the given types and * momenta, from a sub-process passes the cuts. The particles must * be given in the rest frame of tha hard sub-process, and the * initSubProcess must have been called before. Also the types of * the incoming partons, \a t1 and \a t2, may be given if availible. */ virtual bool passCuts(const tcPDVector & ptype, const vector & p, tcPDPtr t1 = tcPDPtr(), tcPDPtr t2 = tcPDPtr()) const; /** * Check if the outgoing particles from a sub-process passes the * cuts. The particles must be given in the rest frame of tha hard * sub-process, and the initSubProcess must have been called * before. Also the types of the incoming partons, \a t1 and \a t2, * may be given if availible. */ bool passCuts(const tcPVector & p, tcPDPtr t1 = tcPDPtr(), tcPDPtr t2 = tcPDPtr()) const; /** * Check if the incoming and outgoing particles in the given * sub-process passes the cuts. The sub-process must be given in its * rest frame, and the initSubProcess must have been called before. */ bool passCuts(const SubProcess & sub) const; /** * Check if the given collision passes the cuts. The collision must * be given in its rest frame. */ bool passCuts(const Collision & coll) const; //@} /** @name Access to cuts of the underlying cut objects. */ //@{ /** * Return the minimum allowed squared invariant mass of two outgoing * partons of type \a pi and \a pj. This function first determines * the minimum from the corresponding function from in TwoCutBase * objects. If no minimum was found, one is derived from * minKTClus(), minDurham(), minKT() and minDeltaR(), if possible. */ Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const; /** * 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. This function first determines the * minimum from the corresponding function from in TwoCutBase * objects. If no minimum was found, one is derived from minKT(), if * possible. */ Energy2 minTij(tcPDPtr pi, tcPDPtr po) const; /** * 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. Simply returns the * maximum of the results from calling the corresponding function in * the TwoCutBase objects. */ double minDeltaR(tcPDPtr pi, tcPDPtr pj) const; /** * 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. Simply returns the maximum of the * results from calling the corresponding function in the TwoCutBase * objects. */ Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const; /** * 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. Simply returns the maximum of the results from * calling the corresponding function in the TwoCutBase objects. */ double minDurham(tcPDPtr pi, tcPDPtr pj) const; /** * Return the minimum allowed value of the transverse momentum of an * outgoing parton. This function first determines the minimum from * the corresponding function from in OneCutBase objects. If no * minimum was found, one is derived from minKTClus(), if possible. */ Energy minKT(tcPDPtr p) const; /** * Return the minimum allowed pseudo-rapidity of an outgoing parton * of the given type. The pseudo-rapidity is measured in the lab * system. Simply returns the maximum of the results from calling * the corresponding function in the OneCutBase objects. */ double minEta(tcPDPtr p) const; /** * Return the maximum allowed pseudo-rapidity of an outgoing parton * of the given type. The pseudo-rapidity is measured in the lab * system. Simply returns the minimum of the results from calling * the corresponding function in the OneCutBase objects. */ double maxEta(tcPDPtr p) const; /** * Return the minimum allowed rapidity of an outgoing parton * of the given type. The rapidity is measured in the lab * system. Simply returns the maximum of the results from calling * the corresponding function in the OneCutBase objects. */ double minRapidityMax(tcPDPtr p) const; /** * Return the maximum allowed rapidity of an outgoing parton * of the given type. The rapidity is measured in the lab * system. Simply returns the minimum of the results from calling * the corresponding function in the OneCutBase objects. */ double maxRapidityMin(tcPDPtr p) const; /** * Return the minimum allowed rapidity of an outgoing parton of the * given type in the center-of-mass system of the hard sub-process. * Only available after initSubProcess() has been called. */ double minYStar(tcPDPtr p) const; /** * Return the minimum allowed rapidity of an outgoing parton of the * given type in the center-of-mass system of the hard sub-process. * Only available after initSubProcess() has been called. */ double maxYStar(tcPDPtr p) const; /** * 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. Simply returns the maximum of the results from * calling the corresponding function in the MultiCutBase objects. */ Energy2 minS(const tcPDVector & pv) const; /** * 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. Simply returns the minimum of the results from * calling the corresponding function in the MultiCutBase objects. */ Energy2 maxS(const tcPDVector & pv) const; //@} /** @name Direct access to underlying cut objects. */ //@{ /** * Return a vector of pointers to objects of the given class (with * base class OneCutBase). */ template vector::transient_const_pointer> oneCutObjects() const; /** * Return a vector of pointers to objects of the given class (with * base class TwoCutBase). */ template vector::transient_const_pointer> twoCutObjects() const; /** * Return a vector of pointers to objects of the given class (with * base class MultiCutBase). */ template vector::transient_const_pointer> multiCutObjects() const; /** * Return the objects defining cuts on single outgoing partons from the * hard sub-process. */ const OneCutVector& oneCuts() const { return theOneCuts; } /** * Return the objects defining cuts on pairs of particles in the hard * sub-process. */ const TwoCutVector& twoCuts() const { return theTwoCuts; } /** * Return the objects defining cuts on sets of outgoing particles from the * hard sub-process. */ const MultiCutVector& multiCuts() const { return theMultiCuts; } /** * Return the jet finder */ Ptr::tptr jetFinder() const { return theJetFinder; } /** * Add a OneCutBase object. */ void add(tOneCutPtr c) { theOneCuts.push_back(c); } /** * Add a TwoCutBase object. */ void add(tTwoCutPtr c) { theTwoCuts.push_back(c); } /** * Add a MultiCutBase object. */ void add(tMultiCutPtr c) { theMultiCuts.push_back(c); } //@} public: /** @name Simple access functions. */ //@{ /** * The maximum allowed total invariant mass squared allowed for * events to be considered. */ Energy2 SMax() const { return theSMax; } /** * The total rapidity of the colliding particles corresponding to * the maximum invariant mass squared, SMax(). */ double Y() const { return theY; } /** * The invariant mass squared of the hard sub-process of the event * being considered. */ Energy2 currentSHat() const { return theCurrentSHat; } /** * The total rapidity of hard sub-process (wrt. the rest system of * the colliding particles so that currentYHat() + Y() gives the * true rapidity) of the event being considered. */ double currentYHat() const { return theCurrentYHat; } //@} /** @name Functions to inquire about specific cuts. */ //@{ /** * The minimum allowed value of \f$\hat{s}\f$. */ Energy2 sHatMin() const { return max(sqr(theMHatMin), theX1Min*theX2Min*SMax()); } /** * The maximum allowed value of \f$\hat{s}\f$. */ Energy2 sHatMax() const { return min(sqr(theMHatMax), theX1Max*theX2Max*SMax()); } /** * Check if the given \f$\hat{s}\f$ is within the cuts. */ bool sHat(Energy2 sh) const { return sh > sHatMin() && sh <= sHatMax()*(1.0 + 1000.0*Constants::epsilon); } /** * The minimum allowed value of \f$\sqrt{\hat{s}}\f$. */ Energy mHatMin() const { return max(theMHatMin, sqrt(theX1Min*theX2Min*SMax())); } /** * The maximum allowed value of \f$\sqrt{\hat{s}}\f$. */ Energy mHatMax() const { return min(theMHatMax, sqrt(theX1Max*theX2Max*SMax())); } /** * The minimum value of the rapidity of the hard sub-process * (wrt. the rest system of the colliding particles). */ double yHatMin() const; /** * The maximum value of the rapidity of the hard sub-process * (wrt. the rest system of the colliding particles). */ double yHatMax() const; /** * Check if the given \f$\hat{y}\f$ is within the cuts. */ bool yHat(double y) const; /** * The minimum value of the positive light-cone fraction of the hard * sub-process. */ double x1Min() const; /** * The maximum value of the positive light-cone fraction of the hard * sub-process. */ double x1Max() const; /** * Check if the given \f$x_1\f$ is within the cuts. */ bool x1(double x) const; /** * The minimum value of the negative light-cone fraction of the hard * sub-process. */ double x2Min() const; /** * The maximum value of the negative light-cone fraction of the hard * sub-process. */ double x2Max() const; /** * Check if the given \f$x_2\f$ is within the cuts. */ bool x2(double x) const; /** * The minimum allowed value of the scale to be used in PDF's and * coupling constants. */ Energy2 scaleMin() const { return theScaleMin; } /** * The maximum allowed value of the scale to be used in PDF's and * coupling constants. */ Energy2 scaleMax() const { return theScaleMax; } /** * Check if the given scale is within the cuts. */ bool scale(Energy2 Q2) const { return Q2 > scaleMin() && Q2 < scaleMax(); } /** * Set true if a matrix element is should be using this cut and is * mirrored along the z-axis . */ bool subMirror() const { return theSubMirror; } /** * Return the overall cut weight */ double cutWeight() const { return theCutWeight; } /** * Set the cut weight as appropriate from the call to the last n-cut * object. */ void lastCutWeight(double w) const { theLastCutWeight = w; } /** * Return the fuzziness object */ Ptr::tcptr fuzzy() const { return theFuzzyTheta; } /** * Check for value inside the given bounds and update the weight */ template bool isInside(const Value& v, const Value& lower, const Value& upper, double& weight) const { if ( !fuzzy() ) { if ( v >= lower && v <= upper ) return true; weight = 0.0; return false; } return fuzzy()->isInside(v,lower,upper,weight); } /** * Check for value inside the given bounds and update the weight */ template bool isLessThan(const Value& v, const Value& upper, double& weight) const { if ( !fuzzy() ) { if ( v <= upper ) return true; weight = 0.0; return false; } return fuzzy()->isLessThan(v,upper,weight); } /** * Check for value inside the given bounds and update the weight */ template bool isLargerThan(const Value& v, const Value& lower, double& weight) const { if ( !fuzzy() ) { if ( v >= lower ) return true; weight = 0.0; return false; } return fuzzy()->isLargerThan(v,lower,weight); } //@} public: /** * Describe the currently active cuts in the log file. */ virtual void describe() const; protected: /** @name Standard Interfaced functions. */ //@{ /** * 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; //@} private: /** * Helper function used by the interface. */ Energy maxMHatMin() const; /** * Helper function used by the interface. */ Energy minMHatMax() const; /** * Helper function used by the interface. */ double maxYHatMin() const; /** * Helper function used by the interface. */ double minYHatMax() const; /** * Helper function used by the interface. */ double maxX1Min() const; /** * Helper function used by the interface. */ double minX1Max() const; /** * Helper function used by the interface. */ double maxX2Min() const; /** * Helper function used by the interface. */ double minX2Max() const; /** * Helper function used by the interface. */ Energy2 maxScaleMin() const; /** * Helper function used by the interface. */ Energy2 minScaleMax() const; private: /** * The maximum allowed total invariant mass squared allowed for * events to be considered. */ Energy2 theSMax; /** * The total rapidity of the colliding particles corresponding to * the maximum invariant mass squared, SMax(). */ double theY; /** * The invariant mass squared of the hard sub-process of the event * being considered. */ mutable Energy2 theCurrentSHat; /** * The total rapidity of hard sub-process (wrt. the rest system of * the colliding particles so that currentYHat() + Y() gives the * true rapidity) of the event being considered. */ mutable double theCurrentYHat; /** * The minimum allowed value of \f$\sqrt{\hat{s}}\f$. */ Energy theMHatMin; /** * The maximum allowed value of \f$\sqrt{\hat{s}}\f$. */ Energy theMHatMax; /** * The minimum value of the rapidity of the hard sub-process * (wrt. the rest system of the colliding particles). */ double theYHatMin; /** * The maximum value of the rapidity of the hard sub-process * (wrt. the rest system of the colliding particles). */ double theYHatMax; /** * The minimum value of the positive light-cone fraction of the hard * sub-process. */ double theX1Min; /** * The maximum value of the positive light-cone fraction of the hard * sub-process. */ double theX1Max; /** * The minimum value of the negative light-cone fraction of the hard * sub-process. */ double theX2Min; /** * The maximum value of the negative light-cone fraction of the hard * sub-process. */ double theX2Max; /** * The minimum allowed value of the scale to be used in PDF's and * coupling constants. */ Energy2 theScaleMin; /** * The maximum allowed value of the scale to be used in PDF's and * coupling constants. */ Energy2 theScaleMax; /** * The objects defining cuts on single outgoing partons from the * hard sub-process. */ OneCutVector theOneCuts; /** * The objects defining cuts on pairs of particles in the hard * sub-process. */ TwoCutVector theTwoCuts; /** * The objects defining cuts on sets of outgoing particles from the * hard sub-process. */ MultiCutVector theMultiCuts; /** * An optional jet finder used to define cuts on the level of * reconstructed jets. */ Ptr::ptr theJetFinder; /** * Set to true if a matrix element is should be using this cut and is * mirrored along the z-axis . */ mutable bool theSubMirror; /** * The overall cut weight */ mutable double theCutWeight; /** * The cut weight as appropriate from the call to the last n-cut * object. */ mutable double theLastCutWeight; /** * The fuzziness object */ Ptr::ptr theFuzzyTheta; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initCuts; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - Cuts & operator=(const Cuts &); + Cuts & operator=(const Cuts &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of Cuts. */ template <> struct BaseClassTrait { /** Typedef of the first base class of Cuts. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of * the Cuts class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Cuts"; } }; /** @endcond */ } #endif /* THEPEG_Cuts_H */ diff --git a/Cuts/DeltaMeasureCuts.h b/Cuts/DeltaMeasureCuts.h --- a/Cuts/DeltaMeasureCuts.h +++ b/Cuts/DeltaMeasureCuts.h @@ -1,215 +1,215 @@ // -*- C++ -*- // // DeltaMeasureCuts.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_DeltaMeasureCuts_H #define THEPEG_DeltaMeasureCuts_H // // This is the declaration of the DeltaMeasureCuts class. // #include "ThePEG/Cuts/TwoCutBase.h" #include "ThePEG/PDT/MatcherBase.h" namespace ThePEG { /** * This class implements a cuts on legoplot and rapidity separation * * @see \ref DeltaMeasureCutsInterfaces "The interfaces" * defined for DeltaMeasureCuts. */ class DeltaMeasureCuts: public TwoCutBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ DeltaMeasureCuts() : theMinDeltaR(0.0), theMinDeltaEta(0.0) {} //@} public: /** @name Overridden virtual functions defined in the base class. */ //@{ /** * 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 pi, tcPDPtr pj) const; /** * Return the minimum allowed value of the longitudinally invariant * \f$k_\perp\f$-algorithms distance measure. Returns ZERO. */ virtual Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const; /** * Return the minimum allowed squared invariant mass of two outgoing * partons of type \a pi and \a pj. Returns zero. */ virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr po) const; /** * 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 pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr pj) const; /** * 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: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 minimum allowed legoplot separation */ double theMinDeltaR; /** * The minimum allowed rapidity separation */ double theMinDeltaEta; /** * If non-null only particles matching this object will be affected * by this cut. */ PMPtr theMatcher; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initDeltaMeasureCuts; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - DeltaMeasureCuts & operator=(const DeltaMeasureCuts &); + DeltaMeasureCuts & operator=(const DeltaMeasureCuts &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of DeltaMeasureCuts. */ template <> struct BaseClassTrait { /** Typedef of the first base class of DeltaMeasureCuts. */ typedef TwoCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the DeltaMeasureCuts class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::DeltaMeasureCuts"; } /** Return the name of the shared library be loaded to get * access to the DeltaMeasureCuts class and every other class it uses * (except the base class). */ static string library() { return "DeltaMeasureCuts.so"; } }; /** @endcond */ } #endif /* THEPEG_DeltaMeasureCuts_H */ diff --git a/Cuts/FastJetFinder.h b/Cuts/FastJetFinder.h --- a/Cuts/FastJetFinder.h +++ b/Cuts/FastJetFinder.h @@ -1,187 +1,187 @@ // -*- C++ -*- // // FastJetFinder.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_FastJetFinder_H #define THEPEG_FastJetFinder_H // // This is the declaration of the FastJetFinder class. // #include "ThePEG/Cuts/JetFinder.h" namespace ThePEG { /** * FastJetFinder implements the class of longitudinally invariant kt * jet clustering algorithms. * * @see \ref FastJetFinderInterfaces "The interfaces" * defined for FastJetFinder. */ class FastJetFinder: public JetFinder { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ FastJetFinder(); /** * The destructor. */ virtual ~FastJetFinder(); //@} public: /** * Perform jet clustering on the given outgoing particles. * Optionally, information on the incoming particles is provided. * Return true, if a clustering has been performed. */ virtual bool cluster(tcPDVector & ptype, vector & p, tcCutsPtr parent, tcPDPtr t1 = tcPDPtr(), tcPDPtr t2 = tcPDPtr()) const; /** * Describe this jet fined. */ virtual void describe() const; public: /** @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(); //@} /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 resolution cut. */ Energy2 theDCut; /** * The `cone radius' R. */ double theConeRadius; /** * The possible variants. */ enum variants { kt = 1, CA = 2, antiKt = 3, sphericalKt = 4, sphericalCA = 5, sphericalAntiKt = 6 }; /** * The variant. */ int theVariant; /** * The possible modes. */ enum modes { inclusive = 1, exclusive = 2 }; /** * The mode. */ int theMode; /** * The possible recombination schemes. */ enum recombinations { recoPt = 1, recoE = 2 }; /** * The recombination scheme */ int theRecombination; private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - FastJetFinder & operator=(const FastJetFinder &); + FastJetFinder & operator=(const FastJetFinder &) = delete; }; } #endif /* THEPEG_FastJetFinder_H */ diff --git a/Cuts/FuzzyTheta.h b/Cuts/FuzzyTheta.h --- a/Cuts/FuzzyTheta.h +++ b/Cuts/FuzzyTheta.h @@ -1,342 +1,342 @@ // -*- C++ -*- // // FuzzyTheta.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_FuzzyTheta_H #define ThePEG_FuzzyTheta_H // // This is the declaration of the FuzzyTheta class. // #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/Repository/EventGenerator.h" #include namespace ThePEG { namespace CutTypes { /** * Identify an energy-type cut */ struct Energy {}; /** * Identify a momentum-type cut */ struct Momentum {}; /** * Identify a rapidity-type cut */ struct Rapidity {}; /** * Identify an azimuth-type cut */ struct Azimuth {}; /** * Identify an polar-angle-type cut */ struct Polar {}; } /** * FuzzyTheta implements fuzzy cut prescriptions * * @see \ref FuzzyThetaInterfaces "The interfaces" * defined for FuzzyTheta. */ class FuzzyTheta: public Interfaced { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ FuzzyTheta(); /** * The destructor. */ virtual ~FuzzyTheta(); //@} public: /** * Return the (compact) support of the delta approximation * considered, given its center value. This default version assumes * a box approximation. All values are assumed to be in units of the * width considered. */ virtual pair support(double x) const { return make_pair(x-0.5,x+0.5); } /** * Return the overlap integral of the delta approximation with the * given box and center. This default version assumes * a box approximation. All values are assumed to be in units of the * width considered. */ virtual double overlap(double x, const pair& box) const { if ( x - 0.5 >= box.first && x + 0.5 <= box.second ) return 1.; if ( x - 0.5 > box.second || x + 0.5 < box.first ) return 0.; return min(box.second,x+0.5) - max(box.first,x-0.5); } /** * Return the overlap, optionally considering absolute lower and * upper bounds. */ double overlap(double x, pair box, const pair& support) const { box.first = max(box.first,support.first); box.second = min(box.second,support.second); assert(x >= support.first && x <= support.second); assert(support.second - support.first >= 1.); if ( x - 0.5 < support.first ) x = support.first + 0.5; if ( x + 0.5 > support.second ) x = support.second - 0.5; return overlap(x,box); } /** * Return the bounds for an energy-type cut */ pair bounds(const CutTypes::Energy&) const { return make_pair(0.,generator()->maximumCMEnergy()/theEnergyWidth); } /** * Return the width for an energy-type cut */ Energy width(const CutTypes::Energy&) const { return theEnergyWidth; } /** * Return the bounds for a momentum-type cut */ pair bounds(const CutTypes::Momentum&) const { return make_pair(0.,0.5*generator()->maximumCMEnergy()/theEnergyWidth); } /** * Return the width for a momentum-type cut */ Energy width(const CutTypes::Momentum&) const { return theEnergyWidth; } /** * Return the bounds for a rapidity-type cut */ pair bounds(const CutTypes::Rapidity&) const { return make_pair(-Constants::MaxRapidity/theRapidityWidth, Constants::MaxRapidity/theRapidityWidth); } /** * Return the width for a rapidity-type cut */ double width(const CutTypes::Rapidity&) const { return theRapidityWidth; } /** * Return the bounds for a azimuth-type cut */ pair bounds(const CutTypes::Azimuth&) const { return make_pair(0.0,2.*Constants::pi/theAngularWidth); } /** * Return the width for a azimuth-type cut */ double width(const CutTypes::Azimuth&) const { return theAngularWidth; } /** * Return the bounds for a polar-angle-type cut */ pair bounds(const CutTypes::Polar&) const { return make_pair(0.0,Constants::pi/theAngularWidth); } /** * Return the width for a polar-type cut */ double width(const CutTypes::Polar&) const { return theAngularWidth; } /** * Check for value inside the given bounds and update the weight */ template bool isInside(const Value& v, const Value& lower, const Value& upper, double& weight) const { CutType type; Value w = width(type); weight *= overlap(v/w,pair(lower/w,upper/w),bounds(type)); if ( weight == 0.0 ) return false; return true; } /** * Check for value inside the given bounds and update the weight */ template bool isLessThan(const Value& v, const Value& upper, double& weight) const { CutType type; Value w = width(type); pair b = bounds(type); weight *= overlap(v/w,pair(b.first,upper/w),b); if ( weight == 0.0 ) return false; return true; } /** * Check for value inside the given bounds and update the weight */ template bool isLargerThan(const Value& v, const Value& lower, double& weight) const { CutType type; Value w = width(type); pair b = bounds(type); weight *= overlap(v/w,pair(lower/w,b.first),b); if ( weight == 0.0 ) return false; return 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); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 width to be considered for momenta */ Energy theEnergyWidth; /** * The width to be considered for rapidity quantities */ double theRapidityWidth; /** * The width to be considered for angular quantities */ double theAngularWidth; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initFuzzyTheta; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - FuzzyTheta & operator=(const FuzzyTheta &); + FuzzyTheta & operator=(const FuzzyTheta &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of FuzzyTheta. */ template <> struct BaseClassTrait { /** Typedef of the first base class of FuzzyTheta. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of * the FuzzyTheta class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::FuzzyTheta"; } }; /** @endcond */ } #endif /* ThePEG_FuzzyTheta_H */ diff --git a/Cuts/JetCuts.h b/Cuts/JetCuts.h --- a/Cuts/JetCuts.h +++ b/Cuts/JetCuts.h @@ -1,232 +1,232 @@ // -*- C++ -*- // // JetCuts.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_JetCuts_H #define THEPEG_JetCuts_H // // This is the declaration of the JetCuts class. // #include "ThePEG/Cuts/MultiCutBase.h" #include "ThePEG/PDT/MatcherBase.h" #include "ThePEG/Cuts/JetRegion.h" #include "ThePEG/Cuts/JetPairRegion.h" #include "ThePEG/Cuts/MultiJetRegion.h" namespace ThePEG { /** * JetCuts combines various JetRegion and JetPairRegion objects into a * cut object. * * @see JetRegion * @see JetPairRegion * * @see \ref JetCutsInterfaces "The interfaces" * defined for JetCuts. */ class JetCuts: public MultiCutBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ JetCuts(); /** * The destructor. */ virtual ~JetCuts(); //@} public: /** @name Overridden virtual functions defined in the base class. */ //@{ /** * Return true if a set of outgoing particles with typea \a ptype * and corresponding momenta \a p passes the cuts. */ virtual bool passCuts(tcCutsPtr parent, const tcPDVector & ptype, const vector & p) const; //@} /** * Describe the currently active cuts in the log file. */ virtual void describe() const; public: /** * Return the matcher for unresolved partons. */ Ptr::tptr unresolvedMatcher() const { return theUnresolvedMatcher; } /** * Return the jet regions to match. */ const vector::ptr>& jetRegions() const { return theJetRegions; } /** * Return the jet veto regions to check. */ const vector::ptr>& jetVetoRegions() const { return theJetVetoRegions; } /** * Return the jet pair regions to match. */ const vector::ptr>& jetPairRegions() const { return theJetPairRegions; } /** * Return the multi jet regions to match. */ const vector::ptr>& multiJetRegions() const { return theMultiJetRegions; } /** * Enumerate the ordering to apply on jets */ enum Orderings { orderPt = 1, orderY = 2 }; /** * Return the ordering */ int ordering() const { return theOrdering; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * A matcher for unresolved partons. */ Ptr::ptr theUnresolvedMatcher; /** * The jet regions to match. */ vector::ptr> theJetRegions; /** * The jet veto regions to check */ vector::ptr> theJetVetoRegions; /** * The jet pair regions to match. */ vector::ptr> theJetPairRegions; /** * The multi jet regions to match. */ vector::ptr> theMultiJetRegions; /** * Types of the ordering to apply on jets */ int theOrdering; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initJetCuts; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - JetCuts & operator=(const JetCuts &); + JetCuts & operator=(const JetCuts &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of JetCuts. */ template <> struct BaseClassTrait { /** Typedef of the first base class of JetCuts. */ typedef MultiCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the JetCuts class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::JetCuts"; } /** Return the name of the shared library be loaded to get * access to the JetCuts class and every other class it uses * (except the base class). */ static string library() { return "JetCuts.so"; } }; /** @endcond */ } #endif /* THEPEG_JetCuts_H */ diff --git a/Cuts/JetFinder.h b/Cuts/JetFinder.h --- a/Cuts/JetFinder.h +++ b/Cuts/JetFinder.h @@ -1,175 +1,175 @@ // -*- C++ -*- // // JetFinder.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_JetFinder_H #define THEPEG_JetFinder_H // // This is the declaration of the JetFinder class. // #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/PDT/MatcherBase.h" #include "Cuts.fh" namespace ThePEG { /** * JetFinder defines an interface to jet finders to be used when cuts * should actually be defined on the level of reconstructed jets such * as typically encountered in higher order corrections. * * @see \ref JetFinderInterfaces "The interfaces" * defined for JetFinder. */ class JetFinder: public Interfaced { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ JetFinder(); /** * The destructor. */ virtual ~JetFinder(); //@} public: /** * Perform jet clustering on the given outgoing particles. * Optionally, information on the incoming particles is provided. * Return true, if a clustering has been performed. */ virtual bool cluster(tcPDVector & ptype, vector & p, tcCutsPtr parent, tcPDPtr t1 = tcPDPtr(), tcPDPtr t2 = tcPDPtr()) const = 0; /** * Return the matcher for unresolved partons. */ Ptr::tptr unresolvedMatcher() const { return theUnresolvedMatcher; } /** * Set the minimum number of outgoing partons on which clustering * should be performed. */ void minOutgoing(unsigned int n) { theMinOutgoing = n; } /** * Return the minimum number of outgoing partons on which clustering * should be performed. */ unsigned int minOutgoing() const { return theMinOutgoing; } /** * Return true, if jets should only be constructed from matching * objects inside a given rapidity interval. */ bool restrictConsitutents() const { return theRestrictConstituents; } /** * Jets should only be constructed from matching * objects inside a given rapidity interval. */ void restrictConsitutents(bool on) { theRestrictConstituents = on; } /** * Return the rapidity interval within objects should be considered * for clustering, if appropriate */ const pair& constituentRapidityRange() const { return theConstituentRapidityRange; } /** * Set the rapidity interval within objects should be considered * for clustering, if appropriate */ void constituentRapidityRange(const pair& r) { theConstituentRapidityRange = r; } /** * Describe this jet finder */ virtual void describe() 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: /** * Command to insert a rapidity range */ string doYRange(string); /** * A matcher for unresolved partons. */ Ptr::ptr theUnresolvedMatcher; /** * The minimum number of outgoing partons on which clustering * should be performed. */ unsigned int theMinOutgoing; /** * True, if jets should only be constructed from matching * objects inside a given rapidity interval. */ bool theRestrictConstituents; /** * The rapidity interval within objects should be considered * for clustering, if appropriate */ pair theConstituentRapidityRange; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - JetFinder & operator=(const JetFinder &); + JetFinder & operator=(const JetFinder &) = delete; }; } #endif /* THEPEG_JetFinder_H */ diff --git a/Cuts/JetPairRegion.h b/Cuts/JetPairRegion.h --- a/Cuts/JetPairRegion.h +++ b/Cuts/JetPairRegion.h @@ -1,215 +1,215 @@ // -*- C++ -*- // // JetPairRegion.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_JetPairRegion_H #define ThePEG_JetPairRegion_H // // This is the declaration of the JetPairRegion class. // #include "ThePEG/Cuts/JetRegion.h" namespace ThePEG { /** * JetPairRegion implements constraints on jets matching two jet regions. * * @see JetRegion * @see JetCuts * * @see \ref JetPairRegionInterfaces "The interfaces" * defined for JetPairRegion. */ class JetPairRegion: public HandlerBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ JetPairRegion(); /** * The destructor. */ virtual ~JetPairRegion(); //@} public: /** * Return the first jet region to act on. */ Ptr::tptr firstRegion() const { return theFirstRegion; } /** * Return the second jet region to act on. */ Ptr::tptr secondRegion() const { return theSecondRegion; } /** * Return the minimum jet-jet invariant mass. */ Energy massMin() const { return theMassMin; } /** * Return the maximum jet-jet invariant mass. */ Energy massMax() const { return theMassMax; } /** * Return the minimum jet-jet lego-plot separation. */ double deltaRMin() const { return theDeltaRMin; } /** * Return the maximum jet-jet lego-plot separation. */ double deltaRMax() const { return theDeltaRMax; } /** * Return the minimum jet-jet rapidity separation. */ double deltaYMin() const { return theDeltaYMin; } /** * Return the maximum jet-jet rapidity separation. */ double deltaYMax() const { return theDeltaYMax; } /** * Return the cut weight encountered from the last call to matches() */ double cutWeight() const { return theCutWeight; } public: /** * Describe the currently active cuts in the log file. */ virtual void describe() const; /** * Return true, if the requirements on the jet regions are fullfilled. */ virtual bool matches(tcCutsPtr parent); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 first jet region to act on. */ Ptr::ptr theFirstRegion; /** * The second jet region to act on. */ Ptr::ptr theSecondRegion; /** * The minimum jet-jet invariant mass. */ Energy theMassMin; /** * The maximum jet-jet invariant mass. */ Energy theMassMax; /** * The minimum jet-jet lego-plot separation. */ double theDeltaRMin; /** * The maximum jet-jet lego-plot separation. */ double theDeltaRMax; /** * The minimum jet-jet rapidity separation. */ double theDeltaYMin; /** * The maximum jet-jet rapidity separation. */ double theDeltaYMax; /** * Should the jets go into opposite detector hemispheres? */ bool theOppositeHemispheres; /** * The cut weight encountered from the last call to matches() */ double theCutWeight; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - JetPairRegion & operator=(const JetPairRegion &); + JetPairRegion & operator=(const JetPairRegion &) = delete; }; } #endif /* ThePEG_JetPairRegion_H */ diff --git a/Cuts/JetRegion.h b/Cuts/JetRegion.h --- a/Cuts/JetRegion.h +++ b/Cuts/JetRegion.h @@ -1,248 +1,248 @@ // -*- C++ -*- // // JetRegion.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_JetRegion_H #define ThePEG_JetRegion_H // // This is the declaration of the JetRegion class. // #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/EventRecord/Particle.h" #include "ThePEG/Cuts/Cuts.h" namespace ThePEG { /** * JetRegion implements the requirement of finding a jet inside a * given range of transverse momenta, and (pseudo-)rapidity. * * @see JetPairRegion * @see JetCuts * * @see \ref JetRegionInterfaces "The interfaces" * defined for JetRegion. */ class JetRegion: public HandlerBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ JetRegion(); /** * The destructor. */ virtual ~JetRegion(); //@} 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 >& yRanges() const { return theYRanges; } /** * Return the jets accepted by this region (with respect to the * ordering imposed by the JetCuts object). If empty, any jet will * be accepted. */ const vector& accepts() const { return theAccepts; } /** * Return true, if this jet region is fuzzy */ bool fuzzy() const { return theFuzzy; } /** * Return the cut weight encountered from the last call to matches() */ double cutWeight() const { return theCutWeight; } /** * Perform a (potentially) fuzzy check on energy-type quantities */ bool lessThanEnergy(Energy a, Energy b, double& weight) const; /** * Perform a (potentially) fuzzy check on angular-type quantities */ bool lessThanRapidity(double a, double b, double& weight) const; public: /** * Describe the currently active cuts in the log file. */ virtual void describe() const; /** * Return true, if the given jet matches this region. */ virtual bool matches(tcCutsPtr parent, int n, const LorentzMomentum& p, double yHat = 0.0); /** * Return true, if this region matched a jet in the last call to matches(). */ bool didMatch() { return theDidMatch; } /** * Reset this region to act on a new event. */ virtual void reset() { theDidMatch = false; } /** * Return the number of the last jet matching this region. */ int lastNumber() const { return theLastNumber; } /** * Return the momentum of the last jet matching this region. */ const LorentzMomentum& lastMomentum() const { return theLastMomentum; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 > theYRanges; /** * The jets accepted by this region (with respect to the ordering * imposed by the JetCuts object). If empty, any jet will be * accepted. */ vector theAccepts; /** * True, if this region matched a jet in the last call to matches(). */ bool theDidMatch; /** * The number of the last jet matching this region. */ int theLastNumber; /** * Return the momentum of the last jet matching this region. */ LorentzMomentum theLastMomentum; /** * True if this region is fuzzy */ bool theFuzzy; /** * The cut weight encountered from the last call to matches() */ double theCutWeight; /** * The smearing width for the pt or mass cuts, if fuzzy */ Energy theEnergyCutWidth; /** * The smearing width for the rapidity cut, if fuzzy */ double theRapidityCutWidth; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - JetRegion & operator=(const JetRegion &); + JetRegion & operator=(const JetRegion &) = delete; }; } #endif /* ThePEG_JetRegion_H */ diff --git a/Cuts/KTClus.h b/Cuts/KTClus.h --- a/Cuts/KTClus.h +++ b/Cuts/KTClus.h @@ -1,205 +1,205 @@ // -*- C++ -*- // // KTClus.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_KTClus_H #define THEPEG_KTClus_H // // This is the declaration of the KTClus class. // #include "ThePEG/Cuts/TwoCutBase.h" namespace ThePEG { /** * This clas implements the cuts relevant for the \f$\Delta * R\f$-measure in the longitudinally invariant kt-algorithm. By * default the cut is only applied to coloured particles, but * optionally it may be applied to all particle types. * * @see \ref KTClusInterfaces "The interfaces" * defined for KTClus. */ class KTClus: public TwoCutBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ KTClus() : theCut(10.0*GeV), onlyJets(true) {} //@} public: /** @name Overridden virtual functions defined in the base class. */ //@{ /** * 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 pi, tcPDPtr pj) const; /** * Return the minimum allowed squared invariant mass of two outgoing * partons of type \a pi and \a pj. Returns zero. */ virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr po) const; /** * 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 pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr pj) const; /** * 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: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 minimum allowed value of the longitudinally invariant * \f$k_\perp\f$-algorithms distance measure. */ Energy theCut; /** * If true, only apply the cut to pairs of coloured particles. */ bool onlyJets; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initKTClus; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - KTClus & operator=(const KTClus &); + KTClus & operator=(const KTClus &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of KTClus. */ template <> struct BaseClassTrait { /** Typedef of the first base class of KTClus. */ typedef TwoCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the KTClus class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::KTClus"; } /** Return the name of the shared library be loaded to get * access to the KTClus class and every other class it uses * (except the base class). */ static string library() { return "KTClus.so"; } }; /** @endcond */ } #endif /* THEPEG_KTClus_H */ diff --git a/Cuts/KTRapidityCut.h b/Cuts/KTRapidityCut.h --- a/Cuts/KTRapidityCut.h +++ b/Cuts/KTRapidityCut.h @@ -1,245 +1,245 @@ // -*- C++ -*- #ifndef THEPEG_KTRapidityCut_H #define THEPEG_KTRapidityCut_H // // This is the declaration of the KTRapidityCut class. // #include "ThePEG/Cuts/OneCutBase.h" namespace ThePEG { /** * The KTRapidityCut class is a simple concrete sub-class of OneCutbase simply * requiring a minimum transverse momentum of any outgoing * particle. It is also possible to require a minimum and maximum * rapidity. Optionally the restrictions only apply to particles * matching a specific matcher object. * * @see \ref KTRapidityCutInterfaces "The interfaces" * defined for KTRapidityCut. * @see SimpleKtCut */ class KTRapidityCut: public OneCutBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ KTRapidityCut(Energy minKT=10*GeV) : theMinKT(minKT), theMaxKT(Constants::MaxEnergy), theMinRapidity(-Constants::MaxRapidity), theMaxRapidity(Constants::MaxRapidity) {} /** * The destructor. */ virtual ~KTRapidityCut(); //@} public: /** @name Overwritten virtual functions defined in the base class. */ //@{ /** * Return the minimum allowed value of the transverse momentum of an * outgoing parton. */ virtual Energy minKT(tcPDPtr p) const; /** * 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 p) const; /** * 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 p) const; /** * 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: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Helper function used by the interface. */ Energy maxKTMin() const; /** * Helper function used by the interface. */ Energy minKTMax() const; /** * Helper function used by the interface. */ double maxRapidityMin() const; /** * Helper function used by the interface. */ double minRapidityMax() const; /** * Return the minimum allowed rapidity of an outgoing parton * of the given type. The rapidity is measured in the lab * system. */ virtual double minRapidityMax(tcPDPtr p) const; /** * Return the maximum allowed rapidity of an outgoing parton * of the given type. The rapidity is measured in the lab * system. */ virtual double maxRapidityMin(tcPDPtr p) const; private: /** * The minimum allowed value of the transverse momentum of an * outgoing parton. */ Energy theMinKT; /** * The maximum allowed value of the transverse momentum of an * outgoing parton. */ Energy theMaxKT; /** * The minimum allowed rapidity of an outgoing parton. The * rapidity is measured in the lab system. */ double theMinRapidity; /** * The maximum allowed rapidity of an outgoing parton. The * rapidity is measured in the lab system. */ double theMaxRapidity; /** * If non-null only particles matching this object will be affected * by this cut. */ PMPtr theMatcher; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initKTRapidityCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - KTRapidityCut & operator=(const KTRapidityCut &); + KTRapidityCut & operator=(const KTRapidityCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of KTRapidityCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of KTRapidityCut. */ typedef OneCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the KTRapidityCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::KTRapidityCut"; } /** * The name of a file containing the dynamic library where the class * KTRapidityCut is implemented. It may also include several, space-separated, * libraries if the class KTRapidityCut 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 "KTRapidityCut.so"; } }; /** @endcond */ } #endif /* THEPEG_KTRapidityCut_H */ diff --git a/Cuts/MultiCutBase.h b/Cuts/MultiCutBase.h --- a/Cuts/MultiCutBase.h +++ b/Cuts/MultiCutBase.h @@ -1,127 +1,127 @@ // -*- C++ -*- // // MultiCutBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MultiCutBase_H #define THEPEG_MultiCutBase_H // // This is the declaration of the MultiCutBase class. // #include "ThePEG/Interface/Interfaced.h" #include "MultiCutBase.fh" #include "Cuts.fh" namespace ThePEG { /** * This class corresponds to a kinematical cut to be made on a set of * outgoing particles from a hard sub-process. * * There are three virtual functions to be overridden by concrete * sub-classes. minS() and maxS() should return the minimum and * maximum invariant mass of of a set of particle types. In addition * the passCut() function should return true if a set of particle * with a given types and given momenta will pass the cuts. * * @see \ref MultiCutBaseInterfaces "The interfaces" * defined for MultiCutBase. */ class MultiCutBase: public Interfaced { 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 & pv) const; /** * 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 & pv) const; /** * Return true if a set of outgoing particles with typea \a ptype * and corresponding momenta \a p passes the cuts. */ virtual bool passCuts(tcCutsPtr parent, const tcPDVector & ptype, const vector & p) const; /** * Return true if the given vector of particles passes the cuts. */ bool passCuts(tcCutsPtr parent, const tcPVector & p) const; //@} /** * Describe the currently active cuts in the log file. */ virtual void describe() 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 static object used to initialize the description of this class. * Indicates that this is an abstract class without persistent data. */ static AbstractNoPIOClassDescription initMultiCutBase; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MultiCutBase & operator=(const MultiCutBase &); + MultiCutBase & operator=(const MultiCutBase &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MultiCutBase. */ template <> struct BaseClassTrait { /** Typedef of the first base class of MultiCutBase. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of * the MultiCutBase class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MultiCutBase"; } }; /** @endcond */ } #endif /* THEPEG_MultiCutBase_H */ diff --git a/Cuts/MultiJetRegion.h b/Cuts/MultiJetRegion.h --- a/Cuts/MultiJetRegion.h +++ b/Cuts/MultiJetRegion.h @@ -1,205 +1,205 @@ // -*- C++ -*- // // MultiJetRegion.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_MultiJetRegion_H #define ThePEG_MultiJetRegion_H // // This is the declaration of the MultiJetRegion class. // #include "ThePEG/Cuts/JetRegion.h" namespace ThePEG { /** * MultiJetRegion implements pairwise constraints on jets matching several jet regions. * * @see JetRegion * @see JetCuts * * @see \ref MultiJetRegionInterfaces "The interfaces" * defined for MultiJetRegion. */ class MultiJetRegion: public HandlerBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ MultiJetRegion(); /** * The destructor. */ virtual ~MultiJetRegion(); //@} public: /** * Return the jet regions to act on. */ const vector::ptr>& regions() const { return theRegions; } /** * Return the minimum jet-jet invariant mass. */ Energy massMin() const { return theMassMin; } /** * Return the maximum jet-jet invariant mass. */ Energy massMax() const { return theMassMax; } /** * Return the minimum jet-jet lego-plot separation. */ double deltaRMin() const { return theDeltaRMin; } /** * Return the maximum jet-jet lego-plot separation. */ double deltaRMax() const { return theDeltaRMax; } /** * Return the minimum jet-jet rapidity separation. */ double deltaYMin() const { return theDeltaYMin; } /** * Return the maximum jet-jet rapidity separation. */ double deltaYMax() const { return theDeltaYMax; } /** * Return the cut weight encountered from the last call to matches() */ double cutWeight() const { return theCutWeight; } public: /** * Describe the currently active cuts in the log file. */ virtual void describe() const; /** * Return true, if the requirements on the jet regions are fullfilled. */ virtual bool matches(); /** * Return true, if the requirements on two jet regions are fullfilled. */ virtual bool matches(int i, int j); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 jet regions to act on. */ vector::ptr> theRegions; /** * The minimum jet-jet invariant mass. */ Energy theMassMin; /** * The maximum jet-jet invariant mass. */ Energy theMassMax; /** * The minimum jet-jet lego-plot separation. */ double theDeltaRMin; /** * The maximum jet-jet lego-plot separation. */ double theDeltaRMax; /** * The minimum jet-jet rapidity separation. */ double theDeltaYMin; /** * The maximum jet-jet rapidity separation. */ double theDeltaYMax; /** * The cut weight encountered from the last call to matches() */ double theCutWeight; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MultiJetRegion & operator=(const MultiJetRegion &); + MultiJetRegion & operator=(const MultiJetRegion &) = delete; }; } #endif /* ThePEG_MultiJetRegion_H */ diff --git a/Cuts/NJetsCut.h b/Cuts/NJetsCut.h --- a/Cuts/NJetsCut.h +++ b/Cuts/NJetsCut.h @@ -1,170 +1,170 @@ // -*- C++ -*- // // NJetsCut.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_NJetsCut_H #define THEPEG_NJetsCut_H // // This is the declaration of the NJetsCut class. // #include "ThePEG/Cuts/MultiCutBase.h" #include "ThePEG/PDT/MatcherBase.h" namespace ThePEG { /** * NJetsCut is a simple cut on jet multiplicity. * * @see \ref NJetsCutInterfaces "The interfaces" * defined for NJetsCut. */ class NJetsCut: public MultiCutBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ NJetsCut(); /** * The destructor. */ virtual ~NJetsCut(); //@} public: /** @name Overridden virtual functions defined in the base class. */ //@{ /** * Return true if a set of outgoing particles with typea \a ptype * and corresponding momenta \a p passes the cuts. */ virtual bool passCuts(tcCutsPtr parent, const tcPDVector & ptype, const vector & p) const; //@} /** * Describe the currently active cuts in the log file. */ virtual void describe() 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: /** * A matcher for unresolved partons. */ Ptr::ptr unresolvedMatcher; /** * The minimum number of jets. */ int nJetsMin; /** * The maximum number of jets. */ int nJetsMax; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initNJetsCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - NJetsCut & operator=(const NJetsCut &); + NJetsCut & operator=(const NJetsCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of NJetsCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of NJetsCut. */ typedef MultiCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the NJetsCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::NJetsCut"; } /** Return the name of the shared library be loaded to get * access to the NJetsCut class and every other class it uses * (except the base class). */ static string library() { return "JetCuts.so"; } }; /** @endcond */ } #endif /* THEPEG_NJetsCut_H */ diff --git a/Cuts/OneCutBase.h b/Cuts/OneCutBase.h --- a/Cuts/OneCutBase.h +++ b/Cuts/OneCutBase.h @@ -1,193 +1,193 @@ // -*- C++ -*- // // OneCutBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_OneCutBase_H #define THEPEG_OneCutBase_H // // This is the declaration of the OneCutBase class. // #include "ThePEG/Interface/Interfaced.h" #include "OneCutBase.fh" #include "Cuts.fh" namespace ThePEG { /** * This class corresponds to a kinematical cut to be made on a single * outgoing parton from a hard sub-process. * * There are four main virtual functions which must be overridden by * concrete sub-classes. minKT() should return the minimum allowed * transverse momentum of a given type, while minEta() and maxEta() * should return the minimum and maximum allowed pseudo-rapidity for a * particle of a given type as measured in the lab-system. Note that * when applied in the rest frame of a hard sub-process, the * transformation from the lab frame is assumed to be a simple boost * along the z-axis. In addition the passCut() function should return * true if a particle with a given type and given momentum will pass * the cuts. * * @see \ref OneCutBaseInterfaces "The interfaces" * defined for OneCutBase. */ class OneCutBase: public Interfaced { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ OneCutBase() {} /** * The destructor. */ virtual ~OneCutBase(); //@} 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 p) const = 0; /** * 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 p) const = 0; /** * 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 p) const = 0; /** * Return the minimum allowed rapidity of an outgoing parton * of the given type. The rapidity is measured in the lab * system. */ virtual double minRapidityMax(tcPDPtr p) const; /** * Return the maximum allowed rapidity of an outgoing parton * of the given type. The rapidity is measured in the lab * system. */ virtual double maxRapidityMin(tcPDPtr p) const; /** * Return the minimum allowed value of the transverse momentum of * the outgoing parton with the lagrest transverse momentum. This * version simply returns minKt(). */ virtual Energy minMaxKT(tcPDPtr p) const; /** * Return the minimum allowed pseudo-rapidity of the outgoing parton * of the given type with the maximum pseudo-rapidity. The * pseudo-rapidity is measured in the lab system. This version * simply returns minEta(). */ virtual double minMaxEta(tcPDPtr p) const; /** * Return the maximum allowed pseudo-rapidity of the outgoing parton * of the given type with the minimum pseudo-rapidity.. The * pseudo-rapidity is measured in the lab system. This version * simply returns maxEta(). */ virtual double maxMinEta(tcPDPtr p) const; /** * 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; /** * Return true if the given particle passes the cuts. The \a parent * contains information about the kinematics of the hard * sub-process. */ bool passCuts(tcCutsPtr parent, tcPPtr p) const; //@} /** * Describe the currently active cuts in the log file. */ virtual void describe() 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 static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static AbstractNoPIOClassDescription initOneCutBase; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - OneCutBase & operator=(const OneCutBase &); + OneCutBase & operator=(const OneCutBase &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of OneCutBase. */ template <> struct BaseClassTrait { /** Typedef of the first base class of OneCutBase. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of * the OneCutBase class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::OneCutBase"; } }; /** @endcond */ } #endif /* THEPEG_OneCutBase_H */ diff --git a/Cuts/OneJetCut.h b/Cuts/OneJetCut.h --- a/Cuts/OneJetCut.h +++ b/Cuts/OneJetCut.h @@ -1,176 +1,176 @@ // -*- C++ -*- // // OneJetCut.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_OneJetCut_H #define THEPEG_OneJetCut_H // // This is the declaration of the OneJetCut class. // #include "ThePEG/Cuts/MultiCutBase.h" #include "ThePEG/PDT/MatcherBase.h" namespace ThePEG { /** * OneJetsCut is a simple one-jet inclusive cut, requiring at least * one jet above a certain pt in a given rapidity interval. * * @see \ref OneJetCutInterfaces "The interfaces" * defined for OneJetCut. */ class OneJetCut: public MultiCutBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ OneJetCut(); /** * The destructor. */ virtual ~OneJetCut(); //@} public: /** @name Overridden virtual functions defined in the base class. */ //@{ /** * Return true if a set of outgoing particles with typea \a ptype * and corresponding momenta \a p passes the cuts. */ virtual bool passCuts(tcCutsPtr parent, const tcPDVector & ptype, const vector & p) const; //@} /** * Describe the currently active cuts in the log file. */ virtual void describe() 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: /** * A matcher for unresolved partons. */ Ptr::ptr unresolvedMatcher; /** * The minimum pt */ Energy ptMin; /** * The minimum rapidity */ double yMin; /** * The maximum rapidity */ double yMax; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initOneJetCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - OneJetCut & operator=(const OneJetCut &); + OneJetCut & operator=(const OneJetCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of OneJetCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of OneJetCut. */ typedef MultiCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the OneJetCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::OneJetCut"; } /** Return the name of the shared library be loaded to get * access to the OneJetCut class and every other class it uses * (except the base class). */ static string library() { return "JetCuts.so"; } }; /** @endcond */ } #endif /* THEPEG_OneJetCut_H */ diff --git a/Cuts/SimpleDISCut.h b/Cuts/SimpleDISCut.h --- a/Cuts/SimpleDISCut.h +++ b/Cuts/SimpleDISCut.h @@ -1,249 +1,249 @@ // -*- C++ -*- // // SimpleDISCut.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SimpleDISCut_H #define THEPEG_SimpleDISCut_H // // This is the declaration of the SimpleDISCut class. // #include "ThePEG/Cuts/TwoCutBase.h" namespace ThePEG { /** * SimpleDISCut inherits from TwoCutBase and omplements a simple * \f$Q^2\f$ cut on the a scattered lepton, either neutral or charged * current. * * @see \ref SimpleDISCutInterfaces "The interfaces" * defined for SimpleDISCut. */ class SimpleDISCut: public TwoCutBase { public: /** * The default constructor. */ SimpleDISCut() : theMinQ2(1.0*GeV2), theMaxQ2(100.0*GeV2), theMinW2(100.0*GeV2), theMaxW2(1000000.0*GeV2), chargedCurrent(false) {} public: /** @name Overridden virtual functions defined in the base class. */ //@{ /** * Return the minimum allowed squared invariant mass of two outgoing * partons of type \a pi and \a pj. Returns zero. */ virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const; /** * 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. Return the minimum \f$Q^2\f$ if * the incoming and outgoing particles are matching leptons. */ virtual Energy2 minTij(tcPDPtr pi, tcPDPtr po) const; /** * 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 pi, tcPDPtr pj) const; /** * 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. Returns zero. */ virtual Energy minKTClus(tcPDPtr pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr pj) const; /** * 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; protected: /** * Check that the types of the incoming and outgoing particle types * matches a DIS event. */ bool check(long idi, long ido) 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: /** * Helper function used by the interface. */ Energy2 maxMinQ2() const; /** * Helper function used by the interface. */ Energy2 minMaxQ2() const; /** * Helper function used by the interface. */ Energy2 maxMinW2() const; /** * Helper function used by the interface. */ Energy2 minMaxW2() const; private: /** * The minimum \f$Q^2\f$. */ Energy2 theMinQ2; /** * The maximum \f$Q^2\f$. This is only applied as a post-cut. */ Energy2 theMaxQ2; /** * The minimum \f$W^2\f$. This is only applied as a post-cut. */ Energy2 theMinW2; /** * The maximum \f$W^2\f$. This is only applied as a post-cut. */ Energy2 theMaxW2; /** * If true the cut is applied to charged current events, otherwise * it is applied to neutral current events. */ bool chargedCurrent; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initSimpleDISCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - SimpleDISCut & operator=(const SimpleDISCut &); + SimpleDISCut & operator=(const SimpleDISCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of SimpleDISCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of SimpleDISCut. */ typedef TwoCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the SimpleDISCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SimpleDISCut"; } /** Return the name of the shared library be loaded to get * access to the SimpleDISCut class and every other class it uses * (except the base class). */ static string library() { return "SimpleDISCut.so"; } }; /** @endcond */ } #endif /* THEPEG_SimpleDISCut_H */ diff --git a/Cuts/SimpleKTCut.h b/Cuts/SimpleKTCut.h --- a/Cuts/SimpleKTCut.h +++ b/Cuts/SimpleKTCut.h @@ -1,233 +1,233 @@ // -*- C++ -*- // // SimpleKTCut.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SimpleKTCut_H #define THEPEG_SimpleKTCut_H // // This is the declaration of the SimpleKTCut class. // #include "ThePEG/Cuts/OneCutBase.h" namespace ThePEG { /** * This is a very simple concrete sub-class of OneCutbase simply * requiring a minimum transverse momentum of any outgoing * particle. It is also possible to require a minimum and maximum * pseudorapidity. Optionally the restrictions only apply to particles * matching a specific matcher object. * * @see \ref SimpleKTCutInterfaces "The interfaces" * defined for SimpleKTCut. */ class SimpleKTCut: public OneCutBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ SimpleKTCut(Energy minKT=10*GeV) : theMinKT(minKT), theMaxKT(Constants::MaxEnergy), theMinEta(-Constants::MaxRapidity), theMaxEta(Constants::MaxRapidity) {} /** * The destructor. */ virtual ~SimpleKTCut(); //@} public: /** @name Overwritten virtual functions defined in the base class. */ //@{ /** * Return the minimum allowed value of the transverse momentum of an * outgoing parton. */ virtual Energy minKT(tcPDPtr p) const; /** * 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 p) const; /** * 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 p) const; /** * 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: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Helper function used by the interface. */ Energy maxKTMin() const; /** * Helper function used by the interface. */ Energy minKTMax() const; /** * Helper function used by the interface. */ double maxEtaMin() const; /** * Helper function used by the interface. */ double minEtaMax() const; private: /** * The minimum allowed value of the transverse momentum of an * outgoing parton. */ Energy theMinKT; /** * The maximum allowed value of the transverse momentum of an * outgoing parton. */ Energy theMaxKT; /** * The minimum allowed pseudo-rapidity of an outgoing parton. The * pseudo-rapidity is measured in the lab system. */ double theMinEta; /** * The maximum allowed pseudo-rapidity of an outgoing parton. The * pseudo-rapidity is measured in the lab system. */ double theMaxEta; /** * If non-null only particles matching this object will be affected * by this cut. */ PMPtr theMatcher; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initSimpleKTCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - SimpleKTCut & operator=(const SimpleKTCut &); + SimpleKTCut & operator=(const SimpleKTCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of SimpleKTCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of SimpleKTCut. */ typedef OneCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the SimpleKTCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SimpleKTCut"; } /** Return the name of the shared library be loaded to get * access to the SimpleKTCut class and every other class it uses * (except the base class). */ static string library() { return "SimpleKTCut.so"; } }; /** @endcond */ } #endif /* THEPEG_SimpleKTCut_H */ diff --git a/Cuts/TwoCutBase.h b/Cuts/TwoCutBase.h --- a/Cuts/TwoCutBase.h +++ b/Cuts/TwoCutBase.h @@ -1,175 +1,175 @@ // -*- C++ -*- // // TwoCutBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_TwoCutBase_H #define THEPEG_TwoCutBase_H // // This is the declaration of the TwoCutBase class. // #include "ThePEG/Interface/Interfaced.h" #include "TwoCutBase.fh" #include "Cuts.fh" namespace ThePEG { /** * This class corresponds to a kinematical cut to be made on a pair of * particles in a hard sub-process. * * There are six main virtual functions to be overridden by concrete * sub-classes. minsSij(), minTij(), minDeltaR(), minKTClus() and * minDurham() returns the minimum allowed values of pre defined * kinematical variable. In addition the passCut() function should * return true if a pair of particle with a given types and given * momenta will pass the cuts. * * @see \ref TwoCutBaseInterfaces "The interfaces" defined for * TwoCutBase. */ class TwoCutBase: public Interfaced { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ TwoCutBase() {} /** * The destructor. */ virtual ~TwoCutBase(); //@} public: /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return the minimum allowed squared invariant mass of two outgoing * partons of type \a pi and \a pj. */ virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const = 0; /** * 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 pi, tcPDPtr po) const = 0; /** * 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 pi, tcPDPtr pj) const = 0; /** * 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 pi, tcPDPtr pj) const = 0; /** * 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 pi, tcPDPtr pj) const = 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; /** * Return true if the given pair of particles passes the cuts. \a * inci and \a inj indicates if the corresponding particles are * incoming. */ bool passCuts(tcCutsPtr parent, tcPPtr pi, tcPPtr pj, bool inci = false, bool incj = false) const; //@} /** * Describe the currently active cuts in the log file. */ virtual void describe() 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 static object used to initialize the description of this class. * Indicates that this is an abstract class with persistent data. */ static AbstractNoPIOClassDescription initTwoCutBase; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - TwoCutBase & operator=(const TwoCutBase &); + TwoCutBase & operator=(const TwoCutBase &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of TwoCutBase. */ template <> struct BaseClassTrait { /** Typedef of the first base class of TwoCutBase. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of * the TwoCutBase class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::TwoCutBase"; } }; /** @endcond */ } #endif /* THEPEG_TwoCutBase_H */ diff --git a/Cuts/V2LeptonsCut.h b/Cuts/V2LeptonsCut.h --- a/Cuts/V2LeptonsCut.h +++ b/Cuts/V2LeptonsCut.h @@ -1,234 +1,234 @@ // -*- C++ -*- // // V2LeptonsCut.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_V2LeptonsCut_H #define THEPEG_V2LeptonsCut_H // // This is the declaration of the V2LeptonsCut class. // #include "ThePEG/Cuts/MultiCutBase.h" namespace ThePEG { /** * This class inherits from MultiCutBase and describes cuts on the * invariant mass of two final state leptons corresponding to the * decay of a vector boson. It can be used when generating matrix * elements to avoid the long tails of the resonance. * * @see \ref V2LeptonsCutInterfaces "The interfaces" * defined for V2LeptonsCut. */ class V2LeptonsCut: public MultiCutBase { /** * Enumeration of the different families. */ enum Family { electron = 1, /**< Lepton Family. */ muon = 2, /**< Muon Family. */ tau = 4 /**< Tau Family. */ }; /** * Enumeration of charge combinations. */ enum CComb { posneg = 1, /**< charged lepton anti-lepton pair. */ negneu = 2, /**< negative lepton anti-neutrino pair. */ posneu = 4, /**< positive lepton anti-neutrino pair. */ neuneu = 8 /**< neutrino anti-neutrino pair. */ }; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ V2LeptonsCut() : theMinM(70.0*GeV), theMaxM(90.0*GeV), theFamilies(electron|muon), theCComb(negneu|posneu) {} /** * The destructor. */ virtual ~V2LeptonsCut(); //@} public: /** @name Overridden virtual functions defined in the base class. */ //@{ /** * 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 & pv) const; /** * 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 & pv) const; /** * Return true if a set of outgoing particles with typea \a ptype * and corresponding momenta \a p passes the cuts. */ virtual bool passCuts(tcCutsPtr parent, const tcPDVector & ptype, const vector & p) const; //@} /** * Describe the currently active cuts in the log file. */ virtual void describe() const; protected: /** * Check if the PDG id numbers matches this cut. */ bool checkTypes(long id1, long id2) const; /** * Check 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: /** * Helper function used by the interface. */ Energy maxMinM() const; /** * Helper function used by the interface. */ Energy minMaxM() const; private: /** * The minimum invariant mass. */ Energy theMinM; /** * The maximum invariant mass. */ Energy theMaxM; /** * Integer corresponding to the lepton families to match. */ int theFamilies; /** * Integer corresponding to the charge combination to match. */ int theCComb; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initV2LeptonsCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - V2LeptonsCut & operator=(const V2LeptonsCut &); + V2LeptonsCut & operator=(const V2LeptonsCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of V2LeptonsCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of V2LeptonsCut. */ typedef MultiCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the V2LeptonsCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::V2LeptonsCut"; } /** Return the name of the shared library be loaded to get * access to the V2LeptonsCut class and every other class it uses * (except the base class). */ static string library() { return "V2LeptonsCut.so"; } }; /** @endcond */ } #endif /* THEPEG_V2LeptonsCut_H */ diff --git a/EventRecord/Collision.h b/EventRecord/Collision.h --- a/EventRecord/Collision.h +++ b/EventRecord/Collision.h @@ -1,416 +1,416 @@ // -*- C++ -*- // // Collision.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Collision_H #define ThePEG_Collision_H // This is the decalaration of the Collision class. It #include "EventConfig.h" #include "Particle.h" #include "StandardSelectors.h" #include "ThePEG/Vectors/LorentzVector.h" #include "ThePEG/Vectors/LorentzRotation.h" namespace ThePEG { /** * This is the decalaration of the Collision class. It contains all * Particles produced in the generation of a collision * between two particles in an Event. The particles are divided into * Steps corresponding to the particles present after a * given step in the event generation. The collision also carries * information about the SubProcesses in the collision. * * @see Event * @see Step * @see SubProcess * @see Particle */ class Collision: public EventRecordBase { public: /** * EventHandler is a friend of most Event classes. */ friend class EventHandler; /** Most of the Event classes are friends with each other. */ friend class Event; /** Most of the Event classes are friends with each other. */ friend class Step; public: /** * The standard constructor takes a pair of incoming particles as * argument. Optionally can be given a pointer to the Event which * this Collision belongs, and a pointer to the EventHandler * which produced this collision. * @param newIncoming a pair of incoming particles. * @param newEvent the Event to which this Collision belongs. * @param newHandler the handler object in charge of the generation * of this Collision. */ Collision(const PPair & newIncoming, tEventPtr newEvent = tEventPtr(), tcEventBasePtr newHandler = tcEventBasePtr()) : theIncoming(newIncoming), theEvent(newEvent), theHandler(newHandler) { addParticle(incoming().first); addParticle(incoming().second); } /** * The destructor */ ~Collision(); public: /** * Create a new step in this collision, which is a copy of * the last step (if any) and return a pointer to it. * @param newHandler the handler object in charge of generating the * new step. */ tStepPtr newStep(tcEventBasePtr newHandler = tcEventBasePtr()); /** * Add a new Step to this Collision. */ void addStep(tStepPtr s); /** * Return a pointer to the EventHandler which produced this * Collision. May be the null pointer. */ tcEventBasePtr handler() const { return theHandler; } /** * Return a pointer to the Event to which this Collision * belongs. May be the null pointer. */ tEventPtr event() const { return theEvent; } /** @name Functions for accessing particles etc. */ //@{ /** * Extract particles from this Collision which satisfies the * requirements given by an object of the SelectorBase class. * @param r an output iterator specifying where the extracted * (pointers to) particles will be appended. * @param s SelectorBase object defining which particles should be * extracted. */ template void select(OutputIterator r, const SelectorBase & s) const; /** * Extract all final state particles in this Collision. * @param r an output iterator specifying where the extracted * (pointers to) particles will be appended. */ template void selectFinalState(OutputIterator r) const { select(r, SelectFinalState()); } /** * Extract all final state particles in this Collision. * @return a vector of pointers to the extracted particles. */ tPVector getFinalState() const { tPVector ret; selectFinalState(back_inserter(ret)); return ret; } /** * Return a pointer to the primary SubProcess in this Collision. May * be the null pointer. */ tSubProPtr primarySubProcess() const { return subProcesses().empty()? SubProPtr(): subProcesses().front(); } /** * Return the possibly empty list of sub processes in this Collision. */ const SubProcessVector & subProcesses() const { return theSubProcesses; } /** * Return a const pointer to the last step in this Collission. */ tcStepPtr finalStep() const { return steps().empty()? tcStepPtr(): tcStepPtr(steps().back()); } /** * Return a pointer to the last step in this Collission. */ tStepPtr finalStep() { return steps().empty()? StepPtr(): steps().back(); } /** * Return the vector of steps in this Collision. */ const StepVector & steps() const { return theSteps; } /** * Return a pointer to a given Step in this Collision. */ tcStepPtr step(unsigned int i) const { return i < steps().size()? tcStepPtr(theSteps[i]): tcStepPtr(); } /** * Return a reference to the pair of colliding particles in this * Collision. */ const PPair & incoming() const { return theIncoming; } /** * Return the set of remnants in this collision. Remnants are * defined as the daughters of the incoming particles which are not * incoming particles to any SubProcess or children thereof which * are present in the final state. */ tParticleSet getRemnants() const; /** * Return true if the given particle is a remnant of the colliding * particles. Calls the getRemnants method, so to check several * particles it is better to call getRemnants directly and check if * the particles are members of the resulting set by hand. */ bool isRemnant(tPPtr p) const { return member(getRemnants(), p); } //@} /** * Return the vertex position of this Collision. */ const LorentzPoint & vertex() const { return theVertex; } /** * Set the vertex position of this Collision. */ void vertex(const LorentzPoint & p) { theVertex = p; } /** * Transform all particles in this Collision. */ void transform(const LorentzRotation &); /** * Return the total invariant mass squared of the final-state * particles in this Collision. */ Energy2 m2() const { return ( incoming().first->momentum() + incoming().second->momentum() ).m2(); } /** @name Functions for removing entires from a Collision. */ //@{ /** * Remove (recursively) the decay products from a given Particle and * add the particle to the list of final state particles. */ void removeDecay(tPPtr); /** * Remove (recursively) the given Particle from the Collision. If * this was the last daughter of the mother Particle, the latter is * added to the list of final state particles. */ void removeParticle(tPPtr); /** * Remove all steps which have no new particles introduced in them. */ void cleanSteps(); /** * Remove the last Step in this Collision. */ void popStep(); //@} public: /** * Standard function for writing to a persistent stream. */ void persistentOutput(PersistentOStream &) const; /** * Standard functions for reading from a persistent stream. */ void persistentInput(PersistentIStream &, int); /** * Standard Init function. @see Base::Init(). */ static void Init(); protected: /** @name Internal functions for adding and removing entires. */ //@{ /** * Add a new SubProcess to this Collision. */ void addSubProcess(tSubProPtr p); /** * Remove a SubProcess from this Collision. */ void removeSubProcess(tSubProPtr p); /** * Add a range of particles to this Collision. */ template void addParticles(Iterator first, Iterator last); /** * Add a particle to this Collision. */ void addParticle(tPPtr p); /** * Remove a given Particle entry. */ void removeEntry(tPPtr p); //@} /** * Return a reference to the list of all particles in this Collision. */ const ParticleSet & all() const { return allParticles; } /** * Clone this Collision. This also makes clones of all steps, sub * processes and particles in this Collision. */ CollPtr clone() const; /** * Rebind to cloned objects. When a Collision is cloned, a shallow * copy is done first, then all Particles etc, are * cloned, and finally this method is used to see to that the * pointers in the cloned Collision points to the cloned * Particles etc. */ void rebind(const EventTranslationMap & trans); private: /** * The pair of colliding particles. */ PPair theIncoming; /** * A vector of all steps in this Collision. */ StepVector theSteps; /** * A vector of all sub-processes in this Collision. The front * element points to the primary sub-process. */ SubProcessVector theSubProcesses; /** * A set of all particles in this Collision. */ ParticleSet allParticles; /** * A pointer to the Event to which this Collision belongs. */ tEventPtr theEvent; /** * A pointer to the EventHandler which performed the generation * of this Collision. */ tcEventBasePtr theHandler; /** * The vertex position of this Collision */ LorentzPoint theVertex; private: /** * Describe concrete class with persistent data. */ static ClassDescription initCollision; /** * Private default constructor must only be used by the * PersistentIStream class via the ClassTraits class . */ Collision() {} /** * The ClassTraits class must be a friend to be able to * use the private default constructor. */ friend struct ClassTraits; /** * The assignment operator is private and not implemented. */ - Collision & operator=(const Collision &); + Collision & operator=(const Collision &) = delete; /** Output to a standard ostream. */ friend ostream & operator<<(ostream & os, const Collision & c); }; /** Output a Collision to a standard ostream. */ ostream & operator<<(ostream &, const Collision &); /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base class of Collision. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Collision. */ typedef EventRecordBase NthBase; }; /** This template specialization informs ThePEG about the name of * the Collision class and how to create it. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Collision"; } /** Create a Collision object. */ static TPtr create() { return TPtr::Create(Collision()); } }; /** @endcond */ } #ifndef ThePEG_TEMPLATES_IN_CC_FILE #include "Collision.tcc" #endif #endif /* ThePEG_Collision_H */ diff --git a/EventRecord/ColourBase.cc b/EventRecord/ColourBase.cc --- a/EventRecord/ColourBase.cc +++ b/EventRecord/ColourBase.cc @@ -1,58 +1,56 @@ // -*- C++ -*- // // ColourBase.cc is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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. // // // This is the implementation of the non-inlined, non-templated member // functions of the ColourBase class. // #include "ColourBase.h" #include "ThePEG/EventRecord/Particle.h" #include "ThePEG/Utilities/Rebinder.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" using namespace ThePEG; -ColourBase::~ColourBase() {} - EIPtr ColourBase::clone() const { return new_ptr(*this); } bool ColourBase::hasColourLine(tcColinePtr line, bool anti) const { return ( anti? ( antiColourLine() == line ): ( colourLine() == line ) ); } vector ColourBase::antiColourLines() const { return antiColourLine()? vector(1, antiColourLine()): vector(); } vector ColourBase::colourLines() const { return colourLine()? vector(1, colourLine()): vector(); } void ColourBase::rebind(const EventTranslationMap & trans) { theAntiColourLine = trans.translate(theAntiColourLine); theColourLine = trans.translate(theColourLine); } void ColourBase::persistentOutput(PersistentOStream & os) const { os << theAntiColourLine << theColourLine; } void ColourBase::persistentInput(PersistentIStream & is, int) { is >> theAntiColourLine >> theColourLine; } ClassDescription ColourBase::initColourBase; void ColourBase::Init() {} diff --git a/EventRecord/ColourBase.h b/EventRecord/ColourBase.h --- a/EventRecord/ColourBase.h +++ b/EventRecord/ColourBase.h @@ -1,180 +1,173 @@ // -*- C++ -*- // // ColourBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ColourBase_H #define ThePEG_ColourBase_H // This is the declaration of the ColourBase class. #include "ThePEG/EventRecord/EventInfoBase.h" #include "ThePEG/EventRecord/ColourLine.h" namespace ThePEG { /** * ColourBase is the base class to be used to supply a * Particle with information about its colour * state. This base class supplies information about the * ColourLines to which the particle is * connected. This should be sufficient for most uses. If any other * info is required for a particle, it may be supplied by an object of * a sub-class of ColourBase, the additional information * would then have to be extracted by dynamically casting to the * sub-class. * * @see Particle * @see ColourLine */ class ColourBase: public EventInfoBase { public: /** ColourLine is a good friend. */ friend class ColourLine; - -public: - - /** - * Destructor. - */ - virtual ~ColourBase(); public: /** * Return the anti-colour line to which this particle is connected. */ tColinePtr antiColourLine() const { return theAntiColourLine; } /** * Return the colour line to which this particle is connected. */ tColinePtr colourLine() const { return theColourLine; } /** * Return the anti-colour lines to which this particle is * connected. (Always only one colour line for this base class.) */ virtual vector antiColourLines() const; /** * Return the colour lines to which this particle is * connected. (Always only one colour line for this base class.) */ virtual vector colourLines() const; /** * Return true if the particle is connected to the given (\a anti-) * colour \a line. */ virtual bool hasColourLine(tcColinePtr line, bool anti = false) const; /** * Return true if the particle is connected to the given anti-colour * \a line. */ bool hasAntiColourLine(tcColinePtr line) const { return hasColourLine(line, true); } protected: /** * Set the anti-colour \a line to which this particle is connected. */ virtual void antiColourLine(tColinePtr line) { theAntiColourLine = line; } /** * Set the (\a anti-) colour line to which this particle is connected. */ virtual void colourLine(tColinePtr l, bool anti = false) { if ( anti ) antiColourLine(l); else theColourLine = l; } /** * Remove the anti-colour \a line to which this particle is connected. */ virtual void removeAntiColourLine(tcColinePtr line) { if ( antiColourLine() == line ) theAntiColourLine = tColinePtr(); } /** * Remove the (\a anti-) colour line to which this particle is connected. */ virtual void removeColourLine(tcColinePtr line, bool anti = false) { if ( anti ) removeAntiColourLine(line); else if ( colourLine() == line ) theColourLine = tColinePtr(); } public: /** * Rebind to cloned objects. When a ColourBase is cloned, a shallow * copy is done first, then all ColourLines etc, are * cloned, and finally this method is used to see to that the * pointers in the cloned ColourBase points to the cloned * ColourLines etc. */ virtual void rebind(const EventTranslationMap & trans); /** * Standard function for writing to a persistent stream. */ void persistentOutput(PersistentOStream &) const; /** * Standard functions for reading from a persistent stream. */ void persistentInput(PersistentIStream &, int); /** * Standard Init function. @see Base::Init(). */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * The anti-colour line to which this particle is connected. */ ColinePtr theAntiColourLine; /** * The colour line to which this particle is connected. */ ColinePtr theColourLine; private: /** * Describe concrete class with persistent data. */ static ClassDescription initColourBase; /** * Private and non-existent assignment operator. */ - ColourBase & operator=(const ColourBase &); + ColourBase & operator=(const ColourBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ ThePEG_DECLARE_CLASS_TRAITS(ColourBase,EventInfoBase); /** @endcond */ } #endif /* ThePEG_ColourBase_H */ diff --git a/EventRecord/ColourLine.h b/EventRecord/ColourLine.h --- a/EventRecord/ColourLine.h +++ b/EventRecord/ColourLine.h @@ -1,315 +1,315 @@ // -*- C++ -*- // // ColourLine.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ColourLine_H #define ThePEG_ColourLine_H // This is the declaration of the ColourLine class. #include "EventConfig.h" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/EventRecord/ColourSinglet.h" namespace ThePEG { /** * The ColourLine class represents colour lines connecting * Particles. A ColourLine keeps track on * the particles connected to it. To connect a particle to a colour * line the addColoured() and * addAntiColoured() functions should be used - these * will automatically set up the Particle correctly. There is no * method in a Particle to directly set its colour lines. * * If a colour line stems from a colour source or ends in a colour * sink, it is possible to obtain the neighbouring colour lines. This * is also the way junction strings and sinks and sources are * implemented. * * @see Particle * @see ColourBase */ class ColourLine: public EventRecordBase { public: /** @name Creation functions. */ //@{ /** * Create a colour line. Set a pair of colour - anticolour particles * in a newly created colour line. */ static tColinePtr create(tPPtr col, tPPtr anti); /** * Create a colour line. Set a particle for which the created object * is a (anti-)colour line . * @param p the particle to be connected. * @param anti if true, the created object is the anti-colour line * of \a p. */ static tColinePtr create(tPPtr p, bool anti = false); /** * Create a colour line. Set a particle for which the created object * is a anti-colour line . * @param p the particle to be connected. */ static tColinePtr createAnti(tPPtr p) { return create(p, true); } /** * Create a coloue line which is a connector between two junctions, * a source junction with neigboring colour lines \a son1 and \a * son2 and a sink junction with neigboring colour lines \a sin1 and * \a sin2. */ static tColinePtr create(tColinePtr son1, tColinePtr son2, tColinePtr sin1, tColinePtr sin2); //@} /** * Destructor. */ virtual ~ColourLine(); public: /** @name Access particles connected to the colour line. */ //@{ /** * Return the vectors of particles connected to this line with their * colours. */ const tPVector & coloured() const { return theColoured; } /** * Return the vectors of particles connected to this line with their * anti-colours. */ const tPVector & antiColoured() const { return theAntiColoured; } /** * Return the first particle on this colour line. Returns null if * this line stems from a colour source. If the particle is * outgoing, its anti colour is connected, otherwise its colour is * connected. */ tPPtr startParticle() const; /** * Return the last particle on this colour line. Returns null if * this line ends in a colour sink. If the particle is outgoing, its * colour is connected, otherwise its anti colour is connected. */ tPPtr endParticle() const; //@} /** @name Add and remove particles in a colour line. */ //@{ /** * Add a particle having this as a anti-colour line. */ void addAntiColoured(tPPtr); /** * Add a particle having this as a (anti-)colour line. * @param p the particle to be connected. * @param anti if true, this is the anti-colour line of \a p. */ void addColoured(tPPtr p, bool anti = false); /** * Add a particle having this as a anti-colour line at a given index. */ void addAntiColouredIndexed(tPPtr p, int index); /** * Add a particle having this as a (anti-)colour line at a given index. * @param p the particle to be connected. * @param anti if true, this is the anti-colour line of \a p. */ void addColouredIndexed(tPPtr p, int index, bool anti=false); /** * Remove a particle having this as an anti-colour line. */ void removeAntiColoured(tPPtr); /** * Remove a particle having this as a (anti-)colour line. * @param p the particle to be removed. * @param anti if true, this is the anti-colour line of \a p. */ void removeColoured(tPPtr p, bool anti = false); //@} /** @name Functions for junction strings. */ //@{ /** * If this colour line ends in a colour sink, these two colour lines * ends in the same. */ tColinePair sinkNeighbours() const { return theSinkNeighbours; } /** * If this colour line stems from a colour source (sink), these two colour * lines stems from (ends in) the same. * @param anti if true return sinkNeighbours(). */ tColinePair sourceNeighbours(bool anti = false) const { return anti? theSinkNeighbours: theSourceNeighbours; } /** * Add two colour lines as neighbours to this line. Afterwards all * three will end in the same sink. Also the neighbors are set up * correspondingly. */ void setSinkNeighbours(tColinePtr l1, tColinePtr l2) { theSinkNeighbours.second = l1->theSinkNeighbours.second = l2; l2->theSinkNeighbours.second = theSinkNeighbours.first = l1; l1->theSinkNeighbours.first = l2->theSinkNeighbours.first = this; } /** * Add two colour lines as neighbours to this line. Afterwards all * three will stem from the same source. Also the neighbors are set * up correspondingly. */ void setSourceNeighbours(tColinePtr l1, tColinePtr l2) { theSourceNeighbours.second = l1->theSourceNeighbours.second = l2; l2->theSourceNeighbours.second = theSourceNeighbours.first = l1; l1->theSourceNeighbours.first = l2->theSourceNeighbours.first = this; } //@} /** * Join with the given ColourLine. The colour of the given \a line * is joined so that it will flow into this line, ie. the * anti-coloured particle in the end of the \a line will become * connected to the coloured particle in the of this line. After * the joining the given \a line will not be connected to * anything. */ bool join(ColinePtr line); /** * Return the first (anti-)coloured parton among the given range of * particles which is on this colour line. */ template typename std::iterator_traits::value_type getColouredParticle(Iterator first, Iterator last, bool anti = false) const { typedef typename std::iterator_traits::value_type ParticlePointer; for ( ; first != last; ++first ) if ( (**first).coloured() && (**first).hasColourLine(this, anti) ) return *first; return ParticlePointer(); } /** * Write out information about this colour line to the stream. */ void write(ostream & os, tcEventPtr event, bool anti) const; public: /** * 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: /** * The particles connecting to this colour line, following the * incoming colour flow. */ tPVector theColoured; /** * The particles connecting to this colour line, following the * outgoing colour flow. */ tPVector theAntiColoured; /** * If this colour line stems from a colour source, these two colour * lines stems from the same. */ tColinePair theSourceNeighbours; /** * If this colour line ends in a colour sink, these two colour lines * ends in the same. */ tColinePair theSinkNeighbours; /** * Colour lines which are connectors between two junctions do not * have a particle which owns it, instead it is owned by one of the * source neighbours. */ vector orphanedConnectors; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initColourLine; /** * Private and non-existent assignment operator. */ - ColourLine & operator=(const ColourLine &); + ColourLine & operator=(const ColourLine &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * The following template specialization informs ThePEG about the * base class of ColourLine. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of ColourLine. */ typedef EventRecordBase NthBase; }; /** * The following template specialization informs ThePEG about the * name of this class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::ColourLine"; } /** Return the name of the shared library to be loaded to get * access to this class. */ static string library() { return "ColourLine.so"; } }; /** @endcond */ } #endif /* ThePEG_ColourLine_H */ diff --git a/EventRecord/Event.h b/EventRecord/Event.h --- a/EventRecord/Event.h +++ b/EventRecord/Event.h @@ -1,474 +1,474 @@ // -*- C++ -*- // // Event.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Event_H #define ThePEG_Event_H // This is the decalaration of the Event class. #include "Particle.h" #include "StandardSelectors.h" #include "SubProcess.h" #include "ThePEG/Utilities/Named.h" namespace ThePEG { /** * The Event class contains all Particles produced in the generation * of an event. The particles are divided into Collisions * corresponding to the actiual collisions between incoming particles * in a bunch crossing. * * Event inherits from the Named which holds the name of an event. * * @see Collision * @see Step * @see SubProcess * @see Particle * @see SelectorBase * @see Named * */ class Event : public EventRecordBase, public Named { public: /** * EventHandler is a friend of most Event classes. */ friend class EventHandler; /** Most of the Event classes are friends with each other. */ friend class Collision; /** Map colour lines to indices. */ typedef map ColourLineMap; public: /** * The standard constructor for an Event takes as arguments a pair * of colliding particles (corresponding to the primary collision in * case of multiple collisions in an event). Optionally a pointer to * the EventHandler which performed the generation, an event name * and event number can be given. * @param newIncoming a pair of incoming particles to the prinary Collision. * @param newHandler the handler object in charge of the generation * of this Event. * @param newName the name of this event. * @param newNumber the number of this event. * @param weight the weight of this event */ Event(const PPair & newIncoming, tcEventBasePtr newHandler = tcEventBasePtr(), string newName = "", long newNumber = -1, double weight = 1.0); /** * The copy constructor. */ Event(const Event&); /** * The destructor. */ ~Event(); /** * Returns a full clone of this Event. All collisions, * Particles etc. in this Event are cloned. */ EventPtr clone() const; public: /** * Return a pointer to the EventHandler which produced this * Event. May be the null pointer. */ tcEventBasePtr handler() const { return theHandler; } /** @name Functions for accessing particles etc. */ //@{ /** * Extract particles from this event which satisfies the * requirements given by an object of the SelectorBase class. * @param r an output iterator specifying where the extracted * (pointers to) particles will be appended. * @param s SelectorBase object defining which particles should be * extracted. */ template void select(OutputIterator r, const SelectorBase & s) const; /** * Extract all final state particles in this Event. * @param r an output iterator specifying where the extracted * (pointers to) particles will be appended. */ template void selectFinalState(OutputIterator r) const { select(r, SelectFinalState()); } /** * Extract all final state particles in this Event. * @param c a container where the extracted (pointers to) particles * will be appended. */ template void getFinalState(Container & c) const { selectFinalState(inserter(c)); } /** * Extract all final state particles in this Event. * @return a vector of pointers to the extracted particles. */ tPVector getFinalState() const { tPVector ret; selectFinalState(back_inserter(ret)); return ret; } /** * Return a pointer to the primary Collision in this Event. May * be the null pointer. */ tCollPtr primaryCollision() const { return collisions().empty() ? tCollPtr() : tCollPtr(collisions()[0]); } /** * Return a possibly empty list of collisions in this Event. */ const CollisionVector & collisions() const { return theCollisions; } /** * Return a pointer to the primary SubProcess in the prinmary * Collision in this Event. May be the null pointer. */ tSubProPtr primarySubProcess() const; /** * Return a reference to the pair of colliding particles in the * primary Collision of this Event. */ const PPair & incoming() const { return theIncoming; } //@} /** * Create a new Collision in this event and return a pointer to it. */ tCollPtr newCollision(); /** * Create a new Step in the current Collision, which is a copy of * the last Step (if any) and return a pointer to it. If no * collision exists, one will be added. */ tStepPtr newStep(); /** * Transform all particles in this Event. */ void transform(const LorentzRotation &); /** * Return the number assigned to this Event. The name is accessed * with the name() method of the Named base class. */ long number() const { return theNumber; } /** * Return the index of the given colour line. */ int colourLineIndex(tcColinePtr) const; /** @name Functions for removing entires from an Event. */ //@{ /** * Remove (recursively) the decay products from a given Particle and * add the particle to the list of final state particles. */ void removeDecay(tPPtr); /** * Remove the given Particle from the Collision. If this was the * last daughter of the mother Particle, the latter is added to the * list of final state particles. */ void removeParticle(tPPtr); /** * Remove all steps which have no new particles introduced in them. */ void cleanSteps(); //@} /** * Return the weight associated with this event. */ double weight() const { return theWeight; } /** * Return an optional named weight associated to this event. Returns * 0, if no weight identified by this name is present. */ double optionalWeight(const string& name) const; /** * Return the optional named weights associated to this event. */ const map& optionalWeights() const { return theOptionalWeights; } /** * Print this Event in Graphviz format on the standard output. */ void printGraphviz() const; /** * Set the weight associated with this event. */ void weight(double w) { theWeight = w; } /** * Set an optional named weight associated to this event. */ void optionalWeight(const string& name, double value); /** * Access the optional named weights associated to this event. */ map& optionalWeights() { return theOptionalWeights; } /** * Set event info. */ void setInfo(tcEventBasePtr newHandler, string newName, long newNumber, double weight); /** * Add a collision to this Event. */ void addCollision(tCollPtr c); /** * Set the primary collision in this Event. */ void primaryCollision(tCollPtr c); protected: /** * Add a range of particles to this Collision. */ template void addParticles(Iterator first, Iterator last) { while ( first != last ) addParticle(*first++); } /** * Add a particle to this Collision. */ void addParticle(tPPtr p); /** * Add a new SubProcess to this Event. For book keeping purposes * only. The sub-processes are accessed from the different * Collisions in this Event. */ void addSubProcess(tSubProPtr p) { if ( p ) allSubProcesses.insert(p); } /** * Remove a SubProcess from this Event. */ void removeSubProcess(tSubProPtr p) { allSubProcesses.erase(p); } /** * Add a new Step to this Collision. For book keeping purposes * only. The steps are accessed from the different Collisions in * this Event. */ void addStep(tStepPtr s) { if ( s ) allSteps.insert(s); } /** * Remove a given Particle entry. */ void removeEntry(tPPtr p); /** * Rebind to cloned objects. When an Event is cloned, a shallow * copy is done first, then all Particles etc, are * cloned, and finally this method is used to see to that the * pointers in the cloned Event points to the cloned * Particles etc. */ void rebind(const EventTranslationMap & trans); public: /** * Standard function for writing to a persistent stream. */ void persistentOutput(PersistentOStream &) const; /** * Standard functions for reading from a persistent stream. */ void persistentInput(PersistentIStream &, int); /** * Standard Init function. @see Base::Init(). */ static void Init(); private: /** * The pair of colliding particles. */ PPair theIncoming; /** * A vector of collisions in this Event. */ CollisionVector theCollisions; /** * A set of all particles in this Event. */ StepSet allSteps; /** * A set of all sub-processes in this Event. */ SubProcessSet allSubProcesses; /** * A set of all particles in this Event. */ ParticleSet allParticles; /** * A pointer to the EventHandler which performed the generation * of this Event. */ tcEventBasePtr theHandler; /** * Map of all registered colour lines to their index numbers. */ mutable ColourLineMap theColourLines; /** * The number assigned to this Event. */ long theNumber; /** * The weight associated with this event. */ double theWeight; /** * Optional named weights */ map theOptionalWeights; /** * Counter to keep track of particle numbering. */ long theParticleNumber; public: /** * Print out debugging information for this object on std::cerr. To * be called from within a debugger via the debug() function. */ virtual void debugme() const; private: /** * Describe concrete class with persistent data. */ static ClassDescription initEvent; /** * Private default constructor must only be used by the * PersistentIStream class via the ClassTraits class . */ Event() : theNumber(-1), theWeight(1.0), theParticleNumber(0) {} /** * The ClassTraits class must be a friend to be able to * use the private default constructor. */ friend struct ClassTraits; /** * The assignment operator is private and not implemented. */ - Event & operator=(const Event&); + Event & operator=(const Event&) = delete; }; /** Output a Event to a standard ostream. */ ostream & operator<<(ostream &, const Event &); /** Print event tree in Graphviz format, ready for plotting. */ void printGraphviz(ostream &, tcEventPtr); /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base class of Event. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Collision. */ typedef EventRecordBase NthBase; }; /** This template specialization informs ThePEG about the name of * the Event class and how to create it. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Event"; } /** Create a Event object. */ static TPtr create() { return TPtr::Create(Event()); } }; /** @endcond */ } #include "Collision.h" inline ThePEG::tSubProPtr ThePEG::Event::primarySubProcess() const { return collisions().empty() ? ThePEG::tSubProPtr() : ThePEG::tSubProPtr(primaryCollision()->primarySubProcess()); } namespace ThePEG { template void Event::select(OutputIterator r, const SelectorBase & s) const { if ( s.allCollisions() ) { for ( CollisionVector::const_iterator it = theCollisions.begin(); it != theCollisions.end(); ++it ) (**it).select(r, s); } else { primaryCollision()->select(r, s); } } } #endif /* ThePEG_Event_H */ diff --git a/EventRecord/EventInfoBase.h b/EventRecord/EventInfoBase.h --- a/EventRecord/EventInfoBase.h +++ b/EventRecord/EventInfoBase.h @@ -1,70 +1,70 @@ // -*- C++ -*- // // EventInfoBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_EventInfoBase_H #define ThePEG_EventInfoBase_H // This is the declaration of the EventInfoBase class. #include "ThePEG/EventRecord/EventConfig.h" #include "ThePEG/Utilities/ClassDescription.h" namespace ThePEG { /** * EventInfoBase is a base class for information objects. It is used * as a base class for classes representing user-defined information * which may be associated with a Particle. The class itself is * practically empty. Information added in sub-classes can be accessed * from a Particle by the Particle::getInfo() function and the * resulting pointers need to be dynamically cast to check if they are * of a desired class. */ class EventInfoBase: public EventRecordBase { public: /** * Rebind to cloned objects. If an EventInfoBase is cloned together * with a whole Event and this has pointers to other event record * objects, these should be rebound to their clones in this * function. */ virtual void rebind(const EventTranslationMap & ) {} /** * Standard Init function. @see Base::Init(). */ static void Init() {} /** * Standard clone method. */ virtual EIPtr clone() const { return new_ptr(*this); } private: /** * Describe concrete class without persistent data. */ static NoPIOClassDescription initEventInfoBase; /** * Private and non-existent assignment operator. */ - EventInfoBase & operator=(const EventInfoBase &); + EventInfoBase & operator=(const EventInfoBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ ThePEG_DECLARE_CLASS_TRAITS(EventInfoBase,EventRecordBase); /** @endcond */ } #endif /* ThePEG_EventInfoBase_H */ diff --git a/EventRecord/HelicityVertex.h b/EventRecord/HelicityVertex.h --- a/EventRecord/HelicityVertex.h +++ b/EventRecord/HelicityVertex.h @@ -1,222 +1,222 @@ // -*- C++ -*- // // HelicityVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_HelicityVertex_H #define ThePEG_HelicityVertex_H // This is the declaration of the HelicityVertex class. #include "HelicityVertex.fh" #include "ThePEG/EventRecord/EventConfig.h" #include "ThePEG/Utilities/ClassDescription.h" #include "RhoDMatrix.h" #include "ThePEG/Utilities/Rebinder.h" #include "ThePEG/Helicity/HelicityDefinitions.h" namespace ThePEG { /** * The HelicityVertex class is designed to store the helicity * amplitude expression for the matrix element for use by the spin * correlation algorithm. It implements the storage of the pointers * to the incoming and outgoing particles at the vertex and virtual * methods for calculating the rho and D matrices. The concrete * implementations of the vertices for specific processes, eg * production or decay, inherit from this and implement the storage * of the matrix element together with the set and get methods. * * These methods are then called by the SpinInfo class to perform the * calculations. * * * @see SpinInfo * * @author Peter Richardson * */ class HelicityVertex: public EventInfoBase { public: /** * Output the spin density matrix for debugging purposes. */ friend ostream & operator<<(ostream & os, const HelicityVertex & vert); public: /** A vector of SpinInfo objects. */ typedef vector SpinVector; public: /** * Standard Init function. */ static void Init(); /** * Rebind to cloned objects. If a HelicityVertex is cloned together * with a whole Event and this has pointers to other event record * objects, these should be rebound to their clones in this * function. */ virtual void rebind(const EventTranslationMap & trans); public: /** @name Access the incoming and outgoing particles. */ //@{ /** * Access the spin of the incoming particles. */ const SpinVector & incoming() const {return _incoming;} /** * Access the spin of the outgoing particles. */ const SpinVector & outgoing() const {return _outgoing;} /** * Add the spin of an incoming particle. * @param spin the spin of the particle. * @param loc is set to the position in the list of incoming spins. */ void addIncoming(tcSpinPtr spin, int & loc) { if(loc<0) { _incoming.push_back(spin); loc=_incoming.size()-1; } else { _incoming[loc] = spin; } } /** * Add the spin of an outgoing particle. * @param spin the spin of the particle. * @param loc is set to the position in the list of outgoing spins. */ void addOutgoing(tcSpinPtr spin, int & loc) { if(loc<0) { _outgoing.push_back(spin); loc=_outgoing.size()-1; } else { _outgoing[loc]= spin; } } /** * Reset the \a spin of the incoming particle at position \a loc. */ void resetIncoming(tcSpinPtr spin, int loc) { assert( loc < int(_incoming.size()) && loc >= 0 ); _incoming[loc]=spin; } /** * Reset the \a spin of the outgoing particle at position \a loc. */ void resetOutgoing(tcSpinPtr spin, int loc) { assert( loc < int(_outgoing.size()) && loc >= 0 ); _outgoing[loc]=spin; } //@} public: /** @name Mthods to calculate rho and D matrices. */ //@{ /** * Get the rho matrix for the outgoing particle at position \a loc. */ virtual RhoDMatrix getRhoMatrix(int loc,bool recursive) const = 0; /** * Get the D matrix for the incoming particle at position \a loc. */ virtual RhoDMatrix getDMatrix(int loc) const = 0; //@} private: /** * Describe an abstract base class without persistent data. */ static AbstractNoPIOClassDescription initHelicityVertex; /** * Private and non-existent assignment operator. */ - HelicityVertex & operator=(const HelicityVertex &); + HelicityVertex & operator=(const HelicityVertex &) = delete; private: /** * Pointers to the incoming particle spins at the vertex. */ SpinVector _incoming; /** * Pointers to the outgoing particle spins at the vertex. */ SpinVector _outgoing; }; /** * Output operator */ inline ostream & operator<<(ostream & os, const HelicityVertex & vert) { os << "the incoming particles at the vertex are" << endl; for(unsigned int ix=0;ix struct BaseClassTrait : public ClassTraitsType { /** Typedef of the base class of HelicityVertex. */ typedef EventInfoBase NthBase; }; /** * This template specialization informs ThePEG about the name of * the HelicityVertex class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** * Return the class name. */ static string className() { return "ThePEG::HelicityVertex"; } }; /** @endcond */ } #endif /* ThePEG_HelicityVertex_H */ diff --git a/EventRecord/MultiColour.h b/EventRecord/MultiColour.h --- a/EventRecord/MultiColour.h +++ b/EventRecord/MultiColour.h @@ -1,183 +1,183 @@ // -*- C++ -*- // // MultiColour.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MultiColour_H #define THEPEG_MultiColour_H // // This is the declaration of the MultiColour class. // #include "ThePEG/EventRecord/ColourBase.h" namespace ThePEG { /** * This class is used to store colour information of RemnantParticle * objects and other particle classes with complicated colour * structures. Rather than just having a */ class MultiColour: public ColourBase { public: using ColourBase::colourLine; using ColourBase::antiColourLine; /** * Return the anti-colour lines to which this particle is * connected. */ virtual vector antiColourLines() const; /** * Return the colour lines to which this particle is * connected. */ virtual vector colourLines() const; /** * Add the given (\a anti-) colour \a line to the particle. If the base * class has no (anti-) colour line, it will also be set. */ virtual void colourLine(tColinePtr line, bool anti = false); /** * Add the given (\a anti-) colour \a line to the particle. If the base * class has no (anti-) colour line, it will also be set. */ virtual void colourLine(tColinePtr line, int index, bool anti = false); /** * Add the given anti-colour \a line to the particle. If the base * class has no anti-colour line, it will also be set. */ virtual void antiColourLine(tColinePtr line); /** * Add the given anti-colour \a line to the particle. If the base * class has no anti-colour line, it will also be set. */ virtual void antiColourLine(tColinePtr line, int index); /** * Remove the given (\a anti-) colour \a line from the particle. If * the line is the colourLine() of the base class, it will be * removed there as well. */ virtual void removeColourLine(tcColinePtr line, bool anti = false); /** * Remove the given anti-colour \a line from the particle. If the * line is the antiColourLine() of the base class, it will be * removed there as well. */ virtual void removeAntiColourLine(tcColinePtr line); /** * Return true if the particle is connected to the given (\a anti-) * colour \a line. */ virtual bool hasColourLine(tcColinePtr line, bool anti = 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(); /** * Standard clone method. */ virtual EIPtr clone() const { return new_ptr(*this); } private: /** * The set of colour lines to which a particle is attached. */ list theColourLines; /** * The set of anti-colour lines to which a particle is attached. */ list theAntiColourLines; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initMultiColour; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MultiColour & operator=(const MultiColour &); + MultiColour & operator=(const MultiColour &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MultiColour. */ template <> struct BaseClassTrait { /** Typedef of the first base class of MultiColour. */ typedef ColourBase NthBase; }; /** This template specialization informs ThePEG about the name of * the MultiColour class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MultiColour"; } /** * The name of a file containing the dynamic library where the class * MultiColour is implemented. It may also include several, space-separated, * libraries if the class MultiColour 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 "MultiColour.so"; } }; /** @endcond */ } #endif /* THEPEG_MultiColour_H */ diff --git a/EventRecord/Particle.h b/EventRecord/Particle.h --- a/EventRecord/Particle.h +++ b/EventRecord/Particle.h @@ -1,1180 +1,1180 @@ // -*- C++ -*- // // Particle.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Particle_H #define ThePEG_Particle_H // This is the decalaration of the Particle class. #include "EventConfig.h" #include "ThePEG/Vectors/Lorentz5Vector.h" #include "ThePEG/Vectors/LorentzRotation.h" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/EventRecord/MultiColour.h" #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/PDT/ParticleData.h" namespace ThePEG { /** * The Particle class is used to describe an instance of a * particle. Properties of the corresponding particle type can be * accessed through a pointer to a ParticleData object. * * A Particle object contains pointers to other particles, such as a * list of parents and a list of children. It may also contain a * pointer to the previous or next instance of the same physical * particle if the properties of a given particle has been changed * during the generation. Coloured particles contains pointers to * ColourLine defining the colour connections to other particles. * * The Particle also has a pointer to the Step object where it was * first introduced in the Event. * * When printing a particle the format of the output is governed by * the static outputFormat string. When a particle is sent * to an ostream, the format string is written but with * keys prefixed by the \% character replaced with * infromation about the particle as follows:
\%\% is * replaced by a singel \%
\%C sets a flag so * that subsequent output of children and parents etc. will contain * colour information.
\%n is replaced by the particles * number in a fied ow width
\%s is replaced by the name * of the particle
\%i is replaced by the id number of * the particle type
\%x, \%y, \%z, \%e, \%m is replaced by * the x-, y-, z-, energy- and mass-component of the particles * momentum respectively
\%dx, \%dy, \%dz, \%dt, \%dT is * replaced by the x-, y-, z-, time- and invariant time-component of * the particles lifeLength respectively
\%Vx, \%Vy, \%Vz, * \%Vt is replaced by the x-, y-, z- and time-component of the * creation point relative to the vertex of the * collision.
\%Lx, \%Ly, \%Lz, \%Lt is replaced by the x-, * y-, z- and time-component of the creation point in the current * lab-system.
\%p[,] is replaced by a list (of numbers) * of the particles parents enclosed by [ and ] * and separated by ,, The parent from which the particle * inherits its (anti-) colour is marked by a (-)+
* \%c(,) is replaced by a list (of numbers) of the * particles children enclosed by ( and ) and * separated by ,, The child which inherits the particles * (anti-) colour is marked by a (-)+
\%> is replaced * by the number of the colour neighbor
\%< is * replaced by the number of the anti-colour neighbor
* \%^ is replaced by the number of the previous instance of * the same physical particle
\%v is replaced by the * number of the next instance of the same physical particle.
* \%l{,} is replaced by the indices of the colour lines to * which this particle is connected enclosed by { and * } and separated by ,, The line corresponding * to the (anti-) colour of the particle is prefixed by a (-)+ * * @see Event * @see Collision * @see Step * @see SubProcess * @see Lorentz5Vector * @see ColourLine * @see ColourBase */ class Particle: public EventRecordBase { public: /** Most of the Event classes are friends with each other. */ friend class Event; /** Most of the Event classes are friends with each other. */ friend class Collision; /** Most of the Event classes are friends with each other. */ friend class Step; /** Most of the Event classes are friends with each other. */ friend class SubProcess; /** ParticleData needs to be a friend. */ friend class ParticleData; struct ParticleRep; public: /** * Standard Constructor. Note that the default constructor is * private - there is no particle without a pointer to a * ParticleData object. */ Particle(tcEventPDPtr newData) : theData(newData), theRep(0) {} /** * Copy constructor. */ Particle(const Particle &); /** * Destructor. */ virtual ~Particle(); //@} /** @name Functions relating to ancestry of particles. */ //@{ /** * Returns true if and only if this particle has decayed. */ bool decayed() const { return hasRep() && !rep().theChildren.empty(); } /** * The list of decay products. */ const ParticleVector & children() const { static const ParticleVector null; return hasRep() ? rep().theChildren : null; } /** * Add a child (the childs parent pointer will be set accordingly). */ void addChild(tPPtr c) { rep().theChildren.push_back(c); (c->rep()).theParents.push_back(this); } /** * Remove the given child from the list of children of this particle * (the corresponding parent pointer of the child will also be * removed). */ void abandonChild(tPPtr child) { removeChild(child); child->removeParent(this); } /** * The list of parent particles. */ const tParticleVector & parents() const { static const tParticleVector null; return hasRep() ? rep().theParents : null; } /** * Return a set of neighboring particles coming from the same decay * as this one. The return value is a newly recalculated set * every time. It must be stored to be used further, do not directly call * e.g. siblings().begin() or siblings().end()! */ tParticleSet siblings() const; /** * Undo the decay of this particle, removing all children (and * grand children ...) from the event record */ void undecay() { if ( hasRep() ) { rep().theChildren.clear(); rep().theNext = tPPtr(); } } /** * If this particle has decayed set the corresponding decay mode. */ void decayMode(tDMPtr dm) { rep().theDecayMode = dm; } /** * If this particle has decayed get the corresponding decay mode. */ tDMPtr decayMode() const { return hasRep() ? rep().theDecayMode : tDMPtr(); } /** * Next instance. Pointer to another instance of the same * physical particle in later steps. */ tPPtr next() const { return hasRep() ? rep().theNext : PPtr(); } /** * Previous instance. Pointer to another instance of the same * physical particle in earlier steps. */ tPPtr previous() const { return hasRep() ? rep().thePrevious : tPPtr(); } /** * Original instance. If there exists another previous instance of * this particle return this instance (recursively). */ tcPPtr original() const { return previous() ? tcPPtr(previous()->original()) : tcPPtr(this); } /** * Original instance. If there exists another previous instance of * this particle return this instance (recursively). */ tPPtr original() { return previous() ? previous()->original() : tPPtr(this); } /** * Final instance. If there exists another subsequent instance of * this particle return this instance (recursively). */ tcPPtr final() const { return next() ? tcPPtr(next()->final()) : tcPPtr(this); } /** * Final instance. If there exists another subsequent instance of * this particle return this instance (recursively). */ tPPtr final() { return next() ? next()->final() : tPPtr(this); } //@} /** @name Relations to the Event and Step. */ //@{ /** * Get the first Step object where this particle occurred. */ tStepPtr birthStep() const { return hasRep() ? rep().theBirthStep : tStepPtr(); } /** * Get the order-number for this particle in the current event. */ int number() const { return hasRep() ? rep().theNumber : 0; } //@} /** @name Access the underlying ParticleData object. */ //@{ /** * Access the ParticleData object of this particle type */ const ParticleDataClass & data() const { return *theData; } /** * Access the ParticleData object of this particle type */ tcEventPDPtr dataPtr() const { return theData; } /** * Return the PDG name of this particle. */ const string & PDGName() const { return data().PDGName(); } /** * Return the PDG id number of this particle. */ long id() const { return data().id(); } //@} /** @name Functions to access the momentum. */ //@{ /** * Return the momentum of this particle. */ const Lorentz5Momentum & momentum() const { return theMomentum; } /** * Set the 3-momentum of this particle. The energy is set to be * consistent with the mass. */ void set3Momentum(const Momentum3 & p) { theMomentum.setVect(p); theMomentum.rescaleEnergy(); } /** * Set the momentum of this particle. Afterwards, the underlying * Lorentz5Momentum may have inconsistent mass. */ void setMomentum(const LorentzMomentum & p) { theMomentum = p; } /** * Set the momentum and mass. */ void set5Momentum(const Lorentz5Momentum & p) { theMomentum = p; } /** * Acces the mass of this particle. */ Energy mass() const { return momentum().mass(); } /** * Acces the mass of this particle type. */ Energy nominalMass() const { return data().mass(); } /** * Get the scale at which this particle is considered resolved. */ Energy2 scale() const { return hasRep() ? rep().theScale : -1.0*GeV2; } /** * Set the scale at which this particle is considered resolved. */ void scale(Energy2 q2) { rep().theScale = q2; } /** * Get the scale above which this particle should * not radiate. */ Energy2 vetoScale() const { return hasRep() ? rep().theVetoScale : -1.0*GeV2; } /** * Set the scale above which this particle should * not radiate. */ void vetoScale(Energy2 q2) { rep().theVetoScale = q2; } /** * Return the transverse mass (squared), calculated from the energy * and the longitudinal momentum. */ Energy2 mt2() const { return sqr(momentum().t()) - sqr(momentum().z()); } /** * Return the transverse mass (squared), calculated from the energy * and the longitudinal momentum. */ Energy mt() const { return sqrt(mt2()); } /** * Return the transverse mass (squared), calculated from the mass * and the transverse momentum. */ Energy2 perpmass2() const { return momentum().perp2() + momentum().mass2(); } /** * Return the transverse mass (squared), calculated from the mass * and the transverse momentum. */ Energy perpmass() const { return sqrt(perpmass2()); } /** * Return the (pseudo) rapidity. */ double rapidity() const { return ( Pplus() > ZERO && Pminus() > ZERO )? 0.5*log(Pplus()/Pminus()) : Constants::MaxFloat; } /** * Return the (pseudo) rapidity. */ double eta() const { Energy rho = momentum().rho(); return rho > abs(momentum().z())? 0.5*log((rho+momentum().z())/(rho-momentum().z())) : Constants::MaxFloat; } /** * Return the positive and negative light-cone momenta. */ Energy Pplus() const { return momentum().plus(); } /** * Return the positive and negative light-cone momenta. */ Energy Pminus() const { return momentum().minus(); } //@} /** @name Functions to access the position. */ //@{ /** * The creation vertex of this particle. The point is given * relative to the collision vertex. */ const LorentzPoint & vertex() const { static const LorentzPoint null; return hasRep() ? rep().theVertex : null; } /** * The creation vertex of this particle. The absolute * position in the lab is given. */ LorentzPoint labVertex() const; /** * The decay vertex of this particle. The point is given * relative to the collision vertex. */ LorentzPoint decayVertex() const { return vertex() + lifeLength(); } /** * The decay vertex of this particle. The absolute * position in the lab is given. */ LorentzPoint labDecayVertex() const { return labVertex() + lifeLength(); } /** * The life time/length. Return the Lorentz vector connecting the * creation to the decay vertes. */ const Lorentz5Distance & lifeLength() const { static const Lorentz5Distance null; return hasRep() ? rep().theLifeLength : null; } /** * Set the creation vertex relative to the collision vertex. */ void setVertex(const LorentzPoint & p) { rep().theVertex = p; } /** * Set the creation vertex in the lab frame of this particle. */ void setLabVertex(const LorentzPoint &); /** * Set the life length of this particle. The life time will be * automatically rescaled to be consistent with the invariant * distance. */ void setLifeLength(const Distance & d) { rep().theLifeLength.setVect(d); rep().theLifeLength.rescaleEnergy(); } /** * Set the life time/length of a particle. The invariant distance * may become inconsistent. */ void setLifeLength(const LorentzDistance & d) { rep().theLifeLength = d; } /** * Set the life time/length of a particle. */ void setLifeLength(const Lorentz5Distance & d) { rep().theLifeLength = d; } /** * The invariant life time of this particle. */ Time lifeTime() const { return lifeLength().m(); } //@} /** @name Functions for (Lorentz) transformations. */ //@{ /** * Do Lorentz transformations on this particle. */ void transform(const LorentzRotation & r); /** * Do Lorentz transformations on this particle. \a bx, \a by and \a * bz are the boost vector components. */ void boost(double bx, double by, double bz) { transform(LorentzRotation(Boost(bx, by, bz))); } /** * Do Lorentz transformations on this particle. \a b is the boost * vector. */ void boost(const Boost & b) { transform(LorentzRotation(b)); } /** * Rotate around the x-axis. */ void rotateX(double a); /** * Rotate around the y-axis. */ void rotateY(double a); /** * Rotate around the z-axis. */ void rotateZ(double a); /** * Rotate around the given \a axis. */ void rotate(double a, const Axis & axis); /** * Mirror in the xy-plane. */ void mirror() { theMomentum.setZ(-theMomentum.z()); } /** * Do Lorentz transformations on this particle and its decendants. */ void deepTransform(const LorentzRotation & r); /** * Do Lorentz transformations on this particle and its * decendants. \a bx, \a by and \a bz are the boost vector * components. */ void deepBoost(double bx, double by, double bz) { deepTransform(LorentzRotation(Boost(bx, by, bz))); } /** * Do Lorentz transformations on this particle and its * decendants. \a b is the boost vector. */ void deepBoost(const Boost & b) { deepTransform(LorentzRotation(b)); } /** * Rotate this particle and its decendants around the x-axis. */ void deepRotateX(double a); /** * Rotate this particle and its decendants around the y-axis. */ void deepRotateY(double a); /** * Rotate this particle and its decendants around the z-axis. */ void deepRotateZ(double a); /** * Rotate this particle and its decendants around the given \a axis. */ void deepRotate(double a, const Axis & axis); //@} /** @name Functions controlling possible mass/momentum inconsistencies. */ //@{ /** * Return the relative inconsistency in the mass component. */ double massError() const { return theMomentum.massError(); } /** * Return the relative inconsistency in the energy component. */ double energyError() const { return theMomentum.energyError(); } /** * Return the relative inconsistency in the spatial components. */ double rhoError() const { return theMomentum.rhoError(); } /** * Rescale energy, so that the invariant length/mass of the * LorentzVector agrees with the current one. */ void rescaleEnergy() { theMomentum.rescaleEnergy(); } /** * Rescale spatial component, so that the invariant length/mass of * the LorentzVector agrees with the current one. */ void rescaleRho() { theMomentum.rescaleRho(); } /** * Set the invariant length/mass member, so that it agrees with the * invariant length/mass of the LorentzVector. */ void rescaleMass() { theMomentum.rescaleMass(); } //@} /** @name Acces incormation about colour connections */ //@{ /** * True if this particle has colour information. To determine if * this particle is actually coloured, the coloured(), hasColour() or * hasAntiColour() methods should be used instead. */ bool hasColourInfo() const { return hasRep() && rep().theColourInfo; } /** * Return the colour lines to which this particles anti-colour is * connected. */ tColinePtr antiColourLine() const { return hasColourInfo() ? colourInfo()->antiColourLine() : tColinePtr(); } /** * Return the colour lines to which this particles (\a anti-)colour * is connected. */ tColinePtr colourLine(bool anti = false) const { if ( anti ) return antiColourLine(); return hasColourInfo() ? colourInfo()->colourLine() : tColinePtr(); } /** * Return true if the particle is connected to the given (\a anti-) * colour \a line. */ bool hasColourLine(tcColinePtr line, bool anti = false) const { return hasColourInfo() ? colourInfo()->hasColourLine(line, anti) : false; } /** * Return true if the particle is connected to the given anti-colour * \a line. */ bool hasAntiColourLine(tcColinePtr line) const { return hasColourLine(line, true); } /** * True if this particle type is not a colour singlet. */ bool coloured() const { return data().coloured(); } /** * True if this particle type carries (\a anti-)colour. */ bool hasColour(bool anti = false) const { return data().hasColour(anti); } /** * True if this particle type carries anti-colour. */ bool hasAntiColour() const { return data().hasAntiColour(); } /** * Get the ColourBase object. */ tcCBPtr colourInfo() const { return hasRep() ? rep().theColourInfo : CBPtr(); } /** * Get the ColourBase object. */ tCBPtr colourInfo() { if ( !rep().theColourInfo ) { switch(theData->iColour()) { case PDT::Colour6: case PDT::Colour6bar: rep().theColourInfo = new_ptr(MultiColour()); break; default: rep().theColourInfo = new_ptr(ColourBase()); } } return rep().theColourInfo; } /** * Set the ColourBase object. */ void colourInfo(tCBPtr c) { rep().theColourInfo = c; } /** * Get a pointer to the colour neighbor. Returns a particle in the * range \a first to \a last which colour is connected to the same * line as this particles anti-colour. If \a anti is true return * antiColourNeighbour(). */ template typename std::iterator_traits::value_type colourNeighbour(Iterator first, Iterator last, bool anti = false) const; /** * Get a pointer to the anti-colour neighbor. Returns a particle in * the range \a first to \a last which anti-colour is * connected to the same line as this particles colour. */ template typename std::iterator_traits::value_type antiColourNeighbour(Iterator first, Iterator last) const { return colourNeighbour(first, last, true); } /** * Set the colour neighbor. Connects the given particles colour to * the same colour line as this particles anti-colour. If \a anti is * true call antiColourNeighbour(tPPtr). */ void colourNeighbour(tPPtr, bool anti = false); /** * Set the anti-colour neighbor. Connects the given particles * anti-colour to the same colour line as this particles colour. */ void antiColourNeighbour(tPPtr p) { colourNeighbour(p, true); } /** * Connect colour. Create a colour line connecting to it this * particles colour and the given particles anti-colour. */ void antiColourConnect(tPPtr neighbour) { colourConnect(neighbour, true); } /** * Connect colour. Create a colour line connecting to it this * particles anti-colour and the given particles colour. If \a anti * is true call antiColourConnect(tPPtr). */ void colourConnect(tPPtr neighbour, bool anti = false) { colourNeighbour(neighbour, anti); } /** * Incoming colour. Return the parent particle which colour is * connected to the same colour line as this particle. If \a anti is * true return incomingAntiColour(). */ tPPtr incomingColour(bool anti = false) const; /** * Incoming anti-colour. Return the parent particle which * anti-colour is connected to the same colour line as this * particle. */ tPPtr incomingAntiColour() const { return incomingColour(true); } /** * Set incoming colour. Connect this particles colour to the same * colour line as the given particle. If \a anti * is true call incomingAntiColour(tPPtr). */ void incomingColour(tPPtr p, bool anti = false) { p->outgoingColour(this, anti); } /** * Set incoming anti-colour. Connect this particles anti colour to * the same colour line as the given particle. */ void incomingAntiColour(tPPtr p) { p->outgoingColour(this, true); } /** * Outgoing colour. Return the daughter particle which colour is * connected to the same colour line as this particle. If \a anti is * true return outgoingAntiColour(). */ tPPtr outgoingColour(bool anti = false) const; /** * Outgoing anti-colour. Return the daughter particle which * anti-colour is connected to the same colour line as this * particle. */ tPPtr outgoingAntiColour() const { return outgoingColour(true); } /** * Set outgoing colour. Connect this particles colour to the same * colour line as the given particle. If \a anti * is true call outgoingAntiColour(tPPtr). */ void outgoingColour(tPPtr, bool anti = false); /** * Set outgoing anti-colour. Connect this particles anti-colour to * the same colour line as the given particle. */ void outgoingAntiColour(tPPtr p) { outgoingColour(p, true); } /** * Specify colour flow. Calls outgoingColour(tPPtr,bool). */ void colourFlow(tPPtr child, bool anti = false) { outgoingColour(child, anti); } /** * Specify anticolour flow. Calls outgoingAntiColour(tPPtr,bool). */ void antiColourFlow(tPPtr child) { colourFlow(child, true); } /** * Remove all colour information; */ void resetColour() { if ( hasColourInfo() ) rep().theColourInfo = CBPtr(); } //@} /** @name Functions to access spin. */ //@{ /** * Return the Spin object. */ tcSpinPtr spinInfo() const { return hasRep() ? rep().theSpinInfo : SpinPtr(); } /** * Return the Spin object. */ tSpinPtr spinInfo() { return hasRep() ? rep().theSpinInfo : SpinPtr(); } /** * Set the Spin object. */ void spinInfo(tSpinPtr s) { rep().theSpinInfo = s; } //@} /** @name Accessing user-defined information. */ //@{ /** * Access user-defined information as a vector of EventInfoBase pointers. */ const EIVector & getInfo() const { static const EIVector null; return hasRep() ? rep().theExtraInfo : null; } /** * Access user-defined information as a vector of EventInfoBase pointers. */ EIVector & getInfo() { return rep().theExtraInfo; } //@} public: /** @name Accessing user-defined information. */ //@{ /** * True if this particle has instantiated the object with * information other than type and momentum. */ bool hasRep() const { return theRep; } /** * If this particle has only a type and momentum, instantiate the * rest of the information. */ void initFull(); //@} 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); //@} /** * Print particle info to a stream \a os. The \a step is used to * access information about colour neighbors and other struff. */ ostream & print(ostream & os, tcStepPtr step = tcStepPtr()) const; /** * Print a range of particles. */ template static void PrintParticles(ostream & os, Iterator first, Iterator last, tcStepPtr step = tcStepPtr()); /** * Print a container of particles. */ template static inline void PrintParticles(ostream & os, const Cont & c, tcStepPtr step = tcStepPtr()) { PrintParticles(os, c.begin(), c.end(), step); } /** * Standard Init function. @see Base::Init(). */ static void Init(); /** * Specify how to print particles. The format string is analogous to * the one used by eg. the unix 'date' command as described above. */ static string outputFormat; private: /** * Standard clone function. */ virtual PPtr clone() const; /** * Rebind to cloned objects. When an Event is cloned, a shallow * copy is done first, then all Particles etc, are * cloned, and finally this method is used to see to that the * pointers in the cloned Particle points to the cloned objects. */ virtual void rebind(const EventTranslationMap &); /** * Set the order-number for this particle in the current event. */ void number(int n) { rep().theNumber = n; } /** * Remove the given particle from the list of children. */ void removeChild(tPPtr c) { if ( hasRep() ) rep().theChildren.erase(remove(rep().theChildren.begin(), rep().theChildren.end(), c), rep().theChildren.end()); } /** * Remove the given particle from the list of parents. */ void removeParent(tPPtr p) { if ( hasRep() ) rep().theParents.erase(remove(rep().theParents.begin(), rep().theParents.end(), p), rep().theParents.end()); } /** * Set the mass of this particle. */ void mass(Energy m) { theMomentum.setMass(m); } /** * Set the invaiant life time of this particle. */ void lifeTime(Length t) { rep().theLifeLength.setTau(t); } /** * Return a reference to the bulk information of this particle. if * no ParticleRep object exists, one is created. */ ParticleRep & rep() { if ( !hasRep() ) initFull(); return *theRep; } /** * Return a reference to the bulk information of this particle. if * no ParticleRep object exists, we return the default values. */ const ParticleRep & rep() const { static const ParticleRep null; return hasRep() ? *theRep : null; } /** * The pointer to the ParticleData object */ cEventPDPtr theData; /** * The momentum. */ Lorentz5Momentum theMomentum; /** * The rest of the information in this particle is only instantiated * if needed. */ ParticleRep * theRep; public: /** * This class is used internally in the Particle class to represent * information besides momentum and type. A corresponding object * will only be instantiated if needed to save memory and time when * temporarily creating particles. */ struct ParticleRep { /** * Default constructor. */ ParticleRep() : theScale(-1.0*GeV2), theVetoScale(-1.0*GeV2), theNumber(0) {} /** * Copy constructor. */ ParticleRep(const ParticleRep &); /** * The pointers to the parents. */ tParticleVector theParents; /** * The pointers to the children. */ ParticleVector theChildren; /** * The pointer to the previous instance. */ tPPtr thePrevious; /** * The pointer to the next instance. */ PPtr theNext; /** * If this particle has decayed this is the pointer to the * corresponding decay mode. */ tDMPtr theDecayMode; /** * The pointer to the first step where this particle occurred. */ tStepPtr theBirthStep; /** * The creation point. */ LorentzPoint theVertex; /** * The life time/length. */ Lorentz5Distance theLifeLength; /** * the resolution scale. */ Energy2 theScale; /** * the veto scale. */ Energy2 theVetoScale; /** * The order-number for this particle in the current event. */ int theNumber; /** * A pointer to the colour information object. */ CBPtr theColourInfo; /** * Spin information */ SpinPtr theSpinInfo; /** * Additional used-defined information. */ EIVector theExtraInfo; }; public: /** * Print out debugging information for this object on std::cerr. To * be called from within a debugger via the debug() function. */ virtual void debugme() const; protected: /** * Private default constructor must only be used by the * PersistentIStream class via the ClassTraits class. */ Particle() : theRep(0) {} /** * The ClassTraits class must be a friend to be able to * use the private default constructor. */ friend struct ClassTraits; private: /** * Private and non-existent assignment. */ - Particle & operator=(const Particle &); + Particle & operator=(const Particle &) = delete; /** * Describe concrete class with persistent data. */ static ClassDescription initParticle; }; /** * Write a Particle object to a stream. */ ostream & operator<<(ostream &, const Particle &); /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base class of Particle. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Collision. */ typedef EventRecordBase NthBase; }; /** This template specialization informs ThePEG about the name of * the Particle class and how to create it. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Particle"; } /** Create a Particle object. */ static TPtr create() { return TPtr::Create(Particle()); } }; /** @endcond */ } #ifndef ThePEG_TEMPLATES_IN_CC_FILE #include "Particle.tcc" #endif #endif /* ThePEG_Particle_H */ diff --git a/EventRecord/RemnantParticle.h b/EventRecord/RemnantParticle.h --- a/EventRecord/RemnantParticle.h +++ b/EventRecord/RemnantParticle.h @@ -1,188 +1,188 @@ // -*- C++ -*- // // RemnantParticle.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_RemnantParticle_H #define THEPEG_RemnantParticle_H // // This is the declaration of the RemnantParticle class. // #include "ThePEG/EventRecord/Particle.h" #include "RemnantParticle.fh" #include "ThePEG/PDT/RemnantData.fh" #include "ThePEG/PDT/RemnantDecayer.fh" namespace ThePEG { /** * Here is the documentation of the RemnantParticle class. */ class RemnantParticle: public Particle { public: /** * RemnantDecayer is a friend. */ friend class RemnantDecayer; public: /** @name Standard constructors and destructors. */ //@{ /** * The standard constructor takes as argument the \a particle for * which this is the remnant and a \a decayer capable of performing * the decay. Optionally a \a parton that has been extracted. Note * that if the parton is given, the extraction may silently fail. */ RemnantParticle(const Particle & particle, RemDecPtr decayer, tPPtr parton = tPPtr()); public: /** * Modify the properties to reflect that the given \a parton was * extracted. If \a fixcolour is true a colour line is drawn from * the remnant to the extracted parton. */ bool extract(tPPtr parton, bool fixcolour = false); /** * Modify the properties to reflect that the previously extracted * parton, \a oldp, was evolved backwards to the the parton \a * newp. If \a fixcolour is true a colour line is drawn from the * remnant to the extracted parton. */ bool reextract(tPPtr oldp, tPPtr newp, bool fixcolour = false); /** * Modify the properties to reflect that the given \a parton which * was previously extracted is removed. */ bool remove(tPPtr parton); /** * Acces the extracted partons. */ const PVector & extracted() const { return theExtracted; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** * If necessary, colour-connect this remnant to the given \a parton. */ void fixColourLines(tPPtr parton); private: /** * The RemnantData object associated to this remnant. */ RemPDPtr remData; /** * The parent from which this remnant resulted. */ tcPPtr parent; /** * The set of extracted partons. */ PVector theExtracted; protected: /** * Private default constructor must only be used by the * PersistentIStream class via the ClassTraits class. */ RemnantParticle() {} /** * The ClassTraits class must be a friend to be able to * use the private default constructor. */ friend struct ClassTraits; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initRemnantParticle; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - RemnantParticle & operator=(const RemnantParticle &); + RemnantParticle & operator=(const RemnantParticle &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of RemnantParticle. */ template <> struct BaseClassTrait { /** Typedef of the first base class of RemnantParticle. */ typedef Particle NthBase; }; /** This template specialization informs ThePEG about the name of * the RemnantParticle class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::RemnantParticle"; } /** Create a Particle object. */ static TPtr create() { return TPtr::Create(RemnantParticle()); } }; /** @endcond */ } #endif /* THEPEG_RemnantParticle_H */ diff --git a/EventRecord/SpinInfo.h b/EventRecord/SpinInfo.h --- a/EventRecord/SpinInfo.h +++ b/EventRecord/SpinInfo.h @@ -1,480 +1,480 @@ // -*- C++ -*- // // SpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_SpinInfo_H #define ThePEG_SpinInfo_H // This is the declaration of the SpinInfo class. #include "ThePEG/EventRecord/EventInfoBase.h" #include "ThePEG/PDT/PDT.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "HelicityVertex.h" namespace ThePEG { /** * The SpinInfo is the base class for the spin information for the * spin correlation algorithm. The implementations for different spin * states inherit from this. * * The class contains pointers to the vertex where the particle is * produced and where it decays, together with methods to set/get * these. * * There are two flags decayed which store information on the state * of the particle. * * The decayed() members provides access to the _decay data member * which is true if the spin density matrix required to perform the * decay of a timelike particle has been calculated (this would be a * decay matrix for a spacelike particle.) This is set by the * decay() method which calls a method from the production vertex to * calculate this matrix. The decay() method should be called by a * decayer which uses spin correlation method before it uses the * spin density matrix to calculate the matrix element for the * decay. * * The developed() member provides access to the _developed data * member which is true if the decay matrix required to perform the * decays of the siblings of a particle has been calculated (this * would a spin density matrix for a spacelike particle.) This is * set by the developed() method which calls a method from the decay * vertex to calculate the matrix. The developed() method is called * by a DecayHandler which is capable of performing spin * correlations after all the unstable particles produced by a * decaying particle are decayed. * * Methods are also provided to access the spin density and decay * matrices for a particle. * * @author Peter Richardson * */ class SpinInfo: public EventInfoBase { public: /** * Status for the implementation of spin correlations */ enum DevelopedStatus { Undeveloped=0, /**< Not developed. */ Developed=1, /**< Developed. */ NeedsUpdate=2, /**< Developed but needs recalculating due to some change. */ StopUpdate=3 /**< Stop recalculating at this spin info. */ }; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ SpinInfo() : _timelike(false), _prodloc(-1), _decayloc(-1), _decayed(false), _developed(Undeveloped), _oldDeveloped(Undeveloped) {} /** * Standard Constructor. * @param s the spin. * @param p the production momentum. * @param time true if the particle is time-like. */ SpinInfo(PDT::Spin s, const Lorentz5Momentum & p = Lorentz5Momentum(), bool time = false) : _timelike(time), _prodloc(-1), _decayloc(-1), _decayed(false), _developed(Undeveloped), _oldDeveloped(Undeveloped), _rhomatrix(s), _Dmatrix(s), _spin(s), _productionmomentum(p), _currentmomentum(p) {} /** * Copy-constructor. */ SpinInfo(const SpinInfo &); //@} public: /** * Returns true if the polarization() has been implemented in a * subclass. This default version returns false. */ virtual bool hasPolarization() const { return false; } /** * Return the angles of the polarization vector as a pair of * doubles. first is the polar angle and second is the azimuth * wrt. the particles direction. This default version of the * function returns 0,0, and if a subclass implements a proper * function it should also implement 'hasPolarization()' to return * true. */ virtual DPair polarization() const { return DPair(); } public: /** * Standard Init function. */ static void Init(); /** * Rebind to cloned objects. If a FermionSpinInfo is cloned together * with a whole Event and this has pointers to other event record * objects, these should be rebound to their clones in this * function. */ virtual void rebind(const EventTranslationMap & trans); /** * Standard clone method. */ virtual EIPtr clone() const; /** * Method to handle the delelation */ void update() const; /** * Perform a lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum & m, const LorentzRotation & r) { _currentmomentum = m; _currentmomentum.transform(r); } /** * Reset - Undoes any transformations and calls undecay. */ virtual void reset() { _currentmomentum = _productionmomentum; } public: /** @name Access the vertices. */ //@{ /** * Set the vertex at which the particle was produced. */ void productionVertex(VertexPtr in) const { _production=in; // add to the list of outgoing if timelike int temp(-1); if(_timelike) in->addOutgoing(this,temp); // or incoming if spacelike else in->addIncoming(this,temp); _prodloc=temp; } /** * Get the vertex at which the particle was produced. */ tcVertexPtr productionVertex() const { return _production; } /** * Set the vertex at which the particle decayed or branched. */ void decayVertex(VertexPtr in) const { if(in) { _decay=in; if(_timelike) { int temp(-1); in->addIncoming(this,temp); _decayloc=temp; assert(temp==0); } else { int temp(-1); in->addOutgoing(this,temp); _decayloc=temp; } } else { _decay=VertexPtr(); _decayloc=-1; } } /** * Get the vertex at which the particle decayed or branched. */ tcVertexPtr decayVertex() const { return _decay; } //@} /** @name Access information about the associated particle. */ //@{ /** * Has the particle decayed? */ bool decayed() const { return _decayed; } /** * Set if the particle has decayed. */ void decayed(bool b) const { _decayed = b; } /** * Return true if the decay matrix required to perform the decays of * the siblings of a particle has been calculated. */ DevelopedStatus developed() const { return _developed; } /** * Calculate the rho matrix for the decay if not already done. */ void decay(bool recursive=false) const ; /** * Calculate the rho matrix for the decay if not already done. */ virtual void undecay() const ; /** * Set the developed flag and calculate the D matrix for the decay. */ void develop() const ; /** * Needs update */ void needsUpdate() const { if(_developed!=NeedsUpdate) _oldDeveloped = _developed; _developed=NeedsUpdate; } /** * Used for an unstable particle to *temporarily* stop * redevelop and redecay at that particle */ void stopUpdate() const {_developed=StopUpdate;} /** * Return 2s+1 for the particle */ PDT::Spin iSpin() const { return _spin; } /** * Return the momentum of the particle when it was produced. */ const Lorentz5Momentum & productionMomentum() const { return _productionmomentum; } /** * The current momentum of the particle */ const Lorentz5Momentum & currentMomentum() const { return _currentmomentum; } /** * Return true if particle is timelike (rather than spacelike). */ bool timelike() const { return _timelike; } //@} /** * Access to the locations */ //@{ /** * Production Location */ int productionLocation() const {return _prodloc;} /** * Decay Location */ int decayLocation() const {return _decayloc;} //@} public: /** @name Access the rho and D matrices. */ //@{ /** * Access the rho matrix. */ RhoDMatrix rhoMatrix() const { return _rhomatrix; } /** * Access the rho matrix. */ RhoDMatrix & rhoMatrix() { return _rhomatrix; } /** * Access the D matrix. */ RhoDMatrix DMatrix() const { return _Dmatrix; } /** * Access the D matrix. */ RhoDMatrix & DMatrix() { return _Dmatrix; } //@} protected: /** * Check if momentum is near to the current momentum */ bool isNear(const Lorentz5Momentum & p) { return currentMomentum().isNear(p,_eps); } private: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initSpinInfo; /** * Private and non-existent assignment operator. */ - SpinInfo & operator=(const SpinInfo &); + SpinInfo & operator=(const SpinInfo &) = delete; private: /** * Set the developed flag and calculate the D matrix for the decay, * and all decays further up the chain. */ void redevelop() const ; /** * Recursively recalulate all the rho matrices from the top of the chain */ void redecay() const ; private: /** * Pointer to the production vertex for the particle */ mutable VertexPtr _production; /** * Pointers to the decay vertex for the particle */ mutable VertexPtr _decay; /** * Is this is timelike (true) or spacelike (false ) particle? This * is used to decide if the particle is incoming or outgoing at the * production vertex */ bool _timelike; /** * Location in the hard vertex array at production. */ mutable int _prodloc; /** * Location in the hard vertex array at decay. */ mutable int _decayloc; /** * Has the particle been decayed? (I.e. has the rho matrix for the * decay been calculated.) */ mutable bool _decayed; /** * Has the particle been developed? (I.e. has the D matrix encoding * the info about the decay been calculated) */ mutable DevelopedStatus _developed; /** * Has the particle been developed? (I.e. has the D matrix encoding * the info about the decay been calculated) */ mutable DevelopedStatus _oldDeveloped; /** * Storage of the rho matrix. */ mutable RhoDMatrix _rhomatrix; /** * Storage of the decay matrix */ mutable RhoDMatrix _Dmatrix; /** * The spin of the particle */ PDT::Spin _spin; /** * Momentum of the particle when it was produced */ Lorentz5Momentum _productionmomentum; /** * Momentum of the particle when it decayed */ mutable Lorentz5Momentum _decaymomentum; /** * Current momentum of the particle */ Lorentz5Momentum _currentmomentum; /** * A small energy for comparing momenta to check if Lorentz Transformations * should be performed */ static const double _eps; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * SpinInfo. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of SpinInfo. */ typedef EventInfoBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * SpinInfo class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** * Return the class name. */ static string className() { return "ThePEG::SpinInfo"; } }; /** @endcond */ } #endif /* ThePEG_SpinInfo_H */ diff --git a/EventRecord/Step.h b/EventRecord/Step.h --- a/EventRecord/Step.h +++ b/EventRecord/Step.h @@ -1,544 +1,544 @@ // -*- C++ -*- // // Step.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_BasicStep_H #define ThePEG_BasicStep_H // This is the declaration of the Step class. #include "ThePEG/EventRecord/Particle.h" #include "ThePEG/EventRecord/StandardSelectors.h" namespace ThePEG { /** * The Step class contains information of all particles present after * certain step in the event generation. There is also information * about particles which were introduced as intermediate ones in the * generation of the step. The Step may also contain one or more * SubProcesses which were generated in the step. The Step is linked * back to the Collision to which it belongs, and there may be a * pointer to the StepHandler which generated the step. * * @see Event * @see Collision * @see SubProcess * @see Particle * @see SelectorBase * @see SelectorBase */ class Step: public EventRecordBase { public: /** Most of the Event classes are friends with each other. */ friend class Collision; /** Most of the Event classes are friends with each other. */ friend class Event; public: /** * Standard constructor. * @param newCollision the Collision to which this Step belongs. * @param newHandler the handler object in charge of the generation * of this Step. */ Step(tCollPtr newCollision = tCollPtr(), tcEventBasePtr newHandler = tcEventBasePtr()) : theCollision(newCollision), theHandler(newHandler) {} /** * The copy constructor. */ Step(const Step &); /** * The destructor. */ ~Step(); /** * Return a pointer to the step handler which performed the * generation of this step. */ tcEventBasePtr handler() const { return theHandler; } /** * Return a pointer to the Collision to which this step belongs. */ tCollPtr collision() const { return theCollision; } /** * Extract particles from this Step which satisfies the * requirements given by an object of the SelectorBase class. * @param r an output iterator specifying where the extracted * (pointers to) particles will be appended. * @param s SelectorBase object defining which particles should be * extracted. */ template void select(OutputIterator r, const SelectorBase & s) const; /** * Extract all final state particles in this Step. * @param r an output iterator specifying where the extracted * (pointers to) particles will be appended. */ template void selectFinalState(OutputIterator r) const { select(r, SelectFinalState()); } /** * Extract all final state particles in this Step. * @return a vector of pointers to the extracted particles. */ tPVector getFinalState() const { tPVector ret; selectFinalState(back_inserter(ret)); return ret; } /** * Return a vector of particle vectors with colour-connected * partons, where each particle vector is in a colour singlet state. * @deprecated Use the corresponding functions in ColourLine instead. */ template static vector getSinglets(PIterator first, PIterator last) { tParticleSet left(first, last); return getSinglets(left); } /** * A reference to the set of all particles in this step. */ const ParticleSet & all() const { return allParticles; } /** * A reference to the set of outgoing particles in this step. */ const ParticleSet & particles() const { return theParticles; } /** * A reference to the set of intermediate particles in this step. */ const ParticleSet & intermediates() const { return theIntermediates; } /** * A reference to the vector of sub-processes introduced in this * step. */ const SubProcessVector & subProcesses() const { return theSubProcesses; } /** * Returns the colliding particles in the collision to which this * step belongs. (If this step does not belong to a collision, this * method will probably cause a segmentation fault - This should be * fixed. @deprecated Maybe this method is not needed at all.) */ const PPair & incoming() const; /** * Get mutable particle. If the given particle is present in this * step, return its pointer otherwise return the null pointer; */ tPPtr find(tcPPtr p) const { tPPtr r = const_ptr_cast(p); if ( !member(all(), r) ) return tPPtr(); return r; } /** * Copy a particle. If the given Particle is present in this step, * insert a copy and remove the original (or make it intermediate if * it was initially added to this step). Returns the new Particle if * the copy succeeded. If the copy fails, nothing is changed. For a * successful call copyParticle(p)->previous() == p is * true. */ tPPtr copyParticle(tcPPtr p); /** * Make particles copies of eachother. Declare that pold and pnew * are two instances of the same particle. If pnew is not present in * the step it will be afterwars. Afterwards pold == * pnew->previous() && pnew == pold->next() is true. Returns * false if something went wrong. */ bool setCopy(tcPPtr pold, tPPtr pnew); /** * Insert a copy. If the given particle is present in the current * Collision, insert copy of that particle 'before' the particle. If * the particle does not belong to the current collision or if the * copy failed, nothing is changed and the null pointer is * returned. If successful insertCopy(p)->next() == p * is true. The parents of the original particle will become the * parents of the copy. */ tPPtr insertCopy(tcPPtr p); /** * Add decay product. If the \a parent is present in this step or if * it has immediate children in this step, insert the \a child and * fix up references between the two. If the parent is among the * final state particles, remove it (or make it intermediate if it * was initially added to this step). The parent/child pointers of * the affected particles will be set accordingly. If both the * parent and child/children are coloured and \a fixColour is true, * the colour flow will be set. * @return true iff the addition succeeded. */ bool addDecayProduct(tcPPtr parent, tPPtr child, bool fixColour = true); /** * Add decay products. If the \a parent is present in this step or if * it has immediate children in this step, insert the range of * children and fix up references between the two. If the parent is * among the final state particles, remove it (or make it * intermediate if it was initially added to this step). The * parent/child pointers of the affected particles will be set * accordingly. If both the parent and children are coloured and \a * fixColour is true, the colour flow will be set. The colour of the * parent will then flow to the first added child, while the anti * colour will flow to the last added child. * @return true iff the addition succeeded. */ template bool addDecayProduct(tcPPtr parent, CIterator firstChild, CIterator lastChild, bool fixColour = true) { for ( ; firstChild != lastChild; ++firstChild ) if ( !addDecayProduct(parent, *firstChild, fixColour) ) return false; return true; } /** * Add a particle to this Step. It is assumed to be already setup as * a child to a parent particle. The parent is removed from the list * of final state particles in this step. No consistency checks are * performed. @deprecated Use addDecayProduct(tPPtr child) instead. */ void addDecayNoCheck(tPPtr parent, tPPtr child); /** * Add a particle to this Step. It is assumed to be already setup as * a child to parent particles. The parents are removed from the * list of final state particles in this step. No consistency checks * are performed. */ void addDecayProduct(tPPtr child); /** * Remove the \a child form the given \a parent. The \a child is not * removed from the decay record. */ bool removeDecayProduct(tcPPtr parent, tPPtr child); /** * Remove children form the given \a parent. The children are not * removed from the decay record. */ template bool removeDecayProduct(tcPPtr parent, CIterator firstChild, CIterator lastChild) { bool success = true; for ( ; firstChild != lastChild; ++firstChild ) if ( !removeDecayProduct(parent, *firstChild) ) success = false; return success; } /** * Add decay product. Add the \a child as a decay product of all the * listed parents. The parents must satisfy the same requirements as * in the addDecayProduct(tcPPtr,tPPtr,bool) function. If any of the * parents fail false is returned and nothing is changed. The * parent/child pointers of the affected particles will be set * accordingly, but no colour flow wll be set. If \a checkfinal is * true the parents or its immediate children must be in the final * state. */ template bool addDecayProduct(Iterator firstParent, Iterator lastParent, tPPtr child, bool checkfinal = true); /** * Add the children as a decay products of all the listed * particles. The parents must satisfy the same requirements as in * the addDecayProduct(tcPPtr,tPPtr,bool) function. If any of the * parents fail false is returned and nothing is changed. The * parent/child pointers of the affected particles will be set * accordingly, but no colour flow wll be set. */ template bool addDecayProduct(PIterator firstParent, PIterator lastParent, CIterator firstChild, CIterator lastChild); /** * Fix the colour flow of particles which have been added to this * step and which have not already had their colour neighbours set. * If a neighbor is found which has not been added in this step, it * is first cloned in order not to compromise the colour flow of * previous steps. @deprecated This method should not be needed with * the current ColourLine representation of colour. */ void fixColourFlow(); /** * Return the (\a anti-)colour neighbour of the given \a particle if * one exists in the final state of this Step. The colour neighbour * has its colour connected to the same colour line as the given \a * particles anti-colour. Will return null if the given \a particle * is not in the final state of this Step. */ tPPtr colourNeighbour(tcPPtr particle, bool anti = false) const; /** * Return the anti-colour neighbour of the given \a particle if one * exists in the final state of this Step. The anti-colour neighbour * has its anti-colour connected to the same colour line as the * given \a particles colour. Will return null if the given \a * particle is not in the final state of this Step. */ tPPtr antiColourNeighbour(tcPPtr particle) const; /** * Add a range of particles to this Step. If this step belongs * to a Collision, the paticle will also be added to the * Collision. If this particle has not previously been in a Step, * the birthStep pointer of the particle will be set. */ template void addParticles(Iterator first, Iterator last); /** * Add a particle to this step. If this step belongs to a Collision, * the paticle will also be added to the Collision. If this particle * has not previously been in a Step, the birthStep pointer of the * particle will be set. */ void addParticle(tPPtr p); /** * Add a range of intermediate particles in this step. If this step * belongs to a Collision, the particles will also be added to the * Collision. If any particle has not previously been in a Step, * the birthStep pointer of the particle will be set. The particles * will be removed from the list of final state particles if * present. */ template void addIntermediates(Iterator first, Iterator last); /** * Add an intermediate particle in this Step. If this Step belongs * to a Collision, the particle will also be added to the * Collision. If this particle has not previously been in a step, * the birthStep pointer of the particle will be set. The particle * will be removed from the list of final state particles if * present. */ void addIntermediate(tPPtr p); /** * Add an intermediate particle. Particle \a p is added so that if * \a child previously was the child of \a parent, afterwards \a p * will be the child of \a parent and \a child will be the child of * \a p. */ void insertIntermediate(tPPtr p, tPPtr parent, tPPtr child); /** * Add a sub-process. All outgoing particles are added to the list * of outgoing particles in the step. All other particles in the * sub-process will be added to the list of intermediates. */ void addSubProcess(tSubProPtr); /** * Remove a sub-process. All incoming and outgoing particles are * removed as well. */ void removeSubProcess(tSubProPtr); /** * Remove (recursively) the given Particle from the Step. If * this was the last daughter of the mother Particle, the latter is * added to the list of final state particles. */ void removeParticle(tPPtr p); /** * Return true if no new particles were introduced in this step. */ bool nullStep() const; /** * Get final state particles. Given a container, return the ones * which belongs to the final state of this step. If a particle does * not belong to these, it's children (or next instance) will be * checked and possibly added instead (recursively). */ template tParticleSet getCurrent(const Cont & c) const { return getCurrent(c.begin(), c.end()); } /** * Get final state particles. Given a range of particles, return the * ones which belongs to the final state of this step. If a particle * does not belong to these, it's children (or next instance) will * be checked and possibly added instead (recursively) */ template tParticleSet getCurrent(Iterator first, Iterator last) const; /** * Return a clone of this step. */ StepPtr clone() const; public: /** * Standard function for writing to a persistent stream. */ void persistentOutput(PersistentOStream &) const; /** * Standard function for reading from a persistent stream. */ void persistentInput(PersistentIStream &, int); /** * Standard Init function. @see Base::Init(). */ static void Init(); protected: /** * Used internally by the public getSinglets(...); @deprecated Use * the corresponding functions in ColourLine instead. */ static vector getSinglets(tParticleSet &); /** * Remove a particle entry from the step. Make its ancesters (if * any) present in this step. */ void removeEntry(tPPtr p); /** * Rebind to cloned objects. When a Step is cloned, a shallow copy * is done first, then all Particles etc, are cloned, * and finally this method is used to see to that the pointers in * the cloned Step points to the cloned Particles etc. */ void rebind(const EventTranslationMap & trans); /** * Get final state particles. Insert particle \a p into with the * Inserter \a o if \a p is a member of the final state of this * Step. Otherwise call the method for the children of \a p if any. */ template void addIfFinal(Inserter o, PPointer p); private: /** * Assignement is not allowed. */ - Step & operator=(const Step &); + Step & operator=(const Step &) = delete; /** * Setup pointer to the Collision. */ void collision(tCollPtr c) { theCollision = c; } /** * Setup pointer to the step handler. */ void handler(tcEventBasePtr sh) { theHandler = sh; } private: /** * The set of all outgoing particle in this step. */ ParticleSet theParticles; /** * The set of all intermediate particle in this step. */ ParticleSet theIntermediates; /** * The vector of all sub-processes introduced in this step. */ SubProcessVector theSubProcesses; /** * The set of all particles available in this step. */ ParticleSet allParticles; /** * Pointer to the collision to which this step belongs. */ tCollPtr theCollision; /** * Pointer ot the step handler which performed this step. */ tcEventBasePtr theHandler; public: /** * Print out debugging information for this object on std::cerr. To * be called from within a debugger via the debug() function. */ virtual void debugme() const; private: /** * Describe concrete class with persistent data. */ static ClassDescription initStep; }; /** Output a Step to an ostream */ ostream & operator<<(ostream &, const Step &); /** @cond TRAITSPECIALIZATIONS */ ThePEG_DECLARE_CLASS_TRAITS(Step,EventRecordBase); /** @endcond */ } #include "Collision.h" inline const ThePEG::PPair & ThePEG::Step::incoming() const { return collision()->incoming(); } #ifndef ThePEG_TEMPLATES_IN_CC_FILE #include "Step.tcc" #endif #endif /* ThePEG_BasicStep_H */ /** * Write a Step object to a stream */ diff --git a/EventRecord/SubProcess.h b/EventRecord/SubProcess.h --- a/EventRecord/SubProcess.h +++ b/EventRecord/SubProcess.h @@ -1,348 +1,348 @@ // -*- C++ -*- // // SubProcess.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_SubProcess_H #define ThePEG_SubProcess_H // This is the declaration of the SubProcess class. #include #include "ThePEG/EventRecord/Particle.h" namespace ThePEG { class SubProcessGroup; /** * A SubProcess object represents a hard \f$2\rightarrow n\f$ * sub-process in a collision. It carries information about the * incoming and outgoing particles, as well as possible intermediate * ones. It also has a pointer to the MEBase object which generated * the sub-process. * * @see Event * @see Particle * @see SubProcessGroup */ class SubProcess: public EventRecordBase { public: /** Most of the Event classes are friends with each other. */ friend class Step; /** Most of the Event classes are friends with each other. */ friend class Collision; /** Most of the Event classes are friends with each other. */ friend class SubProcessGroup; public: /** * Standard constructor. * @param newIncoming the two incoming partons. * @param newCollision the Collision to which this SubProcess belongs. * @param newHandler the MEBase object which generated this SubProcess. */ SubProcess(const PPair & newIncoming, tCollPtr newCollision = tCollPtr(), tcEventBasePtr newHandler = tcEventBasePtr(), tSubProPtr newHead = tSubProPtr(), double newGroupWeight = 1.0); /** * Destructor. */ virtual ~SubProcess(); /** * A pointer to the MEBase object which generated this SubProcess. */ tcEventBasePtr handler() const { return theHandler; } /** * A pointer to the collision to which this sub-process belongs. */ tCollPtr collision() const { return theCollision; } /** * The pair of incoming partons. */ const PPair & incoming() const { return theIncoming; } /** * A reference to the vector of intermediate partons. */ const ParticleVector & intermediates() const { return theIntermediates; } /** * A reference to the vector of outgoing particles. */ const ParticleVector & outgoing() const { return theOutgoing; } /** * Set the vector of outgoing particles. */ template void setOutgoing(InputIterator, InputIterator); /** * Add a particle to the list of outgoing ones. If \a fixrelations * is true the mother daughter pointers will be set to/from the * incoming partons. */ void addOutgoing(tPPtr p, bool fixrelations = true); /** * Change the incoming parton */ void changeIncoming(tPPtr pnew, tPPtr pold); /** * Set the vector of intermediate particles. */ template void setIntermediates(InputIterator, InputIterator); /** * Add a particle to the list of intermediate ones. If \a fixrelations * is true the mother daughter pointers will be set to/from the * incoming partons. */ void addIntermediate(tPPtr p, bool fixrelations = true); /** * Remove a particle entry from this sub-process. */ void removeEntry(tPPtr p); /** * Return a clone of this sub process. */ virtual SubProPtr clone() const; /** * True if a perturbative cascade has been applied to this sub * process. */ bool decayed() const { return isDecayed; } /** * Set to true if a perturbative cascade has been applied to this * sub process. */ void decayed(bool x) { isDecayed = x; } /** * Return the head SubProcess, if this SubProcess * object belongs to a SubProcessGroup. Return NULL * if head of a SubProcessGroup or not member of * a SubProcessGroup at all. */ tSubProPtr head() const { return theHead; } /** * Set the head SubProcess */ void head(tSubProPtr newHead) { theHead = newHead; } /** * If this SubProcess belongs to a SubProcessGroup, * return its relative weight w.r.t. the head's * weight. */ double groupWeight() const { return theGroupWeight; } /** * If this SubProcess belongs to a SubProcessGroup, * set its relative weight w.r.t. the head's * weight. */ void groupWeight(double w) { theGroupWeight = w; } protected: /** * Rebind to cloned objects. When a SubProcess is cloned, a shallow * copy is done first, then all Particles etc, are * cloned, and finally this method is used to see to that the * pointers in the cloned SubProcess points to the cloned * Particles etc. */ virtual void rebind(const EventTranslationMap & trans); public: /** * Perform a LorentzTransformation of all particles in the sub * process. */ virtual void transform(const LorentzRotation &); /** * Return the value of the Mandelstam variable \f$\hat{s}\f$ in this * SubProcess. It is calculated using the incoming particles. */ Energy2 shat() const { return (incoming().first->momentum() + incoming().second->momentum()).m2(); } /** * Return the value of the Mandelstam variable \f$\hat{t}\f$ in this * SubProcess. It is calculated using the first incoming and first outgoing * particle. */ Energy2 that() const { return (incoming().first->momentum() - outgoing()[0]->momentum()).m2(); } /** * Return the value of the Mandelstam variable \f$\hat{u}\f$ in this * SubProcess. It is calculated using the first incoming and last outgoing * particle. */ Energy2 uhat() const { return (incoming().second->momentum() - outgoing()[0]->momentum()).m2(); } public: /** * Standard function for writing to a persistent stream. */ void persistentOutput(PersistentOStream &) const; /** * Standard function for reading from a persistent stream. */ void persistentInput(PersistentIStream &, int); /** * Standard Init function. @see Base::Init(). */ static void Init(); private: /** * A pointer to the MEBase object which generated this sub-process. */ tcEventBasePtr theHandler; /** * A pointer to the collision to which this sub-process belongs. */ tCollPtr theCollision; /** * The pair of incoming particles. */ PPair theIncoming; /** * The vector of intermediate particles, */ ParticleVector theIntermediates; /** * The vector of outgoing particles. */ ParticleVector theOutgoing; /** * True if a perturbative cascade has been applied to this sub process. */ bool isDecayed; /** * The head SubProcess, if this SubProcess * object belongs to a SubProcessGroup. NULL * if head of a SubProcessGroup or not member of * a SubProcessGroup at all. */ tSubProPtr theHead; /** * If this SubProcess belongs to a SubProcessGroup, * this gives its relative weight w.r.t. the head's * weight. */ double theGroupWeight; public: /** * Print out debugging information for this object on std::cerr. To * be called from within a debugger via the debug() function. */ virtual void debugme() const; /** * Put to ostream */ virtual void printMe(ostream&) const; private: /** * Default constructor */ SubProcess() : isDecayed(false), theGroupWeight(1.0) {} /** * Describe concrete class with persistent data. */ static ClassDescription initSubProcess; /** * The ClassTraits class must be a friend to be able to * use the private default constructor. */ friend struct ClassTraits; /** * Assignment is forbidden. */ - SubProcess & operator=(const SubProcess &); + SubProcess & operator=(const SubProcess &) = delete; }; /** Output a SubProcess to an ostream. */ ostream & operator<<(ostream &, const SubProcess &); /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base class of Collision. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of SubProcess. */ typedef EventRecordBase NthBase; }; /** This template specialization informs ThePEG about the name of * the SubProcess class and how to create it. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SubProcess"; } /** Create a SubProcess object. */ static TPtr create() { return TPtr::Create(SubProcess()); } }; /** @endcond */ } #ifndef ThePEG_TEMPLATES_IN_CC_FILE #include "SubProcess.tcc" #endif #endif /* ThePEG_SubProcess_H */ diff --git a/EventRecord/SubProcessGroup.h b/EventRecord/SubProcessGroup.h --- a/EventRecord/SubProcessGroup.h +++ b/EventRecord/SubProcessGroup.h @@ -1,165 +1,165 @@ // -*- C++ -*- // // SubProcessGroup.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_SubProcessGroup_H #define ThePEG_SubProcessGroup_H // This is the declaration of the SubProcessGroup class. #include "ThePEG/EventRecord/SubProcess.h" namespace ThePEG { /** * A SubProcessGroup object represents a group of SubProcess * objects in dependence of a head SubProcess object. * * @see StdXCombGroup * @see MEGroup */ class SubProcessGroup: public SubProcess { public: /** * Standard constructor. * @param newIncoming the two incoming partons. * @param newCollision the Collision to which this SubProcessGroup belongs. * @param newHandler the MEBase object which generated this SubProcessGroup. */ SubProcessGroup(const PPair & newIncoming, tCollPtr newCollision = tCollPtr(), tcEventBasePtr newHandler = tcEventBasePtr()); /** * Destructor. */ virtual ~SubProcessGroup(); /** * Return a clone of this sub process group. */ virtual SubProPtr clone() const; protected: /** * Rebind to cloned objects. When a SubProcessGroup is cloned, a shallow * copy is done first, then all Particles etc, are * cloned, and finally this method is used to see to that the * pointers in the cloned SubProcessGroup points to the cloned * Particles etc. */ virtual void rebind(const EventTranslationMap & trans); public: /** * Perform a LorentzTransformation of all particles in the sub * process. */ virtual void transform(const LorentzRotation &); /** * Return the dependent SubProcess objects */ const SubProcessVector& dependent() const { return theDependent; } /** * Access the dependent SubProcess objects */ SubProcessVector& dependent() { return theDependent; } /** * Add a dependent SubProcess */ void add(tSubProPtr sub) { dependent().push_back(sub); } public: /** * Standard function for writing to a persistent stream. */ void persistentOutput(PersistentOStream &) const; /** * Standard function for reading from a persistent stream. */ void persistentInput(PersistentIStream &, int); /** * Standard Init function. @see Base::Init(). */ static void Init(); private: /** * The dependent subprocesses */ SubProcessVector theDependent; public: /** * Put to ostream */ virtual void printMe(ostream&) const; private: /** * Describe concrete class with persistent data. */ static ClassDescription initSubProcessGroup; /** * Private default constructor must only be used by the * PersistentIStream class via the ClassTraits class . */ SubProcessGroup() : SubProcess() {} /** * The ClassTraits class must be a friend to be able to * use the private default constructor. */ friend struct ClassTraits; /** * Assignment is forbidden. */ - SubProcessGroup & operator=(const SubProcessGroup &); + SubProcessGroup & operator=(const SubProcessGroup &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base class of Collision. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of SubProcessGroup. */ typedef EventRecordBase NthBase; }; /** This template specialization informs ThePEG about the name of * the SubProcessGroup class and how to create it. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SubProcessGroup"; } /** Create a SubProcessGroup object. */ static TPtr create() { return TPtr::Create(SubProcessGroup()); } }; /** @endcond */ } #endif /* ThePEG_SubProcessGroup_H */ diff --git a/EventRecord/TmpTransform.h b/EventRecord/TmpTransform.h --- a/EventRecord/TmpTransform.h +++ b/EventRecord/TmpTransform.h @@ -1,89 +1,89 @@ // -*- C++ -*- // // TmpTransform.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_TmpTransform_H #define THEPEG_TmpTransform_H // // This is the declaration of the TmpTransform class. // #include "ThePEG/Config/ThePEG.h" namespace ThePEG { /** * This is a wrapper class to be used to temporarily make a Lorentz * transform of an object. When created a pointer to an object and a * LorentzRotation is provided, and the objects transform(const * LorentzRotation &) function is called. When the destructed the * inverse tansformation is performed. In this way one can make sure * that the inverse transformation is performed even if the function * where the TmpTransform is created returns or throws an exception. */ template class TmpTransform { public: /** * The contructor will call the transform(const LorentzRotation &) * of an object pointed to by \a p with \a r as argument. */ TmpTransform(Ptr p, const LorentzRotation & r) : ptr(p), rot(r) { ptr->transform(rot); } /** * The destructor performs the inverse of the transformation done in * the constructor. */ ~TmpTransform() { rot.invert(); ptr->transform(rot); } private: /** * A pointer to the object being transformed. */ Ptr ptr; /** * The rotation performed in the constructor. */ LorentzRotation rot; private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - TmpTransform & operator=(const TmpTransform &); + TmpTransform & operator=(const TmpTransform &) = delete; /** * The default constructor is private and must never be called. * In fact, it should not even be implemented. */ TmpTransform(); /** * The copy constructor is private and must never be called. * In fact, it should not even be implemented. */ TmpTransform(const TmpTransform &); }; } #endif /* THEPEG_TmpTransform_H */ diff --git a/Handlers/ACDCSampler.h b/Handlers/ACDCSampler.h --- a/Handlers/ACDCSampler.h +++ b/Handlers/ACDCSampler.h @@ -1,374 +1,374 @@ // -*- C++ -*- // // ACDCSampler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ACDCSampler_H #define ThePEG_ACDCSampler_H // This is the declaration of the ACDCSampler class. #include "ThePEG/Handlers/SamplerBase.h" #include "ThePEG/ACDC/ACDCGen.h" #include "ThePEG/Handlers/StandardEventHandler.h" #include "ThePEG/Repository/RandomGenerator.h" #include "ThePEG/Repository/UseRandom.h" #include "ThePEG/Utilities/SimplePhaseSpace.xh" // #include "ACDCSampler.fh" // #include "ACDCSampler.xh" namespace ThePEG { /** * This class inherits from SampleBase and implements * the Auto Compensating Divide-and-Conquer phase space generator, * ACDCGen. * * @see \ref ACDCSamplerInterfaces "The interfaces" * defined for ACDCSampler. * @see ACDCGen */ class ACDCSampler: public SamplerBase { public: /** Typedef the underlying ACDCGen class. */ typedef ACDCGenerator::ACDCGen SamplerType; /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ ACDCSampler() : theEps(100*Constants::epsilon), theMargin(1.1), theNTry(1000) {} /** * The copy constructor. We don't copy theSampler. */ ACDCSampler(const ACDCSampler & x) : SamplerBase(x), theSampler(), theEps(x.theEps), theMargin(x.theMargin), theNTry(x.theNTry) {} /** * The destructor. */ virtual ~ACDCSampler(); //@} public: /** @name Virtual functions needed for 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(); /** * 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 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. */ virtual IBPtr clone() const; /** Make a 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 actual sampler object. */ SamplerType theSampler; /** * 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 StandardEventHandler was not able to produce a non-zero cross section. */ struct EventInitNoXSec: public InitException {}; /** 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: /** * Describe a concrete class with persistent data. */ static ClassDescription initACDCSampler; /** * Private and non-existent assignment operator. */ - ACDCSampler & operator=(const ACDCSampler &); + ACDCSampler & operator=(const ACDCSampler &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * The following template specialization informs ThePEG about the * base class of ACDCSampler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of ACDCSampler. */ typedef SamplerBase NthBase; }; /** * The following template specialization informs ThePEG about the * name of this class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** * Return the class name. */ static string className() { return "ThePEG::ACDCSampler"; } /** Return the name of the shared library to be loaded to get * access to this class and every other class it uses * (except the base class). */ static string library() { return "ACDCSampler.so"; } }; /** @endcond */ } namespace ACDCGenerator { /** @cond TRAITSPECIALIZATIONS */ /** Specialized Traits class to define the interface to the * StandardEventHandler object to be sampled by ACDCGen. */ template <> struct ACDCFncTraits: public ACDCTraitsType { /** Convenient typdef. */ typedef ThePEG::tStdEHPtr tStdEHPtr; /** * Call a function to be sampled by ACDCGen. * @return (*f)(x). */ static inline double value(const tStdEHPtr & eh, const DVector & x) { using namespace ThePEG::Units; try { return eh->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: 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 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 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 */ } #endif /* ThePEG_ACDCSampler_H */ diff --git a/Handlers/CascadeHandler.h b/Handlers/CascadeHandler.h --- a/Handlers/CascadeHandler.h +++ b/Handlers/CascadeHandler.h @@ -1,227 +1,227 @@ // -*- C++ -*- // // CascadeHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_CascadeHandler_H #define ThePEG_CascadeHandler_H // This is the declaration of the CascadeHandler class. #include "StepHandler.h" #include "ThePEG/Handlers/LastXCombInfo.h" #include "ThePEG/PDF/PDF.h" namespace ThePEG { /** * The CascadeHandler is the base class of all handlers implementing * perturbative partonic cascade models. It is derived from the more * general StepHandler class, and implements the handle() function to * do some standard initialization before calling the main cascade() * function. * * @see \ref CascadeHandlerInterfaces "The interfaces" * defined for CascadeHandler. * @see StepHandler * @see EventHandler * @see SubProcessHandler */ class CascadeHandler: public StepHandler, public LastXCombInfo<> { public: /** @name Standard constructors and destructors. */ //@{ /** * The destructor. */ virtual ~CascadeHandler(); //@} public: /** @name Virtual functions required by the StepHandler class. */ //@{ /** * The main function called by the EventHandler class to * perform a step. * @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); //@} /** * The main function to be overwritten by sub-classes. It is called * by handle() after storing some information which is then * available through simple access functions. */ virtual void cascade() = 0; /** * The CascadeHandler can be used inside the process generation to * do so-called CKKW reweighting of the hard sub-process. In this * case this function is called after information about the * sub-process is made available through the LastXCombInfo base * class. Only the function belonging to the primary CascadeHandler * for the event to be generated is called. Sub-classes may * implement it to give a suitable weight in return. The * CascadeHandler may store information about the generated * sub-process to be used in the subsequent cascade. It is however * not guaranteed that the reweightCKKW() will have been called for * the subprocess handed to the handle() function. This default * implementation of the function simply return one. The current * sub-process is mixed together with other processes with a * multiplicity of outgoing particles between \a minMult and \a * maxMult. */ virtual double reweightCKKW(int minMult, int maxMult); public: /** @name Access information stored by the handle() function. */ //@{ /** * Return the vector of tagged particles which should be * showered. It the vector is empty, the patons from the current * sub-process is supposed to be showered. */ const tPVector & tagged() const { return *theTagged; } /** * Return the int provided in the current call to handle(). */ const Hint & hint() const { return *theHint; } /** * Return references to the PDF used by the first incoming particle. */ const PDF & firstPDF() const { return pdfs().first; } /** * Return references to the PDF used by the first incoming particle. */ const PDF & secondPDF() const { return pdfs().second; } /** * Return references to the currently used PDF's. */ const pair & pdfs() const { return thePDFs; } /** * Set alternative PDFBase objects to be used for cascade. */ void resetPDFs(const pair & pdfpair); /** * Set alternative PDFBase objects to be used for cascade. */ void resetPDFs(const pair & pdfpair, PBPair ppair); /** * Set the XComb object with information about the sub-process * generation. */ void setXComb(tXCombPtr xc); /** * Return true, if this cascade handler will perform reshuffling from hard * process masses. */ virtual bool isReshuffling() const { return false; } /** * For multiple cascade calls, this flag tells * if cascade was called before. */ bool didRunCascade() const {return theDidRunCascade;} /** * Set the flag to inform if prior cascades had been called. */ static void setDidRunCascade(bool c){theDidRunCascade=c;} //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Store the tagged argument given to handle(). */ const tPVector * theTagged; /** * Store the Hint arguments given to handle(). */ const Hint * theHint; /** * The pdfs used to extract the incoming partons. */ pair thePDFs; /** * If there are multiple cascade calls, this flag tells * if cascade was called before. */ static bool theDidRunCascade; private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class without persistent data. */ static AbstractNoPIOClassDescription initCascadeHandler; /** * Private and non-existent assignment operator. */ - CascadeHandler & operator=(const CascadeHandler &); + CascadeHandler & operator=(const CascadeHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of CascadeHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of CascadeHandler. */ typedef StepHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the CascadeHandler class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::CascadeHandler"; } }; /** @endcond */ } #endif /* ThePEG_CascadeHandler_H */ diff --git a/Handlers/ClusterCollapser.h b/Handlers/ClusterCollapser.h --- a/Handlers/ClusterCollapser.h +++ b/Handlers/ClusterCollapser.h @@ -1,336 +1,336 @@ // -*- C++ -*- // // ClusterCollapser.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ClusterCollapser_H #define ThePEG_ClusterCollapser_H // This is the declaration of the ClusterCollapser class. #include "ThePEG/Handlers/StepHandler.h" #include "ThePEG/Handlers/FlavourGenerator.h" #include "ThePEG/EventRecord/ColourSinglet.h" #include "ClusterCollapser.fh" // #include "ClusterCollapser.xh" namespace ThePEG { /** * ClusterCollapser is a general StepHandler which can be called * anywhere in the event generation (typically as a pre-handler to the * hadronization or a post-hadnler to the cascade) to find colour-less * clusters of partons which are deemed to have to small invariant * mass to be hadronized in the normal way. Instead these clusters are * allowed to collapse into hadrons. Possible energy imbalance du to * the clustering is compensated by shifting the momenta of nearby * particles. * * @see \ref ClusterCollapserInterfaces "The interfaces" * defined for ClusterCollapser. */ class ClusterCollapser: public StepHandler { public: /** Declare a pointer to a FlavourGenerator object. */ typedef Ptr::pointer FlavGenPtr; /** Declare a multimap of singlets indexed by their mass. */ typedef multimap SingletMap; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ ClusterCollapser() : theEnergyCut(1.0*GeV), theNTry2(2), errorlevel(Exception::eventerror), pStrange(1.0/3.0) {} /** * The destructor. */ virtual ~ClusterCollapser(); //@} public: /** @name Virtual functions required by the StepHandler class. */ //@{ /** * The main function called by the EventHandler class to * perform a step. This function simply calls the collapse() function. * @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); //@} /** * Perform all necessary collapses. Return the uncollapsed clusters. */ virtual vector collapse(tPVector tagged, tStepPtr newstep); /** * Go through the tagged partons and extract all colour singlet * combination of partons. Order them in invariant mass (minus the * constituent masses of the partons). */ virtual SingletMap getSinglets(const tPVector & tagged) const; /** * If a singlet contains at least one diquark and a junction, split * the diquark and split off a new colour singlet. */ virtual ColourSinglet splitDiQuarkJunction(ColourSinglet & cs, tStepPtr newStep) const; /** * If a singlet contains a simple string with diquarks in both ends, * split them into quarks and split off a new colour singlet. */ virtual ColourSinglet splitDiDiQuark(ColourSinglet & cs, tStepPtr newStep) const; /** * Returns true iff the given singlet contains a junction and at * least one diquark. */ static bool diQuarkJunction(const ColourSinglet & cs); /** * Returns true iff the given singlet contains one string piece with * diquarks in both ends. */ static bool diDiQuark(const ColourSinglet & cs); /** * If the invariant mass of a cluster, minus the constituent masses * of its partons is below this cut, it will be collapsed into one * or two particles. */ Energy cut() const { return theEnergyCut; } /** * The number of attempts to collapse a cluster into two particles, * before it is collapsed into one particle. */ int nTry2() const { return theNTry2; } /** * Return the invariant mass of a cluster minus the constituent * masses of its partons. */ static Energy mass(const ColourSinglet & cl); /** * Insert a ColourSinglet object in a SingletMap. */ static void insert(SingletMap & mmap, const ColourSinglet & cl); /** * Pick a random flavour. Default version picks u,d or s with ratio * 3:3:1. */ virtual tcPDPtr pickFlavour() const; protected: /** * Perform the actual collapse of a cluster into one hadron. Add * the produced hadron to the given step as decay products of the * partons in the cluster. The \a tagged particles are used for * momentum compensation. */ virtual void collapse(tStepPtr newStep, const ColourSinglet & cs, const tPVector & tagged) const; /** * Perform the actual collapse of a cluster into two hadrons. Add * the produced hadrons to the given step as decay products of the * partons in the cluster. The \a tagged particles are used for * momentum compensation. @return false if the collapse failed in * some way. */ virtual bool collapse2(tStepPtr newStep, const ColourSinglet & cs) const; /** * Get particles for compensation. Look through the \a tagged vector * for particles (which are not in the colour singlet \a cs) which can * be used to compensate momentum when \a cs collapses into a hadron * with mass \a mh. These partons are then copied into the new step so * that their momentum can be changed and then returned. */ virtual tPVector getCompensators(Energy mh, const ColourSinglet & cs, const tPVector & tagged, tStepPtr newStep) const; /** * Return a hadron into which the given cluster may collapse. */ virtual tcPDPtr getHadron(const ColourSinglet & cs) const; /** * Return a pair of hadrons into which the given cluster may collapse. */ virtual tcPDPair getHadrons(const ColourSinglet & cs) const; /** * Uptate the vector of particles and remove partons which have * already collapsed and insert their children instead. */ void updateTagged(tPVector & tagged) 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; //@} /** @cond EXCEPTIONCLASSES */ /** Exception class used by ClusterCollapser. */ class ClusterException: public Exception { public: /** Standard constructor. */ ClusterException(const ClusterCollapser & cc) { theMessage << "In ClusterCollapser '" << cc.name() << "': "; } }; /** @endcond */ private: /** * Energy cut. If the invariant mass of a cluster, minus the * constituent masses of its partons is below this cut, it will be * collapsed into one or two particles. */ Energy theEnergyCut; /** * The number of attempts to collapse a cluster into two particles, * before it is collapsed into one particle. */ int theNTry2; /** * The flavour generator object to use to combine quarks and diqurks * into hadrons. */ FlavGenPtr flavGen; protected: /** * How should we respond to errors? 0 means do nothing, ie. the * cluster will not be collapsed, or the momentum will not be * consterved. Otherwise the severity will be what is defined in the * class Exception. */ Exception::Severity errorlevel; /** * The relative probability to produce a s-sbar pair in a split as * compared to a u-ubar or d-dbar pair. */ double pStrange; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initClusterCollapser; /** * Private and non-existent assignment operator. */ - ClusterCollapser & operator=(const ClusterCollapser &); + ClusterCollapser & operator=(const ClusterCollapser &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * The following template specialization informs ThePEG about the * base class of ClusterCollapser. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of ClusterCollapser. */ typedef StepHandler NthBase; }; /** * The following template specialization informs ThePEG about the name * of the ClusterCollapser class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** * Return the class name. */ static string className() { return "ThePEG::ClusterCollapser"; } }; /** @endcond */ } #endif /* ThePEG_ClusterCollapser_H */ diff --git a/Handlers/DecayHandler.h b/Handlers/DecayHandler.h --- a/Handlers/DecayHandler.h +++ b/Handlers/DecayHandler.h @@ -1,186 +1,186 @@ // -*- C++ -*- // // DecayHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_DecayHandler_H #define ThePEG_DecayHandler_H // This is the declaration of the DecayHandler class. #include "StepHandler.h" namespace ThePEG { /** * The DecayHandler is the base class of all handlers implementing the * administration of decays of unstable particles. It is derived from * the more general StepHandler class, and overrides the handle() * method. This base class simply decays all unstable particle in the * current step. * * @see \ref DecayHandlerInterfaces "The interfaces" * defined for DecayHandler. * @see StepHandler * @see EventHandler * @see SubProcessHandler * */ class DecayHandler: public StepHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ DecayHandler() : theMaxLoop(100000), theMaxLifeTime(-1.0*mm), theLifeTimeOption(false) {} /** * Destructor. */ virtual ~DecayHandler(); //@} public: /** @name Virtual functions required by the StepHandler class. */ //@{ /** * 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. */ void performDecay(tPPtr parent, Step & s) 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 interface. */ static void Init(); /** * The maximum number of failed decay attempts allowed for each * particle. */ long maxLoop() const { return theMaxLoop; } /** * Get the maximum lifetime above which a particle is not decayed. */ Length maxLifeTime() const { return theMaxLifeTime; } /** * Option for whether the maximum lifetime should be applied to the * mean lifetime of the particle species or the lifetime of the particle * instance */ bool lifeTimeOption() const { return theLifeTimeOption; } protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 maximum number of failed decay attempts allowed for each * particle. */ long theMaxLoop; /** * The maximum lifetime above which a particle is not decayed. */ Length theMaxLifeTime; /** * Option for how theMaxLifeTime should be interpreted */ bool theLifeTimeOption; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initDecayHandler; /** * Private and non-existent assignment operator. */ - DecayHandler & operator=(const DecayHandler &); + DecayHandler & operator=(const DecayHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of DecayHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of DecayHandler. */ typedef StepHandler NthBase; }; /** * This template specialization informs ThePEG about the name of the * DecayHandler class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::DecayHandler"; } }; /** @endcond */ } #endif /* ThePEG_DecayHandler_H */ diff --git a/Handlers/EventHandler.h b/Handlers/EventHandler.h --- a/Handlers/EventHandler.h +++ b/Handlers/EventHandler.h @@ -1,681 +1,681 @@ // -*- C++ -*- // // EventHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_EventHandler_H #define ThePEG_EventHandler_H // This is the declaration of the EventHandler class. #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/Handlers/HandlerGroup.h" #include "ThePEG/Handlers/StepHandler.h" #include "ThePEG/EventRecord/Event.h" #include "ThePEG/Handlers/LastXCombInfo.h" #include "ThePEG/Handlers/SubProcessHandler.fh" #include "ThePEG/Cuts/Cuts.fh" #include "EventHandler.fh" namespace ThePEG { /** * The EventHandler is the base class used to implement event handlers * in ThePEG. Objects of this class is assigned to an EventGenerator * object which supervises a run. This base class is not able to * generate complete events, although it does have a virtual * generateEvent(). If the EventGenerator to which an EventGenerator * is assinged is asked to generate a full event, it will call the * generateEvent() function which will write an error message and * abort the run. * * Objects of this base class can, however, be used to administer the * evolution of a partially generated event supplied from the * outside. To specify this event evolution the EventHandler maintains * five groups of so-called StepHandlers implemented as * HandlerGroups. Each group have a main step handler: * SubProcessHandler, CascadeHandler, MultipleInteractionHandler, * HadronizationHandler and DecayHandler respectively, whereof the * first group only uses the post-handler part of the group. * * The EventHandler class inherits from the LastXCombInfo class to * have easy interface to the information in the last selected XComb * which carries information about the hard sub-process in the event. * * If a sub-class implements the generation of sub-processes and thus * becomes a full event handler it should implement the * generateEvent() function appropriately. It should also set the flag * warnIncomplete to false, to avoid warnings when initialized as the main * EventHandler of an Eventgenerator. * * @see \ref EventHandlerInterfaces "The interfaces" defined for EventHandler. * @see Collision * @see StepHandler * @see HandlerGroup * @see SubProcessHandler * @see CascadeHandler * @see MultipleInteractionHandler * @see HadronizationHandler * @see DecayHandler */ class EventHandler: public HandlerBase, public LastXCombInfo<> { public: /** Enumerate the different levels of consistency checking. */ enum ConsistencyLevel { clNoCheck, /**< Do not perform consistency checks. */ clCollision, /**< Check every Collision. */ clStep, /**< Check every Step. */ clPrintCollision, /**< Check every Collision. Print event if inconsistent.*/ clPrintStep /**< Check every Step. Print event if inconsistent. */ }; /** A vector of HandlerGroups. */ typedef vector GroupVector; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ EventHandler(bool warnincomplete = true); /** * Copy-constructor. */ EventHandler(const EventHandler &); /** * Destructor. */ virtual ~EventHandler(); //@} public: /** @name Main functions, some of which may be overridden by subclasses. */ //@{ /** * Initialize this event handler and all related objects needed to * generate events. */ virtual void initialize(); /** * Generate an event. This base class is not capable of generating * complete events and calling this function will result in an * exception. Sub-classes which are capable of generating complete * events from scratch must override this function. */ virtual EventPtr generateEvent(); /** * Generate an Event, where the initial state is supplied * from the outside. * @return a pointer to the generated Event. */ tEventPtr generateEvent(tEventPtr e); /** * Generate an Event, where the initial state is supplied as a * single step from the outside. * @return a pointer to the generated Event. */ tEventPtr generateEvent(tStepPtr s); /** * Continue generating an event if the generation has been stopped * before finishing. */ virtual EventPtr continueEvent(); /** * Continue the generation of a Collision. Used if the generation * was previously interrupted. */ tCollPtr continueCollision(); /** * Clear all step handlers, making the handler ready for a new event. */ void clearEvent(); /** * Change the XComb object */ virtual void select(tXCombPtr newXComb); /** * Returns true if there are no step handlers left to apply to the * current event; */ virtual bool empty() const; /** * 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. This version of * the function will produce an error message. It is up to a * sub-class able to generate full events to return the correct * value. */ virtual CrossSection histogramScale() const; /** * The total integrated cross section of the processes generated in * this run. This version of the function will produce an error * message. It is up to a sub-class able to generate full events to * return the correct value. * @return 0 if no integrated cross section could be estimated. */ virtual CrossSection integratedXSec() const; /** * The estimated error in the total integrated cross section of the * processes generated in this run. This version of the function * will produce an error message. It is up to a sub-class able to * generate full events to return the correct value. * @return 0 if no integrated cross section error could be estimated. */ virtual CrossSection integratedXSecErr() const; //@} /** @name Simple access functions. */ //@{ /** * Return the maximum number attemts allowed to select a sub-process * for each event. */ long maxLoop() const { return theMaxLoop; } /** * The pair of incoming particle types. These are null if not set by * a subclass. */ const cPDPair & incoming() const { return theIncoming; } /** * Access the luminosity function. */ const LuminosityFunction & lumiFn() const { return *theLumiFn; } /** * Access the luminosity function. */ tcLumiFnPtr lumiFnPtr() const{ return theLumiFn; } /** * Access to the luminosity function. */ tLumiFnPtr lumiFnPtr(){ return theLumiFn; } /** * The kinematical cuts to used by subclasses which do not provide their own. */ tCutsPtr cuts() const { return theCuts; } /** * A PartonExtractor object to be used by sub classes which do not * provide their own. */ tPExtrPtr partonExtractor() const { return thePartonExtractor; } /** * Return a pointer (possibly null) to the assigned main * CascadeHandler. */ tCascHdlPtr cascadeHandler() const; /** * Return a pointer (possibly null) to the assigned main * CascadeHandler to be used as CKKW-reweighter. */ tCascHdlPtr CKKWHandler() const { return cascadeHandler(); } /** * Gget current event. */ tEventPtr currentEvent() const { return theCurrentEvent; } /** * Get current collision. */ tCollPtr currentCollision() const { return theCurrentCollision; } /** * Get current step. */ tStepPtr currentStep() const { return theCurrentStep; } /** * Return true if this event handler should produce weightes events */ bool weighted() const { return weightedEvents; } /** * The level of statistics. Controlls the amount of statistics * written out after each run to the EventGenerators * .out file. */ int statLevel() const { return theStatLevel; } /** * Determines how often the event handler should check for charge * and energy-momentum conservation. */ ConsistencyLevel consistencyLevel() const { return theConsistencyLevel; } /** * The maximum fraction of the total invariant mass of a collision * that any of the components of the summed momentum is allowed to * change during the generation. */ double consistencyEpsilon() const { return theConsistencyEpsilon; } //@} /** @name Internal functions used by main functions and possibly from the outside. */ //@{ /** * Perform a given step using a handler and a hint. */ void performStep(tStepHdlPtr handler, tHintPtr hint); /** * In the curresnt list of step handlers to go through, add another * step handler and/or hint. */ void addStep(Group::Level, Group::Handler, tStepHdlPtr = tStepHdlPtr(), tHintPtr = tHintPtr()); /** * Create a new step and make it current. A StepHandler should be * supplied which will be set as the handler for the created * Step. */ tStepPtr newStep(tcStepHdlPtr sh) { currentStep(currentCollision()->newStep(sh)); return currentStep(); } /** * Remove the last step. */ void popStep() { currentCollision()->popStep(); currentStep(currentCollision()->finalStep()); } /** * Initialize the groups of step handlers. */ virtual void initGroups(); /** * Set current event. */ void currentEvent(tEventPtr e) { theCurrentEvent = e; } /** * Set current collision. */ void currentCollision(tCollPtr c) { theCurrentCollision = c; } /** * Set current step. */ void currentStep(tStepPtr s) { theCurrentStep = s; } /** * Get current StepHandler. */ tStepHdlPtr currentStepHandler() const { return theCurrentStepHandler; } /** * Set current StepHandler. */ void currentStepHandler(tStepHdlPtr sh) { theCurrentStepHandler = sh; } /** * Throw away the current event/collision. */ void throwCurrent(); /** * Throw away the last generated event before generating a new one. */ virtual void clean(); /** * Check that the charge and energy-momentum in the last step of the * current collision is consistent with the incoming particles. If * not, a warning will be generated. */ virtual void checkConsistency() 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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 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() { clean(); HandlerBase::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(); //@} protected: /** * Access to the luminosity function. */ LuminosityFunction & lumiFn() { return *theLumiFn; } /** * Setup the step handler groups. */ void setupGroups(); /** * Access the step handler groups */ GroupVector & groups() { return theGroups; } /** * Access the step handler groups */ const GroupVector & groups() const { return theGroups; } protected: /** * Set the luminosity function */ void lumiFn(LumiFnPtr); private: /** * The maximum number of attempts to select a sub-process allowed * per event. */ long theMaxLoop; /** * True if this event handler should produce weightes events */ bool weightedEvents; /** * Controlls the amount of statistics written out after each run to * the EventGenerators .out file. */ int theStatLevel; /** * Determines how often the event handler should check for charge * and energy-momentum conservation. */ ConsistencyLevel theConsistencyLevel; /** * The maximum fraction of the total invariant mass of a collision * that any of the components of the summed momentum is allowed to * change during the generation. */ double theConsistencyEpsilon; /** * Pointer to a luminosity function tobe used by subclasses. */ LumiFnPtr theLumiFn; /** * The kinematical cuts to used by subclasses which do not provide * their own. */ CutsPtr theCuts; /** * A PartonExtractor object to be used by sub classes which do not * provide their own. */ PExtrPtr thePartonExtractor; /** * The SubProcessHandler group. */ HandlerGroup theSubprocessGroup; /** * The CascadeHandler group. */ HandlerGroup theCascadeGroup; /** * The MultipleInteractionHandler group. */ HandlerGroup theMultiGroup; /** * The HadronizationHandler group. */ HandlerGroup theHadronizationGroup; /** * The DecayHandler group. */ HandlerGroup theDecayGroup; /** * The step handler groups. */ GroupVector theGroups; /** * The current Event. */ EventPtr theCurrentEvent; /** * The current Collision. */ CollPtr theCurrentCollision; /** * The current Step. */ StepPtr theCurrentStep; /** * The current StepHandler. */ StepHdlPtr theCurrentStepHandler; protected: /** * Utility object to facilitate default selection of step handlers. */ HandlerGroup optSubprocessGroup; /** * Utility object to facilitate default selection of step handlers. */ HandlerGroup optCascadeGroup; /** * Utility object to facilitate default selection of step handlers. */ HandlerGroup optMultiGroup; /** * Utility object to facilitate default selection of step handlers. */ HandlerGroup optHadronizationGroup; /** * Utility object to facilitate default selection of step handlers. */ HandlerGroup optDecayGroup; protected: /** * Utility object to facilitate default selection of step handlers. */ GroupVector optGroups; protected: /** * Emit warning that this EventHandler is incomplete. */ bool warnIncomplete; /** * The pair of incoming particle types. Should be set by a subclass * which implements a complete EventHandler. */ cPDPair theIncoming; protected: /** @cond EXCEPTIONCLASSES */ /** * Exception class used by EventHandler when a StepHandler of the * wrong class was added. */ class EventHandlerStepError: public Exception {}; /** * Exception class used by EventHandler when not able to produce a * correct histogram scale. */ class EventHandlerHistError: public Exception {}; /** * Exception class used by EventHandler if asked to generate a * complete event. */ class EventHandlerIncompleteError: public Exception {}; /** Exception class used if too many attempts to generate an event * failed. */ struct EventLoopException: public Exception { /** Standard constructor. */ EventLoopException(const EventHandler &); }; /** * Exception class used if the assignment of a LuminosityFunction * failed */ struct LumiFuncError: public Exception {}; /** * Exception class used if inconsistent charge or energy-momentum was found. */ struct ConsistencyException: public Exception {}; /** @endcond */ private: ThePEG_DECLARE_PREPOST_GROUP(SubProcessHandler,Post); ThePEG_DECLARE_GROUPINTERFACE(CascadeHandler,CascHdlPtr); ThePEG_DECLARE_GROUPINTERFACE(MultipleInteractionHandler,MIHdlPtr); ThePEG_DECLARE_GROUPINTERFACE(HadronizationHandler,HadrHdlPtr); ThePEG_DECLARE_GROUPINTERFACE(DecayHandler,DecayHdlPtr); ThePEG_DECLARE_CLASS_DESCRIPTION(EventHandler); /** * Private and non-existent assignment operator. */ - EventHandler & operator=(const EventHandler &); + EventHandler & operator=(const EventHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ ThePEG_DECLARE_CLASS_TRAITS(EventHandler,HandlerBase); /** @endcond */ } #endif /* ThePEG_EventHandler_H */ diff --git a/Handlers/EventManipulator.h b/Handlers/EventManipulator.h --- a/Handlers/EventManipulator.h +++ b/Handlers/EventManipulator.h @@ -1,105 +1,105 @@ // -*- C++ -*- // // EventManipulator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_EventManipulator_H #define ThePEG_EventManipulator_H // This is the declaration of the EventManipulator class. #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/Handlers/EventHandler.fh" #include namespace ThePEG { /** * An object of the EventManipulator class may be assigned to a * FullEventGenerator object. The manipulate() method is called for * each event generated, after the AnalysisHandlers have been called, * and may manipulate the event in any way needed. The manipulator may * alseo add StepHandlers to the EventHandler which produced the * event. The manipulate() method returns an integer which should be * zero if nothing was done to the event. If the EventHandler has * steps left to do, these are performed, after which the * AnalysisHandlers are called with the return value from * the previous manipulate() call. Then manipulate is called again and * the procedure is repeated until the EventHandler has no more steps * to do. * * @see \ref EventManipulatorInterfaces "The interfaces" * defined for EventManipulator. * @see FullEventGenerator * @see AnalysisHandler * @see EventHandler * @see StepHandler * */ class EventManipulator: public Interfaced { public: /** * Manipulate an event and the event handler. * @param eh the EventHandler in charge of the generation. * @param event the Event to be manipulated. * @return zero if the event was not manipulated. Otherwise return * an integer which will be given to the * AnalysisHandlers of the current FullEventGenerator. */ virtual int manipulate(tEHPtr eh, tEventPtr event) = 0; public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: private: /** * Describe an abstract class without persistent data. */ static AbstractNoPIOClassDescription initEventManipulator; /** * Private and non-existent assignment operator. */ - EventManipulator & operator=(const EventManipulator &); + EventManipulator & operator=(const EventManipulator &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of EventManipulator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of EventManipulator. */ typedef Interfaced NthBase; }; /** * This template specialization informs ThePEG about the name of the * DecayHandler class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::EventManipulator"; } }; /** @endcond */ } #endif /* ThePEG_EventManipulator_H */ diff --git a/Handlers/FixedCMSLuminosity.h b/Handlers/FixedCMSLuminosity.h --- a/Handlers/FixedCMSLuminosity.h +++ b/Handlers/FixedCMSLuminosity.h @@ -1,133 +1,133 @@ // -*- C++ -*- // // FixedCMSLuminosity.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_FixedCMSLuminosity_H #define ThePEG_FixedCMSLuminosity_H // This is the declaration of the FixedCMSLuminosity class. #include "LuminosityFunction.h" namespace ThePEG { /** * The FixedCMSLuminosity class describes an experiment with incoming * particles colliding with precicely defined and opposite momenta. It * is derived from the LuminosityFunction base class. * * \deprecated As the LuminosityFunction base class has increased * functionality (exceeding the functionality of this class) the use * of FixedCMSLuminosity is deprecated, and the class will be removed * in a future release. Note also that by setting the individual beam * energies in the base class, the behavior of this object may be * inconsistent, in that the collision will not, as specified, be in * the center-of-mass system. * * @see \ref FixedCMSLuminosityInterfaces "The interfaces" * defined for FixedCMSLuminosity. */ class FixedCMSLuminosity: public LuminosityFunction { public: /** @name Standard constructors and destructors. */ //@{ /** * Destructor. */ virtual ~FixedCMSLuminosity(); //@} public: /** * The total energy in the cms of the incoming particles. */ Energy energy() const { return maximumCMEnergy(); } public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Utility function used by the interface. */ void setEnergy(Energy); /** * Utility function used by the interface. */ Energy getEnergy() const; private: /** * Describe a concrete class with persistent data. */ static NoPIOClassDescription initFixedCMSLuminosity; /** * Private and non-existent assignment operator. */ - FixedCMSLuminosity & operator=(const FixedCMSLuminosity &); + FixedCMSLuminosity & operator=(const FixedCMSLuminosity &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of FixedCMSLuminosity. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of FixedCMSLuminosity. */ typedef LuminosityFunction NthBase; }; /** * This template specialization informs ThePEG about the name of the * FixedCMSLuminosity class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::FixedCMSLuminosity"; } /** Return the name of the shared library be loaded to get access to * the FixedCMSLuminosity class and every other class it uses * (except the base class). */ static string library() { return "FixedCMSLuminosity.so"; } }; /** @endcond */ } #endif /* ThePEG_FixedCMSLuminosity_H */ diff --git a/Handlers/FixedTargetLuminosity.h b/Handlers/FixedTargetLuminosity.h --- a/Handlers/FixedTargetLuminosity.h +++ b/Handlers/FixedTargetLuminosity.h @@ -1,152 +1,152 @@ // -*- C++ -*- #ifndef ThePEG_FixedTargetLuminosity_H #define ThePEG_FixedTargetLuminosity_H // // This is the declaration of the FixedTargetLuminosity class. // #include "LuminosityFunction.h" namespace ThePEG { /** * Here is the documentation of the FixedTargetLuminosity class. * * @see \ref FixedTargetLuminosityInterfaces "The interfaces" * defined for FixedTargetLuminosity. */ class FixedTargetLuminosity: public LuminosityFunction { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ FixedTargetLuminosity(); /** * The destructor. */ virtual ~FixedTargetLuminosity(); //@} /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return true if this luminosity function can actually handle a * given pair of incoming particles. */ virtual bool canHandle(const cPDPair &) const; /** * Return the maximum possible center of mass energy for an event. */ virtual Energy maximumCMEnergy() const; /** * Return the rotation needed to transform from the collision cm * system to the labotatory system. This default version returns the * unit transformation. */ virtual LorentzRotation getBoost() const; /** * Return the rapidity of the colliding particles (at the maximum * energy) in the laboratory system. This default version assumes * the CM system is the same as the lab system and returns zero. */ virtual double Y() 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. */ - FixedTargetLuminosity & operator=(const FixedTargetLuminosity &); + FixedTargetLuminosity & operator=(const FixedTargetLuminosity &) = delete; private: /** * The beam particle */ PDPtr beam_; /** * The target particle */ PDPtr target_; /** * CMS energy */ Energy ecms_; /** * Boost */ double beta_; }; } #endif /* ThePEG_FixedTargetLuminosity_H */ diff --git a/Handlers/FlavourGenerator.h b/Handlers/FlavourGenerator.h --- a/Handlers/FlavourGenerator.h +++ b/Handlers/FlavourGenerator.h @@ -1,223 +1,223 @@ // -*- C++ -*- // // FlavourGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_FlavourGenerator_H #define ThePEG_FlavourGenerator_H // This is the declaration of the FlavourGenerator class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Handlers/HandlerBase.h" namespace ThePEG { /** * FlavourGenerator is an abstract base class to be used to implement * models describing the quark content of hadrons. FlavourGenerator * inherits from the HandlerBase class. * * The interface is based on the flavour generation implementation in * Pythia but is general enough to be used in other situations. The * main virtual functions to be overridden in subclasses are * generateHadron(tcPDPtr), getHadron(tcPDPtr, tcPDPtr), * getHadron(long, long) getBaryon(tcPDPtr, tcPDPtr, tcPDPtr), * getBaryon(long, long, long), selectQuark() and selectFlavour(). In * this base class the getHadron(tcPDPtr, tcPDPtr) and getHadron(long, * long) are implemented to call eachother, so a subclass must * implement at least one of them. The same thing is true for * getBaryon(tcPDPtr, tcPDPtr, tcPDPtr) and getBaryon(long, long, * long) * * @see \ref FlavourGeneratorInterfaces "The interfaces" * defined for FlavourGenerator. * @see HandlerBase */ class FlavourGenerator: public HandlerBase { public: /** @name Virtual functions to be overridden by subclasses. */ //@{ /** * Generate a hadron from a quark. Given a quark(antiquark, diquark * or antidiquark), choose a quark-antiquark (or * antidiquark-diquark) pair. Return (first) a hadron formed by the * original quark and the antiquark together with (second) the * generated quark. Returns null pointers if the generation failed. * @param quark a quark, antiquark, diquark or antidiquark. * @return a pair of ParticleData pointers. The \a first is the * hadron produced and the \a second is the anti-partner of the * (anti-)(di-)quark generated to form the hadron. */ virtual tcPDPair generateHadron(tcPDPtr quark) const = 0; /** * Same as generateHadron(tcPDPtr), but throws an exception if no * hadron could be produced. */ tcPDPair alwaysGenerateHadron(tcPDPtr quark) const; /** * Get hadron from flavours. Return a hadron with the flavour * content given by the (anti-)(di-)quarks in the argument. The * arguments are given as ParticleData pointers. The default * versions will call the getHadron(long, long). * @param q1 the first flavour. * @param q2 the second flavour. * @return the corresponding hadron type or null if none could be * generated. */ virtual tcPDPtr getHadron(tcPDPtr q1, tcPDPtr q2) const; /** * Get hadron from flavours. Return a hadron with the flavour * content given by the (anti-)(di-)quarks in the argument. The * arguments are given as PDG codes. The default * versions will call the getHadron(tcPDPtr, tcPDPtr). * @param iq1 the PDG code of the first flavour. * @param iq2 the PDG code of the second flavour. * @return the corresponding hadron type or null if none could be * generated. */ virtual tcPDPtr getHadron(long iq1, long iq2) const; /** * Same as getHadron(tcPDPtr, tcPDPtr) but thows an exception if no * hadron could be produced. */ tcPDPtr alwaysGetHadron(tcPDPtr q1, tcPDPtr q2) const; /** * Same as getHadron(long, long) but thows an exception if no hadron * could be produced. */ tcPDPtr alwaysGetHadron(long iq1, long iq2) const; /** * Return a baryon with the flavour content given by the * (anti)quarks in the argument. The arguments are given as * particle data pointers. The default versions will call * getBaryon(long, long, long). If no corresponding hadron was * formed it should return the null pointer. * @param q1 the first flavour. * @param q2 the second flavour. * @param q3 the third flavour. * @return the corresponding baryon type or null if none could be * generated. */ virtual tcPDPtr getBaryon(tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const; /** * Return a baryon with the flavour content given by the * (anti)quarks in the argument. The arguments are given as * particle data pointers. The default versions will call * getBaryon(tcPDPtr, tcPDPtr, tcPDPtr). If no corresponding hadron was * formed it should return the null pointer. * @param q1 the PDG code of the first flavour. * @param q2 the PDG code of the second flavour. * @param q3 the PDG code of the third flavour. * @return the corresponding baryon type or null if none could be * generated. */ virtual tcPDPtr getBaryon(long q1, long q2, long q3) const; /** * Same as getBaryon(tcPDPtr, tcPDPtr, tcPDPtr), but throws an * exception if no baryon could be produced. */ tcPDPtr alwaysGetBaryon(tcPDPtr q1, tcPDPtr q2, tcPDPtr q3) const; /** * Same as getBaryon(long, long, long), but throws an exception if * no baryon could be produced. */ tcPDPtr alwaysGetBaryon(long q1, long q2, long q3) const; /** * Generate a random quark flavour. */ virtual long selectQuark() const = 0; /** * Generate a random (di)quark flavour. */ virtual long selectFlavour() 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); //@} /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Describe aa abstract class without persistent data. */ static AbstractNoPIOClassDescription initFlavourGenerator; /** * Private and non-existent assignment operator. */ - FlavourGenerator & operator=(const FlavourGenerator &); + FlavourGenerator & operator=(const FlavourGenerator &) = delete; }; /** @cond EXCEPTIONCLASSES */ /** An Exception class used by FlavourGenerator classes if no hadrons could be generated. */ class FlavourGeneratorException: public Exception {}; /** @endcond */ /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of FlavourGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of FlavourGenerator. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * DecayHandler class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::FlavourGenerator"; } }; /** @endcond */ } #endif /* ThePEG_FlavourGenerator_H */ diff --git a/Handlers/GaussianPtGenerator.h b/Handlers/GaussianPtGenerator.h --- a/Handlers/GaussianPtGenerator.h +++ b/Handlers/GaussianPtGenerator.h @@ -1,163 +1,163 @@ // -*- C++ -*- // // GaussianPtGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_GaussianPtGenerator_H #define THEPEG_GaussianPtGenerator_H // This is the declaration of the GaussianPtGenerator class. #include "ThePEG/Handlers/PtGenerator.h" namespace ThePEG { /** * GaussianPtGenerator inherits from the abstract PtGenerator * class. It will generate a transverse momentum distributed according * to a gaussian. * * @see \ref GaussianPtGeneratorInterfaces "The interfaces" * defined for GaussianPtGenerator. */ class GaussianPtGenerator: public PtGenerator { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ GaussianPtGenerator() : theSigma(1.0*GeV), theUpperCut(5.0*GeV) {} /** * Destructor. */ virtual ~GaussianPtGenerator(); //@} public: /** @name Virtual functions required by the PtGenerator class. */ //@{ /** * Generate (\f$k_x, k_y\f$) components of the transverse * momentum. They will be distributed as * \f$\exp(-k_\perp^2/\sigma^2)k_\perp dk_\perp\f$ with * \f$k_\perp^2=k_x^2+k_y^2\f$ and \f$\sigma=\f$ theSigma. The * distribution is cutoff at \f$k_\perp=\f$ theUpperCut. */ virtual TransverseMomentum generate() 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 width of the Gaussian distribution. The average squared * transverse momentum is theSigma squared. */ Energy theSigma; /** * Upper cutoff for the transverse momentum distribution. */ Energy theUpperCut; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initGaussianPtGenerator; /** * Private and non-existent assignment operator. */ - GaussianPtGenerator & operator=(const GaussianPtGenerator &); + GaussianPtGenerator & operator=(const GaussianPtGenerator &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of GaussianPtGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of GaussianPtGenerator. */ typedef PtGenerator NthBase; }; /** * This template specialization informs ThePEG about the name of the * GaussianPtGenerator class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::GaussianPtGenerator"; } /** Return the name of the shared library to be loaded to get access * to the GaussianPtGenerator class and every other class it uses * (except the base class). */ static string library() { return "GaussianPtGenerator.so"; } }; /** @endcond */ } #endif /* THEPEG_GaussianPtGenerator_H */ diff --git a/Handlers/HadronizationHandler.h b/Handlers/HadronizationHandler.h --- a/Handlers/HadronizationHandler.h +++ b/Handlers/HadronizationHandler.h @@ -1,81 +1,81 @@ // -*- C++ -*- // // HadronizationHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HadronizationHandler_H #define ThePEG_HadronizationHandler_H // This is the declaration of the HadronizationHandler class. #include "StepHandler.h" namespace ThePEG { /** * The HadronizationHandler is the base class of all handlers * implementing models for hadronization of coloured particles. It is * derived from the more general StepHandler class, but does not * introduce more functioanality as it stands. * * @see \ref HadronizationHandlerInterfaces "The interfaces" * defined for HadronizationHandler. * @see StepHandler * @see EventHandler * @see SubProcessHandler * */ class HadronizationHandler: public StepHandler { public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Describe an abstract class without persistent data. */ static AbstractNoPIOClassDescription initHadronizationHandler; /** * Private and non-existent assignment operator. */ - HadronizationHandler & operator=(const HadronizationHandler &); + HadronizationHandler & operator=(const HadronizationHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of HadronizationHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of HadronizationHandler. */ typedef StepHandler NthBase; }; /** * This template specialization informs ThePEG about the name of the * HadronizationHandler class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::HadronizationHandler"; } }; /** @endcond */ } #endif /* ThePEG_HadronizationHandler_H */ diff --git a/Handlers/HandlerBase.h b/Handlers/HandlerBase.h --- a/Handlers/HandlerBase.h +++ b/Handlers/HandlerBase.h @@ -1,201 +1,201 @@ // -*- C++ -*- // // HandlerBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HandlerBase_H #define ThePEG_HandlerBase_H // This is the declaration of the HandlerBase class. #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/Repository/UseRandom.fh" #include "ThePEG/Repository/EventGenerator.h" #include namespace ThePEG { template /** * HandlerBaseT is a dummy abstract templated class used as base class * to HandlerBase. HandlerBaseT inherits from the Interfaced class * adding some functionality such as easy acces to the RandomGenerator * and the StandardModel object of the controlling EventGenerator * object. The HandlerBaseT should only be used by the HandlerBase as * a base class. The fact that it is templated allows classes which in * turn inherits from HandlerBase to not explicitly depend on * EventGenerator class if the inlined accessor funtions are not * actually used. The only class which actually works as a template * argument is UseRandom, which is used to generate random numbers. * * @see Interfaced * @see RandomGenerator * @see StandardModel * @see EventGenerator * */ class HandlerBaseT: public Interfaced { public: /** HandlerBase is a friend. */ friend class HandlerBase; private: /** @name Standard constructors and destructors are private and can * only be used from the HandlerBase class. */ //@{ /** * Default constructor. */ HandlerBaseT() {} public: /** * Destructor. */ virtual ~HandlerBaseT() {} //@} public: /** * Return a simple flat random number in the range ]0,1[. */ double rnd() const { return T::rnd(); } /** * Return a simple flat random number in the range ]0,\a xu[. */ double rnd(double xu) const { return T::rnd(xu); } /** * Return a simple flat random number in the range ]\a xl,\a xu[. */ double rnd(double xl, double xu) const { return T::rnd(xl, xu); } /** * Return true with 50% probability. */ bool rndbool() const { return T::rndbool(); } /** * Return a true with probability \a p. */ bool rndbool(double p) const { return T::rndbool(p); } /** * Return a true with probability \a p1/(\a p1+\a p2). */ bool rndbool(double p1, double p2) const { return T::rndbool(p1, p2); } /** * Return -1, 0, or 1 with relative probabilities \a p1, \a p2, \a p3. */ int rndsign(double p1, double p2, double p3) const { return T::rndsign(p1, p2, p3); } /** * Return an integer \f$i\f$ with probability p\f$i\f$/(\a p0+\a p1). */ int rnd2(double p0, double p1) const { return T::rnd2(p0, p1); } /** * Return an integer \f$i\f$ with probability p\f$i\f$/(\a p0+\a * p1+\a p2). */ int rnd3(double p0, double p1, double p2) const { return T::rnd3(p0, p1, p2); } /** * Return an integer/ \f$i\f$ with probability p\f$i\f$(\a p0+\a * p1+\a p2+\a p3). */ int rnd4(double p0, double p1, double p2, double p3) const { return T::rnd4(p0, p1, p2, p3); } /** * Return a simple flat random integrer number in the range [0,\a xu[. */ long irnd(long xu = 2) const { return T::irnd(xu); } /** * Return a simple flat random integrer number in the range [\a xl,\a xu[. */ long irnd(long xl, long xu) const { return T::irnd(xl, xu); } /** * Return a reference to the object containing the standard model * parameters for this run. */ const StandardModelBase & SM() const { return *standardModel(); } /** * Return a pointer to the object containing the standard model * parameters for this run. */ tSMPtr standardModel() const { return generator()->standardModel(); } }; /** * HandlerBase is an abstract base class derived from the Interfaced * class via the HandlerBaseT class adding some functionality such as * easy acces to the RandomGenerator and the StandardModel object of * the controlling EventGenerator object. * * @see Interfaced * @see RandomGenerator * @see StandardModel * @see EventGenerator * */ class HandlerBase: public HandlerBaseT { public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Describe an abstract class without persistent data. */ static AbstractNoPIOClassDescription initHandlerBase; /** * Private and non-existent assignment operator. */ - HandlerBase & operator=(const HandlerBase &); + HandlerBase & operator=(const HandlerBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of HandlerBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of HandlerBase. Note that HandlerBaseT * is not treated as a base class in this respect. */ typedef Interfaced NthBase; }; /** * This template specialization informs ThePEG about the name of the * HandlerBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::HandlerBase"; } }; /** @endcond */ } #endif /* ThePEG_HandlerBase_H */ diff --git a/Handlers/HandlerGroup.h b/Handlers/HandlerGroup.h --- a/Handlers/HandlerGroup.h +++ b/Handlers/HandlerGroup.h @@ -1,545 +1,545 @@ // -*- C++ -*- // // HandlerGroup.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HandlerGroup_H #define ThePEG_HandlerGroup_H // This is the declaration of the HandlerGroup class. #include "ThePEG/Config/ThePEG.h" // #include "HandlerGroup.fh" // #include "HandlerGroup.xh" namespace ThePEG { /** * HandlerGroupBase is the base class for the templated HandlerGroup * utility class to manage a group of StepHandlers. * * The derived StepHandler has a main StepHandler (CascadeHandler, * MultipleInteractionHandler, HadronizationHandler or DecayHandler) * while this bease class has a list of pre-hadlers and a list of * post-handlers. * * The HandlerGroup class is used in the * EventHandler and SubProcessHandler to manage the * post-sub-process handler, the cascade, multiple interaction, * hadronization and decay handler groups. When an event is generated, * after the main sub-process is performed, all handler groups are * processed in turn. In each group the pre-hadnlers are run first, * followed by the main handler (which may be run several times is * more than one Hint has been specified) and finally the * post-handlers are run. * * When a group is initialised before each run, an auxilliary * HandlerGroupBase object may be specified to override the default * handlers in this group. * * @see HandlerGroup */ class HandlerGroupBase { public: /** Associate a StepHandler with a Hint object. */ typedef pair StepWithHint; /** A vector of StepHandler objects. */ typedef vector StepVector; /** A vector of StepHandler objects associated with Hint objects. */ typedef vector StepHintVector; /** A vector of Hint objects. */ typedef deque HintVector; public: /** * Default constructor. */ HandlerGroupBase(); /** * Destructor. */ virtual ~HandlerGroupBase(); /** * Returns true if current selections in this group is empty. */ bool empty() const { return isEmpty; } /** * Initialize, taking the default StepHandlers as the current ones, * possibly overridden by the default ones in the auxilliary group * supplied in the argument. */ void init(const HandlerGroupBase & ext) { clear(); refillDefaults(ext); } /** * Return the next step; */ StepWithHint next(); /** * Add a step handler, \a sh to the current list of * pre-handlers. Optionally a \a hint may be specified. If the main * handler has already been executed, the object is reinitialized * using \a ext to override defaults. */ void addPreHandler(tStepHdlPtr sh, tHintPtr hint, const HandlerGroupBase & ext); /** * Add a step handler, \a sh, to the current list of * post-handlers. Optionally a \a hint may be specified. If the main * handler has already been executed, the object is reinitialized * using \a ext to override defaults. */ void addPostHandler(tStepHdlPtr sh, tHintPtr hint, const HandlerGroupBase &); /** * Add a \a hint to the currently selected main handler. If the main * handler has already been executed, the object is reinitialized * using \a ext to override defaults. */ void addHint(tHintPtr hint, const HandlerGroupBase & ext); /** * Return a reference to the list of default pre-handlers. */ StepVector & preHandlers() { return theDefaultPreHandlers; } /** * Return a reference to the list of default pre-handlers. */ const StepVector & preHandlers() const { return theDefaultPreHandlers; } /** * Return a pointer to the default main handler. */ virtual tStepHdlPtr defaultHandler() const = 0; /** * Return a reference to the list of default post-handlers. */ StepVector & postHandlers() { return theDefaultPostHandlers; } /** * Return a reference to the list of default post-handlers. */ const StepVector & postHandlers() const { return theDefaultPostHandlers; } /** * Return a pointer to the current main handler. */ virtual tStepHdlPtr handler() const = 0; /** * Unset the current main handler. */ virtual void setHandler() = 0; /** * Set the current main handler, but also refill the current pre- * and post- handlers with the defaults from \a ext. */ virtual bool setHandler(tStepHdlPtr, const HandlerGroupBase & ext) = 0; /** * Set the current main handler. If the null pointer use the default * main handler. */ virtual void refillDefaultHandler(tStepHdlPtr) = 0; /** * Fill main, pre- and post- handlers with the default ones. The * default handlers in the argument takes precedence to this. */ void refillDefaults(const HandlerGroupBase &); /** * Clear all current handlers, but don't touch the default ones. */ virtual void clear(); /** * Return the base class name of the main handler type. */ virtual string handlerClass() const = 0; /** * Utility function used for the interface. */ void interfaceSetPrehandler(StepHdlPtr p, int i); /** * Utility function used for the interface. */ void interfaceInsertPrehandler(StepHdlPtr p, int i); /** * Utility function used for the interface. */ void interfaceErasePrehandler(int i); /** * Utility function used for the interface. */ vector interfaceGetPrehandlers() const; /** * Utility function used for the interface. */ void interfaceSetPosthandler(StepHdlPtr p, int i); /** * Utility function used for the interface. */ void interfaceInsertPosthandler(StepHdlPtr p, int i); /** * Utility function used for the interface. */ void interfaceErasePosthandler(int i); /** * Utility function used for the interface. */ vector interfaceGetPosthandlers() const; /** * Write to persistent streams. */ virtual void write(PersistentOStream &) const; /** * Read from persistent streams. */ virtual void read(PersistentIStream &); protected: /** * The copy constructor is only used via subclasses. */ HandlerGroupBase(const HandlerGroupBase &); /** * True if the current handlers are empty. */ bool isEmpty; private: /** * Add handlers from the def vector to the current, supplying them * with default hints. */ void checkInsert(StepHintVector & current, const StepVector & def); protected: /** * The default pre-handlers with hints. */ StepVector theDefaultPreHandlers; /** * The default post-handlers with hints. */ StepVector theDefaultPostHandlers; /** * The current pre-handlers with hints. */ StepHintVector thePreHandlers; /** * The current hints for the main handler. */ HintVector theHints; /** * The current post-handlers with hints. */ StepHintVector thePostHandlers; private: /** * Assignment is private. */ - HandlerGroupBase & operator=(const HandlerGroupBase &); + HandlerGroupBase & operator=(const HandlerGroupBase &) = delete; }; /** * HandlerGroup is a templated utility class to manage a * group of StepHandlers. All HandlerGroup * classes are derived from the HandlerGroupBase class. As * an example the specialization * HandlerGroup keeps a * CascadeHandler object and associated pre- and * post- StepHandlers, defining shich steps should be * performed before the perturbative cascade, which object should be * used for the cascade and which steps should be performed after. * * The HandlerGroup keesp both a default main handler and * the corresponding default pre- and post- handlers as well as the * main handler and pre/post hadlers chosen for the current event. The * current handlers are accompanied by Hints. Handlers which are * copied from the default ones are accompanied by the default Hint, * while handlers supplied from the outside may be accompanied by any * kind of hint. The main handler can be supplied with several hints, * the pre- and post- handlers may only have one hint each. * * The HandlerGroup class is used in the * EventHandler and SubProcessHandler to manage the * post-sub-process handler, the cascade, multiple interaction, * hadronization and decay handler groups. * * @see EventHandler * @see SubProcessHandler * @see StepHandler * @see CascadeHandler * @see MultipleInteractionHandler * @see HadronizationHandler * @see DecayHandler * */ template class HandlerGroup: public HandlerGroupBase { public: /** A pointer to the template argument class. */ typedef typename Ptr::pointer HdlPtr; /** A transient pointer to the template argument class. */ typedef typename Ptr::transient_pointer tHdlPtr; public: /** * Destructor. */ virtual ~HandlerGroup(); /** * Set the current main handler. Also refill the current pre- and * post- handlers with the defaults from \a ext. */ virtual bool setHandler(tStepHdlPtr, const HandlerGroupBase & ext); /** * Unset the current main handler. */ virtual void setHandler() { theHandler = HdlPtr(); } /** * Return a pointer to the current main handler. */ virtual tStepHdlPtr handler() const { return dynamic_ptr_cast(theHandler); } /** * Return a pointer to the default main handler. */ virtual tStepHdlPtr defaultHandler() const { return dynamic_ptr_cast(theDefaultHandler); } /** * Set the current main handler. If the null pointer use the default * main handler. */ virtual void refillDefaultHandler(tStepHdlPtr); /** * Clear all current handlers, but don't touch the default ones. */ virtual void clear(); /** * Return the base class name of the main handler type. */ virtual string handlerClass() const; /** * Utility function used for the interface. */ void interfaceSetHandler(HdlPtr); /** * Utility function used for the interface. */ HdlPtr interfaceGetHandler() const; /** * Write to persistent streams. */ virtual void write(PersistentOStream & os) const { os << theDefaultHandler << theHandler; HandlerGroupBase::write(os); } /** * Read from persistent streams. */ virtual void read(PersistentIStream & is) { is >> theDefaultHandler >> theHandler; HandlerGroupBase::read(is); } private: /** * The default main handler. */ HdlPtr theDefaultHandler; /** * The current main handler. */ HdlPtr theHandler; private: /** * Assignment is private. */ - HandlerGroup & operator=(const HandlerGroup &); + HandlerGroup & operator=(const HandlerGroup &) = delete; }; /** Namespace to encapsulate enums related to HandlerGroups. */ namespace Group { /** * Enumeration for the type of HandlerGroups. */ enum Handler { subproc, /**< The sub-process group. */ cascade, /**< The CascadeHandler group. */ multi, /**< The MultipleInteractionHandler group. */ hadron, /**< The HadronizationHandler group. */ decay /**< The DecayHandler group. */ }; /** Enumeration for the type of step handler */ enum Level { before, /**< A pre-handler. */ main, /**< The mainhandler. */ after /**< A post-handler. */ }; } /** Output a HandlerGroup to a PersistentOStream. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const HandlerGroup & hg) { hg.write(os); return os; } /** Input a HandlerGroup from a PersistentIStream. */ template inline PersistentIStream & operator>>(PersistentIStream & is, HandlerGroup & hg) { hg.read(is); return is; } } /** Macro for declaring a prepost group */ #define ThePEG_DECLARE_PREPOST_GROUP(HandlerClass,prepost) \ /** Utility function for the interface. */ \ void interfaceSet##prepost##HandlerClass(StepHdlPtr, int); \ /** Utility function for the interface. */ \ void interfaceInsert##prepost##HandlerClass(StepHdlPtr, int); \ /** Utility function for the interface. */ \ void interfaceErase##prepost##HandlerClass(int); \ /** Utility function for the interface. */ \ vector interfaceGet##prepost##HandlerClass() const /** Macro for declaring a group interface */ #define ThePEG_DECLARE_GROUPINTERFACE(HandlerClass,ptr) \ ThePEG_DECLARE_PREPOST_GROUP(HandlerClass,Pre); \ /** Utility function for the interface. */ \ void interfaceSet##HandlerClass(ptr); \ /** Utility function for the interface. */ \ ptr interfaceGet##HandlerClass() const; \ ThePEG_DECLARE_PREPOST_GROUP(HandlerClass,Post) /** Macro for implementing a prepost group. */ #define ThePEG_IMPLEMENT_PREPOST_GROUP(ThisClass,HandlerClass,member,pp) \ void ThisClass::interfaceSet##pp##HandlerClass(StepHdlPtr p , int i) { \ member.interfaceSet##pp##handler(p,i); \ } \ void ThisClass::interfaceInsert##pp##HandlerClass(StepHdlPtr p, int i) { \ member.interfaceInsert##pp##handler(p,i); \ } \ void ThisClass::interfaceErase##pp##HandlerClass(int i) { \ member.interfaceErase##pp##handler(i); \ } \ vector ThisClass::interfaceGet##pp##HandlerClass() const { \ return member.interfaceGet##pp##handlers(); \ } /** Macro for implementing a group interface. */ #define ThePEG_IMPLEMENT_GROUPINTERFACE(ThisClass,HandlerClass,member,ptr) \ ThePEG_IMPLEMENT_PREPOST_GROUP(ThisClass,HandlerClass,member,Pre) \ void ThisClass::interfaceSet##HandlerClass(ptr p) { \ member.interfaceSetHandler(p); \ } \ ptr ThisClass::interfaceGet##HandlerClass() const { \ return member.interfaceGetHandler(); \ } \ ThePEG_IMPLEMENT_PREPOST_GROUP(ThisClass,HandlerClass,member,Post) \ /** Macro for declaring prepost objects. */ #define ThePEG_DECLARE_PREPOST_OBJECTS(ThisClass,HandlerClass,pp,ba) \ static RefVector interface##pp##HandlerClass \ (#pp #HandlerClass "s", \ "A list of handlers to be called " #ba " the " #HandlerClass ". " \ "If handler objects are specified in a EventHandler and " \ "the SubProcessHandler chosen in a given collision also specifies some, " \ "the latter will caled first.", \ 0, 0, false, false, true, false, \ &ThisClass::interfaceSet##pp##HandlerClass, \ &ThisClass::interfaceInsert##pp##HandlerClass, \ &ThisClass::interfaceErase##pp##HandlerClass, \ &ThisClass::interfaceGet##pp##HandlerClass) /** Macro for declaring group interface objects. */ #define ThePEG_DECLARE_GROUPINTERFACE_OBJECTS(ThisClass,HandlerClass) \ ThePEG_DECLARE_PREPOST_OBJECTS(ThisClass,HandlerClass,Pre, before); \ static Reference interface ## HandlerClass \ (#HandlerClass, \ "The " #HandlerClass " object used in this " #ThisClass ". " \ "If a " #HandlerClass " object is specified in a EventHandler and " \ "the SubProcessHandler chosen in a given collision also specifies one," \ "the latter will be used.", \ 0, false, false, true, true, \ &ThisClass::interfaceSet ## HandlerClass, \ &ThisClass::interfaceGet ## HandlerClass); \ ThePEG_DECLARE_PREPOST_OBJECTS(ThisClass,HandlerClass,Post, after) #ifndef ThePEG_TEMPLATES_IN_CC_FILE #include "HandlerGroup.tcc" #endif #endif /* ThePEG_HandlerGroup_H */ diff --git a/Handlers/LuminosityFunction.h b/Handlers/LuminosityFunction.h --- a/Handlers/LuminosityFunction.h +++ b/Handlers/LuminosityFunction.h @@ -1,232 +1,232 @@ // -*- C++ -*- // // LuminosityFunction.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_LuminosityFunction_H #define ThePEG_LuminosityFunction_H // This is the declaration of the LuminosityFunction class. #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/Handlers/LastXCombInfo.h" #include "ThePEG/Vectors/LorentzRotation.fh" #include "ThePEG/Utilities/Interval.h" namespace ThePEG { /** * The LuminosityFunction describes the momentum distribution of the * incoming beams in an experiment. This is used by a EventHandler to * generate collisions in their CM system. The LuminosityFunction will * be asked to produce a LorentzRotation giving the transformation to * the laboratory system. * * The LuminosityFunction inherits from the LastXCombInfo class to * give easy access to the information of the generated primary * sub-process in the selected XComb. * * This base class implements simple fixed momentum beams with * energies given by the BeamEMaxA and BeamEMaxB interfaces. * * @see \ref LuminosityFunctionInterfaces "The interfaces" * defined for LuminosityFunction. * @see XComb * */ class LuminosityFunction: public HandlerBase, public LastXCombInfo<> { /** EventHandler is a friend. */ friend class EventHandler; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. Optionally the maximum energy of beam \a a * and \a b can be given. */ LuminosityFunction(Energy a = 45.6*GeV, Energy b = 45.6*GeV); //@} /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return true if this luminosity function can actually handle a * given pair of incoming particles. */ virtual bool canHandle(const cPDPair &) const; /** * Return the maximum possible center of mass energy for an event. */ virtual Energy maximumCMEnergy() const; /** * Return the rotation needed to transform from the collision cm * system to the labotatory system. This default version returns the * unit transformation. */ virtual LorentzRotation getBoost() const; /** * Return the rapidity of the colliding particles (at the maximum * energy) in the laboratory system. This default version assumes * the CM system is the same as the lab system and returns zero. */ virtual double Y() const; /** * How many random numbers are needed to generate a phase space * point? Default is zero in which means the energy of the incoming * particles is fixed. The only other reasonable values are 1 and 2. */ virtual int nDim(const cPDPair &) const; /** * The value of the luminosity function for the given particle types * for the given energy fractions l1 and l2 (\f$l=\log(1/x)\f$). The * default version returns 1 if l1 and l2 are zero otherwize zero. */ virtual double value(const cPDPair &, double l1, double l2) const; /** * Generate energy fractions l1 and l2 (\f$l=\log(1/x)\f$) given * 'nDim()' random numbers in the range ]0,1[ given by the * iterators. The jacobian argument must be multiplied by the * jacobian of the variable transformation to l1 and l2. The default * version is just a delta function with a jacobian of 1. */ virtual pair generateLL(const double * r, double & jacobian) const; //@} public: /** @name Simple access functions */ //@{ /** * The maximum energy of the beam entering along the positive z-axis. */ Energy beamEMaxA() const { return theBeamEMaxA; } /** * The maximum energy of the beam entering along the negative z-axis. */ Energy beamEMaxB() const { return theBeamEMaxB; } //@} protected: /** * The maximum energy of the beam entering along the positive z-axis. */ void beamEMaxA(Energy x) { theBeamEMaxA = x; } /** * The maximum energy of the beam entering along the negative z-axis. */ void beamEMaxB(Energy x) { theBeamEMaxB = 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); //@} /** * Standard Init function used to initialize the interface. */ static void Init(); /** * Set information about the selected XComb. */ void select(tXCombPtr); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 maximum energy of the beam entering along the positive z-axis. */ Energy theBeamEMaxA; /** * The maximum energy of the beam entering along the negative z-axis. */ Energy theBeamEMaxB; private: /** * Describe an abstract class with persistent data. */ static ClassDescription initLuminosityFunction; /** * Private and non-existent assignment operator. */ - LuminosityFunction & operator=(const LuminosityFunction &); + LuminosityFunction & operator=(const LuminosityFunction &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of LuminosityFunction. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of LuminosityFunction. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * LuminosityFunction class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::LuminosityFunction"; } }; /** @endcond */ } #endif /* ThePEG_LuminosityFunction_H */ diff --git a/Handlers/MultipleInteractionHandler.h b/Handlers/MultipleInteractionHandler.h --- a/Handlers/MultipleInteractionHandler.h +++ b/Handlers/MultipleInteractionHandler.h @@ -1,80 +1,80 @@ // -*- C++ -*- // // MultipleInteractionHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MultipleInteractionHandler_H #define ThePEG_MultipleInteractionHandler_H // This is the declaration of the MultipleInteractionHandler class. #include "StepHandler.h" namespace ThePEG { /** * The MultipleInteractionHandler is the base class of all * handlers implementing models for multiple interactions. It is * derived from the more general StepHandler class, * and does not introduce more functioanality as it stands. * * @see \ref MultipleInteractionHandlerInterfaces "The interfaces" * defined for MultipleInteractionHandler. * @see StepHandler * @see EventHandler * @see SubProcessHandler */ class MultipleInteractionHandler: public StepHandler { public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Describe an abstract class without persistent data. */ static AbstractNoPIOClassDescription initMultipleInteractionHandler; /** * Private and non-existent assignment operator. */ - MultipleInteractionHandler & operator=(const MultipleInteractionHandler &); + MultipleInteractionHandler & operator=(const MultipleInteractionHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of MultipleInteractionHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of MultipleInteractionHandler. */ typedef StepHandler NthBase; }; /** * This template specialization informs ThePEG about the name of the * MultipleInteractionHandler class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::MultipleInteractionHandler"; } }; /** @endcond */ } #endif /* ThePEG_MultipleInteractionHandler_H */ diff --git a/Handlers/PtGenerator.h b/Handlers/PtGenerator.h --- a/Handlers/PtGenerator.h +++ b/Handlers/PtGenerator.h @@ -1,91 +1,91 @@ // -*- C++ -*- // // PtGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PtGenerator_H #define ThePEG_PtGenerator_H // This is the declaration of the PtGenerator class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Handlers/HandlerBase.h" namespace ThePEG { /** * PtGenerator is the base for all classes implementing alternative * models for transverse momentum generation. It inherits from the * HandlerBase which among other things provides forward access to the * random number object held by the EventGenerator object. * * @see \ref PtGeneratorInterfaces "The interfaces" * defined for PtGenerator. * @see HandlerBase * @see EventGenerator */ class PtGenerator: public HandlerBase { public: /** @name Virtual functions to be implemented by sub-classes. */ //@{ /** * Generate (\f$k_x, k_y\f$) components of the transverse * momentum. */ virtual TransverseMomentum generate() const =0; //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Describe an abstract class without persistent data. */ static AbstractClassDescription initPtGenerator; /** * Private and non-existent assignment operator. */ - PtGenerator & operator=(const PtGenerator &); + PtGenerator & operator=(const PtGenerator &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of PtGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of PtGenerator. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * PtGenerator class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::PtGenerator"; } }; /** @endcond */ } #endif /* ThePEG_PtGenerator_H */ diff --git a/Handlers/SamplerBase.h b/Handlers/SamplerBase.h --- a/Handlers/SamplerBase.h +++ b/Handlers/SamplerBase.h @@ -1,399 +1,399 @@ // -*- C++ -*- // // SamplerBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SamplerBase_H #define ThePEG_SamplerBase_H // This is the declaration of the SamplerBase class. #include "ThePEG/Interface/Interfaced.h" #include "SamplerBase.fh" #include "ThePEG/Handlers/StandardEventHandler.fh" // #include "SamplerBase.xh" namespace ThePEG { /** * This is the base class for all phase space sampler classes to be * used by the EventHandler class to sample the phase space according * to the cross sections for the processes in the EventHandler. The * class should be able to sample a unit hyper-cube in arbitrary * dimensions. The points need not necessarily be sampled with unit * weight. * * The virtual methods to be implemented by concrete sub-classes are * initialize(), generate() and rejectLast(). * * @see \ref SamplerBaseInterfaces "The interfaces" * defined for SamplerBase. * @see EventHandler */ class SamplerBase: public Interfaced { public: /** @name Standard constructors and destructors. */ //@{ /** * Constructor */ SamplerBase() : Interfaced(), theIntegrationList("") {} /** * Destructor. */ virtual ~SamplerBase(); //@} public: /** * Set the event handler for which the function * StandardEventHandler::dSigDR(const vector &) function * returns the cross section for the chosen phase space point. */ void setEventHandler(tStdEHPtr eh) { theEventHandler = eh; } /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Initialize the the sampler, possibly doing presampling of the * phase space. */ virtual void initialize() = 0; /** * An external hook to prepare the sampler for generating events, e.g. by * combining grid files from parallel integration runs. */ virtual void prepare() {} /** * Generarate a new phase space point and return a weight associated * with it. This weight should preferably be 1. */ virtual double generate() = 0; /** * Reject the last chosen phase space point. */ virtual void rejectLast() = 0; /** * Return the last generated phase space point. */ const vector & lastPoint() const { return theLastPoint; } /** * 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 0; } /** * Return the total integrated cross section determined from the * Monte Carlo sampling so far. */ virtual CrossSection integratedXSec() const = 0; /** * Return the error on the total integrated cross section determined * from the Monte Carlo sampling so far. */ virtual CrossSection integratedXSecErr() const = 0; /** * Return the reference cross section, a.k.a. maximum weight. When * not provided directly, this will be determined effectively from * the sum of weights and sum of weights squared to match up the * standard definition of a Monte Carlo cross section along with the * cross section and error quoted. */ virtual CrossSection maxXSec() const { if ( sumWeights2() <= 0.0 ) return ZERO; return integratedXSec()*attempts()/sumWeights(); } /** * Return the number of attempts. When not provided directly, this * will be determined effectively from the sum of weights and sum of * weights squared to match up the standard definition of a Monte * Carlo cross section along with the cross section and error * quoted. */ virtual double attempts() const { CrossSection sigma = integratedXSec(); CrossSection esigma = integratedXSecErr(); double sw = sumWeights(); double sw2 = sumWeights2(); if ( sw2 <= 0.0 ) return 0.0; return sqr(sw)*(sqr(esigma)-sqr(sigma))/(sqr(sw)*sqr(esigma) - sw2*sqr(sigma)); } /** * Return the sum of the weights returned by generate() so far (of * the events that were not rejeted). */ virtual double sumWeights() const = 0; /** * Return the sum of the weights squared returned by generate() so * far (of the events that were not rejeted). */ virtual double sumWeights2() const = 0; /** * Return true if this sampler is generating almost unweighted events. */ virtual bool almostUnweighted() const { return false; } //@} /** @name Controlling of run levels and grid handling*/ //@{ /** * Set a file containing a list of subprocesses to integrate */ void integrationList(const string& newIntegrationList) { theIntegrationList = newIntegrationList; } /** * Return a file containing a list of subprocesses to integrate */ const string& integrationList() const { return theIntegrationList; } /** * Enumerate the possible run levels */ enum RunLevels { UnknownMode = 0, InitMode, ReadMode, BuildMode, IntegrationMode, RunMode }; /** * Return the run level */ static int runLevel() { return theRunLevel(); } /** * Set the run level */ static void setRunLevel(int level) { theRunLevel() = level; } /** * Return true, if a setupfile is in use */ static bool hasSetupFile() { return theHasSetupFile(); } /** * Indicate that a setupfile is in use. */ static void setupFileUsed(bool yes = true) { theHasSetupFile() = yes; } /** * Return the seed that has been used for this run to disentangle * grids whihch have been adapted further */ static long seed() { return theSeed(); } /** * Set the seed that has been used for this run to disentangle * grids whihch have been adapted further */ static void setSeed(long s) { theSeed() = s; } /** * Return the number of subprocesses to be integrated per job. */ static unsigned int integratePerJob() { return theIntegratePerJob(); } /** * Set the number of subprocesses to be integrated per job. */ static void setIntegratePerJob(unsigned int s) { theIntegratePerJob() = s; } /** * Return the maximum number of integration jobs to be created. */ static unsigned int integrationJobs() { return theIntegrationJobs(); } /** * Set the maximum number of integration jobs to be created. */ static void setIntegrationJobs(unsigned int s) { theIntegrationJobs() = s; } //@} protected: /** * Return the last generated phase space point. */ vector & lastPoint() { return theLastPoint; } /** * Return the associated event handler. */ tStdEHPtr eventHandler() const { return theEventHandler; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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(); private: /** * The associated event handler. */ tStdEHPtr theEventHandler; /** * The last generated phase space point. */ vector theLastPoint; /** * A file containing a list of subprocesses to integrate */ string theIntegrationList; /** * The run level */ static int& theRunLevel() { static int lvl = UnknownMode; return lvl; } /** * True, if a setupfile is in use */ static bool& theHasSetupFile() { static bool flag = false; return flag; } /** * The seed that has been used for this run to disentangle * grids whihch have been adapted further */ static long& theSeed() { static long s = 0; return s; } /** * The number of subprocesses to be integrated per job. */ static unsigned int& theIntegratePerJob() { static unsigned int s = 0; return s; } /** * The maximum number of integration jobs to be created. */ static unsigned int& theIntegrationJobs() { static unsigned int s = 0; return s; } private: /** * Describe an abstract base class with persistent data. */ static AbstractClassDescription initSamplerBase; /** * Private and non-existent assignment operator. */ - SamplerBase & operator=(const SamplerBase &); + SamplerBase & operator=(const SamplerBase &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * SamplerBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of SamplerBase. */ typedef Interfaced NthBase; }; /** * This template specialization informs ThePEG about the name of the * SamplerBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::SamplerBase"; } }; /** @endcond */ } #endif /* ThePEG_SamplerBase_H */ diff --git a/Handlers/SimpleFlavour.h b/Handlers/SimpleFlavour.h --- a/Handlers/SimpleFlavour.h +++ b/Handlers/SimpleFlavour.h @@ -1,451 +1,451 @@ // -*- C++ -*- // // SimpleFlavour.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SimpleFlavour_H #define THEPEG_SimpleFlavour_H // This is the declaration of the SimpleFlavour class. #include "ThePEG/Handlers/FlavourGenerator.h" #include "ThePEG/Utilities/VSelector.h" // #include "SimpleFlavour.fh" // #include "SimpleFlavour.xh" namespace ThePEG { /** * SimpleFlavour is a simple class to generate hadrons given the quark * flavours. It implements a simplified version of the model of the * old fortran version of Pythia. * * @see \ref SimpleFlavourInterfaces "The interfaces" * defined for SimpleFlavour. */ class SimpleFlavour: public FlavourGenerator { public: /** A map of Selectors. */ typedef map > > ProbabilityMap; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ SimpleFlavour(); /** * Destructor. */ virtual ~SimpleFlavour(); //@} public: /** @name Virtual functions mandated by the FlavourGenerator base class. */ //@{ /** * Generate a hadron from a quark. Given a quark(antiquark, diquark * or antidiquark), choose a quark-antiquark (or * antidiquark-diquark) pair. Return (first) a hadron formed by the * original quark and the antiquark together with (second) the * generated quark. Returns null pointers if the generation failed. * @param quark a quark, antiquark, diquark or antidiquark. * @return a pair of ParticleData pointers. The \a first is the * hadron produced and the \a second is the anti-partner of the * (anti-)(di-)quark generated to form the hadron. */ virtual tcPDPair generateHadron(tcPDPtr quark) const; /** * Get hadron from flavours. Return a hadron with the flavour * content given by the (anti-)(di-)quarks in the argument. The * arguments are given as PDG codes. * @param iq1 the PDG code of the first flavour. * @param iq2 the PDG code of the second flavour. * @return the corresponding hadron type or null if none could be * generated. */ virtual tcPDPtr getHadron(long iq1, long iq2) const; using FlavourGenerator::getHadron; /** * Return a baryon with the flavour content given by the * (anti)quarks in the argument. The arguments are given as * particle data pointers. * @param q1 the PDG code of the first flavour. * @param q2 the PDG code of the second flavour. * @param q3 the PDG code of the third flavour. * @return the corresponding baryon type or null if none could be * generated. */ virtual tcPDPtr getBaryon(long q1, long q2, long q3) const; using FlavourGenerator::getBaryon; /** * Generate a random quark flavour. */ virtual long selectQuark() const; /** * Generate a random (di)quark flavour. */ virtual long selectFlavour() const; //@} public: /** @name Access the parameters controlling the generation. */ //@{ /** * Return the suppression factor of strange quarks w.r.t. u and d. */ double sSup() const { return theSSup; } /** * Return the suppression factor for di-quarks w.r.t. quarks */ double diSup() const { return theDiSup; } /** * Return the suppression of spin-1 di-quarks w.r.t. spin-0 ones; */ double di1Sup() const { return theDi1Sup; } /** * Return the suppression of strange di-quarks w.r.t. u and d ones * in addition to the standard strangness suppression of quarks. */ double diSSup() const { return theDiSSup; } /** * Return the extra suppression of eta's */ double etaSup() const { return theEtaSup; } /** * Return the extra suppression of ets-prime's */ double etaPSup() const { return theEtaPSup; } /** * Return the extra suppression for baryons of the spin 3/2 * decuplet. */ double baryon10Sup() const { return theBaryon10Sup; } /** * Return the probability that light (u/d) mesons has spin 1; */ double pSpin1() const { return thePSpin1; } /** * Return the probability that strange mesons has spin 1; */ double pSpinS1() const { return thePSpinS1; } /** * Return the probability that charmed and heavier mesons has spin * 1; */ double pSpinC1() const { return thePSpinC1; } //@} protected: /** * Calculate the probabilities for generateHadron for the given * flavour. */ virtual void setProbabilities(long iq) const; /** * Return the probability that the given quark flavours end up in a * vector meson rather than in a pseudo scalar meson. */ virtual double vectorMesonProbability(long iq1, long iq2) const; /** * Return the probability that the given quark and diquark flavours * end up in a spin 3/2 decuplet baryon rather than in a spin 1/2 * octet baryon. */ virtual double baryonDecupletProbability(long iq1, long iq2) const; /** * Return a pseudo scalar meson formed by the two quark flavours. */ virtual tcPDPtr pseudoScalarMeson(long iq, long iqbar) const; /** * Return a vector meson formed by the two quark flavours. */ virtual tcPDPtr vectorMeson(long iq, long iqbar) const; /** * Return a spin 1/2 octet baryon formed by the given quark and * diquark flavours. */ virtual tcPDPtr baryonOctet(long iq, long idq) const; /** * Return a spin 3/2 decuplet baryon formed by the given quark and * diquark flavours. */ virtual tcPDPtr baryonDecuplet(long iq, long idq) const; /** * Return the PDG code of a pseudo scalar meson formed by the two * quark flavours for \a iqh >= \a iql > 0. */ virtual long pseudoScalarId(long iqh, long iql) const; /** * Return the PDG code of a vector meson formed by the two quark * flavours for \a iqh >= \a iql > 0. */ virtual long vectorId(long iqh, long iql) const; /** * Return the PDG code for a spin 1/2 octet baryon formed by the * given quark flavours (\a iqa >= \a iqb >= \a iqc > 0). iq is one * of the flavours and the other two are assumed to be in a diquark * (in a spin-1 state if \a dqs1). */ virtual long baryonOctetId(long iqa, long iqb, long iqc, long iq, bool dqs1) const; /** * Return the PDG code for a spin 3/2 decuplet baryon formed by the * given quark flavours (\a iqa >= \a iqb >= \a iqc > 0). */ virtual long baryonDecupletId(long iqa, long iqb, long iqc) const; /** * Return the PDG code of pseudo scalar mesons formed by the two * quark flavours (for \a iqh >= \a iql > 0), together with suitable * weights. */ virtual vector< pair > pseudoScalarIds(long iqh, long iql) const; /** * Return the PDG codes of vector mesons formed by the two quark * flavours (for \a iqh >= \a iql > 0), together with * suitable weights. */ virtual vector< pair > vectorIds(long iqh, long iql) const; /** * Return the PDG codes for spin 1/2 octet baryons formed by the * given quark flavours (\a iqa >= \a iqb >= \a iqc > 0) together * with suitable weights. iq is one of the flavours and the other * two are assumed to be in a diquark (in a spin-1 state if \a dqs1). */ virtual vector< pair > baryonOctetIds(long iqa, long iqb, long iqc, long iq, bool dqs1) const; /** * Return the PDG codes for spin 3/2 decuplet baryons formed by * the given quark flavours (\a iqa >= \a iqb >= \a iqc > 0) together with * suitable weights. */ virtual vector< pair > baryonDecupletIds(long iqa, long iqb, long iqc) const; /** * Clear all cashed weights. */ void clear(); /** * Return the SU(6) weight for the given quark and di-quark flavours * to end up with in a baryon with the given spin (2S+1). */ static double weightSU6QDiQSpin(long iq, long idq, int spin); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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: /** @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: /** * Suppression factor of strange quarks w.r.t. u and d. */ double theSSup; /** * Suppression factor for di-quarks w.r.t. quarks. */ double theDiSup; /** * Suppression of spin-1 di-quarks w.r.t. spin-0 ones. */ double theDi1Sup; /** * Suppression of strange di-quarks w.r.t. u and d ones in addition * to the standard strangness suppression of quarks. */ double theDiSSup; /** * Extra suppression of eta's. */ double theEtaSup; /** * Extra suppression of ets-prime's. */ double theEtaPSup; /** * Extra suppression for baryons of the spin 3/2 decuplet. */ double theBaryon10Sup; /** * Probability that light (u/d) mesons has spin 1. */ double thePSpin1; /** * Probability that strange mesons has spin 1. */ double thePSpinS1; /** * Probability that charmed and heavier mesons has spin 1. */ double thePSpinC1; /** * A selector used to weight the creation of (di)quark-anti(di)quark * pairs. */ mutable VSelector theFlavourSelector; /** * A map of selectors to cash probabilities for generateHadron. */ mutable ProbabilityMap theProbabilities; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initSimpleFlavour; /** * Private and non-existent assignment operator. */ - SimpleFlavour & operator=(const SimpleFlavour &); + SimpleFlavour & operator=(const SimpleFlavour &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * SimpleFlavour. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of SimpleFlavour. */ typedef FlavourGenerator NthBase; }; template <> /** * This template specialization informs ThePEG about the name of the * SimpleFlavour class and the shared object where it is defined. */ struct ClassTraits : public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::SimpleFlavour"; } /** * Return the name of the shared library to be loaded to get access * to the SimpleFlavour class and every other class it uses (except * the base class). */ static string library() { return "SimpleFlavour.so"; } }; /** @endcond */ } #endif /* THEPEG_SimpleFlavour_H */ diff --git a/Handlers/SimpleZGenerator.h b/Handlers/SimpleZGenerator.h --- a/Handlers/SimpleZGenerator.h +++ b/Handlers/SimpleZGenerator.h @@ -1,150 +1,150 @@ // -*- C++ -*- // // SimpleZGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SimpleZGenerator_H #define THEPEG_SimpleZGenerator_H // This is the declaration of the SimpleZGenerator class. #include "ThePEG/Handlers/ZGenerator.h" namespace ThePEG { /** * SimpleZGenerator is a very simple concrete subclass of * ZGenerator. It implements a naive unphysical model to generate the * momentum fraction, \f$z\f$, taken by hadrons produced in a hadronization * scenario. It should only be used for testing purposes. * * @see \ref SimpleZGeneratorInterfaces "The interfaces" * defined for SimpleZGenerator. */ class SimpleZGenerator: public ZGenerator { public: /** @name Standard constructors and destructors. */ //@{ /** * Destructor. */ virtual ~SimpleZGenerator(); //@} public: /** @name Virtual functions mandated by the ZGenerator base class. */ //@{ /** * Return the momentum fraction. Assume that an initial * (anti-)(di-)quark \a q1 produces a hadron and leaves behind * another (anti-)(di-)quark \a q2. The hadron is assumed to have a * squared transverse mass, \a mT2, w.r.t. the initial quark * direction. * @return the energy fraction distributed as \f$\sqrt{z}\f$ (or * \f$1-\sqrt{z}\f$) if \a q1 (or \a q2) is a diquark. Otherwise a * flat distribution is used. */ virtual double generate(cPDPtr q1, cPDPtr q2, Energy2 mT2 ) 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: /** * Describe a concrete class with persistent data. */ static ClassDescription initSimpleZGenerator; /** * Private and non-existent assignment operator. */ - SimpleZGenerator & operator=(const SimpleZGenerator &); + SimpleZGenerator & operator=(const SimpleZGenerator &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * SimpleZGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of SimpleZGenerator. */ typedef ZGenerator NthBase; }; /** * This template specialization informs ThePEG about the name of the * SimpleZGenerator class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::SimpleZGenerator"; } /** * Return the name of the shared library to be loaded to get access * to the SimpleZGenerator class and every other class it uses * (except the base class). */ static string library() { return "SimpleZGenerator.so"; } }; /** @endcond */ } #endif /* THEPEG_SimpleZGenerator_H */ diff --git a/Handlers/StandardEventHandler.h b/Handlers/StandardEventHandler.h --- a/Handlers/StandardEventHandler.h +++ b/Handlers/StandardEventHandler.h @@ -1,511 +1,511 @@ // -*- C++ -*- // // StandardEventHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_StandardEventHandler_H #define ThePEG_StandardEventHandler_H // This is the declaration of the StandardEventHandler class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Handlers/EventHandler.h" #include "ThePEG/Repository/Strategy.fh" #include "ThePEG/Handlers/SamplerBase.fh" #include "ThePEG/PDF/PartonBin.fh" #include "ThePEG/MatrixElement/MEBase.fh" #include "SubProcessHandler.fh" #include "StandardXComb.fh" #include "StandardEventHandler.fh" #include "ThePEG/Utilities/XSecStat.h" #include namespace ThePEG { /** * The StandardEventHandler class is the main class for generating simple * events without overlayed collisions. It is derived from the * basic EventHandler class. * * Besides the standard doinit() method, the StandardEventHandler needs to be * separately initialized with the initialize() method. In the * dofinish() method statistics is written out to the EventGenerators * default output file. * * @see \ref StandardEventHandlerInterfaces "The interfaces" * defined for StandardEventHandler. * @see EventHandler * @see EventGenerator * @see Event * */ class StandardEventHandler: public EventHandler { public: /** A vector of SubProcessHandlers. */ typedef vector SubHandlerList; /** A weighted list of pointers to StandardXComb objects. */ typedef Selector XSelector; /** A vector of pointers to StandardXComb objects. */ typedef vector XVector; /** A vector of cross sections. */ typedef vector XSVector; /** Map of pointers to StandardXComb objects indexed by pointers to * the corresponding MEBase object. */ typedef map MEXMap; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ StandardEventHandler(); /** * Destructor. */ virtual ~StandardEventHandler(); //@} public: /** * 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; /** * Return the sampler assigned to this event handler. */ tSamplerPtr sampler() { return theSampler; } /** * Return the sampler assigned to this event handler. */ tcSamplerPtr sampler() const { return theSampler; } /** * 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; /** * The estimated error int 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; /** * The estimated total integrated cross section of the processes * generated in this run, excluding reweighting. * @return 0 if no integrated cross section could be estimated. */ virtual CrossSection integratedXSecNoReweight() const; /** * The estimated error int total integrated cross section of the * processes generated in this run, excluding reweighting. * @return 0 if no integrated cross section error could be estimated. */ virtual CrossSection integratedXSecErrNoReweight() 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 & r); /** * Generate an event. */ virtual EventPtr generateEvent(); /** * Continue generating an event if the generation has been stopped * before finishing. */ virtual EventPtr continueEvent(); /** * Reweight a partially generated event. */ void reweight(double factor) const; /** * Return the vector of StandardXComb objects. */ const XVector & xCombs() const { return theXCombs; } /** * Change the XComb object */ virtual void select(tXCombPtr newXComb); /** * Return the boost needed to transform the current event from the * CMS system to the lab system. */ const LorentzRotation & currentEventBoost() const { return theCurrentEventBoost; } //@} /** @name Simple access functions */ //@{ /** * Return a reference to the Cuts of this * EventHandler. Note that these cuts may be overridden by the * SubProcess chosen. */ tCutsPtr cuts() const { return theCuts; } /** * 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. */ int maxDim(int bin) const { return theMaxDims[bin]; } /** * The number of phase space dimensions used by the luminosity * function. */ int lumiDim() const { return theLumiDim; } /** * The number of dimensions of the basic phase space to generate * sub-processes in for a given bin of StandardXComb objects. */ int nDim(int bin) const { return lumiDim() + maxDim(bin); } //@} protected: /** * Generate a phase space point and return the corresponding cross * section. Is called from sSigDR(const vector &). * @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 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 StandardXComb 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 pointer to a CascadeHandler to be used for CKKW reweighting. * @param me a pointer to the MEBase object. * @param pBins a pair of PartonBins describing the * partons extracted from the particles * @param allPBins all available parton bins at the given energy */ void addME(Energy maxEnergy, tSubHdlPtr sub, tPExtrPtr extractor, tCutsPtr cuts, tCascHdlPtr ckkw, tMEPtr me, const PBPair & pBins, const PartonPairVec& allPBins); /** * For the sub-procss and phase-space point selected in the previous * call to dSigDR, produce the first step of an actual Collision. */ tCollPtr performCollision(); /** * Initialize groups of StepHandlers. This overrides * the method in the EventHandler, and the * StepHandlers given in the currently selected * SubProcess take precedence over the ones specified in the * EventHandler sub class. */ virtual void initGroups(); /** * Return the boost needed to transform the current collision from * the CMS system to the lab system. By default this is the unit * transformation, but an EventHandler derived from this class may * override it. */ LorentzRotation & currentEventBoost() { return theCurrentEventBoost; } /** * Set information about the current sub-process. */ void setScale(Energy2); /** * Return the vector of StandardXComb objects. */ XVector & xCombs() { return theXCombs; } /** * Throw away the last generated event before generating a new one. */ virtual void clean(); 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; } public: /** @name Standard Interfaced functions. */ //@{ /** * Check sanity of the object during the setup phase. */ 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. */ 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. Writes out statistics on the generation. */ virtual void dofinish(); //@} /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} /** * Reject a (partially) generated event. * @param weight the weight given for the event. */ void reject(double weight); private: /** * The first of the incoming particle types. */ PDPtr theIncomingA; /** * The second of the incoming particle types. */ PDPtr theIncomingB; /** * The list of SubProcessHandlers. */ SubHandlerList theSubProcesses; /** * The kinematical cuts used for this collision handler. */ CutsPtr theCuts; /** * True if cuts on collision objects should be performed */ bool collisionCuts; /** * The StandardXComb objects. */ XVector theXCombs; /** * The number of degrees of freedom needed to generate the phase * space for the different bins. */ vector theMaxDims; /** * The boost needed to transform the current collision from the CMS * system to the lab system. */ LorentzRotation theCurrentEventBoost; /** * The phase space sampler responsible for generating phase space * points according to the cross section given by this event * handler. */ SamplerPtr theSampler; /** * The number of phase space dimensions used by the luminosity * function. */ int theLumiDim; /** * The overall cross section statistics */ mutable XSecStat xSecStats; /** * Standard Initialization object. */ static ClassDescription initStandardEventHandler; /** * Helper function for the interface. */ void setIncomingA(PDPtr); /** * Helper function for the interface. */ void setIncomingB(PDPtr); protected: /** @cond EXCEPTIONCLASSES */ /** * Exception class used by EventHandler when a StepHandler of the * wrong class was added. */ class StandardEventHandlerUpdateException: public UpdateException {}; /** * Exception class used by EventHandler when a StepHandler of the * wrong class was added. */ class StandardEventHandlerInitError: public Exception {}; /** @endcond */ private: /** * Private and non-existent assignment operator. */ - const StandardEventHandler & operator=(const StandardEventHandler &); + const StandardEventHandler & operator=(const StandardEventHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * The following template specialization informs ThePEG about the * base class of StandardEventHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of StandardEventHandler. */ typedef EventHandler NthBase; }; /** * The following template specialization informs ThePEG about the name * of theEventHandler class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** * Return the class name. */ static string className() { return "ThePEG::StandardEventHandler"; } }; /** @endcond */ } #endif /* ThePEG_StandardEventHandler_H */ diff --git a/Handlers/StandardXComb.h b/Handlers/StandardXComb.h --- a/Handlers/StandardXComb.h +++ b/Handlers/StandardXComb.h @@ -1,767 +1,767 @@ // -*- C++ -*- // // StandardXComb.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_StandardXComb_H #define ThePEG_StandardXComb_H // This is the declaration of the StandardXComb class. #include "ThePEG/Config/ThePEG.h" #include "SubProcessHandler.fh" #include "ThePEG/PDF/PartonExtractor.fh" #include "ThePEG/PDF/PartonBin.h" #include "ThePEG/PDF/PartonBinInstance.h" #include "ThePEG/Utilities/VSelector.h" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/Utilities/Maths.h" #include "ThePEG/Utilities/XSecStat.h" #include "ThePEG/EventRecord/Particle.h" #include "ThePEG/MatrixElement/MEBase.h" #include "ThePEG/Handlers/XComb.h" #include "ThePEG/Handlers/StandardEventHandler.h" #include "ThePEG/Handlers/SubProcessHandler.fh" #include "StandardXComb.fh" namespace ThePEG { /** * The StandardXComb class inherits from the more general XComb class * which stores all information about the generation of a hard * sub-proces for a given pair of incoming particles, a pair of * extracted partons, etc. This class stores more information related * to thestandard process generation scheme in ThePEG, such as the * PartonExtractor and MEBase object used. It also does some of the * administration of the process generation. * * The main function is dSigDR() which returns the differential cross * section w.r.t. a given vector of random numbers in the interval * ]0,1[. In the initialization this is used to pre-sample the phase * space. In the generation phase it is used to give the cross section * for a phase space point, and if this StandardXComb is chosen the * construct() function is called to generate the actual sub-process. * * @see ParonExtractor * @see MEBase * @see Cuts * @see StdXCombGroup */ class StandardXComb: public XComb { public: /** A vector of DiagramBase objects. */ typedef MEBase::DiagramVector DiagramVector; /** A vector of indices. */ typedef MEBase::DiagramIndex DiagramIndex; /** MEBase needs to be a friend. */ friend class MEBase; public: /** @name Standard constructors and destructors. */ //@{ /** * Standard constructor. */ StandardXComb(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. */ StandardXComb(tStdXCombPtr newHead, const PBPair & newPartonBins, tMEPtr newME, const DiagramVector & newDiagrams); /** * Default constructor. */ StandardXComb(); /** * Destructor. */ virtual ~StandardXComb(); /** * Constructor used by MEBase to create a temporary object to store info. */ StandardXComb(tMEPtr me, const tPVector & parts, DiagramIndex i); //@} /** @name Utilities for incoming partons. */ //@{ /** * Properly setup the PartonBinInstance objects provided a sub * process has been constructed using this XComb. */ void recreatePartonBinInstances(Energy2 scale); /** * Fill the variables needed to generate remnants; momenta will be * used from the partons set in this xcomb, but random numbers need * to be provided to (re)generate variables not fixed by the * incoming partons. */ void refillPartonBinInstances(const double* r); /** * Setup information on incoming partons depending * on the information previously supplied through the * choice of diagram and incoming momenta in the first * two entries of meMomenta(). Partons are not actually * extracted from the incoming particles, though a subprocess * detached from the current Event may be created. */ bool setIncomingPartons(tStdXCombPtr labHead = tStdXCombPtr()); /** * Fill phase space information as far as possible */ void fill(const PPair& newParticles, const PPair& newPartons, const vector& newMEMomenta, const DVector& newLastRandomNumbers = DVector()); //@} /** @name Access the assigned objects used in the generation. */ //@{ /** * Return a pointer to the corresponding sub-process handler. May be * null if the standard process generation in ThePEG was not used. */ tcSubHdlPtr subProcessHandler() const { return theSubProcessHandler; } /** * The matrix element to be used. */ tMEPtr matrixElement() const { return theME; } /** * Return a pointer to the head XComb this XComb * depends on. May return NULL, if this is not a * member of a XComb group. */ tStdXCombPtr head() const { return theHead; } /** * Set the head XComb pointer. */ void head(tStdXCombPtr headXC) { theHead = headXC; } /** * Return a selector object of xcombs to choose subprocesses * different than the one currently integrated. */ Selector& projectors() { return theProjectors; } /** * Return a selector object of xcombs to choose subprocesses * different than the one currently integrated. */ const Selector& projectors() const { return theProjectors; } /** * Return a pointer to a projector xcomb which will generate a subprocess * different from the one just integrated. */ tStdXCombPtr lastProjector() const { return theProjector; } /** * Set a pointer to a projector xcomb which will generate a subprocess * different from the one just integrated. */ void lastProjector(tStdXCombPtr pxc) { theProjector = pxc; } //@} /** @name Main functions used for the generation. */ //@{ /** * Try to determine if this subprocess is at all possible. */ virtual bool checkInit(); /** * The number of dimensions of the phase space used to generate this * process. */ virtual int nDim() const { return theNDim; } /** * Return the parton extraction dimensions */ const pair& partonDimensions() const { return partonDims; } /** * Return true, if the current configuration will pass the cuts */ bool willPassCuts(); /** * Return the cut weight encountered from fuzzy cuts */ double cutWeight() const { return theCutWeight; } /** * Reset all saved data about last generated phasespace point; */ virtual void clean(); /** * Return true, if kinematics have already been generated */ bool kinematicsGenerated() const { return theKinematicsGenerated; } /** * Indicate that kinematics have been generated */ void didGenerateKinematics() { theKinematicsGenerated = true; } /** * Generate a phase space point from a vector \a r of \a nr numbers * in the interval ]0,1[ and return the corresponding differential * cross section. */ virtual CrossSection dSigDR(const pair ll, int nr, const double * r); /** * If this XComb has a head XComb, return the cross section * differential in the variables previously supplied. The PDF weight * is taken from the lastPDFWeight supplied by the head XComb * object. */ CrossSection dSigDR(const double * r); /** * If variations are available for the subprocess handled, generate * and return a map of optional weights to be included for the * event; this version defaults to an implementation in MEBase but * can be overloaded by inheriting XComb objects. */ virtual map generateOptionalWeights(); /** * Return the PDF weight used in the last call to dSigDR */ double lastPDFWeight() const { return theLastPDFWeight; } /** * Return the cross section calculated in the last call to dSigDR */ CrossSection lastCrossSection() const { return theLastCrossSection; } /** * Check if a reshuffling is required when constructing the hard * subprocess. */ void checkReshufflingNeeds(); /** * Return true if a reshuffling is required when constructing the hard * subprocess. */ bool needsReshuffling() const { return theNeedsReshuffling; } /** * Perform the reshuffling from hardProcessMass to mass values, * given outgoing momenta */ void reshuffle(vector&) const; /** * Construct a sub-process object from the information available. */ virtual tSubProPtr construct(); //@} /** @name Functions used for collecting statistics. */ //@{ /** * The statistics object for this XComb. */ virtual const XSecStat & stats() const { return theStats; } /** * Select the current event. It will later be rejected with a * probability given by \a weight. */ virtual void select(double weight) { theStats.select(weight); } /** * Accept the current event assuming it was previously selcted. */ virtual void accept() { theStats.accept(); } /** * Reweight a selected and accepted event. */ void reweight(double oldWeight, double newWeight) { theStats.reweight(oldWeight,newWeight); } /** * Reject the current event assuming it was previously accepted. If * weighted events are produced, the \a weight should be the same as * the previous call to select(double). */ virtual void reject(double weight = 1.0) { theStats.reject(weight); } /** * Reset statistics. */ virtual void reset() { theStats.reset(); } //@} /** @name Access information used by the MEBase object. */ //@{ /** * The diagrams used by the matrix element. */ const DiagramVector & diagrams() const { return theDiagrams; } /** * True if the TreeDiagram's for this matrix element should in fact * be mirrored before used to create an actual sub-rocess. */ bool mirror() const { return isMirror; } /** * Return the momenta of the partons to be used by the matrix * element object, in the order specified by the TreeDiagram objects * given by the matrix element. */ const vector & meMomenta() const { return theMEMomenta; } /** * Return the last selected diagram. */ tcDiagPtr lastDiagram() const { if ( !theExternalDiagram ) return diagrams()[lastDiagramIndex()]; return theExternalDiagram; } /** * Return the parton types to be used by the matrix element object, * in the order specified by the TreeDiagram objects given by the * matrix element. */ const cPDVector & mePartonData() const { return theMEPartonData; } /** * Return the index of the last selected diagram. */ DiagramIndex lastDiagramIndex() const { return theLastDiagramIndex; } /** * Get information saved by the matrix element in the calculation of * the cross section to be used later when selecting diagrams and * colour flow. */ const DVector & meInfo() const { return theMEInfo; } /** * Set information saved by the matrix element in the calculation of * the cross section to be used later when selecting diagrams and * colour flow. */ void meInfo(const DVector & info) { theMEInfo = info; } /** * Return the random numbers used to generate the * last phase space point, if the matrix element * requested so. */ const DVector& lastRandomNumbers() const { return theLastRandomNumbers; } /** * Get the last jacobian obtained when generating the kinematics * for the call to dSigHatDR. */ double jacobian() const { return theLastJacobian; } /** * Return the matrix element squared as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ double lastME2() const { return theLastME2; } /** * Return the last preweight factor */ double lastPreweight() const { return theLastPreweight; } /** * Return the partonic cross section as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ CrossSection lastMECrossSection() const { return theLastMECrossSection; } /** * Return the PDF weight as calculated * for the last phase space point, if the matrix * element does supply PDF weights. This may optionally * be used by a matrix element for caching. */ double lastMEPDFWeight() const { return theLastMEPDFWeight; } /** * Return the coupling factor as calculated for the lats phase space * point. */ double lastMECouplings() const { return theLastMECouplings; } //@} /** * Construct the corresponding SubProcess object if it hasn't been * done before. */ virtual void newSubProcess(bool group = false); /** * Return the momenta of the partons to be used by the matrix * element object, in the order specified by the TreeDiagram objects * given by the matrix element. */ vector & meMomenta() { return theMEMomenta; } /** * Access the random numbers used to generate the * last phase space point, if the matrix element * requested so. */ DVector& lastRandomNumbers() { return theLastRandomNumbers; } /** * Return the parton types to be used by the matrix element object, * in the order specified by the TreeDiagram objects given by the * matrix element. */ cPDVector & mePartonData() { return theMEPartonData; } /** * Set a diagram to be used instead of the one selected by the matrix * element. */ void externalDiagram(tcDiagPtr diag) { theExternalDiagram = diag; } /** * Set the last selected diagram. */ void lastDiagramIndex(DiagramIndex i) { theLastDiagramIndex = i; } /** * Set the PDF weight used in the last call to dSigDR */ void lastPDFWeight(double w) { theLastPDFWeight = w; } /** * Set the cross section calculated in the last call to dSigDR */ void lastCrossSection(CrossSection s) { theLastCrossSection = s; } /** * Set the last jacobian obtained when generating the kinematics for * the call to dSigHatDR. */ void jacobian(double j) { theLastJacobian = j; } /** * Set the matrix element squared as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ void lastME2(double v) { theLastME2 = v; } /** * Set the last preweight factor */ void lastPreweight(double w) { theLastPreweight = w; } /** * Set the partonic cross section as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ void lastMECrossSection(CrossSection v) { theLastMECrossSection = v; } /** * Set the PDF weight as calculated * for the last phase space point, if the matrix * element does supply PDF weights. This may optionally * be used by a matrix element for caching. */ void lastMEPDFWeight(double v) { theLastMEPDFWeight = v; } /** * Set the coupling factor */ void lastMECouplings(double v) { theLastMECouplings = v; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); private: /** * The corresponding sub-process handler */ tSubHdlPtr theSubProcessHandler; /** * The matrix element to be used. */ tMEPtr theME; /** * Statistics gathering for this XComb. */ XSecStat theStats; /** * The diagrams used by the matrix element. */ DiagramVector theDiagrams; /** * True if the TreeDiagram's for this matrix element should in fact * be mirrored before used to create an actual sub-rocess. */ bool isMirror; /** * The number of dimensions of the phase space used to generate this * process. */ int theNDim; protected: /** * The number of dimensions of the phase space used for each of the * incoming partons. */ pair partonDims; private: /** * True, if kinematics have already been generated */ bool theKinematicsGenerated; /** * The momenta of the partons to be used by the matrix element * object, in the order specified by the TreeDiagram objects given * by the matrix element. */ vector theMEMomenta; /** * The parton types to be used by the matrix element object, in the * order specified by the TreeDiagram objects given by the matrix * element. */ cPDVector theMEPartonData; /** * A diagram to be used instead of the one selected by the matrix element. */ tcDiagPtr theExternalDiagram; /** * The last selected tree diagram. */ DiagramIndex theLastDiagramIndex; /** * Information saved by the matrix element in the calculation of the * cross section to be used later when selecting diagrams and colour * flow. */ DVector theMEInfo; /** * The random numbers used to generate the * last phase space point, if the matrix element * requested so. */ DVector theLastRandomNumbers; /** * The PDF weight used in the last call to dSigDR */ double theLastPDFWeight; /** * The cross section calculated in the last call to dSigDR */ CrossSection theLastCrossSection; /** * Save the last jacobian obtained when generating the kinematics for * the call to dSigHatDR. */ double theLastJacobian; /** * The matrix element squared as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ double theLastME2; /** * The last preweight factor */ double theLastPreweight; /** * The partonic cross section as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ CrossSection theLastMECrossSection; /** * The PDF weight as calculated * for the last phase space point, if the matrix * element does supply PDF weights. This may optionally * be used by a matrix element for caching. */ double theLastMEPDFWeight; /** * The coupling factor */ double theLastMECouplings; /** * A pointer to the head XComb this XComb * depends on. May return NULL, if this is not a * member of a XComb group. */ tStdXCombPtr theHead; /** * A selector object of xcombs to choose subprocesses * different than the one currently integrated. */ Selector theProjectors; /** * A pointer to a projector xcomb which will generate a subprocess * different from the one just integrated. */ tStdXCombPtr theProjector; /** * True, if cuts have already been checked */ bool checkedCuts; /** * The result of the last call to willPassCuts */ bool passedCuts; /** * The cut weight encountered from fuzzy cuts */ double theCutWeight; /** * True if a reshuffling is required when constructing the hard * subprocess. */ bool theNeedsReshuffling; /** * Calculate the reshuffling equation given the coefficients */ double reshuffleEquation(double, const vector >&, Energy2) const; /** * Solve the reshuffling equation given the coefficients */ double solveReshuffleEquation(const vector >&, Energy2) const; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initStandardXComb; /** * Private and non-existent assignment operator. */ - StandardXComb & operator=(const StandardXComb &); + StandardXComb & operator=(const StandardXComb &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * StandardXComb. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of StandardXComb. */ typedef XComb NthBase; }; /** * This template specialization informs ThePEG about the name of the * StandardXComb class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::StandardXComb"; } }; /** @endcond */ } #endif /* ThePEG_StandardXComb_H */ diff --git a/Handlers/StdXCombGroup.h b/Handlers/StdXCombGroup.h --- a/Handlers/StdXCombGroup.h +++ b/Handlers/StdXCombGroup.h @@ -1,193 +1,193 @@ // -*- C++ -*- // // StdXCombGroup.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_StdXCombGroup_H #define ThePEG_StdXCombGroup_H // This is the declaration of the StdXCombGroup class. #include "StandardXComb.h" #include "StdXCombGroup.fh" #include "ThePEG/MatrixElement/MEGroup.fh" namespace ThePEG { /** * The StdXCombGroup class represents a 'head' XComb object * in association with a group of dependent XComb objects. * * @see MEGroup */ class StdXCombGroup: public StandardXComb { /** MEBase needs to be a friend. */ friend class MEBase; public: /** @name Standard constructors and destructors. */ //@{ /** * Standard constructor. */ StdXCombGroup(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. */ StdXCombGroup(); /** * Destructor. */ virtual ~StdXCombGroup(); public: /** * Reset all saved data about last generated phasespace point; */ virtual void clean(); /** * The number of dimensions of the phase space used to generate this * process. */ virtual int nDim() const; /** * Generate a phase space point from a vector \a r of \a nr numbers * in the interval ]0,1[ and return the corresponding differential * cross section. */ virtual CrossSection dSigDR(const pair ll, int nr, const double * r); /** * Return the cross section calculated from the head matrix element */ CrossSection lastHeadCrossSection() const { return theLastHeadCrossSection; } /** * Visit the dependent XComb objects */ const vector& dependent() const { return theDependent; } /** * Return the matrix element group steered by this * XComb group. */ tcMEGroupPtr meGroup() const { return theMEGroup; } /** * Initialize this XComb group */ void build(const PartonPairVec& allPBins); /** * Construct a sub-process object from the information available. */ virtual tSubProPtr construct(); /** * Construct the corresponding SubProcess object if it hasn't been * done before. */ virtual void newSubProcess(bool); /** * Set the cross section calculated from the head matrix element */ void lastHeadCrossSection(CrossSection xs) { theLastHeadCrossSection = xs; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); private: /** * The MEGroup object */ MEGroupPtr theMEGroup; /** * The dependent XComb objects */ vector theDependent; /** * The cross section calculated from the head matrix element */ CrossSection theLastHeadCrossSection; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initStdXCombGroup; /** * Private and non-existent assignment operator. */ - StdXCombGroup & operator=(const StdXCombGroup &); + StdXCombGroup & operator=(const StdXCombGroup &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * StdXCombGroup. */ template <> struct BaseClassTrait { /** Typedef of the base class of StdXCombGroup. */ typedef StandardXComb NthBase; }; /** * This template specialization informs ThePEG about the name of the * StdXCombGroup class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::StdXCombGroup"; } }; /** @endcond */ } #endif /* ThePEG_StdXCombGroup_H */ diff --git a/Handlers/StepHandler.h b/Handlers/StepHandler.h --- a/Handlers/StepHandler.h +++ b/Handlers/StepHandler.h @@ -1,181 +1,181 @@ // -*- C++ -*- // // StepHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_StepHandler_H #define ThePEG_StepHandler_H // This is the declaration of the StepHandler class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Utilities/Exception.fh" #include "ThePEG/Handlers/HandlerBase.h" #include namespace ThePEG { /** * StepHandler is the base class for implementing any model for a step * in the event generation chain. It has one main virtual method, * handle(), which should be overridden by sub classes. The handle * method is given a reference to a EventHandler, a vector * of particles and a Hint as arguments. The handler is only allowed * to treat particles which are in the vector. The Hint may be cast * dynamically to a sub class and do whatever it wishes with the * information found there. The EventHandler can be used to * add other StepHandlers and Hints to modify the * subsequent generation. If the StepHandler actually performs some * action, the resulting particles should be added to a new Step which * should be aquired with the newStep() function. * * @see \ref StepHandlerInterfaces "The interfaces" * defined for StepHandler. * @see EventHandler * @see Hint * @see Step * */ class StepHandler: public HandlerBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The destructor. */ virtual ~StepHandler(); //@} public: /** @name Virtual functions to be implemented by concrete sub-classes. */ //@{ /** * The main function called by the EventHandler class to * perform a step. * @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) = 0; //@} /** @name Access to the calling EventHandler and current Step. */ //@{ /** * Get a pointer to the EventHandler which made the last call to * handle(). */ tEHPtr eventHandler() const { return theEventHandler; } /** * Set a pointer to the EventHandler which made the last call to * handle(). */ void eventHandler(tEHPtr); /** * Return a pointer to a new step. If one has alredy been created in * the last call to handle(), that step will be returned. */ tStepPtr newStep() { if ( !theNewStep ) createNewStep(); return theNewStep; } /** * If a new step has been created, return it, otherwise return the * current step from the eventHandler(). */ tStepPtr currentStep() { if ( theNewStep ) return theNewStep; return theCurrentStep; } //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** * Use the collision handler to create a new step. */ void createNewStep(); private: /** * A pointer to the (partial) collision handler which made the current * call to handle(). */ tEHPtr theEventHandler; /** * A pointer to a new step if created in the last call to handle(). */ tStepPtr theNewStep; /** * A pointer to the current step. Is equal to theNewStep if one was * created in the current call to handle(). */ tStepPtr theCurrentStep; private: /** * Describe an abstract class without persistent data. */ static AbstractNoPIOClassDescription initStepHandler; /** * Private and non-existent assignment operator. */ - StepHandler & operator=(const StepHandler &); + StepHandler & operator=(const StepHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * StepHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of StepHandler. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * StepHandler class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::StepHandler"; } }; /** @endcond */ } #endif /* ThePEG_StepHandler_H */ diff --git a/Handlers/SubProcessHandler.h b/Handlers/SubProcessHandler.h --- a/Handlers/SubProcessHandler.h +++ b/Handlers/SubProcessHandler.h @@ -1,287 +1,287 @@ // -*- C++ -*- // // SubProcessHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SubProcessHandler_H #define ThePEG_SubProcessHandler_H // This is the declaration of the SubProcessHandler class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Utilities/Interval.h" #include "ThePEG/Handlers/HandlerGroup.h" #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/MatrixElement/MEBase.fh" #include "ThePEG/Cuts/Cuts.fh" #include "SubProcessHandler.fh" namespace ThePEG { /** * The SubProcessHandler class is used to handle a set of MEBase * objects together with a PartonExtractor. It is used by the * StandardEventHandler to group together different ways of extracting * partons from incoming particles with associated hard parton-parton * matrix elements. * * Just as the EventHandler class, a SubProcessHandler keeps a full * set of HandlerGroups, which may be filled with * defaults which overrides the ones specified in the EventHandler in * each event the SubProcessHandler is chosen. * * The SubProcessHandler has also a Cuts object which is * responsible for restricting the kinematics of the sub-process and * produced collision. This object takes precedence over the one in * the EventHandler in each event the SubProcessHandler is chosen. * * @see \ref SubProcessHandlerInterfaces "The interfaces" * defined for SubProcessHandler. * @see MEBase * @see PartonExtractor * @see EventHandler * @see StandardEventHandler * @see HandlerGroup * @see Cuts */ class SubProcessHandler: public HandlerBase { public: /** A vector of HandlerGroup pointers. */ typedef vector GroupVector; /** A vector of ReweightBase pointers. */ typedef vector ReweightVector; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ SubProcessHandler(); /** * Copy-constructor. */ SubProcessHandler(const SubProcessHandler &); /** * Default destructor. */ virtual ~SubProcessHandler(); //@} public: /** @name Access objects assigned to the SubProcessHandler. */ //@{ /** * Return a pointer to the parton extractor used. */ tPExtrPtr pExtractor() const { return thePartonExtractor; } /** * Return a reference to the vector of parton matrix elements used. */ const MEVector & MEs() const { return theMEs; } /** * Return a pointer to the kinematical cuts used. */ tCutsPtr cuts() const { return theCuts; } /** * Return a pointer (possibly null) to the assigned main * CascadeHandler to be used as CKKW-reweighter. */ tCascHdlPtr CKKWHandler() const; /** * Access a step handler group. */ const HandlerGroupBase & handlerGroup(Group::Handler) const; /** * Access the step handler groups. */ const GroupVector & groups() const { return theGroups; } /** * Return a reference to the vector of parton matrix elements used. */ MEVector & MEs() { return theMEs; } //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 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: /** * Setup the step handler groups. */ void setupGroups(); private: /** * The pointer to the parton extractor used. */ PExtrPtr thePartonExtractor; /** * The vector of partonic matrix elements to be used. */ MEVector theMEs; /** * The pointer to the kinematical cuts used. */ CutsPtr theCuts; /** * The SubProcessHandler group. */ HandlerGroup theSubprocessGroup; /** * The CascadeHandler group. */ HandlerGroup theCascadeGroup; /** * The MultipleInteractionHandler group. */ HandlerGroup theMultiGroup; /** * The HadronizationHandler group. */ HandlerGroup theHadronizationGroup; /** * The DecayHandler group. */ HandlerGroup theDecayGroup; /** * The step handler groups. */ GroupVector theGroups; /** * The pre- and re-weight objects modifying all matrix element in * this sub-process hander. */ ReweightVector reweights; /** * The pre- and re-weight objects modifying all matrix element in * this sub-process hander. */ ReweightVector preweights; private: ThePEG_DECLARE_PREPOST_GROUP(SubProcessHandler,Post); ThePEG_DECLARE_GROUPINTERFACE(CascadeHandler,CascHdlPtr); ThePEG_DECLARE_GROUPINTERFACE(MultipleInteractionHandler,MIHdlPtr); ThePEG_DECLARE_GROUPINTERFACE(HadronizationHandler,HadrHdlPtr); ThePEG_DECLARE_GROUPINTERFACE(DecayHandler,DecayHdlPtr); /** * Describe a concreta class with persistent data. */ static ClassDescription initSubProcessHandler; private: /** * Private and non-existent assignment operator. */ - const SubProcessHandler & operator=(const SubProcessHandler &); + const SubProcessHandler & operator=(const SubProcessHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of SubProcessHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of SubProcessHandler. */ typedef HandlerBase NthBase; }; /** This template specialization informs ThePEG about the name of * the SubProcessHandler class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SubProcessHandler"; } }; /** @endcond */ } #endif /* ThePEG_SubProcessHandler_H */ diff --git a/Handlers/XComb.h b/Handlers/XComb.h --- a/Handlers/XComb.h +++ b/Handlers/XComb.h @@ -1,640 +1,640 @@ // -*- C++ -*- // // XComb.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_XComb_H #define ThePEG_XComb_H // This is the declaration of the XComb class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/PDF/PartonExtractor.fh" #include "ThePEG/PDF/PartonBin.h" #include "ThePEG/PDF/PartonBinInstance.h" #include "ThePEG/Utilities/AnyReference.h" #include "ThePEG/Utilities/VSelector.h" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/Utilities/Maths.h" #include "ThePEG/EventRecord/Particle.h" #include "ThePEG/Handlers/EventHandler.fh" #include "ThePEG/Cuts/Cuts.fh" namespace ThePEG { /** * The XComb class stores all information about the generation of a * hard sub-proces for a given pair of incoming particles, a pair of * extracted partons, total parton-parton energy squared and a * PartonExtractor object. * * When an event is generated, the objects used in the generation can * be assigned an XComb object for easy acces to the corresponding * information. To facilitate this, the corresponding classes inherits * from the LastXCombInfo class which provides the relefant access * functions. * * @see PartonExtractor * @see Cuts * @see LastXCombInfo */ class XComb: public Base { public: /** @name Standard constructors and destructors. */ //@{ /** * Standard constructor. */ XComb(Energy newMaxEnergy, const cPDPair & inc, tEHPtr newEventHandler, tPExtrPtr newExtractor, tCascHdlPtr newCKKW, const PBPair & newPartonBins, tCutsPtr newCuts); /** * Default constructor. */ XComb(); /** * Destructor. */ virtual ~XComb(); //@} /** @name Access the assigned objects used in the generation. */ //@{ /** * Return a reference to the corresponding collision handler */ const EventHandler & eventHandler() const { return *theEventHandler; } /** * Return a pointer to the corresponding collision handler */ tEHPtr eventHandlerPtr() const { return theEventHandler; } /** * A pointer to the parton extractor. */ tPExtrPtr pExtractor() const { return thePartonExtractor; } /** * A pointer to the kinematical cuts. */ tCutsPtr cuts() const { return theCuts; } /** * Return a possibly null pointer to a CascadeHandler to be used for * CKKW-reweighting. */ tCascHdlPtr CKKWHandler() const { return theCKKW; } //@} /** @name Access information about incoming particles and partons. */ //@{ /** * The incoming particle types. */ const cPDPair & particles() const { return theParticles; } /** * The incoming parton types. */ const cPDPair & partons() const { return thePartons; } /** * Additional information about the incoming partons. */ const PBPair & partonBins() const { return thePartonBins; } /** * The maximum cm energy for this process. */ Energy maxEnergy() const { return theMaxEnergy; } /** * Returns true if this XComb does not correspond to a proper * subprocess generation. I.e. if we are only generating a partial * event and the incoming particles and partons are not used * explicitly. */ bool empty() const { return !theEventHandler; } //@} /** @name Manipulate and acces information about the last selected phase space point. */ //@{ /** * Reset all saved data about last generated phasespace point; */ virtual void clean(); /** * Set information about currently generated partons. */ void setPartonBinInstances(PBIPair pbis, Energy2 scale); /** * Prepare this XComb for producing a sub-process. */ void prepare(const PPair &); /** * Return the pair of incoming particle instances. */ const PPair & lastParticles() const { return theLastParticles; } /** * Return the pair of incoming parton instances. */ const PPair & lastPartons() const { return theLastPartons; } /** * Set the pair of incoming parton instances. */ void lastPartons(PPair pp) { theLastPartons = pp; } /** * Return the SubProcess object corresponding to the last generated * sub-process. */ tSubProPtr subProcess() const { return theSub; } /** * Set the SubProcess object corresponding to the last generated * sub-process. */ void subProcess(tSubProPtr); /** A map of PartonBinInstance objects indexed by the extracted parton. */ typedef map PartonBinInstanceMap; /** * Access the parton bin instance map (used by the parton extractor) */ PartonBinInstanceMap& partonBinInstanceMap() { return thePartonBinInstanceMap; } /** * Return the parton bin instance map (used by the parton extractor) */ const PartonBinInstanceMap& partonBinInstanceMap() const { return thePartonBinInstanceMap; } /** * Additional information about the incoming partons. */ const PBIPair & partonBinInstances() const { return thePartonBinInstances; } /** * Additional information about the incoming partons. */ PBIPair & partonBinInstances() { return thePartonBinInstances; } /** * Return the corresponding parton bin instance for a given * extracted parton. */ tPBIPtr partonBinInstance(tcPPtr) const; /** * The last generated total energy squared of the incoming particles. */ Energy2 lastS() const { return theLastS; } /** * Set the last generated total energy squared of the incoming * particles. */ void lastS(Energy2 s) { theLastS = s; } /** * The last generated total energy squared of the incoming prtons. */ Energy2 lastSHat() const { return theLastSHat; } /** * Set the last generated total energy squared of the incoming * prtons. */ void lastSHat(Energy2 sh) { theLastSHat = sh; } /** * lastSHat()/lastS(). */ double lastTau() const { return lastSHat()/lastS(); } /** * The last generated rapidity of the hard scattering sub-system. */ double lastY() const { return theLastY; } /** * Set the last generated rapidity of the hard scattering sub-system. */ void lastY(double y) { theLastY = y; } /** * Log of one over the momentum fraction of the first incoming * particle w.r.t. the maximum allowed energy. */ double lastP1() const { return theLastP1P2.first; } /** * Log of one over the momentum fraction of the second incoming * particle w.r.t. the maximum allowed energy. */ double lastP2() const { return theLastP1P2.second; } /** * Set log of one over the momentum fraction of the incoming * particles w.r.t. the maximum allowed energy. */ void lastP1P2(pair pp) { theLastP1P2 = pp; } /** * Log of one over the first incoming parton momentum fraction * w.r.t. the first incoming particle. */ double lastL1() const { return theLastL1L2.first; } /** * Log of one over the second incoming parton momentum fraction * w.r.t. the second incoming particle. */ double lastL2() const { return theLastL1L2.second; } /** * Set log of one over the incoming parton momentum fractions * w.r.t. the incoming particles. */ void lastL1L2(pair); /** * The first incoming parton momentum fraction w.r.t. the * first incoming particle. */ double lastX1() const { return theLastX1X2.first; } /** * The second incoming parton momentum fraction * w.r.t. the second incoming particle. */ double lastX2() const { return theLastX1X2.second; } /** * Set the incoming parton momentum fractions w.r.t. the incoming * particles. */ void lastX1X2(pair); /** * Return 1-lastX1() to highest possible precision for * x\f$\rightarrow\f$ 1. */ double lastE1() const { return theLastE1E2.first; } /** * Return 1-lastX2() to highest possible precision for * x\f$\rightarrow\f$ 1. */ double lastE2() const { return theLastE1E2.second; } /** * Set one minus the incoming parton momentum fractions w.r.t. the * incoming particles. */ void lastE1E2(pair); /** * Get the last chosen scale of the hard scattering. */ Energy2 lastScale() const { return theLastScale; } /** * Set the last chosen scale of the hard scattering. */ void lastScale(Energy2 Q2) { theLastScale = Q2; } /** * Get the last chosen central scale of the hard scattering. */ Energy2 lastCentralScale() const { return theLastCentralScale != ZERO ? theLastCentralScale : lastScale(); } /** * Set the last chosen central scale of the hard scattering. */ void lastCentralScale(Energy2 Q2) { theLastCentralScale = Q2; } /** * Get the last chosen shower scale. */ Energy2 lastShowerScale() const { return theLastShowerScale != ZERO ? theLastShowerScale : lastCentralScale(); } /** * Set the last chosen showr scale. */ void lastShowerScale(Energy2 Q2) { theLastShowerScale = Q2; } /** * Get the \f$\alpha_S\f$ used in the hard scattering. Is negative * if no value has been set. */ double lastAlphaS() const { return theLastAlphaS; } /** * Set the \f$\alpha_S\f$ used in the hard scattering. */ void lastAlphaS(double a) { theLastAlphaS = a; } /** * Get the \f$\alpha_{EM}\f$ used in the hard scattering. Is negative * if no value has been set. */ double lastAlphaEM() const { return theLastAlphaEM; } /** * Set the \f$\alpha_{EM}\f$ used in the hard scattering. */ void lastAlphaEM(double a) { theLastAlphaEM = a; } //@} public: /** * Check for meta information */ bool hasMeta(int id) const { return theMeta.find(id) != theMeta.end(); } /** * Set meta information. */ template void meta(int id, T& ref) { theMeta[id] = AnyReference(ref); } /** * Erase meta information. */ void eraseMeta(int id) { theMeta.erase(id); } /** * Retrieve meta information. */ template T& meta(int id) const { return theMeta.find(id)->second.cast(); } /** * Set the local parton bin info objects for this XComb. */ void setPartonBinInfo(); /** * Create PartonBinInstance objects for this XComb. */ void createPartonBinInstances(); /** * Set the pair of incoming particle instances. */ void lastParticles(const PPair & p) { theLastParticles = p; } /** * Set information about currently generated partons. */ void resetPartonBinInstances(const PBIPair & newBins) { thePartonBinInstances = newBins; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); private: /** * The corresponding collision handler */ tEHPtr theEventHandler; /** * A pointer to the parton extractor. */ tPExtrPtr thePartonExtractor; /** * A pointer to a CascadeHandler to be used for CKKW-reweighting. */ tCascHdlPtr theCKKW; /** * A pointer to the kinematical cuts used. */ tCutsPtr theCuts; /** * The incoming particle types. */ cPDPair theParticles; /** * The incoming parton types. */ cPDPair thePartons; /** * The parton bin instance map (used by the parton extractor) */ PartonBinInstanceMap thePartonBinInstanceMap; /** * Additional information about the incoming partons. */ PBPair thePartonBins; /** * Additional information about the origins of the incoming partons. */ PBPair theParticleBins; /** * Additional information about the incoming partons. */ PBIPair thePartonBinInstances; /** * The pair of incoming particle instances. */ PPair theLastParticles; /** * The pair of incoming parton instances. */ PPair theLastPartons; /** * The last generated total energy squared of the incoming particles. */ Energy2 theLastS; /** * The last generated total energy squared of the incoming prtons. */ Energy2 theLastSHat; /** * The last rapidity of the sub process, log(x1/x2)/2. */ double theLastY; /** * Log of one over the momentum fraction of the incoming particles. */ DPair theLastP1P2; /** * Log of one over the incoming partons momentum fraction wrt. the * incoming particles. */ DPair theLastL1L2; /** * The incoming partons momentum fraction wrt. the incoming * particles. */ DPair theLastX1X2; /** * 1-lastX1() and 1-lastX2() to highest possible precision for * x\f$\rightarrow\f$ 1. */ DPair theLastE1E2; /** * The last chosen scale of the hard scattering. */ Energy2 theLastScale; /** * The last chosen central scale of the hard scattering. */ Energy2 theLastCentralScale; /** * The last chosen shower scale. */ Energy2 theLastShowerScale; /** * The \f$\alpha_S\f$ used in the hard scattering. */ double theLastAlphaS; /** * The \f$\alpha_{EM}\f$ used in the hard scattering. */ double theLastAlphaEM; /** * The maximum cm energy for this process. */ Energy theMaxEnergy; /** * Information saved by the matrix element in the calculation of the * cross section to be used later when selecting diagrams and colour * flow. */ DVector theMEInfo; /** * The SubProcess object corresponding to the last generated * sub-process. */ SubProPtr theSub; /** * The meta information */ map theMeta; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initXComb; /** * Private and non-existent assignment operator. */ - XComb & operator=(const XComb &); + XComb & operator=(const XComb &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * XComb. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of XComb. */ typedef Base NthBase; }; /** * This template specialization informs ThePEG about the name of the * XComb class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::XComb"; } }; /** @endcond */ } #endif /* ThePEG_XComb_H */ diff --git a/Helicity/FermionSpinInfo.h b/Helicity/FermionSpinInfo.h --- a/Helicity/FermionSpinInfo.h +++ b/Helicity/FermionSpinInfo.h @@ -1,192 +1,192 @@ // -*- C++ -*- // // FermionSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_FermionSpinInfo_H #define ThePEG_FermionSpinInfo_H // This is the declaration of the FermionSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/Helicity/LorentzSpinor.h" #include "FermionSpinInfo.fh" #include namespace ThePEG { namespace Helicity { /** * The FermionSpinInfo class inherits from the SpinInfo class and * implements the storage of the basis vectors for a spin-1/2 * particle. The basis states are the u-spinors for a particle and * the v-spinors for an antiparticle. The barred spinors can be * obtained from these. * * These basis states should be set by either matrixelements or * decayers which are capable of generating spin correlation * information. * * The basis states in the rest frame of the particles can then be * accessed by decayers to produce the correct correlations. * * N.B. in our convention 0 is the \f$-\frac12\f$ helicity state and * 1 is the \f$+\frac12\f$ helicity state. * * @author Peter Richardson */ class FermionSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ FermionSpinInfo() : SpinInfo(PDT::Spin1Half), _decaycalc(false) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ FermionSpinInfo(const Lorentz5Momentum & p, bool time) : SpinInfo(PDT::Spin1Half, p, time), _decaycalc(false) {} //@} public: /** @name Set and get methods for the basis state. */ //@{ /** * Set the basis state, this is production state. * @param hel the helicity (0 or 1 as described above.) * @param in the LorentzSpinor for the given helicity. */ void setBasisState(unsigned int hel, const LorentzSpinor & in) const { assert(hel<2); _productionstates[hel] = in; _currentstates [hel] = in; } /** * Set the basis state for the decay. * @param hel the helicity (0 or 1 as described above.) * @param in the LorentzSpinor for the given helicity. */ void setDecayState(unsigned int hel, const LorentzSpinor & in) const { assert(hel<2); _decaycalc = true; _decaystates[hel] = in; } /** * Get the basis state for the production for the given helicity, \a * hel (which is 0 or 1 as described above.) */ const LorentzSpinor & getProductionBasisState(unsigned int hel) const { assert(hel<2); return _productionstates[hel]; } /** * Get the current basis state for the given helicity, \a * hel (which is 0 or 1 as described above.) */ const LorentzSpinor & getCurrentBasisState(unsigned int hel) const { assert(hel<2); return _currentstates[hel]; } /** * Get the basis state for the decay for the given helicity, \a hel * (which is 0 or 1 as described above.) */ const LorentzSpinor & getDecayBasisState(unsigned int hel) const { assert(hel<2); if(!_decaycalc) { for(unsigned int ix=0;ix<2;++ix) _decaystates[ix]=_currentstates[ix]; _decaycalc=true; } return _decaystates[hel]; } //@} /** * Perform a lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation &); /** * Undecay */ virtual void undecay() const { _decaycalc=false; SpinInfo::undecay(); } /** * Reset */ virtual void reset() { undecay(); _currentstates = _productionstates; SpinInfo::reset(); } public: /** * Standard Init function. */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * Private and non-existent assignment operator. */ - FermionSpinInfo & operator=(const FermionSpinInfo &); + FermionSpinInfo & operator=(const FermionSpinInfo &) = delete; private: /** * basis states in the frame in which the particle was produced */ mutable std::array,2> _productionstates; /** * basis states in the current frame of the particle */ mutable std::array,2> _currentstates; /** * basis states in the frame in which the particle decays */ mutable std::array,2> _decaystates; /** * True if the decay state has been set. */ mutable bool _decaycalc; }; } } namespace ThePEG { } #endif /* ThePEG_FermionSpinInfo_H */ diff --git a/Helicity/RSFermionSpinInfo.h b/Helicity/RSFermionSpinInfo.h --- a/Helicity/RSFermionSpinInfo.h +++ b/Helicity/RSFermionSpinInfo.h @@ -1,196 +1,196 @@ // -*- C++ -*- // // RSFermionSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_RSFermionSpinInfo_H #define THEPEG_RSFermionSpinInfo_H // This is the declaration of the RSFermionSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/Helicity/LorentzRSSpinor.h" #include "RSFermionSpinInfo.fh" #include namespace ThePEG { namespace Helicity { /** * The RSFermionSpinInfo class inherits from the SpinInfo class and * implements the storage of the basis vector for a spin-3/2 particle. * The basis states are the vector u spinors for a particle and the vector * v-spinors for an antiparticle. The barred spinors can be obtained from these. * * These basis states should be set by either the matrixelements or decayers * which are capable of generating spin correlation information. * * The basis states in the rest frame of the particles can then be accessed by * the decayers to produce the correct correlations. * * N.B. in our convention 0 is the \f$-\frac32\f$ helicity state, * 1 is the \f$-\frac12\f$ helicity state, * 2 is the \f$+\frac12\f$ helicity state, * 3 is the \f$+\frac32\f$ helicity state. * * @see SpinInfo * * \author Peter Richardson * */ class RSFermionSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ RSFermionSpinInfo() : SpinInfo(PDT::Spin3Half), _decaycalc(false) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ RSFermionSpinInfo(const Lorentz5Momentum & p,bool time) : SpinInfo(PDT::Spin3Half, p, time), _decaycalc(false) {} //@} public: /** @name Set and get methods for the basis state. */ //@{ /** * Set the basis state, this is production state. * @param hel the helicity (0,1,2,3 as described above.) * @param in the LorentzRSSpinor for the given helicity. */ void setBasisState(unsigned int hel, const LorentzRSSpinor & in) const { assert(hel<4); _productionstates[hel] = in; _currentstates [hel] = in; } /** * Set the basis state for the decay. * @param hel the helicity (0,1,2,3 as described above.) * @param in the LorentzRSSpinor for the given helicity. */ void setDecayState(unsigned int hel, const LorentzRSSpinor & in) const { assert(hel<4); _decaycalc = true; _decaystates[hel] = in; } /** * Get the basis state for the production for the given helicity, \a * hel (0,1,2,3 as described above.) */ const LorentzRSSpinor & getProductionBasisState(unsigned int hel) const { assert(hel<4); return _productionstates[hel]; } /** * Get the basis state for the current for the given helicity, \a * hel (0,1,2,3 as described above.) */ const LorentzRSSpinor & getCurrentBasisState(unsigned int hel) const { assert(hel<4); return _currentstates[hel]; } /** * Get the basis state for the decay for the given helicity, \a hel * (0,1,2,3 as described above.) */ const LorentzRSSpinor & getDecayBasisState(unsigned int hel) const { assert(hel<4); if(!_decaycalc) { for(unsigned int ix=0;ix<4;++ix) _decaystates[ix]=_currentstates[ix]; _decaycalc=true; } return _decaystates[hel]; } /** * Perform a lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation &); //@} /** * Undecay */ virtual void undecay() const { _decaycalc=false; SpinInfo::undecay(); } /** * Reset */ virtual void reset() { undecay(); _currentstates = _productionstates; SpinInfo::reset(); } public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * Private and non-existent assignment operator. */ - RSFermionSpinInfo & operator=(const RSFermionSpinInfo &); + RSFermionSpinInfo & operator=(const RSFermionSpinInfo &) = delete; private: /** * Basis states in the frame in which the particle was produced. */ mutable std::array,4> _productionstates; /** * Basis states in the frame in which the particle decays. */ mutable std::array,4> _decaystates; /** * Basis states in the current frame of the particle */ mutable std::array,4> _currentstates; /** * True if the decay state has been set. */ mutable bool _decaycalc; }; } } namespace ThePEG { } #endif /* THEPEG_RSFermionSpinInfo_H */ diff --git a/Helicity/ScalarSpinInfo.h b/Helicity/ScalarSpinInfo.h --- a/Helicity/ScalarSpinInfo.h +++ b/Helicity/ScalarSpinInfo.h @@ -1,84 +1,84 @@ // -*- C++ -*- // // ScalarSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_ScalarSpinInfo_H #define ThePEG_ScalarSpinInfo_H // This is the declaration of the ScalarSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ScalarSpinInfo.fh" namespace ThePEG { namespace Helicity { /** * The ScalarSpinInfo class is designed to be the implementation of * the spin information for a scalar particle. Obviously it is pretty * trival in this case. * * @author Peter Richardson * */ class ScalarSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ ScalarSpinInfo() : SpinInfo(PDT::Spin0) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ ScalarSpinInfo(const Lorentz5Momentum & p, bool time) : SpinInfo(PDT::Spin0, p, time) {} //@} public: /** * Standard Init function. */ static void Init(); /** * Standard clone methods. */ virtual EIPtr clone() const { tcSpinPtr temp = this; return const_ptr_cast(temp); } /** * Perform a lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation &); private: /** * Private and non-existent assignment operator. */ - ScalarSpinInfo & operator=(const ScalarSpinInfo &); + ScalarSpinInfo & operator=(const ScalarSpinInfo &) = delete; }; } } namespace ThePEG { } #endif /* ThePEG_ScalarSpinInfo_H */ diff --git a/Helicity/TensorSpinInfo.h b/Helicity/TensorSpinInfo.h --- a/Helicity/TensorSpinInfo.h +++ b/Helicity/TensorSpinInfo.h @@ -1,194 +1,194 @@ // -*- C++ -*- // // TensorSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_TensorSpinInfo_H #define THEPEG_TensorSpinInfo_H // This is the declaration of the TensorSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/Helicity/LorentzTensor.h" #include "TensorSpinInfo.fh" // #include "TensorSpinInfo.xh" #include namespace ThePEG { namespace Helicity { /** * The TensorSpinInfo class is the implementation of the spin * information for tensor particles. It inherits from the SpinInfo * class and implements the storage of the basis tensors. * * These basis states should be set by either matrix elements or * decayers which are capable of generating spin correlation * information. * * The basis states in the rest frame of the particles can then be * accessed by decayers to produce the correct correlation. * * N.B. in our convention 0 is the \f$-2\f$ helicity state, * 1 is the \f$-1\f$ helicity state, * 2 is the \f$0\f$ helicity state, * 3 is the \f$+1\f$ helicity state and * 4 is the \f$+2\f$ helicity state. * * @author Peter Richardson * */ class TensorSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ TensorSpinInfo() : SpinInfo(PDT::Spin2), _decaycalc(false) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ TensorSpinInfo(const Lorentz5Momentum & p, bool time) : SpinInfo(PDT::Spin2, p, time), _decaycalc(false) {} //@} public: /** @name Access the basis states. */ //@{ /** * Set the basis state, this is production state. * @param hel the helicity (0,1,2,3,4 as described above.) * @param in the LorentzTensor for the given helicity. */ void setBasisState(unsigned int hel, LorentzTensor in) const { assert(hel<5); _productionstates[hel]=in; _currentstates [hel]=in; } /** * Set the basis state for the decay. * @param hel the helicity (0,1,2,3,4 as described above.) * @param in the LorentzTensor for the given helicity. */ void setDecayState(unsigned int hel, LorentzTensor in) const { assert(hel<5); _decaycalc = true; _decaystates[hel] = in; } /** * Get the basis state for the production for the given helicity, \a * hel (0,1,2,3,4 as described above.) */ const LorentzTensor & getProductionBasisState(unsigned int hel) const { assert(hel<5); return _productionstates[hel]; } /** * Get the basis state for the current for the given helicity, \a * hel (0,1,2,3,4 as described above.) */ const LorentzTensor & getCurrentBasisState(unsigned int hel) const { assert(hel<5); return _currentstates[hel]; } /** * Get the basis state for the decay for the given helicity, \a hel * (0,1,2,3,4 as described above.) */ const LorentzTensor & getDecayBasisState(unsigned int hel) const { assert(hel<5); if(!_decaycalc) { for(unsigned int ix=0;ix<5;++ix) _decaystates[ix]=_currentstates[ix].conjugate(); _decaycalc=true; } return _decaystates[hel]; } //@} /** * Perform a lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation &); /** * Undecay */ virtual void undecay() const { _decaycalc=false; SpinInfo::undecay(); } /** * Reset */ virtual void reset() { undecay(); _currentstates = _productionstates; SpinInfo::reset(); } public: /** * Standard Init function. */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * Private and non-existent assignment operator. */ - TensorSpinInfo & operator=(const TensorSpinInfo &); + TensorSpinInfo & operator=(const TensorSpinInfo &) = delete; private: /** * Basis states in the frame in which the particle was produced. */ mutable std::array,5> _productionstates; /** * Basis states in the frame in which the particle decays. */ mutable std::array,5> _decaystates; /** * Basis states in the current frame of the particle */ mutable std::array,5> _currentstates; /** * True if the decay state has been set. */ mutable bool _decaycalc; }; } } namespace ThePEG { } #endif /* THEPEG_TensorSpinInfo_H */ diff --git a/Helicity/VectorSpinInfo.h b/Helicity/VectorSpinInfo.h --- a/Helicity/VectorSpinInfo.h +++ b/Helicity/VectorSpinInfo.h @@ -1,193 +1,193 @@ // -*- C++ -*- // // VectorSpinInfo.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VectorSpinInfo_H #define THEPEG_VectorSpinInfo_H // This is the declaration of the VectorSpinInfo class. #include "ThePEG/EventRecord/SpinInfo.h" #include "ThePEG/Helicity/LorentzPolarizationVector.h" #include "VectorSpinInfo.fh" namespace ThePEG { namespace Helicity { /** * The VectorSpinInfo class is the implementation of the spin * information for vector particles. It inherits from the SpinInfo * class and implements the storage of the basis vectors. * * These basis states should be set by either matrixelements or * decayers which are capable of generating spin correlation * information. * * The basis states in the rest frame of the particles can then be * accessed by decayers to produce the correct correlation. * * N.B. in our convention 0 is the \f$-1\f$ helicity state, * 1 is the \f$0\f$ helicity state and * 2 is the \f$+1\f$ helicity state. * * @author Peter Richardson * */ class VectorSpinInfo: public SpinInfo { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ VectorSpinInfo() : SpinInfo(PDT::Spin1), _decaycalc(false) {} /** * Standard Constructor. * @param p the production momentum. * @param time true if the particle is time-like. */ VectorSpinInfo(const Lorentz5Momentum & p, bool time) : SpinInfo(PDT::Spin1, p, time), _decaycalc(false) {} //@} public: /** @name Set and get methods for the basis state. */ //@{ /** * Set the basis state, this is production state. * @param hel the helicity (0,1,2 as described above.) * @param in the LorentzPolarizationVector for the given helicity. */ void setBasisState(unsigned int hel, const LorentzPolarizationVector & in) const { assert(hel<3); _productionstates[hel] = in; _currentstates [hel] = in; } /** * Set the basis state for the decay. * @param hel the helicity (0,1,2 as described above.) * @param in the LorentzPolarizationVector for the given helicity. */ void setDecayState(unsigned int hel, const LorentzPolarizationVector & in) const { assert(hel<3); _decaycalc = true; _decaystates[hel] = in;; } /** * Get the basis state for the production for the given helicity, \a * hel (0,1,2 as described above.) */ const LorentzPolarizationVector & getProductionBasisState(unsigned int hel) const { assert(hel<3); return _productionstates[hel]; } /** * Get the basis state for the current for the given helicity, \a * hel (0,1,2 as described above.) */ const LorentzPolarizationVector & getCurrentBasisState(unsigned int hel) const { assert(hel<3); return _currentstates[hel]; } /** * Get the basis state for the decay for the given helicity, \a hel * (0,1,2 as described above.) */ const LorentzPolarizationVector & getDecayBasisState(unsigned int hel) const { assert(hel<3); if(!_decaycalc) { for(unsigned int ix=0;ix<3;++ix) _decaystates[ix]=_currentstates[ix].conjugate(); _decaycalc=true; } // return the basis function return _decaystates[hel]; } //@} /** * Perform a Lorentz rotation of the spin information */ virtual void transform(const LorentzMomentum &,const LorentzRotation & ); /** * Undecay */ virtual void undecay() const { _decaycalc=false; SpinInfo::undecay(); } /** * Reset */ virtual void reset() { undecay(); _currentstates = _productionstates; SpinInfo::reset(); } public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); /** * Standard clone method. */ virtual EIPtr clone() const; private: /** * Private and non-existent assignment operator. */ - VectorSpinInfo & operator=(const VectorSpinInfo &); + VectorSpinInfo & operator=(const VectorSpinInfo &) = delete; private: /** * Basis states in the frame in which the particle was produced. */ mutable std::array _productionstates; /** * Basis states in the frame in which the particle decays. */ mutable std::array _decaystates; /** * Basis states in the current frame of the particle */ mutable std::array _currentstates; /** * True if the decay state has been set. */ mutable bool _decaycalc; }; } } namespace ThePEG { } #endif /* THEPEG_VectorSpinInfo_H */ diff --git a/Helicity/Vertex/AbstractFFFFVertex.h b/Helicity/Vertex/AbstractFFFFVertex.h --- a/Helicity/Vertex/AbstractFFFFVertex.h +++ b/Helicity/Vertex/AbstractFFFFVertex.h @@ -1,73 +1,73 @@ // -*- C++ -*- #ifndef Helicity_AbstractFFFFVertex_H #define Helicity_AbstractFFFFVertex_H // // This is the declaration of the AbstractFFFFVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "AbstractFFFFVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractFFFFVertex class provides a base class for all 4-fermion vertices * in ThePEG */ class AbstractFFFFVertex: public VertexBase { public: /** * The default constructor. */ AbstractFFFFVertex() : VertexBase(VertexType::FFFF) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the first ferimon. * @param sp2 The wavefunction for the second ferimon. * @param sbar1 The wavefunction for the first antifermion. * @param sbar2 The wavefunction for the second antifermion. */ virtual Complex evaluate(Energy2 q2, const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar1, const SpinorWaveFunction & sp2, const SpinorBarWaveFunction & sbar2) = 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. */ - AbstractFFFFVertex & operator=(const AbstractFFFFVertex &); + AbstractFFFFVertex & operator=(const AbstractFFFFVertex &) = delete; }; } } #endif /* Helicity_AbstractFFFFVertex_H */ diff --git a/Helicity/Vertex/AbstractFFSSVertex.h b/Helicity/Vertex/AbstractFFSSVertex.h --- a/Helicity/Vertex/AbstractFFSSVertex.h +++ b/Helicity/Vertex/AbstractFFSSVertex.h @@ -1,73 +1,73 @@ // -*- C++ -*- #ifndef ThePEG_AbstractFFSSVertex_H #define ThePEG_AbstractFFSSVertex_H // // This is the declaration of the AbstractFFSSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "AbstractFFSSVertex.fh" namespace ThePEG { namespace Helicity { /** * Here is the documentation of the AbstractFFSSVertex class. */ class AbstractFFSSVertex: public VertexBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ AbstractFFSSVertex(): VertexBase(VertexType::FFSS) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. * @param sca4 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4) = 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. */ - AbstractFFSSVertex & operator=(const AbstractFFSSVertex &); + AbstractFFSSVertex & operator=(const AbstractFFSSVertex &) = delete; }; } } #endif /* ThePEG_AbstractFFSSVertex_H */ diff --git a/Helicity/Vertex/AbstractFFSTVertex.h b/Helicity/Vertex/AbstractFFSTVertex.h --- a/Helicity/Vertex/AbstractFFSTVertex.h +++ b/Helicity/Vertex/AbstractFFSTVertex.h @@ -1,78 +1,78 @@ // -*- C++ -*- #ifndef HELICITY_AbstractFFSTVertex_H #define HELICITY_AbstractFFSTVertex_H // // This is the declaration of the AbstractFFSTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "AbstractFFSTVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractFFSTVertex class is the base class for all * fermion-fermion-scalar-tensor interactions in ThePEG. */ class AbstractFFSTVertex: public VertexBase { public: /** * Default constructor */ AbstractFFSTVertex() : VertexBase(VertexType::FFST) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the vector. * @param ten4 The wavefunction for the tensor. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, const TensorWaveFunction & ten4) = 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. */ - AbstractFFSTVertex & operator=(const AbstractFFSTVertex &); + AbstractFFSTVertex & operator=(const AbstractFFSTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractFFSTVertex_H */ diff --git a/Helicity/Vertex/AbstractFFSVertex.h b/Helicity/Vertex/AbstractFFSVertex.h --- a/Helicity/Vertex/AbstractFFSVertex.h +++ b/Helicity/Vertex/AbstractFFSVertex.h @@ -1,125 +1,125 @@ // -*- C++ -*- #ifndef HELICITY_AbstractFFSVertex_H #define HELICITY_AbstractFFSVertex_H // // This is the declaration of the AbstractFFSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "AbstractFFSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractFFSVertex class provides a base class for all * fermion-fermion-scalar vertices in ThePEG. */ class AbstractFFSVertex: public VertexBase { public: /** * Default constructor */ AbstractFFSVertex() : VertexBase(VertexType::FFS) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3) = 0; /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param sca3 The wavefunction for the scalar. * @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 SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. * @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 SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractFFSVertex & operator=(const AbstractFFSVertex &); + AbstractFFSVertex & operator=(const AbstractFFSVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractFFSVertex_H */ diff --git a/Helicity/Vertex/AbstractFFTVertex.h b/Helicity/Vertex/AbstractFFTVertex.h --- a/Helicity/Vertex/AbstractFFTVertex.h +++ b/Helicity/Vertex/AbstractFFTVertex.h @@ -1,126 +1,126 @@ // -*- C++ -*- #ifndef HELICITY_AbstractFFTVertex_H #define HELICITY_AbstractFFTVertex_H // // This is the declaration of the AbstractFFTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "AbstractFFTVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractFFTVertex class is the base class for all fermion-fermion-tensor * interactions in ThePEG */ class AbstractFFTVertex: public VertexBase { public: /** * Default constructor */ AbstractFFTVertex() : VertexBase(VertexType::FFT) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param ten3 The wavefunction for the tensor. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const TensorWaveFunction & ten3) = 0; /** * Evaluate the off-shell tensor 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 tensor. * @param out The ParticleData pointer for the off-shell tensor. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 TensorWaveFunction evaluate(Energy2 q2, int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param ten3 The wavefunction for the tensor. * @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 SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const TensorWaveFunction & ten3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param ten3 The wavefunction for the tensor. * @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 SpinorBarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const SpinorBarWaveFunction & sbar2, const TensorWaveFunction& ten3, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractFFTVertex & operator=(const AbstractFFTVertex &); + AbstractFFTVertex & operator=(const AbstractFFTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractFFTVertex_H */ diff --git a/Helicity/Vertex/AbstractFFVSVertex.h b/Helicity/Vertex/AbstractFFVSVertex.h --- a/Helicity/Vertex/AbstractFFVSVertex.h +++ b/Helicity/Vertex/AbstractFFVSVertex.h @@ -1,74 +1,74 @@ // -*- C++ -*- #ifndef ThePEG_AbstractFFVSVertex_H #define ThePEG_AbstractFFVSVertex_H // // This is the declaration of the AbstractFFVSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractFFVSVertex.fh" namespace ThePEG { namespace Helicity { /** * Here is the documentation of the AbstractFFVSVertex class. */ class AbstractFFVSVertex: public VertexBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ AbstractFFVSVertex() : VertexBase(VertexType::FFVS) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. * @param sca4 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const ScalarWaveFunction & sca4) = 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. */ - AbstractFFVSVertex & operator=(const AbstractFFVSVertex &); + AbstractFFVSVertex & operator=(const AbstractFFVSVertex &) = delete; }; } } #endif /* ThePEG_AbstractFFVSVertex_H */ diff --git a/Helicity/Vertex/AbstractFFVTVertex.h b/Helicity/Vertex/AbstractFFVTVertex.h --- a/Helicity/Vertex/AbstractFFVTVertex.h +++ b/Helicity/Vertex/AbstractFFVTVertex.h @@ -1,78 +1,78 @@ // -*- C++ -*- #ifndef HELICITY_AbstractFFVTVertex_H #define HELICITY_AbstractFFVTVertex_H // // This is the declaration of the AbstractFFVTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "AbstractFFVTVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractFFVTVertex class is the base class for all * fermion-fermion-vector-tensor interactions in ThePEG. */ class AbstractFFVTVertex: public VertexBase { public: /** * Default constructor */ AbstractFFVTVertex() : VertexBase(VertexType::FFVT) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. * @param ten4 The wavefunction for the tensor. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const TensorWaveFunction & ten4) = 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. */ - AbstractFFVTVertex & operator=(const AbstractFFVTVertex &); + AbstractFFVTVertex & operator=(const AbstractFFVTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractFFVTVertex_H */ diff --git a/Helicity/Vertex/AbstractFFVVVertex.h b/Helicity/Vertex/AbstractFFVVVertex.h --- a/Helicity/Vertex/AbstractFFVVVertex.h +++ b/Helicity/Vertex/AbstractFFVVVertex.h @@ -1,72 +1,72 @@ // -*- C++ -*- #ifndef HELICITY_AbstractFFVVVertex_H #define HELICITY_AbstractFFVVVertex_H // // This is the declaration of the AbstractFFVVVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractFFVVVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractFFVVVertex class provides a base class for all * fermion-fermion-vector-vector vertices in ThePEG. */ class AbstractFFVVVertex: public VertexBase { public: /** * Default constructor */ AbstractFFVVVertex() : VertexBase(VertexType::FFVV) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. * @param vec4 The wavefunction for the vector. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const VectorWaveFunction & vec4) = 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. */ - AbstractFFVVVertex & operator=(const AbstractFFVVVertex &); + AbstractFFVVVertex & operator=(const AbstractFFVVVertex &) = delete; }; } } #endif /* HELICITY_AbstractFFVVVertex_H */ diff --git a/Helicity/Vertex/AbstractFFVVertex.h b/Helicity/Vertex/AbstractFFVVertex.h --- a/Helicity/Vertex/AbstractFFVVertex.h +++ b/Helicity/Vertex/AbstractFFVVertex.h @@ -1,207 +1,207 @@ // -*- C++ -*- #ifndef HELICITY_AbstractFFVVertex_H #define HELICITY_AbstractFFVVertex_H // // This is the declaration of the AbstractFFVVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractFFVVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractFFVVertex class provides a base class for all * fermion-fermion-vector vertices in ThePEG. */ class AbstractFFVVertex: public VertexBase { public: /** * Enum for the direction in the small angle limit */ enum SmallAngleDirection { NegativeZDirection = -1, ///< Along -z PostiveZDirection = 1 ///< Along +z }; public: /** * Default constructor */ AbstractFFVVertex() : VertexBase(VertexType::FFV) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3) = 0; /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 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 SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV) = 0; /** * 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 sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the 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 SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV) = 0; //@} /** * Special members for off-shell fermion wavefunctions with massless * gauge bosons at small angles in the small angle limit for * numerical accuracy. In order to get sufficient accuracy it is * assumed that the fermion lies along either the positive or negative z * axis * * Unlike the other members this is not required to be implemented in * all inheriting classes and a default implementation which returns * the general result is included. */ //@{ /** Small angle approx for an off-shell spinor * @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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the vector. * @param fhel Helicity of the fermion * @param vhel Helicity of the vector * @param ctheta The cosine of the * polar angle of the photon with respect to the fermion * @param phi The azimuthal angle of the photon with respect to the fermion * @param stheta The sine of the * polar angle of the photon with respect to the fermion * @param includeEikonal Whether or not to include the eikonal piece * @param direction Whether fermion along + or - z direction * @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 SpinorWaveFunction evaluateSmall(Energy2 q2,int iopt, tcPDPtr out, const SpinorWaveFunction & sp1, const VectorWaveFunction & vec3, unsigned int fhel, unsigned int vhel, double ctheta, double phi, double stheta, bool includeEikonal = true, SmallAngleDirection direction = PostiveZDirection, Energy mass=-GeV, Energy width=-GeV); /** Small angle approx for an off-shell spinor * @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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. * @param fhel Helicity of the fermion * @param vhel Helicity of the vector * @param ctheta The cosine of the * polar angle of the photon with respect to the fermion * @param phi The azimuthal angle of the photon with respect to the fermion * @param stheta The sine of the * polar angle of the photon with respect to the fermion * @param includeEikonal Whether or not to include the eikonal piece * @param direction Whether fermion along + or - z direction * @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 SpinorBarWaveFunction evaluateSmall(Energy2 q2,int iopt, tcPDPtr out, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, unsigned int fhel, unsigned int vhel, double ctheta, double phi, double stheta, bool includeEikonal = true, SmallAngleDirection direction = PostiveZDirection, Energy mass=-GeV, Energy width=-GeV); //@} 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. */ - AbstractFFVVertex & operator=(const AbstractFFVVertex &); + AbstractFFVVertex & operator=(const AbstractFFVVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractFFVVertex_H */ diff --git a/Helicity/Vertex/AbstractRFSSVertex.h b/Helicity/Vertex/AbstractRFSSVertex.h --- a/Helicity/Vertex/AbstractRFSSVertex.h +++ b/Helicity/Vertex/AbstractRFSSVertex.h @@ -1,85 +1,85 @@ // -*- C++ -*- #ifndef ThePEG_AbstractRFSSVertex_H #define ThePEG_AbstractRFSSVertex_H // // This is the declaration of the AbstractRFSSVertex class. // #include "ThePEG/Helicity/Vertex/VertexBase.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/ScalarWaveFunction.h" #include "AbstractRFSSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractRFSVertex class provides a base class for all * spin-3/2 fermion-fermion-scalar-scalar vertices in ThePEG. */ class AbstractRFSSVertex: public VertexBase { public: /** * The default constructor. */ AbstractRFSSVertex() : VertexBase(VertexType::RFSS) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the 1st scalar. * @param sca4 The wavefunction for the 2nd scalar. */ virtual Complex evaluate(Energy2 q2,const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4) = 0; /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @param sca3 The wavefunction for the 1st scalar. * @param sca4 The wavefunction for the 2nd scalar. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4) = 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. */ - AbstractRFSSVertex & operator=(const AbstractRFSSVertex &); + AbstractRFSSVertex & operator=(const AbstractRFSSVertex &) = delete; }; } } #endif /* ThePEG_AbstractRFSSVertex_H */ diff --git a/Helicity/Vertex/AbstractRFSVertex.h b/Helicity/Vertex/AbstractRFSVertex.h --- a/Helicity/Vertex/AbstractRFSVertex.h +++ b/Helicity/Vertex/AbstractRFSVertex.h @@ -1,184 +1,184 @@ // -*- C++ -*- #ifndef HELICITY_AbstractRFSVertex_H #define HELICITY_AbstractRFSVertex_H // // This is the declaration of the AbstractRFSVertex class. // #include "VertexBase.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/ScalarWaveFunction.h" #include "AbstractRFSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractRFSVertex class provides a base class for all * spin-3/2 fermion-fermion-scalar vertices in ThePEG. */ class AbstractRFSVertex: public VertexBase { public: /** * Default constructor */ AbstractRFSVertex() : VertexBase(VertexType::RFS) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3) = 0; /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @param sca3 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3) = 0; /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param sca3 The wavefunction for the scalar. * @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 SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorWaveFunction & sp1, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell RS spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param sca3 The wavefunction for the scalar. * @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 RSSpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. * @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 SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell barred RS spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. * @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 RSSpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @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 ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractRFSVertex & operator=(const AbstractRFSVertex &); + AbstractRFSVertex & operator=(const AbstractRFSVertex &) = delete; }; } } #endif /* HELICITY_AbstractRFSVertex_H */ diff --git a/Helicity/Vertex/AbstractRFVSVertex.h b/Helicity/Vertex/AbstractRFVSVertex.h --- a/Helicity/Vertex/AbstractRFVSVertex.h +++ b/Helicity/Vertex/AbstractRFVSVertex.h @@ -1,88 +1,88 @@ // -*- C++ -*- #ifndef ThePEG_AbstractRFVSVertex_H #define ThePEG_AbstractRFVSVertex_H // // This is the declaration of the AbstractRFVSVertex class. // #include "VertexBase.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/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractRFVSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractRFSVertex class provides a base class for all * spin-3/2 fermion-fermion-vector-scalar vertices in ThePEG. */ class AbstractRFVSVertex: public VertexBase { public: /** * The default constructor. */ AbstractRFVSVertex() : VertexBase(VertexType::RFVS) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. * @param sca4 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const ScalarWaveFunction & sca4) = 0; /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @param vec3 The wavefunction for the vector. * @param sca4 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const ScalarWaveFunction & sca4) = 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. */ - AbstractRFVSVertex & operator=(const AbstractRFVSVertex &); + AbstractRFVSVertex & operator=(const AbstractRFVSVertex &) = delete; }; } } #endif /* ThePEG_AbstractRFVSVertex_H */ diff --git a/Helicity/Vertex/AbstractRFVVVertex.h b/Helicity/Vertex/AbstractRFVVVertex.h --- a/Helicity/Vertex/AbstractRFVVVertex.h +++ b/Helicity/Vertex/AbstractRFVVVertex.h @@ -1,87 +1,87 @@ // -*- C++ -*- #ifndef ThePEG_AbstractRFVVVertex_H #define ThePEG_AbstractRFVVVertex_H // // This is the declaration of the AbstractRFVVVertex class. // #include "VertexBase.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 "AbstractRFVVVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractRFSVertex class provides a base class for all * spin-3/2 fermion-fermion-vector-vector vertices in ThePEG. */ class AbstractRFVVVertex: public VertexBase { public: /** * The default constructor. */ AbstractRFVVVertex() : VertexBase(VertexType::RFVV) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 1st vector. * @param vec4 The wavefunction for the 2nd vector. */ virtual Complex evaluate(Energy2 q2,const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const VectorWaveFunction & vec4) = 0; /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @param vec3 The wavefunction for the 1st vector. * @param vec4 The wavefunction for the 2nd vector. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const VectorWaveFunction & vec4) = 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. */ - AbstractRFVVVertex & operator=(const AbstractRFVVVertex &); + AbstractRFVVVertex & operator=(const AbstractRFVVVertex &) = delete; }; } } #endif /* ThePEG_AbstractRFVVVertex_H */ diff --git a/Helicity/Vertex/AbstractRFVVertex.h b/Helicity/Vertex/AbstractRFVVertex.h --- a/Helicity/Vertex/AbstractRFVVertex.h +++ b/Helicity/Vertex/AbstractRFVVertex.h @@ -1,189 +1,189 @@ // -*- C++ -*- #ifndef HELICITY_AbstractRFVVertex_H #define HELICITY_AbstractRFVVertex_H // // This is the declaration of the AbstractRFVVertex class. // #include "VertexBase.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 "AbstractRFVVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractRFVVertex class provides a base class for all * spin-3/2 fermion-fermion-vector vertices in ThePEG. */ class AbstractRFVVertex: public VertexBase { public: /** * Default constructor */ AbstractRFVVertex() : VertexBase(VertexType::RFV) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. */ virtual Complex evaluate(Energy2 q2,const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3) = 0; /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @param vec3 The wavefunction for the vector. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3) = 0; /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 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 SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 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 RSSpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV) = 0; /** * 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 sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV) = 0; /** * 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 sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the 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 SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorWaveFunction & sp1, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the 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 RSSpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractRFVVertex & operator=(const AbstractRFVVertex &); + AbstractRFVVertex & operator=(const AbstractRFVVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractRFVVertex_H */ diff --git a/Helicity/Vertex/AbstractSSSSVertex.h b/Helicity/Vertex/AbstractSSSSVertex.h --- a/Helicity/Vertex/AbstractSSSSVertex.h +++ b/Helicity/Vertex/AbstractSSSSVertex.h @@ -1,88 +1,88 @@ // -*- C++ -*- #ifndef HELICITY_AbstractSSSSVertex_H #define HELICITY_AbstractSSSSVertex_H // // This is the declaration of the AbstractSSSSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "AbstractSSSSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractSSSSVertex class is the base class for all scalar-scalar-scalar * interactions in ThePEG */ class AbstractSSSSVertex: public VertexBase { public: /** * Default constructor */ AbstractSSSSVertex() : VertexBase(VertexType::SSSS) {} /** * 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 sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @param sca3 The wavefunction for the third scalar. * @param sca4 The wavefunction for the fourth scalar. */ virtual Complex evaluate(Energy2 q2,const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @param sca3 The wavefunction for the third scalar. */ virtual ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3) = 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. */ - AbstractSSSSVertex & operator=(const AbstractSSSSVertex &); + AbstractSSSSVertex & operator=(const AbstractSSSSVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractSSSSVertex_H */ diff --git a/Helicity/Vertex/AbstractSSSTVertex.h b/Helicity/Vertex/AbstractSSSTVertex.h --- a/Helicity/Vertex/AbstractSSSTVertex.h +++ b/Helicity/Vertex/AbstractSSSTVertex.h @@ -1,75 +1,75 @@ // -*- C++ -*- #ifndef HELICITY_AbstractSSSTVertex_H #define HELICITY_AbstractSSSTVertex_H // // This is the declaration of the AbstractSSSTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "AbstractSSSTVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractSSSTVertex class is the base class for all scalar-scalar-scalar-tensor * interactions in ThePEG. */ class AbstractSSSTVertex: public VertexBase { public: /** * Default constructor */ AbstractSSSTVertex() : VertexBase(VertexType::SSST) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @param sca3 The wavefunction for the third scalar. * @param ten4 The wavefunction for the tensor. */ virtual Complex evaluate(Energy2 q2,const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3, const TensorWaveFunction & ten4) = 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. */ - AbstractSSSTVertex & operator=(const AbstractSSSTVertex &); + AbstractSSSTVertex & operator=(const AbstractSSSTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractSSSTVertex_H */ diff --git a/Helicity/Vertex/AbstractSSSVertex.h b/Helicity/Vertex/AbstractSSSVertex.h --- a/Helicity/Vertex/AbstractSSSVertex.h +++ b/Helicity/Vertex/AbstractSSSVertex.h @@ -1,89 +1,89 @@ // -*- C++ -*- #ifndef HELICITY_AbstractSSSVertex_H #define HELICITY_AbstractSSSVertex_H // // This is the declaration of the AbstractSSSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "AbstractSSSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractSSSVertex class is the base class for all scalar-scalar-scalar * interactions in ThePEG */ class AbstractSSSVertex: public VertexBase { public: /** * Default constructor */ AbstractSSSVertex() : VertexBase(VertexType::SSS) {} /** * 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 sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @param sca3 The wavefunction for the third scalar. */ virtual Complex evaluate(Energy2 q2,const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @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 ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractSSSVertex & operator=(const AbstractSSSVertex &); + AbstractSSSVertex & operator=(const AbstractSSSVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractSSSVertex_H */ diff --git a/Helicity/Vertex/AbstractSSTVertex.h b/Helicity/Vertex/AbstractSSTVertex.h --- a/Helicity/Vertex/AbstractSSTVertex.h +++ b/Helicity/Vertex/AbstractSSTVertex.h @@ -1,108 +1,108 @@ // -*- C++ -*- #ifndef HELICITY_AbstractSSTVertex_H #define HELICITY_AbstractSSTVertex_H // // This is the declaration of the AbstractSSTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "AbstractSSTVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractSSTVertex class is the base class for * scalar-scalar-tensor interactions in ThePEG */ class AbstractSSTVertex: public VertexBase { public: /** * Default constructor */ AbstractSSTVertex() : VertexBase(VertexType::SST) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar * @param ten3 The wavefunction for the tensor. */ virtual Complex evaluate(Energy2 q2, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const TensorWaveFunction & ten3) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sca1 The wavefunction for the first scalar. * @param ten3 The wavefunction for the tensor. * @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 ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const ScalarWaveFunction & sca1, const TensorWaveFunction & ten3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell tensor 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 tensor. * @param out The ParticleData pointer for the off-shell tensor. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @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 TensorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractSSTVertex & operator=(const AbstractSSTVertex &); + AbstractSSTVertex & operator=(const AbstractSSTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractSSTVertex_H */ diff --git a/Helicity/Vertex/AbstractVSSVertex.h b/Helicity/Vertex/AbstractVSSVertex.h --- a/Helicity/Vertex/AbstractVSSVertex.h +++ b/Helicity/Vertex/AbstractVSSVertex.h @@ -1,107 +1,107 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVSSVertex_H #define HELICITY_AbstractVSSVertex_H // // This is the declaration of the AbstractVSSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractVSSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractVSSVertex class is the base class for vector-scalar-scalar * interactions in ThePEG */ class AbstractVSSVertex: public VertexBase { public: /** * Default constructor */ AbstractVSSVertex() : VertexBase(VertexType::VSS) {} /** * 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 vector. * @param sca2 The wavefunction for the first scalar. * @param sca3 The wavefunction for the second scalar. */ virtual Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3) = 0; /** * 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 sca2 The wavefunction for the first scalar. * @param sca3 The wavefunction for the second scalar. * @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 ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the vector. * @param sca2 The wavefunction for the scalar. * @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 ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const ScalarWaveFunction & sca2, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractVSSVertex & operator=(const AbstractVSSVertex &); + AbstractVSSVertex & operator=(const AbstractVSSVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVSSVertex_H */ diff --git a/Helicity/Vertex/AbstractVVSSVertex.h b/Helicity/Vertex/AbstractVVSSVertex.h --- a/Helicity/Vertex/AbstractVVSSVertex.h +++ b/Helicity/Vertex/AbstractVVSSVertex.h @@ -1,113 +1,113 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVSSVertex_H #define HELICITY_AbstractVVSSVertex_H // // This is the declaration of the AbstractVVSSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractVVSSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractVVSSVertex class is the base class for vector-vector-scalar-scalar * interactions in ThePEG */ class AbstractVVSSVertex: public VertexBase { public: /** * Default constructor */ AbstractVVSSVertex() : VertexBase(VertexType::VVSS) {} /** * 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 sca3 The wavefunction for the first scalar. * @param sca4 The wavefunction for the second scalar. */ virtual Complex evaluate(Energy2 q2, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4) = 0; /** * 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 sca3 The wavefunction for the first scalar. * @param sca4 The wavefunction for the second scalar. * @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 ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second vector. * @param sca3 The wavefunction for the second scalar. * @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 ScalarWaveFunction evaluate(Energy2 q2, int iopt,tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractVVSSVertex & operator=(const AbstractVVSSVertex &); + AbstractVVSSVertex & operator=(const AbstractVVSSVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVVSSVertex_H */ diff --git a/Helicity/Vertex/AbstractVVSTVertex.h b/Helicity/Vertex/AbstractVVSTVertex.h --- a/Helicity/Vertex/AbstractVVSTVertex.h +++ b/Helicity/Vertex/AbstractVVSTVertex.h @@ -1,76 +1,76 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVSTVertex_H #define HELICITY_AbstractVVSTVertex_H // // This is the declaration of the AbstractVVSTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "AbstractVVSTVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractVVSTVertex class is the base class for all vector-vector-scalar-tensor * interactions in ThePEG. */ class AbstractVVSTVertex: public VertexBase { public: /** * Default constructor */ AbstractVVSTVertex() : VertexBase(VertexType::VVST) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate 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 sca3 The wavefunction for the third vector. * @param ten4 The wavefunction for the tensor. */ virtual Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3, const TensorWaveFunction & ten4) = 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. */ - AbstractVVSTVertex & operator=(const AbstractVVSTVertex &); + AbstractVVSTVertex & operator=(const AbstractVVSTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVVSTVertex_H */ diff --git a/Helicity/Vertex/AbstractVVSVertex.h b/Helicity/Vertex/AbstractVVSVertex.h --- a/Helicity/Vertex/AbstractVVSVertex.h +++ b/Helicity/Vertex/AbstractVVSVertex.h @@ -1,107 +1,107 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVSVertex_H #define HELICITY_AbstractVVSVertex_H // // This is the declaration of the AbstractVVSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractVVSVertex.fh" namespace ThePEG { namespace Helicity { /** * Here is the documentation of the AbstractVVSVertex class. */ class AbstractVVSVertex: public VertexBase { public: /** * Default constructor */ AbstractVVSVertex() : VertexBase(VertexType::VVS) {} /** * 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 sca3 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3) = 0; /** * 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 vector. * @param sca3 The wavefunction for the scalar. * @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 ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second 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 ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractVVSVertex & operator=(const AbstractVVSVertex &); + AbstractVVSVertex & operator=(const AbstractVVSVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVVSVertex_H */ diff --git a/Helicity/Vertex/AbstractVVTVertex.h b/Helicity/Vertex/AbstractVVTVertex.h --- a/Helicity/Vertex/AbstractVVTVertex.h +++ b/Helicity/Vertex/AbstractVVTVertex.h @@ -1,111 +1,111 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVTVertex_H #define HELICITY_AbstractVVTVertex_H // // This is the declaration of the AbstractVVTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "AbstractVVTVertex.fh" namespace ThePEG { namespace Helicity { /** * Here is the documentation of the AbstractVVTVertex class. */ class AbstractVVTVertex: public VertexBase { public: /** * Default constructor */ AbstractVVTVertex() : VertexBase(VertexType::VVT) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate 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 ten3 The wavefunction for the tensor. * @param vmass The mass of the vector boson */ virtual Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const TensorWaveFunction & ten3, Energy vmass=-GeV) = 0; /** * Evaluate the off-shell tensor 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 tensor. * @param out The ParticleData pointer for the off-shell tensor. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second 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 * @param vmass The mass of the vector boson */ virtual TensorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, Energy vmass=-GeV, complex mass=-GeV, complex width=-GeV) = 0; /** * 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 vec1 The wavefunction for the first vector. * @param ten3 The wavefunction for the tensor. * @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 & vec1, const TensorWaveFunction & ten3, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractVVTVertex & operator=(const AbstractVVTVertex &); + AbstractVVTVertex & operator=(const AbstractVVTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVVTVertex_H */ diff --git a/Helicity/Vertex/AbstractVVVSVertex.h b/Helicity/Vertex/AbstractVVVSVertex.h --- a/Helicity/Vertex/AbstractVVVSVertex.h +++ b/Helicity/Vertex/AbstractVVVSVertex.h @@ -1,109 +1,109 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVVSVertex_H #define HELICITY_AbstractVVVSVertex_H // // This is the declaration of the AbstractVVVSVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "AbstractVVVSVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractVVVSVertex class provides the base class for all * vector-vector-vector interactions in ThePEG */ class AbstractVVVSVertex: public VertexBase { public: /** * Default constructor */ AbstractVVVSVertex() : VertexBase(VertexType::VVVS) {} /** * 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. * @param sca The wavefunction for the scalar particle */ virtual Complex evaluate(Energy2 q2, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, const ScalarWaveFunction & sca) = 0; /** * 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 sca The wavefunction for the scalar particle * @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, const ScalarWaveFunction & sca, complex mass=-GeV, complex width=-GeV) = 0; /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the first 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 ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV) = 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. */ - AbstractVVVSVertex & operator=(const AbstractVVVSVertex &); + AbstractVVVSVertex & operator=(const AbstractVVVSVertex &) = delete; }; } } #endif /* HELICITY_AbstractVVVSVertex_H */ diff --git a/Helicity/Vertex/AbstractVVVTVertex.h b/Helicity/Vertex/AbstractVVVTVertex.h --- a/Helicity/Vertex/AbstractVVVTVertex.h +++ b/Helicity/Vertex/AbstractVVVTVertex.h @@ -1,75 +1,75 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVVTVertex_H #define HELICITY_AbstractVVVTVertex_H // // This is the declaration of the AbstractVVVTVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "AbstractVVVTVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractVVVTVertex class is the base class for all vector-vector-vector-tensor * interactions in ThePEG. */ class AbstractVVVTVertex: public VertexBase { public: /** * Default constructor */ AbstractVVVTVertex() : VertexBase(VertexType::VVVT) {} /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate 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. * @param ten4 The wavefunction for the tensor. */ virtual Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, const TensorWaveFunction & ten4) = 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. */ - AbstractVVVTVertex & operator=(const AbstractVVVTVertex &); + AbstractVVVTVertex & operator=(const AbstractVVVTVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVVVTVertex_H */ diff --git a/Helicity/Vertex/AbstractVVVVVertex.h b/Helicity/Vertex/AbstractVVVVVertex.h --- a/Helicity/Vertex/AbstractVVVVVertex.h +++ b/Helicity/Vertex/AbstractVVVVVertex.h @@ -1,77 +1,77 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVVVVertex_H #define HELICITY_AbstractVVVVVertex_H // // This is the declaration of the AbstractVVVVVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractVVVVVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractVVVVVertex class is the base class for * vector-vector-vector-vector interactions in ThePEG */ class AbstractVVVVVertex: public VertexBase { public: /** * Default constructor */ AbstractVVVVVertex() : VertexBase(VertexType::VVVV) {} /** * 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 iopt Evaluation option, 0 just evaluate the four point vertex, 1 * include all the three point diagrams as well. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second vector. * @param vec3 The wavefunction for the third vector. * @param vec4 The wavefunction for the fourth vector. */ virtual Complex evaluate(Energy2 q2, int iopt, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, const VectorWaveFunction & vec4) = 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. */ - AbstractVVVVVertex & operator=(const AbstractVVVVVertex &); + AbstractVVVVVertex & operator=(const AbstractVVVVVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVVVVVertex_H */ diff --git a/Helicity/Vertex/AbstractVVVVertex.h b/Helicity/Vertex/AbstractVVVVertex.h --- a/Helicity/Vertex/AbstractVVVVertex.h +++ b/Helicity/Vertex/AbstractVVVVertex.h @@ -1,89 +1,89 @@ // -*- C++ -*- #ifndef HELICITY_AbstractVVVVertex_H #define HELICITY_AbstractVVVVertex_H // // This is the declaration of the AbstractVVVVertex class. // #include "VertexBase.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "AbstractVVVVertex.fh" namespace ThePEG { namespace Helicity { /** * The AbstractVVVVertex class provides the base class for all * vector-vector-vector interactions in ThePEG */ class AbstractVVVVertex: public VertexBase { public: /** * Default constructor */ AbstractVVVVertex() : VertexBase(VertexType::VVV) {} /** * 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) = 0; /** * 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 mass=-GeV, complex width=-GeV) = 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. */ - AbstractVVVVertex & operator=(const AbstractVVVVertex &); + AbstractVVVVertex & operator=(const AbstractVVVVertex &) = delete; }; } } namespace ThePEG { } #endif /* HELICITY_AbstractVVVVertex_H */ diff --git a/Helicity/Vertex/Scalar/FFSVertex.h b/Helicity/Vertex/Scalar/FFSVertex.h --- a/Helicity/Vertex/Scalar/FFSVertex.h +++ b/Helicity/Vertex/Scalar/FFSVertex.h @@ -1,200 +1,200 @@ // -*- C++ -*- // // FFSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_FFSVertex_H #define ThePEG_FFSVertex_H // // This is the declaration of the FFSVertex class. #include "ThePEG/Helicity/Vertex/AbstractFFSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "FFSVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * The FFSVertex class is the implementation of the interact of a * scalar boson and a fermion-antifermion pair. It inherits from the AbstractFFSVertex * class for storage of the particles interacting at the vertex and implements * the helicity calculations. * * Implementations of specific interactions should inherit from this and implement * the virtual setCoupling member. * * The form of the vertex is * \f[ic\bar{f_2}a^\lambda P_\lambda f_1\phi_3\f] * where \f$a^\pm\f$ are the right and left couplings and \f$P_\pm=(1\pm\gamma_5)\f$ * are the chirality projection operators. * * @see AbstractFFSVertex */ class FFSVertex: public AbstractFFSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. */ Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param sca3 The wavefunction for the scalar. * @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 */ SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. * @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 */ SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} /** * Get the couplings */ //@{ /** * Get the left coupling. */ Complex left() { return _left; } /** * Get the right coupling. */ Complex right() { return _right; } //@} protected: /** * Set the couplings */ //@{ /** * Set the left coupling. */ void left(Complex in) { _left = in; } /** * Set the right coupling. */ void right(Complex in) { _right = in; } //@} private: /** * Private and non-existent assignment operator. */ - FFSVertex & operator=(const FFSVertex &); + FFSVertex & operator=(const FFSVertex &) = delete; private: /** * Storage of the left coupling. */ Complex _left; /** * Storage of the right coupling. */ Complex _right; }; } } #endif /* ThePEG_FFSVertex_H */ diff --git a/Helicity/Vertex/Scalar/GeneralVSSVertex.h b/Helicity/Vertex/Scalar/GeneralVSSVertex.h --- a/Helicity/Vertex/Scalar/GeneralVSSVertex.h +++ b/Helicity/Vertex/Scalar/GeneralVSSVertex.h @@ -1,169 +1,169 @@ // -*- C++ -*- #ifndef Helicity_GeneralVSSVertex_H #define Helicity_GeneralVSSVertex_H // // This is the declaration of the GeneralVSSVertex class. // #include "ThePEG/Helicity/Vertex/AbstractVSSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "GeneralVSSVertex.fh" namespace ThePEG { namespace Helicity { using namespace ThePEG; /** * Here is the documentation of the GeneralVSSVertex class. * * @see \ref GeneralVSSVertexInterfaces "The interfaces" * defined for GeneralVSSVertex. */ class GeneralVSSVertex: public AbstractVSSVertex { public: /** * The default constructor. */ GeneralVSSVertex() : a_(1.), b_(-1.) {} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); /** * 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 vector. * @param sca2 The wavefunction for the first scalar. * @param sca3 The wavefunction for the second scalar. */ Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3); /** * 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 sca2 The wavefunction for the first scalar. * @param sca3 The wavefunction for the second scalar. * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the vector. * @param sca2 The wavefunction for the scalar. * @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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const ScalarWaveFunction & sca2, complex mass=-GeV, complex width=-GeV); /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} protected: /** * Member functions top set/get the coefficents */ //@{ /** * Access coefficient of \f$p_2\f$ */ Complex a() const {return a_;} /** * Access coefficient of \f$p_3\f$ */ Complex b() const {return b_;} /** * Set coefficient of \f$p_2\f$ */ void a(Complex in) {a_=in;} /** * Set coefficient of \f$p_3\f$ */ void b(Complex in) {b_=in;} //@} private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - GeneralVSSVertex & operator=(const GeneralVSSVertex &); + GeneralVSSVertex & operator=(const GeneralVSSVertex &) = delete; private: /** * The coefficent of \f$p_2\f$ */ Complex a_; /** * The coefficent of \f$p_3\f$ */ Complex b_; }; } } #endif /* Helicity_GeneralVSSVertex_H */ diff --git a/Helicity/Vertex/Scalar/GeneralVVSVertex.h b/Helicity/Vertex/Scalar/GeneralVVSVertex.h --- a/Helicity/Vertex/Scalar/GeneralVVSVertex.h +++ b/Helicity/Vertex/Scalar/GeneralVVSVertex.h @@ -1,246 +1,246 @@ // -*- C++ -*- #ifndef HELICITY_GeneralVVSVertex_H #define HELICITY_GeneralVVSVertex_H // // This is the declaration of the GeneralVVSVertex class. // #include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "GeneralVVSVertex.fh" namespace ThePEG { namespace Helicity { using namespace ThePEG; /** * The GeneralVVSVertex class implements a * general Vector-Vector-Scalar vertex allowing for decay modes * that only enter at the one-loop level * * The loop integral is calculated by Passarino-Veltman reduction * and the coefficients are stored here. They must be calculated * in the inheriting class along with implementation of the * setCoupling member. * * The vertex takes the form * \f[ a_{00}g^{\mu\nu}p_1\cdot p_2 + a_{11}p_1^\mu p_1^\nu * + a_{12}p_1^\mu p_2^\nu + a_{21}p_2^\mu p_1^\nu * + a_{22}p_2^\mu p_2^\nu +a_e\epsilon^{p_1 \mu \nu p_2}\f] * */ class GeneralVVSVertex: public AbstractVVSVertex { public: /** * The default constructor. */ GeneralVVSVertex() : _a00(1), _a11(0), _a12(0), _a21(0), _a22(0), _aEp(0) {} /** * The standard Init function used to initialize the interfaces. * Called exactly 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 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 sca3 The wavefunction for the scalar. */ virtual Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3); /** * 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 vector. * @param sca3 The wavefunction for the scalar. * @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 ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second 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 ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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: /**@name Set and Get tensor coefficients.*/ //@{ /** * Access coefficient of \f$g^{\mu\nu}\f$ */ Complex a00() const {return _a00;} /** * Access coefficient of \f$p_1^\mu p_1^\nu\f$ */ Complex a11() const {return _a11;} /** * Access coefficient of \f$p_1^\mu p_2^\nu\f$ */ Complex a12() const {return _a12;} /** * Access coefficient of \f$p_2^\mu p_1^\nu\f$ */ Complex a21() const {return _a21;} /** * Access coefficient of \f$p_2^\mu p_2^\nu\f$ */ Complex a22() const {return _a22;} /** * Access coefficient of \f$\epsilon^{\mu\nu\alpha\beta}p_1\alpha p_2\beta\f$ */ Complex aEp() const {return _aEp;} /** * Set tensor coefficient of \f$g^{\mu\nu}\f$ */ void a00(const Complex & val) {_a00 = val;} /** * Set tensor coefficient of \f$p_1^\mu p_1^\nu\f$ */ void a11(const Complex & val) {_a11 = val;} /** * Set tensor coefficient of \f$p_1^\mu p_2^\nu\f$ */ void a12(const Complex & val) {_a12 = val;} /** * Set tensor coefficient of \f$p_2^\mu p_1^\nu\f$ */ void a21(const Complex & val) {_a21 = val;} /** * Set tensor coefficient of \f$p_2^\mu p_2^\nu\f$ */ void a22(const Complex & val) {_a22 = val;} /** * Set tensor coefficient of \f$\epsilon^{\mu\nu\alpha\beta}p_1\alpha p_2\beta\f$ */ void aEp(const Complex & val) {_aEp = val;} //@} private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - GeneralVVSVertex & operator=(const GeneralVVSVertex &); + GeneralVVSVertex & operator=(const GeneralVVSVertex &) = delete; private: /** @name Store tensor coefficients.*/ //@{ /** * Coefficient of \f$g^{\mu\nu}\f$ */ Complex _a00; /** * Coefficient of \f$p_1^\mu p_1^\nu\f$ */ Complex _a11; /** * Coefficient of \f$p_1^\mu p_2^\nu\f$ */ Complex _a12; /** * Coefficient of \f$p_2^\mu p_1^\nu\f$ */ Complex _a21; /** * Coefficient of \f$p_2^\mu p_2^\nu\f$ */ Complex _a22; /** * Coefficient of \f$\epsilon^{\mu\nu\alpha\beta}p_1\alpha p_2\beta\f$ */ Complex _aEp; //@} }; } } #endif /* HELICITY_GeneralVVSVertex_H */ diff --git a/Helicity/Vertex/Scalar/RFSVertex.h b/Helicity/Vertex/Scalar/RFSVertex.h --- a/Helicity/Vertex/Scalar/RFSVertex.h +++ b/Helicity/Vertex/Scalar/RFSVertex.h @@ -1,263 +1,263 @@ // -*- C++ -*- // // RFSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_RFSVertex_H #define ThePEG_RFSVertex_H // // This is the declaration of the RFSVertex class. #include "ThePEG/Helicity/Vertex/AbstractRFSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "RFSVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * The RFSVertex class is the implementation of the interact of a * scalar boson and a spin-3/2 fermion-antifermion pair. It inherits from the AbstractRFSVertex * class for storage of the particles interacting at the vertex and implements * the helicity calculations. * * Implementations of specific interactions should inherit from this and implement * the virtual setCoupling member. * * The form of the vertex is * \f[ic\bar{f_2}_\mu p_{1}^\mu a^\lambda P_\lambda f_1\phi_3\f] * where \f$a^\pm\f$ are the right and left couplings and \f$P_\pm=(1\pm\gamma_5)\f$ * are the chirality projection operators. * * @see AbstractRFSVertex */ class RFSVertex: public AbstractRFSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. */ Complex evaluate(Energy2 q2,const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3); /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @param sca3 The wavefunction for the scalar. */ Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param sca3 The wavefunction for the scalar. * @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 */ SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorWaveFunction & sp1, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param sca3 The wavefunction for the scalar. * @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 */ RSSpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. * @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 */ SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param sca3 The wavefunction for the scalar. * @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 */ RSSpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sp1 The wavefunction for the RS ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the RS antifermion. * @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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} /** * Get the couplings */ //@{ /** * Get the left coupling. */ Complex left() { return _left; } /** * Get the right coupling. */ Complex right() { return _right; } //@} protected: /** * Set the couplings */ //@{ /** * Set the left coupling. */ void left(Complex in) { _left = in; } /** * Set the right coupling. */ void right(Complex in) { _right = in; } //@} private: /** * Private and non-existent assignment operator. */ - RFSVertex & operator=(const RFSVertex &); + RFSVertex & operator=(const RFSVertex &) = delete; private: /** * Storage of the left coupling. */ Complex _left; /** * Storage of the right coupling. */ Complex _right; }; } } #endif /* ThePEG_RFSVertex_H */ diff --git a/Helicity/Vertex/Scalar/SSSSVertex.h b/Helicity/Vertex/Scalar/SSSSVertex.h --- a/Helicity/Vertex/Scalar/SSSSVertex.h +++ b/Helicity/Vertex/Scalar/SSSSVertex.h @@ -1,115 +1,115 @@ // -*- C++ -*- // // SSSSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_SSSSVertex_H #define ThePEG_SSSSVertex_H // // This is the declaration of the SSSSVertex class. // #include "ThePEG/Helicity/Vertex/AbstractSSSSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "SSSSVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The SSSSVertex class is the implementation of the interaction of * four scalars. It inherits from the AbstractSSSSVertex class for the storage * of the particles interacting at the vertex and implements the * helicity calculations. * * Any classes implementating the vertex should inherit from it and implement * the virtual set Coupling member. * * The form of the vertex is * \f[ic\phi_1\phi_2\phi_3\phi_4\f] * * @see AbstractSSSSVertex */ class SSSSVertex: public AbstractSSSSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); 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 sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @param sca3 The wavefunction for the third scalar. * @param sca4 The wavefunction for the fourth scalar. */ Complex evaluate(Energy2 q2, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @param sca3 The wavefunction for the third scalar. */ ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const ScalarWaveFunction & sca3); //@} /** * Set coupling methods */ //@{ /** * Dummy for a three point interaction. */ virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr) { assert(false); } /** * Calculate the couplings for a four point interaction. * 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)=0; //@} private: /** * Private and non-existent assignment operator. */ - SSSSVertex & operator=(const SSSSVertex &); + SSSSVertex & operator=(const SSSSVertex &) = delete; }; } } #endif /* ThePEG_SSSSVertex_H */ diff --git a/Helicity/Vertex/Scalar/SSSVertex.h b/Helicity/Vertex/Scalar/SSSVertex.h --- a/Helicity/Vertex/Scalar/SSSVertex.h +++ b/Helicity/Vertex/Scalar/SSSVertex.h @@ -1,117 +1,117 @@ // -*- C++ -*- // // SSSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_SSSVertex_H #define ThePEG_SSSVertex_H // // This is the declaration of the SSSVertex class. // #include "ThePEG/Helicity/Vertex/AbstractSSSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "SSSVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The SSSVertex class is the implementation of the interaction of * three scalars. It inherits from the AbstractSSSVertex class for the storage of the * particles interacting at the vertex and implements the helicity calculations. * * Any classes implementating the vertex should inherit from it and implement * the virtual set Coupling member. * * The form of the vertex is * \f[ic\phi_1\phi_2\phi_3\f] * * @see AbstractSSSVertex */ class SSSVertex: public AbstractSSSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); 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 sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @param sca3 The wavefunction for the third scalar. */ Complex evaluate(Energy2 q2,const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2,const ScalarWaveFunction & sca3); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} private: /** * Private and non-existent assignment operator. */ - SSSVertex & operator=(const SSSVertex &); + SSSVertex & operator=(const SSSVertex &) = delete; }; } } #endif /* ThePEG_SSSVertex_H */ diff --git a/Helicity/Vertex/Scalar/VSSVertex.h b/Helicity/Vertex/Scalar/VSSVertex.h --- a/Helicity/Vertex/Scalar/VSSVertex.h +++ b/Helicity/Vertex/Scalar/VSSVertex.h @@ -1,55 +1,55 @@ // -*- C++ -*- // // VSSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VSSVertex_H #define ThePEG_VSSVertex_H // // This is the declaration of the VSSVertex class. // #include "GeneralVSSVertex.h" #include "VSSVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The VSSVertex class is the implementation of the vector-scalar-scalar * vertex. It inherits from the AbstractVSSVertex class for storage of the particles * and implements the helicity calculations. * * All such vertices should inherit from this class and implement the virtual * setCoupling member * * The form of the vertex is * \f[-ic\left(p_2-p_3\right)\cdot\epsilon_1\phi_2\phi_3\f] * * @see GeneralVSSVertex */ class VSSVertex: public GeneralVSSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); private: /** * Private and non-existent assignment operator. */ - VSSVertex & operator=(const VSSVertex &); + VSSVertex & operator=(const VSSVertex &) = delete; }; } } #endif /* ThePEG_VSSVertex_H */ diff --git a/Helicity/Vertex/Scalar/VVSSVertex.h b/Helicity/Vertex/Scalar/VVSSVertex.h --- a/Helicity/Vertex/Scalar/VVSSVertex.h +++ b/Helicity/Vertex/Scalar/VVSSVertex.h @@ -1,139 +1,139 @@ // -*- C++ -*- // // VVSSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VVSSVertex_H #define ThePEG_VVSSVertex_H // // This is the declaration of the VVSSVertex class. // #include "ThePEG/Helicity/Vertex/AbstractVVSSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "VVSSVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The VVSSVertex class is the implementation of the coupling of two * vectors and two scalars. It inherits from the AbstractVVSSVertex class for the * storage of the particles and implements the helicity calculations. * * All classes implementing the vertex should inherit from it and implement the * virtual setCoupling member. * * The form of the vertex is \f[icg^{\mu\nu}\epsilon_{1\mu}\epsilon_{2\nu}\f] * * @see AbstractVVSSVertex */ class VVSSVertex: public AbstractVVSSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); 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 sca3 The wavefunction for the first scalar. * @param sca4 The wavefunction for the second scalar. */ Complex evaluate(Energy2 q2, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4); /** * 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 sca3 The wavefunction for the first scalar. * @param sca4 The wavefunction for the second scalar. * @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 */ VectorWaveFunction evaluate(Energy2 q2, int iopt,tcPDPtr out, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3, const ScalarWaveFunction & sca4, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second vector. * @param sca3 The wavefunction for the second scalar. * @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 */ ScalarWaveFunction evaluate(Energy2 q2, int iopt,tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Dummy for a three point interaction. */ virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr) { assert(false); } /** * Calculate the couplings for a four point interaction. * 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)=0; //@} private: /** * Private and non-existent assignment operator. */ - VVSSVertex & operator=(const VVSSVertex &); + VVSSVertex & operator=(const VVSSVertex &) = delete; }; } } #endif /* ThePEG_VVSSVertex_H */ diff --git a/Helicity/Vertex/Scalar/VVSVertex.h b/Helicity/Vertex/Scalar/VVSVertex.h --- a/Helicity/Vertex/Scalar/VVSVertex.h +++ b/Helicity/Vertex/Scalar/VVSVertex.h @@ -1,135 +1,135 @@ // -*- C++ -*- // // VVSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VVSVertex_H #define ThePEG_VVSVertex_H // // This is the declaration of the VVSVertex class. #include "ThePEG/Helicity/Vertex/AbstractVVSVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "VVSVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The VVSVertex class is the implementation of the vector-vector-scalar. * It inherits from the AbstractVVSVertex class for the storage of the particles and * implements the helicity calculations. * * All interactions of this type should inherit from it and implement the virtual * setCoupling member. * * The form of the vertex is * \f[icg^{\mu\nu}\epsilon_{1\mu}\epsilon_{2\nu}\f] * * @see AbstractVVSVertex */ class VVSVertex: public AbstractVVSVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); 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 sca3 The wavefunction for the scalar. */ Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3); /** * 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 vector. * @param sca3 The wavefunction for the scalar. * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const VectorWaveFunction & vec2, const ScalarWaveFunction & sca3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second 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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} private: /** * Private and non-existent assignment operator. */ - VVSVertex & operator=(const VVSVertex &); + VVSVertex & operator=(const VVSVertex &) = delete; }; } } #endif /* ThePEG_VVSVertex_H */ diff --git a/Helicity/Vertex/Scalar/VVVSVertex.h b/Helicity/Vertex/Scalar/VVVSVertex.h --- a/Helicity/Vertex/Scalar/VVVSVertex.h +++ b/Helicity/Vertex/Scalar/VVVSVertex.h @@ -1,184 +1,184 @@ // -*- C++ -*- // // VVVSVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VVVSVertex_H #define ThePEG_VVVSVertex_H // // This is the declaration of the VVVSVertex class. #include "ThePEG/Helicity/Vertex/AbstractVVVSVertex.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "VVVSVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * The VVVSVertex class is the base class for triple vector scalar vertices. * It inherits from the AbstractVVVSVertex class for the storage of the * particles allowed at the vertex. Given this vertice has dimenison * 5 the two forms possible for either a scalar or pseudoscalar particle. * * Classes which implement a specific vertex should inherit from this and * implement the virtual setCoupling member. * * The form of the vertex is * \f[ig\left[ (p_1-p_2)^\gamma g^{\alpha\beta } * +(p_2-p_3)^\alpha g^{\beta \gamma} * +(p_3-p_1)^\beta g^{\alpha\gamma} * \right]\epsilon_{1\alpha}\epsilon_{2\beta}\epsilon_{3\gamma}\f] * for a scalar particle and * \f[ig\epsilon^{\delta\alpha\beta\gamma}\epsilon_{1\alpha}\epsilon_{2\beta}\epsilon_{3\gamma} * (p_1+p_2+p_3)_\delta\f] * @see AbstractVVVSVertex */ class VVVSVertex: public AbstractVVVSVertex { public : /** * Default constructor */ VVVSVertex() : scalar_(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); //@} /** * Standard Init function used to initialize the interfaces. */ static void Init(); 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. * @param sca The wavefunction for the scalar particle */ Complex evaluate(Energy2 q2, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, const ScalarWaveFunction & sca); /** * 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 sca The wavefunction for the scalar particle * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, const ScalarWaveFunction & sca, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param vec1 The wavefunction for the first 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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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 vector. * @param part2 The ParticleData pointer for the second vector. * @param part3 The ParticleData pointer for the third vector. * @param part4 The ParticleData pointer for the scalar */ virtual void setCoupling(Energy2 q2,tcPDPtr part1, tcPDPtr part2,tcPDPtr part3, tcPDPtr part4)=0; /** * Dummy setCouplings for a three point interaction * This method is virtual and must be implemented in * classes inheriting from this. */ virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr) { assert(false); } //@} protected: /** * Set the type of the vertex */ void scalar(bool in) {scalar_=in;} private: /** * Private and non-existent assignment operator. */ - VVVSVertex & operator=(const VVVSVertex &); + VVVSVertex & operator=(const VVVSVertex &) = delete; /** * Whether or ont the vertex has a scalar or pseudoscalr particle */ bool scalar_; }; } } #endif /* ThePEG_VVVSVertex_H */ diff --git a/Helicity/Vertex/Tensor/FFTVertex.h b/Helicity/Vertex/Tensor/FFTVertex.h --- a/Helicity/Vertex/Tensor/FFTVertex.h +++ b/Helicity/Vertex/Tensor/FFTVertex.h @@ -1,157 +1,157 @@ // -*- C++ -*- // // FFTVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_FFTVertex_H #define ThePEG_FFTVertex_H // // This is the declaration of the FFTVertex class. // #include "ThePEG/Helicity/Vertex/AbstractFFTVertex.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/SpinorBarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "FFTVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The FFTVertex class is the implementation of the fermion-fermion-tensor * vertex. It inherits from the AbstractFFTVertex class for the storage of the particles * interacting at the vertex and implements the helicity amplitude calculations. * * All implementations of this vertex should inherit from it and implement the * virtual setCoupling member. * * The vertex has the form * \f[-\frac{i\kappa}8\bar{f_2}\left[ * \gamma_\mu(k_1-k_2)_\nu+\gamma_\nu(k_1-k_2)_\mu * -2g_{\mu\nu}(k\!\!\!\!\!\not\,\,\,_1-k\!\!\!\!\!\not\,\,\,_2)+4g_{\mu\nu}m_{f} * \right]f_1\epsilon^{\mu\nu}_3\f] * * @see AbstractFFTVertex */ class FFTVertex: public AbstractFFTVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param ten3 The wavefunction for the tensor. */ Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const TensorWaveFunction & ten3); /** * Evaluate the off-shell tensor 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 tensor. * @param out The ParticleData pointer for the off-shell tensor. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 */ TensorWaveFunction evaluate(Energy2 q2, int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param ten3 The wavefunction for the tensor. * @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 */ SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const TensorWaveFunction & ten3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param ten3 The wavefunction for the tensor. * @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 */ SpinorBarWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const SpinorBarWaveFunction & sbar2, const TensorWaveFunction& ten3, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} private: /** * Private and non-existent assignment operator. */ - FFTVertex & operator=(const FFTVertex &); + FFTVertex & operator=(const FFTVertex &) = delete; }; } } #endif /* ThePEG_FFTVertex_H */ diff --git a/Helicity/Vertex/Tensor/FFVTVertex.h b/Helicity/Vertex/Tensor/FFVTVertex.h --- a/Helicity/Vertex/Tensor/FFVTVertex.h +++ b/Helicity/Vertex/Tensor/FFVTVertex.h @@ -1,150 +1,150 @@ // -*- C++ -*- // // FFVTVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_FFVTVertex_H #define ThePEG_FFVTVertex_H // // This is the declaration of the FFVTVertex class. // #include "ThePEG/Helicity/Vertex/AbstractFFVTVertex.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 "FFVTVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The FFVTVertex class is the implementation of the * fermion-fermion--vector-tensor vertex. * It inherits from the AbstractFFVTVertex class for the storage of the particles * interacting at the vertex and implements the helicity amplitude calculations. * * All implementations of this vertex should inherit from it and implement the * virtual setCoupling member. * * The form of the vertex is * \f[\frac{ig\kappa}4t^a_{nm}\bar{f_2}(C_{\mu\nu,\rho\sigma}-g_{\mu\nu}g_{\rho\sigma}) * \gamma^\sigma f_1\epsilon_{3\rho}\epsilon_4^{\mu\nu}\f] * where * -\f$C_{\mu\nu,\rho\sigma}=g_{\mu\rho}g_{\nu\sigma}+g_{\mu\sigma}g_{\nu\rho} * -g_{\mu\nu}g_{\rho\sigma}\f$. * * @see AbstractFFVTVertex */ class FFVTVertex: public AbstractFFVTVertex { public: /** * Default constructor */ FFVTVertex() : left_(1.), right_(1.) {} /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. * @param ten4 The wavefunction for the tensor. */ Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, const TensorWaveFunction & ten4); //@} /** * Set coupling methods */ //@{ /** * Dummy for a three point interaction. */ virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr) { assert(false); } /** * Calculate the couplings for a four point interaction. * 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)=0; //@} /** * Left and right couplings */ //@{ /** * Get left */ Complex left() const {return left_;} /** * Set left */ void left(Complex in) {left_ = in;} /** * Get right */ Complex right() const {return right_;} /** * Set right */ void right(Complex in) {right_ = in;} //@} private: /** * Private and non-existent assignment operator. */ - FFVTVertex & operator=(const FFVTVertex &); + FFVTVertex & operator=(const FFVTVertex &) = delete; private: /** * Left coupling */ Complex left_; /** * Right coupling */ Complex right_; }; } } #endif /* ThePEG_FFVTVertex_H */ diff --git a/Helicity/Vertex/Tensor/SSTVertex.h b/Helicity/Vertex/Tensor/SSTVertex.h --- a/Helicity/Vertex/Tensor/SSTVertex.h +++ b/Helicity/Vertex/Tensor/SSTVertex.h @@ -1,140 +1,140 @@ // -*- C++ -*- // // SSTVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_SSTVertex_H #define ThePEG_SSTVertex_H // // This is the declaration of the SSTVertex class. // #include "ThePEG/Helicity/Vertex/AbstractSSTVertex.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "SSTVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The VVTVertexclass is the implementation of the * scalar-scalar-tensor vertex. * It inherits from the AbstractSSTVertex class for the storage of the particles * interacting at the vertex and implements the helicity amplitude calculations. * * All implementations of this vertex should inherit from it and implement the * virtual setCoupling member. * * The form of the vertex is * \f[ * -\frac{i\kappa}2\left[m^2_Sg_{\mu\nu}-k_{1\mu}k_{2\nu}-k_{1\nu}k_{2\mu} * +g_{\mu\nu}k_1\cdot k_2\right]\epsilon^{\mu\nu}_3\phi_1\phi_2 * * \f] * * @see AbstractSSTVertex */ class SSTVertex: public AbstractSSTVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar * @param ten3 The wavefunction for the tensor. */ Complex evaluate(Energy2 q2, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, const TensorWaveFunction & ten3); /** * Evaluate the off-shell scalar 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 scalar. * @param out The ParticleData pointer for the off-shell scalar. * @param sca1 The wavefunction for the first scalar. * @param ten3 The wavefunction for the tensor. * @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 */ ScalarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const ScalarWaveFunction & sca1, const TensorWaveFunction & ten3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell tensor 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 tensor. * @param out The ParticleData pointer for the off-shell tensor. * @param sca1 The wavefunction for the first scalar. * @param sca2 The wavefunction for the second scalar. * @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 */ TensorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const ScalarWaveFunction & sca1, const ScalarWaveFunction & sca2, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} private: /** * Private and non-existent assignment operator. */ - SSTVertex & operator=(const SSTVertex &); + SSTVertex & operator=(const SSTVertex &) = delete; }; } } #endif /* ThePEG_SSTVertex_H */ diff --git a/Helicity/Vertex/Tensor/VVTVertex.h b/Helicity/Vertex/Tensor/VVTVertex.h --- a/Helicity/Vertex/Tensor/VVTVertex.h +++ b/Helicity/Vertex/Tensor/VVTVertex.h @@ -1,149 +1,149 @@ // -*- C++ -*- // // VVTVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VVTVertex_H #define ThePEG_VVTVertex_H // // This is the declaration of the VVTVertex class. #include "ThePEG/Helicity/Vertex/AbstractVVTVertex.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "VVTVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The VVTVertex class is the implementation of the * vector-vector-tensor vertex. * It inherits from the AbstractVVTVertex class for the storage of the particles * interacting at the vertex and implements the helicity amplitude calculations. * * All implementations of this vertex should inherit from it and implement the * virtual setCoupling member. * * The vertex has the form * \f[ * \left[m^2_v+k_1\cdot k_2)C_{\mu\nu,\rho\sigma}+D_{\mu\nu,\rho\sigma}\right] * \epsilon_1^\rho\epsilon_2^\sigma \epsilon_3^{\mu\nu} * \f] * where * - \f$C_{\mu\nu,\rho\sigma}=g_{\mu\rho}g_{\nu\sigma}+g_{\mu\sigma}g_{\nu\rho} * -g_{\mu\nu}g_{\rho\sigma}\f$ * - \f$D_{\mu\nu,\rho\sigma}= * g_{\mu\nu}k_{1\sigma}k_{2\rho}-\left[g_{\mu\sigma}k_{1\nu}k_{2\rho}+g_{\mu\rho}k_{1\sigma}k_{2\nu}-g_{\rho\sigma}k_{1\mu}k_{2\nu}+(\mu\leftrightarrow\nu)\right] * \f$ * * @see AbstractVVTVertex */ class VVTVertex: public AbstractVVTVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate 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 ten3 The wavefunction for the tensor. * @param vmass The mass of the vector boson. */ Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const TensorWaveFunction & ten3, Energy vmass=-GeV); /** * Evaluate the off-shell tensor 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 tensor. * @param out The ParticleData pointer for the off-shell tensor. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second vector. * @param vmass The mass of the vector boson. * @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 */ TensorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, Energy vmass=-GeV, complex mass=-GeV, complex width=-GeV); /** * 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 vec1 The wavefunction for the first vector. * @param ten3 The wavefunction for the tensor. * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const TensorWaveFunction & ten3, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } private: /** * Private and non-existent assignment operator. */ - VVTVertex & operator=(const VVTVertex &); + VVTVertex & operator=(const VVTVertex &) = delete; }; } } #endif /* ThePEG_VVTVertex_H */ diff --git a/Helicity/Vertex/Tensor/VVVTVertex.h b/Helicity/Vertex/Tensor/VVVTVertex.h --- a/Helicity/Vertex/Tensor/VVVTVertex.h +++ b/Helicity/Vertex/Tensor/VVVTVertex.h @@ -1,155 +1,155 @@ // -*- C++ -*- // // VVVTVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VVVTVertex_H #define ThePEG_VVVTVertex_H // // This is the declaration of the VVVTVertex class. // #include "ThePEG/Helicity/Vertex/AbstractVVVTVertex.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/TensorWaveFunction.h" #include "VVVTVertex.fh" namespace ThePEG { namespace Helicity { /** \ingroup Helicity * * The VVTVertex class is the implementation of the * vector-vector-vector-tensor vertex. * It inherits from the AbstractVVVTVertex class for the storage of the particles * interacting at the vertex and implements the helicity amplitude calculations. * * All implementations of this vertex should inherit from it and implement the * virtual setCoupling member. * * The vertex has the form * \f[ * g\frac\kappa2f^{abc}\left[ * C_{\mu\nu,\rho\sigma}(k_1-k_2)_\lambda+C_{\mu\nu,\rho\lambda}(k_3-k_1)_\sigma * +C_{\mu\nu,\sigma\lambda}(k_2-k_3)_\rho+F_{\mu\nu,\rho\sigma\lambda} * \right]\epsilon_1^\rho\epsilon^\sigma_2\epsilon^\lambda_3 * \epsilon^{\mu\nu}_4 * \f] * where * -\f$C_{\mu\nu,\rho\sigma}=g_{\mu\rho}g_{\nu\sigma}+g_{\mu\sigma}g_{\nu\rho} * -g_{\mu\nu}g_{\rho\sigma}\f$ * -\f$F_{\mu\nu,\rho\sigma\lambda} = * g_{\mu\rho}g_{\sigma\lambda}(k_2-k_3)_\nu * +g_{\mu\sigma}g_{\rho\lambda}(k_3-k_1)_\nu * +g_{\mu\lambda}g_{\rho\sigma}(k_1-k_2)_\nu+(\mu\leftrightarrow\nu) * \f$ * * @see AbstractVVVTVertex */ class VVVTVertex: public AbstractVVVTVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate 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. * @param ten4 The wavefunction for the tensor. */ Complex evaluate(Energy2 q2,const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, const TensorWaveFunction & ten4); /** * Evaluate the off-shell tensor 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 tensor. * @param out The ParticleData pointer for the off-shell tensor. * @param vec1 The wavefunction for the first 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 */ TensorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); /** * 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 vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second vector. * @param ten4 The wavefunction for the tensor. * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const TensorWaveFunction & ten4, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Dummy for a three point interaction. */ virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr) { assert(false); } /** * Calculate the couplings for a four point interaction. * 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)=0; //@} private: /** * Private and non-existent assignment operator. */ - VVVTVertex & operator=(const VVVTVertex &); + VVVTVertex & operator=(const VVVTVertex &) = delete; }; } } #endif /* ThePEG_VVVTVertex_H */ diff --git a/Helicity/Vertex/Vector/FFVVertex.h b/Helicity/Vertex/Vector/FFVVertex.h --- a/Helicity/Vertex/Vector/FFVVertex.h +++ b/Helicity/Vertex/Vector/FFVVertex.h @@ -1,269 +1,269 @@ // -*- C++ -*- // // FFVVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_FFVVertex_H #define ThePEG_FFVVertex_H // // This is the declaration of the FFVVertex class. #include #include #include #include #include "FFVVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * The FFVVertex class is the base class for all helicity amplitude * vertices which use the renormalisable form for the * fermion-fermion-vector vertex. * * Any such vertices should inherit from this class and implement the virtual * setcoupling member function. The base AbstractFFVVertex class is used to store the * particles allowed to interact at the vertex. * * The form of the vertex is * \f[ic\bar{f_2}\gamma^\mu a^\lambda P_\lambda f_1\epsilon_{3\mu}\f] * * @see AbstractFFVVertex */ class FFVVertex: public AbstractFFVVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. */ virtual Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 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 SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); /** * 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 sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the 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 SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); //@} /** * Special members for off-shell fermion wavefunctions with massless * gauge bosons at small angles in the small angle limit for * numerical accuracy. In order to get sufficient accuracy it is * assumed that the fermion lies along either the positive or negative z * axis. */ //@{ /** Small angle approx for an off-shell spinor * @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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the vector. * @param fhel Helicity of the fermion * @param vhel Helicity of the vector * @param ctheta The cosine of the * polar angle of the photon with respect to the fermion * @param phi The azimuthal angle of the photon with respect to the fermion * @param stheta The sine of the * polar angle of the photon with respect to the fermion * @param includeEikonal Whether or not to include the eikonal piece * @param direction Whether fermion along + or - z direction * @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 SpinorWaveFunction evaluateSmall(Energy2 q2,int iopt, tcPDPtr out, const SpinorWaveFunction & sp1, const VectorWaveFunction & vec3, unsigned int fhel, unsigned int vhel, double ctheta, double phi, double stheta, bool includeEikonal = true, SmallAngleDirection direction = PostiveZDirection, Energy mass=-GeV, Energy width=-GeV); /** Small angle approx for an off-shell spinor * @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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. * @param fhel Helicity of the fermion * @param vhel Helicity of the vector * @param ctheta The cosine of the * polar angle of the photon with respect to the fermion * @param phi The azimuthal angle of the photon with respect to the fermion * @param stheta The sine of the * polar angle of the photon with respect to the fermion * @param includeEikonal Whether or not to include the eikonal piece * @param direction Whether fermion along + or - z direction * @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 SpinorBarWaveFunction evaluateSmall(Energy2 q2,int iopt, tcPDPtr out, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, unsigned int fhel, unsigned int vhel, double ctheta, double phi, double stheta, bool includeEikonal = true, SmallAngleDirection direction = PostiveZDirection, Energy mass=-GeV, Energy width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} /** * Get the Couplings */ //@{ /** * Get the left coupling. */ const Complex & left() const { return _left; } /** * Get the right coupling. */ const Complex & right() const { return _right; } //@} protected: /** * Set the couplings */ //@{ /** * Set the left coupling. */ void left(const Complex & in) { _left = in; } /** * Set the right coupling. */ void right(const Complex & in) { _right = in; } //@} private: /** * Private and non-existent assignment operator. */ - FFVVertex & operator=(const FFVVertex &); + FFVVertex & operator=(const FFVVertex &) = delete; private: /** * Left coupling. */ Complex _left; /** * Right coupling. */ Complex _right; }; } } #endif /* ThePEG_FFVVertex_H */ diff --git a/Helicity/Vertex/Vector/GeneralFFVVertex.h b/Helicity/Vertex/Vector/GeneralFFVVertex.h --- a/Helicity/Vertex/Vector/GeneralFFVVertex.h +++ b/Helicity/Vertex/Vector/GeneralFFVVertex.h @@ -1,225 +1,225 @@ // -*- C++ -*- // // GeneralFFVVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_GeneralFFVVertex_H #define ThePEG_GeneralFFVVertex_H // // This is the declaration of the GeneralFFVVertex class. #include #include #include #include #include "GeneralFFVVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * The GeneralFFVVertex class is the base class for all helicity amplitude * vertices which use a general form of the fermion-fermion-vector vertex. * * Any such vertices should inherit from this class and implement the virtual * setcoupling member function. The base AbstractFFVVertex class is * used to store the particles allowed to interact at the vertex. * * The form of the vertex is * \f[ic\bar{f_2}\gamma^\mu a^\lambda P_\lambda f_1\epsilon_{3\mu}\f] * * @see AbstractFFVVertex */ class GeneralFFVVertex: public AbstractFFVVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. */ Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2,const VectorWaveFunction & vec3); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 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 */ SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); /** * 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 sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the 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 */ SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} /** * Get the Couplings */ //@{ /** * Get the left coupling. */ const Complex & getLeft() { return _left; } /** * Get the right coupling. */ const Complex & getRight() { return _right; } /** * Get the left coupling for the \f$\sigma^{\mu\nu}\f$ term */ const complex getLeftSigma() { return _leftSigma; } /** * Get the right coupling for the \f$\sigma^{\mu\nu}\f$ term */ const complex getRightSigma() { return _rightSigma; } //@} protected: /** * Set the couplings */ //@{ /** * Set the left coupling. */ void setLeft(const Complex & in) { _left = in; } /** * Set the right coupling. */ void setRight(const Complex & in) { _right = in; } /** * Set the left coupling for the \f$\sigma^{\mu\nu}\f$ term */ void setLeftSigma(const complex & in) { _leftSigma = in; } /** * Set the right coupling for the \f$\sigma^{\mu\nu}\f$ term */ void setRightSigma(const complex & in) { _rightSigma = in; } //@} private: /** * Private and non-existent assignment operator. */ - GeneralFFVVertex & operator=(const GeneralFFVVertex &); + GeneralFFVVertex & operator=(const GeneralFFVVertex &) = delete; private: /** * Left \f$\gamma^\mu\f$ coupling. */ Complex _left; /** * Right \f$\gamma^\mu\f$ coupling. */ Complex _right; /** * Left \f$\sigma^{\mu\nu}\f$ coupling */ complex _leftSigma; /** * Right \f$\sigma^{\mu\nu}\f$ coupling */ complex _rightSigma; }; } } #endif /* ThePEG_GeneralFFVVertex_H */ diff --git a/Helicity/Vertex/Vector/RFVVertex.h b/Helicity/Vertex/Vector/RFVVertex.h --- a/Helicity/Vertex/Vector/RFVVertex.h +++ b/Helicity/Vertex/Vector/RFVVertex.h @@ -1,264 +1,264 @@ // -*- C++ -*- // // RFVVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_RFVVertex_H #define ThePEG_RFVVertex_H // // This is the declaration of the RFVVertex class. #include #include #include #include #include "RFVVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * The RFVVertex class is the base class for all helicity amplitude * vertices which use the renormalisable form for the * spin-3/2 fermion-fermion-vector vertex. * * Any such vertices should inherit from this class and implement the virtual * setcoupling member function. The base AbstractRFVVertex class is used to store the * particles allowed to interact at the vertex. * * The form of the vertex is * \f[ic\bar{f_2}_\mu \left[ g^{\mu\nu} a^{1\lambda} P_\lambda * +\gamma^\nu p_{1}^\mu a^{2\lambda} P_\lambda * +p_{1}^\mu p_{2}^\nu a^{3\lambda} P_\lambda * \right]f_1\epsilon_{3\nu}\f] * * @see AbstractRFVVertex */ class RFVVertex: public AbstractRFVVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Members to calculate the helicity amplitude expressions for vertices * and off-shell particles. */ //@{ /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. */ Complex evaluate(Energy2 q2,const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3); /** * Evalulate the vertex. * @param q2 The scale \f$q^2\f$ for the coupling at the vertex. * @param sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the vector. */ Complex evaluate(Energy2 q2,const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 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 */ SpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell barred spinor 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 barred spinor. * @param out The ParticleData pointer for the off-shell barred spinor. * @param sbar2 The wavefunction for the antifermion. * @param vec3 The wavefunction for the 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 */ RSSpinorBarWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorBarWaveFunction & sbar2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); /** * 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 sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorWaveFunction & sp1, const SpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); /** * 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 sp1 The wavefunction for the ferimon. * @param sbar2 The wavefunction for the antifermion. * @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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const RSSpinorBarWaveFunction & sbar2, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the 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 */ RSSpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const SpinorWaveFunction & sp1, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); /** * Evaluate the off-shell spinor 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 spinor. * @param out The ParticleData pointer for the off-shell spinor. * @param sp1 The wavefunction for the ferimon. * @param vec3 The wavefunction for the 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 */ SpinorWaveFunction evaluate(Energy2 q2,int iopt,tcPDPtr out, const RSSpinorWaveFunction & sp1, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} /** * Get the Couplings */ //@{ /** * Get the left coupling. */ const vector & left() const { return _left; } /** * Get the right coupling. */ const vector & right() const { return _right; } //@} protected: /** * Set the couplings */ //@{ /** * Set the left coupling. */ void left(const vector & in) { _left = in; } /** * Set the right coupling. */ void right(const vector & in) { _right = in; } //@} private: /** * Private and non-existent assignment operator. */ - RFVVertex & operator=(const RFVVertex &); + RFVVertex & operator=(const RFVVertex &) = delete; private: /** * Left coupling. */ vector _left; /** * Right coupling. */ vector _right; }; } } #endif /* ThePEG_RFVVertex_H */ diff --git a/Helicity/Vertex/Vector/VVVVVertex.h b/Helicity/Vertex/Vector/VVVVVertex.h --- a/Helicity/Vertex/Vector/VVVVVertex.h +++ b/Helicity/Vertex/Vector/VVVVVertex.h @@ -1,169 +1,169 @@ // -*- C++ -*- // // VVVVVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VVVVVertex_H #define ThePEG_VVVVVertex_H // // This is the declaration of the VVVVVertex class. #include "ThePEG/Helicity/Vertex/AbstractVVVVVertex.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "VVVVVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * This is the implementation of the four vector vertex. * It is based on the AbstractVVVVVertex class for the storage of particles * which are allowed to interact at the vertex. * Classes implementation a specific vertex should inherit from this * one and implement the virtual setCoupling member. * * The form of the vertex is * \f[ic^2\left[ * 2\epsilon_1\cdot\epsilon_2\epsilon_3\cdot\epsilon_4- * \epsilon_1\cdot\epsilon_3\epsilon_2\cdot\epsilon_4- * \epsilon_1\cdot\epsilon_4\epsilon_2\cdot\epsilon_3 * \right]\f] * optional the additional diagrams from the three point vertices can be included. * * @see AbstractVVVVVertex */ class VVVVVertex: public AbstractVVVVVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); 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 iopt Evaluation option, 0 just evaluate the four point vertex, 1 * include all the three point diagrams as well. * @param vec1 The wavefunction for the first vector. * @param vec2 The wavefunction for the second vector. * @param vec3 The wavefunction for the third vector. * @param vec4 The wavefunction for the fourth vector. */ Complex evaluate(Energy2 q2, int iopt, const VectorWaveFunction & vec1, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, const VectorWaveFunction & vec4); //@} /** * Set coupling methods */ //@{ /** * Dummy for a three point interaction. */ virtual void setCoupling(Energy2,tcPDPtr,tcPDPtr,tcPDPtr) { assert(false); } /** * Calculate the couplings for a four point interaction. * 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)=0; //@} protected: /** * Set the order of the particles. * @param id1 The PDG code of the first particle. * @param id2 The PDG code of the second particle. * @param id3 The PDG code of the third particle. * @param id4 The PDG code of the fourth particle. */ void setOrder(int id1,int id2,int id3,int id4) { _iorder[0]=id1; _iorder[1]=id2; _iorder[2]=id3; _iorder[3]=id4; } /** * Set the type of the vertex. * @param itype The type of vertex (QCD=1 or electroweak=2). */ void setType(int itype) { _itype=itype; } /** * Set the intermediate particles if including s/u/t channel terms. * @param part1 The ParticleData pointer for the first particle. * @param part2 The ParticleData pointer for the second particle. * @param c1 The coupling for the first particle. * @param c2 The coupling for the second particle. */ void setIntermediate(tcPDPtr part1,tcPDPtr part2,Complex c1,Complex c2) { _inter[0]=part1; _inter[1]=part2; _coup[0]=c1; _coup[1]=c2; } private: /** * Private and non-existent assignment operator. */ - VVVVVertex & operator=(const VVVVVertex &); + VVVVVertex & operator=(const VVVVVertex &) = delete; private: /** * Type of vertex 1=QCD 2=EW. */ int _itype; /** * Order of the particles. */ array _iorder; /** * Intermediate particles */ array _inter; /** * Couplings of the intermediate particles. */ array _coup; }; } } namespace ThePEG { } #endif /* ThePEG_VVVVVertex_H */ diff --git a/Helicity/Vertex/Vector/VVVVertex.h b/Helicity/Vertex/Vector/VVVVertex.h --- a/Helicity/Vertex/Vector/VVVVertex.h +++ b/Helicity/Vertex/Vector/VVVVertex.h @@ -1,121 +1,121 @@ // -*- C++ -*- // // VVVVertex.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VVVVertex_H #define ThePEG_VVVVertex_H // // This is the declaration of the VVVVertex class. #include "ThePEG/Helicity/Vertex/AbstractVVVVertex.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "VVVVertex.fh" namespace ThePEG { namespace Helicity{ /** \ingroup Helicity * * The VVVVertex class is the base class for triple vector vertices * using the perturbative form. * It inherits from the AbstractVVVVertex class for the storage of the * particles allowed at the vertex. * * Classes which implement a specific vertex should inherit from this and * implement the virtual setCoupling member. * * The form of the vertex is * \f[ig\left[ (p_1-p_2)^\gamma g^{\alpha\beta } * +(p_2-p_3)^\alpha g^{\beta \gamma} * +(p_3-p_1)^\beta g^{\alpha\gamma} * \right]\epsilon_{1\alpha}\epsilon_{2\beta}\epsilon_{3\gamma}\f] * * @see AbstractVVVVertex */ class VVVVertex: public AbstractVVVVertex { public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); 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. */ 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 */ VectorWaveFunction evaluate(Energy2 q2,int iopt, tcPDPtr out, const VectorWaveFunction & vec2, const VectorWaveFunction & vec3, complex mass=-GeV, complex width=-GeV); //@} /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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); } //@} private: /** * Private and non-existent assignment operator. */ - VVVVertex & operator=(const VVVVertex &); + VVVVertex & operator=(const VVVVertex &) = delete; }; } } #endif /* ThePEG_VVVVertex_H */ diff --git a/Helicity/Vertex/VertexBase.h b/Helicity/Vertex/VertexBase.h --- a/Helicity/Vertex/VertexBase.h +++ b/Helicity/Vertex/VertexBase.h @@ -1,602 +1,602 @@ // -*- C++ -*- // // VertexBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2003-2017 Peter Richardson, 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_VertexBase_H #define ThePEG_VertexBase_H // // This is the declaration of the VertexBase class. #include #include #include #include #include "ThePEG/StandardModel/StandardModelBase.h" #include "VertexBase.fh" #include namespace ThePEG { namespace Helicity { /** * Namespace for naming of vertices. Each child class should extend this * with its own spin configuration. */ namespace VertexType { typedef unsigned T; /** * Undefined Enum for the Lorentz structures */ const T UNDEFINED = 0; } /** * Namespace for naming types of colour structures to allow models to define new type */ namespace ColourStructure { typedef unsigned T; const T UNDEFINED = 0; const T SINGLET = 1; const T SU3TFUND = 2; const T SU3F = 3; const T SU3T6 = 4; const T SU3K6 = 5; const T EPS = 6; const T DELTA = 7; const T SU3FF = 8; const T SU3TTFUNDS = 9; const T SU3TTFUNDD = 10; const T SU3TT6 = 11; const T SU3I12I34 = 12; const T SU3I14I23 = 13; const T SU3T21T43 = 14; const T SU3T23T41 = 15; } /** * Namespace for naming types of couplings to allow models to define new type */ namespace CouplingType { typedef unsigned T; const T UNDEFINED = 0; const T QED = 1; const T QCD = 2; } /** \ingroup Helicity * * The VertexBase class is the base class for all helicity amplitude * vertices. In implements the storage of the particles * which are allowed to interact at the vertex and some simple functions * which are often needed by the classes which implement the specific * vertices. * * In practice little use is made of this information and it is mainly * included for future extensions. It can also be used at the development * and debugging stage. * */ class VertexBase : public Interfaced { /** * The output operator is a friend to avoid the data being public. */ friend ostream & operator<<(ostream &, const VertexBase &); public: /** @name Standard constructors and destructors. */ //@{ /** * Constructor for \f$n\f$-point vertices. * @param name The type of vertex * @param kine Whether the kinematic invariants should be calculated. */ VertexBase(VertexType::T name, bool kine=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); //@} /** * Standard Init function used to initialize the interfaces. */ static void Init(); public: /** * Access to the particle information */ //@{ /** * Number of different particle combinations allowed. */ unsigned int size() const { return _particles.size(); } public: /** * Is a particle allowed as an incoming particle? * @param p The ParticleData pointer */ bool isIncoming(tPDPtr p) const { return _inpart.find(p) != _inpart.end(); } /** * Is a particle allowed as an outgoing particle? * @param p The ParticleData pointer */ bool isOutgoing(tPDPtr p) const { return _outpart.find(p) != _outpart.end(); } /** * Get the list of incoming particles. */ const set & incoming() const { return _inpart; } /** * Get the list of outgoing particles. */ const set & outgoing() const { return _outpart; } /** * Get the coupling. */ Complex norm() const { return _norm; } /** * Function to search the list. * @param ilist Which list to search * @param id The PDG code to look for. */ vector search(unsigned int ilist,long id) const; /** * Function to search the list. * @param ilist Which list to search * @param id The particle to look for. */ vector search(unsigned int ilist,tcPDPtr id) const; /** * Is a given combination allowed. * @param id1 PDG code of the first particle. * @param id2 PDG code of the second particle. * @param id3 PDG code of the third particle. * @param id4 PDG code of the fourth particle. */ bool allowed(long id1, long id2, long id3, long id4 = 0) const; /** * Get name of Vertex */ VertexType::T getName() const { return _theName; } /** * Get number of lines on Vertex */ unsigned int getNpoint() const { return _npoint; } /** * Get the order in \f$g_EM\f$ */ int orderInGem() const { return couplingOrders_.at(CouplingType::QED); } /** * Get the order in \f$g_s\f$ */ int orderInGs() const { return couplingOrders_.at(CouplingType::QCD); } /** * Get the order in a specific coupling */ int orderInCoupling(CouplingType::T cType) const { if(couplingOrders_.find(cType) !=couplingOrders_.end()) return couplingOrders_.at(cType); else return 0; } /** * Get the total order of the vertex */ int orderInAllCouplings() const { int output(0); for(auto & p : couplingOrders_) output += p.second; return output; } /** * Get the colour structure */ ColourStructure::T colourStructure() const {return colourStructure_;} //@} public: /** * @name Calculation of the strong, electromagnetic and weak couplings */ //@{ /** * Strong coupling */ double strongCoupling(Energy2 q2) const { if(_coupopt==0) { double val = 4.0*Constants::pi*generator()->standardModel()->alphaS(q2); assert(val>=0.); return sqrt(val); } else if(_coupopt==1) return sqrt(4.0*Constants::pi*generator()->standardModel()->alphaS()); else return _gs; } /** * Electromagnetic coupling */ double electroMagneticCoupling(Energy2 q2) const { if(_coupopt==0) return sqrt(4.0*Constants::pi*generator()->standardModel()->alphaEMME(q2)); else if(_coupopt==1) return sqrt(4.0*Constants::pi*generator()->standardModel()->alphaEMMZ()); else return _ee; } /** * Weak coupling */ double weakCoupling(Energy2 q2) const { if( _coupopt == 0 ) return sqrt(4.0*Constants::pi*generator()->standardModel()->alphaEMME(q2)/ generator()->standardModel()->sin2ThetaW()); else if( _coupopt == 1 ) return sqrt(4.0*Constants::pi*generator()->standardModel()->alphaEMMZ()/ generator()->standardModel()->sin2ThetaW()); else return _ee/_sw; } double sin2ThetaW() const { if( _coupopt == 0 || _coupopt == 1) return generator()->standardModel()->sin2ThetaW(); else return sqr(_sw); } //@} public: /** * Set coupling methods */ //@{ /** * Calculate the couplings for a three point interaction. * 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; /** * Calculate the couplings for a four point interaction. * 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)=0; //@} 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: /** * Members to set-up the particles */ //@{ /** * Set up the lists of outer particles for the vertex. * @param ids A vector of PDG codes for the particles. */ void addToList(const vector & ids); /** * Set up the lists of outer particles for the three-/four-point vertex. * For small vertices, this form is much easier to use. * @param ida The PDG codes for the first set of particles. * @param idb The PDG codes for the second set of particles. * @param idc The PDG codes for the third set of particles. * @param idd The PDG codes for the fourth set of particles. */ void addToList(long ida, long idb, long idc, long idd = 0); //@} protected: /** * Members for the amplitude calculations */ //@{ /** * Set the coupling. * @param coup The coupling. */ void norm(const Complex & coup) { _norm = coup; } /** * 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, complex mass=-GeV, complex width=-GeV); /** * Calculate propagator multiplied by coupling. * @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 */ Complex normPropagator(int iopt, Energy2 q2,tcPDPtr part, complex mass=-GeV, complex width=-GeV) { return _norm*propagator(iopt,q2,part,mass,width); } //@} public: /** @name Kinematic invariants for loop diagrams */ //@{ /** * Whether or not to calculate the kinematics invariants */ bool kinematics() const { return _calckinematics; } /** * Set whether or not to calculate the kinematics invariants */ void kinematics(bool kine ) { _calckinematics=kine; } /** * Calculate the kinematics for a 3-point vertex */ void calculateKinematics(const Lorentz5Momentum & p0, const Lorentz5Momentum & p1, const Lorentz5Momentum & p2) { _kine[0][0]=p0*p0; _kine[1][1]=p1*p1; _kine[2][2]=p2*p2; _kine[0][1]=p0*p1;_kine[1][0]=_kine[0][1]; _kine[0][2]=p0*p2;_kine[2][0]=_kine[0][2]; _kine[1][2]=p1*p2;_kine[2][1]=_kine[1][2]; } /** * Calculate the kinematics for a 4-point vertex */ void calculateKinematics(const Lorentz5Momentum & p0, const Lorentz5Momentum & p1, const Lorentz5Momentum & p2, const Lorentz5Momentum & p3) { _kine[0][0]=p0*p0; _kine[1][1]=p1*p1; _kine[2][2]=p2*p2; _kine[3][3]=p3*p3; _kine[0][1]=p0*p1;_kine[1][0]=_kine[0][1]; _kine[0][2]=p0*p2;_kine[2][0]=_kine[0][2]; _kine[0][3]=p0*p3;_kine[3][0]=_kine[0][3]; _kine[1][2]=p1*p2;_kine[2][1]=_kine[1][2]; _kine[1][3]=p1*p3;_kine[3][1]=_kine[1][3]; _kine[2][3]=p2*p3;_kine[3][2]=_kine[2][3]; } /** * Calculate the kinematics for a n-point vertex */ void calculateKinematics(const vector & p) { for(size_t ix=0;ix > _particles; /** * Number of particles at the vertex */ unsigned int _npoint; /** * ParticleData pointers for the allowed incoming particles. */ set _inpart; /** * ParticleData pointers for the allowed outgoing particles. */ set _outpart; //@} /** * The overall coupling. */ Complex _norm; /** * Whether or not to calculate the kinematic invariants for the vertex */ bool _calckinematics; /** * Kinematica quantities needed for loop vertices */ std::array,5> _kine; /** * Name of vertex */ VertexType::T _theName; /** * Colour structure of the vertex */ ColourStructure::T colourStructure_; /** * The order of the vertex in specific couplings */ map couplingOrders_; /** * option for the coupling */ unsigned int _coupopt; /** * Fixed value of strong coupling to use */ double _gs; /** * Fixed value of the electromagentic coupling to use */ double _ee; /** * Fixed value of \f$\sin\theta_W\f$ to use */ double _sw; }; /** * Output the information on the vertex. */ ostream & operator<<(ostream &, const VertexBase &); } } #endif /* ThePEG_VertexBase_H */ diff --git a/Interface/ClassDocumentation.h b/Interface/ClassDocumentation.h --- a/Interface/ClassDocumentation.h +++ b/Interface/ClassDocumentation.h @@ -1,200 +1,200 @@ // -*- C++ -*- // // ClassDocumentation.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ClassDocumentation_H #define ThePEG_ClassDocumentation_H // This is the declaration of the ClassDocumentation class. #include "ThePEG/Config/ThePEG.h" #include "ClassDocumentation.fh" namespace ThePEG { /** * The ClassDocumentationBase class is used to communicate * documetation about an Interfaced class to the Repository. * Similarly to classes inheriting from InterfaceBase, only one static * object of the templated ClassDocumentation, which inherits from * ClassDocumentationBase, should be created for each Interfaced * class. This object will then automatically register itself with the * static Repository. * * The ClassDocumentationBase contains three strings with information * which are all specified in the constructor: * * The documentation contains a brief description of the * corresponding class which can be displayed by the Repository (or * user interfaces derived from it). * * The model description contains a very brief description of * the model of the process implemented in the step handler, given in * the form of a LaTeX \\item. This is written to a file after a run * by an EventGenerator. * * The model references contains possible LaTeX \\bibitems * corresponding to \\cite commands in the model * description. This is also written to a file after a run by an * EventGenerator. * * @see Interfaced * @see Repository * */ class ClassDocumentationBase { protected: /** * The standard constructor can only be used from subclasses. * @param newDocumentation the documentation for the * corresponding class. * @param newModelDescription the model description for the * corresponding class. * @param newModelReferences the model references of the * corresponding class.. * @param newTypeInfo the type_info object of the corresponding * class. */ ClassDocumentationBase(string newDocumentation, string newModelDescription, string newModelReferences, const type_info & newTypeInfo); public: /** * The destructor. */ virtual ~ClassDocumentationBase() {} public: /** * Return the brief documentation of the corresponding class. */ string documentation() const { return theDocumentation; } /** * Return the model description of the corresponding class. */ string modelDescription() const { return theModelDescription; } /** * Return the model references of the corresponding class. */ string modelReferences() const { return theModelReferences; } private: /** * The brief documentation of the corresponding class. */ string theDocumentation; /** * The model description of the corresponding class. */ string theModelDescription; /** * The model references of the corresponding class. */ string theModelReferences; private: /** * Private and unimplemented default constructor. */ ClassDocumentationBase(); /** * Private and unimplemented copy constructor. */ ClassDocumentationBase(const ClassDocumentationBase &); /** * Private and unimplemented assignment operator. */ - ClassDocumentationBase & operator=(const ClassDocumentationBase &); + ClassDocumentationBase & operator=(const ClassDocumentationBase &) = delete; }; /** * The ClassDocumentation class is used to communicate * documetation about an Interfaced class to the Repository. * Similarly to classes inheriting from InterfaceBase, only one static * object of the templated ClassDocumentation, which inherits from * ClassDocumentationBase, should be created for each Interfaced * class. This object will then automatically register itself with * the static Repository. * * The ClassDocumentation should in the constructor specify three * strings with information: * * The documentation contains a brief description of the * corresponding class which can be displayed by the Repository (or * user interfaces derived from it). * * The model description contains a very brief description of * the model of the process implemented in the step handler, given in * the form of a LaTeX \\item. This is written to a file after a run * by an EventGenerator. * * The model references contains possible LaTeX \\bibitems * corresponding to \\cite commands in the model * description. This is also written to a file after a run by an * EventGenerator. * * @see Interfaced * @see Repository * */ template class ClassDocumentation: public ClassDocumentationBase { public: /** * The standard constructor. All other constructors are private. * @param newDocumentation the documentation for the * corresponding class. * @param newModelDescription the model description for the * corresponding class. * @param newModelReferences the model references of the * corresponding class.. */ ClassDocumentation(string newDocumentation, string newModelDescription = "", string newModelReferences = "") : ClassDocumentationBase(newDocumentation, newModelDescription, newModelReferences, typeid(T)) {} private: /** * Private and unimplemented default constructor. */ ClassDocumentation(); /** * Private and unimplemented copy constructor. */ ClassDocumentation(const ClassDocumentation &); /** * Private and unimplemented assignment operator. */ - ClassDocumentation & operator=(const ClassDocumentation &); + ClassDocumentation & operator=(const ClassDocumentation &) = delete; }; } #endif /* ThePEG_ClassDocumentation_H */ diff --git a/Interface/Interfaced.h b/Interface/Interfaced.h --- a/Interface/Interfaced.h +++ b/Interface/Interfaced.h @@ -1,252 +1,252 @@ // -*- C++ -*- // // Interfaced.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Interfaced_H #define ThePEG_Interfaced_H // This is the declaration of the Interfaced class. #include "ThePEG/Config/ThePEG.h" #include "InterfacedBase.h" #include "ThePEG/PDT/PID.h" namespace ThePEG { /** * The Interfaced class is derived from the InterfacedBase class * adding a couple of things particular to ThePEG, in an attempt to * keep the InterfacedBase class as generic as possible. * * The main addition is that the Interfaced class has a pointer to an * EventGenerator object. During the run-phase this points to the * EventGenerator controlling the run in which the Interfaced object * is used. Through this EventGenerator there is quick access to * eg. the set of ParticleData objects used, and the default * RandomGenerator for the run. Note that no EventGenerator object is * available to the Interfaced object during the setup * phase. * * @see InterfacedBase * @see EventGenerator * @see ParticleData * @see RandomGenerator */ class Interfaced: public InterfacedBase { /** Repository is a friend. */ friend class Repository; /** EventGenerator is a friend. */ friend class EventGenerator; public: /** * Empty virtual destructor */ virtual ~Interfaced(); /** * Functions which are to be used during the actual event * generation, after the setup is complete. */ public: /** * A sub class can implement this function to implement some default * initialization for this object during the setup phase. A typical * example is if this object need some references to other objects * and if these can be easily created. In this case the objects can * be added to the repository in a sub-directory with the same name * as this object. * @return false if the initialization failed. */ virtual bool defaultInit(); /** @name Functions used during the actual event generation, after the setup is complete. */ //@{ /** * Create a new Particle instance given a id number. */ PPtr getParticle(PID) const; /** * Return a pointer to the ParticleData object corresponding to the * given id number. */ PDPtr getParticleData(PID) const; /** * Returns true if this object has actally been used. */ bool used() const { return theUseFlag; } /** * Should be called to indicate that this object has actually been * used. */ void useMe() const { if ( !used() ) setUsed(); } /** * Return a pointer to the EventGenerator controlling the run. * During the setup phase this returns a null pointer. */ tEGPtr generator() const { return theGenerator; } //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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. */ static void Init(); protected: /** * Register an Interfaced object with the Repository. */ static void registerRepository(IBPtr); /** * Register an Interfaced object with the Repository, giving it a * name. */ static void registerRepository(IBPtr, string newName); /** * Register the given \a object in the Repository with the given \a * name in a subdirectory with the same name as this object. If an * object with that name already exists it will be removed unless * there are other objects referring to it, in which case it will be * renamed. */ void reporeg(IBPtr object, string name) const; /** * If the pointer, \a ptr, to an object is not set, create an object * of class \a classname and register it with the Repository with * the given \a objectname in a sib-directory with the same name as * this object. */ template bool setDefaultReference(PtrT & ptr, string classname, string objectname) { if ( ptr ) return true; const ClassDescriptionBase * db = DescriptionList::find(classname); if ( !db ) return false; ptr = dynamic_ptr_cast(db->create()); if ( !ptr ) return false; reporeg(ptr, objectname); if ( !ptr->defaultInit() ) return false; return true; } /** * Protected default constructor. */ Interfaced() : theUseFlag(false) {} /** * Protected constructor taking a name as argument. */ Interfaced(const string & newName) : InterfacedBase(newName), theUseFlag(false) {} /** * Protected copy-constructor. */ Interfaced(const Interfaced & i) : InterfacedBase(i), theGenerator(i.theGenerator), theUseFlag(false) {} protected: /** * Protected function to reset the generator pointer, required * for automatic decayer generation in Herwig++ BSM models */ void setGenerator(tEGPtr generator) { theGenerator=generator; } private: /** * Used internally by 'useMe' */ void setUsed() const; /** * A pointer to the EventGenerator controlling the run. */ tEGPtr theGenerator; /** * Flag to tell whether this object has been used or not. */ mutable bool theUseFlag; /** * Command interface function which calls defaultInit(). */ string doDefaultInit(string); private: /** * Standard Initialization object. */ static AbstractClassDescription initInterfaced; /** * Private and non-existent assignment operator. */ - Interfaced & operator=(const Interfaced &); + Interfaced & operator=(const Interfaced &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of Interfaced. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of Interfaced. */ typedef InterfacedBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * Interfaced class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::Interfaced"; } }; /** @endcond */ } #endif /* ThePEG_Interfaced_H */ diff --git a/Interface/InterfacedBase.h b/Interface/InterfacedBase.h --- a/Interface/InterfacedBase.h +++ b/Interface/InterfacedBase.h @@ -1,512 +1,512 @@ // -*- C++ -*- // // InterfacedBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_InterfacedBase_H #define ThePEG_InterfacedBase_H // This is the declaration of the InterfacedBase class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Utilities/Named.h" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/Utilities/HoldFlag.h" #include "InterfacedBase.xh" namespace ThePEG { /** * InterfacedBase is the base class of all Interfaced objects to be * handled by the BaseRepository class. InterfacedBase * objects can be manipulated through objects of the InterfaceBase * class dealing with setting parameters, switches and pointers to * other InterfacedBase objects. * * The InterfacedBase has a number of virtual methods to be * implemented by sub classes for checking the state of the object, * initializing the object etc. * * The InterfacedBase is derived from the PersistentBase class to * allow for persistent I/O, and from the Named for handling the name * of the object. The full name of the object is of the form * /dir/subdir/name analogous to the file name in a Unix * file system. * * It is possible to lock an InterfacedBase object in which case the * BaseRepository will not do anything that will change the state of * this object. * * @see BaseRepository * @see InterfaceBase */ class InterfacedBase: public PersistentBase, public Named { /** The BaseRepository is a close friend. */ friend class BaseRepository; /** The InterfaceBase is a close friend. */ friend class InterfaceBase; /** The EventGenerator is a friend. */ friend class EventGenerator; public: /** * Enumeration reflecting the state of an InterfacedBase object. */ enum InitState { initializing = -1, /**< The object is currently being initialized. I.e. either of update(), init(), initrun() or finish() are being run. */ uninitialized = 0, /**< The object has not been initialized. */ initialized = 1, /**< The object has been initialized. */ runready = 2 /**< The object is initialized and the initrun() method has been called. */ }; public: /** * The virtual (empty) destructor; */ virtual ~InterfacedBase(); /** * Returns the full name of this object including its path, e.g. * /directory/subdirectory/name. */ string fullName() const { return Named::name(); } /** * Returns the name of this object, without the path. */ string name() const { return Named::name().substr(Named::name().rfind('/')+1); } /** * Returns the path to this object including the trailing * '/'. fullName() = path() + name(). */ string path() const { string::size_type slash = Named::name().rfind('/'); string ret; if ( slash != string::npos ) ret = Named::name().substr(0,slash); return ret; } /** * Returns a comment assigned to this object. */ string comment() const { return theComment; } /** * Read setup info from a standard istream \a is. May be called by * the Repository to initialize an object. This function first calls * the virtual readSetup() function to allow the sub classes the * part \a is to initialize themselves. What ever is left in \a is * after that will be assigned to the comment() of the object. */ void setup(istream & is) { readSetup(is); getline(is, theComment); } protected: /** @name Standard InterfacedBase virtual functions. */ //@{ /** * Read setup info from a standard istream \a is. May be called by * the Repository to initialize an object. This function is called * by the non virtual setup() function. A sub-class implementing it * should first call the base class version before parsing the \a * is. If the \a is is not empty after readSetup is called the * remaining string will be assigned to the comment() of the object. */ virtual void readSetup(istream & is); /** * Check sanity of the object during the setup phase. This function * is called everytime the object is changed through an interface * during the setup phase. Also if the setup is changed for an * object on which this is dependent. Note that the generator() is * not available when this method is called. * * This method may be called by the user interface during the setup phase * through the update() method after manipulating objects to check * the sanity of the object. When implemented by a sub class it is * important that the doupdate() method of the base class is called, * then if the sanity of this object depend on other objects, the * update() method of these should be called. Then if touched() is * true for this object or for the ones on which this depends, it is * an indication that some things have changed since last time * doupdate() was called, and the actual checking of the state of * this object is called for. To avoid circular loops, it is * important that the doupdate() method is called for the base * class, while the update() method is called for other objects. * @throws UpdateException if the setup is such that the object * would not work properly. */ virtual void doupdate() {} /** * Initialize this object after the setup phase before saving an * EventGenerator to disk. Nothing should have changed since the * last update() call. * * This method is called after the setup * phase through the init() method to indicate that the setup of a * run is finished. This is typpically done in a setup program * before this object has been saved to a run file. It must * therefore be made sure that the state of this object after this * method has been executed will not be changed if it is written to * a file and read in again. When implemented by a sub class it is * important that the doinit() method of the base class is called * first and then, if the initialization of this object depends on * other objects, that the init() method of these objects are * called. Only then should the class-local initialization * proceed. To avoid circular loops, it is important that the * doinit() method is called for the base class, while the init() * method is called for other objects. * @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. * * This method is called just before * running starts through the initrun() method to indicate that the * actual running is to start. When implemented by a sub class it is * important that the doinitrun() method of the base class is called * first and then, if the initialization of this object depends on * other objects, that the initrun() method of these objects are * called. Only then should the class-local initialization * proceed. To avoid circular loops, it is important that the * doinitrun() method is called for the base class, while the * initrun() method is called for other objects. */ virtual void doinitrun() {} /** * Finalize this object. Called in the run phase just after a * run has ended. Used eg. to write out statistics. * * This method is called after the running * phase through the finish() and can eg. be used to write out * statistics. When implemented by a sub class it is important that * the dofinish() method of the base class is called while the * finish() methd is called for other objects. */ virtual void dofinish() {} /** * Return a vector of all pointers to Interfaced objects used in this * object. * @return a vector of pointers. */ virtual IVector getReferences() { return IVector(); } /** * 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. * @throws RebindException if no cloned object was found for a given * pointer. */ virtual void rebind(const TranslationMap &) {} //@} public: /** @name Inlined access function. */ //@{ /** * Calls the doupdate() function with recursion prevention. */ void update() { if ( initState ) return; HoldFlag hold(initState, initializing, initialized); doupdate(); } /** * Calls the doinit() function with recursion prevention. */ void init() { if ( initState ) return; HoldFlag hold(initState, initializing, initialized); doinit(); } /** * 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; /** * Calls the doinitrun() function with recursion prevention. */ void initrun() { if ( initState == runready || initState == initializing ) return; HoldFlag hold(initState, initializing, runready); doinitrun(); } /** * Calls the dofinish() function with recursion prevention. */ void finish() { if ( initState == uninitialized || initState == initializing ) return; HoldFlag hold(initState, initializing, uninitialized); dofinish(); } /** * This function should be called every time something in this * object has changed in a way that a sanity check with update() is * needed */ void touch() { isTouched = true; } /** * Set the state of this object to uninitialized. */ void reset() { initState = uninitialized; } /** * Calls reset() and unTouch(). */ void clear() { reset(); untouch(); } /** * Return the state of initialization of this object. */ InitState state() const { return initState; } /** * Return true if the BaseRepository is not allowed to change the * state of this object. */ bool locked() const { return isLocked; } /** * Return true if the state of this object has been changed since * the last call to update(). */ bool touched() const { return isTouched; } //@} /** * Return a full clone of this object possibly doing things to the * clone to make it sane. */ virtual IBPtr fullclone() const { return clone(); } /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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. */ static void Init(); protected: /** * Return a simple clone of this object. Should be implemented as * return new_ptr(*this); by a derived class. */ virtual IBPtr clone() const = 0; /** * Protected default constructor. */ InterfacedBase() : Named(""), isLocked(false), isTouched(true), initState(uninitialized) {} /** * Protected constructor with the name given as argument. */ InterfacedBase(string newName) : Named(newName), isLocked(false), isTouched(true), initState(uninitialized) {} /** * Protected copy-constructor. */ InterfacedBase(const InterfacedBase & i) : Base(i), Named(i), isLocked(false), isTouched(true), initState(uninitialized), theComment(i.theComment), objectDefaults(i.objectDefaults) {} private: /** * Set a new name (full name including path). */ void name(string newName) { Named::name(newName); } /** * Lock this object. */ void lock() { isLocked = true; } /** * Unlock this object. */ void unlock() { isLocked = false; } /** * Clear the isTouched flag. */ void untouch() { isTouched = false; } private: /** * Used by the interface to add comments. */ string addComment(string); private: /** * True if this object is not to be changed by the user interface. */ bool isLocked; /** * True if this object has been chaged since the last call to * update(). */ bool isTouched; /** * Indicate if this object has been initialized or not, or if it is * being initialized. */ InitState initState; /** * A comment assigned to this object. */ string theComment; /** * A map listing object-specific defaults set for the given interfaces. */ map objectDefaults; public: /** * Print out debugging information for this object on std::cerr. To * be called from within a debugger via the debug() function. */ virtual void debugme() const; private: /** * Standard Initialization object. */ static AbstractClassDescription initInterfacedBase; /** * Private and non-existent assignment operator. */ - InterfacedBase & operator=(const InterfacedBase &); + InterfacedBase & operator=(const InterfacedBase &) = delete; protected: /** * Functor class to be used to update a range of dependent object. */ struct UpdateChecker { /** Constructor. */ UpdateChecker(bool & touched) : isTouched(touched) {} /** Constructor. */ UpdateChecker(const UpdateChecker & uc) : isTouched(uc.isTouched) {} /** Call the check function for an object. */ static void check(tIBPtr, bool &); /** Function call operator. */ template void operator()(const ptr & i) { check(i, isTouched); } /** set to false if any check() call fails. */ bool & isTouched; }; /** * Functor class to be used to update a range of dependent object in a map. */ struct UpdateMapChecker { /** Constructor. */ UpdateMapChecker(bool & touched) : isTouched(touched) {} /** Constructor. */ UpdateMapChecker(const UpdateMapChecker & uc) : isTouched(uc.isTouched) {} /** Function call operator. */ template void operator()(const ref & i) { UpdateChecker::check(i.second, isTouched); } /** Reference to the bool variable to be set. */ bool & isTouched; }; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of InterfacedBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of InterfacedBase. */ typedef PersistentBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * InterfacedBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::InterfacedBase"; } }; /** @endcond */ } #endif /* ThePEG_InterfacedBase_H */ diff --git a/LesHouches/LesHouchesEventHandler.h b/LesHouches/LesHouchesEventHandler.h --- a/LesHouches/LesHouchesEventHandler.h +++ b/LesHouches/LesHouchesEventHandler.h @@ -1,474 +1,474 @@ // -*- C++ -*- // // LesHouchesEventHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_LesHouchesEventHandler_H #define THEPEG_LesHouchesEventHandler_H // // This is the declaration of the LesHouchesEventHandler class. // #include "ThePEG/Handlers/EventHandler.h" #include "LesHouchesEventHandler.fh" #include "LesHouchesReader.fh" #include "ThePEG/Utilities/CompSelector.h" #include "ThePEG/Utilities/XSecStat.h" namespace ThePEG { /** * The LesHouchesEventHandler 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 LesHouchesReaders which * typically are connected to files with event data produced by * external matrix element generator programs. When an event is * requested by LesHouchesEventHandler, one of the readers are chosen, * an event is read in and then passed to the different * StepHandler defined in the underlying * EventHandler class. * * @see \ref LesHouchesEventHandlerInterfaces "The interfaces" * defined for LesHouchesEventHandler. */ class LesHouchesEventHandler: public EventHandler { public: /** * A vector of LesHouchesReader objects. */ typedef vector ReaderVector; /** * A selector of readers. */ typedef CompSelector 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. */ }; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ LesHouchesEventHandler() : theWeightOption(unitweight), theUnitTolerance(1.0e-6), warnPNum(true), theNormWeight(0) { selector().tolerance(unitTolerance()); } /** * The destructor. */ virtual ~LesHouchesEventHandler(); //@} 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; /** * The number of attempts inside the statistics object */ 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; /** * Map to aid the calculation of the optional weights' integrated cross section */ virtual const map & 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. */ tLesHouchesReaderPtr currentReader() const { return theCurrentReader; } /** * Set the currently selected reader object. */ void currentReader(tLesHouchesReaderPtr 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. */ tLesHouchesReaderPtr 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; /** * Collect statistics for this event handler. To be used for * histogram scaling. */ XSecStat histStats; /** * The weight identifiers for the events */ vector weightnames; /** * Collect statistics for this event handler's optional weights. */ struct OptWeight { /** * Collect statistics for the optional weights */ XSecStat stats; /** * Calculate the cross section for the optional weights */ CrossSection xs; /** * Collect statistics for this event handler's optional weights. To be used for * histogram scaling. */ XSecStat histStats; }; /** Map statistics to weight name strings */ map opt; /** * Counter for the number of tries for the purpose of statistics */ int ntries; /** * Return the optional weights' statistics */ const map & optWeights() const { return opt; } 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 * LesHouchesReader. */ bool warnPNum; /** * How to normalize the weights */ unsigned int theNormWeight; public: /** @cond EXCEPTIONCLASSES */ /** * Exception class used if no readers were assigned. */ class LesHouchesInitError: public InitException {}; /** * Exception class used if the same process number is used by more * than ne reader. */ class LesHouchesPNumException: 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 initLesHouchesEventHandler; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - LesHouchesEventHandler & operator=(const LesHouchesEventHandler &); + LesHouchesEventHandler & operator=(const LesHouchesEventHandler &) = delete; }; } // CLASSDOC OFF #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of LesHouchesEventHandler. */ template <> struct BaseClassTrait { /** Typedef of the first base class of LesHouchesEventHandler. */ typedef EventHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the LesHouchesEventHandler class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::LesHouchesEventHandler"; } /** Return the name of the shared library be loaded to get access to * the LesHouchesEventHandler class and every other class it uses * (except the base class). */ static string library() { return "LesHouches.so"; } }; /** @endcond */ } #endif /* THEPEG_LesHouchesEventHandler_H */ diff --git a/LesHouches/LesHouchesFileReader.h b/LesHouches/LesHouchesFileReader.h --- a/LesHouches/LesHouchesFileReader.h +++ b/LesHouches/LesHouchesFileReader.h @@ -1,335 +1,335 @@ // -*- C++ -*- // // LesHouchesFileReader.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_LesHouchesFileReader_H #define THEPEG_LesHouchesFileReader_H // This is the declaration of the LesHouchesFileReader class. #include "LesHouchesReader.h" #include "LesHouchesFileReader.fh" #include "ThePEG/PDT/Decayer.h" #include "ThePEG/Utilities/CFileLineReader.h" #include #include namespace ThePEG { /** * LesHouchesFileReader is an base class to be used for objects which * reads event files from matrix element generators. It inherits from * LesHouchesReader 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 LesHouchesFileReaderInterfaces "Th1e interfaces" * defined for LesHouchesFileReader. * @see Event * @see LesHouchesReader */ class LesHouchesFileReader: public LesHouchesReader { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ LesHouchesFileReader() : neve(0), ieve(0), theQNumbers(false), theIncludeFxFxTags(false), theIncludeCentral(false) {} /** * Copy-constructor. Note that a file which is opened in the object * copied from will have to be reopened in this. */ LesHouchesFileReader(const LesHouchesFileReader &); /** * Destructor. */ virtual ~LesHouchesFileReader(); //@} 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); /** * 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; } /** * Return the optional weights information string ("Names") */ virtual vector optWeightsNamesFunc(); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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(); /** * Erases all occurences of a substring from a string */ void erase_substr(std::string& subject, const std::string& search); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 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 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 scalemap; /** * Temporary holder for optional weights */ map optionalWeightsTemp; private: /** * Describe an abstract base class with persistent data. */ static ClassDescription initLesHouchesFileReader; /** * Private and non-existent assignment operator. */ - LesHouchesFileReader & operator=(const LesHouchesFileReader &); + LesHouchesFileReader & operator=(const LesHouchesFileReader &) = delete; public: /** @cond EXCEPTIONCLASSES */ /** Exception class used by LesHouchesFileReader 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 LesHouchesFileReader. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of LesHouchesFileReader. */ typedef LesHouchesReader NthBase; }; /** * This template specialization informs ThePEG about the name of the * LesHouchesFileReader class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** * Return the class name. */ static string className() { return "ThePEG::LesHouchesFileReader"; } /** * Return the name of the shared library to be loaded to get access * to the LesHouchesFileReader class and every other class it uses * (except the base class). */ static string library() { return "LesHouches.so"; } }; /** @endcond */ } #endif /* THEPEG_LesHouchesFileReader_H */ diff --git a/LesHouches/LesHouchesReader.h b/LesHouches/LesHouchesReader.h --- a/LesHouches/LesHouchesReader.h +++ b/LesHouches/LesHouchesReader.h @@ -1,1003 +1,1003 @@ // -*- C++ -*- // // LesHouchesReader.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_LesHouchesReader_H #define THEPEG_LesHouchesReader_H // This is the declaration of the LesHouchesReader class. #include "LesHouches.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 "LesHouchesEventHandler.fh" #include "LesHouchesReader.fh" #include "ThePEG/Utilities/CFile.h" #include #include namespace ThePEG { /** * LesHouchesReader 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. LesHouchesReaders can * only be used inside LesHouchesEventHandler 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 LesHouchesEventHandler 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 LesHouchesEventHandler and by * default the LesHouchesReader is not assumed to be able to actively * choose between the sub-processes. Instead, the * LesHouchesEventHandler can handle several LesHouchesReader objects * and choose between them. However, a sub-class of LesHouchesReader * may set the flag isActive, in which case it is assumed to be able * to select between its sub-processes itself. * * The LesHouchesReader 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 LesHouchesReaderInterfaces "The interfaces" * defined for LesHouchesReader. * @see Event * @see LesHouchesEventHandler */ class LesHouchesReader: public HandlerBase, public LastXCombInfo<> { /** * LesHouchesEventHandler should have access to our private parts. */ friend class LesHouchesEventHandler; /** * Map for accumulating statistics of cross sections per process * number. */ typedef map StatMap; /** * Map of XComb objects describing the incoming partons indexed by * the corresponding PartonBin pair. */ typedef map XCombMap; /** * A vector of pointers to ReweightBase objects. */ typedef vector 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. */ LesHouchesReader(bool active = false); /** * Copy-constructor. */ LesHouchesReader(const LesHouchesReader &); /** * Destructor. */ virtual ~LesHouchesReader(); //@} 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 optWeightsNamesFunc() = 0; /** * vector with the optional weights names */ vector 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 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); /** * 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 LesHouchesEventHandler. */ 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) + // MOTHUP, ICOLUP sizeof(pair) + // 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& 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 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 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 inPDF; /** * The PDFBase object to be used in the subsequent generation. */ pair 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 colourIndex; /** * Association between Particles and indices in the current * translation. */ ObjectIndexer 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 optionalWeights; /** * 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; /** * npLO for LesHouches merging */ int optionalnpLO; /** * npNLO for LesHouches merging */ int optionalnpNLO; /** * 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 xSecWeights; /** * Individual maximum weights for individual (possibly reweighted) * processes. */ map 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 initLesHouchesReader; /** * Private and non-existent assignment operator. */ - LesHouchesReader & operator=(const LesHouchesReader &); + LesHouchesReader & operator=(const LesHouchesReader &) = delete; public: /** @cond EXCEPTIONCLASSES */ /** Exception class used by LesHouchesReader in case inconsistencies * are encountered. */ class LesHouchesInconsistencyError: public Exception {}; /** Exception class used by LesHouchesReader in case more events than available are requested. */ class LesHouchesReopenWarning: public Exception {}; /** Exception class used by LesHouchesReader in case reopening an event file fails. */ class LesHouchesReopenError: public Exception {}; /** Exception class used by LesHouchesReader in case there is information missing in the initialization phase. */ class LesHouchesInitError: 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 LesHouchesReader. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of LesHouchesReader. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * LesHouchesReader class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** * Return the class name. */ static string className() { return "ThePEG::LesHouchesReader"; } /** * Return the name of the shared library to be loaded to get access * to the LesHouchesReader class and every other class it uses * (except the base class). */ static string library() { return "LesHouches.so"; } }; /** @endcond */ } #endif /* THEPEG_LesHouchesReader_H */ diff --git a/LesHouches/MadGraphOneCut.h b/LesHouches/MadGraphOneCut.h --- a/LesHouches/MadGraphOneCut.h +++ b/LesHouches/MadGraphOneCut.h @@ -1,227 +1,227 @@ // -*- C++ -*- // // MadGraphOneCut.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MadGraphOneCut_H #define THEPEG_MadGraphOneCut_H // // This is the declaration of the MadGraphOneCut class. // #include "ThePEG/Cuts/OneCutBase.h" namespace ThePEG { /** * Objects of the MadGraphOneCut class can be created automatically by * the MadGraphReader class when scanning event files for information * about cuts. It is also possible to create objects by hand and use * it as any other OneCutBase object. * * @see \ref MadGraphOneCutInterfaces "The interfaces" * defined for MadGraphOneCut. */ class MadGraphOneCut: public OneCutBase { public: /** * Enumerate the different kinds of cuts made by MadGraph. */ enum class Cut { PT, /**< The minimum transverse momentum of a particle. */ ETA, /**< The maximum (absolute value of) pseudo-rapidity of a particle. */ XPT /**< The minimum transverse momentum of the particle with largest transverse momentum. */ }; /** * Enumerate the types of particles the cut is made on. */ enum class P { JET, /**< The cut applies only to coloured particles. */ LEP, /**< The cut applies only to leptons. */ PHO, /**< The cut applies only to photons. */ BOT /**< The cut applies only to bottom quarks. */ }; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ MadGraphOneCut() : cutType(Cut::PT), particleType(P::JET), theCut(0.0) {} /** * The constructor used by the MadGraphReader. * @param t is the type of the cut. * @param p is the type of particles the cut is applied to. * @param c is the value of the cut (in units of GeV where applicable). */ MadGraphOneCut(Cut t, P p, double c) : cutType(t), particleType(p), theCut(c) {} //@} public: /** @name Virtual functions mandated by the base class. */ //@{ /** * Return the minimum allowed value of the transverse momentum of an * outgoing parton. */ virtual Energy minKT(tcPDPtr p) const; /** * 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 p) const; /** * 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 p) const; /** * Return the minimum allowed value of the transverse momentum of * the outgoing parton with the lagrest transverse momentum. This * version simply returns minKt(). */ virtual Energy minMaxKT(tcPDPtr p) const; /** * 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; //@} protected: /** * Returns true if cut should be applied to a particle of type \a p. */ bool checkType(tcPDPtr 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: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 type of this cut. */ Cut cutType; /** * The type of particles this cut applies to. */ P particleType; /** * The value of the cut to be applied. */ double theCut; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initMadGraphOneCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MadGraphOneCut & operator=(const MadGraphOneCut &); + MadGraphOneCut & operator=(const MadGraphOneCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MadGraphOneCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of MadGraphOneCut. */ typedef OneCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the MadGraphOneCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MadGraphOneCut"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the MadGraphOneCut class and any other class on which it depends * (except the base class). */ static string library() { return "MadGraphReader.so"; } }; /** @endcond */ } #endif /* THEPEG_MadGraphOneCut_H */ diff --git a/LesHouches/MadGraphReader.h b/LesHouches/MadGraphReader.h --- a/LesHouches/MadGraphReader.h +++ b/LesHouches/MadGraphReader.h @@ -1,257 +1,257 @@ // -*- C++ -*- // // MadGraphReader.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MadGraphReader_H #define THEPEG_MadGraphReader_H // This is the declaration of the MadGraphReader class. #include "ThePEG/LesHouches/LesHouchesFileReader.h" namespace ThePEG { /** * MadGraphReader inherits from LesHouchesFileReader and is able to * read event files produced by the MadGraph/MadEvent program. * * @see \ref MadGraphReaderInterfaces "The interfaces" * defined for MadGraphReader. */ class MadGraphReader: public LesHouchesFileReader { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ MadGraphReader() : fixedScale(91.188*GeV), fixedAEM(0.007546772), fixedAS(0.12), doInitCuts(false) {} //@} public: /** @name Virtual functions specified by the LesHouchesReader base class. */ //@{ /** * Open a file or stream with events and read in the run information * into the corresponding protected variables. */ virtual void open(); /** * 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. This version calls * the base class function and the readjusts the values in HEPRUP to * cure some inconsistencies in the MadGraph files. */ virtual long scan(); /** * Read the next event form the file or stream into the * corresponding protected variables. Return false if there is no * more events. */ virtual bool doReadEvent(); //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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: /** @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(); /** * Called from doinit() to extract cuts from the event file and add * the corresponding objects to the current EventGenerator. */ CutsPtr initCuts(); /** * Called from LesHouchesReader::doinit() to extract PDFs from the * event file and add the corresponding objects to the current * EventGenerator. */ virtual void initPDFs(); /** * Return true if this object needs to be initialized before all * other objects because it needs to extract cuts from the event file. */ virtual bool preInitialize() const; /** * Finalize this object. Called in the run phase just after a * run has ended. Used eg. to write out statistics. */ virtual void dofinish() { LesHouchesFileReader::dofinish(); if ( stats.accepted() > 0 ) useMe(); } //@} protected: /** * Interface function to scan a madgraph file and extract * information about used cuts. The corresponding cut objects are * created in the Repository and assigned to this reader. */ string scanCuts(string); /** * Function to extract the number of events from a string */ long numberOfEvents(string); protected: /** * Fixed scale. Old MadGraph files do not necessarily contain * information about the factorization (or renormalization) * scale. In this case this is used instead. */ Energy fixedScale; /** * Fixed \f$\alpha_{EM}\f$. Old MadGraph files do not necessarily * contain information about the value of \f$\alpha_{EM}\f$. In this * case this is used instead. */ double fixedAEM; /** * Fixed \f$\alpha_S\f$. Old MadGraph files do not necessarily * contain information about the value of \f$\alpha_S\f$. In this * case this is used instead. */ double fixedAS; /** * New MadGraph files contain suitable information about cuts used * in the generation. The non-zero ones are stored in this map. */ map cuts; /** * If true, cuts may be extracted from the event file during initialization. */ bool doInitCuts; public: /** * Exception class used to inform about inability to work with some * weighted event files. */ struct WeightedException: public Exception {}; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initMadGraphReader; /** * Private and non-existent assignment operator. */ - MadGraphReader & operator=(const MadGraphReader &); + MadGraphReader & operator=(const MadGraphReader &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of MadGraphReader. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of MadGraphReader. */ typedef LesHouchesFileReader NthBase; }; /** * This template specialization informs ThePEG about the name of the * MadGraphReader class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::MadGraphReader"; } /** Return the name of the shared library to be loaded to get * access to the MadGraphReader class and every other class it uses * (except the base class). */ static string library() { return "MadGraphReader.so"; } }; /** @endcond */ } #endif /* THEPEG_MadGraphReader_H */ diff --git a/LesHouches/MadGraphTwoCut.h b/LesHouches/MadGraphTwoCut.h --- a/LesHouches/MadGraphTwoCut.h +++ b/LesHouches/MadGraphTwoCut.h @@ -1,270 +1,270 @@ // -*- C++ -*- // // MadGraphTwoCut.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MadGraphTwoCut_H #define THEPEG_MadGraphTwoCut_H // // This is the declaration of the MadGraphTwoCut class. // #include "ThePEG/Cuts/TwoCutBase.h" namespace ThePEG { /** * Objects of the MadGraphTwoCut class can be created automatically by * the MadGraphReader class when scanning event files for information * about cuts. It is also possible to create objects by hand and use * it as any other OneCutBase object. * * @see \ref MadGraphTwoCutInterfaces "The interfaces" * defined for MadGraphTwoCut. */ class MadGraphTwoCut: public TwoCutBase { public: /** * Enumerate the different kinds of cuts made by MadGraph. */ enum class Cut { INVMASS, /**< The minimum invariant mass of two particles. */ DELTAR /**< The minimum pseudo-rapidity--azimuth-angle distance between two particles. */ }; /** * Enumerate the types of particles the cut is made on. */ enum class P { JET, /**< Coloured particles (jets). */ LEP, /**< Leptons. */ PHO, /**< Photons. */ BOT, /**< Bottom quarks. */ NOT /**< Other types not cut on. */ }; /** * Enumerate the types of particles pairs the cut is made on. */ enum class PP { JETJET, /**< The cut applies only to pairs of coloured particles (jets). */ LEPLEP, /**< The cut applies only to lepton pairs (in case of INVMASS lepton--anti-lepton pairs of same flavour). */ PHOPHO, /**< The cut applies only to pairs photons. */ BOTBOT, /**< The cut applies only to pairs of bottom quarks. */ BOTJET, /**< The cut applies only to bottom quarks paired with another coloured particle (jet). */ PHOJET, /**< The cut applies only to a photon paired with a coloured particle (jet). */ JETLEP, /**< The cut applies only to a coloured particle (jet) paired with a lepton. */ PHOBOT, /**< The cut applies only to a photon paired with a bottom quark. */ BOTLEP, /**< The cut applies only to bottom quarks paired with a lepton. */ PHOLEP /**< The cut applies only to a photon paired with a lepton. */ }; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ MadGraphTwoCut() : cutType(Cut::DELTAR), pairType(PP::JETJET), theCut(0.0) {} /** * The constructor used by the MadGraphReader. * @param t is the type of the cut. * @param p is the type of particles the cut is applied to. * @param c is the value of the cut (in units of GeV where applicable). */ MadGraphTwoCut(Cut t, PP p, double c) : cutType(t), pairType(p), theCut(c) {} //@} public: /** @name Virtual functions mandated by the base class. */ //@{ /** * Return the minimum allowed squared invariant mass of two outgoing * partons of type \a pi and \a pj. */ virtual Energy2 minSij(tcPDPtr pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr po) const; /** * 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 pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr pj) const; /** * 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 pi, tcPDPtr pj) const; /** * 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; //@} protected: /** * Returns true if cut should be applied to pair of particles of * type \a pi and \a pj. */ bool checkType(tcPDPtr pi, tcPDPtr pj) const; /** * Get the type of particle \a p. */ P getType(tcPDPtr 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: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 type of this cut. */ Cut cutType; /** * The type of particle pairs this cut applies to. */ PP pairType; /** * The value of the cut to be applied. */ double theCut; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initMadGraphTwoCut; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MadGraphTwoCut & operator=(const MadGraphTwoCut &); + MadGraphTwoCut & operator=(const MadGraphTwoCut &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MadGraphTwoCut. */ template <> struct BaseClassTrait { /** Typedef of the first base class of MadGraphTwoCut. */ typedef TwoCutBase NthBase; }; /** This template specialization informs ThePEG about the name of * the MadGraphTwoCut class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MadGraphTwoCut"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the MadGraphTwoCut class and any other class on which it depends * (except the base class). */ static string library() { return "MadGraphReader.so"; } }; /** @endcond */ } #endif /* THEPEG_MadGraphTwoCut_H */ diff --git a/MatrixElement/Amplitude.h b/MatrixElement/Amplitude.h --- a/MatrixElement/Amplitude.h +++ b/MatrixElement/Amplitude.h @@ -1,138 +1,138 @@ // -*- C++ -*- // // Amplitude.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Amplitude_H #define ThePEG_Amplitude_H // This is the declaration of the Amplitude class. #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/PDT/ParticleData.h" #include "ThePEG/EventRecord/Particle.h" namespace ThePEG { /** * The Amplitude class is the abstract base class for all the classes * representing complex amplitudes associated with either a hard * 2\f$\rightarrow\f$ N subprocess or a decay 1\f$\rightarrow\f$ N * process. The returned value should be dimensionless suitable * scaled by the total invariant mass squared (shat), which is always * computable from the specified momenta of the particles in the * vertex. Notice that the amplitude for splitting * 1\f$\rightarrow\f$ N processes is instead represented in other * classes (derived from the SplitFun class). * * @see \ref AmplitudeInterfaces "The interfaces" * defined for Amplitude. */ class Amplitude: public HandlerBase { /** @name Main virtual functions to be overridden by sub-classes. */ //@{ /** * Return the amplitude. Given the ParticleData objects in \a * particles, their \a momenta and \a helicities of all the * particles in the vertex, return the complex amplitude. The * convention is the order of the vectors is that first there is the * incoming particle(s) and then the outgoing ones. For the * helicities, the convention is to number them starting from 0 (no * negative values, because they are used as vector indeces), for * example, for a massive particle of spin S, 0 <= helicity <= 2*S. * The returned value should be dimensionless suitable scaled by the * total invariant mass squared (\f$\hat{s}\f$), which is always * computable from the specified \a momenta of the particles in the * vertex. */ virtual Complex value(const tcPDVector & particles, const vector & momenta, const vector & helicities) = 0; /** * Return an overestimated amplitude. Same as value(const tcPDVector * &, const vector &, const vector &), but it * provides an overestimate of the complex amplitude, that is: * abs( overestimaValue() ) >= abs(value()) The * default definition just returns value(), but it can be overriden * by derived classes. */ virtual Complex overestimateValue(const tcPDVector & particles, const vector & momenta, const vector & helicities); //@} /** @name Alternative interface to main virtual functions. */ //@{ /** * Return the amplitude. Calls value(const tcPDVector &, const * vector &, const vector &) and should not * be overridden. */ Complex value(const PVector & particles, const vector & helicities); /** * Return an overestimated amplitude. Calls overestimateValue(const * tcPDVector &, const vector &, const vector * &) */ Complex overestimateValue(const PVector & particles, const vector & helicities); //@} public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); /** * Describe an abstract base class with persistent data. */ static AbstractNoPIOClassDescription initAmplitude; /** * Private and non-existent assignment operator. */ - Amplitude & operator=(const Amplitude &); + Amplitude & operator=(const Amplitude &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of Amplitude. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of Amplitude. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * Amplitude class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::Amplitude"; } }; /** @endcond */ } #endif /* ThePEG_Amplitude_H */ diff --git a/MatrixElement/BlobDiagram.h b/MatrixElement/BlobDiagram.h --- a/MatrixElement/BlobDiagram.h +++ b/MatrixElement/BlobDiagram.h @@ -1,181 +1,181 @@ // -*- C++ -*- // // BlobDiagram.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_BlobDiagram_H #define ThePEG_BlobDiagram_H // This is the declaration of the BlobDiagram class. #include "ThePEG/MatrixElement/DiagramBase.h" #include "ThePEG/MatrixElement/ColourLines.h" #include "ThePEG/Handlers/StandardXComb.fh" namespace ThePEG { /** * The BlobDiagram class inherits from DiagramBase and represents a general * Feynman diagram of which no further substructure is assumed. * * @see DiagramBase * @see ColourLines * */ class BlobDiagram: public DiagramBase { public: /** The integer type reresenting vector sizes. */ typedef cPDVector::size_type size_type; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor */ BlobDiagram() : DiagramBase() {} /** * Constructor specifiying incoming partons */ BlobDiagram(int id, tcPDPtr first, tcPDPtr second) : DiagramBase() { addParton(first); addParton(second); diagramInfo(2,id); } /** * Destructor. */ ~BlobDiagram(); //@} public: /** * Add a space- or time-like parton. */ BlobDiagram& operator,(PDPtr pd) { addParton(pd); return *this; } /** * Add a space- or time-like parton. */ BlobDiagram& operator,(cPDPtr pd) { addParton(pd); return *this; } /** * Add a space- or time-like parton. */ BlobDiagram& operator,(tPDPtr pd) { addParton(pd); return *this; } /** * Add a space- or time-like parton. */ BlobDiagram& operator,(tcPDPtr pd) { addParton(pd); return *this; } /** * Construct a sub process corresponding to this diagram. The * incoming partons, and the momenta of the outgoing ones, are given * by the XComb object. All parent/children pointers should be set * correspondingly and the partons should be colour connected as * specified by the ColourLines object. */ virtual tPVector construct(SubProPtr sb, const StandardXComb&, const ColourLines&) const; /** * Return the types of the incoming partons. */ tcPDPair incoming() const { return tcPDPair(partons()[0],partons()[1]); } /** * Return the outgoing parton types of this tree diagram. */ tcPDVector outgoing() const { return tcPDVector(partons().begin()+2,partons().end()); } /** * Return the incoming followed by the outgoing parton types of this * tree diagram. */ tcPDVector external() const { return tcPDVector(partons().begin(),partons().end()); } /** * Return the number of outgoing partons. */ size_type nOutgoing() const { return partons().size() - 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); //@} private: /** * Describe a concrete class with persistent data. */ static ClassDescription initBlobDiagram; /** * Private and non-existent assignment operator. */ - BlobDiagram & operator=(const BlobDiagram &); + BlobDiagram & operator=(const BlobDiagram &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of BlobDiagram. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of BlobDiagram. */ typedef DiagramBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * BlobDiagram class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::BlobDiagram"; } }; /** @endcond */ } #endif /* ThePEG_BlobDiagram_H */ diff --git a/MatrixElement/BlobMEBase.h b/MatrixElement/BlobMEBase.h --- a/MatrixElement/BlobMEBase.h +++ b/MatrixElement/BlobMEBase.h @@ -1,181 +1,181 @@ // -*- C++ -*- #ifndef ThePEG_BlobMEBase_H #define ThePEG_BlobMEBase_H // // This is the declaration of the BlobMEBase class. // #include "ThePEG/MatrixElement/MEBase.h" namespace ThePEG { /** * Here is the documentation of the BlobMEBase class. * * @see \ref BlobMEBaseInterfaces "The interfaces" * defined for BlobMEBase. */ class BlobMEBase: public MEBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ BlobMEBase(); /** * The destructor. */ virtual ~BlobMEBase(); //@} public: /** * Helper struct to represent colour connections. */ struct ColourConnection { /** * The members of the colour connection */ vector members; /** * Add a leg's colour to the connection */ void addColour(int leg) { members.push_back(leg+1); } /** * Add a leg's anti-colour to the connection */ void addAntiColour(int leg) { members.push_back(-leg-1); } /** * Write out the connection to the colour lines string */ string write(size_t& sourceCount, bool sink) const; }; /** @name Virtual functions required by the MEBase class. */ //@{ /** * 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 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 colourGeometries(tcDiagPtr diag) const; /** * Return the matrix element squared differential in the variables * given by the last call to generateKinematics(). */ virtual CrossSection dSigHatDR() const; //@} /** * Return the possible processes this matrix element will be able to handle, * as a map incoming to outgoing; it is assumed that the number of outgoing * partons does not vary. */ virtual multimap processes() const = 0; /** * Return the colour connections for the process. */ virtual list colourConnections() const = 0; public: /** * Describe an abstract base class without persistent data. */ static AbstractNoPIOClassDescription initBlobMEBase; /** * The standard Init function used to initialize the interfaces. * Called exactly 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. */ - BlobMEBase & operator=(const BlobMEBase &); + BlobMEBase & operator=(const BlobMEBase &) = delete; /** * The colour lines object used as a proxy to connect colours in * BlobDiagram::construct */ mutable ColourLines theColourLines; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * BlobMEBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of BlobMEBase. */ typedef MEBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * BlobMEBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::BlobMEBase"; } }; /** @endcond */ } #endif /* ThePEG_BlobMEBase_H */ diff --git a/MatrixElement/DiagramBase.h b/MatrixElement/DiagramBase.h --- a/MatrixElement/DiagramBase.h +++ b/MatrixElement/DiagramBase.h @@ -1,235 +1,235 @@ // -*- C++ -*- // // DiagramBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_DiagramBase_H #define ThePEG_DiagramBase_H // This is the declaration of the DiagramBase class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/PDT/ParticleData.h" #include "ThePEG/MatrixElement/ColourLines.h" #include "ThePEG/Handlers/StandardXComb.fh" #include "DiagramBase.fh" #include "DiagramBase.xh" namespace ThePEG { /** * DiagramBase is the base class of all classes which describes * Feynman diagrams which can be generated by a matrix element class * inheriting from MEBase, as reported by the * MEBase::includedDiagrams() method. * * To work properly, a sub-class must in its constructor report the * incoming and outgoing parton types with the partons(int, const * cPDVector &, int) method. Also an id number should be given to be * used internally by the matrix element class. In addition, the * construct() method must be implemented to construct the actual * partons and connect them together in a SubProcess object, also * performing the colour connections using a given ColourLines object. * * @see MEBase * @see SubProcess * @see ColourLines * */ class DiagramBase: public Base { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ DiagramBase() : theNIncoming(-1), theId(0) {} /** * Destructor. */ virtual ~DiagramBase(); //@} public: /** @name Main virtual function to be overridden in sub-classes. */ //@{ /** * Construct a sub process corresponding to this diagram. The * incoming partons, and the momenta of the outgoing ones, are given * by the XComb object. All parent/children pointers should be set * correspondingly and the partons should be colour connected as * specified by the ColourLines object. */ virtual tPVector construct(SubProPtr sb, const StandardXComb &, const ColourLines &) const = 0; //@} /** @name Access the underlying information. */ //@{ /** * Return the number of incoming partons for this diagram. I.e. the * incoming partons plus the number of space-like lines. */ int nIncoming() const { return theNIncoming; } /** * Return the incoming, followed by the outgoing partons for this * diagram. */ const cPDVector& partons() const { return thePartons; } /** * Return the id number of this diagram. */ int id() const { return theId; } /** * Generate a tag which is unique for diagrams with the same * type of incoming and outgoing partons. */ string getTag() const; /** * Compare this diagram to another one modulo * the ids of the diagrams. */ virtual bool isSame (tcDiagPtr other) const { return nIncoming() == other->nIncoming() && partons() == other->partons(); } //@} protected: /** * To be used by sub classes to report the incoming and outgoing * particle types, and an id number. * * @param ninc the number of incoming and other space-like lines in * the diagram. * * @param parts the types of partons for each external line in the * diagram. * * @param newId the id number of this diagram. */ void partons(int ninc, const cPDVector & parts, int newId) { theNIncoming = ninc; thePartons = parts; theId = newId; } /** * Complete the missing information, provided partons() has already been * filled */ void diagramInfo(int ninc, int newId) { theNIncoming = ninc; theId = newId; } /** * Returns true if the partons(int, const cPDVector &, int) function * has been called properly from the sub class. */ bool done() const { return nIncoming() >= 0; } /** * Add to the partons */ void addParton(tcPDPtr pd) { thePartons.push_back(pd); } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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. */ static void Init(); private: /** * The number of incoming partons for this diagram. */ int theNIncoming; /** * The incoming, followed by the outgoing partons for this * diagram. */ cPDVector thePartons; /** * The id number of this diagram. */ int theId; private: /** * Describe an abstract base class with persistent data. */ static AbstractClassDescription initDiagramBase; /** * Private and non-existent assignment operator. */ - DiagramBase & operator=(const DiagramBase &); + DiagramBase & operator=(const DiagramBase &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of DiagramBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of DiagramBase. */ typedef Base NthBase; }; /** * This template specialization informs ThePEG about the name of the * DiagramBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::DiagramBase"; } }; /** @endcond */ } #endif /* ThePEG_DiagramBase_H */ diff --git a/MatrixElement/ME2to2Base.h b/MatrixElement/ME2to2Base.h --- a/MatrixElement/ME2to2Base.h +++ b/MatrixElement/ME2to2Base.h @@ -1,241 +1,241 @@ // -*- C++ -*- // // ME2to2Base.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ME2to2Base_H #define ThePEG_ME2to2Base_H // This is the declaration of the ME2to2Base class. #include "ThePEG/MatrixElement/MEBase.h" #include "ThePEG/MatrixElement/Tree2toNDiagram.h" #include "ThePEG/Interface/Switch.fh" namespace ThePEG { /** * ME2to2Base can be used as a base class for any matrix element class * implementing 2\f$\rightarrow\f$ 2 processes. It extends the MEBase * base class by implementing the virtual scale() method to return the * assumed scale of a given process according to several options. It * also caches some useful characteristics of the chosen phase space * point, such as tHat(), uHat() and the masses of the external * partons. * * @see \ref ME2to2BaseInterfaces "The interfaces" * defined for ME2to2Base. * @see MEBase */ class ME2to2Base: public MEBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ ME2to2Base() : theScaleChoice(0), theLastTHat(ZERO), theLastUHat(ZERO), theLastPhi(0.0) {} /** * Destructor. */ virtual ~ME2to2Base(); //@} public: /** @name Virtual functions required by the MEBase class. */ //@{ /** * The number of internal degreed of freedom used in the matrix * element. */ virtual int nDim() const { return 1; } /** * 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; /** * 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. */ virtual void setKinematics(); //@} /** * Used internally by generateKinematics, after calculating the * limits on cos(theta). */ virtual double getCosTheta(double cthmin, double cthmax, const double * r); /** * Give the option corresponding to the way the scale of an * interaction is calculated. */ int scaleChoice() const { return theScaleChoice; } public: /** @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 theLastTHat; } /** * Return the \f$\hat{u}\f$ of the last set phase space point. */ Energy2 uHat() const { return theLastUHat; } /** * Return the azimuth angle of the last set phase space point. */ double phi() const { return theLastPhi; } //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 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) { theLastTHat = e2; } /** * Set the \f$\hat{u}\f$ of the last set phase space point. */ void uHat(Energy2 e2) { theLastUHat = e2; } /** * Set the azimuth angle of the last set phase space point. */ void phi(double phi) { theLastPhi = phi; } //@} protected: /** * Access to the acutal Switch object used to determine the choice * of scale. */ static Switch & interfaceScaleChoice(); private: /** * The option indicating how to calculate the scale of an interaction. */ int theScaleChoice; /** * The \f$\hat{t}\f$ of the last set phase space point. */ Energy2 theLastTHat; /** * The \f$\hat{u}\f$ of the last set phase space point. */ Energy2 theLastUHat; /** * The azimuth angle of the last set phase space point. */ double theLastPhi; private: /** * Describe an abstract base class with persistent data. */ static AbstractClassDescription initME2to2Base; /** * Private and non-existent assignment operator. */ - ME2to2Base & operator=(const ME2to2Base &); + ME2to2Base & operator=(const ME2to2Base &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of ME2to2Base. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of ME2to2Base. */ typedef MEBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * ME2to2Base class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::ME2to2Base"; } }; /** @endcond */ } #endif /* ThePEG_ME2to2Base_H */ diff --git a/MatrixElement/ME2to2QCD.h b/MatrixElement/ME2to2QCD.h --- a/MatrixElement/ME2to2QCD.h +++ b/MatrixElement/ME2to2QCD.h @@ -1,192 +1,192 @@ // -*- C++ -*- // // ME2to2QCD.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ME2to2QCD_H #define ThePEG_ME2to2QCD_H // This is the declaration of the ME2to2QCD class. #include "ThePEG/MatrixElement/ME2to2Base.h" namespace ThePEG { /** * The ME2to2QCD class inherits from the ME2to2Base class and can be * used as a sub class for all QCD 2\f$\rightarrow\f$ 2 processes. It * implements some common functions such as common pre-factors, * maximum number of flavours, treatment of interference terms and * possibility to enhance certain terms. * * @see \ref ME2to2QCDInterfaces "The interfaces" * defined for ME2to2QCD. * @see ME2to2Base */ class ME2to2QCD: public ME2to2Base { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ ME2to2QCD() : theMaxFlavour(5), theKfac(1.0), theKfacA(1.0), useInterference(true) {} /** * Destructor. */ virtual ~ME2to2QCD(); //@} public: /** @name Virtual functions required by the MEBase class. */ //@{ /** * Return the order in \f$\alpha_S\f$ in which this matrix element * is given. Returns 2. */ virtual unsigned int orderInAlphaS() const; /** * Return the order in \f$\alpha_{EM}\f$ in which this matrix * element is given. Returns 0. */ virtual unsigned int orderInAlphaEW() const; /** * The common prefactor for all 2\f$\rightarrow\f$ 2 QCD sub-processes * ie. \f$\alpha_S^2\f$. */ double comfac() const; /** * Return the heaviest flavour allowed for this matrix element. */ int maxFlavour() const { return theMaxFlavour; } /** * K-factor for artificially boosting the cross-section. */ double Kfac() const { return theKfac; } /** * K-factor for artificially boosting colour-annihilation diagrams. */ double KfacA() const { return theKfacA >= 0.0? theKfacA: theKfac; } /** * Return true if interference terms should be used. */ bool interference() const { return useInterference; } /** * Return true if argument is a quark. */ bool isQuark(const ParticleData & p) const { return ( p.id() && abs(p.id()) <= maxFlavour() ); } /** * Return the quark with flavour i (or gluon if i = 0); */ tcPDPtr quark(int i) 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(); private: /** * The heaviest flavour allowed for incoming and outgoing partons. */ int theMaxFlavour; /** * Overall K-factor used to boost this cross-section. */ double theKfac; /** * Overall K-factors used to boost the colour annihilation diagram * in the cross-section. */ double theKfacA; /** * Flag so tell whether interference should be used or not. */ bool useInterference; private: /** * Describe an abstract base class with persistent data. */ static AbstractClassDescription initME2to2QCD; /** * Private and non-existent assignment operator. */ - ME2to2QCD & operator=(const ME2to2QCD &); + ME2to2QCD & operator=(const ME2to2QCD &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of ME2to2QCD. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of ME2to2QCD. */ typedef ME2to2Base NthBase; }; /** * This template specialization informs ThePEG about the name of the * ME2to2QCD class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::ME2to2QCD"; } }; /** @endcond */ } #endif /* ThePEG_ME2to2QCD_H */ diff --git a/MatrixElement/MEBase.h b/MatrixElement/MEBase.h --- a/MatrixElement/MEBase.h +++ b/MatrixElement/MEBase.h @@ -1,675 +1,675 @@ // -*- C++ -*- // // MEBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEBase_H #define ThePEG_MEBase_H // This is the declaration of the MEBase class. #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/EventRecord/SubProcess.h" #include "ThePEG/MatrixElement/DiagramBase.h" #include "ThePEG/MatrixElement/ColourLines.h" #include "ThePEG/MatrixElement/Amplitude.h" #include "ThePEG/Handlers/LastXCombInfo.h" #include "ThePEG/Handlers/StandardXComb.fh" #include "ReweightBase.h" #include "ThePEG/Handlers/EventHandler.fh" #include "ThePEG/Handlers/StandardEventHandler.fh" #include "ThePEG/Handlers/SubProcessHandler.fh" #include "ThePEG/PDF/PartonBin.fh" #include "MEBase.fh" namespace ThePEG { /** * The MEBase class is the base class of all objects * representing hard matrix elements in ThePEG. There are three * methods which must be overridden by a concrete subclass:
* * includedDiagrams(tcPDPair) should return a vector of DiagramBase * objects describing the diagrams used for this matrix element for * the given pair of incoming parton types. These DiagramBases are * used to identify the incoming and outgoing partons which can be * handled by the process generation scheme, and is also used to * cnstruct a corresponding SubProcess object. * * scale() should return the scale associated with the phase space * point set with the last call to setKinematics(...) or * generateKinematics(...). * * me() should return the the matrix element squared using the the * type and momentum of the incoming and outgoing partons, previously * set by the setKinematics(...) or generateKinematics(...) member * functions, accessible through the methods meMomenta() and * mePartonData() inherited from LastXCombInfo, and/or from * information stored by sub classes. The returned value should be * dimensionless suitable scaled by the total invariant mass squared * (accessible through the sHat() member function). Any user of this * method must make sure that the setKinematics(...) member function * has been appropriately called before. * * colourGeometries() should return a Selector with the possible * ColourLines objects weighted by their relative probabilities given * the information set by the last call to setKinematics(...) or * generateKinematics(...). * * There are other virtula functions which may be overridden as listed * below. * * @see \ref MEBaseInterfaces "The interfaces" * defined for MEBase. * @see DiagramBase * @see ColourLines * */ class MEBase: public HandlerBase, public LastXCombInfo { public: /** A vector of pointers to DiagramBase objects. */ typedef vector DiagramVector; /** The size_type used in the DiagramVector. */ typedef DiagramVector::size_type DiagramIndex; /** A vector of pointers to ReweightBase objects. */ typedef vector ReweightVector; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ MEBase(); /** * Destructor. */ virtual ~MEBase(); //@} public: /** @name Virtual functions to be overridden by sub-classes.. */ //@{ /** * Return the order in \f$\alpha_S\f$ in which this matrix element * is given. */ virtual unsigned int orderInAlphaS() const = 0; /** * Return the order in \f$\alpha_{EM}\f$ in which this matrix * element is given. Returns 0. */ virtual unsigned int orderInAlphaEW() const = 0; /** * 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 = 0; /** * Return the scale associated with the phase space point provided * by the last call to setKinematics(). */ virtual Energy2 scale() const = 0; /** * 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 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; /** * Set the typed and momenta of the incoming and outgoing partons to * be used in subsequent calls to me() and colourGeometries(). */ void setKinematics(tPPair in, const PVector & out); /** * 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() {} /** * 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); /** * The number of internal degreed of freedom used in the matrix * element. This default version returns 0; */ 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. 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) = 0; /** * Return true, if this matrix element expects * the incoming partons in their center-of-mass system */ virtual bool wantCMS() const { return true; } /** * If this is a dependent matrix element in a ME group, return true, * if cuts should be inherited from the head matrix element, i.e. no * cut is being applied to the dependent matrix element if the head * configuration has passed the cuts. */ virtual bool headCuts() const { return false; } /** * If this is a dependent matrix element in a ME group, return true, * if cuts should be ignored. */ virtual bool ignoreCuts() 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 true; } /** * Return the matrix element squared differential in the variables * given by the last call to generateKinematics(). */ virtual CrossSection dSigHatDR() const = 0; /** * If variations are available for the subprocess handled, generate * and return a map of optional weights to be included for the * event. */ virtual map generateOptionalWeights() { return map(); } /** * 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 false; } /** * Return true, if this matrix element provides the PDF * weight for the first incoming parton itself. */ virtual bool havePDFWeight1() const { return false; } /** * Return true, if this matrix element provides the PDF * weight for the second incoming parton itself. */ virtual bool havePDFWeight2() const { return false; } /** * 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 false; } /** * 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 &); /** * Clear the information previously provided by a call to * setKinematics(...). */ virtual void clearKinematics(); /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() const = 0; /** * 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 false; } /** * Return all possible diagrams. */ const DiagramVector & diagrams() const { if ( theDiagrams.empty() ) getDiagrams(); return theDiagrams; } /** * Return a Selector with possible colour geometries for the selected * diagram weighted by their relative probabilities. */ virtual Selector colourGeometries(tcDiagPtr diag) const = 0; /** * 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; /** * 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 diagrams(const DiagramVector &) const { return Selector(); } /** * Select a diagram. Default version uses diagrams(const * DiagramVector &) to select a diagram according to the * weights. This is the only method used that should be outside of * MEBase. */ virtual DiagramIndex diagram(const DiagramVector &) const; /** * Return true if this matrix element has associated (p)reWeight * objects assigned. */ inline bool reweighted() const { return reweights.size() > 0 || preweights.size() > 0; } /** * With the information previously supplied with the * setKinematics(...) methods, return the combined effects of the * reweighters. */ double reWeight() const; /** * With the information previously supplied with the * setKinematics(...) methods, return the comined effects of the * peweighters. */ double preWeight() const; /** * Add objects to the list of reweighters. */ void addReweighter(tReweightPtr rw); /** * Add objects to the list of preweighters. */ void addPreweighter(tReweightPtr rw); /** * Return the amplitude associated with this matrix element. This * function is allowed to return the null pointer if the amplitude * is not available. */ Ptr::pointer amplitude() const { return theAmplitude; } /** * Set the amplitude associated with this matrix element. */ void amplitude(Ptr::pointer amp) { theAmplitude = amp; } //@} public: /** @name Acces information about the last generated phase space point. */ //@{ /** * Return the last set invariant mass squared. */ Energy2 sHat() const { return lastSHat(); } /** * Return the factor with which this matrix element was last * pre-weighted. */ double preweight() const { return lastPreweight(); } /** * Inform this matrix element that a new phase space * point is about to be generated, so all caches should * be flushed. */ virtual void flushCaches() {} /** * 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()); /** * Fill the projectors object of xcombs to choose subprocesses * different than the one currently integrated. */ virtual void fillProjectors() { } /** * Set the XComb object to be used in the next call to * generateKinematics() and dSigHatDR(). */ virtual void setXComb(tStdXCombPtr); /** * Retrieve information obtained in the calculation of the cross * section to be used later when selecting diagrams and colour flow. */ const DVector & meInfo() const; /** * Save information obtained in the calculation of the cross * section to be used later when selecting diagrams and colour flow. */ void meInfo(const DVector & info) const; /** * If this matrix element is to be used 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. */ virtual int maxMultCKKW() const { return theMaxMultCKKW; } /** * If this matrix element is to be used 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. */ virtual int minMultCKKW() const { return theMinMultCKKW; } /** * If this matrix element is to be used together with others for * CKKW reweighting and veto, this will set the multiplicity of * outgoing particles in the highest multiplicity matrix element in * the group. */ virtual void maxMultCKKW(int mult) { theMaxMultCKKW = mult; } /** * If this matrix element is to be used together with others for * CKKW reweighting and veto, this will set the multiplicity of * outgoing particles in the lowest multiplicity matrix element in * the group. */ virtual void minMultCKKW(int mult) { theMinMultCKKW = mult; } /** * Set veto scales on the particles at the given * SubProcess which has been generated using this * matrix element. */ virtual void setVetoScales(tSubProPtr) 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: /** * To be used by sub classes in the getDiagrams() method to add * included diagrams. */ void add(DiagPtr dp) const { theDiagrams.push_back(dp); } /** * Access the momenta set by the last call to generateKinematics(). */ vector & meMomenta(); using LastXCombInfo::meMomenta; /** * Set the matrix element squared as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ void lastME2(double v) const; using LastXCombInfo::lastME2; /** * Set the last preweight factor */ void lastPreweight(double w) const; using LastXCombInfo::lastPreweight; /** * Set the partonic cross section as calculated * for the last phase space point. This may optionally * be used by a matrix element for caching. */ void lastMECrossSection(CrossSection v) const; using LastXCombInfo::lastMECrossSection; /** * Set the PDF weight as calculated * for the last phase space point, if the matrix * element does supply PDF weights. This may optionally * be used by a matrix element for caching. */ void lastMEPDFWeight(double v) const; using LastXCombInfo::lastMEPDFWeight; /** * Set the coupling weight as calculated * for the last phase space point */ void lastMECouplings(double v) const; using LastXCombInfo::lastMECouplings; /** * Set the last jacobian obtained when generating the kinematics for * the call to dSigHatDR. */ void jacobian(double j); using LastXCombInfo::jacobian; /** * Initialize all member variables from another * MEBase object. * * @TODO remove? */ void use(tcMEPtr other); /** * Initialize the diagrams from another MEBase object. */ void useDiagrams(tcMEPtr other) 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 diagrams included for this matrix element. */ mutable DiagramVector theDiagrams; /** * The reweight objects modifying this matrix element. */ ReweightVector reweights; /** * The preweight objects modifying this matrix element. */ ReweightVector preweights; /** * The amplitude associated with this matrix element. */ Ptr::pointer theAmplitude; /** * If this matrix element is to be used 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 matrix element is to be used 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; private: /** * Describe an abstract base class with persistent data. */ static AbstractClassDescription initMEBase; /** * Private and non-existent assignment operator. */ - MEBase & operator=(const MEBase &); + MEBase & operator=(const MEBase &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * MEBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of MEBase. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * MEBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::MEBase"; } }; /** @endcond */ } #include "ThePEG/Handlers/StandardXComb.h" #endif /* ThePEG_MEBase_H */ diff --git a/MatrixElement/MECuts.h b/MatrixElement/MECuts.h --- a/MatrixElement/MECuts.h +++ b/MatrixElement/MECuts.h @@ -1,313 +1,313 @@ // -*- C++ -*- // // MECuts.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MECuts_H #define ThePEG_MECuts_H // This is the declaration of the MECuts class. #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/Vectors/LorentzRotation.fh" #include "ThePEG/Utilities/Triplet.h" #include "ThePEG/PDT/StandardMatchers.h" namespace ThePEG { /** * The MECuts class is (currently not at all) used to make cuts on * generated phase space points for the hard interaction. A MECuts * object is selected for each matrix element. The EventHandler * has a default MECuts object, which may be overridden by the * selected SubProcessHandler object, which in turn may be overridden * by the selected MEBase object. * * The MECuts is used in two different ways. Individual handlers may * use the specific member functions which specify cuts on individual * variables. In addition the cut() member functions are always called * by the EventHandler to automatically check that all cuts are * passed. It is possible to derive new classes from the MECuts class, * in which case the virtual newcut() methods may be overridden and * will be called from the cut() methods. * * * @see EventHandler * @see SubProcessHandler * @see MEBase * @see Collision * @see SubProcess * */ class MECuts: public Interfaced { public: /** * Standard ctors and dtor */ MECuts(); public: /** * This method is called by the EventHandler with the primary * SubProcess provided in its cm frame. */ void cut(const SubProcess &) const; public: /** * The minimum and maximum values of the invariant mass (squared) of * the hard sub-process. */ Energy mHatMin() const { return theMHatMin; } /** * The minimum and maximum values of the invariant mass (squared) of * the hard sub-process. */ Energy mHatMax() const { theMHatMax > mHatMin()? theMHatMax: Constants::MaxEnergy; } /** * The minimum and maximum values of the invariant mass (squared) of * the hard sub-process. */ Energy sHatMin() const { return sqr(mHatMin()); } /** * The minimum and maximum values of the invariant mass (squared) of * the hard sub-process. */ Energy sHatMax() const { return sqr(mHatMax()); } /** * The minimum and maximum values of the transverse momentum of the * outgoing particles in the hard sub-process. */ Energy pTHatMin() const { return thePTHatMin; } /** * The minimum and maximum values of the transverse momentum of the * outgoing particles in the hard sub-process. */ Energy pTHatMax() const { return thePTHatMax > pTHatMin()? thePTHatMax: Constants::MaxEnergy; } /** * Additional cut on the transverse momenta of the hard sub-process * for s-channel hard sub-processes for outgoing particles of mass * less than singularMassMax(). */ Energy pTHatSingularMin() const { return thePTHatSingularMin; } /** * Additional cut on the transverse momenta of the hard sub-process * for s-channel hard sub-processes for outgoing particles of mass * less than singularMassMax(). */ Energy singularMassMax() const { return theSingularMassMax; } /** * The minimum and maximum value of cosine of the scattering angle * in the restframe of a hard 2->2 scattering. */ double cTHMin() const { return theCTHMin; } /** * The minimum and maximum value of cosine of the scattering angle * in the restframe of a hard 2->2 scattering. */ double cTHMax() const { return theCTHMax; } /** * The minimum and maximum value of that of a hard 2->2 scattering. */ Energy2 tHatMin() const { return theTHatMin; } /** * The minimum and maximum value of that of a hard 2->2 scattering. */ Energy2 tHatMax() const { return theTHatMax > tHatMin()? theTHatMax: Constants::MaxEnergy2; } /** * The minimum and maximum value of uhat of a hard 2->2 scattering. */ Energy2 uHatMin() const { return theUHatMin; } /** * The minimum and maximum value of uhat of a hard 2->2 scattering. */ Energy2 uHatMax() const { return theUHatMax > uHatMin()? theUHatMax: Constants::MaxEnergy2; } /** * The minimum and maximum value of the scale in a hard scattering * as defined by the Handlers which performed the hard scattering. */ Energy2 scaleMin() const { return theScaleMin; } /** * The minimum and maximum value of the scale in a hard scattering * as defined by the Handlers which performed the hard scattering. */ Energy2 scaleMax() const { return theScaleMax > scaleMin()? theScaleMax: Constants::MaxEnergy2; } public: /** * Standard functions for writing and reading from persistent streams. */ void persistentOutput(PersistentOStream &) const; /** * Standard functions for writing and reading from persistent streams. */ void persistentInput(PersistentIStream &, int); /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** * This method is called by the corresponding cut method with the * primary SubProcess provided in its cm frame. This bas-class * method does nothing. */ virtual void newcut(const SubProcess &) const; protected: /** * Standard Interfaced virtual functions. */ virtual void doupdate(); /** * Standard clone method. */ virtual IBPtr clone() const; private: /** * The minimum and maximum values of the invariant mass of * the hard sub-process. */ Energy theMHatMin; /** * The minimum and maximum values of the invariant mass of * the hard sub-process. */ Energy theMHatMax; /** * The minimum and maximum values of the transverse momentum of the * outgoing particles in the hard sub-process. */ Energy thePTHatMin; /** * The minimum and maximum values of the transverse momentum of the * outgoing particles in the hard sub-process. */ Energy thePTHatMax; /** * Additional cut on the transverse momenta of the hard sub-process * for s-channel hard sub-processes for outgoing particles of mass * less than theSingularMassMax. */ Energy thePTHatSingularMin; /** * Additional cut on the transverse momenta of the hard sub-process * for s-channel hard sub-processes for outgoing particles of mass * less than theSingularMassMax. */ Energy theSingularMassMax; /** * The minimum and maximum value of cosine of the scattering angle * in the restframe of a hard 2->2 scattering. */ double theCTHMin; /** * The minimum and maximum value of cosine of the scattering angle * in the restframe of a hard 2->2 scattering. */ double theCTHMax; /** * The minimum and maximum value of that of a hard 2->2 scattering. */ Energy2 theTHatMin; /** * The minimum and maximum value of that of a hard 2->2 scattering. */ Energy2 theTHatMax; /** * The minimum and maximum value of uhat of a hard 2->2 scattering. */ Energy2 theUHatMin; /** * The minimum and maximum value of uhat of a hard 2->2 scattering. */ Energy2 theUHatMax; /** * The minimum and maximum value of the scale in a hard scattering * as defined by the Handlers which performed the hard scattering. */ Energy2 theScaleMin; /** * The minimum and maximum value of the scale in a hard scattering * as defined by the Handlers which performed the hard scattering. */ Energy2 theScaleMax; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initMECuts; /** * Private and non-existent assignment operator. */ - MECuts & operator=(const MECuts &); + MECuts & operator=(const MECuts &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * MECuts. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of MECuts. */ typedef Interfaced NthBase; }; /** * This template specialization informs ThePEG about the name of the * MECuts class. */ template <> struct ClassTraits: /** Return the class name. */ public ClassTraitsBase { static string className() { return "ThePEG::MECuts"; } }; /** @endcond */ } #endif /* ThePEG_MECuts_H */ diff --git a/MatrixElement/MEGG2GG.h b/MatrixElement/MEGG2GG.h --- a/MatrixElement/MEGG2GG.h +++ b/MatrixElement/MEGG2GG.h @@ -1,177 +1,177 @@ // -*- C++ -*- // // MEGG2GG.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEGG2GG_H #define ThePEG_MEGG2GG_H // This is the declaration of the MEGG2GG class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * MEGG2GG inherits from ME2to2QCD and implements the standard * \f$gg\rightarrow gg\f$ matrix element. * * @see \ref MEGG2GGInterfaces "The interfaces" * defined for MEGG2GG. * @see ME2to2QCD */ class MEGG2GG: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA1() const { return sqr(1.0 + sHat()/tHat()) + 0.5; } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB1() const { return sqr(1.0 + uHat()/sHat()) + 0.5; } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colC1() const { return sqr(1.0 + tHat()/uHat()) + 0.5; } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA2() const { return 0.5 + sqr(1.0 + tHat()/sHat()); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB2() const { return 0.5 + sqr(1.0 + sHat()/uHat()); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colC2() const { return 0.5 + sqr(1.0 + uHat()/tHat()); } //@} 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; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEGG2GG; /** * Private and non-existent assignment operator. */ - MEGG2GG & operator=(const MEGG2GG &); + MEGG2GG & operator=(const MEGG2GG &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEGG2GG. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEGG2GG. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEGG2GG class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEGG2GG"; } /** Return the name of the shared library be loaded to get * access to the MEGG2GG class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEGG2GG_H */ diff --git a/MatrixElement/MEGG2QQ.h b/MatrixElement/MEGG2QQ.h --- a/MatrixElement/MEGG2QQ.h +++ b/MatrixElement/MEGG2QQ.h @@ -1,159 +1,159 @@ // -*- C++ -*- // // MEGG2QQ.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEGG2QQ_H #define ThePEG_MEGG2QQ_H // This is the declaration of the MEGG2QQ class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * MEGG2QQ inherits from ME2to2QCD and implements the standard * \f$gg\rightarrow gq\bar{q}\f$ matrix element. * * @see \ref MEGG2QQInterfaces "The interfaces" * defined for MEGG2QQ. * @see ME2to2QCD */ class MEGG2QQ: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA() const { return uHat()/tHat() - 2.0*sqr(uHat()/sHat()); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB() const { return tHat()/uHat() - 2.0*sqr(tHat()/sHat()); } //@} 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; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEGG2QQ; /** * Private and non-existent assignment operator. */ - MEGG2QQ & operator=(const MEGG2QQ &); + MEGG2QQ & operator=(const MEGG2QQ &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEGG2QQ. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEGG2QQ. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEGG2QQ class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEGG2QQ"; } /** Return the name of the shared library be loaded to get * access to the MEGG2QQ class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEGG2QQ_H */ diff --git a/MatrixElement/MEGroup.h b/MatrixElement/MEGroup.h --- a/MatrixElement/MEGroup.h +++ b/MatrixElement/MEGroup.h @@ -1,527 +1,527 @@ // -*- C++ -*- // // MEGroup.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad // Copyright (C) 2009-2017 Simon Platzer // // 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_MEGroup_H #define ThePEG_MEGroup_H // This is the declaration of the MEGroup class. #include "ThePEG/MatrixElement/MEBase.h" #include "ThePEG/Cuts/Cuts.fh" #include "MEGroup.fh" namespace ThePEG { /** * The MEGroup class represents a 'head' matrix element * in association with a group of dependent matrix elements. * It basically acts as a wrapper around its head matrix element * however supplying additional information to the corresponding * StdXCombGroup object. * * @see StdXCombGroup * */ class MEGroup: public MEBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ MEGroup(); /** * Destructor. */ virtual ~MEGroup(); //@} public: /** @name Virtual functions from MEBase. */ //@{ /** * Return the order in \f$\alpha_S\f$ in which this matrix element * is given. */ virtual unsigned int orderInAlphaS() const { return head()->orderInAlphaS(); } /** * Return the order in \f$\alpha_{EM}\f$ in which this matrix * element is given. Returns 0. */ virtual unsigned int orderInAlphaEW() const { return head()->orderInAlphaEW(); } /** * 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 head()->me2(); } /** * Return the scale associated with the phase space point provided * by the last call to setKinematics(). */ virtual Energy2 scale() const { return head()->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 head()->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 head()->alphaEM(); } /** * 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() { MEBase::setKinematics(); head()->setKinematics(); } /** * construct the spin information for the interaction */ virtual void constructVertex(tSubProPtr sub) { head()->constructVertex(sub); } /** * construct the spin information for the interaction */ virtual void constructVertex(tSubProPtr sub, const ColourLines* cl) { head()->constructVertex(sub,cl); } /** * The number of internal degreed of freedom used in the matrix * element. This default version returns 0; */ virtual int nDim() const { return theNDim; } /** * 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); /** * Return true, if this matrix element expects * the incoming partons in their center-of-mass system */ virtual bool wantCMS () const { return head()->wantCMS(); } /** * Return the matrix element squared differential in the variables * given by the last call to generateKinematics(). */ virtual CrossSection dSigHatDR() const { return head()->dSigHatDR(); } /** * 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 head()->haveX1X2(); } /** * Return true, if this matrix element provides the PDF * weight for the first incoming parton itself. */ virtual bool havePDFWeight1 () const { return head()->havePDFWeight1(); } /** * Return true, if this matrix element provides the PDF * weight for the second incoming parton itself. */ virtual bool havePDFWeight2 () const { return head()->havePDFWeight2(); } /** * 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 head()->keepRandomNumbers(); } /** * 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) { head()->generateSubCollision(sub); } /** * Clear the information previously provided by a call to * setKinematics(...). */ virtual void clearKinematics(); /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() const { head()->diagrams(); useDiagrams(head()); } /** * 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 head()->noMirror(); } /** * Return a Selector with possible colour geometries for the selected * diagram weighted by their relative probabilities. */ virtual Selector colourGeometries(tcDiagPtr diag) const { return head()->colourGeometries(diag); } /** * 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 head()->selectColourGeometry(diag); } /** * 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 diagrams(const DiagramVector & dv) const { return head()->diagrams(dv); } /** * Select a diagram. Default version uses diagrams(const * DiagramVector &) to select a diagram according to the * weights. This is the only method used that should be outside of * MEBase. */ virtual DiagramIndex diagram(const DiagramVector & dv) const { DiagramIndex res = head()->diagram(dv); return res; } /** * Set the XComb object to be used in the next call to * generateKinematics() and dSigHatDR(). */ virtual void setXComb(tStdXCombPtr xc) { MEBase::setXComb(xc); head()->setXComb(xc); } /** * If this matrix element is to be used 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. */ virtual int maxMultCKKW() const { return head()->maxMultCKKW(); } /** * If this matrix element is to be used 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. */ virtual int minMultCKKW() const { return head()->minMultCKKW(); } /** * If this matrix element is to be used together with others for * CKKW reweighting and veto, this will set the multiplicity of * outgoing particles in the highest multiplicity matrix element in * the group. */ virtual void maxMultCKKW(int mult) { head()->maxMultCKKW(mult); } /** * If this matrix element is to be used together with others for * CKKW reweighting and veto, this will set the multiplicity of * outgoing particles in the lowest multiplicity matrix element in * the group. */ virtual void minMultCKKW(int mult) { head()->minMultCKKW(mult); } /** * Inform this matrix element that a new phase space * point is about to be generated, so all caches should * be flushed. */ virtual void flushCaches() { head()->flushCaches(); } /** * 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() {} //@} public: /** * Return the head matrix element. */ tMEPtr head() const { return theHead; } /** * Visit the dependent matrix elements */ const MEVector& dependent() const { return theDependent; } /** * Set the head matrix element. */ void head(tMEPtr me) { theHead = me; } /** * Access the dependent matrix elements */ MEVector& dependent() { return theDependent; } /** * Return the random number offset to access the random * numbers provided for the given matrix element to generate * dependent kinematics. */ int dependentOffset(tMEPtr dep) const; /** * 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()); /** * Create a dependent xcomb object to be used * for the given process steered bythe head object and * dependent matrix element. */ virtual vector makeDependentXCombs(tStdXCombPtr xcHead, const cPDVector& proc, tMEPtr depME, const PartonPairVec& allPBins) const; /** * Fill the projectors object of xcombs to choose subprocesses * different than the one currently integrated. */ virtual void fillProjectors() { head()->fillProjectors(); } /** * Return true, if projectors will be used */ virtual bool willProject() const { return false; } /** * Return true, if this MEGroup will reweight the contributing cross * sections. */ virtual bool groupReweighted() const { return false; } /** * Reweight the head cross section */ virtual double reweightHead(const vector&) { return 1.; } /** * Reweight the dependent cross section */ virtual double reweightDependent(tStdXCombPtr, const vector&) { return 1.; } /** * 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; } public: /** * Return true, if the same additional random numbers * should be presented to any of the dependent * matrix elements. */ virtual bool uniformAdditional() const = 0; /** * 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 = 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 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(); /** * 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 head matrix element. */ MEPtr theHead; /** * The dependent matrix elements. */ MEVector theDependent; /** * Offsets to access additional random numbers * required by the dependent matrix elements. */ map theNDimMap; /** * The total number of random numbers required. */ int theNDim; private: /** * Describe a class with persistent data. */ static AbstractClassDescription initMEGroup; /** * Private and non-existent assignment operator. */ - MEGroup & operator=(const MEGroup &); + MEGroup & operator=(const MEGroup &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * MEGroup. */ template <> struct BaseClassTrait { /** Typedef of the base class of MEGroup. */ typedef MEBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * MEGroup class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::MEGroup"; } }; /** @endcond */ } #endif /* ThePEG_MEGroup_H */ diff --git a/MatrixElement/MENCDIS.h b/MatrixElement/MENCDIS.h --- a/MatrixElement/MENCDIS.h +++ b/MatrixElement/MENCDIS.h @@ -1,215 +1,215 @@ // -*- C++ -*- // // MENCDIS.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MENCDIS_H #define ThePEG_MENCDIS_H // This is the declaration of the MENCDIS class. #include "ThePEG/MatrixElement/ME2to2QCD.h" // #include "MENCDIS.fh" // #include "MENCDIS.xh" namespace ThePEG { /** * The MENCDIS class implements the \f$e^\pm q\rightarrow e^\pm q\f$ * matrix element. Both the gamma and \f$Z^0\f$ terms as well * as the interference term is included. Although not a strict QCD * matrix element the class inherits from ME2to2QCD, mainly to inherit * the parameter for the number of active quark flavours. * * @see \ref MENCDISInterfaces "The interfaces" * defined for MENCDIS. * @see ME2to2QCD */ class MENCDIS: public ME2to2QCD { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ MENCDIS(); /** * Copy-constructor. */ MENCDIS(const MENCDIS &); /** * Destructor. */ virtual ~MENCDIS(); //@} public: /** @name Virtual functions required by the MEBase class. */ //@{ /** * Return the order in \f$\alpha_S\f$ in which this matrix element * is given. Returns . */ virtual unsigned int orderInAlphaS() const; /** * Return the order in \f$\alpha_{EM}\f$ in which this matrix * element is given. Returns 2. */ 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; /** * 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; /** * Return the scale associated with the last set phase space point. */ virtual Energy2 scale() 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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 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: /** * The squared mass of the Z0. */ Energy2 mZ2; /** * The last gamma term to be used to select primary diagram. */ mutable double lastG; /** * The last Z0 term to be used to select primary diagram. */ mutable double lastZ; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initMENCDIS; /** * Private and non-existent assignment operator. */ - MENCDIS & operator=(const MENCDIS &); + MENCDIS & operator=(const MENCDIS &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MENCDIS. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MENCDIS. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of the * MENCDIS class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MENCDIS"; } /** Return the name of the shared library be loaded to get * access to the MENCDIS class and every other class it uses * (except the base class). */ static string library() { return "MENCDIS.so"; } }; /** @endcond */ } #endif /* ThePEG_MENCDIS_H */ diff --git a/MatrixElement/MEQG2QG.h b/MatrixElement/MEQG2QG.h --- a/MatrixElement/MEQG2QG.h +++ b/MatrixElement/MEQG2QG.h @@ -1,171 +1,171 @@ // -*- C++ -*- // // MEQG2QG.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEQG2QG_H #define ThePEG_MEQG2QG_H // This is the declaration of the MEQG2QG class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * MEQG2QG inherits from ME2to2QCD and implements the * standard \f$qg\rightarrow qg\f$ matrix element. * * @see \ref MEQG2QGInterfaces "The interfaces" * defined for MEQG2QG. * @see ME2to2QCD */ class MEQG2QG: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA1() const { return ( interference()? 2.25: 2.0 )*sqr(uHat()/tHat()); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB1() const { return ( interference()? 2.25: 2.0 )*sqr(sHat()/tHat()); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA2() const { return -uHat()/sHat(); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB2() const { return -sHat()/uHat(); } //@} 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; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEQG2QG; /** * Private and non-existent assignment operator. */ - MEQG2QG & operator=(const MEQG2QG &); + MEQG2QG & operator=(const MEQG2QG &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEQG2QG. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEQG2QG. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEQG2QG class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEQG2QG"; } /** Return the name of the shared library be loaded to get * access to the MEQG2QG class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEQG2QG_H */ diff --git a/MatrixElement/MEQQ2GG.h b/MatrixElement/MEQQ2GG.h --- a/MatrixElement/MEQQ2GG.h +++ b/MatrixElement/MEQQ2GG.h @@ -1,161 +1,161 @@ // -*- C++ -*- // // MEQQ2GG.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEQQ2GG_H #define ThePEG_MEQQ2GG_H // This is the declaration of the MEQQ2GG class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * MEQQ2GG inherits from ME2to2QCD and implements the standard * \f$q\bar{q}\rightarrow gg\f$ matrix element. * * @see \ref MEQQ2GGInterfaces "The interfaces" * defined for MEQQ2GG. * @see ME2to2QCD */ class MEQQ2GG: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA() const { return uHat()/tHat() - 2.0*sqr(uHat()/sHat()); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB() const { return tHat()/uHat() - 2.0*sqr(tHat()/sHat()); } //@} 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; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEQQ2GG; /** * Private and non-existent assignment operator. */ - MEQQ2GG & operator=(const MEQQ2GG &); + MEQQ2GG & operator=(const MEQQ2GG &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEQQ2GG. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEQQ2GG. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEQQ2GG class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEQQ2GG"; } /** Return the name of the shared library be loaded to get * access to the MEQQ2GG class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEQQ2GG_H */ diff --git a/MatrixElement/MEQQ2QQ3.h b/MatrixElement/MEQQ2QQ3.h --- a/MatrixElement/MEQQ2QQ3.h +++ b/MatrixElement/MEQQ2QQ3.h @@ -1,162 +1,162 @@ // -*- C++ -*- // // MEQQ2QQ3.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEQQ2QQ_H #define ThePEG_MEQQ2QQ_H // This is the declaration of the MEQQ2QQ class. #include "ThePEG/MatrixElement/ME2to2QCD.h" // #include "MEQQ2QQ.fh" // #include "MEQQ2QQ.xh" namespace ThePEG { /** * MEQQ2QQ inherits from ME2to2QCD and implements the standard * \f$q_iq_i\rightarrow q_iq_i\f$ matrix element. * * @see \ref MEQQ2QQInterfaces "The interfaces" * defined for MEQQ2QQ. * @see ME2to2QCD */ class MEQQ2QQ: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA() const { return (sqr(uHat()) + sqr(sHat()))/sqr(tHat()); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB() const { return (sqr(tHat()) + sqr(sHat()))/sqr(uHat()); } //@} 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; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEQQ2QQ; /** * Private and non-existent assignment operator. */ - MEQQ2QQ & operator=(const MEQQ2QQ &); + MEQQ2QQ & operator=(const MEQQ2QQ &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEQQ2QQ. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEQQ2QQ. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEQQ2QQ class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEQQ2QQ"; } /** Return the name of the shared library be loaded to get * access to the MEQQ2QQ class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEQQ2QQ_H */ diff --git a/MatrixElement/MEQQ2qq2.h b/MatrixElement/MEQQ2qq2.h --- a/MatrixElement/MEQQ2qq2.h +++ b/MatrixElement/MEQQ2qq2.h @@ -1,150 +1,150 @@ // -*- C++ -*- // // MEQQ2qq2.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEQQ2qq_H #define ThePEG_MEQQ2qq_H // This is the declaration of the MEQQ2qq class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * MEQQ2qq inherits from ME2to2QCD and implements the standard * \f$q\bar{q}\rightarrow q'\bar{q'}\f$ matrix element. * * @see \ref MEQQ2qqInterfaces "The interfaces" * defined for MEQQ2qq. * @see ME2to2QCD */ class MEQQ2qq: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA() const { return (sqr(uHat()) + sqr(tHat()))/sqr(sHat()); } //@} 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEQQ2qq; /** * Private and non-existent assignment operator. */ - MEQQ2qq & operator=(const MEQQ2qq &); + MEQQ2qq & operator=(const MEQQ2qq &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEQQ2qq. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEQQ2qq. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEQQ2qq class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEQQ2qq"; } /** Return the name of the shared library be loaded to get * access to the MEQQ2qq class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEQQ2qq_H */ diff --git a/MatrixElement/MEQq2Qq4.h b/MatrixElement/MEQq2Qq4.h --- a/MatrixElement/MEQq2Qq4.h +++ b/MatrixElement/MEQq2Qq4.h @@ -1,150 +1,150 @@ // -*- C++ -*- // // MEQq2Qq4.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEQq2Qq_H #define ThePEG_MEQq2Qq_H // This is the declaration of the MEQq2Qq class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * MEQq2Qq inherits from ME2to2QCD and implements the standard * \f$q_iq_j\rightarrow q_iq_j\f$ mmatrix element. * * @see \ref MEQq2QqInterfaces "The interfaces" * defined for MEQq2Qq. * @see ME2to2QCD */ class MEQq2Qq: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA() const { return (sqr(uHat()) + sqr(sHat()))/sqr(tHat()); } //@} 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEQq2Qq; /** * Private and non-existent assignment operator. */ - MEQq2Qq & operator=(const MEQq2Qq &); + MEQq2Qq & operator=(const MEQq2Qq &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEQq2Qq. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEQq2Qq. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEQq2Qq class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEQq2Qq"; } /** Return the name of the shared library be loaded to get * access to the MEQq2Qq class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEQq2Qq_H */ diff --git a/MatrixElement/MEee2gZ2qq.h b/MatrixElement/MEee2gZ2qq.h --- a/MatrixElement/MEee2gZ2qq.h +++ b/MatrixElement/MEee2gZ2qq.h @@ -1,215 +1,215 @@ // -*- C++ -*- // // MEee2gZ2qq.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEee2gZ2qq_H #define ThePEG_MEee2gZ2qq_H // This is the declaration of the MEee2gZ2qq class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * The MEee2gZ2qq class implements the * \f$e^+e^-\rightarrow\gamma/Z^0\rightarrow q\bar{q}\f$ matrix * element. Both the continuum and \f$Z^0\f$ pole term as well as the * interference term is included. Although not a strict QCD matrix * element the class inherits from ME2to2QCD, mainly to inherit the * parameter for the number of active quark flavours. * * @see \ref MEee2gZ2qqInterfaces "The interfaces" * defined for MEee2gZ2qq. * @see ME2to2QCD */ class MEee2gZ2qq: public ME2to2QCD { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ MEee2gZ2qq(); //@} public: /** @name Virtual functions required by the MEBase class. */ //@{ /** * Return the order in \f$\alpha_S\f$ in which this matrix element * is given. Returns . */ virtual unsigned int orderInAlphaS() const; /** * Return the order in \f$\alpha_{EM}\f$ in which this matrix * element is given. Returns 2. */ 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; /** * 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; /** * Return the scale associated with the last set phase space point. */ virtual Energy2 scale() 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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 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: /** * Constants for the different terms set from the StandardModel in * the init() function. */ vector coefs; /** * The squared mass of the Z0. */ Energy2 mZ2; /** * The squared width of the Z0. */ Energy2 GZ2; /** * The last continuum term to be used to select primary diagram. */ mutable double lastCont; /** * The last Breit-Wigner term to be used to select primary diagram. */ mutable double lastBW; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initMEee2gZ2qq; /** * Private and non-existent assignment operator. */ - MEee2gZ2qq & operator=(const MEee2gZ2qq &); + MEee2gZ2qq & operator=(const MEee2gZ2qq &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEee2gZ2qq. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEee2gZ2qq. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of the * MEee2gZ2qq class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEee2gZ2qq"; } /** Return the name of the shared library be loaded to get * access to the MEee2gZ2qq class and every other class it uses * (except the base class). */ static string library() { return "MEee2gZ2qq.so"; } }; /** @endcond */ } #endif /* ThePEG_MEee2gZ2qq_H */ diff --git a/MatrixElement/MEqq2qq1.h b/MatrixElement/MEqq2qq1.h --- a/MatrixElement/MEqq2qq1.h +++ b/MatrixElement/MEqq2qq1.h @@ -1,161 +1,161 @@ // -*- C++ -*- // // MEqq2qq1.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MEqq2qq_H #define ThePEG_MEqq2qq_H // This is the declaration of the MEqq2qq class. #include "ThePEG/MatrixElement/ME2to2QCD.h" namespace ThePEG { /** * MEqq2qq inherits from the ME2to2QCD and implements the standard * \f$q_i\bar{q}_i\rightarrow q_i\bar{q}_i\f$ matrix element. * * @see \ref MEqq2qqInterfaces "The interfaces" * defined for MEqq2qq. * @see ME2to2QCD */ class MEqq2qq: public ME2to2QCD { 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; /** * Add all possible diagrams with the add() function. */ virtual void getDiagrams() 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 colourGeometries(tcDiagPtr diag) 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 diagrams(const DiagramVector & dv) const; //@} protected: /** @name Internal functions returning the matrix element squared * for different colour configurations. */ //@{ /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colA() const { return (sqr(tHat()) + sqr(uHat()))/sqr(sHat()) + (interference()? -double(sqr(uHat())/(3.0*sHat()*tHat())): 0.0); } /** * Return the matrix element squared (without common pre-factors) * for the specific colour configuration. */ double colB() const { return (sqr(uHat()) + sqr(sHat()))/sqr(tHat()) + (interference()? -double(sqr(uHat())/(3.0*sHat()*tHat())): 0.0); } //@} 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; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initMEqq2qq; /** * Private and non-existent assignment operator. */ - MEqq2qq & operator=(const MEqq2qq &); + MEqq2qq & operator=(const MEqq2qq &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MEqq2qq. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MEqq2qq. */ typedef ME2to2QCD NthBase; }; /** This template specialization informs ThePEG about the name of * the MEqq2qq class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MEqq2qq"; } /** Return the name of the shared library be loaded to get * access to the MEqq2qq class and every other class it uses * (except the base class). */ static string library() { return "MEQCD.so"; } }; /** @endcond */ } #endif /* ThePEG_MEqq2qq_H */ diff --git a/MatrixElement/ReweightBase.h b/MatrixElement/ReweightBase.h --- a/MatrixElement/ReweightBase.h +++ b/MatrixElement/ReweightBase.h @@ -1,134 +1,134 @@ // -*- C++ -*- // // ReweightBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ReweightBase_H #define ThePEG_ReweightBase_H // This is the declaration of the ReweightBase class. #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/EventRecord/SubProcess.h" #include "ThePEG/Handlers/LastXCombInfo.h" #include "ThePEG/Handlers/StandardXComb.fh" namespace ThePEG { /** * The ReweightBase class is the base class of all objects * representing external biases to matrix elements. These can be used * to enhance certain matrix elements or certain phase space * regions. They can be used in two ways, either to completely change * the matrix element (re-weight), in which case the total cross * section will be affected or, when using weighted events in an * EventHandler, to pre-weight certain events but leaving the cross * section unchanged * * There is only one virtual function which must be overridden in * derived classes: weight(). * * @see \ref ReweightBaseInterfaces "The interfaces" * defined for ReweightBase. * @see MEBase * @see EventHandler * @see SubProcessHandler */ class ReweightBase: public HandlerBase, public LastXCombInfo<> { public: /** @name Standard constructors and destructors. */ //@{ /** * Destructor. */ virtual ~ReweightBase(); //@} public: /** * Return the wieght for the kinematical configuation provided by * the assigned XComb object (in the LastXCombInfo base class). */ virtual double weight() const = 0; /** * Assigne an XComb object with information about the sub-process to * be used in the reweighting. */ void setXComb(tXCombPtr xc); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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(); private: /** * Describe an abstract base class with persistent data. */ static AbstractClassDescription initReweightBase; /** * Private and non-existent assignment operator. */ - ReweightBase & operator=(const ReweightBase &); + ReweightBase & operator=(const ReweightBase &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the base class of * ReweightBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of ReweightBase. */ typedef HandlerBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * ReweightBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::ReweightBase"; } }; /** @endcond */ } #endif /* ThePEG_ReweightBase_H */ diff --git a/MatrixElement/ReweightConstant.h b/MatrixElement/ReweightConstant.h --- a/MatrixElement/ReweightConstant.h +++ b/MatrixElement/ReweightConstant.h @@ -1,145 +1,145 @@ // -*- C++ -*- // // ReweightConstant.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ReweightConstant_H #define THEPEG_ReweightConstant_H // // This is the declaration of the ReweightConstant class. // #include "ThePEG/MatrixElement/ReweightBase.h" namespace ThePEG { /** * The ReweightConstant class is a simple ReweightBase sub-class which * simply reweight an event with a constant. * * @see \ref ReweightConstantInterfaces "The interfaces" * defined for ReweightConstant. */ class ReweightConstant: public ReweightBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ ReweightConstant() : C(1.0) {} //@} public: /** * Return the wieght for the kinematical configuation provided by * the assigned XComb object (in the LastXCombInfo base class). */ virtual double weight() 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 constant to reweight with. */ double C; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initReweightConstant; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - ReweightConstant & operator=(const ReweightConstant &); + ReweightConstant & operator=(const ReweightConstant &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of ReweightConstant. */ template <> struct BaseClassTrait { /** Typedef of the first base class of ReweightConstant. */ typedef ReweightBase NthBase; }; /** This template specialization informs ThePEG about the name of * the ReweightConstant class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::ReweightConstant"; } /** Return the name of the shared library be loaded to get * access to the ReweightConstant class and every other class it uses * (except the base class). */ static string library() { return "ReweightConstant.so"; } }; /** @endcond */ } #endif /* THEPEG_ReweightConstant_H */ diff --git a/MatrixElement/ReweightMinPT.h b/MatrixElement/ReweightMinPT.h --- a/MatrixElement/ReweightMinPT.h +++ b/MatrixElement/ReweightMinPT.h @@ -1,147 +1,147 @@ // -*- C++ -*- // // ReweightMinPT.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ReweightMinPT_H #define ThePEG_ReweightMinPT_H // This is the declaration of the ReweightMinPT class. #include "ThePEG/MatrixElement/ReweightBase.h" namespace ThePEG { /** * The ReweightMinPT class reweights matrix elements with the minimum * of the transverse momenta of the outgoing partons to some power. * * @see ReweightBase * */ class ReweightMinPT: public ReweightBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ ReweightMinPT() : power(4.0), scale(50.0*GeV), onlyColoured(false) {} //@} public: /** * Return the wieght for the kinematical configuation provided by * the assigned XComb object (in the LastXCombInfo base class). */ virtual double weight() 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 weight is the minimum pt/scale to a \a power. */ double power; /** * The weight is the minimum pt/\a scale to a power. */ Energy scale; /** * Flag to indicate that only coloured partons should be considered. */ bool onlyColoured; private: /** * Describe a concrete base class with persistent data. */ static ClassDescription initReweightMinPT; /** * Private and non-existent assignment operator. */ - ReweightMinPT & operator=(const ReweightMinPT &); + ReweightMinPT & operator=(const ReweightMinPT &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of ReweightMinPT. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of ReweightMinPT. */ typedef ReweightBase NthBase; }; /** This template specialization informs ThePEG about the name of * the ReweightMinPT class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::ReweightMinPT"; } /** Return the name of the shared library be loaded to get * access to the ReweightMinPT class and every other class it uses * (except the base class). */ static string library() { return "ReweightMinPT.so"; } }; /** @endcond */ } #endif /* ThePEG_ReweightMinPT_H */ diff --git a/MatrixElement/Tree2toNDiagram.h b/MatrixElement/Tree2toNDiagram.h --- a/MatrixElement/Tree2toNDiagram.h +++ b/MatrixElement/Tree2toNDiagram.h @@ -1,351 +1,351 @@ // -*- C++ -*- // // Tree2toNDiagram.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Tree2toNDiagram_H #define ThePEG_Tree2toNDiagram_H // This is the declaration of the Tree2toNDiagram class. #include "ThePEG/MatrixElement/DiagramBase.h" #include "ThePEG/MatrixElement/ColourLines.h" #include "ThePEG/Handlers/StandardXComb.fh" #include "Tree2toNDiagram.xh" namespace ThePEG { /** * The Tree2toNDiagram class inherits from DiagramBase and represents * a Feynman tree diagram. It is represented by a chain of \f$n\f$ * space-like propagators, where one incoming particle has index 1 and * other incoming one index \f$n\f$. For adiagram with in total * \f$m\f$ propagators the timelike propagators are then numbered * \f$n+1\f$ through \f$m\f$. The vector of type of the propagators * are accessible from the partons() method, and the parents of * propagator \f$i\f$ form the parents(int) method. The parent of a * space-like propagator is simply the previous space-like one. The * parent of a time-like propagator is either a previous time-like * propagator or the first of the connecting space-like ones. * * A Tree2toNDiagram is created by first constructing it with an * integer corresponding to the number of space-like propagators. Then * the comma operator is used to add first the particle data objects * corresponding to the space-like propagators, then the time-like * ones preceeded with the index of their parents. To complete a * Tree2toNDiagram, a negative integer is added with the comma * operator. This number is then used as an identifier. Note that the * parent must have been added before a child is. As an example, the * s-channel diagram \f$e \nu_e \rightarrow u \bar{d}\f$ is created * thus:
* Tree2toNDiagram(2),eplus,nue,1,Wplus,3,u,3,dbar.
* Similarly the t-channel diagram \f$e d \rightarrow \nu_e u\f$ is * created thus:
* Tree2toNDiagram(3),eplus,Wplus,d,1,nu,2,u. Note that * only two chidren are allowed per propagator. This means that * four-propagator vertices are not allowed, but must be represented * by two three-propagator ones. * * Please note that for technical reasons, when specifying the * diagrams with the comma operator the numbering of the particles is * \f$1\ldots m\f$, while the internal representation (in the * parent(int) and children(int) function) is using \f$0\ldots m-1\f$ * * @see DiagramBase * @see ColourLines * */ class Tree2toNDiagram: public DiagramBase { public: /** The integer type reresenting vector sizes. */ typedef cPDVector::size_type size_type; /** A multi-set of particle data objects. */ typedef multiset PDMSet; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ Tree2toNDiagram() : theNSpace(0), theNOutgoing(0), nextOrig(0) {} /** * Destructor. */ ~Tree2toNDiagram(); /** * The standard constructor giving the number of \a space-like * propagators. */ explicit Tree2toNDiagram(int space) : theNSpace(space), theNOutgoing(0), nextOrig(-1) {} //@} public: /** * If less than zero indicate that this tree is competed. Otherwise * signal the parent of the next added parton. */ Tree2toNDiagram & operator,(int o) { nextOrig = o - 1; if ( o < 0 ) check(); return *this; } /** * Add a space- or time-like parton. */ Tree2toNDiagram & operator,(PDPtr pd) { return add(pd); } /** * Add a space- or time-like parton. */ Tree2toNDiagram & operator,(cPDPtr pd) { return add(pd); } /** * Add a space- or time-like parton. */ Tree2toNDiagram & operator,(tPDPtr pd) { return add(pd); } /** * Add a space- or time-like parton. */ Tree2toNDiagram & operator,(tcPDPtr pd) { return add(pd); } /** * Construct a sub process corresponding to this diagram. The * incoming partons, and the momenta of the outgoing ones, are given * by the XComb object. All parent/children pointers should be set * correspondingly and the partons should be colour connected as * specified by the ColourLines object. */ virtual tPVector construct(SubProPtr sb, const StandardXComb &, const ColourLines &) const; /** * Return the types of the incoming partons. */ tcPDPair incoming() const; /** * Return the complete vector of partons in this tree diagram. */ const cPDVector & allPartons() const { return thePartons; } /** * Return the outgoing parton types of this tree diagram. */ tcPDVector outgoing() const; /** * Return the incoming followed by the outgoing parton types of this * tree diagram. */ tcPDVector external() const; /** * Return the index of the parent of the given parton. */ int parent(int i) const { return theParents[i]; } /** * Return the indices of the children of the given parton. */ pair children(int) const; /** * Return the number of space-like partons */ int nSpace() const { return theNSpace; } /** * Extend this diagram to accomodate the given number of space-like lines */ void resize(size_type nSpace) { theNSpace = max(nSpace,theNSpace); } /** * Return the number of outgoing partons. */ int nOutgoing() const { return theNOutgoing; } private: /** * Check the consistency of this tree diagram. */ void check(); /** * Add a space-like parton to this diagram. */ void addSpacelike(tcPDPtr pd) { if ( thePartons.size() >= theNSpace ) throw Tree2toNDiagramError(); theParents.push_back(thePartons.size() - 1); thePartons.push_back(pd); } /** * Add a time-like parton to this diagram. */ void addTimelike(tcPDPtr); /** * Add a time-like parton to this diagram indicating its \a origin. */ void addTimelike(tcPDPtr, size_type origin); /** * Add a parton to this diagram. */ Tree2toNDiagram & add(tcPDPtr); public: /** * Compare this diagram's topology to another one. */ virtual bool isSame(tcDiagPtr) const; /** * Compare this diagram's topology to another one modulo * permutations of external legs; provide a map of this diagram's * external legs to the other diagram's external legs. */ virtual bool isSame(tcDiagPtr, map&) const; /** * Check for equality. */ bool equals(Ptr::tcptr, int start=0, int startCmp=0) const; /** * Check for equality modulo permutations of external legs. */ bool equals(Ptr::tcptr, map&, int start=0, int startCmp=0) const; /** * Merge the two external partons referred to by indices as in the * partons() vector returned by DiagramBase. If both are timelike, * the parent will become the new outgoing parton, if one is space- * and the other timelike, the spacelike child will become the new * incoming parton. Return the position of the merged parton in the * resulting diagram or -1 if the merging is not possible. In * addition, return a mapping of a certain (non-merged) external leg * id to the id in the merged diagram. */ int mergeEmission(int emitter, int id, map& remap); /** * Translate a parton's id in the diagram to a parton's id in a * vector of incoming followed by outgoing partons. */ int externalId(int id) const; /** * Translate a parton's id in a vector of incoming followed by * outgoing partons to a parton's id in the diagram. */ int diagramId(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); //@} private: /** * The number of space-like partons */ size_type theNSpace; /** * The number of outgoing partons. */ int theNOutgoing; /** * The parent of the next added parton. */ int nextOrig; /** * The complete vector of partons in this tree diagram. */ cPDVector thePartons; /** * The index of the parents. */ vector theParents; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initTree2toNDiagram; /** * Private and non-existent assignment operator. */ - Tree2toNDiagram & operator=(const Tree2toNDiagram &); + Tree2toNDiagram & operator=(const Tree2toNDiagram &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** * This template specialization informs ThePEG about the * base class of Tree2toNDiagram. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the base class of Tree2toNDiagram. */ typedef DiagramBase NthBase; }; /** * This template specialization informs ThePEG about the name of the * Tree2toNDiagram class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return the class name. */ static string className() { return "ThePEG::Tree2toNDiagram"; } }; /** @endcond */ } #endif /* ThePEG_Tree2toNDiagram_H */ diff --git a/PDF/BeamParticleData.h b/PDF/BeamParticleData.h --- a/PDF/BeamParticleData.h +++ b/PDF/BeamParticleData.h @@ -1,152 +1,152 @@ // -*- C++ -*- // // BeamParticleData.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_BeamParticleData_H #define ThePEG_BeamParticleData_H // This is the declaration of the BeamParticleData class. #include "ThePEG/PDT/ParticleData.h" #include "ThePEG/PDF/PDFBase.h" #include "BeamParticleData.xh" namespace ThePEG { /** * BeamParticleData inherits from the ParticleData class and is used * for particles which have information about their sub-structure * implemented as a pointer to a PDFBase object. * * @see \ref BeamParticleDataInterfaces "The interfaces" * defined for BeamParticleData. * @see ParticleData * @see PDFBase */ class BeamParticleData: public virtual ParticleData { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ BeamParticleData() {} //@} /** @name The Create methods are special interfaces for ParticleData classes. */ //@{ /** * Create a Particle which is its own anti-particle. */ static PDPtr Create(long newId, string newPDGName); /** * Create a particle - anti particle pair. Note that setting the * parton density object on this particle does not change the parton * density of the anti particle iven if synchronized() is true. */ static PDPair Create(long newId, string newPDGName, string newAntiPDGName); //@} public: /** * Return a pointer to the parton density object describing the * sub-structure of this particle type. */ tcPDFPtr pdf() 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); //@} /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** * Protected constructor only to be used by subclasses or by the * Create method. */ BeamParticleData(long newId, string newPDGName); /** * ParticleData clone method */ virtual PDPtr pdclone() const; private: /** * Set the parton density object. */ void setPDF(PDFPtr); private: /** * The pointer to the parton density object. */ PDFPtr thePDF; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initBeamParticleData; /** * Private and non-existent assignment operator. */ - BeamParticleData & operator=(const BeamParticleData &); + BeamParticleData & operator=(const BeamParticleData &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of BeamParticleData. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of BeamParticleData. */ typedef ParticleData NthBase; }; /** This template specialization informs ThePEG about the name of the * BeamParticleData class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::BeamParticleData"; } }; /** @endcond */ } #endif /* ThePEG_BeamParticleData_H */ diff --git a/PDF/BudnevPDF.h b/PDF/BudnevPDF.h --- a/PDF/BudnevPDF.h +++ b/PDF/BudnevPDF.h @@ -1,228 +1,228 @@ // -*- C++ -*- #ifndef THEPEG_BudnevPDF_H #define THEPEG_BudnevPDF_H // // This is the declaration of the BudnevPDF class. // #include "ThePEG/PDF/PDFBase.h" namespace ThePEG { using namespace ThePEG; /** * Here is the documentation of the BudnevPDF class. * * @see \ref BudnevPDFInterfaces "The interfaces" * defined for BudnevPDF. */ class BudnevPDF: public PDFBase { public: /** * Default constructor */ BudnevPDF(); /** @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(); 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 static object used to initialize the description of this class. * Indicates that this is an concrete class without persistent data. */ static ClassDescription initBudnevPDF; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - BudnevPDF & operator=(const BudnevPDF &); + BudnevPDF & operator=(const BudnevPDF &) = delete; private: /** * Minimum \f$Q^2\f$ for the photon */ Energy2 _q2min; /** * Maximum \f$Q^2\f$ for the photon */ Energy2 _q2max; /** * Fitted scale \f$Q{_0}{^2}=0.71GeV^2\f$ */ const Energy2 _q02; /** * Magenetic moment of the proton \f$ \mu_{p}^2 = 7.78\f$ */ const double _mup2; /** * Helper function for magnetic a electric form factors in Budnev flux */ double gm2(Energy2 q2) const; /** * Helper function for magnetic a electric form factors in Budnev flux */ double ge2(Energy2 q2) const; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of BudnevPDF. */ template <> struct BaseClassTrait { /** Typedef of the first base class of BudnevPDF. */ typedef PDFBase NthBase; }; /** This template specialization informs ThePEG about the name of * the BudnevPDF class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::BudnevPDF"; } /** * The name of a file containing the dynamic library where the class * BudnevPDF is implemented. It may also include several, space-separated, * libraries if the class BudnevPDF 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 "BudnevPDF.so"; } }; /** @endcond */ } #endif /* THEPEG_BudnevPDF_H */ diff --git a/PDF/GRV94L.h b/PDF/GRV94L.h --- a/PDF/GRV94L.h +++ b/PDF/GRV94L.h @@ -1,156 +1,156 @@ // -*- C++ -*- // // GRV94L.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_GRV94L_H #define ThePEG_GRV94L_H // This is the declaration of the GRV94L class. #include "ThePEG/PDF/GRVBase.h" namespace ThePEG { /** * GRV94L inherits from PDFBase via the GRVBase class and implements * the GRV94L parton densities for (anti) protons and neutrons. * * @see \ref GRV94LInterfaces "The interfaces" * defined for GRV94L. */ class GRV94L: public GRVBase { /** * Return the cutoff scale. */ Energy2 mu2() const { return 0.23*GeV2; } /** * Return the square of \f$\Lambda_{QCD}\f$ used. */ Energy2 lam2() const { return sqr(0.2322*GeV); } protected: /** * Setup the \a l\f$=\log{1/x}\f$ and \a scale \f$Q^2\f$ to be used * in the following call to uv(), dv)=, etc. */ virtual void setup(double l, Energy2 scale) const; /** * Return the value of the u valens density for the values previously given * by setup(). */ virtual double uv() const; /** * Return the value of the d valens density for the values previously given * by setup(). */ virtual double dv() const; /** * Return the value of the difference between the u and d sea * densities for the values previously given by setup(). */ virtual double del() const; /** * Return the value of the average u and d sea densities for the * values previously given by setup(). */ virtual double udb() const; /** * Return the value of the s density for the values previously given by * setup(). */ virtual double sb() const; /** * Return the value of the c density for the values previously given by * setup(). */ virtual double cb() const; /** * Return the value of the b density for the values previously given by * setup(). */ virtual double bb() const; /** * Return the value of the gluon densities for the values previously * given by setup(). */ virtual double gl() const; public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initGRV94L; /** * Private and non-existent assignment operator. */ - GRV94L & operator=(const GRV94L &); + GRV94L & operator=(const GRV94L &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of GRV94L. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of GRV94L. */ typedef GRVBase NthBase; }; /** This template specialization informs ThePEG about the name of the * GRV94L class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::GRV94L"; } /** Return the name of the shared library be loaded to get access to * the GRV94L class and every other class it uses (except * the base class). */ static string library() { return "GRV94L.so"; } }; /** @endcond */ } #endif /* ThePEG_GRV94L_H */ diff --git a/PDF/GRV94M.h b/PDF/GRV94M.h --- a/PDF/GRV94M.h +++ b/PDF/GRV94M.h @@ -1,156 +1,156 @@ // -*- C++ -*- // // GRV94M.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_GRV94M_H #define ThePEG_GRV94M_H // This is the declaration of the GRV94M class. #include "ThePEG/PDF/GRVBase.h" namespace ThePEG { /** * GRV94M iherits from PDFBase via the GRVBase class and implements * the GRV94M parton densities for (anti) protons ad neutrons. * * @see \ref GRV94MInterfaces "The interfaces" * defined for GRV94M. */ class GRV94M: public GRVBase { /** * Return the cutoff scale. */ Energy2 mu2() const { return 0.34*GeV2; } /** * Return the square of \f$\Lambda_{QCD}\f$ used. */ Energy2 lam2() const { return sqr(0.248*GeV); } protected: /** * Setup the \a l\f$=\log{1/x}\f$ and \a scale \f$Q^2\f$ to be used * in the following call to uv(), dv)=, etc. */ virtual void setup(double l, Energy2 scale) const; /** * Return the value of the u valens density for the values previously given * by setup(). */ virtual double uv() const; /** * Return the value of the d valens density for the values previously given * by setup(). */ virtual double dv() const; /** * Return the value of the difference between the u and d sea * densities for the values previously given by setup(). */ virtual double del() const; /** * Return the value of the average u and d sea densities for the * values previously given by setup(). */ virtual double udb() const; /** * Return the value of the s density for the values previously given by * setup(). */ virtual double sb() const; /** * Return the value of the c density for the values previously given by * setup(). */ virtual double cb() const; /** * Return the value of the b density for the values previously given by * setup(). */ virtual double bb() const; /** * Return the value of the gluon densities for the values previously * given by setup(). */ virtual double gl() const; public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initGRV94M; /** * Private and non-existent assignment operator. */ - GRV94M & operator=(const GRV94M &); + GRV94M & operator=(const GRV94M &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of GRV94M. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of GRV94M. */ typedef GRVBase NthBase; }; /** This template specialization informs ThePEG about the name of the * GRV94M class and the shared object where it is defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::GRV94M"; } /** Return the name of the shared library be loaded to get access to * the GRV94M class and every other class it uses (except * the base class). */ static string library() { return "GRV94M.so"; } }; /** @endcond */ } #endif /* ThePEG_GRV94M_H */ diff --git a/PDF/GRVBase.h b/PDF/GRVBase.h --- a/PDF/GRVBase.h +++ b/PDF/GRVBase.h @@ -1,372 +1,372 @@ // -*- C++ -*- // // GRVBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_GRVBase_H #define ThePEG_GRVBase_H // This is the declaration of the GRVBase class. #include "ThePEG/PDF/PDFBase.h" namespace ThePEG { /** * GRVBase inherits from PDFBase and is used as a base class for all * GRV parton densities. * * @see \ref GRVBaseInterfaces "The interfaces" * defined for GRVBase. */ class GRVBase: public PDFBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ GRVBase(); /** * Destructor. */ virtual ~GRVBase(); //@} public: /** @name Virtual functions required by the PDFBase class. */ //@{ /** * Return true if this PDF can handle the extraction of parton from the * given particle, ie. if the particle is a proton or neutron. */ virtual bool canHandleParticle(tcPDPtr particle) const; /** * Return the parton types which are described by these parton * densities. */ virtual cPDVector partons(tcPDPtr p) const; /** * Return the value of the density of parton at the given a scale * and log fractional momentum l (the optional virtuality of the * incoming particle is not used). */ virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale) const; /** * Return the valaens partof the density of parton at the given a * scale and log fractional momentum l (the optional virtuality of * the incoming particle is not used). */ virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale) const; //@} public: /** @name Access derived kinematical quantities. */ //@{ /** * Return last selected * \f$S\f$. \f$S=\log(\log(Q^2/\mu^2)/\log(Q^2/\Lambda_{QCD}^2))\f$ */ double S() const { return theS; } /** * Return last selected * \f$S^2\f$. \f$S=\log(\log(Q^2/\mu^2)/\log(Q^2/\Lambda_{QCD}^2))\f$ */ double S2() const { return theS2; } /** * Return last selected * \f$S^3\f$. \f$S=\log(\log(Q^2/\mu^2)/\log(Q^2/\Lambda_{QCD}^2))\f$ */ double S3() const { return theS3; } /** * Return last selected * \f$\sqrt{S}\f$. \f$S=\log(\log(Q^2/\mu^2)/\log(Q^2/\Lambda_{QCD}^2))\f$ */ double rootS() const { return theRootS; } /** * Return last selected momentum fraction, \f$x\f$. */ double x() const { return thex; } /** * Return last selected logarithmic momentum fraction * \f$l=\log(1/x)\f$. */ double lx() const { return theLx; } /** * Return one minus the last selected momentum fraction, eps\f$=1-x\f$. */ double eps() const { return theEps; } /** * Return the square root of the last selected momentum fraction, * \f$x\f$. */ double rootx() const { return theRootx; } //@} protected: /** * Setup the \a l\f$=\log{1/x}\f$ and \a scale \f$Q^2\f$ to be used * in the following call to uv(), dv)=, etc. */ virtual void setup(double l, Energy2 scale) const = 0; /** * Setup the \a l\f$=\log{1/x}\f$ and \a scale \f$Q^2\f$ to be used * in the following call to uv(), dv)=, etc. */ void setup(double l, Energy2 scale, Energy2 mu2, Energy2 lam2) const; /** * The form of the valens density functions. */ double valens(double N, double ak, double bk, double a, double b, double c, double d) const; /** * The form of the light sea and gluon density * functions. */ double lightsea(double al, double be, double ak, double bk, double a, double b, double c, double d, double e, double es) const; /** * The form of the heavy sea density functions. */ double heavysea(double sth, double al, double be, double ak, double ag, double b, double d, double e, double es) const; /** * Return the value of the u valens density for the values previously given * by setup(). */ virtual double uv() const = 0; /** * Return the value of the d valens density for the values previously given * by setup(). */ virtual double dv() const = 0; /** * Return the value of the difference between the u and d sea * densities for the values previously given by setup(). */ virtual double del() const = 0; /** * Return the value of the average u and d sea densities for the * values previously given by setup(). */ virtual double udb() const = 0; /** * Return the value of the s density for the values previously given by * setup(). */ virtual double sb() const = 0; /** * Return the value of the c density for the values previously given by * setup(). */ virtual double cb() const = 0; /** * Return the value of the b density for the values previously given by * setup(). */ virtual double bb() const = 0; /** * Return the value of the gluon densities for the values previously * given by setup(). */ virtual double gl() const = 0; /** * fuv() returns the saved values from the quv() functions if * present. Otherwise uv() is called, saved and returned. */ double fuv() const { return uvSave >= 0.0? uvSave: ( uvSave = uv() ); } /** * fdv() returns the saved values from the dv() functions if * present. Otherwise dv() is called, saved and returned. */ double fdv() const { return dvSave >= 0.0? dvSave: ( dvSave = dv() ); } /** * fdel() returns the saved values from the del() functions if * present. Otherwise del() is called, saved and returned. */ double fdel() const { return delSave >= 0.0? delSave: ( delSave = del() ); } /** * fudb() returns the saved values from the udb() functions if * present. Otherwise udb() is called, saved and returned. */ double fudb() const { return udbSave >= 0.0? udbSave: ( udbSave = udb() ); } /** * fsb() returns the saved values from the sb() functions if * present. Otherwise sb() is called, saved and returned. */ double fsb() const { return sbSave >= 0.0? sbSave: ( sbSave = sb() ); } /** * fcb() returns the saved values from the cb() functions if * present. Otherwise cb() is called, saved and returned. */ double fcb() const { return cbSave >= 0.0? cbSave: ( cbSave = cb() ); } /** * fbb() returns the saved values from the bb() functions if * present. Otherwise bb() is called, saved and returned. */ double fbb() const { return bbSave >= 0.0? bbSave: ( bbSave = bb() ); } /** * fgl() returns the saved values from the gl() functions if * present. Otherwise gl() is called, saved and returned. */ double fgl() const { return glSave >= 0.0? glSave: ( glSave = gl() ); } public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * The last selected logarithmic momentum fraction * \f$l=\log(1/x)\f$. */ mutable double theLx; /** * THe last selected momentum fraction, \f$x\f$. */ mutable double thex; /** * One minus the last selected momentum fraction, eps\f$=1-x\f$. */ mutable double theEps; /** * The square root of the last selected momentum fraction, \f$x\f$. */ mutable double theRootx; /** * The last selected scale. */ mutable Energy2 Q2; /** * The last used \f$\Lambda_{QCD}^2\f$. */ mutable Energy2 theLam2; /** * The last used \f$\mu^2\f$. */ mutable Energy2 theMu2; /** * The last selected * \f$S\f$. \f$S=\log(\log(Q^2/\mu^2)/\log(Q^2/\Lambda_{QCD}^2))\f$ */ mutable double theS; /** * Return last selected \f$S^2\f$. */ mutable double theS2; /** * Return last selected \f$S^3\f$. */ mutable double theS3; /** * Return last selected \f$\sqrt{S}\f$. */ mutable double theRootS; /** * Saved values from the different functions. */ mutable double uvSave; /** * Saved values from the different functions. */ mutable double dvSave; /** * Saved values from the different functions. */ mutable double delSave; /** * Saved values from the different functions. */ mutable double udbSave; /** * Saved values from the different functions. */ mutable double sbSave; /** * Saved values from the different functions. */ mutable double cbSave; /** * Saved values from the different functions. */ mutable double bbSave; /** * Saved values from the different functions. */ mutable double glSave; private: /** * Private and non-existent assignment operator. */ - GRVBase & operator=(const GRVBase &); + GRVBase & operator=(const GRVBase &) = delete; }; } #endif /* ThePEG_GRVBase_H */ diff --git a/PDF/LHAPDF6.h b/PDF/LHAPDF6.h --- a/PDF/LHAPDF6.h +++ b/PDF/LHAPDF6.h @@ -1,299 +1,299 @@ // -*- C++ -*- // // LHAPDF6.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 2014 Leif Lonnblad, David Grellscheid // // 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_LHAPDF6_H #define THEPEG_LHAPDF6_H // // This is the declaration of the LHAPDF class. // #include "ThePEG/PDF/PDFBase.h" namespace LHAPDF { class PDF; } namespace ThePEG { /** * The LHAPDF class inherits from PDFBase and implements an interface * to the LHAPDF library of parton density function * parameterizations. This class is available even if LHAPDF was not * properly installed when ThePEG was installed, but will then produce * an error in the initialization. * * Note that the valence densities from the xfvx() and xfvl() function * will only work properly for nucleons. All other particles will have * zero valence densities. * * @see \ref LHAPDFInterfaces "The interfaces" * defined for LHAPDF. */ class LHAPDF: public PDFBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ LHAPDF(); /** * The copy constructor. */ LHAPDF(const LHAPDF &); //@} 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 (with x = 1-\a eps). 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 logarithmic momentum fraction \a l. The \a * particle is assumed to have a virtuality \a particleScale. This * will only work properly for nucleons. All other particles will * have zero valence densities */ virtual double xfvl(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 momentum fraction \a x (with x = 1-\a eps). The * \a particle is assumed to have a virtuality \a * particleScale. This will only work properly for nucleons. All * other particles will have zero valence densities */ virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps = 0.0, Energy2 particleScale = ZERO) const; /** * The sea 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. */ virtual double xfsx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps = 0.0, Energy2 particleScale = ZERO) const; //@} /** @name Simple access function. */ //@{ /** * The name if the PDF set to be used. The full name including the * .LHpdf or .LHgrid suffix. */ const string & PDFName() const { return thePDFName; } /** * The chosen member of the selected PDF set. */ int member() const { return theMember; } /** * The maximum number of flavours for which non-zero densities are * reported. The actual number of flavours may be less depending on * the chosen PDF set. */ int maxFlav() const { return theMaxFlav; } //@} protected: /** @name Internal helper functions. */ //@{ /** * Initialize the LHAPDF library for the chosen PDF set if it has * not been done before. */ void initPDFptr(); /** * Used by the interface to select a set according to a file name. */ void setPDFName(string name); /** * Used by the interface to select a member in the current set. */ void setPDFMember(int n); /** * Interface for simple tests. */ string doTest(string input); //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} public: /** @cond EXCEPTIONCLASSES */ /** Exception class used if the LHAPDF library was not installed. */ class NotInstalled: public InterfaceException {}; /** @endcond */ // 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: /** * LHAPDF member object */ ::LHAPDF::PDF * thePDF; /** * The name of the selected PDF set. */ string thePDFName; /** * The chosen member of the selected PDF set. */ int theMember; /** * The maximum number of flavours for which non-zero densities are * reported. The actual number of flavours may be less depending on * the chosen PDF set. */ int theMaxFlav; /** * The minimum \f$x\f$-value for the current PDF set. */ double xMin; /** * The maximum \f$x\f$-value for the current PDF set. */ double xMax; /** * The minimum \f$Q^2\f$-value for the current PDF set. */ Energy2 Q2Min; /** * The maximum \f$Q^2\f$-value for the current PDF set. */ Energy2 Q2Max; private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - LHAPDF & operator=(const LHAPDF &); + LHAPDF & operator=(const LHAPDF &) = delete; }; } #endif /* THEPEG_LHAPDF6_H */ diff --git a/PDF/LeptonLeptonPDF.h b/PDF/LeptonLeptonPDF.h --- a/PDF/LeptonLeptonPDF.h +++ b/PDF/LeptonLeptonPDF.h @@ -1,150 +1,150 @@ // -*- C++ -*- // // LeptonLeptonPDF.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_LeptonLeptonPDF_H #define ThePEG_LeptonLeptonPDF_H // This is the declaration of the LeptonLeptonPDF class. #include "ThePEG/PDF/PDFBase.h" namespace ThePEG { /** * LeptonLeptonPDF inherits from PDFBase and encodes the distribution * of leptons within leptons, ie. the energy loss of leptons due to * radiation of soft photons. * * @see \ref LeptonLeptonPDFInterfaces "The interfaces" * defined for LeptonLeptonPDF. */ class LeptonLeptonPDF: public PDFBase { public: /** @name Virtual functions required by the PDFBase class. */ //@{ /** * Return true if this PDF can handle the extraction of parton from the * given particle ie. if the particle is a lepton. */ virtual bool canHandleParticle(tcPDPtr particle) const; /** * Return true if this PDF has a pole at $x=1$ for the given \a * particle and \a parton. Returns true if \a parton and \a particle * are the same. */ virtual bool hasPoleIn1(tcPDPtr particle, tcPDPtr parton) const; /** * Return a vector of partons handled by this PDF (always the same * lepton as the incoming particle). */ virtual cPDVector partons(tcPDPtr p) const; /** * Return the value of the density function at a given * l\f$=\log(1/x)\f$ and scale for the given parton. */ virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale = ZERO) const; /** * Return the the valens part of the true pdf for the given * parameters, with the momentum fraction given as * l\f$=\log(1/x)\f$. This version simply returns the full pdf. */ virtual double xfvl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale = ZERO) const; /** * Return the the valens part of the true pdf for the given * parameters, with the momentum fraction given as x. This version * simply returns the full pdf. */ virtual double xfvx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps, Energy2 particleScale) const; /** * If the PDF contains strange peaks which can be difficult to * handle, this function may be overwritten to return an appropriate * l\f$=\log(1/x)\f$ for a z given by a flat distribution in * ]0,1[. Also the jacobobian of the l(z) function must be * returned. The default version will simly use the function l(z) = * lmin + z*(lmax-lmin). */ virtual double flattenL(tcPDPtr particle, tcPDPtr parton, const PDFCuts &, double z, double & jacobian) const; //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initLeptonLeptonPDF; /** * Private and non-existent assignment operator. */ - LeptonLeptonPDF & operator=(const LeptonLeptonPDF &); + LeptonLeptonPDF & operator=(const LeptonLeptonPDF &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of LeptonLeptonPDF. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of LeptonLeptonPDF. */ typedef PDFBase NthBase; }; /** This template specialization informs ThePEG about the name of the * LeptonLeptonPDF class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::LeptonLeptonPDF"; } /** Return the name of the shared library be loaded to get access to * the LeptonLeptonPDF class and every other class it uses (except * the base class). */ static string library() { return "LeptonLeptonPDF.so"; } }; /** @endcond */ } #endif /* ThePEG_LeptonLeptonPDF_H */ diff --git a/PDF/NoPDF.h b/PDF/NoPDF.h --- a/PDF/NoPDF.h +++ b/PDF/NoPDF.h @@ -1,125 +1,125 @@ // -*- C++ -*- // // NoPDF.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_NoPDF_H #define ThePEG_NoPDF_H // This is the declaration of the NoPDF class. #include "ThePEG/PDF/PDFBase.h" // #include "NoPDF.fh" // #include "NoPDF.xh" namespace ThePEG { /** * NoPDF inherits from PDFBase and represents particles without * sub-structure. The only parton which can be extracted is the * incoming particle itself with a momentum distribution which is a * delta-function at \f$x=1\f$ (\f$l=0\f$). * * @see PDFBase * @see NoRemnants * */ class NoPDF: public PDFBase { public: /** @name Virtual functions mandated by the PDFBase base class. */ //@{ /** * Return true because we can handle any particle. */ virtual bool canHandleParticle(tcPDPtr particle) const; /** * Return true if canHandleParticle() and if the corresponding * method for remnantHandler() returns true. */ virtual bool canHandle(tcPDPtr particle) const; /** * Return true if this PDF has a pole at $x=1$ for the given \a * particle and \a parton. This default version of the function * returns true if \a particle and \a parton is the same. */ virtual bool hasPoleIn1(tcPDPtr particle, tcPDPtr parton) const; /** * Simply return the particle. */ virtual cPDVector partons(tcPDPtr p) const; /** * The delta function. */ virtual double xfl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale = ZERO) const; //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initNoPDF; /** * Private and non-existent assignment operator. */ - NoPDF & operator=(const NoPDF &); + NoPDF & operator=(const NoPDF &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of NoPDF. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of NoPDF. */ typedef PDFBase NthBase; }; /** This template specialization informs ThePEG about the name of the * NoPDF class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::NoPDF"; } }; /** @endcond */ } #endif /* ThePEG_NoPDF_H */ diff --git a/PDF/NoRemnants.h b/PDF/NoRemnants.h --- a/PDF/NoRemnants.h +++ b/PDF/NoRemnants.h @@ -1,134 +1,134 @@ // -*- C++ -*- // // NoRemnants.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_NoRemnants_H #define ThePEG_NoRemnants_H // This is the declaration of the NoRemnants class. #include "ThePEG/PDF/RemnantHandler.h" // #include "NoRemnants.fh" // #include "NoRemnants.xh" namespace ThePEG { /** * NoRemnants inherits from RemnantHandler but can only handle * particles without sub-structure with the parton density given by a * NoPDF object and will never give any remnants. * * * @see RemnantHandler * @see NoPDF * */ class NoRemnants: public RemnantHandler { public: /** @name Virtual functions mandated by the RemnantHandler base class. */ //@{ /** * Return true if this remnant handler can handle extracting all * specified partons. The NoRemnants will return false if any * partons are given. */ virtual bool canHandle(tcPDPtr, const cPDVector & partons) const { return partons.empty(); } /** * Generate Remnants. Will not generate remnants and will throw a * RemnantHandlerException if the extracted parton is not the * incomining particle with x=1. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, const LorentzMomentum & p, bool fixedPartonMomentum = false) const; /** * Generate the momentum of the extracted parton with the \a parent * momentum given by the last argument. If the \a scale is negative, * it means that the doScale in the previous call to nDim() was * true, otherwise the given \a scale should be the virtuality of * the extracted parton. \a shat is the total invariant mass squared * of the hard sub-system produced by the extracted parton and the * primary parton entering from the other side. Generated quantities * which are not returned in the momentum may be saved in the * PartonBinInstance, \a pb, for later use. In particular, if the * nDim() random numbers, \a r, are not enough to generate with * weight one, the resulting weight should be stored with the * remnantWeight() method of the parton bin. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, Energy2 shat, const LorentzMomentum & parent, bool fixedPartonMomentum = false) const; //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initNoRemnants; /** * Private and non-existent assignment operator. */ - NoRemnants & operator=(const NoRemnants &); + NoRemnants & operator=(const NoRemnants &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of NoRemnants. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of NoRemnants. */ typedef RemnantHandler NthBase; }; /** This template specialization informs ThePEG about the name of the * NoRemnants class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::NoRemnants"; } }; /** @endcond */ } #endif /* ThePEG_NoRemnants_H */ diff --git a/PDF/PDFBase.h b/PDF/PDFBase.h --- a/PDF/PDFBase.h +++ b/PDF/PDFBase.h @@ -1,278 +1,278 @@ // -*- C++ -*- // // PDFBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PDFBase_H #define ThePEG_PDFBase_H // This is the declaration of the PDFBase class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/PDF/PDFCuts.h" #include "PDFBase.xh" namespace ThePEG { /** * PDFBase is the base class for implementing parton density functions * for particles with sub-structure. A number of of virtual methods * are defined which should be overridden by sub-classes. * * It is essential that either xfx or xfl is overidden to avoid * infinite recursive function calls. * * A PDFBase object can be assigned to a BeamParticleData object * and/or to a PartonExtractor object. A PDFBase has a pointer to a * RemnantHandler object which should be capable of generating * remnants for all partons which may be extracted by the PDF. * * @see \ref PDFBaseInterfaces "The interfaces" * defined for PDFBase. * @see BeamParticleData * @see PartonExtractor * @see RemnantHandler * @see PDFCuts */ class PDFBase: public HandlerBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ PDFBase(); /** * Copy-constructor. */ PDFBase(const PDFBase &); /** * Destructor. */ virtual ~PDFBase(); //@} 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 = 0; /** * Return true if canHandleParticle() and if the corresponding * method for remnantHandler() returns true for the given \a * particle. */ virtual bool canHandle(tcPDPtr particle) const; /** * Return true if this PDF has a pole at $x=1$ for the given \a * particle and \a parton. This default version of the function * returns false. */ virtual bool hasPoleIn1(tcPDPtr particle, tcPDPtr parton) const; /** * Return the partons which this PDF may extract from the given * \a particle. */ virtual cPDVector partons(tcPDPtr particle) const = 0; /** * 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 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 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 * 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 xfvl(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 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; /** * The sea 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 * implementation will assume that the difference between a quark * and anti-quark distribution is due do valense quarks. */ virtual double xfsl(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double l, Energy2 particleScale = ZERO) const; /** * The sea 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. */ virtual double xfsx(tcPDPtr particle, tcPDPtr parton, Energy2 partonScale, double x, double eps = 0.0, Energy2 particleScale = ZERO) 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; /** * 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; //@} /** * Pointer to the remnant handler to handle remnant when extracting * partons according to these densities. */ tcRemHPtr remnantHandler() const { return theRemnantHandler; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ 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: /** * A remnant handler which can generate remnants for the parton * extracted withfor this PDF */ RemHPtr theRemnantHandler; protected: /** * Indicate how to deal with x and Q2 which are out of range. */ enum RangeException { rangeFreeze, /**> Freeze the value of the PDF outside the limits. */ rangeZero, /**> Set the PDF to zero outside the limits. */ rangeThrow /**> Throw an exception if outside the limits. */ }; /** * Indicate to subclasses how to deal with x and Q2 which are out of * range. */ RangeException rangeException; private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class with persistent data. */ static AbstractClassDescription initPDFBase; /** * Private and non-existent assignment operator. */ - PDFBase & operator=(const PDFBase &); + PDFBase & operator=(const PDFBase &) = delete; }; ThePEG_DECLARE_CLASS_TRAITS(PDFBase,HandlerBase); } #endif /* ThePEG_PDFBase_H */ diff --git a/PDF/PartonBin.h b/PDF/PartonBin.h --- a/PDF/PartonBin.h +++ b/PDF/PartonBin.h @@ -1,263 +1,263 @@ // -*- C++ -*- // // PartonBin.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PartonBin_H #define ThePEG_PartonBin_H // This is the declaration of the PartonBin class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/Utilities/Maths.h" #include "ThePEG/PDF/PDFBase.h" #include "ThePEG/PDF/PDFCuts.h" #include "ThePEG/Vectors/Transverse.h" #include "ThePEG/EventRecord/Particle.h" #include "PartonBin.fh" namespace ThePEG { /** * The PartonBin class is used by the PartonExtractor class to store * information about the extraction of a parton from a * particle. Several PartonBin objects can be used to specify a whole * chain of partons extracted from particles extracted from other * particles. A PartonBin without an incoming() PartonBin represents * the incoming particle itself and is used to stop recursion. * * After the extraction of a parton, the kinematical variables of that * extraction is stored in a orresponding PartonBinInfo object. * * @see PartonExtractor * */ class PartonBin: public Base { public: /** A vector of pointers to PartonBin objects. */ typedef vector PBVector; public: /** @name Standard constructors, assignment and destructors. */ //@{ /** * Standard constructor. * @param p the incoming particle type. Possibly null if this bin * represents the incoming particle itself. * @param prev the PartonBin of the incoming particle. Possibly null * if this bin represents the incoming particle itself. * @param pi the parton to be extracted. * @param pdf the density function to be used. Possibly null if this * bin represents the incoming particle itself. * @param newCuts the kinematical cuts on the extraction. */ PartonBin(tcPDPtr p, tPBPtr prev, tcPDPtr pi, tcPDFPtr pdf, const PDFCuts & newCuts); /** * Default constructor. */ PartonBin(); /** * Destructor. */ virtual ~PartonBin(); //@} public: /** @name Access the information in this ParticleBin. */ //@{ /** * The incoming particle type. */ tcPDPtr particle() const { return theParticle; } /** * In the case the incoming particle in turn is extracted from * another particle, return the PartonBin for that extraction. */ tPBPtr incoming() const { return theIncomingBin; } /** * The parton bins corresponding to the extracted parton if it in * turn can be extracted from. */ const PBVector & outgoing() const { return theOutgoing; } /** * Add a parton bin corresponding to the extracted parton if it in * turn can be extracted from. */ void addOutgoing(tPBPtr pb) { theOutgoing.push_back(pb); } /** * The extracted parton type. */ tcPDPtr parton() const { return theParton; } /** * The PDFBase object describing the momentum distribution of the * parton within the particle in this PartonBin. */ tcPDFPtr pdf() const { return thePDF; } /** * The remnant handler associated with the pdf(). */ tcRemHPtr remnantHandler() const { return theRemnantHandler; } /** * Detemine the number of degrees of freedom needed to generate the * phase space of this and parent partons. If doscale is true this * bin is expected to generate the scale in addition to the momentum * fraction. */ int nDim(bool doscale); /** * Return the number of degrees of freedom used by the parton * density and remnant handler. */ int pdfDim() const { return thePDFDim; } /** * Return the number of degrees of freedom used by the parton * density and remnant handler. */ int remDim() const { return theRemDim; } //@} /** @name Functions used in the generation. */ //@{ /** * Return the cuts specified for this bin. */ const PDFCuts & cuts() const { return theCuts; } /** * Return the parton bin corresponding to the first incoming particle. */ tPBPtr getFirst(); //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); private: /** * The incoming particle type. */ cPDPtr theParticle; /** * In the case the incoming particle in turn is extracted from * another particle, return the PartonBin for that extraction. */ tPBPtr theIncomingBin; /** * The parton bins corresponding to the extracted parton if it * itself can be extracted from. */ PBVector theOutgoing; /** * The extracted parton type. */ cPDPtr theParton; /** * The PDFBase object describing the momentum distribution of the * parton within the particle in this PartonBin. */ cPDFPtr thePDF; /** * The remnant handler associated with the pdf(). */ cRemHPtr theRemnantHandler; /** * The number of degrees of freedom needed to generate the phase * space for this parton for the parton density. */ int thePDFDim; /** * The number of degrees of freedom needed to generate the phase * space for this parton for the remnant handler. */ int theRemDim; /** * The cuts specified for this bin. */ PDFCuts theCuts; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initPartonBin; /** * Private and non-existent assignment operator. */ - PartonBin & operator=(const PartonBin &); + PartonBin & operator=(const PartonBin &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of PartonBin. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of PartonBin. */ typedef Base NthBase; }; /** This template specialization informs ThePEG about the name of the * PartonBin class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::PartonBin"; } }; /** @endcond */ } #endif /* ThePEG_PartonBin_H */ diff --git a/PDF/PartonBinInstance.h b/PDF/PartonBinInstance.h --- a/PDF/PartonBinInstance.h +++ b/PDF/PartonBinInstance.h @@ -1,481 +1,481 @@ // -*- C++ -*- // // PartonBinInstance.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PartonBinInstance_H #define THEPEG_PartonBinInstance_H // This is the declaration of the PartonBinInstance class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/PDF/PartonBin.h" namespace ThePEG { ThePEG_DECLARE_CLASS_POINTERS(PartonBinInstance,PBIPtr); /** A pair of pointers to PartonBinInstance objects. */ typedef pair PBIPair; ThePEG_DECLARE_CLASS_POINTERS(RemInfoBase,RemIPtr); /** * PartonBinInstance is used to store information about the generation * of a given parton extraction for a corresponding PartonBin object. */ class PartonBinInstance: public PersistentBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ PartonBinInstance(); /** * Copy-constructor. */ PartonBinInstance(const PartonBinInstance &); /** * Destructor. */ virtual ~PartonBinInstance(); /** * Constructor taking a PartonBin as argument. The second argument * should be used if the incoming bin is already known and exists. */ PartonBinInstance(tcPBPtr, tPBIPtr = tPBIPtr()); /** * Constructor using an already prepared extracted parton. This will * also initialize the x, and scale values. To calculate the * momentum fractions, a Direction<0> object must have been properly * initialized. * * @param parton the extracted parton which must have its first * parent set to define the particle extracted from. * * @param pb the PartonBin object corresponding to the extracted \a * parton. If the particle extracted from in turn has been * extracted, the incoming() member of the PartonBin must point to * the corresponding PartonBin. * * @param scale the resolution scale at which the \a parton was * extracted. */ PartonBinInstance(tPPtr parton, tcPBPtr pb, Energy2 scale = ZERO); /** * Constructor using a parton which is to be extracted from the * given particle, but no mother-child relations exist, yet. This * will also initialize the x, and scale values. To calculate the * momentum fractions, a Direction<0> object must have been properly * initialized. */ PartonBinInstance(tPPtr particle, tPPtr parton, tcPBPtr pb, Energy2 scale = ZERO); //@} public: /** @name Access information about the corresponding PartonBin object. */ //@{ /** * Return a pointer to the PartonBin this instance refer to. */ tcPBPtr bin() const { return theBin; } /** * Return pointers to the bins this instance refer to in case more * than one parton has been extracted. */ const PartonVector & bins() const { return theBins; } /** * Return a pointer to the data object of the incoming particle. */ tcPDPtr particleData() const { return bin()->particle(); } /** * Return a pointer to the data object of the extracted parton. */ tcPDPtr partonData() const { return bin()->parton(); } /** * In the case the incoming particle in turn is extracted from * another particle, return the PartonBinInstance for that * extraction. */ tPBIPtr incoming() const { return theIncoming; } /** * Return the parton bin instance corresponding to the first * incoming particle for this bin. */ tPBIPtr getFirst(); /** * The PDFBase object describing the momentum distribution of the * parton within the particle in this PartonBin. */ tcPDFPtr pdf() const { return bin()->pdf(); } /** * The remnant handler associated with the pdf(). */ tcRemHPtr remnantHandler() const { return bin()->remnantHandler(); } /** * Return true if the corresponding PDFs has a pole at $x=1$ for the * current particle/parton combination. */ bool hasPoleIn1() const; //@} /** @name Functions used for the generation. */ //@{ /** * Reset the current PartonBin, making room for a new event. */ void reset(double lx = 0, Energy2 Q2 = ZERO); /** * Reset last generated l and Q2 values of this and parent bins. */ void prepare(); /** * Generate l and Q2 of this and parent bins. */ void generate(const double * r); /** * Get the jacobian associated with the phase space point generated. */ double jacobian() const { return theJacobian; } /** * Set the jacobian associated with the phase space point generated. */ void jacobian(double j) { theJacobian = j; } //@} /** @name Access information about the generated extraction. */ //@{ /** * Get the current particle instance. */ tPPtr particle() const { return theParticle; } /** * Set the current particle instance. */ void particle(tPPtr p) { theParticle = p; } /** * Get the current parton instance. */ tPPtr parton() const { return theParton; } /** * Set the current parton instance. */ void parton(tPPtr p) { theParton = p; } /** * The currently extracted partons (in case of multiple * interactions. */ const PVector & partons() const { return thePartons; } /** * Get the momentum fraction of this parton w.r.t. the incoming * particle in this bin. */ double xi() const { if ( theXi < 0.0 ) theXi = exp(-li()); return theXi; } /** * Get one minus the momentum fraction of this parton w.r.t. the * incoming particle in this bin. */ double eps() const { if ( theEps < 0.0 ) theEps = Math::exp1m(-li()); return theEps; } /** * Get the logarithmic momentum fraction of this parton w.r.t. the * incoming particle in this bin. */ double li() const { return theLi; } /** * Set the logarithmic momentum fraction of this parton w.r.t. the * incoming particle in this bin. */ void li(double lx) { theLi = lx; theXi = theEps = -1.0; } /** * Get the momentum fraction of this parton w.r.t. the collidig * particles. */ double x() const { if ( theX < 0.0 ) theX = exp(-l()); return theX; } /** * Get the logarithmic momentum fraction of this parton w.r.t. the * collidig particles. */ double l() const { return theL; } /** * Set the logarithmic momentum fraction of this parton w.r.t. the * collidig particles. */ void l(double lx) { theL = lx; theX = -1.0; } /** * Get the scale at which the current parton was extracted. */ Energy2 scale() const { return theScale; } /** * Set the scale at which the current parton was extracted. */ void scale(Energy2 s) { theScale = s; } /** * Return the transverse momentum of the extracted parton. */ const TransverseMomentum & kT() const { return theKT; } /** * Get the weight associated with the remnant generation. */ double remnantWeight() const { return theRemnantWeight; } /** * Set the weight associated with the remnant generation. */ void remnantWeight(double w) { theRemnantWeight = w; } /** * Get the current remnants. */ const PVector & remnants() const { return theRemnants; } /** * Set the current remnants. */ void remnants(const PVector & rems) { theRemnants = rems; } /** * Get information saved by the remnant handler from the generation, * to be used in the construction of the remnants. (In addition the * remnantWeight and remnants() may be used for this purpose.) */ tRemIPtr remnantInfo() const { return theRemInfo; } /** * Set information saved by the remnant handler from the generation, * to be used in the construction of the remnants. (In addition the * remnantWeight and remnants() may be used for this purpose.) */ void remnantInfo(tRemIPtr ri) { theRemInfo = ri; } //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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(); private: /** * Pointer to the main bin this instance refer to. */ cPBPtr theBin; /** * Pointer to the main bin (and secondary in case several partons * have been extracted this instance refer to. */ PartonVector theBins; /** * In the case the incoming particle in turn is extracted from * another particle, this is the PartonBinInstance for that * extraction. */ PBIPtr theIncoming; /** * The jacobian associated with the phase space point generated. */ double theJacobian; /** * The current particle instance. */ PPtr theParticle; /** * The current parton instance. */ PPtr theParton; /** * The currently extracted partons (in case of multiple * interactions. */ PVector thePartons; /** * The momentum fraction (xi, li=log(xi), eps=1-xi), of this * parton w.r.t. the incoming particle in this * bin. */ mutable double theXi; /** * The momentum fraction (xi, li=log(xi), eps=1-xi), of this * parton w.r.t. the incoming particle in this * bin. */ mutable double theEps; /** * The momentum fraction (xi, li=log(xi), eps=1-xi), of this * parton w.r.t. the incoming particle in this * bin. */ double theLi; /** * The momentum fraction (x, l=log(x)) of this parton * w.r.t. the collidig particles. */ mutable double theX; /** * The momentum fraction (x, l=log(x)) of this parton * w.r.t. the collidig particles. */ double theL; /** * The scale at which the current parton was extracted. */ Energy2 theScale; /** * The transverse momentum of the extracted parton. */ TransverseMomentum theKT; /** * The weight associated with the remnant generation. */ double theRemnantWeight; /** * The current remnants. */ PVector theRemnants; /** * The information saved by the remnant handler from the generation, * to be used in the construction of the remnants. (In addition the * remnantWeight and lastRemnants() may be used for this purpose.) */ RemIPtr theRemInfo; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initPartonBinInstance; /** * Private and non-existent assignment operator. */ - PartonBinInstance & operator=(const PartonBinInstance &); + PartonBinInstance & operator=(const PartonBinInstance &) = delete; }; /** Empty base class. A RemnantHandler may use sub-classes to store information about the generation of remnants. */ class RemInfoBase: public Base { public: /** The descructor. */ virtual ~RemInfoBase() {} }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of PartonBinInstance. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of PartonBinInstance. */ typedef Base NthBase; }; /** This template specialization informs ThePEG about the name of the * PartonBinInstance class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::PartonBinInstance"; } }; /** @endcond */ } #endif /* THEPEG_PartonBinInstance_H */ diff --git a/PDF/PartonExtractor.h b/PDF/PartonExtractor.h --- a/PDF/PartonExtractor.h +++ b/PDF/PartonExtractor.h @@ -1,458 +1,458 @@ // -*- C++ -*- // // PartonExtractor.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PartonExtractor_H #define ThePEG_PartonExtractor_H // This is the declaration of the PartonExtractor class. #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/Handlers/LastXCombInfo.h" #include "ThePEG/PDF/PartonBin.h" #include "ThePEG/PDF/PartonBinInstance.h" #include "ThePEG/PDF/PDFBase.h" #include "ThePEG/PDT/ParticleData.h" #include "PartonExtractor.xh" namespace ThePEG { /** * The PartonExtractor is a base class defining the interface to * objects responsible for extracting partons from particles. It is * used by a SubProcessHandler which combines one PartonExtractor with * a number of MEBase objects which are the used in an XComb in a * StandardEventHandler to generate hard sub-processes. * * PartonExtractor inherits from the general HandlerBase class and * from the LastXCombInfo class to have easy acces to information * about the currently chosen hard sub-process. * * @see \ref PartonExtractorInterfaces "The interfaces" * defined for PartonExtractor. * @see SubProcessHandler * @see MEBase * @see EventHandler * @see StandardEventHandler * @see XComb * @see HandlerBase * */ class PartonExtractor: public HandlerBase, public LastXCombInfo<> { /** XComb is a friend. */ friend class XComb; public: /** A map of PartonBinInstance objects indexed by the extracted parton. */ typedef map PartonBinInstanceMap; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ PartonExtractor(); /** * Destructor. */ virtual ~PartonExtractor(); //@} public: /** @name Virtual functions which may be overridden in sub-classes. */ //@{ /** * Return true if this parton extractor can handle the given types * of incoming particles. */ virtual bool canHandle(const cPDPair &) { return true; } /** * Return a vector of possible pairs of parton bins which can be * produced within a given maximum total particle-particle * invariant mass squared, \a maxEnergy sBin. */ virtual PartonPairVec getPartons(Energy maxEnergy, const cPDPair &, const Cuts &) const; /** * May be overriden by sub-classes which have their own oppinion * about what scale to use in a hard subprocess. The default version * simply returns the previously selected scale. */ virtual Energy2 newScale(); /** * Connect the remnants with the colour lines of the extracted * parton. */ virtual void colourConnect(tPPtr particle, tPPtr parton, const tPVector & remnants) const; /** * If remnants has already been created for the given parton, remove * them from the given step and generate new remnants corresponding * to the parton newp and add them to the step. The new parton bins * are returned. * @throws Veto if remnant generation failed for whatever reason. */ virtual PBIPair newRemnants(tPPair oldp, tPPair newp, tStepPtr step); /** * Determine the number of random numbers needed to calculate * \f$\hat{s}\f$ and the product of all densitiy functions. */ virtual pair nDims(const PBPair & pbins); /** * Prepare the given parton bin instances for generating a new * event. */ virtual void prepare(const PBIPair & pbins); /** * Update information on the given parton bin instances */ virtual void updatePartonBinInstances(const PBIPair & pbins); /** * Generate \f$l=\log(1/x)\f$ for all parton extractions. */ virtual bool generateL(const PBIPair & pbins, const double * r1, const double * r2); /** * Used by generateL() for each of the final parton * bins. Direction<0> is set to positive(negative) for the * first(second) final bin. */ virtual void generateL(PartonBinInstance & pb, const double * r); /** * Generate the rest of the degrees of freedom to calculate * \f$\hat{s}\f$ and the product of all densitiy functions. */ virtual Energy2 generateSHat(Energy2 s, const PBIPair & pbins, const double * r1, const double * r2, bool mepartons = false); /** * Return the product of all density functions. If noLastPDF.first * (.second) is true, then the PDF value multiplied by the momentum * fraction for the last extracted parton from the first (second) * incoming particle will be excluded. */ virtual double fullFn(const PBIPair & pbins, Energy2 scale, pair noLastPDF = make_pair(false,false)); /** * Construct remnants and add them to the step. */ virtual void construct(const PBIPair & pbins, tStepPtr step) const; /** * Construct remnants for partons created outside of this * extractor. Information about the incoming partons should be set * in \a pbins and the hard subprocess should be present in \a * sub. Generated remnants will be added to the \a step. * @throws Veto if remnant generation failed for whatever reason. */ virtual void constructRemnants(const PBIPair & pbins, tSubProPtr sub, tStepPtr step) const; /** * Get boost for hard subsystem and boost remnants. To be called * after re-constructing remnants and obtaining new momenta of the * partons entering the hard subsystem, but ignoring detailed energy * and momentum conservation. Perform boosts of the remnants to * conserve energy and momentum and return the boost needed for the * hard subsystem. \a bins contains the current state of the * incoming partons, including the momenta obtained after the * remnant generation. \a k1 and \a k2 contains the momenta of the * incoming partons before the remnant generation. If either side * has no new remnants, \a side1 and/or \a side2 should be false. */ virtual LorentzRotation boostRemnants(PBIPair & bins, LorentzMomentum k1, LorentzMomentum k2, bool side1, bool side2) const; //@} /** @name Access information about the current paron extraction. */ //@{ /** * Return the corresponding parton bin instance for a given * extracted parton. */ tPBIPtr partonBinInstance(tcPPtr) const; /** * Set the XComb object describing the current hard sub-process. */ void select(tXCombPtr newXComb); //@} /** * The maximum number of attempts allowed when trying to generate * remnants. */ int maxTries() const { return theMaxTries; } /** * Return the PDFBase object to be used for the incoming particle * type. If one of theSpecialDensities matches the particle type it * is returned, otherwise if particle is a BeamParticleData use the * PDFBase object specified there. If also this fails, return a * NoPDF object. */ tcPDFPtr getPDF(tcPDPtr particle) const; protected: /** @name Functions used by the main virtual functions. Some of these may be overridden in sub-classes. */ //@{ /** * Used by generateSHat() for each of the final parton * bins. Direction<0> is set to positive(negative) for the * first(second) final bin, \a pb. Should ask the remnant handler to * generate what is needed to construct the extracted parton * momentum. \a r is a pointer to an array of random numbers to be * used and \a shat is the approximate invariant mass squared of the * hard system produced by the extracted parton and the primary * parton from the other side. \a first is the momentum of the * original incoming particle. * * @return false if no remnants could be generated. */ virtual bool generate(PartonBinInstance & pb, const double * r, Energy2 shat, const Lorentz5Momentum & first, bool haveMEPartons = false); /** * Used by the public fullFn() for each of the final parton bins. */ virtual double fullFn(const PartonBinInstance & pb, bool noLastPDF = false); /** * Used by the public construct() for each of the final parton * bins. If boost is false, no boost is necessary to give the * remnants proper momenta. */ virtual void construct(PartonBinInstance & pb, tStepPtr step, bool boost = true) const; /** * Used by the public newRemnants() for each of the parton bins. * @throws Veto if remnant generation failed for whatever reason. */ PBIPtr newRemnants(tPBIPtr oldpb, tPPtr newp, const LorentzMomentum & k); /** * Used by the public newRemnants() for each of the parton bins. */ void addNewRemnants(tPBIPtr oldpb, tPBIPtr newpb, tStepPtr step); /** * Transform remnant momentum. Assuming remnants have been generated * with momentum \a Pr without considering energy-momentum * conservation, shift the momentum, possibly compensating with the * momentum of the hard subsystem, \a Ph. For information the * momentum of the parton entering the hard subsystem from the other * side, \a k, and the momentum of the remnants parent particle , \a * P is given. Note that Direction<0> must be set to determine if * the parent particle is to be assumed to go in the positive or * negative direction. */ virtual void transformRemnants(LorentzMomentum & Ph, LorentzMomentum & Pr, const LorentzMomentum & k, const LorentzMomentum & P) const; /** * Construct remnants recursively for the parton represented by \a * pb. Used by constructRemnants(const PBIPair &, tSubProPtr, tStepPtr). * Shift the momentum, \a Ph, of the hard subsystem to conserve * energy and momentum if necessary. The momentum, \a k, of the * parton coming into the hard subsystem from the other side is * given for information. Note that Direction<0> must be set to * determine if the parent particle is to be assumed to go in the * positive or negative direction. * @throws Veto if remnant generation failed for whatever reason. */ virtual void constructRemnants(PartonBinInstance & pb, LorentzMomentum & Ph, const LorentzMomentum & k) 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 interface. */ static void Init(); protected: /** * Add parton bins to pbins for the given incoming particle and the * specified cuts. */ virtual void addPartons(tPBPtr incoming ,const PDFCuts & cuts, tcPDFPtr pdf ,PartonVector & pbins) const; /** * The NoPDF object. */ tcPDFPtr noPDF() const { return theNoPDF; } /** * Connect the first (\a anti) coloured particle in the given range * (not equal to \a parton) and connect it to the colour \a line. */ template void findConnect(tColinePtr line, tPPtr parton, bool anti, Iterator first, Iterator last) const { for ( ; first != last; ++first ) { if ( *first != parton && (**first).hasColour(anti) && !(**first).colourLine(anti) ) { line->addColoured(*first, anti); return; } } throw RemColException(*this); } protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 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 PartonBinInstance's used mapped to the respective partons. */ PartonBinInstanceMap& partonBinInstances() const { assert(lastXCombPtr()); return lastXCombPtr()->partonBinInstanceMap(); } /** * A list of special PDFBase objects to be used. */ vector theSpecialDensities; /** * PDFBase object to override first PDF */ PDFPtr theFirstPDF; /** * PDFBase object to override second PDF */ PDFPtr theSecondPDF; /** * The NoPDF object. */ PDFPtr theNoPDF; /** * The maximum number of tries allowed when trying to produce * remnants. */ int theMaxTries; /** * True if this extractor should override the \f$l\f$-generation in * the PDFs and generate a flat distribution in \f$\log(\hat{s})\f$ * and y. */ bool flatSHatY; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initPartonExtractor; /** * Private and non-existent assignment operator. */ - PartonExtractor & operator=(const PartonExtractor &); + PartonExtractor & operator=(const PartonExtractor &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of PartonExtractor. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of PartonExtractor. */ typedef HandlerBase NthBase; }; /** This template specialization informs ThePEG about the name of the * PartonExtractor class. */ template <> /** Return a platform-independent class name */ struct ClassTraits: public ClassTraitsBase { static string className() { return "ThePEG::PartonExtractor"; } }; /** @endcond */ } #endif /* ThePEG_PartonExtractor_H */ diff --git a/PDF/PolarizedBeamParticleData.h b/PDF/PolarizedBeamParticleData.h --- a/PDF/PolarizedBeamParticleData.h +++ b/PDF/PolarizedBeamParticleData.h @@ -1,146 +1,146 @@ // -*- C++ -*- // // PolarizedBeamParticleData.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PolarizedPolarizedBeamParticleData_H #define ThePEG_PolarizedPolarizedBeamParticleData_H // This is the declaration of the PolarizedBeamParticleData class. #include "BeamParticleData.h" #include "ThePEG/EventRecord/RhoDMatrix.h" #include "PolarizedBeamParticleData.fh" namespace ThePEG { /** * PolarizedBeamParticleData inherits from the BeamParticleData class and is used * for polarized beam particles * * @see \ref PolarizedBeamParticleDataInterfaces "The interfaces" * defined for PolarizedBeamParticleData. * @see BeamParticleData * @see PDFBase */ class PolarizedBeamParticleData: public virtual BeamParticleData { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ PolarizedBeamParticleData() : theLongPolarization(0.0) {} //@} /** @name The Create methods are special interfaces for ParticleData classes. */ //@{ /** * Create a Particle which is its own anti-particle. */ static PDPtr Create(long newId, string newPDGName); /** * Create a particle - anti particle pair. Note that setting the * parton density object on this particle does not change the parton * density of the anti particle iven if synchronized() is true. */ static PDPair Create(long newId, string newPDGName, string newAntiPDGName); //@} /** * Set-up the spin density matrix */ RhoDMatrix rhoMatrix() const; /** * The longitudinal polarization */ double longitudinalPolarization() const {return theLongPolarization;} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** * Protected constructor only to be used by subclasses or by the * Create method. */ PolarizedBeamParticleData(long newId, string newPDGName); /** * ParticleData clone method */ virtual PDPtr pdclone() const; private: /** * The longitudinal polarization */ double theLongPolarization; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initPolarizedBeamParticleData; /** * Private and non-existent assignment operator. */ - PolarizedBeamParticleData & operator=(const PolarizedBeamParticleData &); + PolarizedBeamParticleData & operator=(const PolarizedBeamParticleData &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of PolarizedBeamParticleData. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of PolarizedBeamParticleData. */ typedef BeamParticleData NthBase; }; /** This template specialization informs ThePEG about the name of the * PolarizedBeamParticleData class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::PolarizedBeamParticleData"; } }; /** @endcond */ } #endif /* ThePEG_PolarizedBeamParticleData_H */ diff --git a/PDF/RemnantHandler.h b/PDF/RemnantHandler.h --- a/PDF/RemnantHandler.h +++ b/PDF/RemnantHandler.h @@ -1,213 +1,213 @@ // -*- C++ -*- // // RemnantHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_RemnantHandler_H #define ThePEG_RemnantHandler_H // This is the declaration of the RemnantHandler class. #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/PDF/PartonBin.h" #include "ThePEG/PDF/PartonBinInstance.h" #include "ThePEG/Vectors/Transverse.h" #include "RemnantHandler.xh" namespace ThePEG { /** * RemnantHandler is an abstract base class for implementing classes * used to generate remnants when partons are extracted from * particles. * * @see \ref RemnantHandlerInterfaces "The interfaces" * defined for RemnantHandler. * @see PartonExtractor * @see PDFBase */ class RemnantHandler: public HandlerBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. If \a multi is true the derived class can be * used to extract more than one parton. */ RemnantHandler(bool multi = false); //@} public: /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return true if this remnant handler can handle extracting all * specified \a partons from the given \a particle. */ virtual bool canHandle(tcPDPtr particle, const cPDVector & partons) const = 0; /** * If the generation of remnants is expected to influence the actual * cross section of the hard sub process, the degrees of freedom * generated by this remnant handler may be included in the general * phase space sampling for the subprocess. In this case this * function should be overridden to return the number of degrees of * freedom used in the generation. If \a doScale is false, it means * that the actual virtuality of the extracted parton will be * obtained from another source. */ virtual int nDim(const PartonBin & pb, bool doScale) const; /** * Generate the momentum of the extracted parton with the \a parent * momentum given by the last argument. If the \a scale is negative, * it means that the doScale in the previous call to nDim() was * true, otherwise the given \a scale should be the virtuality of * the extracted parton. Generated quantities which are not returned * in the momentum may be saved in the PartonBinInstance, \a pb, for * later use. In particular, if the nDim() random numbers, \a r, are * not enough to generate with weight one, the resulting weight * should be stored with the remnantWeight() method of the parton * bin. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, const LorentzMomentum & parent, bool fixedPartonMomentum = false) const = 0; /** * Generate the momentum of the extracted parton with the \a parent * momentum given by the last argument. If the \a scale is negative, * it means that the doScale in the previous call to nDim() was * true, otherwise the given \a scale should be the virtuality of * the extracted parton. \a shat is the total invariant mass squared * of the hard sub-system produced by the extracted parton and the * primary parton entering from the other side. Generated quantities * which are not returned in the momentum may be saved in the * PartonBinInstance, \a pb, for later use. In particular, if the * nDim() random numbers, \a r, are not enough to generate with * weight one, the resulting weight should be stored with the * remnantWeight() method of the parton bin. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, Energy2 shat, const LorentzMomentum & parent, bool fixedPartonMomentum = false) const = 0; /** * Boost the generated remnants to the proper momentum given the * information in the parton bin, \a pb. */ virtual void boostRemnants(PartonBinInstance & pb) const; /** * Redo the remnant generation for the given particle bin, \a pb. If * \a oldp is non-null it corresponds to the previously extracted * parton which should be replaced by \a newp. If \a oldp is null it * means \a newp should be extracted in addition to the previously * extracted ones available in \a prev. * @return false if the generation failed. */ virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp, double newl, Energy2 scale, const LorentzMomentum & p, const PVector & prev = PVector()) const; /** * Redo the remnant generation for the given particle bin, \a pb. If * \a oldp is non-null it corresponds to the previously extracted * parton which should be replaced by \a newp. If \a oldp is null it * means \a newp should be extracted in addition to the previously * extracted ones available in \a prev. In either case \a shat is * the total invariant mass squared of the hard sub-system produced * by the extracted parton and the primary parton entering from the other * side. * * @return false if the generation failed. */ virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp, double newl, Energy2 scale, Energy2 shat, const LorentzMomentum & p, const PVector & prev = PVector()) const; //@} /** * Return true if this remnant handler is able to handle multiple * extractions of partons from the same particle. */ bool multiCapable() const { return isMultiCapable; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** * True if this handler can generate remnants also if several * partons have been extracted. */ bool isMultiCapable; private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class with persistent data. */ static AbstractClassDescription initRemnantHandler; /** * Private and non-existent assignment operator. */ - RemnantHandler & operator=(const RemnantHandler &); + RemnantHandler & operator=(const RemnantHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of RemnantHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of RemnantHandler. */ typedef HandlerBase NthBase; }; /** This template specialization informs ThePEG about the name of the * RemnantHandler class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::RemnantHandler"; } }; /** @endcond */ } #endif /* ThePEG_RemnantHandler_H */ diff --git a/PDF/SoftRemnantHandler.h b/PDF/SoftRemnantHandler.h --- a/PDF/SoftRemnantHandler.h +++ b/PDF/SoftRemnantHandler.h @@ -1,201 +1,201 @@ // -*- C++ -*- // // SoftRemnantHandler.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SoftRemnantHandler_H #define ThePEG_SoftRemnantHandler_H // This is the declaration of the SoftRemnantHandler class. #include "ThePEG/PDF/RemnantHandler.h" #include "ThePEG/PDT/RemnantDecayer.fh" namespace ThePEG { /** * SoftRemnantHandler inherits from the RemnantHandler and implements * the generation of a single collinear RemnantParticle when anything * is extracted from anything else. Such a RemnantParticle needs to be * decayed by a special RemnantDecayer and the SoftRemnantHandler * needs to be assign such a decayer to work properly. * * @see \ref SoftRemnantHandlerInterfaces "The interfaces" * defined for SoftRemnantHandler. */ class SoftRemnantHandler: public RemnantHandler { public: /** @name Virtual functions mandated by the RemnantHandler base class. */ //@{ /** * Return true if this remnant handler can handle extracting all * specified \a partons form the given \a particle. */ virtual bool canHandle(tcPDPtr particle, const cPDVector & partons) const; /** * Generate momenta. Generates the momenta of the extracted parton * in the particle cms (but with the parton \f$x\f$ still the * positive light-cone fraction) as given by the last argument, \a * p. If the particle is space-like the positive and negative * light-cone momenta are \f$\sqrt{-m^2}\f$ and \f$-sqrt{-m^2}\f$ * respectively. If the \a scale is negative, it means that the \a * doScale in the previous call to nDim() was true, otherwise the * given scale should be the virtuality of the extracted * parton. Generated quantities which are not returned in the * momentum may be saved in the PartonBin, \a pb, for later use. In * particular, if the nDim() random numbers, \a r, are not enough to * generate with weight one, the resulting weight should be stored * with the remnantWeight() method of the parton bin. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, const LorentzMomentum & p, bool fixedPartonMomentum = false) const; /** * Generate the momentum of the extracted parton with the \a parent * momentum given by the last argument. If the \a scale is negative, * it means that the doScale in the previous call to nDim() was * true, otherwise the given \a scale should be the virtuality of * the extracted parton. \a shat is the total invariant mass squared * of the hard sub-system produced by the extracted parton and the * primary parton entering from the other side. Generated quantities * which are not returned in the momentum may be saved in the * PartonBinInstance, \a pb, for later use. In particular, if the * nDim() random numbers, \a r, are not enough to generate with * weight one, the resulting weight should be stored with the * remnantWeight() method of the parton bin. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, Energy2 shat, const LorentzMomentum & parent, bool fixedPartonMomentum = false) const; /** * Redo the remnant generation for the given particle bin, \a pb. If * \a oldp is non-null it corresponds to the previously extracted * parton which should be replaced by \a newp. If \a oldp is null it * means \a newp should be extracted in addition to the previously * extracted ones available in \a prev. * @return false if the generation failed. */ virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp, double newl, Energy2 scale, const LorentzMomentum & p, const PVector & prev = PVector()) const; /** * Redo the remnant generation for the given particle bin, \a pb. If * \a oldp is non-null it corresponds to the previously extracted * parton which should be replaced by \a newp. If \a oldp is null it * means \a newp should be extracted in addition to the previously * extracted ones available in \a prev. In either case \a shat is * the total invariant mass squared of the hard sub-system produced * by the extracted parton and the primary parton entering from the other * side. * * @return false if the generation failed. */ virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp, double newl, Energy2 scale, Energy2 shat, const LorentzMomentum & p, const PVector & prev = PVector()) 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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * A pointer to a RemnantDecayer object which is able to decay the * produced RemnantParticle objects. */ RemDecPtr remdec; /** * Utility function for the interface. */ void setDecayer(RemDecPtr rd); private: /** * Describe a concrete class with persistent data. */ static ClassDescription initSoftRemnantHandler; /** * Private and non-existent assignment operator. */ - SoftRemnantHandler & operator=(const SoftRemnantHandler &); + SoftRemnantHandler & operator=(const SoftRemnantHandler &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of SoftRemnantHandler. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of SoftRemnantHandler. */ typedef RemnantHandler NthBase; }; /** This template specialization informs ThePEG about the name of the * SoftRemnantHandler class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SoftRemnantHandler"; } }; /** @endcond */ } #endif /* ThePEG_SoftRemnantHandler_H */ diff --git a/PDF/UnResolvedRemnant.h b/PDF/UnResolvedRemnant.h --- a/PDF/UnResolvedRemnant.h +++ b/PDF/UnResolvedRemnant.h @@ -1,233 +1,233 @@ // -*- C++ -*- // // UnResolvedRemnant.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_UnResolvedRemnant_H #define ThePEG_UnResolvedRemnant_H #include "ThePEG/PDF/RemnantHandler.h" namespace ThePEG { /** * UnResolvedRemnant inherits from the RemnantHandler and implements * the generation of either the incoming particle as the remnant * with the emission of a photon, pomeron or reggeon, or * a photon remnant for the particle entering the hard process. * * @see \ref UnResolvedRemnantInterfaces "The interfaces" * defined for UnResolvedRemnant. * @see UnResolvedPDF */ class UnResolvedRemnant: public RemnantHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ UnResolvedRemnant(); //@} public: /** @name Virtual functions mandated by the RemnantHandler base class. */ //@{ /** * Return true if this remnant handler can handle extracting all * specified \a partons form the given \a particle. */ virtual bool canHandle(tcPDPtr particle, const cPDVector & partons) const; /** * If the generation of remnants is expected to influence the actual * cross section of the hard sub process, the degrees of freedom * generated by this remnant handler may be included in the general * phase space sampling for the subprocess. In this case this * function should be overridden to return the number of degrees of * freedom used in the generation. If \a doScale is false, it means * that the actual virtuality of the extracted parton will be * obtained from another source. */ virtual int nDim(const PartonBin & pb, bool doScale) const; /** * Redo the remnant generation for the given particle bin, \a pb. If * \a oldp is non-null it corresponds to the previously extracted * parton which should be replaced by \a newp. If \a oldp is null it * means \a newp should be extracted in addition to the previously * extracted ones available in \a prev. * @return false if the generation failed. */ virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp, double newl, Energy2 scale, const LorentzMomentum & p, const PVector & prev = PVector()) const; /** * Redo the remnant generation for the given particle bin, \a pb. If * \a oldp is non-null it corresponds to the previously extracted * parton which should be replaced by \a newp. If \a oldp is null it * means \a newp should be extracted in addition to the previously * extracted ones available in \a prev. In either case \a shat is * the total invariant mass squared of the hard sub-system produced * by the extracted parton and the primary parton entering from the other * side. * * @return false if the generation failed. */ virtual bool recreateRemnants(PartonBinInstance & pb, tPPtr oldp, tPPtr newp, double newl, Energy2 scale, Energy2 shat, const LorentzMomentum & p, const PVector & prev = PVector()) const; /** * Generate momenta. Generates the momenta of the extracted parton * in the particle cms (but with the parton \f$x\f$ still the * positive light-cone fraction) as given by the last argument, \a * p. If the particle is space-like the positive and negative * light-cone momenta are \f$\sqrt{-m^2}\f$ and \f$-sqrt{-m^2}\f$ * respectively. If the \a scale is negative, it means that the \a * doScale in the previous call to nDim() was true, otherwise the * given scale should be the virtuality of the extracted * parton. Generated quantities which are not returned in the * momentum may be saved in the PartonBin, \a pb, for later use. In * particular, if the nDim() random numbers, \a r, are not enough to * generate with weight one, the resulting weight should be stored * with the remnantWeight() method of the parton bin. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, const LorentzMomentum & p, bool fixedPartonMomentum = false) const; /** * Generate the momentum of the extracted parton with the \a parent * momentum given by the last argument. If the \a scale is negative, * it means that the doScale in the previous call to nDim() was * true, otherwise the given \a scale should be the virtuality of * the extracted parton. \a shat is the total invariant mass squared * of the hard sub-system produced by the extracted parton and the * primary parton entering from the other side. Generated quantities * which are not returned in the momentum may be saved in the * PartonBinInstance, \a pb, for later use. In particular, if the * nDim() random numbers, \a r, are not enough to generate with * weight one, the resulting weight should be stored with the * remnantWeight() method of the parton bin. */ virtual Lorentz5Momentum generate(PartonBinInstance & pb, const double * r, Energy2 scale, Energy2 shat, const LorentzMomentum & parent, bool fixedPartonMomentum = 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); //@} /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 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 minimum energy fraction allowed for a photon remnant. */ double minX; /** * Easy access to a photon data object. */ tPDPtr thePhoton; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initUnResolvedRemnant; /** * Private and non-existent assignment operator. */ - UnResolvedRemnant & operator=(const UnResolvedRemnant &); + UnResolvedRemnant & operator=(const UnResolvedRemnant &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of UnResolvedRemnant. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of UnResolvedRemnant. */ typedef RemnantHandler NthBase; }; /** This template specialization informs ThePEG about the name of the * UnResolvedRemnant class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::UnResolvedRemnant"; } /** Return the name of the shared library be loaded to get access to * the UnResolvedRemnant class and every other class it uses * (except the base class). */ static string library() { return "UnResolvedRemnant.so"; } }; /** @endcond */ } #endif /* ThePEG_UnResolvedRemnant_H */ diff --git a/PDF/WeizsackerWilliamsPDF.h b/PDF/WeizsackerWilliamsPDF.h --- a/PDF/WeizsackerWilliamsPDF.h +++ b/PDF/WeizsackerWilliamsPDF.h @@ -1,205 +1,205 @@ // -*- C++ -*- #ifndef THEPEG_WeizsackerWilliamsPDF_H #define THEPEG_WeizsackerWilliamsPDF_H // // This is the declaration of the WeizsackerWilliamsPDF class. // #include "ThePEG/PDF/PDFBase.h" namespace ThePEG { using namespace ThePEG; /** * Here is the documentation of the WeizsackerWilliamsPDF class. * * @see \ref WeizsackerWilliamsPDFInterfaces "The interfaces" * defined for WeizsackerWilliamsPDF. */ class WeizsackerWilliamsPDF: public PDFBase { public: /** * Default constructor */ WeizsackerWilliamsPDF(); /** @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(); 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 static object used to initialize the description of this class. * Indicates that this is an concrete class without persistent data. */ static ClassDescription initWeizsackerWilliamsPDF; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - WeizsackerWilliamsPDF & operator=(const WeizsackerWilliamsPDF &); + WeizsackerWilliamsPDF & operator=(const WeizsackerWilliamsPDF &) = delete; private: /** * Minimum \f$Q^2\f$ for the photon */ Energy2 _q2min; /** * Maximum \f$Q^2\f$ for the photon */ Energy2 _q2max; /** * Parameter for the jacobian mapping of \f$z\f$ */ double _a; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of WeizsackerWilliamsPDF. */ template <> struct BaseClassTrait { /** Typedef of the first base class of WeizsackerWilliamsPDF. */ typedef PDFBase NthBase; }; /** This template specialization informs ThePEG about the name of * the WeizsackerWilliamsPDF class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::WeizsackerWilliamsPDF"; } /** * The name of a file containing the dynamic library where the class * WeizsackerWilliamsPDF is implemented. It may also include several, space-separated, * libraries if the class WeizsackerWilliamsPDF 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 "WeizsackerWilliamsPDF.so"; } }; /** @endcond */ } #endif /* THEPEG_WeizsackerWilliamsPDF_H */ diff --git a/PDT/BreitWignerMass.h b/PDT/BreitWignerMass.h --- a/PDT/BreitWignerMass.h +++ b/PDT/BreitWignerMass.h @@ -1,90 +1,90 @@ // -*- C++ -*- // // BreitWignerMass.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_BreitWignerMass_H #define ThePEG_BreitWignerMass_H // This is the declaration of the BreitWignerMass class. #include "ThePEG/PDT/MassGenerator.h" namespace ThePEG { /** * BreitWignerMass is derived from MassGenerator and is able to * generate the mass for a particle given its nominal mass and its * with. * * * @see MassGenerator * @see ParticleData * */ class BreitWignerMass: public MassGenerator { public: /** @name Virtual methods required by the MassGenerator base class. */ //@{ /** * Return true if this mass generator can handle the given particle * type. */ virtual bool accept(const ParticleData &) const { return true; } /** * Generate a mass for an instance of a given particle type. */ virtual Energy mass(const ParticleData &) const; //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe concrete class without persistent data. */ static NoPIOClassDescription initBreitWignerMass; /** * Private and non-existent assignment operator. */ - BreitWignerMass & operator=(const BreitWignerMass &); + BreitWignerMass & operator=(const BreitWignerMass &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ ThePEG_DECLARE_DYNAMIC_CLASS_TRAITS(BreitWignerMass,MassGenerator,"BreitWignerMass.so"); /** @endcond */ } #endif /* ThePEG_BreitWignerMass_H */ diff --git a/PDT/ColourPairDecayer.h b/PDT/ColourPairDecayer.h --- a/PDT/ColourPairDecayer.h +++ b/PDT/ColourPairDecayer.h @@ -1,161 +1,161 @@ // -*- C++ -*- // // ColourPairDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ColourPairDecayer_H #define THEPEG_ColourPairDecayer_H // This is the declaration of the ColourPairDecayer class. #include "ThePEG/PDT/FlatDecayer.h" namespace ThePEG { /** * ColourPairDecayer inherits from the FlatDecayer class and performs * decays according to phase space into two or more particles, some of * which may be coloured. The coloured particles must come in pairs * and will be colour connected pair-wise. * * @see \ref ColourPairDecayerInterfaces "The interfaces" * defined for ColourPairDecayer. */ class ColourPairDecayer: public FlatDecayer { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ ColourPairDecayer() : doShower(true) {} //@} public: /** @name Virtual functions required by the Decayer and FlatDecayer classes. */ //@{ /** * 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; /** * Produce children. Used by the FlatDecayer::decay() to produce * instances of the children given a DecayMode \a dm and the * decaying particle \a parent.. */ virtual ParticleVector getChildren(const DecayMode & dm, const Particle & parent) const; //@} /** * Return true if the produced gluons and quarks should be * showered. The corresponding flag is set though the interface. */ bool shower() const { return doShower; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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: /** * If true the produced gluons and quarks should be showered. */ bool doShower; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initColourPairDecayer; /** * Private and non-existent assignment operator. */ - ColourPairDecayer & operator=(const ColourPairDecayer &); + ColourPairDecayer & operator=(const ColourPairDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of ColourPairDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of ColourPairDecayer. */ typedef FlatDecayer NthBase; }; /** This template specialization informs ThePEG about the name of the * ColourPairDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::ColourPairDecayer"; } /** Return the name of the shared library be loaded to get access to * the ColourPairDecayer class and every other class it uses * (except the base class). */ static string library() { return "ColourPairDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_ColourPairDecayer_H */ diff --git a/PDT/ConstituentParticleData.h b/PDT/ConstituentParticleData.h --- a/PDT/ConstituentParticleData.h +++ b/PDT/ConstituentParticleData.h @@ -1,163 +1,163 @@ // -*- C++ -*- // // ConstituentParticleData.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ConstituentParticleData_H #define ThePEG_ConstituentParticleData_H // This is the declaration of the ConstituentParticleData class. #include "ThePEG/PDT/ParticleData.h" namespace ThePEG { /** * ConstituentParticleData inherits from the ParticleData class and is * used for quarks, diquarks and gluons to store information about * their constituent mass. * * @see \ref ConstituentParticleDataInterfaces "The interfaces" * defined for ConstituentParticleData. */ class ConstituentParticleData: public virtual ParticleData { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ ConstituentParticleData() : theConstituentMass(ZERO), theDefaultConstituentMass(ZERO) {} //@} /** @name The Create methods are special interfaces for ParticleData classes. */ //@{ /** * Create a Particle which is its own anti-particle. */ static PDPtr Create(long newId, string newPDGName); /** * Create a particle - anti particle pair. */ static PDPair Create(long newId, string newPDGName, string newAntiPDGName); //@} public: /** * Return the constituent mass of this parton. */ virtual Energy constituentMass() const { return theConstituentMass; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** * Protected constructor only to be used by subclasses or by the * Create method. */ ConstituentParticleData(long newId, string newPDGName); /** * Read setup info from a standard stream. The information that must * be supplied is the same as for ParticleData::readSetup with an * additional constituent mass (in GeV) added in the end. */ virtual void readSetup(istream & is); /** * ParticleData clone method */ virtual PDPtr pdclone() const; private: /** * Utility function for the interface. */ void setConstituentMass(Energy m); /** * Utility function for the interface. */ Energy defConstituentMass() const; private: /** * The constituent mass of this parton. */ Energy theConstituentMass; /** * The default constituent mass of this parton. */ Energy theDefaultConstituentMass; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initConstituentParticleData; /** * Private and non-existent assignment operator. */ - ConstituentParticleData & operator=(const ConstituentParticleData &); + ConstituentParticleData & operator=(const ConstituentParticleData &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of ConstituentParticleData. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of ConstituentParticleData. */ typedef ParticleData NthBase; }; /** This template specialization informs ThePEG about the name of the * ConstituentParticleData class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::ConstituentParticleData"; } }; /** @endcond */ } #endif /* ThePEG_ConstituentParticleData_H */ diff --git a/PDT/DalitzDecayer.h b/PDT/DalitzDecayer.h --- a/PDT/DalitzDecayer.h +++ b/PDT/DalitzDecayer.h @@ -1,186 +1,186 @@ // -*- C++ -*- // // DalitzDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_DalitzDecayer_H #define THEPEG_DalitzDecayer_H // This is the declaration of the DalitzDecayer class. #include "ThePEG/PDT/Decayer.h" // #include "DalitzDecayer.fh" // #include "DalitzDecayer.xh" namespace ThePEG { /** * The DalitzDecayer inherits from the Decayer class and performs * Dalitz decays into \f$\gamma e^+ e^-\f$. * * @see \ref DalitzDecayerInterfaces "The interfaces" * defined for DalitzDecayer. */ class DalitzDecayer: public Decayer { public: /** @name Standard constructors and destructors. */ //@{ /** * Destructor. */ virtual ~DalitzDecayer(); //@} 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); //@} /** * 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: /** @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: /** * Quick access to the rho particle data. */ PDPtr rho; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initDalitzDecayer; /** * Private and non-existent assignment operator. */ - DalitzDecayer & operator=(const DalitzDecayer &); + DalitzDecayer & operator=(const DalitzDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of DalitzDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of DalitzDecayer. */ typedef Decayer NthBase; }; /** This template specialization informs ThePEG about the name of the * DalitzDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::DalitzDecayer"; } /** Return the name of the shared library be loaded to get access to * the DalitzDecayer class and every other class it uses * (except the base class). */ static string library() { return "DalitzDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_DalitzDecayer_H */ diff --git a/PDT/DecayMode.h b/PDT/DecayMode.h --- a/PDT/DecayMode.h +++ b/PDT/DecayMode.h @@ -1,607 +1,607 @@ // -*- C++ -*- // // DecayMode.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_DecayMode_H #define ThePEG_DecayMode_H // This is the declaration of the DecayMode class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Interface/Interfaced.h" #include "DecayMode.fh" #include "MatcherBase.h" #include "Decayer.h" namespace ThePEG { ThePEG_DECLARE_MULTISET(tPDPtr,ParticleMSet); ThePEG_DECLARE_MULTISET(tPMPtr,MatcherMSet); ThePEG_DECLARE_MULTISET(tDMPtr,ModeMSet); /** * The DecayMode class describes a decay channel of a particle. In its * simplest form it contains simply a parent ParticleData object and a * list of decay products, but it can also specify a set of * MatcherBase objects each representing one of a set of possible * decay products. A matcher can also be specified to represents an * unlimited set of decay products. Decay chains can be represented by * specifying other decay channels where the parents are taken to be * intermediate resonances. It is also possible to specify the absence * of intermediate resonances. * * Each decay mode can be uniquely described by a character string on * the form * {decaying-particle-name}->{decay-product-specifier}[,{decay-product-specifier},...]; * where no spaces are allowed anywhere. The decaying-particle-name * should be a path to a particle in the Repository or a * PDG-standardized particle name (see ParticleData::PDGName()) and * the decay-product-specifier can be one of the following: * *
    * *
  • a path to a particle in the Repository or a PDG-standardized * particle name if it is a specific decay product, * *
  • a question mark followed by the name of a particle matcher * object in the Repository if representing one of several different * alternative decay products, * *
  • a star followed by the name of a particle matcher object in * the Repository if representing any number of several different * alternative decay products (note that only one of these * wild-card matchers may be specified, if several are given * only the last one will be taken into account), * *
  • a whole decay mode string enclosed in square brackets if * representing a resonance decay product with a specified decay mode, * *
  • an exclamation mark followed by a path to a particle in the * Repository or a PDG-standardized particle name representing the * exclusion of an intermediate resonance decaying into the other * specified decay products. * *
  • two paths to particles in the Repository or PDG-standardized * particle names with an equal sign between, indicating two coloured * particles which are in a colour-singlet state. * *
* * Note that the order of the specified decay products will be * preserved when the corresponding particles are produced in a decay. * * The possibility of specifying matchers as decay products means that * one decay mode may overlap with another one. When an EventGenerator * is initialized all decay modes are checked so that a given decay * mode afterwards will report if there are other modes which are * matched by its matchers through the overlap() function. * * @see \ref DecayModeInterfaces "The interfaces" * defined for DecayMode. * @see ParticleData * @see MatcherBase */ class DecayMode: public Interfaced { public: /** ParticleData is a friend. */ friend class ParticleData; /** RemnantData is a friend. */ friend class RemnantData; /** The EventGenerator is a friend. */ friend class EventGenerator; public: /** A vector of DecayMode pointers. */ typedef vector ModeVector; /** A vector of pairs of ParticleData pointers. */ typedef vector LinkVector; public: /** * Create a decay mode from a given tag. This function is used * directly by the Repository. If name of the decaying particle is a * valid path to a particle object, the decaymode will be added to * that particle, otherwise it will be added to the default particle * of that name. */ static DMPtr constructDecayMode(string & tag, vector * save = 0); /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ DecayMode(); /** * Copy-constructor. */ DecayMode(const DecayMode &); /** * Destructor. */ ~DecayMode(); //@} /** * Return a clone of this decay mode with \a pd as the decaying * particle. */ virtual DMPtr clone(tPDPtr pd) const; public: /** * Return the tag for this decay mode. This string is a unique * identifier for this decay mode. */ const string & tag() const { return theTag.size() ? theTag : ( theTag = makeTag() ); } /** * Get a pointer to the particle data object corresponding to * the decaying particle. */ tcPDPtr parent() const { return theParent; } /** * The set of identified decay products. */ const ParticleMSet & products() const { return theProducts; } /** * The set of identified decay products in the order they were specified. */ const tPDVector & orderedProducts() const { return theOrderedProducts; } /** * Produce particles corresponding to the identified decay * products. They will be orderd in the same order they were * sspecified. */ PVector produceProducts() const; /** * The set of identified resonance products with specified decay * modes */ const ModeMSet & cascadeProducts() const { return theCascadeProducts; } /** * The set of matchers each corresponding to one decay product. */ const MatcherMSet & productMatchers() const { return theMatchers; } /** * The pointer to a matcher corresponding to any number of decay * products */ tPMPtr wildProductMatcher() const { return theWildMatcher; } /** * The set particles corresponding to excluded intermediate * resonances. */ const ParticleMSet & excluded() const { return theExcluded; } /** * Return the branching ratio to be used. */ double brat() const; /** * Calculate the branching ratio for a particular particle instance. */ double brat(const Particle &) const; /** * Get the decayer assigned to this mode. */ tDecayerPtr decayer() const { return theDecayer; } /** * Check if another decay mode is included in this one. */ bool includes(const DecayMode &) const; /** * Return a pointer to the corresponding decaymode for the * antiparticle decay. */ tDMPtr CC() const { return theAntiPartner; } /** * Check if another decay mode has the same final state as this * one. */ bool operator == (const DecayMode & d) const { return tag() == d.tag() ; } /** * Return a vector of pairs of decay products which are linked * together (e.g. colourless q-qbar pairs). */ const LinkVector & links() const { return theLinks; } /** * Return the list of overlapping decay modes. */ const ModeVector & overlap() const { return theOverlap; } /** * Modify this mode to have properties corresponding to its anti-partner. */ void synchronize(); /** * Check whether this decay mode is switched on */ bool on() const { return isOn; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** @name Standard Interfaced functions. */ //@{ /** * Check sanity of the object during the setup phase. */ virtual void doupdate(); /** * 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: /** * Set a pointer to the particle data object corresponding to * the decaying particle. */ void parent(tPDPtr pd) { theParent = pd; } /** * Set the branching ratio to be used. */ void brat(double); /** * Switch on this decay mode. */ void switchOn(); /** * Switch off this decay mode. */ void switchOff(); /** * Set the decayer. The set method returns false if the decayer * does not claim to be able to handle the decay. */ void decayer(tDecayerPtr); /** * Add identified decay products. */ void addProduct(tPDPtr); /** * Add a pair of decay products which are linked together * (e.g. colourless q-qbar pairs). */ void addLink(tPDPtr a, tPDPtr b); /** * Add identified resonant product with specified decay mode. */ void addCascadeProduct(tDMPtr); /** * Add a mathcer corresponding to one decay product. */ void addProductMatcher(tPMPtr); /** * Add a matcher corresponding to any number of decay products. */ void setWildMatcher(tPMPtr); /** * Add a particle corresponding to an excluded intermediate * resonance. */ void addExcluded(tPDPtr); /** * Protected creation and clone methods. */ static DMPtr Create(tPDPtr newParent, double newBrat = 0.0, bool newOn = false); /** * Protected constructor. */ DecayMode(tPDPtr newParticle, double newBrat, bool newOn); /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 special clone function. */ DMPtr dmclone() const; /** * Read setup info from a standard stream used by the * Repository. The following information must be supplied in a * white-space separated list: the branching ratio, on or off (true * or false), and the name of a Decayer. */ virtual void readSetup(istream & is); /** * The set of identified decay products. */ ParticleMSet & products() { return theProducts; } /** * The set of identified resonant products with specified decay * modes */ ModeMSet & cascadeProducts() { return theCascadeProducts; } /** * The set of matchers each corresponding to one decay product. */ MatcherMSet & productMatchers() { return theMatchers; } /** * The pointer to a matcher corresponding to any number of decay * products */ tPMPtr & wildProductMatcher() { return theWildMatcher; } /** * The set particles corresponding to excluded intermediate * resonances. */ ParticleMSet & excluded() { return theExcluded; } /** * Set the pointer to the corresponding decaymode for the * antiparticle decay. */ void CC(tDMPtr cc) {theAntiPartner = cc;} private: /** * Add a decay mode to the list of overlapping modes if included. */ bool addOverlap(tcDMPtr); /** * Remove all decay modes from the list of overlapping modes. */ void resetOverlap(); /** * Check if two sets of particles have equivalent types. */ bool compareId(const ParticleMSet &, const ParticleMSet &) const; /** * Check if a particle set contains a given particle ID. */ ParticleMSet::const_iterator findId(const ParticleMSet &, const ParticleData &) const; /** * Use the members in this decay channel and generate the * corresponding tag. */ string makeTag() const; /** * Delete the tag (it will be regenerated later if asked for). */ void resetTag() { theTag = ""; if ( CC() ) CC()->theTag = ""; } private: /** * Utility function for the interface. */ void setOn(long); /** * Utility function for the interface. */ long getOn() const; /** * Utility function for the interface. */ void setDecayer(DecayerPtr); private: /** * The tag. */ mutable string theTag; /** * The branching ratio. */ double theBrat; /** * True if this mode is switched on. */ bool isOn; /** * Pointer to a particle data object corresponding to the decaying * particle. */ tPDPtr theParent; /** * The set of specified decay particles. */ ParticleMSet theProducts; /** * The set of specified decay particles in the order they was specified. */ tPDVector theOrderedProducts; /** * The set of matching decay channels corresponding to a specified * with a specified subsequent decay mode. */ ModeMSet theCascadeProducts; /** * The set of matching decay products. Each of the matchers * correspond to one particle. */ MatcherMSet theMatchers; /** * A particle matcher which corresponds to zero or more particles. */ tPMPtr theWildMatcher; /** * A set of particles which are not allowed as intermediate * resonances. */ ParticleMSet theExcluded; /** * A list of decay modes which are included in this one. */ ModeVector theOverlap; /** * The decayer object responsible for performing the decay. */ DecayerPtr theDecayer; /** * The corresponding decay mode of the anti particle. */ tDMPtr theAntiPartner; /** * The vector of pairs of decay products which are linked together * (e.g. colourless q-qbar pairs). */ LinkVector theLinks; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initDecayMode; /** * Private and non-existent assignment operator. */ - DecayMode & operator=(const DecayMode &); + DecayMode & operator=(const DecayMode &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of DecayMode. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of DecayMode. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * DecayMode class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::DecayMode"; } }; /** @endcond */ } #endif /* ThePEG_DecayMode_H */ diff --git a/PDT/Decayer.h b/PDT/Decayer.h --- a/PDT/Decayer.h +++ b/PDT/Decayer.h @@ -1,211 +1,211 @@ // -*- C++ -*- // // Decayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Decayer_H #define ThePEG_Decayer_H // This is the declaration of the Decayer class. #include "ThePEG/Config/ThePEG.h" #include "Decayer.fh" #include "ThePEG/Handlers/HandlerBase.h" #include "ThePEG/MatrixElement/Amplitude.h" namespace ThePEG { /** * Decayer is an abstract base class to specify objects modelling the * decay of a particle. * * @see \ref DecayerInterfaces "The interfaces" * defined for Decayer. * @see ParticleData * @see DecayMode */ class Decayer: public HandlerBase { public: /** @name Virtual functions to be overridden in sub-classes. */ //@{ /** * 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 = 0; /** * Return true if this Decayer need to access the full current step * when a particle is decayed. If true is returned the standard * Decay Handler will call the decay(const DecayMode&,const * Particle&,Step&) function rather than the decay(const * DecayMode&,const Particle&) function. */ virtual bool needsFullStep() 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 = 0; /** * Perform a decay for a given DecayMode and a given Particle * instance. This version allows the decaying particle to borrow * energy/momentum from its sublings in the current step. This will * be called by the standard DecayHandler if the needsFullStep() * function returns true. * * @param dm the DecayMode describing the decay. * @param p the Particle instance to be decayed. * @param step the current step in which to find possible siblings to * shuffle energy with. * @return a ParticleVector containing the decay products. */ virtual ParticleVector decay(const DecayMode & dm, const Particle & p, Step & step) const; /** * Calculate branching ratio. If this model has any oppinions on the * decay rate for a given decay mode \a dm, for a given particle * type \a pd, this method may be overriden to return this * oppinion. \a oldbrat is the branching ratio specified in the * DecayMode or by asking the WidthGenerator of \a pd. */ virtual double brat(const DecayMode & dm, const ParticleData & pd, double oldbrat) const; /** * Calculate branching ratio. If this model has any oppinions on the * decay rate for a given decay mode \a dm, for a given particle \a * p, this method may be overriden to return this oppinion. \a * oldbrat is the branching ratio specified in the DecayMode or by * asking the WidthGenerator of \a p. */ virtual double brat(const DecayMode & dm, const Particle & p, double oldbrat) const; /** * Produce the children. Can be used by sub-class decay() functions * to produce instances of the children. This default implementation * just calls the produceProducts() of the specified decay products * in DecayMode object, \a dm. */ virtual ParticleVector getChildren(const DecayMode & dm, const Particle & parent) const; /** * Boost the decay products. Can be used by sub-classes to perform * the final boost back from the parents cms. This default version * does just that. */ virtual void finalBoost(const Particle & parent, const ParticleVector & children) const; /** * Set the scales. Can be used by sub classes to set the production * scale of the children. This default version sets the scale to the * parents mass. */ virtual void setScales(const Particle & parent, const ParticleVector & children) const; //@} /** * Return an amplitude associated with this decay matrix * element. May return null. */ Ptr::pointer amplitude() const { return theAmplitude; } /** * Static function to administer the decay of a \a particle. The * children are properly added to the particle and to the given \a * step. Maximum \a maxtry attempts to decay the particle is * performed. * @return the produced children. */ static ParticleVector DecayParticle(tPPtr parent, Step & step, long maxtry = 1000); /** * Exception class used if something goes wrong in DecayParticle(). */ struct DecayFailure: public Exception {}; public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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(); private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class without persistent data. */ static AbstractNoPIOClassDescription initDecayer; /** * Private and non-existent assignment operator. */ - Decayer & operator=(const Decayer &); + Decayer & operator=(const Decayer &) = delete; /** * A possible null pointer to an amplitude associated with this * matrix element. */ Ptr::pointer theAmplitude; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of Decayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Decayer. */ typedef HandlerBase NthBase; }; /** This template specialization informs ThePEG about the name of the * Decayer class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Decayer"; } }; /** @endcond */ } #endif /* ThePEG_Decayer_H */ diff --git a/PDT/DummyDecayer.h b/PDT/DummyDecayer.h --- a/PDT/DummyDecayer.h +++ b/PDT/DummyDecayer.h @@ -1,132 +1,132 @@ // -*- C++ -*- // // DummyDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_DummyDecayer_H #define THEPEG_DummyDecayer_H // This is the declaration of the DummyDecayer class. #include "ThePEG/PDT/Decayer.h" namespace ThePEG { /** * DummyDecayer inherits from Decayer and is a dummy decayer class to * be used for symbolic decay channels. If it for some reason is * called to perform a decay, it will throw a std::logic_error. * * @see \ref DummyDecayerInterfaces "The interfaces" * defined for DummyDecayer. */ class DummyDecayer: public Decayer { 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 always. */ virtual bool accept(const DecayMode & dm) const; /** * Perform a decay for a given DecayMode and a given Particle * instance. Will throw std::logic_error if called. * @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; /** * Will always return zero, since no decay can ever be performed * with this decayer. */ virtual double brat(const DecayMode &, const ParticleData &, double) const; /** * Will always return zero, since no decay can ever be performed * with this decayer. */ virtual double brat(const DecayMode &, const Particle &, double) const; //@} public: /** * Standard Init function used to initialize the interfaces. */ static void Init(); protected: protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initDummyDecayer; /** * Private and non-existent assignment operator. */ - DummyDecayer & operator=(const DummyDecayer &); + DummyDecayer & operator=(const DummyDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of DummyDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of DummyDecayer. */ typedef Decayer NthBase; }; /** This template specialization informs ThePEG about the name of the * DummyDecayer class. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::DummyDecayer"; } }; /** @endcond */ } #endif /* THEPEG_DummyDecayer_H */ diff --git a/PDT/FlatDecayer.h b/PDT/FlatDecayer.h --- a/PDT/FlatDecayer.h +++ b/PDT/FlatDecayer.h @@ -1,138 +1,138 @@ // -*- C++ -*- // // FlatDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_FlatDecayer_H #define ThePEG_FlatDecayer_H // This is the declaration of the FlatDecayer class. #include "ThePEG/PDT/Decayer.h" namespace ThePEG { /** * The FlatDecayer class inrerits from the abstract Decayer class and * implements the decay of a given Particle to a given set of children * according to a flat phase space distribution. * * It is possible to implement a more complicated decay distribution * by inheriting from the FlatDecayer class and only override the * virtual function reweight() to return a weight (between zero and * one) of a given phase space point relative to the flat * distribution. * * @see \ref FlatDecayerInterfaces "The interfaces" * defined for FlatDecayer. * @see Decayer * @see Particle */ class FlatDecayer: public Decayer { 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; /** * Give a weight to a phase space point. To be overridden by * subclasses. For a given decay mode, \a dm, decaying \a parent * particle and decayproducts, \a children, distributed according to * a flat distribution in phase space, return a weight (less or * equal to unity) modifying the flat distribution to the desired * one. Note that the chosen phase space point may be rejected, but * the chosen decay channel will not. This means that the weight * returned by this function does not influence the branching * ratios. For the FlatDecayer class this function simply returns 1. */ virtual double reweight(const DecayMode &, const Particle & , const ParticleVector & ) const { return 1.0; } //@} 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; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initFlatDecayer; /** * Private and non-existent assignment operator. */ - FlatDecayer & operator=(const FlatDecayer &); + FlatDecayer & operator=(const FlatDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of FlatDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of FlatDecayer. */ typedef Decayer NthBase; }; /** This template specialization informs ThePEG about the name of the * FlatDecayer class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::FlatDecayer"; } }; /** @endcond */ } #endif /* ThePEG_FlatDecayer_H */ diff --git a/PDT/MassGenerator.h b/PDT/MassGenerator.h --- a/PDT/MassGenerator.h +++ b/PDT/MassGenerator.h @@ -1,89 +1,89 @@ // -*- C++ -*- // // MassGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MassGenerator_H #define ThePEG_MassGenerator_H // This is the declaration of the MassGenerator class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Interface/Interfaced.h" #include "MassGenerator.fh" namespace ThePEG { /** * MassGenerator is an abstract base class used by the ParticleData * class to generate a mass for a Particle instance. * * @see \ref MassGeneratorInterfaces "The interfaces" * defined for MassGenerator. * @see ParticleData */ class MassGenerator: public Interfaced { public: /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return true if this mass generator can handle the given particle * type. */ virtual bool accept(const ParticleData &) const = 0; /** * Generate a mass for an instance of a given particle type. */ virtual Energy mass(const ParticleData &) const = 0; //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class without persistent data. */ static AbstractNoPIOClassDescription initMassGenerator; /** * Private and non-existent assignment operator. */ - MassGenerator & operator=(const MassGenerator &); + MassGenerator & operator=(const MassGenerator &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of MassGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MassGenerator. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * MassGenerator class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MassGenerator"; } }; /** @endcond */ } #endif /* ThePEG_MassGenerator_H */ diff --git a/PDT/MatcherBase.h b/PDT/MatcherBase.h --- a/PDT/MatcherBase.h +++ b/PDT/MatcherBase.h @@ -1,420 +1,420 @@ // -*- C++ -*- // // MatcherBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MatcherBase_H #define ThePEG_MatcherBase_H // This is the declaration of the MatcherBase class. #include "ParticleData.h" #include "ThePEG/EventRecord/Particle.h" namespace ThePEG { /** * MatcherBase is an abstract base class to be used for objects * representing groups of ParticleData objects. Concrete * implementations will typically use the templated Matcher class for * easy building of a full sub-class. * * @see ParticleData * @see Matcher * */ class MatcherBase: public Interfaced { public: /** Repository needs to be a friend. */ friend class Repository; /** * Convenient typedef. */ typedef set tPDSet; /** * Convenient typedef. */ typedef set tPMSet; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ MatcherBase(); /** * Copy-constructor. */ MatcherBase(const MatcherBase &); /** * Destructor. */ virtual ~MatcherBase(); //@} public: /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Check if a particle type meets the criteria. */ virtual bool check(const ParticleData &) const = 0; /** * 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 = 0; //@} /** @name Check if something is matched. */ //@{ /** * Check if a Particle meets the criteria. */ bool checkp(const Particle & p) const { return check(p.data()); } /** * Check if a given particle type belongs to the set of * matches. This function looks for the same ParticleData object in * the set of all particles matched by this matcher. May be quicker * than to go through the check proceedure. */ bool matches(const ParticleData & pd) const { return member(matchingParticles, PDPtr(const_cast(&pd))); } /** * Check if a given particle belongs to the set of matches. This * function looks for the corresponding ParticleData object in the * set of all particles matched by this matcher. May be quicker than * to go through the check proceedure. */ bool matches(const Particle & p) const { return matches(p.data()); } /** * Check if a given particle matcher belongs to the set of * matches. This function looks for the same MatcherBase object in * the set of all matchers matched by this matcher. */ bool matches(const MatcherBase & pm) const { return member(matchingMatchers, PMPtr(const_cast(&pm))); } //@} /** @name Access the sets of matching particles and matchers. */ //@{ /** * Access to the set of matching particles. */ const tPDSet & particles() const { return matchingParticles; } /** * Access to the set of matching matchers. */ const tPMSet & matchers() const { return matchingMatchers; } //@} /** @name Access common properties of all matched particles. */ //@{ /** * Returns the minimum mass of the matching particles. */ Energy minMass() const { return theMinMass; } /** * Returns the maximum mass of the matching particles. */ Energy maxMass() const { return theMaxMass; } /** * Returns the common mass of the matching particles. If all matching * particles do not have exactly the same mass, -1.0 GeV is returned. */ Energy mass() const { return commonMass; } /** * Returns the common width of the matching particles. If all matching * particles do not have exactly the same width, -1.0 GeV is returned. */ Energy width() const { return commonWidth; } /** * Returns the common decay length of the matching particles. If all * matching particles do not have exactly the same decay length -1.0 * mm is returned. */ Length cTau() const { return commonCTau; } /** * Return common charge. If all matching particles have the same * charge the common charge is returned. Otherwise if all are * positive (negative), PDT::Positive (PDT::Negative) is * returned. Otherwise if all are charged, PDT::Charged is * returned. Otherwise PDT::ChargeUndefined is returned. */ PDT::Charge iCharge() const { return commonCharge; } /** * Are the particles charged? If all matching particles are charged, return * true, otherwise false. */ bool charged() const { return PDT::charged(commonCharge); } /** * Are the particles positively charged? If all matching particles * are positively charged, return true, otherwise false. */ bool positive() const { return PDT::positive(commonCharge); } /** * Are the particles negatively charged? If all matching particles * are negatively charged, return true, otherwise false. */ bool negative() const { return PDT::negative(commonCharge); } /** * Return common spin. If all matching particles have the same spin, * the common spin is returned. Otherwise PDT::SpinUndefined is * returned. */ PDT::Spin iSpin() const { return commonSpin; } /** * If all matching particles have the same colour, the common colour * is returned. Otherwise if all are coloured, PDT::Coloured is * returned. Otherwise PDT::ColourUndefined is returned. */ PDT::Colour iColour() const { return commonColour; } /** * Are the particles coloured? If all matching particles are * coloured, return true, otherwise false. */ bool coloured() const { return PDT::coloured(commonColour); } /** * Are the particles stable? Returns (0)1 if all matching particles * are (un)stable. Otherwise -1 is returned. */ int stable() const { return commonStable; } //@} /** * Get the matcher object matching the antiparticles of this. If * no-one exists null is returned. */ tPMPtr CC() const { return theAntiPartner; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** @name Standard Interfaced functions. */ //@{ /** * Check sanity of the object during the setup phase. */ virtual void doupdate(); //@} protected: /** * Add a particle to the set of matching particles if it meets the * criteria. */ void addPIfMatch(tPDPtr); /** * Add a particle matcher to the set of matching matchers if it * meets the criteria. */ void addMIfMatch(tPMPtr); /** * Add a number of particles to the set of matching particles if * they meets the criteria. */ template void addPIfMatch(Iterator first, Iterator last) { for ( ; first != last; ++first ) addPIfMatch(*first); } /** * Add a number of particles to the set of matching particles if * they meets the criteria. */ template void addPIfMatchFrom(const Cont & c) { addPIfMatch(c.begin(), c.end()); } /** * Add a number of particle matchers to the set of matching * matchers if they meets the criteria. */ template void addMIfMatch(Iterator first, Iterator last) { for ( ; first != last; ++first ) addMIfMatch(*first); } /** * Add a number of particle matchers to the set of matching * matchers if they meets the criteria. */ template void addMIfMatchFrom(const Cont & c) { addMIfMatch(c.begin(), c.end()); } /** * Clear information about matching particles and matchers. */ void clear(); /** * Set antipartner. */ static void setCC(tPMPtr pm, tPMPtr apm) { pm->theAntiPartner = apm; apm->theAntiPartner = pm; } private: /** * The set of particle data objects matched by this matcher. */ tPDSet matchingParticles; /** * A set of matchers which matches a subset of this matcher. */ tPMSet matchingMatchers; /** * The maximum mass of all matching particles. */ Energy theMaxMass; /** * The minimum mass of all matching particles. */ Energy theMinMass; /** * The common mass of all matching particles. */ Energy commonMass; /** * The common width of all matching particles. */ Energy commonWidth; /** * The common decay length of all matching particles. */ Length commonCTau; /** * The common charge of all matching particles. */ PDT::Charge commonCharge; /** * The common spin of all matching particles. */ PDT::Spin commonSpin; /** * The common colour of all matching particles. */ PDT::Colour commonColour; /** * The common stability of all matching particles. */ int commonStable; /** * Pointer to a matcher object which matches all anti particles * which are matched by this matcher. */ tPMPtr theAntiPartner; private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class with persistent data. */ static AbstractClassDescription initMatcherBase; /** * Private and non-existent assignment operator. */ - MatcherBase & operator=(const MatcherBase &); + MatcherBase & operator=(const MatcherBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of MatcherBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MatcherBase. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * MatcherBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MatcherBase"; } }; /** @endcond */ } #endif /* ThePEG_MatcherBase_H */ diff --git a/PDT/MixedParticleData.h b/PDT/MixedParticleData.h --- a/PDT/MixedParticleData.h +++ b/PDT/MixedParticleData.h @@ -1,319 +1,319 @@ // -*- C++ -*- #ifndef THEPEG_MixedParticleData_H #define THEPEG_MixedParticleData_H // // This is the declaration of the MixedParticleData class. // #include "ParticleData.h" #include "MixedParticleData.fh" namespace ThePEG { /** * The MixedParticleData class is designed to store the * particle data for particles which undergo mixing with their * anti-particle, e.g. \f$B^0-\bar{B}^0\f$, \f$B_s^0-\bar{B}_s^0\f$, * \f$D^0-\bar{D}^0\f$. * * The key parameters are the mass difference between the heavier * and lighter states, \f$\Delta m = m_H-m_L\f$, the width difference * \f$\Delta\Gamma = \Gamma_H-\Gamma_L\f$. While the mass difference * is positive by definition the sign of the width difference must be * determined experimentally. It should be noted that because the width * difference is expected to be negative in the Standard Model many * experiment results use the convention * \f$\Delta\Gamma = \Gamma_L - \Gamma_H\f$ so care should be taken. * * In order to be as general as possible we have included the option * of CPT violation, in addition to the violation of CP, in the mixing * in this case the light and heavy eigenstates are given by * \f[|M_L\rangle \propto p \sqrt{1-z}| M^0 \rangle * + q \sqrt{1+z}|\bar{M}^0\rangle,\f] * \f[|M_H\rangle \propto p \sqrt{1+z}| M^0 \rangle * - q \sqrt{1-z}|\bar{M}^0\rangle,\f] * where \f$p\f$, \f$q\f$ and \f$z\f$ are complex parameters with \f$z=0\f$ if CPT * is conserved. * * This gives the time evolution of the states * \f[|M^0_{\rm phys}(t)\rangle = (g_+(t)+zg_-(t))|M^0\rangle * -sqrt{1-z^2}\frac{q}{p}g_-(t)|\bar{M}^0\rangle,\f] * \f[\bar{M}^-_{\rm phys}\rangle = (g_+(t)+zg_-(t))|\bar{M}^0\rangle * -sqrt{1-z^2}\frac{p}{q}g_-(t)|M^0\rangle,\f] * for particles initially in a pure particle or antiparticle state * where * \f[g_\pm(t)=\frac12\left(e^{-im_Ht-\frac12\Gamma_Ht} \pm * e^{-im_Lt-\frac12\Gamma_Lt}\right).\f] * @see \ref MixedParticleDataInterfaces "The interfaces" * defined for MixedParticleData. */ class MixedParticleData: public ParticleData { public: /** * The default constructor. */ MixedParticleData() : ParticleData(), _deltam(0.*GeV), _deltagamma(0.*GeV), _pqmag(1.), _pqphase(0.), _pq(1.,0.), _zmag(0.), _zphase(0.), _z(0.), _x(0.), _y(0.), _prob(make_pair(1.,0.)) {} /** @name The Create methods are special interfaces for ParticleData classes. */ //@{ /** * Create a Particle which is its own anti-particle. */ static PDPtr Create(long newId, string newPDGName); /** * Create a particle - anti particle pair. */ static PDPair Create(long newId, string newPDGName, string newAntiPDGName); //@} public: /** * Mixing parameters */ //@{ /** * The mass difference */ Energy deltaM() const {return _deltam;} /** * The width difference */ Energy deltaGamma() const {return _deltagamma;} /** * \f$p/q\f$ */ Complex pq() const {return _pq;} /** * \f$z\f$ */ Complex z() const {return _z;} /** * The \f$x\f$ mixing variable */ double x() const {return _x;} /** * the \f$y\f$ mixing variable */ double y() const {return _y;} /** * The time-integrated mixing probabilities */ pair prob() const {return _prob;} /** * For a given paricle decide is it undergoes mixing * and generate the lifetime */ pair generateLifeTime() const; /** * The amplitudes for the different states */ pair mixingAmplitudes(Length,bool) 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: /** * Protected constructor only to be used by subclasses or by the * Create method. */ MixedParticleData(long newId, string newPDGName); /** * ParticleData clone method */ virtual PDPtr pdclone() 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: /** * Function for the interface to set the mass difference */ void setDeltaM(Energy); /** * Function for the interface to set the width difference */ void setDeltaGamma(Energy); /** * Function for the interface to set the magnitude of p/q */ void setPQMagnitude(double); /** * Function for the interface to set the phase of p/q */ void setPQPhase(double); /** * Function for the interface to set the magnitude of z */ void setZMagnitude(double); /** * Function for the interface to set the phase of z */ void setZPhase(double); private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initMixedParticleData; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MixedParticleData & operator=(const MixedParticleData &); + MixedParticleData & operator=(const MixedParticleData &) = delete; private: /** * Mixing parameters */ //@{ /** * The mass difference */ Energy _deltam; /** * The width difference */ Energy _deltagamma; /** * The magnitude of \f$p/q\f$ */ double _pqmag; /** * The phase of \f$p/q\f$ */ double _pqphase; /** * \f$p/q\f$ */ Complex _pq; /** * The magnitude of \f$z\f$ */ double _zmag; /** * The phase of \f$z\f$ */ double _zphase; /** * The \f$z\f$ parameter */ Complex _z; /** * The \f$x\f$ mixing variable */ double _x; /** * the \f$y\f$ mixing variable */ double _y; /** * The time-integrated mixing probabilities */ pair _prob; //@} }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MixedParticleData. */ template <> struct BaseClassTrait { /** Typedef of the first base class of MixedParticleData. */ typedef ParticleData NthBase; }; /** This template specialization informs ThePEG about the name of * the MixedParticleData class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MixedParticleData"; } }; /** @endcond */ } #endif /* THEPEG_MixedParticleData_H */ diff --git a/PDT/OmegaPhi3PiDecayer.h b/PDT/OmegaPhi3PiDecayer.h --- a/PDT/OmegaPhi3PiDecayer.h +++ b/PDT/OmegaPhi3PiDecayer.h @@ -1,168 +1,168 @@ // -*- C++ -*- // // OmegaPhi3PiDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_OmegaPhi3PiDecayer_H #define THEPEG_OmegaPhi3PiDecayer_H // This is the declaration of the OmegaPhi3PiDecayer class. #include "ThePEG/PDT/FlatDecayer.h" namespace ThePEG { /** * The OmegaPhi3PiDecayer class inherits from performs FlatDecayer and * will reweight the flat phase space suitable to describe the decay * of a \f$\phi\f$ or an \f$\omega\f$ into \f$\pi^+\pi^-\pi^0\f$. It * will in fact decay anything into \f$\pi^+\pi^-\pi^0\f$ assuming the * same matrix element. * * @see \ref OmegaPhi3PiDecayerInterfaces "The interfaces" * defined for OmegaPhi3PiDecayer. * @see FlatDecayer * @see ParticleData */ class OmegaPhi3PiDecayer: public FlatDecayer { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ OmegaPhi3PiDecayer() : margin(150.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; /** * Give a weight to a phase space point. To be overridden by * subclasses. For a given decay mode, \a dm, decaying \a parent * particle and decayproducts, \a children, distributed according to * a flat distribution in phase space, return a weight (less or * equal to unity) modifying the flat distribution to the desired * one. Note that the chosen phase space point may be rejected, but * the chosen decay channel will not. This means that the weight * returned by this function does not influence the branching * ratios. */ virtual double reweight(const DecayMode & dm, const Particle & parent, const ParticleVector & children) 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: protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Used to multiply the bare weight to get something below unity. In * the Fortran pythia version it was set to 150 for unknown reasons. */ double margin; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initOmegaPhi3PiDecayer; /** * Private and non-existent assignment operator. */ - OmegaPhi3PiDecayer & operator=(const OmegaPhi3PiDecayer &); + OmegaPhi3PiDecayer & operator=(const OmegaPhi3PiDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of OmegaPhi3PiDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of OmegaPhi3PiDecayer. */ typedef FlatDecayer NthBase; }; /** This template specialization informs ThePEG about the name of the * OmegaPhi3PiDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::OmegaPhi3PiDecayer"; } /** Return the name of the shared library be loaded to get access to * the OmegaPhi3PiDecayer class and every other class it uses * (except the base class). */ static string library() { return "OmegaPhi3PiDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_OmegaPhi3PiDecayer_H */ diff --git a/PDT/Onium3GDecayer.h b/PDT/Onium3GDecayer.h --- a/PDT/Onium3GDecayer.h +++ b/PDT/Onium3GDecayer.h @@ -1,195 +1,195 @@ // -*- C++ -*- // // Onium3GDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Onium3GDecayer_H #define THEPEG_Onium3GDecayer_H // This is the declaration of the Onium3GDecayer class. #include "ThePEG/PDT/FlatDecayer.h" namespace ThePEG { /** * The Onium3GDecayer class inherits from performs FlatDecayer and * will reweight the flat phase space suitable to describe the decay * of a spin-1 onium resonance into three gluons or two gluons and a * photon. After the decay the collision handler is instructed to * restart the generation from the hadronization (or optionally the * parton cascade) stage. * * @see \ref Onium3GDecayerInterfaces "The interfaces" * defined for Onium3GDecayer. * @see FlatDecayer * @see ParticleData */ class Onium3GDecayer: public FlatDecayer { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ Onium3GDecayer() : doShower(true), theMinGGMass(2.0*GeV) {} /** * Destructor. */ virtual ~Onium3GDecayer(); //@} 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; /** * Give a weight to a phase space point. To be overridden by * subclasses. For a given decay mode, \a dm, decaying \a parent * particle and decayproducts, \a children, distributed according to * a flat distribution in phase space, return a weight (less or * equal to unity) modifying the flat distribution to the desired * one. Note that the chosen phase space point may be rejected, but * the chosen decay channel will not. This means that the weight * returned by this function does not influence the branching * ratios. */ virtual double reweight(const DecayMode & dm, const Particle & parent, const ParticleVector & children) const; //@} /** * Return true if the produced gluons should be showered. */ bool shower() const { return doShower; } /** * Return the minimum invariant mass between two gluons in gamma-g-g * decays. */ Energy minGGMass() const { return theMinGGMass; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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: /** * If true the produced gluons should be showered. */ bool doShower; /** * The minimum invariant mass between two gluons in gamma-g-g * decays. */ Energy theMinGGMass; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initOnium3GDecayer; /** * Private and non-existent assignment operator. */ - Onium3GDecayer & operator=(const Onium3GDecayer &); + Onium3GDecayer & operator=(const Onium3GDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of Onium3GDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Onium3GDecayer. */ typedef FlatDecayer NthBase; }; /** This template specialization informs ThePEG about the name of the * Onium3GDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Onium3GDecayer"; } /** Return the name of the shared library be loaded to get access to * the Onium3GDecayer class and every other class it uses * (except the base class). */ static string library() { return "Onium3GDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_Onium3GDecayer_H */ diff --git a/PDT/QuarksToHadronsDecayer.h b/PDT/QuarksToHadronsDecayer.h --- a/PDT/QuarksToHadronsDecayer.h +++ b/PDT/QuarksToHadronsDecayer.h @@ -1,264 +1,264 @@ // -*- C++ -*- // // QuarksToHadronsDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_QuarksToHadronsDecayer_H #define THEPEG_QuarksToHadronsDecayer_H // This is the declaration of the QuarksToHadronsDecayer class. #include "ThePEG/PDT/Decayer.h" #include "ThePEG/Handlers/FlavourGenerator.h" namespace ThePEG { ThePEG_DECLARE_CLASS_POINTERS(FlavourGenerator, FlavGenPtr); /** * The QuarksToHadronsDecayer class inherits from Decayer and is able * to decay particles to \f$n_q\f$ (2 or 4) quarks which then are * decayed to hadrons according to phase space. The number of final * hadrons can either be given by a fixed number or as a Gaussian * multiplicity distribution centered around \f$c+n_q/4+c_3\f$ and a * width \f$\sqrt{c}\f$, where \f$c = c_1 \log((m - \sum m)/c_2)\f$, * \f$m\f$ is the mass of the decaying particle, \f$\sum m\f$ the sum * of the quark masses and \f$c_i\f$ real parameters. * * @see \ref QuarksToHadronsDecayerInterfaces "The interfaces" * defined for QuarksToHadronsDecayer. * @see ParticleData * */ class QuarksToHadronsDecayer: public Decayer { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ QuarksToHadronsDecayer() : theFixedN(0), theMinN(2), theC1(4.5), theC2(0.7*GeV), theC3(0.0) {} /** * Destructor. */ virtual ~QuarksToHadronsDecayer(); //@} 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; //@} /** * Get the number of hadrons to be produced, given the mass of the * decaying particle, \a m0, and the number, \a Nq and summed masses * of the quarks, \a summq. */ virtual int getN(Energy m0, Energy summq, int Nq) const; /** * Produce \a Nh hadrons from the specified \a quarks. The last * quark is considered to be a spectator quark. */ virtual PVector getHadrons(int Nh, tcPDVector quarks) const; /** * Distribute the produced children in phase space. This default * version uses a flat phase space which can be reweighted by * overriding the reweight() function. */ virtual void distribute(const Particle & parent, PVector & children) const; /** * Called by distribute() to reweight the default flat phase * spece. Can be overridden by sub-classes and should return a * number between 0 and 1. This version returns 1. */ virtual double reweight(const Particle & parent, const PVector & children) const; public: /** * Return the fixed number of hadrons to be produced. If less than * 2, the number is instead given by a gaussian multiplicity * distribution. */ int fixedN() const { return theFixedN; } /** * Return the minimum number of hadrons to be produced. */ int minN() const { return theMinN; } /** * Return the parameter \f$c_1\f$ used for the multiplicity * distriution. */ double c1() const { return theC1; } /** * Return the parameter \f$c_2\f$ used for the multiplicity * distriution. */ Energy c2() const { return theC2; } /** * Return the parameter \f$c_3\f$ used for the multiplicity * distriution. */ double c3() const { return theC3; } /** * Return a pointer to the flavour generator to be used. */ tcFlavGenPtr flavourGenerator() const { return theFlavourGenerator; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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: protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 fixed number of hadrons to be produced. If less than 2, the * number is instead given by a gaussian multiplicity distribution. */ int theFixedN; /** * The minimum hadrons to be produced. */ int theMinN; /** * The parameter \f$c_1\f$ of the multiplicity distribution. */ double theC1; /** * The parameter \f$c_2\f$ of the multiplicity distribution. */ Energy theC2; /** * The parameter \f$c_3\f$ of the multiplicity distribution. */ double theC3; /** * The object in charge of generating hadrons spieces from given * quark flavours. */ FlavGenPtr theFlavourGenerator; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initQuarksToHadronsDecayer; /** * Private and non-existent assignment operator. */ - QuarksToHadronsDecayer & operator=(const QuarksToHadronsDecayer &); + QuarksToHadronsDecayer & operator=(const QuarksToHadronsDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of QuarksToHadronsDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of QuarksToHadronsDecayer. */ typedef Decayer NthBase; }; /** This template specialization informs ThePEG about the name of the * QuarksToHadronsDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::QuarksToHadronsDecayer"; } /** Return the name of the shared library be loaded to get access to * the QuarksToHadronsDecayer class and every other class it uses * (except the base class). */ static string library() { return "QuarksToHadronsDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_QuarksToHadronsDecayer_H */ diff --git a/PDT/RemnantData.h b/PDT/RemnantData.h --- a/PDT/RemnantData.h +++ b/PDT/RemnantData.h @@ -1,225 +1,225 @@ // -*- C++ -*- // // RemnantData.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_RemnantData_H #define THEPEG_RemnantData_H // // This is the declaration of the RemnantData class. // #include "ThePEG/PDT/ParticleData.h" #include "ThePEG/PDT/RemnantData.fh" #include "ThePEG/PDT/RemnantDecayer.fh" #include "ThePEG/PDT/DecayMode.h" namespace ThePEG { /** * The RemnantData class is not a normal ParticleData class. It should * never be handled directly by the interface but is automatically * created and assigned to an object of the SoftRemnant sub-class of * Particle. The SoftRemnant in turn is not a proper Particle, but * rather a place holder for what is left of a colliding particle * after one or several partons has been extracted. To be able to * retrieve properties of the SoftRemnant through its ParticleData the * RemnantData is used to dynamically keep track of this. * * The RemnantData is initialized by the ParticleData corresponding to * the colliding particle. For each particle which is extracted the * charge charge is changed accordingly. Also the colour charge is * changed, but only such that the coloured(), hasColour() and * hasAntiColour() returns relevant information. The actual colour can * only be singlet, (anti-)triplet or octet. * * When created the RemnantData object must be given a RemnantDecayer * object and a single DecayMode object will be created with this * Decayer. * * @see \ref RemnantDataInterfaces "The interfaces" * defined for RemnantData. */ class RemnantData: public ParticleData { public: /** @name Standard constructors and destructors. */ //@{ /** * The standard constructor takes as argument the \a particle type * for which this is the remnant and a \a decayer capable of * performing the decay. */ RemnantData(tcPDPtr particle, RemDecPtr decayer); //@} public: /** * The Decayer responsible for for the decay of this remnant. */ const RemnantDecayer & decayer() const { return *theDecayer; }; /** * Modify the properties to reflect that the given \a parton was * extracted. */ bool extract(tcPDPtr parton); /** * Modify the properties to reflect that the given \a parton which was * previously extracted is removed. */ bool remove(tcPDPtr parton); /** * Modify the properties to reflect that the previously extracted * parton, \a oldp, was evolved backwards to the the parton \a newp. */ bool reextract(tcPDPtr oldp, tcPDPtr newp); protected: /** * Modify the colour to reflect that the given \a parton was * extracted. */ bool fixColour(); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 particle type of the parent. */ tcPDPtr parentPD; /** * The Decayer responsible for for the decay of this remnant. */ RemDecPtr theDecayer; /** * The only DecayMode available for this remnant. */ DMPtr decayMode; /** * The set of extracted particle types. */ multiset extracted; protected: /** * The default constructor is protected and must only be used by the * PersistentIStream class via the ClassTraits class. */ RemnantData() {} /** * The ClassTraits class must be a friend to be able to * use the private default constructor. */ friend struct ClassTraits; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initRemnantData; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - RemnantData & operator=(const RemnantData &); + RemnantData & operator=(const RemnantData &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of RemnantData. */ template <> struct BaseClassTrait { /** Typedef of the first base class of RemnantData. */ typedef ParticleData NthBase; }; /** This template specialization informs ThePEG about the name of * the RemnantData class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::RemnantData"; } /** Create a Particle object. */ static TPtr create() { return TPtr::Create(RemnantData()); } }; /** @endcond */ } #endif /* THEPEG_RemnantData_H */ diff --git a/PDT/RemnantDecayer.h b/PDT/RemnantDecayer.h --- a/PDT/RemnantDecayer.h +++ b/PDT/RemnantDecayer.h @@ -1,325 +1,325 @@ // -*- C++ -*- // // RemnantDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_RemnantDecayer_H #define THEPEG_RemnantDecayer_H // // This is the declaration of the RemnantDecayer class. // #include "ThePEG/PDT/Decayer.h" #include "RemnantDecayer.fh" #include "ThePEG/PDT/RemnantData.h" #include "ThePEG/EventRecord/RemnantParticle.h" #include "ThePEG/Handlers/PtGenerator.h" namespace ThePEG { /** * The RemnantDecayer class is the base class to be used for all * decayers capable of decaying a RemnantParticle object produced by a * SoftRemnantHandler object. A derived class must implement the * decay(const DecayMode &, const Particle &, Step &) function, while * the decay(const DecayMode &, const Particle &) function should * never be called. * * @see \ref RemnantDecayerInterfaces "The interfaces" * defined for RemnantDecayer. */ class RemnantDecayer: public Decayer { public: /** A pointer to a PtGenerator object. */ typedef Ptr::pointer PtGPtr; public: /** * Enumerate the options for how to distribute recoils in the hard * subsystem when taking energy to produce remnants. */ enum RecoilOption { boostAll, /**< Boost all particles in the hard subsystem. */ boostFinal, /**< Boost only final state particles in hard subsystem. */ copyFinal /**< Boost copies of final state particles in hard subsystem. */ }; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ RemnantDecayer() : respectDIS(2), theRecoilOption(copyFinal) {} /** * The destructor. */ virtual ~RemnantDecayer(); //@} 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; /** * Return true if this Decayer need to access the full current step * when a particle is decayed. If true is returned the standard * Decay Handler will call the decay(const DecayMode&,const * Particle&,Step&) function rather than the decay(const * DecayMode&,const Particle&) function. */ virtual bool needsFullStep() const; /** * Perform a decay for a given DecayMode and a given Particle * instance. This version allows the decaying particle to borrow * energy/momentum from its sublings in the current step. This will * be called by the standard DecayHandler if the needsFullStep() * function returns true. * * @param dm the DecayMode describing the decay. * @param p the Particle instance to be decayed. * @param step the current step in which to find possible siblings to * shuffle energy with. * @return a ParticleVector containing the decay products. */ virtual ParticleVector decay(const DecayMode & dm, const Particle & p, Step & step) 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; //@} /** * Return true if this decayer can handle the extraction of the \a * extracted parton from the given \a particle. */ virtual bool canHandle(tcPDPtr parent, tcPDPtr extracted) const; /** * Return true if this decayer can handle the extraction of the \a * extracted parton instance from the given \a particle instance. \a * pnew is the momentum of the resulting remnant. The default * version simply checks if the energy is positive. */ virtual bool checkExtract(tcPPtr parent, tcPPtr extracted, const LorentzMomentum & pnew) const; /** * Return true if this decayed can extract more than one parton from * a particle. */ virtual bool multiCapable() const; /** * The option for how to distribute recoils in the hard subsystem * when taking energy to produce remnants. */ RecoilOption recoilOption() const { return theRecoilOption; } /** * If true, do not boost a scattered lepton (and possible radiated * photons) in a DIS event, to ensure that \f$x\f$ and \f$Q^2\f$ is * unmodified. */ int respectDISKinematics() const { return respectDIS; } /** * An object capable of generating an intrinsic transverse momentum * of the created remnants. */ PtGPtr pTGenerator() const { return thePTGenerator; } /** * Static function to decay al remnants among the given \a * particles. The decay products are inserted in the \a step * provided. * @return a vector of the non-remnant particles together with the * remnant decay products. */ static tPVector decayRemnants(const tPVector & particles, Step & step); protected: /** * Access the RemnantData object of a \a remnant. */ tRemPDPtr data(tcRemPPtr remnant) const { return remnant->remData; } /** * Access the parent of a \a remnant. */ tcPPtr parent(tcRemPPtr remnant) const { return remnant->parent; } /** * Access the vector of extracted particles of a \a remnant. */ const PVector & extracted(tcRemPPtr remnant) const { return remnant->extracted(); } /** * Recursively find all particles produced from an extracted parton. */ virtual void fillSubSystem(tPPtr p, set & sub) const; /** * Return the system of particles from the hard subsystem which may * be used to shuffle momenta to get the remnants on-shell. In this * version the particles are ordered in rapidity with the ones * closest to the remnant direction comes first. Other orderings can * be enforced by sub-classes. */ virtual tPVector getSubSystem(tcPPtr parent, tPPtr parton) const; /** * Return a small boost along the z-axis. To cure rounding errors * when making large boosts it is sometimes necessary to correct the * plus (or minus) lightcone component with a small boost along the * z-axis. The resulting boost is constructed so that the momentum * \a p0 would be transformed to have the sam z-value as the * momentum \a p. */ static LorentzRotation getZBoost(const LorentzMomentum & p0, const LorentzMomentum & p); public: /** * Exception used if getSubSystem fails. */ struct SubSystemFail: public Exception {}; 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(); /** * Return true if this object needs to be initialized before all * other objects because it needs to extract cuts from the event file. */ virtual bool preInitialize() 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: /** * If true, do not boost a scattered lepton (and possible radiated * photons) in a DIS event, to ensure that \f$x\f$ and \f$Q^2\f$ is * unmodified. */ mutable int respectDIS; private: /** * The option for how to distribute recoils in the hard subsystem * when taking energy to produce remnants. */ RecoilOption theRecoilOption; /** * An object capable of generating an intrinsic transverse momentum * of the created remnants. */ PtGPtr thePTGenerator; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static AbstractClassDescription initRemnantDecayer; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - RemnantDecayer & operator=(const RemnantDecayer &); + RemnantDecayer & operator=(const RemnantDecayer &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of RemnantDecayer. */ template <> struct BaseClassTrait { /** Typedef of the first base class of RemnantDecayer. */ typedef Decayer NthBase; }; /** This template specialization informs ThePEG about the name of * the RemnantDecayer class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::RemnantDecayer"; } }; /** @endcond */ } #endif /* THEPEG_RemnantDecayer_H */ diff --git a/PDT/SimpleBaryonRemnantDecayer.h b/PDT/SimpleBaryonRemnantDecayer.h --- a/PDT/SimpleBaryonRemnantDecayer.h +++ b/PDT/SimpleBaryonRemnantDecayer.h @@ -1,308 +1,308 @@ // -*- C++ -*- // // SimpleBaryonRemnantDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SimpleBaryonRemnantDecayer_H #define THEPEG_SimpleBaryonRemnantDecayer_H // // This is the declaration of the SimpleBaryonRemnantDecayer class. // #include "ThePEG/PDT/RemnantDecayer.h" #include "ThePEG/Handlers/ZGenerator.h" #include "ThePEG/Handlers/FlavourGenerator.h" #include "ThePEG/Utilities/VSelector.h" namespace ThePEG { /** * The SimpleBaryonRemnantDecayer class inherits from the * RemnantDecayer class and is able to decay RemnantParticles produced * by the SoftRemnantHandler class for the cases when a single parton * has been extracted from a baryon. * * @see \ref SimpleBaryonRemnantDecayerInterfaces "The interfaces" * defined for SimpleBaryonRemnantDecayer. */ class SimpleBaryonRemnantDecayer: public RemnantDecayer { public: /** A pointer to a ZGenerator object. */ typedef Ptr::pointer ZGPtr; /** A pointer to a FlavourGenerator object. */ typedef Ptr::pointer FlGPtr; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ SimpleBaryonRemnantDecayer() : theMargin(1.0*GeV), useSpecialValence(false) {} /** * The copy constructor. */ SimpleBaryonRemnantDecayer(const SimpleBaryonRemnantDecayer & x) : RemnantDecayer(x), theZGenerator(x.theZGenerator), theFlavourGenerator(x.theFlavourGenerator), theMargin(x.theMargin), useSpecialValence(x.useSpecialValence) {} /** * The destructor. */ virtual ~SimpleBaryonRemnantDecayer(); //@} public: /** @name Virtual functions required by the RemnantDecayer 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. This version allows the decaying particle to borrow * energy/momentum from its sublings in the current step. This will * be called by the standard DecayHandler if the needsFullStep() * function returns true. * * @param dm the DecayMode describing the decay. * @param p the Particle instance to be decayed. * @param step the current step in which to find possible siblings to * shuffle energy with. * @return a ParticleVector containing the decay products. */ virtual ParticleVector decay(const DecayMode & dm, const Particle & p, Step & step) const; /** * Return true if this decayer can handle the extraction of the \a * extracted parton from the given \a particle. */ virtual bool canHandle(tcPDPtr parent, tcPDPtr extracted) const; /** * Return true if this decayer can handle the extraction of the \a * extracted parton instance from the given \a particle instance. \a * pnew is the momentum of the resulting remnant. The default * version simply checks if the energy is positive. */ virtual bool checkExtract(tcPPtr parent, tcPPtr extracted, const LorentzMomentum & pnew) 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(); /** * Return true if this object needs to be initialized before all * other objects because it needs to extract cuts from the event file. */ virtual bool preInitialize() 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: /** * Warning Exception used when DIS kinematics was not respected. */ struct NoDISRespect: public Exception {}; /** * Exception thrown if the decay of a remnant was impossible. */ struct DecayFailed: public Exception {}; public: /** * Return a reference to the object responsible for generating * momentum fractions in case of more than one remnant. */ ZGenerator & zGenerator() const { return *theZGenerator; } /** * Return a reference to the object responsible for handling the * flavour contents of a baryon. */ FlavourGenerator & flavourGenerator() const { return *theFlavourGenerator; } /** * Return the energy margin to be added to the sum of the parent and * parton masses to determine if it is possible to construct the * remnants with the given (upper limit of the) virtuality of the * extracted parton. */ Energy margin() const { return theMargin; } /** * If true an extracted valens quark will always give a di-quark remnant. */ bool specialValence() const { return useSpecialValence; } protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} public: /** * Simple struct to store info about baryon quark and di-quark * constituents. */ struct BaryonContent { /** The valence flavours of the corresponding baryon. */ vector flav; /** Different divisions into quark-diquark weighted by their respective probabilities. */ VSelector< pair > flavsel; /** -1 if the particle is an anti-particle. +1 otherwise. */ int sign; }; /** * Return info about baryon quark and di-quark constituents. */ const BaryonContent & getBaryonInfo(tcPDPtr baryon) const; private: /** * The object responsible for generating momentum fractions in case * of more than one remnant. */ ZGPtr theZGenerator; /** * The object responsible for handling the flavour contents of a * baryon. */ FlGPtr theFlavourGenerator; /** * The energy margin to be added to the sum of the parent and parton * masses to determine if it is possible to construct the remnants * with the given (upper limit of the) virtuality of the extracted * parton. */ Energy theMargin; /** * If true an extracted valens quark will always give a di-quark remnant. */ bool useSpecialValence; /** * A map of info about baryon quark and di-quark constituents. */ mutable map baryonmap; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initSimpleBaryonRemnantDecayer; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - SimpleBaryonRemnantDecayer & operator=(const SimpleBaryonRemnantDecayer &); + SimpleBaryonRemnantDecayer & operator=(const SimpleBaryonRemnantDecayer &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of SimpleBaryonRemnantDecayer. */ template <> struct BaseClassTrait { /** Typedef of the first base class of SimpleBaryonRemnantDecayer. */ typedef RemnantDecayer NthBase; }; /** This template specialization informs ThePEG about the name of the * SimpleBaryonRemnantDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SimpleBaryonRemnantDecayer"; } }; /** @endcond */ } #endif /* THEPEG_SimpleBaryonRemnantDecayer_H */ diff --git a/PDT/Tau2HadronsDecayer.h b/PDT/Tau2HadronsDecayer.h --- a/PDT/Tau2HadronsDecayer.h +++ b/PDT/Tau2HadronsDecayer.h @@ -1,156 +1,156 @@ // -*- C++ -*- // // Tau2HadronsDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Tau2HadronsDecayer_H #define THEPEG_Tau2HadronsDecayer_H // This is the declaration of the Tau2HadronsDecayer class. #include "ThePEG/PDT/FlatDecayer.h" namespace ThePEG { /** * The Tau2HadronsDecayer class inherits FlatDecayer and can perform * the decays of tau to neutrino + hadrons according to phase space, * with an extra weight \f$x_\nu(3-x_\nu)\f$. * * @see \ref Tau2HadronsDecayerInterfaces "The interfaces" * defined for Tau2HadronsDecayer. */ class Tau2HadronsDecayer: public FlatDecayer { public: /** @name Standard constructors and destructors. */ //@{ /** * Destructor. */ virtual ~Tau2HadronsDecayer(); //@} 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; /** * Give a weight to a phase space point. To be overridden by * subclasses. For a given decay mode, \a dm, decaying \a parent * particle and decayproducts, \a children, distributed according to * a flat distribution in phase space, return a weight (less or * equal to unity) modifying the flat distribution to the desired * one. Note that the chosen phase space point may be rejected, but * the chosen decay channel will not. This means that the weight * returned by this function does not influence the branching * ratios. */ virtual double reweight(const DecayMode & dm, const Particle & parent, const ParticleVector & children) 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: protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class with persistent data. */ static ClassDescription initTau2HadronsDecayer; /** * Private and non-existent assignment operator. */ - Tau2HadronsDecayer & operator=(const Tau2HadronsDecayer &); + Tau2HadronsDecayer & operator=(const Tau2HadronsDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of Tau2HadronsDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Tau2HadronsDecayer. */ typedef FlatDecayer NthBase; }; /** This template specialization informs ThePEG about the name of the * Tau2HadronsDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Tau2HadronsDecayer"; } /** Return the name of the shared library be loaded to get access to * the Tau2HadronsDecayer class and every other class it uses * (except the base class). */ static string library() { return "Tau2HadronsDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_Tau2HadronsDecayer_H */ diff --git a/PDT/V2PPDecayer.h b/PDT/V2PPDecayer.h --- a/PDT/V2PPDecayer.h +++ b/PDT/V2PPDecayer.h @@ -1,181 +1,181 @@ // -*- C++ -*- // // V2PPDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_V2PPDecayer_H #define THEPEG_V2PPDecayer_H // This is the declaration of the V2PPDecayer class. #include "ThePEG/PDT/FlatDecayer.h" namespace ThePEG { /** * The V2PPDecayer class performs the decay of a vector meson into two * pseudo-scalars according to a flat phase space. If, however the * decaying particle comes from a pseudo-scalar and has only one * sibling which is a pseudo-scalar (or a photon) the decay is * reweighted with \f$\cos^2\f$ (\f$\sin^2\f$ for photon) of the angle * between one of the decay products and its grand parent. * * @see \ref V2PPDecayerInterfaces "The interfaces" * defined for V2PPDecayer. * @see FlatDecayer * @see ParticleData */ class V2PPDecayer: public FlatDecayer { public: /** @name Standard constructors and destructors. */ //@{ /** * Destructor. */ virtual ~V2PPDecayer(); //@} 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; /** * Give a weight to a phase space point. To be overridden by * subclasses. For a given decay mode, \a dm, decaying \a parent * particle and decayproducts, \a children, distributed according to * a flat distribution in phase space, return a weight (less or * equal to unity) modifying the flat distribution to the desired * one. Note that the chosen phase space point may be rejected, but * the chosen decay channel will not. This means that the weight * returned by this function does not influence the branching * ratios. */ virtual double reweight(const DecayMode & dm, const Particle & parent, const ParticleVector & children) 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: protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 grand parent in case reweighting should be done. */ mutable tPPtr grandParent; /** * The decaying particles sibling in case reweighting should be done. */ mutable tPPtr sibling; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initV2PPDecayer; /** * Private and non-existent assignment operator. */ - V2PPDecayer & operator=(const V2PPDecayer &); + V2PPDecayer & operator=(const V2PPDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of V2PPDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of . */ typedef FlatDecayer NthBase; }; /** This template specialization informs ThePEG about the name of the * V2PPDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::V2PPDecayer"; } /** Return the name of the shared library be loaded to get access to * the V2PPDecayer class and every other class it uses * (except the base class). */ static string library() { return "V2PPDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_V2PPDecayer_H */ diff --git a/PDT/WeakToHadronsDecayer.h b/PDT/WeakToHadronsDecayer.h --- a/PDT/WeakToHadronsDecayer.h +++ b/PDT/WeakToHadronsDecayer.h @@ -1,150 +1,150 @@ // -*- C++ -*- // // WeakToHadronsDecayer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_WeakToHadronsDecayer_H #define THEPEG_WeakToHadronsDecayer_H // This is the declaration of the WeakToHadronsDecayer class. #include "ThePEG/PDT/QuarksToHadronsDecayer.h" namespace ThePEG { /** * The WeakToHadronsDecayer class inherits from QuarksToHadronsDecayer * and can performs weak decays of taus and charmed and bottom * hadrons. The intermediate W can either decay leptonically in which * case standard V-A matrix element is used, or it can decay into * quarks in which case the conversion into quarks is performed as for * the QuarkToHadronsDecayer base class. In both cases the W decay * products should be specified first. The spectator system can either * be specified in terms of hadrons or in terms of quarks which will * be collapsed into a single hadron. * * @see \ref WeakToHadronsDecayerInterfaces "The interfaces" * defined for WeakToHadronsDecayer. */ class WeakToHadronsDecayer: public QuarksToHadronsDecayer { public: /** @name Virtual functions required by the Decayer and QuarksToHadronsDecayer classes. */ //@{ /** * 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; /** * Called by QuarksToHadronsDecayer::distribute() to reweight the * default flat phase spece. Can be overridden by sub-classes and * should return a number between 0 and 1. This version returns 1. */ virtual double reweight(const Particle & parent, const PVector & children) const; /** * Produce \a Nh hadrons from the specified \a quarks. The last * quark is considered to be a spectator quark. */ virtual PVector getHadrons(int Nh, tcPDVector quarks) 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: /** * Describe a concrete class with persistent data. */ static ClassDescription initWeakToHadronsDecayer; /** * Private and non-existent assignment operator. */ - WeakToHadronsDecayer & operator=(const WeakToHadronsDecayer &); + WeakToHadronsDecayer & operator=(const WeakToHadronsDecayer &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of WeakToHadronsDecayer. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of WeakToHadronsDecayer. */ typedef QuarksToHadronsDecayer NthBase; }; /** This template specialization informs ThePEG about the name of the * WeakToHadronsDecayer class and the shared object where it is * defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::WeakToHadronsDecayer"; } /** Return the name of the shared library be loaded to get access to * the WeakToHadronsDecayer class and every other class it uses * (except the base class). */ static string library() { return "WeakToHadronsDecayer.so"; } }; /** @endcond */ } #endif /* THEPEG_WeakToHadronsDecayer_H */ diff --git a/PDT/WidthGenerator.h b/PDT/WidthGenerator.h --- a/PDT/WidthGenerator.h +++ b/PDT/WidthGenerator.h @@ -1,121 +1,121 @@ // -*- C++ -*- // // WidthGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_WidthGenerator_H #define ThePEG_WidthGenerator_H // This is the declaration of the WidthGenerator class. #include "ThePEG/Config/ThePEG.h" #include "WidthGenerator.fh" #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/Utilities/Selector.h" #include "ThePEG/PDT/DecayMode.fh" namespace ThePEG { /** * WidthGenerator is an abstract base class to be used to encapsulate * models for giving the partial decay width of a ParticleData given * the specified DecayModes. * * @see \ref WidthGeneratorInterfaces "The interfaces" * defined for WidthGenerator. * @see ParticleData * @see DecayMode */ class WidthGenerator: public Interfaced { public: /** A selector of DecayModess weighted by their * branching ratios. */ typedef Selector DecayMap; public: /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return true if this object can be used for the given particle * type with the given decay map. */ virtual bool accept(const ParticleData &) const = 0; /** * Given a Particle, calculate a width. */ Energy width(const Particle &) const; /** * 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 = 0; /** * 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; /** * Return decay map for the given particle type. */ virtual DecayMap rate(const ParticleData &) const = 0; /** * Return a decay map for a given Particle instance. */ virtual DecayMap rate(const Particle &); //@} public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * The static object used to initialize the description of this class. * Indicates that this is an abstract class without persistent data. */ static AbstractNoPIOClassDescription initWidthGenerator; /** * Private and non-existent assignment operator. */ - WidthGenerator & operator=(const WidthGenerator &); + WidthGenerator & operator=(const WidthGenerator &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of WidthGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of WidthGenerator. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * WidthGenerator class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::WidthGenerator"; } }; /** @endcond */ } #endif /* ThePEG_WidthGenerator_H */ diff --git a/Persistency/PersistentIStream.h b/Persistency/PersistentIStream.h --- a/Persistency/PersistentIStream.h +++ b/Persistency/PersistentIStream.h @@ -1,667 +1,667 @@ // -*- C++ -*- // // PersistentIStream.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PersistentIStream_H #define ThePEG_PersistentIStream_H // This is the declaration of the PersistentIStream class. #include "ThePEG/Config/ThePEG.h" #include "InputDescription.h" #include "PersistentIStream.fh" #include "ThePEG/Utilities/Exception.h" #include #include namespace ThePEG { /** @ingroup Persistency * PersistentIStream is used to read persistent objects from a stream * where they were previously written using PersistentOStream. Basic * types and pointers to objects derived from * PersistentBase should be read in the same order they * were written out. If pedantic() is true the same * classes that were written out must be present in the current * program. If pedantic() is false and if an object is * read for which only a base class is present in the current program, * only the parts corresponding to the base class will be read, and * the rest will be gracefully skipped. * * Each base class of a given object will be asked to read its * members from the stream starting from the least derived class going to * the most derived one. Members may be pointers to other persistent * objects or basic types or containers of these. The output for each * object part should be implemented by specializing the * ClassTraits::input method, which otherwise * will call the non-virtual persistentInput function of * the class. Note that for diamond-shaped multiple inheritance * structures, the virtual base classes will be written out several * times for the same object. * * @see PersistentOStream * @see ClassTraits */ class PersistentIStream { public: ThePEG_DECLARE_POINTERS(PersistentBase,BPtr); /** A vector of pointers to persistent objects */ typedef vector ObjectVector; /** A vector of bare pointers to InputDescription objects. */ typedef InputDescription::DescriptionVector DescriptionVector; public: /** * Constuctor giving an input stream to be used as an underlying * istream. */ PersistentIStream(istream & is) : theIStream(&is), isPedantic(true), allocStream(false), badState(false) { init(); } /** * Constuctor giving a file name to read from. If the first * character in the string is a '|', the corresponding program is * run and its standard output is used instead. If the filename ends * in ".gz" the file is uncompressed with gzip. */ PersistentIStream(string); /** * The destructor. */ ~PersistentIStream(); /** * Operator for extracting persistent objects from the stream. * @param ptr this pointer will refer to the extracted object. * @return a reference to the stream. */ template PersistentIStream & operator>>(RCPtr & ptr) { BPtr b = getObject(); ptr = dynamic_ptr_cast< RCPtr >(b); if ( b && !ptr ) setBadState(); return *this; } /** * Operator for extracting persistent objects from the stream. * @param ptr this pointer will refer to the extracted object. * @return a reference to the stream. */ template PersistentIStream & operator>>(ConstRCPtr & ptr) { BPtr b = getObject(); ptr = dynamic_ptr_cast< ConstRCPtr >(b); if ( b && !ptr ) setBadState(); return *this; } /** * Operator for extracting persistent objects from the stream. * @param ptr this pointer will refer to the extracted object. * @return a reference to the stream. */ template PersistentIStream & operator>>(TransientRCPtr & ptr) { BPtr b = getObject(); ptr = dynamic_ptr_cast< TransientRCPtr >(b); if ( b && !ptr ) setBadState(); return *this; } /** * Operator for extracting persistent objects from the stream. * @param ptr this pointer will refer to the extracted object. * @return a reference to the stream. */ template PersistentIStream & operator>>(TransientConstRCPtr & ptr) { BPtr b = getObject(); ptr = dynamic_ptr_cast< TransientConstRCPtr >(b); if ( b && !ptr ) setBadState(); return *this; } /** @name Operators for extracting built-in types from the stream. */ //@{ /** * Read a character string. */ PersistentIStream & operator>>(string &); /** * Read a character. */ PersistentIStream & operator>>(char &); /** * Read a signed character. */ PersistentIStream & operator>>(signed char &); /** * Read an unsigned character. */ PersistentIStream & operator>>(unsigned char &); /** * Read an integer. */ PersistentIStream & operator>>(int & i) { is() >> i; getSep(); return *this; } /** * Read an unsigned integer. */ PersistentIStream & operator>>(unsigned int & i) { is() >> i; getSep(); return *this; } /** * Read a long integer. */ PersistentIStream & operator>>(long & i) { is() >> i; getSep(); return *this; } /** * Read an unsigned long integer. */ PersistentIStream & operator>>(unsigned long & i) { is() >> i; getSep(); return *this; } /** * Read a short integer. */ PersistentIStream & operator>>(short & i) { is() >> i; getSep(); return *this; } /** * Read an unsigned short integer. */ PersistentIStream & operator>>(unsigned short & i) { is() >> i; getSep(); return *this; } /** * Read a double. */ PersistentIStream & operator>>(double & d) { is() >> d; getSep(); return *this; } /** * Read a float. */ PersistentIStream & operator>>(float & f) { is() >> f; getSep(); return *this; } /** * Read a bool. */ PersistentIStream & operator>>(bool &); /** * Read a Complex. */ PersistentIStream & operator>>(Complex &); //@} /** * Intput of containers streamable objects. * @param c the container into which objects are added. */ template void getContainer(Container & c) { long size; typename Container::value_type val; c.clear(); *this >> size; while ( size-- && good() ) { *this >> val; c.insert(c.end(), val); } } /** * Read in an object. Create an object and read its data from the * stream. * @return a pointer to the read object. */ BPtr getObject(); /** * For a given object, read the member variables corresponding to a * given InputDescription object. * @param obj the object to be read into. * @param pid a pointer to an InputDescription describing the * (sub)class to be read. */ void getObjectPart(tBPtr obj, const InputDescription * pid); /** * Read a class description from the underlying stream and return a * corresponding InputDescription object */ const InputDescription * getClass(); /** * Set pedantic mode. If the stream is set to be tolerant it is * allowed to read an object from the stream even if the * corresponding class is not known to the running executable, under * the condition that a public base class of the unknown class is * known. If the stream is set to be pedantic this is not allowed. * By default, the stream is pedantic. */ PersistentIStream & setPedantic() { isPedantic = true; return *this; } /** * Set tolerant mode. If the stream is set to be tolerant it is * allowed to read an object from the stream even if the * corresponding class is not known to the running executable, under * the condition that a public base class of the unknown class is * known. If the stream is set to be pedantic this is not allowed. * By default, the stream is pedantic. */ PersistentIStream & setTolerant() { isPedantic = false; return *this; } /** * Check the state of the stream. */ bool good() const { return !badState && is(); } /** * Check the state of the stream. */ bool operator!() const { return !good(); } /** * Check the state of the stream. */ operator bool() const { return good(); } /** * Check the tolerance. Returns true if setPedantic() has been * called or if not setTolerant() has been called. */ bool pedantic() const { return isPedantic; } /** * The global libraries loaded on initialization. */ const vector & globalLibraries() const { return theGlobalLibraries; } private: /** @cond EXCEPTIONCLASSES */ /** @ingroup Persistency Thrown if a class is missing */ struct MissingClass: public Exception {}; /** @ingroup Persistency Thrown if an object which should have been read in is missing. */ struct MissingObject: public Exception {}; /** @ingroup Persistency Thrown if reading from the stream failed for some reason. */ struct ReadFailure: public Exception {}; /** @endcond */ /** * Internal initialization. */ void init(); /** * Get the next character from the associated istream. */ char get() { return is().get(); } /** * Get the next character from the associated istream and decode it * if it is escaped. */ char escaped() { char c = get(); return c == tNoSep? tSep: c; } /** * Set the stream in a bad state */ void setBadState() { breakThePEG(); badState = true; } /** * Read a field separator from the stream. */ void getSep() { if ( !pedantic() ) skipField(); else if ( get() != tSep ) setBadState(); } /** * Scan the stream for the next field separator. */ void skipField() { is().ignore(INT_MAX, tSep); if ( !is() ) setBadState(); } /** * Check if the next char to be read is a tBegin marker. */ bool beginObject() { return is().peek() == tBegin; } /** * Scan the stream to the end of the current object. If any new object are * found these are read prom the stream to ensure that the pointer structure * is preserved. */ void endObject(); /** * Scan stream for "end base class" marker. The \a classname is the * name of the class currently being read and is only used for * documenting exceptions. */ void endBase(string classname); /** * Return a reference to the associated stream. */ istream & is() { return *theIStream; } /** * Return a const reference to the associated stream. */ const istream & is() const { return *theIStream; } /** * Lists of objects that have been read. */ ObjectVector readObjects; /** * Lists of classes and corresponding version strings that have been read. */ DescriptionVector readClasses; /** * A pointer to the associated istream. */ istream * theIStream; /** * Pedantic or tolerant. See description of the setPedantic() and * setTolerant() methods. */ bool isPedantic; /** * True if the associated istream should be deleted when the PersistentIStream * is destroyed. */ bool allocStream; /** * False if no errors has occurred. */ bool badState; /** Version number of the PersistentOStream which has written the * file being read. */ int version; /** Subversion number of the PersistentOStream which has written the * file being read. */ int subVersion; /** * Global libraries loaded in the initialization. */ vector theGlobalLibraries; /** @name Special marker characters */ //@{ /** * The special marker character indicating the beginning of an object. */ static const char tBegin = '{'; /** * The special marker character indicating the end of an object. */ static const char tEnd = '}'; /** * The marker character indicating the beginning of the next base * class in case of multiple inheritance. */ static const char tNext = '|'; /** * The special marker character indicating an escaped marker character. */ static const char tNull = '\\'; /** * The special marker character indicating the end of a value. */ static const char tSep = '\n'; /** * The special marker character used to avoid confusion with escaped * tSep markers. */ static const char tNoSep = 'n'; /** * The special marker character indicating a true boolean value. */ static const char tYes = 'y'; /** * The special marker character indicating a false boolean value. */ static const char tNo = 'n'; //@} private: /** * Standard ctors and assignment are private and not implemented. */ PersistentIStream(); /** * Standard ctors and assignment are private and not implemented. */ PersistentIStream(const PersistentIStream &); /** * Standard ctors and assignment are private and not implemented. */ - PersistentIStream & operator=(const PersistentIStream &); + PersistentIStream & operator=(const PersistentIStream &) = delete; }; /** * Operator for applying manipulators to the stream. */ inline PersistentIStream & operator>>(PersistentIStream & is, PersistentIManip func) { return (*func)(is); } /** * The manipulator for setting pedantic mode. */ inline PersistentIStream & pedantic(PersistentIStream & is) { return is.setPedantic(); } /** * The manipulator for setting tolerant mode. */ inline PersistentIStream & tolerant(PersistentIStream & is) { return is.setTolerant(); } /** * @name Partial specializations of operator>> for input of * std::containers. */ //@{ /** Input a pair of objects. */ template inline PersistentIStream & operator>>(PersistentIStream & is, pair & p) { return is >> p.first >> p.second; } /** Input a map of key/objects pairs. */ template inline PersistentIStream & operator>>(PersistentIStream & is, map & m) { m.clear(); long size; Key k; is >> size; while ( size-- && is ) { is >> k; is >> m[k]; } return is; } /** Input a multimap of key/objects pairs. */ template inline PersistentIStream & operator>>(PersistentIStream & is, multimap & m) { m.clear(); long size; Key k; T t; is >> size; while ( size-- && is ) { is >> k; is >> t; m.insert(make_pair(k, t)); } return is; } /** Input a set of objects. */ template inline PersistentIStream & operator>>(PersistentIStream & is, set & s) { is.getContainer(s); return is; } /** Input a multoset of objects. */ template inline PersistentIStream & operator>>(PersistentIStream & is, multiset & s) { is.getContainer(s); return is; } /** Input a list of objects. */ template inline PersistentIStream & operator>>(PersistentIStream & is, list & l) { is.getContainer(l); return is; } /** Input a vector of objects. */ template inline PersistentIStream & operator>>(PersistentIStream & is, vector & v) { is.getContainer(v); return is; } /** Input an array of objects. */ template inline PersistentIStream & operator>>(PersistentIStream & is, array & a) { for ( size_t i = 0; i < N && is.good(); ++i ) is >> a[i]; return is; } /** Input a deque of objects. */ template inline PersistentIStream & operator>>(PersistentIStream & is, deque & d) { is.getContainer(d); return is; } /** Input a valarray. */ template inline PersistentIStream & operator>>(PersistentIStream & is, std::valarray & v) { long size; is >> size; v = std::valarray(size); for ( int i = 0; i < size && is.good(); ++i ) is >> v[i]; return is; } } #endif /* ThePEG_PersistentIStream_H */ diff --git a/Persistency/PersistentOStream.h b/Persistency/PersistentOStream.h --- a/Persistency/PersistentOStream.h +++ b/Persistency/PersistentOStream.h @@ -1,671 +1,671 @@ // -*- C++ -*- // // PersistentOStream.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_PersistentOStream_H #define ThePEG_PersistentOStream_H // This is the declaration of the PersistentOStream class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/Utilities/Exception.h" #include "ThePEG/Utilities/Debug.h" #include "PersistentOStream.fh" #include "PersistentOStream.xh" #include namespace ThePEG { /** @ingroup Persistency * PersistentOStream is used to write objects persistently * to a stream from which they can be read in again with a * PersistentIStream. Pointers to objects of classes * derived from PersistentBase may be written out if a * static ClassDescription object is present for the * class. Also basic types may be written to the stream, as well as * containers of pointers to persistent objects and basic types. * * The PersistentOStream keeps a list of all pointers to * written persistent objects, so that if several pointers to the * smame object is written, the object will only be written once. * * Each base class of a given object will be asked to write its * members to the stream starting from the least derived class going to * the most derived one. Members may be pointers to other persistent * objects or basic types or containers of these. The output for each * object part should be implemented by specializing the * ClassTraits::output method, which otherwise * will call the non-virtual persistentOutput function of * the class. Note that for diamond-shaped multiple inheritance * structures, the virtual base classes will be written out several * times for the same object. * * @see PersistentIStream * @see ClassDescription * @see ClassTraits */ class PersistentOStream { public: ThePEG_DECLARE_POINTERS(PersistentBase,BPtr); /** A map of objects indexed by integers */ ThePEG_DECLARE_MAP(cBPtr, int, ObjectMap); /** A map relating class descriptions to integers. */ ThePEG_DECLARE_MAP(const ClassDescriptionBase *, int, ClassMap); /** A vector of bare pointers to InputDescription objects. */ typedef ClassDescriptionBase::DescriptionVector DescriptionVector; public: /** * Constuctor giving an output stream. Optionally a vector of * libraries to be loaded before the resulting file can be read in * again can be given in \a libs. */ PersistentOStream(ostream &, const vector & libs = vector()); /** * Constuctor giving a file name to read. If the first * character in the string is a '|', the corresponding program is * run and its standard input is used instead. If the filename ends * in ".gz" the file is compressed with gzip. Optionally a vector of * libraries to be loaded before the resulting file can be read in * again can be given in \a libs. */ PersistentOStream(string, const vector & libs = vector()); /** * The destructor */ ~PersistentOStream(); /** * Operator for writing persistent objects to the stream. * @param p a pointer to the object to be written. * @return a reference to the stream. */ template PersistentOStream & operator<<(const RCPtr & p) { return outputPointer(p); } /** * Operator for writing persistent objects to the stream. * @param p a pointer to the object to be written. * @return a reference to the stream. */ template PersistentOStream & operator<<(const ConstRCPtr & p) { return outputPointer(p); } /** * Operator for writing persistent objects to the stream. * @param p a pointer to the object to be written. * @return a reference to the stream. */ template PersistentOStream & operator<<(const TransientRCPtr & p) { return outputPointer(p); } /** * Operator for writing persistent objects to the stream. * @param p a pointer to the object to be written. * @return a reference to the stream. */ template PersistentOStream & operator<<(const TransientConstRCPtr & p) { return outputPointer(p); } /** @name Operators for extracting built-in types from the stream. */ //@{ /** * Write a character string. */ PersistentOStream & operator<<(string s) { for ( string::const_iterator i = s.begin(); i < s.end(); ++i ) escape(*i); put(tSep); return *this; } /** * Write a character. */ PersistentOStream & operator<<(char c) { escape(c); put(tSep); return *this; } /** * Write a signed character. */ PersistentOStream & operator<<(signed char c) { return (*this) << static_cast(c); } /** * Write an unsigned character. */ PersistentOStream & operator<<(unsigned char c) { return (*this) << static_cast(c); } /** * Write an integer. */ PersistentOStream & operator<<(int i) { os() << i; put(tSep); return *this; } /** * Write an unsigned integer. */ PersistentOStream & operator<<(unsigned int i) { os() << i; put(tSep); return *this; } /** * Write a long integer. */ PersistentOStream & operator<<(long i) { os() << i; put(tSep); return *this; } /** * Write an unsigned long integer. */ PersistentOStream & operator<<(unsigned long i) { os() << i; put(tSep); return *this; } /** * Write a short integer. */ PersistentOStream & operator<<(short i) { os() << i; put(tSep); return *this; } /** * Write an unsigned short integer. */ PersistentOStream & operator<<(unsigned short i) { os() << i; put(tSep); return *this; } /** * Write a double. */ PersistentOStream & operator<<(double d) { if ( ! isfinite(d) ) throw WriteError() << "Tried to write a NaN or Inf double to a persistent stream." << Exception::runerror; os() << setprecision(18) << d; put(tSep); return *this; } /** * Write a float. */ PersistentOStream & operator<<(float f) { if ( ! isfinite(f) ) throw WriteError() << "Tried to write a NaN or Inf float to a persistent stream." << Exception::runerror; os() << setprecision(9) << f; put(tSep); return *this; } /** * Write a boolean. */ PersistentOStream & operator<<(bool t) { if (t) put(tYes); else put(tNo); // This is a workaround for a possible bug in gcc 4.0.0 // which inserts tYes and tNo as global symbols although // they are private // put(t? tYes: tNo); put(tSep); return *this; } /** * Write a c-style character string (to be read in as a std::string). */ PersistentOStream & operator<<(const char * s) { *this << string(s); return *this; } /** * Write a Complex. */ PersistentOStream & operator<<(Complex z) { *this << z.real() << z.imag(); return *this; } //@} /** * Output of containers of streamable objects. */ template void putContainer(const Container & c) { *this << c.size(); for ( typename Container::const_iterator it = c.begin(); it != c.end() && good() ; ++it ) *this << *it; } /** * Write out a persistent object given a pointer to it. */ PersistentOStream & outputPointer(tcBPtr); /** * For a given object, write the member variables corresponding to a * given ClassDescriptionBase object. * @param obj the object to be written. * @param cd a pointer to a ClassDescriptionBase describing the * (sub)class to written. */ void putObjectPart(tcBPtr obj, const ClassDescriptionBase * cd); /** * Remove all objects that have been written, except those which are * to be saved, from the list of written objects. */ PersistentOStream & flush(); /** * Instuct the stream to save the following objects (protecting them from * being flushed). */ PersistentOStream & push() { lastSavedObject.push(writtenObjects.size() - 1); return *this; } /** * Instuct the stream not to save the following objects. */ PersistentOStream & pop() { lastSavedObject.pop(); return *this; } /** * Check the state of the stream. */ bool good() const { return !badState && os(); } /** * Check the state of the stream. */ operator bool() const { return good(); } /** * Check the state of the stream. */ bool operator!() const { return !good(); } private: /** @cond EXCEPTIONCLASSES */ /** @ingroup Persistency * Internal exception class. */ struct MissingClass: public Exception {}; /** @ingroup Persistency * Internal exception class. */ struct WriteError: public Exception {}; /** @endcond */ /** * The version of this PersistentOStream implementation. */ static const int version = 0; /** * The subversion of this PersistentOStream implementation. */ static const int subVersion = 3; /** @name Special marker characters */ //@{ /** * The special marker character indicating the beginning of an object. */ static const char tBegin = '{'; /** * The special marker character indicating the end of an object. */ static const char tEnd = '}'; /** * The marker character indicating the beginning of the next base * class in case of multiple inheritance. */ /** * The special marker character indicating an escaped marker character. */ static const char tNext = '|'; /** * The special marker character indicating an escaped marker character. */ static const char tNull = '\\'; /** * The special marker character indicating the end of a value. */ static const char tSep = '\n'; /** * The special marker character used to avoid confusion with escaped * tSep markers. */ static const char tNoSep = 'n'; /** * The special marker character indicating a true boolean value. */ static const char tYes = 'y'; /** * The special marker character indicating a false boolean value. */ static const char tNo = 'n'; //@} /** * Return true if the given character is aspecial marker character. */ bool isToken(char c) const { return c == tBegin || c == tEnd || c == tNext || c == tSep || c == tNull; } /** * Set the stream in a bad state. */ void setBadState() { breakThePEG(); badState = true; } /** * Check if the state is ok. */ void checkState() { if ( ! os() ) badState = true; } /** * Write out class information to the associated ostream. */ const ClassDescriptionBase * writeClassId(tcBPtr); /** * write out class information to the associated ostream. */ void writeClassDescription(const ClassDescriptionBase *); /** * Put a "begin object" marker on the associated ostream */ void beginObject() { put(tBegin); } /** * Put a "end of object" marker on the associated ostream */ void endObject() { put(tEnd); } /** * Put an "next base class" marker on the associated ostream */ void endBase() { put(tNext); } /** * Put a character on the associated ostream */ void put(char c) { os().put(c); } /** * Put a character on the associated ostream but escape it if it is * a token. */ void escape(char c) { if ( isToken(c) ) { put(tNull); put( c == tSep? tNoSep: c ); } else put(c); } /** * Return a reference to the associated ostream. */ ostream & os() { return *theOStream; } /** * Return a const reference to the associated ostream. */ const ostream & os() const { return *theOStream; } /** * Write out initial metainfo on the stream. */ void init(const vector & libs); /** * List of written objects. */ ObjectMap writtenObjects; /** * List of written objects that are to be saved. */ stack lastSavedObject; /** * List of written classes. */ ClassMap writtenClasses; /** * A pointer to the associated ostream. */ ostream * theOStream; /** * True if no errors has occurred. */ bool badState; /** * True if the associated ostream should be deleted in the destructor. */ bool allocStream; private: /** * Standard ctors and assignment are private and not implemented. */ PersistentOStream(); /** * Standard ctors and assignment are private and not implemented. */ PersistentOStream(const PersistentOStream &); /** * Standard ctors and assignment are private and not implemented. */ - PersistentOStream & operator=(const PersistentOStream &); + PersistentOStream & operator=(const PersistentOStream &) = delete; }; /** * Operator for applying manipulators to the stream. */ inline PersistentOStream & operator<<(PersistentOStream & os, PersistentOManip func) { return (*func)(os); } /** * The manipulator for calling PersistentOStream::flush(). */ inline PersistentOStream & flush(PersistentOStream & os) { return os.flush(); } /** * The manipulator for calling PersistentOStream::push(). */ inline PersistentOStream & push(PersistentOStream & os) { return os.push(); } /** * The manipulator for calling PersistentOStream::pop(). */ inline PersistentOStream & pop(PersistentOStream & os) { return os.pop(); } /** * @name Partial specializations of operator<< for output of * std::containers. */ //@{ /** Output a pair of objects. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const pair & p) { return os << p.first << p.second; } /** * Output a multimap of key/object pairs. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const multimap & m) { os.putContainer(m); return os; } /** * Output a map of key/object pairs. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const map & m) { os.putContainer(m); return os; } /** * Output a set of objects. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const set & s) { os.putContainer(s); return os; } /** * Output a multiset of objects. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const multiset & s) { os.putContainer(s); return os; } /** * Output a list of objects. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const list & l) { os.putContainer(l); return os; } /** * Output a vector of objects. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const vector & v) { os.putContainer(v); return os; } /** * Output an array of objects. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const array & a) { for ( auto it = a.cbegin(); it != a.cend() && os.good() ; ++it ) os << *it; return os; } /** * Output a deque of objects. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const deque & d) { os.putContainer(d); return os; } /** * Output a valarray. */ template inline PersistentOStream & operator<<(PersistentOStream & os, const std::valarray & v) { os << v.size(); for ( int i = 0, N = v.size(); i < N; ++i ) os << v[i]; return os; } //@} } #endif /* ThePEG_PersistentOStream_H */ diff --git a/Repository/CurrentGenerator.h b/Repository/CurrentGenerator.h --- a/Repository/CurrentGenerator.h +++ b/Repository/CurrentGenerator.h @@ -1,278 +1,278 @@ // -*- C++ -*- // // CurrentGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_CurrentGenerator_H #define ThePEG_CurrentGenerator_H // This is the declaration of the CurrentGenerator class. #include "ThePEG/Repository/EventGenerator.h" #include "CurrentGenerator.fh" namespace ThePEG { /** * This CurrentGenerator class keeps a static stack of EventGenerators * which can be used anywhere by any class. When an EventGenerator is * initialized or run it adds itself to the stack which can be used by * any other object being initialized or run through the static * functions of the CurrentGenerator class. If someone * needs to use an alternative EventGenerator object a new * CurrentGenerator object can be constructed with a * pointer to the desired EventGenerator object as argument and that * object will the be used by the static CurrentGenerator * functions until the CurrentGenerator object is destructed. * * @see EventGenerator * */ class CurrentGenerator { public: /** * Default constructor does nothing. */ CurrentGenerator() : generatorPushed(false) {} /** * Copy-constructor does nothing. */ CurrentGenerator(const CurrentGenerator &) : generatorPushed(false) {} /** * Construct a new object specifying a new EventGenerator, \a eg, to * be used during this objects lifetime. */ CurrentGenerator(const EGPtr & eg) : generatorPushed(false) { if ( eg ) { theGeneratorStack.push_back(eg); generatorPushed = true; } } /** * The destructor removing the EventGenerator specified in the * constructor from the stack. */ ~CurrentGenerator() { if ( generatorPushed ) theGeneratorStack.pop_back(); } public: /** * Returns true if there is no currently chosen EventGenerator * object. */ static bool isVoid() { return theGeneratorStack.empty() || !(theGeneratorStack.back()); } /** * Return a reference to the currently chosen EventGenerator object. */ static EventGenerator & current() { return *theGeneratorStack.back(); } /** * Return a reference to the currently chosen object. */ EventGenerator & operator*() const { return *theGeneratorStack.back(); } /** * Return a pointer to the currently chosen object. */ EventGenerator * operator->() const { return theGeneratorStack.back(); } /** * Pointer to the stack */ static EventGenerator * ptr() { return theGeneratorStack.back(); } /** * Test for existance */ operator bool() const { return ptr(); } /** * Test for existance */ bool operator!() const { return !ptr(); } /** * Return a pointer to the standard model parameters used by the * current generator. */ static tSMPtr standardModel() { return current().standardModel(); } /** * Return a pointer to the strategy object containing eg. a set of * non-default particles to be used by the current generator. */ static tStrategyPtr strategy() { return current().strategy(); } /** * Get the current standard output stream. Return a reference to the * stream connected to the file for general output of the current * generator. If no file is connected, the BaseRepository::cout() * will be used instead. */ static ostream & out() { return current().out(); } /** * Get the current standard log stream. Return a reference to the * stream connected to the file for logging information of the * current generator. If no file is connected, the * BaseRepository::clog() will be used instead. */ static ostream & log() { return current().log(); } /** * Get the current standard ref stream. Return a reference to the * stream connected to the file for references from used objects of * the current generator. If no file is connected, the * BaseRepository::cout() will be used instead. */ static ostream & ref() { return current().ref(); } /** * Get object. Return a garbage collected pointer to a given object * in the current EventGenerator. If the object is not found, a null * pointer will be returned. */ template static typename Ptr::pointer getPtr(const T & t) { return current().getPtr(t); } /** * Get object. Return a pointer to an object present in the current * EventGenerator given its full name. Return the null pointer if * non-existent. */ static IBPtr getPointer(string name) { return current().getPointer(name); } /** * Get object. Return a pointer to an object of type T present in * the current EventGenerator given its full name. Return the null * pointer if non-existent. */ template static typename Ptr::pointer getObject(string name) { return current().getObject(name); } /** * Get default object. Return the default object for class T in the * current EventGenerator. Returns the null pointer if non-existent. */ template static typename Ptr::pointer getDefault() { return current().getDefault(); } public: /** * Class used to temporarily redirect a given ostream to the misc() * stream of the current EventGenerator. */ class Redirect { public: /** * Constructor taking the stream to be redirected as input. If the * \a internal flag false the output will be stored in the Event * Generator and written to the log file in the end of the run. If * \internal is true the output is instead stored internally in * this object and is accessible through the str() function until * the object is destroyed. */ Redirect(ostream & os, bool internal = false) : theStream(&os), theBuffer(os.rdbuf()) { if ( internal ) theStream->rdbuf(intStream.rdbuf()); else if ( !current().useStdOut() ) theStream->rdbuf(current().misc().rdbuf()); } /** * The destructor which restores the original destination of the * stream. */ ~Redirect() { theStream->rdbuf(theBuffer); } /** * If output is stored internally, acces what has been written so * far. */ string str() const { return intStream.str(); } /** * The stream which is redirected. */ ostream * theStream; /** * The original buffer of the redirected stream. */ std::streambuf * theBuffer; /** * An internal buffer, the content of which will be discarded when * the this object is destructed. */ ostringstream intStream; }; private: /** * The stack of EventGenerators requested. */ static vector theGeneratorStack; /** * True if this object is responsible for pushing a EventGenerator * onto the stack. */ bool generatorPushed; private: /** * Private and non-existent assignment operator. */ - CurrentGenerator & operator=(const CurrentGenerator &); + CurrentGenerator & operator=(const CurrentGenerator &) = delete; }; } #endif /* ThePEG_CurrentGenerator_H */ diff --git a/Repository/EventGenerator.h b/Repository/EventGenerator.h --- a/Repository/EventGenerator.h +++ b/Repository/EventGenerator.h @@ -1,1189 +1,1189 @@ // -*- C++ -*- // // EventGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_EventGenerator_H #define ThePEG_EventGenerator_H // This is the declaration of the EventGenerator class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Utilities/Named.h" #include "EventGenerator.fh" #include "RandomGenerator.h" #include "ThePEG/Repository/UseRandom.h" #include "ThePEG/Repository/Strategy.h" #include "ThePEG/Repository/CurrentGenerator.fh" #include "ThePEG/Utilities/ClassDescription.h" #include "ThePEG/Handlers/EventHandler.fh" #include "ThePEG/Analysis/FactoryBase.fh" #include #include "EventGenerator.xh" namespace ThePEG { /** * The EventGenerator class manages a whole event generator run. It * keeps a list of all Interfaced objects which are needed for a * particular run (these objects each have a pointer back to the * EventGenerator). Some objects are special, such as a default * RandomGenerator object, a StandardModelBase object and a Strategy * object and lists of ParticleData and MatcherBase objects used in * the run. * * The EventGenerator also manages information about the * run such as the exceptions being thrown, files to write output and * error messages to, etc. * * There are three main external member functions:
* go() generates a specified number of events and exits.
* * shoot() generates one Event and returns it.
* * generateEvent() takes an initial Step or a partially generated * Event as argument and generates subsequent steps defined in the * generator.
* * doShoot() is a virtual function called by shoot() and may be * overridden in sub-classes.
* * doGenrateEvent() is a virtual function called by generateEvent() and * may to be overridden in sub-classes. * * @see \ref EventGeneratorInterfaces "The interfaces" * defined for EventGenerator. * @see Interfaced * @see RandomGenerator * @see StandardModelBase * @see Strategy * @see ParticleData * @see Event * @see Step * @see FullEventGenerator * */ class EventGenerator: public Interfaced { /** The Repository is a friend. */ friend class Repository; public: /** A map of integers giving the number of times an exception of the * key type has been thrown. */ //typedef map ExceptionMap; //typedef map ExceptionMap; typedef map, int> ExceptionMap; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ EventGenerator(); /** * Copy-constructor. */ EventGenerator(const EventGenerator &); /** * Destructor. */ virtual ~EventGenerator(); //@} public: /** @name Access special objects in the run. */ //@{ /** * Return a pointer to the standard model parameters. */ tSMPtr standardModel() const { return theStandardModel; } /** * Return a pointer to the strategy object containing a set of * non-default particles to use. */ tStrategyPtr strategy() const { return theStrategy; } /** * Get the currently active EventHandler. */ tEHPtr currentEventHandler() const { return theCurrentEventHandler; } /** * Set the currently active EventHandler. */ void currentEventHandler(tEHPtr eh) { theCurrentEventHandler = eh; } /** * Get the currently active step handler. */ tStepHdlPtr currentStepHandler() const { return theCurrentStepHandler; } /** * Set the currently active step handler. */ void currentStepHandler(tStepHdlPtr sh) { theCurrentStepHandler = sh; } /** * Return a pointer to the EventHandler. */ tEHPtr eventHandler() const { return theEventHandler; } /** * Return the vector of analysis objects to be used in the run. */ AnalysisVector & analysisHandlers() { return theAnalysisHandlers; } /** * Return a pointer to an associated factory objects for handling * histograms to be used by AnalysisHandlers. */ tHistFacPtr histogramFactory() const { return theHistogramFactory; } /** * Return the EventManipulator used in the run. */ tEvtManipPtr manipulator() const { return theEventManipulator; } //@} public: /** @name Main functions to controll the run. */ //@{ /** * Initialize this generator. This is done automatically if 'go()' * is used. Calls the virtual method doInitialize(). */ void initialize(bool initOnly = false); /** * Run this EventGenerator session. Calls the virtual method doGo(). * * @param next the number of the firts event to be generated. If * negative it is assumed that this generator was previously * interrupted (or dumped to a file) and the execution will resume * from where it started. Default is 1. * @param maxevent the maximum number of events to be generated. If negative * the N() is used instead. Default is -1. * @param tics if true information the number of events generated * and elapsed time will be written to std::cerr after each event. */ void go(long next = 1, long maxevent = -1, bool tics = false); /** * Generate one event. Calls the virtual method doShoot(); */ EventPtr shoot(); /** * Finish generating an \a event which has already been partially * constructed from the outside. Calls the virtual method do * doGenerateEvent(). */ EventPtr generateEvent(Event & event); /** * Finish generating an event starting from a \a step which has * already been partially constructed from the outside. Calls the * virtual method do doGenerateEvent(). */ EventPtr generateEvent(Step & step); /** * Indicate that the run has ended and call finish() for all objects * including this one. Note that finish() should not be called * directly. */ void finalize(); /** * Dynamically load the Main class in the given \a file, making it * run its Init() method where it may use this EventGenerator. Also * call the initialize function before and the finish() function * afterwards. */ bool loadMain(string file); /** * Return the maximum center of mass energy possible for an * event. Return zero if the assigned EventHander is not able to * generatr full events. */ virtual Energy maximumCMEnergy() const; /** * The number of the event currently being generated. */ long currentEventNumber() const { return ieve; } /** * Return the event being generated. */ tcEventPtr currentEvent() const; /** * Dump the full state of the current run - including the number of * generated events, so that it can be fully continued from this point. */ virtual void dump() const; /** * Register a given object as used. Only objects registered in this * way will be included in the file with model references. */ void use(const Interfaced & i); /** * Set the random seed for the global random number generator. Also * set the interfaced member variable. */ void setSeed(long seed); /** * Log a given exception. */ void logWarning(const Exception &); /** * The number of events to be generated in this run. */ long N() const { return theNumberOfEvents; } /** * 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. */ CrossSection histogramScale() const; /** * The total integrated cross section of the processes generated in * this run. */ CrossSection integratedXSec() const; /** * The error estimate for the total integrated cross section of the * processes generated in this run. */ CrossSection integratedXSecErr() const; /** * The sum of all weight of the events generated so far. */ double sumWeights() const { return weightSum; } //@} /** @name Functions for accessing output files. */ //@{ /** * The base filename used in this run. The actual files are called * filename.run, filename.dump, * filename.out, filename.log and * filename.tex for the input configuration file, * output dump file, output file, log file, and reference * file respectively. The filename is constructed from the path() * and runName(). */ string filename() const { return path() + "/" + runName(); } /** * Return the name assigned to this run. If no name is given, the * name of the EventGenerator object is returned. */ string runName() const { return theRunName.size()? theRunName: name(); } /** * The directory in which the filename() is located */ string path() const { return thePath; } /** * Has the generator been asked to redirect everything to standard * output? */ bool useStdOut() const { return useStdout; } /** * Open all ouput files. */ void openOutputFiles(); /** * Flush the content of the internal output string stream to the .out file. */ void flushOutputFile(); /** * Close all ouput files. */ void closeOutputFiles(); /** * Return a reference to the output file stream. */ ofstream & outfile() { return theOutfile; } /** * Return a reference to the log file stream. */ ofstream & logfile() { return theLogfile; } /** * Return a reference to the reference file stream. This file is * used to output LaTeX text with information about the models used * in the run. */ ofstream & reffile() { return theReffile; } /** * This stream should be used for output of information and * statistics of an EventGenerator run in the finish() phase, after * the actual generation has finished. When used at other times, the * output will be cashed internally before written out in the * finish() phase. This is then written to the .out file, or if * useStdOut() is true, to BaseRepository::cout(). */ ostream & out(); /** * Return a reference to the stream connected to the file for logging * information. If no file is connected, BaseRepository::cout() will * be used instead. */ ostream & log(); /** * Return a reference to a stream to be used to redirect cout for * external modules which prints out messages there. The output will * instead be appended to the log() stream at the end of the run. */ ostream & misc() { return theMiscStream; } /** * Return a reference to the stream connected to the filea for * references from used objects. If no file is connected, * BaseRepository::cout() will be used instead. */ ostream & ref(); //@} /** @name Access objects included in this run. */ //@{ /** * Return the set of objects used in this run. */ const ObjectSet & objects() const { return theObjects; } /** * Return the map of objects used in this run indexed by their name. */ const ObjectMap & objectMap() const { return theObjectMap; } /** * Return a garbage collected pointer to a given object. If the * object is not included in the run, a null pointer will be * returned. */ template typename Ptr::pointer getPtr(const T &) const; /** * Return a pointer to an object present in this run given its full * name. Return the null pointer if non-existent. */ IBPtr getPointer(string name) const; /** * Return a pointer to an object of type T present in this run given * its full name. Return the null pointer if non-existent. Calls * getPointer(string) and dynamically casts the result to the * requested pointer type. */ template typename Ptr::pointer getObject(string name) const { return dynamic_ptr_cast::pointer>(getPointer(name)); } /** * Return the default object for class T. Returns the null pointer * if non-existent. */ template typename Ptr::pointer getDefault() const; /** * Create a particle instance corresponding to the given \a id * number. */ PPtr getParticle(PID id) const; /** * Return a pointer to the ParticleData object corresponding to the * given \a id number. */ PDPtr getParticleData(PID id) const; /** * Return a reference to the complete list of matchers in this * generator. */ const MatcherSet & matchers() const { return theMatchers; } /** * Return a reference to the complete map of particle data objects * in this generator, indexed by their id numbers. */ const ParticleMap & particles() const { return theParticles; } /** * Return a reference to the set of objects which have been * registered as used during the current run. */ const ObjectSet & used() const { return usedObjects; } //@} protected: /** * Check if there has been an interrupt signal from the OS. * If that's the case, finalize() is called */ void checkSignalState(); /** * Return a reference to the default RandomGenerator object in this * run. */ RandomGenerator & random() const { return *theRandom; } /** * Finish the setup of an event generator run. Set run name, all * particles, matchers and other objects to be used. Is used by the * Repository when isolating an EventGenerator. */ void setup(string newRunName, ObjectSet & newObjects, ParticleMap & newParticles, MatcherSet & newMatchers); /** @name Main virtual functions to be overridden by sub-classes. */ //@{ /** * Run this EventGenerator session. Is called from go(long,long,bool). */ virtual void doGo(long next, long maxevent, bool tics); /** * Initialize this generator. Is called from initialize(). */ virtual void doInitialize(bool initOnly = false); /** * Generate one event. Is called from shoot(). */ virtual EventPtr doShoot(); /** * Write out the number of events generated and the elapsed time in * suitable periods. */ void tic(long currev = 0, long totev = 0) const; /** * Finish generating an event constructed from the outside. Is * called by generateEvent(tEventPtr). */ virtual EventPtr doGenerateEvent(tEventPtr); /** * Finish generating an event starting from a Step constructed from * the outside. Is called by generateEvent(tStepPtr). */ virtual EventPtr doGenerateEvent(tStepPtr); //@} /** * Print the message of an exception to the log file. */ void printException(const Exception &); /** * Log a given exception. */ bool logException(const Exception &, tcEventPtr); /** * Set number of events to be generated. */ void N(long n) { theNumberOfEvents = n; } /** * Set the name of this run */ void runName(string f) { theRunName = f; } public: /** * Append a tag to the run name. Derived classes may put special * meaning to the tags. */ virtual void addTag(string tag) { runName(runName() + tag); } private: /** * Return the vector of default objects. */ const vector & defaultObjects() const { return theDefaultObjects; } /** * Access the special particles used in this generator. Not relevant * in the run phase. */ ParticleMap & localParticles() { return theLocalParticles; } /** * Access the special particles used in this generator. Not relevant * in the run phase. */ const ParticleMap & localParticles() const { return theLocalParticles; } /** * Set the directory where the output files will be stored. */ void path(string f) { thePath = f; } /** * Set a pointer to the strategy object containing a set of * non-default particles to use. */ void strategy(StrategyPtr); /** * Isolate, initialize and save this generator to a file. */ string doSaveRun(string); /** * Isolate and initialize this generator. */ string doMakeRun(string); public: /** @name The following functions may be called by objects belonging to this event generator during the initialization phase (in the doinit() function). It is typically used by objects which need to introduce other Interfaced objects depending the parameters of the StandardModel object used. Note that objects which use these functions MUST override the preInitialize() function to return true, otherwize the whole initialization procedure may be corrupted. */ //@{ /** * Register a new object to be included in the run currently being * initialized. * * @param obj (pointer to) the object being registered. * * @param fullname the full name including the directory path. Note * that although the full path is given the object will not be * inserted in the Repository, but only in this current * EventGenerator. * * @return false if another object of that name already exists. */ bool preinitRegister(IPtr obj, string fullname); /** * Create a new Interfaced object to be used in the run being * initialized. * * @param classname the class name of the object being created. * * @param fullname the full name including the directory path. Note * that although the full path is given the object will not be * inserted in the Repository, but only in this current * EventGenerator. * * @param libraries an optional list of shared libraries to be * loaded to be able to create an object of the specified class. * * @return the created object if the it was successfully * created. Return null if the object could not be created or if * another object of that name already exists. */ IPtr preinitCreate(string classname, string fullname, string libraries = ""); /** * Manipulate an interface of an Interfaced object. * * @param fullname the name including the full path of an object to * be manipulated. * * @param ifcname the name of the interface to be used. * * @param cmd the operation to be performed on the interface (set or * get). * * @param value Optional value to be passed to the interface. * * @return a string containing the result of the operation. If this * string starts with "Error: " then something went wrong. */ string preinitInterface(string fullname, string ifcname, string cmd, string value); /** * Manipulate an interface of vector type (RefVector or ParVector) * of an Interfaced object. * * @param fullname the name including the full path of an object to * be manipulated. * * @param ifcname the name of the interface to be used. * * @param index the vector index corresponding to the element to be * manipulated. * * @param cmd the operation to be performed on the interface (set, * get, insert or erase). * * @param value Optional value to be passed to the interface. * * @return a string containing the result of the operation. If this * string starts with "Error: " then something went wrong. */ string preinitInterface(string fullname, string ifcname, int index, string cmd, string value); /** * Manipulate an interface of an Interfaced object. * * @param obj the object to be manipulated. * * @param ifcname the name of the interface to be used. * * @param cmd the operation to be performed on the interface (set or * get). * * @param value Optional value to be passed to the interface. * * @return a string containing the result of the operation. If this * string starts with "Error: " then something went wrong. */ string preinitInterface(IPtr obj, string ifcname, string cmd, string value); /** * Manipulate an interface of vector type (RefVector or ParVector) * of an Interfaced object. * * @param obj the object to be manipulated. * * @param ifcname the name of the interface to be used. * * @param index the vector index corresponding to the element to be * manipulated. * * @param cmd the operation to be performed on the interface (set, * get, insert or erase). * * @param value Optional value to be passed to the interface. * * @return a string containing the result of the operation. If this * string starts with "Error: " then something went wrong. */ string preinitInterface(IPtr obj, string ifcname, int index, string cmd, string value); /** * Remove the object */ bool preinitRemove(IPtr obj); /** * Find a decaymode given a decay \a tag. * @return null if no decay mode was found. */ tDMPtr findDecayMode(string tag) const; /** * Create a decay mode according to the given tag. * @return null if no decay mode could be created. */ tDMPtr preinitCreateDecayMode(string tag); /** * Find a particle in this run, using its PDG name. * @return null if no particle is found. */ tPDPtr findParticle(string pdgname) const; /** * Find a matcher in this run given its \a name. * @return null if no mather is found. */ tPMPtr findMatcher(string name) const; private: /** * Used internally by preinitCreateDecayMode(); */ DMPtr constructDecayMode(string & tag); //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); /** * The global libraries needed for objects used in this EventGenerator. */ const vector & globalLibraries() const { return theGlobalLibraries; } //@} /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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(); /** * Additional things to do at the very end after the (do)finish(), * such as closing output files etc. */ void finally(); //@} /** * Return the set of all objects to be used in this run. */ ObjectSet & objects() { return theObjects; } /** * Return the map of all objects to be used in this run indexed by * their name. */ ObjectMap & objectMap() { return theObjectMap; } /** * Print out the .tex file with descriptions of and references to * all models used in the run. */ void generateReferences(); /** * Increase and return the count for the given exception. */ int count(const Exception &); private: /** * A vector of default objects. */ vector theDefaultObjects; /** * Map of non-default particles used in this EventGenerator. */ ParticleMap theLocalParticles; /** * Pointer to an object containing standard model parameters. */ SMPtr theStandardModel; /** * Pointer to a strategy object with other non-default particles to * be used in this EventGenerator. */ StrategyPtr theStrategy; /** * Pointer to the default RandomGenerator to be used in this run. */ RanGenPtr theRandom; /** * Pointer to the event handler used to generate the indivudual * events. */ EHPtr theEventHandler; /** * A vector of all analysis handlers to be called after each event. */ AnalysisVector theAnalysisHandlers; /** * A pointer to an associated factory objects for handling * histograms to be used by AnalysisHandlers. */ HistFacPtr theHistogramFactory; /** * A pointer to an optional event manipulator object. */ EvtManipPtr theEventManipulator; /** * The directory where the input and output files resides. */ string thePath; /** * The name of this run. */ string theRunName; /** * A reference to the output file stream. */ ofstream theOutfile; /** * A reference to the log file stream. */ ofstream theLogfile; /** * A reference to the reference file stream. */ ofstream theReffile; /** * A stream to be used to redirect cout for external modules which * prints out messages there. The output will instead be appended to * the log() stream at the end of the run. */ ostringstream theMiscStream; /** * A string stream used as a buffer for messages written to the .out * file. The .out file should in rinciple only be written to in the * end of a run, during the finish() phase, but if anything is * written before that, it will be cashed in this string stream * before written out properly in the end of the run. */ ostringstream theOutStream; /** * Remember the name of the file where the output should be * sent. This is set int openOutputFiles(). */ string theOutFileName; /** * Number of events to be generated in this run. */ long theNumberOfEvents; /** * The set of all objects to be used in this run. */ ObjectSet theObjects; /** * All objects to be used in this run mapped to their name. */ ObjectMap theObjectMap; /** * The map of all particles to be used in this run, indexed by the * id number. */ ParticleMap theParticles; /** * A vector of particles indexed by the id number for quick access. * Only particles with id number less than theQuickSize are * available. */ PDVector theQuickParticles; /** * Only particles with id number less than theQuickSize are * available in theQuickParticles. */ long theQuickSize; /** * A flag to tell if we are in the pre-initialization phase where * objects with preInitialize() functions returning true are * initialized before others. */ bool preinitializing; /** * The set of all matchers to be used in this run. */ MatcherSet theMatchers; /** * The set of objects which have actually been used in this run. */ ObjectSet usedObjects; protected: /** * The current event number; */ long ieve; /** * The sum of the weights of the events produced so far. */ double weightSum; /** * The debug level. */ int theDebugLevel; private: /** * List all modified interfaces in the log file. If positive always * do this, if negative never do it. If zero, only do it if * debugging is turned on. */ int logNonDefault; /** * If the debug level is higher than 0, print the first 'printEvent' * events to the logfile. */ int printEvent; /** * If the debug level is higher than 0, dump the complete state of * this run to the default dump file every 'dumpPeriod' events. * If 'dumpPeriod' is -1, dumping is disabled completely, * even when runs are aborted. */ long dumpPeriod; /** * If this flag is true, keep all dump files of the run, * labelled by event number. */ bool keepAllDumps; /** * If the debug level is higher than 0, step up to the highest debug * level just before the event with number debugEvent is performed. */ long debugEvent; /** * The maximum number of warnings reported of each type. If more * than maxWarnings warnings of one type is issued, the generation * will continue without reporting this warning. */ int maxWarnings; /** * The maximum number of warnings and errors reported of each * type. If more than maxErrors errors is reported for one type the * run will be aborted. Disable the check by setting to -1. */ int maxErrors; /** * A map of all Exceptions which have been caught by the event * generator and the number of time each exception type has been * caught. */ ExceptionMap theExceptions; private: /** * Utility function for the interface. */ void setLocalParticles(PDPtr pd, int); /** * Utility function for the interface. */ void insLocalParticles(PDPtr pd, int); /** * Utility function for the interface. */ void delLocalParticles(int place); /** * Utility function for the interface. */ vector getLocalParticles() const; /** * Utility function for the interface. */ void setPath(string newPath); /** * Utility function for the interface. */ string defPath() const; /** * The UseRandom object constructed for the duration of an * EventGenerator run so that the default random number generator * always can be accessed through the static methods of the * UseRandom class. */ UseRandom * theCurrentRandom; /** * The CurrentGenerator object constructed for the duration of an * EventGenerator run so that the default event generator always can * be accessed through the static methods of the CurrentGenerator * class. */ CurrentGenerator * theCurrentGenerator; /** * The currently active EventHandler. */ tEHPtr theCurrentEventHandler; /** * The currently active step handler. */ tStepHdlPtr theCurrentStepHandler; /** * Whether to use files or stdout for logging and output. */ bool useStdout; /** * Whether to use a modified event number count. */ bool theIntermediateOutput; /** * The global libraries needed for objects used in this EventGenerator. */ vector theGlobalLibraries; private: /** * Describe an abstract class with persistent data. */ static ClassDescription initEventGenerator; /** * Private and non-existent assignment operator. */ - EventGenerator & operator=(const EventGenerator &); + EventGenerator & operator=(const EventGenerator &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of EventGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of EventGenerator. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * EventGenerator class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::EventGenerator"; } }; /** @endcond */ } #ifndef ThePEG_TEMPLATES_IN_CC_FILE #include "EventGenerator.tcc" #endif #endif /* ThePEG_EventGenerator_H */ diff --git a/Repository/Main.h b/Repository/Main.h --- a/Repository/Main.h +++ b/Repository/Main.h @@ -1,139 +1,139 @@ // -*- C++ -*- // // Main.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Main_H #define THEPEG_Main_H // This is the declaration of the Main class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Repository/EventGenerator.h" namespace ThePEG { /** * This is a base class for classes implementing a main steering * routine for running an EventGenerator, in case the standard * 'go()' function in the EventGenerator is not enough. An example * is a EventGenerator where the class deriving from Main specifies an * initial set of partons which should be cascaded and hadronized etc. * * The derived class will be dynamically loaded by the standard * runThePEG program and the static Init() function will * be run. The loaded EventGenerator will then be available in the * static eventGenerator() function. In addition the number of events * requested from the command line will be available from the N() * function. All other command-line arguments will be available from * the arguments() function. * * @see EventGenerator */ class Main: public Base { public: /** * Set the global event generator. */ static void eventGenerator(tEGPtr eg) { theEventGenerator = eg; } /** * Get the global event generator. */ static tEGPtr eventGenerator() { return theEventGenerator; } /** * Set the number of events requested. */ static void N(long n) { theN = n; } /** * Get the number of events requested. */ static long N() { return theN; } /** * Set the command-line arguments. */ static void arguments(const vector & args) { theArguments = args; } /** * Get the command-line arguments. */ static const vector & arguments() { return theArguments; } public: /** * Standard Init function used to initialize the interfaces. */ static void Init() {} private: /** * The global event generator. */ static EGPtr theEventGenerator; /** * The number of events requested. */ static long theN; /** * The command-line arguments. */ static vector theArguments; private: /** * Describe an abstract base class without persistent data. */ static AbstractNoPIOClassDescription
initMain; /** * Private and non-existent assignment operator. */ - Main & operator=(const Main &); + Main & operator=(const Main &) = delete; }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of Main. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Main. */ typedef int NthBase; }; /** This template specialization informs ThePEG about the name of the * Main class. */ template <> struct ClassTraits
: public ClassTraitsBase
{ /** Return a platform-independent class name */ static string className() { return "ThePEG::Main"; } }; /** @endcond */ } #endif /* THEPEG_Main_H */ diff --git a/Repository/MultiEventGenerator.h b/Repository/MultiEventGenerator.h --- a/Repository/MultiEventGenerator.h +++ b/Repository/MultiEventGenerator.h @@ -1,265 +1,265 @@ // -*- C++ -*- // // MultiEventGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_MultiEventGenerator_H #define ThePEG_MultiEventGenerator_H // This is the declaration of the MultiEventGenerator class. #include "EventGenerator.h" namespace ThePEG { /** * The MultiEventGenerator class is derived from the * EventGenerator class and is capable of making several runs with * a pre-defined set of parameter and switch values. * * With the Command interface AddInterface set of * parameters for an included object can be specified as eg. * object:interface arg1, arg2, arg3 .... The event * generator will then be run once with the specified objects * interface set to arg1, then once with * arg2 etc. If several AddInterface commands are given * the event generator will be run once for each possible combination * arguments to object interfaces. * * @see EventGenerator * */ class MultiEventGenerator: public EventGenerator { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ MultiEventGenerator(): firstSubrun(0), lastSubrun(0) {} /** * Destructor. */ virtual ~MultiEventGenerator(); //@} /** * Append a tag to the run name. Derived classes may put special * meaning to the tags. In this case a tag on the form #n will * select only subrun number n, while #n-m will select subruns n * through m. */ virtual void addTag(string tag); protected: /** @name Public virtual functions required by the base class. */ //@{ /** * Run this EventGenerator session. Is called from * EventGenerator::go(long,long,bool). */ virtual void doGo(long next, long maxevent, bool tics); //@} /** @name Functions used by the Command interfaces to set up the different parameters of the runs. */ //@{ /** * Used to add an interface of an object which should be used with a * set of different values. The argument should be given as * "object:interface arg1, arg2, ..." */ string addInterface(string); /** * Used to add an interface of an object a random value each * run. The argument should be given as "object:interface N min max * mean width" */ string addRndInterface(string); /** * Helper function for addInterface(string) and addRndInterface(string). */ string addInterface(string, bool rnd); /** * Used to remove an interface of an object which should be used * with a set of different values. The argument should be given as * "object:interface arg1, arg2, ..." */ string removeInterface(string); //@} /** * return a header for this sub-run. */ string heading(long, const vector &, string) const; /** * A separate random number generator to be used for generating * random parameter values (to ensure reproducable sequences). */ RandomGenerator & randomArg() const { return theSeparateRandom? *theSeparateRandom: random(); } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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: /** @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: /** A vector of character strings. */ typedef vector StringVector; /** * The objects for which there are different interface settings. */ IVector theObjects; /** * The interfaces to be modified for the corresponding objects in * theObjects. */ StringVector theInterfaces; /** * If the there are positional arguments to theInterfaces these are * specified here. */ StringVector thePosArgs; /** * The arguments to be used for each of theInterfaces. */ vector theValues; /** * If non zero, the first subrun to be considered. */ int firstSubrun; /** * If non zero, the last subrun to be considered. */ int lastSubrun; /** * A separate random number generator to be used for generating * random parameter values (to ensure reproducable sequences). */ RanGenPtr theSeparateRandom; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initMultiEventGenerator; /** * Private and non-existent assignment operator. */ - MultiEventGenerator & operator=(const MultiEventGenerator &); + MultiEventGenerator & operator=(const MultiEventGenerator &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of MultiEventGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of MultiEventGenerator. */ typedef EventGenerator NthBase; }; /** This template specialization informs ThePEG about the name of the * MultiEventGenerator class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::MultiEventGenerator"; } /** Return the name of the shared library be loaded to get access to * the MultiEventGenerator class and every other class it uses * (except the base class). */ static string library() { return "MultiEventGenerator.so"; } }; /** @endcond */ } #endif /* ThePEG_MultiEventGenerator_H */ diff --git a/Repository/RandomGenerator.h b/Repository/RandomGenerator.h --- a/Repository/RandomGenerator.h +++ b/Repository/RandomGenerator.h @@ -1,491 +1,491 @@ // -*- C++ -*- // // RandomGenerator.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_RandomGenerator_H #define ThePEG_RandomGenerator_H // This is the declaration of the RandomGenerator class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/Interface/Interfaced.h" #include "gsl/gsl_rng.h" namespace ThePEG { /** * RandomGenerator is an interface to the CLHEP::RandomEngine * classes. To avoid excessive virtual function calls, the * RandomGenerator caches random numbers generated by the engine which * are then retrieved by the non-virtual inlined rnd() method. * * Sub-classes of RandomGenerator should be used to * implement a particular random engine. * * RandomGenerator only provides a flat distribution between 0 and * 1. Any other distribution can be achieved using the CLHEP random * classes using the engine returned from the randomGenerator() * method. * * @see \ref RandomGeneratorInterfaces "The interfaces" * defined for RandomGenerator. * @see UseRandom */ class RandomGenerator: public Interfaced { public: /** A vector of doubles. */ typedef vector RndVector; /** The size_type of RndVector. */ typedef RndVector::size_type size_type; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ RandomGenerator(); /** * Copy-constructor. */ RandomGenerator(const RandomGenerator &); /** * Destructor. */ virtual ~RandomGenerator(); //@} /** * Reset the underlying random engine with the given \a seed. If the * \a seed is set to -1 a standard seed will be used. */ virtual void setSeed(long seed) = 0; /** @name Functions to return random numbers. */ //@{ /** * Return a (possibly cached) flat random number in the interval * \f$]0,1[\f$. */ double rnd() { if ( nextNumber == theNumbers.end() ) fill(); return *nextNumber++; } /** * Return a flat random number in the interval * \f$]0,b[\f$. */ template Unit rnd(Unit b) { return b*rnd(); } /** * Return a flat random number in the interval * \f$]a,b[\f$. */ template Unit rnd(Unit a, Unit b) { return a + rnd(b - a); } /** * Return \a n flat random number in the interval * \f$]0,1[\f$. */ RndVector rndvec(int n) { RndVector ret(n); for ( int i = 0; i < n; ++i ) ret[i] = rnd(); return ret; } /** * Return a (possibly cached) flat random number in the interval * \f$]0,1[\f$. */ double operator()() { return rnd(); } /** * Return a (possibly cached) flat integer random number in the * interval \f$[0,N[\f$. * Function was introduced since otherwise operator()() is used if a double is given * resulting in a \f$]0,1[\f$ distribution. */ double operator()(double N) { return double(rnd() * N); } /** * Return a (possibly cached) flat integer random number in the * interval \f$[0,N[\f$. */ long operator()(long N) { return long(rnd() * N); } /** * Return a true with probability \a p. Uses rnd(). */ bool rndbool(double p = 0.5) { return rnd() < p; } /** * Return a true with probability \a p. Uses rnd(). Also uses * push_back(double). */ bool prndbool(double p = 0.5); /** * Return a true with probability \a p1/(\a p1+\a p2). Uses * rnd(). */ bool rndbool(double p1, double p2) { return rndbool(p1/(p1 + p2)); } /** * Return a true with probability \a p1/(\a p1+\a p2). Uses * rnd(). Also uses push_back(double). */ bool prndbool(double p1, double p2) { return prndbool(p1/(p1 + p2)); } /** * Return -1, 0, or 1 with relative probabilities \a p1, \a p2, \a * p3. Uses rnd(). */ int rndsign(double p1, double p2, double p3); /** * Return -1, 0, or 1 with relative probabilities \a p1, \a p2, \a * p3. Uses rnd(). Also uses push_back(double). */ int prndsign(double p1, double p2, double p3); /** * Return an integer \f$i\f$ with probability p\f$i\f$/(\a p0+\a * p1). Uses rnd(). */ int rnd2(double p0, double p1) { return rndbool(p0, p1)? 0: 1; } /** * Return an integer \f$i\f$ with probability p\f$i\f$/(\a p0+\a * p1+\a p2). Uses rnd(). */ int rnd3(double p0, double p1, double p2) { return 1 + rndsign(p0, p1, p2); } /** * Return an integer/ \f$i\f$ with probability p\f$i\f$(\a p0+\a * p1+\a p2+\a p3). Uses rnd(). */ int rnd4(double p0, double p1, double p2, double p3); /** * Return a number between zero and infinity, distributed according * to \f$e^-x\f$. */ double rndExp() { return -log(rnd()); } /** * Return a number between zero and infinity, distributed according * to \f$e^-{x/\mu}\f$ where \f$\mu\f$ is the \a mean value. */ template Unit rndExp(Unit mean) { return mean*rndExp(); } /** * Return two numbers distributed according to a Gaussian distribution * with zero mean and unit variance. * * @param[out] First random number * @param[out] Second random number */ void rndGaussTwoNumbers(double & randomNumberOne, double & randomNumberTwo) { double r = sqrt(-2.0*log(rnd())); double phi = rnd()*2.0*Constants::pi; randomNumberOne = r*sin(phi); randomNumberTwo = r*cos(phi); } /** * Return a number distributed according to a Gaussian distribution * with zero mean and unit variance. * A second number is cached and returned the next time. * This function calls the rndGaussTwoNumbers function which returns two numbers at once. */ double rndGauss() { if ( gaussSaved ) { gaussSaved = false; return savedGauss; } double randomNumberOne, randomNumberTwo; rndGaussTwoNumbers(randomNumberOne, randomNumberTwo); savedGauss = randomNumberTwo; gaussSaved = true; return randomNumberOne; } /** * Return a number distributed according to a Gaussian distribution * with a given standard deviation, \a sigma, and a given \a mean. */ template Unit rndGauss(Unit sigma, Unit mean = Unit()) { return mean + sigma*rndGauss(); } /** * Return two numbers distributed according to a Gaussian distribution * with a given standard deviation, \a sigma, and a given \a mean. */ template void rndGaussTwoNumbers(Unit & randomNumberOne, Unit & randomNumberTwo, Unit sigma, Unit mean = Unit()) { double r1,r2; rndGaussTwoNumbers(r1,r2); randomNumberOne = mean + sigma * r1; randomNumberTwo = mean + sigma * r2; } /** * Return a positive number distributed according to a * non-relativistic Breit-Wigner with a given width, \a gamma, and a * given \a mean. */ template Unit rndBW(Unit mean, Unit gamma) { if ( gamma <= Unit() ) return mean; return mean + 0.5*gamma*tan(rnd(atan(-2.0*mean/gamma), Constants::pi/2)); } /** * Return a positive number distributed according to a * non-relativistic Breit-Wigner with a given width, \a gamma, and a * given \a mean. The distribution is cut-off so that the number is * between \a mean - \a cut and \a mean + \a cut */ template Unit rndBW(Unit mean, Unit gamma, Unit cut) { if ( gamma <= Unit() || cut <= Unit() ) return mean; return mean + 0.5*gamma*tan(rnd(atan(-2.0*min(mean,cut)/gamma), atan(2.0*cut/gamma))); } /** * Return a positive number distributed according to a relativistic * Breit-Wigner with a given width, \a gamma, and a given \a mean. */ template Unit rndRelBW(Unit mean, Unit gamma) { if ( gamma <= Unit() ) return mean; return sqrt(sqr(mean) + mean*gamma*tan(rnd(atan(-mean/gamma), Constants::pi/2))); } /** * Return a positive number distributed according to a relativistic * Breit-Wigner with a given width, \a gamma, and a given \a * mean. The distribution is cut-off so that the number is between * \a mean - \a cut and \a mean + \a cut */ template Unit rndRelBW(Unit mean, Unit gamma, Unit cut) { if ( gamma <= Unit() || cut <= Unit() ) return mean; double minarg = cut > mean? -mean/gamma: (sqr(mean - cut) - sqr(mean))/(gamma*mean); double maxarg = (sqr(mean + cut) - sqr(mean))/(mean*gamma); return sqrt(sqr(mean) + mean*gamma*tan(rnd(atan(minarg), atan(maxarg)))); } /** * Return a non-negative number generated according to a Poissonian * distribution with a given \a mean. Warning: the method * implemented is very slow for large mean and large return * values. For this reason the maximum return value is given by \a * nmax. */ long rndPoisson(double mean); //@} /** @name Access the cached random numbers from the underlying engine. */ //@{ /** * Give back a partly unused random number. This is typically used * when generating integral random numbers. In eg. rndbool(double p) * a random number r is drawn and if it is less than * p true is returned, but r is still a * good random number in the interval ]0,p[. Hence * r/p is still a good random number in the interval * ]0,1[ and this is then pushed back into the cache * and is used by the next call to rnd(). Note that the resulting * random number is of lesser quality, and successive calls to * push_back() should be avoided. To ensure a highest quality random * number random number in the next call to rnd(), pop_back() should * be used. */ void push_back(double r) { if ( r > 0.0 && r < 1.0 && nextNumber != theNumbers.begin() ) *--nextNumber = r; } /** * Discard the next random number in the cache. */ void pop_back() { if ( nextNumber != theNumbers.end() ) ++nextNumber; } /** * Discard all random numbers in the cache. Typically used after the * internal random engine has been reinitialized for some reason. */ void flush() { nextNumber = theNumbers.end(); gaussSaved = false; } /** * Generate n random numbers between 0 and 1 and put them in the * output iterator. */ template void rnd(OutputIterator o, size_type n) { while ( n-- ) *o++ = rnd(); } //@} protected: /** * Initializes this random generator. This should be done first of * all before the initialization of any other object associated with * an event generator. */ virtual void doinit(); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); /** * Return a gsl_rng interface to this random generator. */ gsl_rng * getGslInterface() { return gsl; } protected: /** * Utility function for the interface. */ void setSize(size_type newSize); /** * Fill the cache with random numbers. */ virtual void fill() = 0; /** * A vector of cached numbers. */ RndVector theNumbers; /** * Iterator pointing to the next number to be extracted */ RndVector::iterator nextNumber; /** * The size of the cache. */ size_type theSize; /** * The seed to initialize the random generator with. */ long theSeed; /** * A saved Gaussian random number. */ mutable double savedGauss; /** * Indicate the precense of a saved Gaussian random number. */ mutable bool gaussSaved; /** * A pinter to a gsl_rng interface to this generator. */ gsl_rng * gsl; private: /** * Describe a concrete class with persistent data. Note that the * class should in principle be abstract. */ static ClassDescription initRandomGenerator; /** * Private and non-existent assignment operator. */ - RandomGenerator & operator=(const RandomGenerator &); + RandomGenerator & operator=(const RandomGenerator &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of RandomGenerator. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of RandomGenerator. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * RandomGenerator class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::RandomGenerator"; } /** This class should in principle be abstract, therefore the create() method will throw a std::logic_error if called. */ static TPtr create() { throw std::logic_error("Tried to instantiate abstract class" "'Pythis7::RandomGenerator'"); } }; /** @endcond */ } #endif /* ThePEG_RandomGenerator_H */ diff --git a/Repository/Repository.h b/Repository/Repository.h --- a/Repository/Repository.h +++ b/Repository/Repository.h @@ -1,343 +1,343 @@ // -*- C++ -*- // // Repository.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Repository_H #define ThePEG_Repository_H // This is the declaration of the Repository class. #include "ThePEG/Config/ThePEG.h" #include "BaseRepository.h" #include "EventGenerator.h" #include "ThePEG/PDT/ParticleData.h" #include "ThePEG/PDT/MatcherBase.h" namespace ThePEG { /** * Repository inherits from the BaseRepository class. While * BaseRepository is fairly general and could in principle be used for * any program where sets of InterfacedBase objects are managed, the * Repository is ThePEG specific in that it deals with ParticleData, * ParticleMatchers and EventGenerators. * * One main function is to write an EventGenerator to disk using * saveRun(). Here all objects needed for the run, including the * EventGenerator is cloned and isolated from the other objects in the * Repository (and are hence not handled by the Repository anymore) * before they are all persistently written out to disk. * * The Register() function simply pass the objects to the corresonding * method in BaseRepository, but if the object is a ParticleData or a * ParticleMatcher, they are stored separately. * * @see BaseRepository * @see InterfacedBase * @see ParticleData * @see ParticleMatcher * @see EventGenerator * */ class Repository: public BaseRepository { public: /** A map of EventGenerator objects indexed by their run name. */ typedef map GeneratorMap; public: /** @name Standsrd constructors and destructors */ //@{ /** * The default constructor is the only one that should be used. */ Repository(); /** * The destructor will do some clean-up when the last Repository is * deleted. */ ~Repository(); public: /** @name Functions for register objects in the Repository. */ //@{ /** * Register an object with BaseRepository::Register() and add it to * the list of particles or matchers if of any of those * types. */ static void Register(IBPtr); /** * Register an object with BaseRepository::Register() and add it to * the list of particles or matchers if of any of those * types. */ static void Register(IBPtr, string newName); //@} /** @name Access ParticleData and MatcherBase objects in the Repository. */ //@{ /** * Add a particle to the list of default ones. If one of the same * type alredy existed, it is removed from the list (but not from * the repository). */ static void defaultParticle(tPDPtr); /** * Get a pointer to the default particle of the given type or * generic name. */ static PDPtr defaultParticle(PID id); /** * Get a pointer to a particle based on the given path or name. The * argument is first treated as a path to an object. If no such * particle object is found, the argument is treated as a generic * particle PDGName and is searched for among the default set of * particles. */ static tPDPtr findParticle(string name); /** * Return the set of all particles in the repository. */ static const ParticleDataSet & allParticles() { return particles(); } /** * Return the set of all matchers in the repository. */ static const MatcherSet & allMatchers() { return matchers(); } /** * Find a matcher with a given generic name */ static tPMPtr findMatcher(string name); /** * Special function for copying particles. Also corresponding * anti-particle is copied to the same directory. In addition, their * decay modes are copied. */ static string copyParticle(tPDPtr, string); //@} /** @name Functions to isolate Eventgenerator objects. */ //@{ /** * Isolate an event generator, \a eg, and save it to disk in a file * named \a name (with .run appended. */ static EGPtr makeRun(tEGPtr eg, string name); /** * Isolate an event generatorn, named \a EGname, set its run \a name * and save it to a file named \a filename. */ static void saveRun(string EGname, string name, string filename); //@} /** @name I/O functions for the Repository. */ //@{ /** * Load a whole repository from the given file. All objects * previously in the Repository are discarded. Any errors will be * reported in the returned string. */ static string load(string filename); /** * Save the repository to the given file. */ static void save(string filename); /** * Save the repository to the default file. */ static void save() { save(currentFileName()); } /** * Write some statistics about the repository to the standard output. */ static void stats(ostream &); //@} /** @name Command-line interface functions. */ //@{ /** * Print out a help message. Extended text for a specific command if given. */ static void help(string command, ostream & os); /** * Remove the given object from the repository. If the object was * not present nothing will happen. */ static void remove(tIBPtr); /** * Remove objects. Remove the objects in \a rmset if there are no * other objects in the repository referring to them, otherwise * return an error message and the names of the objects refering to * them separated by new-line characters. */ static string remove(const ObjectSet & rmset); /** * Read commands from a stream and send them one by one to exec(). * * @param is the stream from which to read commands. * @param os the stream where output is written. * @param prompt before reading a command from \a is, this string is * written to \a os. */ static void read(istream & is, ostream & os, string prompt = ""); /** * Read commands from a file and send them one by one to exec(). * * Passes the call through to read(istream, ostream), but also sets * currentReadDirStack() correctly. * * Returns possible messages. * * @param filename the file from which to read commands. * @param os the stream where output is written. */ static string read(string filename, ostream & os); /** * Interpret the command in \a cmd and return possible * messages. This is the main function for the command-line * interface. The syntax is described elsewhere. The ostream * argument is currently unused. */ static string exec(string cmd, ostream &); /** * Insert the given EventGenerator and its dependent Interfaced * objects into the repository and read commands to modify its * interfaces. Any line accepted by the command-line interface will * be executed, but the main purpose of this function is to modify * an already saved and initialized EventGenerator before running * without re-initializing. If an interface which does not have the * dependencySafe() flag set, a warning will be emitted. */ static string modifyEventGenerator(EventGenerator & eg, string filename, ostream & os, bool initOnly = false); /** * Reset the given EventGenerator; equivalent to * modifyEventGenerator without reading an input file. */ static void resetEventGenerator(EventGenerator & eg); //@} /** * Return the version number of ThePEG. */ static string version(); /** * Return a string with a ThePEG banner. */ static string banner(); private: /** * Used by Register. */ static void registerParticle(tPDPtr); /** * Used by Register. */ static void registerMatcher(tPMPtr); /** * Used by read() */ static void execAndCheckReply(string, ostream &); protected: /** @name Functions containing the static instances of objects used by the repository. */ //@{ /** * The set of default particles. */ static ParticleMap & defaultParticles(); /** * The set of all particles. */ static ParticleDataSet & particles(); /** * The set of all matchers. */ static MatcherSet & matchers(); /** * All isolated generators mapped to their run name. */ static GeneratorMap & generators(); /** * The default file name used by save(). */ static string & currentFileName(); public: /** * If non-zero the setup program will exit with this error code as * soon as an error is encountered. */ static int & exitOnError(); /** * Call this function to clean up the repository at the end of your * program if you are using the static functions directly without * going through a Repository object. There, the destructor would do * the job. */ static void cleanup(); //@} private: /** * It makes no sense to copy a Repository, so this constructor is * not implemented */ Repository(const Repository &); /** * It makes no sense to copy a Repository, so this assignment is * not implemented */ - Repository & operator=(const Repository &); + Repository & operator=(const Repository &) = delete; /** * Count the number of repositorys instantiated. */ static int ninstances; }; } #endif /* ThePEG_Repository_H */ diff --git a/Repository/StandardRandom.h b/Repository/StandardRandom.h --- a/Repository/StandardRandom.h +++ b/Repository/StandardRandom.h @@ -1,162 +1,162 @@ // -*- C++ -*- // // StandardRandom.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_StandardRandom_H #define ThePEG_StandardRandom_H // This is the declaration of the StandardRandom class. #include "RandomGenerator.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" namespace ThePEG { /** * StandardRandom inherits from the RandomGenerator class and is an * interface to the CLHEP::JamesRandom engine class. * * @see \ref StandardRandomInterfaces "The interfaces" * defined for StandardRandom. */ class StandardRandom: public RandomGenerator { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ StandardRandom() : u() { if ( theSeed != 0 ) setSeed(theSeed); } //@} public: /** * Reset the underlying random algorithm with the given seed. If the * \a seed is set to -1 a standard seed will be used. */ virtual void setSeed(long seed); protected: /** * Fill the cache with random numbers. */ virtual void fill(); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 internal state vector. */ array u; /** * Parameter for the internal state. */ double c; /** * Parameter for the internal state. */ double cd; /** * Parameter for the internal state. */ double cm; /** * Index for the internal state. */ int i97; /** * Index for the internal state. */ int j97; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initStandardRandom; /** * Private and non-existent assignment operator. */ - StandardRandom & operator=(const StandardRandom &); + StandardRandom & operator=(const StandardRandom &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of StandardRandom. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of StandardRandom. */ typedef RandomGenerator NthBase; }; /** This template specialization informs ThePEG about the name of the * StandardRandom class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::StandardRandom"; } }; /** @endcond */ } #endif /* ThePEG_StandardRandom_H */ diff --git a/Repository/Strategy.h b/Repository/Strategy.h --- a/Repository/Strategy.h +++ b/Repository/Strategy.h @@ -1,242 +1,242 @@ // -*- C++ -*- // // Strategy.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Strategy_H #define ThePEG_Strategy_H // This is the declaration of the Strategy class. #include "ThePEG/Config/ThePEG.h" #include "Strategy.fh" #include "ThePEG/Interface/Interfaced.h" namespace ThePEG { /** * The Strategy class represents a general strategy to be assigned to * an EventGenerator. It contains a set of default ParticleData * objects which takes presedence over the ones in the Repository * (although not over the ones in the EventGenerator). It also * contains a set of other default objects which are automatically * assigned to all Reference and RefVector interfaces which have the * InterfaceBase::defaultIfNull() flag set. In this case each of the * objects in defaultObjects() are tested in turn, and the first * object which has the correct class and can be set will be used. * * Sub-classes may implement other behaviors by overriding the * doinit() function. * * @see \ref StrategyInterfaces "The interfaces" * defined for Strategy. * @see EventGenerator * @see ParticleData * @see Repository * @see Reference * */ class Strategy: public Interfaced { public: /** @name Access the special objects in this Strategy. */ //@{ /** * Return the map of local particles indexed by their PDG id number. */ const ParticleMap & particles() const { return theParticles; } /** * A directory in the repository which will be scanned for particles * which will be included as default particles in a run. These * particles will be overridden by particles specified in * LocalParticles and default particles * specified directly in the EventGenerator. */ string localParticlesDir() const; /** * By default all particles in the Repository are included in a run, * although only one particle per PDG id number. If directories are * listed here, only particles in these will be considered for * inclusion in a run. Only particles which have a PDG id which is * not given by particles in localParticlesDir(), particles(), or in * EventGenerator::localParticles() will be considered. */ const vector & defaultParticlesDirs() const { return theDefaultParticlesDirs; } /** * Return the vector of default objects. */ const vector & defaultObjects() const { return theDefaultObjects; } //@} /** * Return a freeform version string. Client code should not rely on the * string's format. It can be used e.g. to annotate plots. */ virtual const string versionstring() const { return ""; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Return the map of local particles. */ ParticleMap & particles() { return theParticles; } private: /** * the map of default particles. */ ParticleMap theParticles; /** * A directory in the repository which will be scanned for particles * which will be included as default particles in a run. These * particles will be overridden by particles specified in * LocalParticles and default particles * specified directly in the EventGenerator. */ string theLocalParticlesDir; /** * A vector of default objects. */ vector theDefaultObjects; /** * By default all particles in the Repository are included in a run, * although only one particle per PDG id number. If directories are * listed in theDefaultParticlesDirs, only particles in these will * be considered for inclusion in a run. Only particles which have a * PDG id which is not given by particles in localParticlesDir(), * particles(), or in EventGenerator::localParticles() will be * considered. */ vector theDefaultParticlesDirs; private: /** * Utility function used by the interface. */ void setLocalParticles(PDPtr pd, int); /** * Utility function used by the interface. */ void insLocalParticles(PDPtr pd, int); /** * Utility function used by the interface. */ void delLocalParticles(int place); /** * Utility function used by the interface. */ vector getLocalParticles() const; /** * Utility function used by the interface. */ void setLocalParticlesDir(string); /** * Utility function used by the interface. */ void setDefaultParticlesDirs(string,int); /** * Utility function used by the interface. */ void insDefaultParticlesDirs(string,int); /** * Utility function used by the interface. */ static bool checkDir(string); private: /** * Describe a concrete class with persistent data. */ static ClassDescription initStrategy; /** * Private and non-existent assignment operator. */ - Strategy & operator=(const Strategy &); + Strategy & operator=(const Strategy &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of Strategy. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of Strategy. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * Strategy class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::Strategy"; } }; /** @endcond */ } #endif /* ThePEG_Strategy_H */ diff --git a/Repository/ThePEGStrategy.h b/Repository/ThePEGStrategy.h --- a/Repository/ThePEGStrategy.h +++ b/Repository/ThePEGStrategy.h @@ -1,99 +1,99 @@ // -*- C++ -*- // // ThePEGStrategy.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ThePEGStrategy_H #define ThePEG_ThePEGStrategy_H // This is the declaration of the ThePEGStrategy class. #include "ThePEG/Repository/Strategy.h" #include namespace ThePEG { /** * The ThePEGStrategy class is a sub-class of the Strategy class, * simply implementing the correct citation for ThePEG in the * ClassDocumentation interface. * * @see Strategy * */ class ThePEGStrategy: public Strategy { public: /** * Standard Init function used to initialize the interface. */ static void Init(); /** * 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: /** * Describe concrete class without persistent data. */ static NoPIOClassDescription initThePEGStrategy; /** * Private and non-existent assignment operator. */ - ThePEGStrategy & operator=(const ThePEGStrategy &); + ThePEGStrategy & operator=(const ThePEGStrategy &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of ThePEGStrategy. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of ThePEGStrategy. */ typedef Strategy NthBase; }; /** This template specialization informs ThePEG about the name of the * ThePEGStrategy class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::ThePEGStrategy"; } /** Return the name of the shared library be loaded to get access to * the ThePEGStrategy class and every other class it uses * (except the base class). */ static string library() { return "ThePEGStrategy.so"; } }; /** @endcond */ } #endif /* ThePEG_ThePEGStrategy_H */ diff --git a/Repository/UseRandom.h b/Repository/UseRandom.h --- a/Repository/UseRandom.h +++ b/Repository/UseRandom.h @@ -1,289 +1,289 @@ // -*- C++ -*- // // UseRandom.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_UseRandom_H #define ThePEG_UseRandom_H // This is the declaration of the UseRandom class. #include "ThePEG/Repository/RandomGenerator.h" namespace ThePEG { /** * This UseRandom class keeps a static stack of RandomGenerator * objects which can be used anywhere by any class. When an * EventGenerator is initialized or run it adds a RandomGenerator * object to the stack which can be used by any other object being * initialized or run through the static functions of the UseRandom * class. If someone needs to use an alternative RandomGenerator * object a new UseRandom object can be constructed with a pointer to * the desired RandomGenerator object as argument and that object will * the be used by the static UseRandom functions until the UseRandom * object is destructed. * * @see RandomGenerator * @see EventGenerator * */ class UseRandom { public: /** * Default constructor does nothing. */ UseRandom() : randomPushed(false) {} /** * Copy-constructor does nothing. */ UseRandom(const UseRandom &) : randomPushed(false) {} /** * Construct a new object specifying a new RandomGenerator, \a r, to * be used during this objects lifetime */ UseRandom(const RanGenPtr & r) : randomPushed(false) { if ( r ) { theRandomStack.push_back(r); randomPushed = true; } } /** * The destructor removing the RandomGenerator specified in the * constructor from the stack. */ ~UseRandom() { if ( randomPushed ) theRandomStack.pop_back(); } public: /** * Return a reference to the currently chosen RandomGenerator object. */ static RandomGenerator & current() { return *theRandomStack.back(); } /** * Return a pointer to the currently chosen RandomGenerator object. */ // static RandomEngine * currentEngine() { // return &(current().randomGenerator()); // } /** * Return a simple flat random number (from the current * RandomGenerator object) in the range ]0,1[. */ static double rnd() { return current().rnd(); } /** * Return \a n simple flat random number (from the current * RandomGenerator object) in the range ]0,1[. */ static RandomGenerator::RndVector rndvec(int n) { return current().rndvec(n); } /** * Return a simple flat random number (from the current * RandomGenerator object) in the range ]0,\a xu[. */ template static Unit rnd(Unit xu) { return current().rnd(xu); } /** * Return a simple flat random number (from the current * RandomGenerator object) in the range ]\a xl,\a xu[. */ template static Unit rnd(Unit xl, Unit xu) { return current().rnd(xl, xu); } /** * Return a true with probability \a p (default 0.5). */ static bool rndbool(double p = 0.5) { return current().rndbool(p); } /** * Return a true with probability \a p (default 0.5). Uses push_back * to reuse random number. */ static bool prndbool(double p = 0.5) { return current().rndbool(p); } /** * Return a true with probability \a p1/(\a p1+\a p2). */ static bool rndbool(double p1, double p2) { return current().rndbool(p1, p2); } /** * Return a true with probability \a p1/(\a p1+\a p2). Uses * push_back to reuse random number. */ static bool prndbool(double p1, double p2) { return current().rndbool(p1, p2); } /** * Return -1, 0, or 1 with relative probabilities \a p1, \a p2, \a * p3. */ static int rndsign(double p1, double p2, double p3) { return current().rndsign(p1, p2, p3); } /** * Return -1, 0, or 1 with relative probabilities \a p1, \a p2, \a * p3. Uses push_back to reuse random number. */ static int prndsign(double p1, double p2, double p3) { return current().rndsign(p1, p2, p3); } /** * Return an integer \f$i\f$ with probability p\f$i\f$/(\a p0+\a * p1). */ static int rnd2(double p0, double p1) { return current().rnd2(p0, p1); } /** * Return an integer \f$i\f$ with probability p\f$i\f$/(\a p0+\a * p1+\a p2). */ static int rnd3(double p0, double p1, double p2) { return current().rnd3(p0, p1, p2); } /** * Return an integer/ \f$i\f$ with probability p\f$i\f$(\a p0+\a * p1+\a p2+\a p3). */ static int rnd4(double p0, double p1, double p2, double p3) { return current().rnd4(p0, p1, p2, p3); } /** * Return a simple flat random integrer number in the range [0,\a xu[. */ static long irnd(long xu = 2) { return long(rnd() * xu); } /** * Return a simple flat random integrer number in the range [\a xl,\a xu[. */ static long irnd(long xl, long xu) { return xl + irnd(xu-xl); } /** * Return a number between zero and infinity, distributed according * to \f$e^-x\f$. */ static double rndExp() { return current().rndExp(); } /** * Return a number between zero and infinity, distributed according * to \f$e^-{x/\mu}\f$ where \f$\mu\f$ is the \a mean value. */ template static Unit rndExp(Unit mean) { return current().rndExp(mean); } /** * Return a number distributed according to a Gaussian distribution * with zero mean and unit variance. */ static double rndGauss() { return current().rndGauss(); } /** * Return a number distributed according to a Gaussian distribution * with a given standard deviation, \a sigma, and a given \a mean. */ template static Unit rndGauss(Unit sigma, Unit mean = Unit()) { return current().rndGauss(sigma, mean); } /** * Return a positive number distributed according to a * non-relativistic Breit-Wigner with a given width, \a gamma, and a * given \a mean. */ template static Unit rndBW(Unit mean, Unit gamma) { return current().rndBW(mean, gamma); } /** * Return a positive number distributed according to a * non-relativistic Breit-Wigner with a given width, \a gamma, and a * given \a mean. The distribution is cut-off so that the number is * between \a mean - \a cut and \a mean + \a cut */ template static Unit rndBW(Unit mean, Unit gamma, Unit cut) { return current().rndBW(mean, gamma, cut); } /** * Return a positive number distributed according to a relativistic * Breit-Wigner with a given width, \a gamma, and a given \a mean. */ template static Unit rndRelBW(Unit mean, Unit gamma) { return current().rndRelBW(mean, gamma); } /** * Return a positive number distributed according to a relativistic * Breit-Wigner with a given width, \a gamma, and a given \a * mean. The distribution is cut-off so that the number is between * \a mean - \a cut and \a mean + \a cut */ template static Unit rndRelBW(Unit mean, Unit gamma, Unit cut) { return current().rndRelBW(mean, gamma, cut); } /** * Return a non-negative number generated according to a Poissonian * distribution with a given \a mean. */ static long rndPoisson(double mean) { return current().rndPoisson(mean); } private: /** * The stack of RandomGenerators requested. */ static vector theRandomStack; /** * True if this object is responsible for pushing a RandomGenerator * onto the stack. */ bool randomPushed; private: /** * Private and non-existent assignment operator. */ - UseRandom & operator=(const UseRandom &); + UseRandom & operator=(const UseRandom &) = delete; }; } #endif /* ThePEG_UseRandom_H */ diff --git a/StandardModel/AlphaEMBase.h b/StandardModel/AlphaEMBase.h --- a/StandardModel/AlphaEMBase.h +++ b/StandardModel/AlphaEMBase.h @@ -1,72 +1,72 @@ // -*- C++ -*- // // AlphaEMBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_AlphaEMBase_H #define ThePEG_AlphaEMBase_H // This is the declaration of the AlphaEMBase class. #include "RunningCoupling.h" namespace ThePEG { /** * AlphaEMBase an abstract base class used by the StandardModelBase * class to implement the electro-magnetic coupling. Concrete * sub-classes must implement the value(Energy2, const * StandardModelBase &) function. * * @see \ref AlphaEMBaseInterfaces "The interfaces" * defined for AlphaEMBase. * @see StandardModelBase */ class AlphaEMBase: public RunningCoupling { public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Describe an abstract class without persistent data. */ static AbstractNoPIOClassDescription initAlphaEMBase; /** * Private and non-existent assignment operator. */ - AlphaEMBase & operator=(const AlphaEMBase &); + AlphaEMBase & operator=(const AlphaEMBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of AlphaEMBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of AlphaEMBase. */ typedef RunningCoupling NthBase; }; /** This template specialization informs ThePEG about the name of the * AlphaEMBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::AlphaEMBase"; } }; /** @endcond */ } #endif /* ThePEG_AlphaEMBase_H */ diff --git a/StandardModel/AlphaSBase.h b/StandardModel/AlphaSBase.h --- a/StandardModel/AlphaSBase.h +++ b/StandardModel/AlphaSBase.h @@ -1,174 +1,174 @@ // -*- C++ -*- // // AlphaSBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_AlphaSBase_H #define ThePEG_AlphaSBase_H // This is the declaration of the AlphaSBase class. #include "RunningCoupling.h" namespace ThePEG { /** * AlphaSBase is an abstract base class used by the StandardModelBase * to implement the QCD coupling, \f$\alpha_S\f$. The AlphaSBase also * encodes the number of active flavours at a given scale and the * \f$\Lambda_{QCD}\f$ for a given number of active flavours or for a * given scale. * * @see \ref AlphaSBaseInterfaces "The interfaces" * defined for AlphaSBase. * @see StandardModelBase */ class AlphaSBase: public RunningCoupling { public: /** @name Virtual functions to be overridden by sub-classes. */ //@{ /** * Return the flavour thresholds used. The returned vector contains * (in position i) the scales when the active number of * flavours changes from i to i+1. */ virtual vector flavourThresholds() const = 0; /** * Return the \f$\Lambda_{QCD}\f$ used for different numbers of * active flavours. */ virtual vector LambdaQCDs() const = 0; //@} /** @name Access information about number of flavours and \f$\Lambda_{QCD}\f$. */ //@{ /** * Return the number of avtive quark flavours. */ unsigned int Nf(Energy2 scale) const { unsigned int i = 0; while ( i < theFlavourThresholds.size() && theFlavourThresholds[i] < scale ) ++i; return i; } /** * Return the \f$\Lambda_{QCD}\f$ used for \a nflav active flavours. */ Energy LambdaQCD(unsigned int nflav) const { return theLambdaQCDs[nflav]; } /** * Return the \f$\Lambda_{QCD}\f$ used for corresponding given \a scale. */ Energy LambdaQCD(Energy2 scale) const { return theLambdaQCDs[Nf(scale)]; } //@} /** * Return the quark masses to be used; if not empty these masses * should be considered instead of the ones set in the particle data * objects. */ const vector& quarkMasses() const { return theQuarkMasses; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ 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 quark masses to be used; if not empty these masses * should be considered instead of the ones set in the particle data * objects. */ vector theQuarkMasses; /** * Flavour thresholds, set from the virtual functions in the * initialization. */ vector theFlavourThresholds; /** * The values of \f$\Lambda_{QCD}\f$ corresponding to * theFlavourThresholds, set from the virtual functions in the * initialization. */ vector theLambdaQCDs; private: /** * Describe an abstract class with persistent data. */ static AbstractClassDescription initAlphaSBase; /** * Private and non-existent assignment operator. */ - AlphaSBase & operator=(const AlphaSBase &); + AlphaSBase & operator=(const AlphaSBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of AlphaSBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of AlphaSBase. */ typedef RunningCoupling NthBase; }; /** This template specialization informs ThePEG about the name of the * AlphaSBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::AlphaSBase"; } }; /** @endcond */ } #endif /* ThePEG_AlphaSBase_H */ diff --git a/StandardModel/CKMBase.h b/StandardModel/CKMBase.h --- a/StandardModel/CKMBase.h +++ b/StandardModel/CKMBase.h @@ -1,81 +1,81 @@ // -*- C++ -*- // // CKMBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_CKMBase_H #define ThePEG_CKMBase_H // This is the declaration of the CKMBase class. #include "ThePEG/Interface/Interfaced.h" #include "StandardModelBase.fh" namespace ThePEG { /** * CKMBase is an abstract base classused by the StandardModelBase to * implement the Cabibbo-Kobayashi-Mascawa mixing matrix. Concrete * sub-classes must implement the getMatrix(unsigned int) function. * * @see \ref CKMBaseInterfaces "The interfaces" * defined for CKMBase. * @see StandardModelBase */ class CKMBase: public Interfaced { public: /** * Return the matrix of squared CKM matrix elements. The returned * matrix should be for \a nf families. This function must be * overridden by sub-classes. */ virtual vector< vector > getMatrix(unsigned int nf) const = 0; public: /** * Standard Init function used to initialize the interface. */ static void Init(); private: /** * Describe an abstract class without persistent data. */ static AbstractNoPIOClassDescription initCKMBase; /** * Private and non-existent assignment operator. */ - CKMBase & operator=(const CKMBase &); + CKMBase & operator=(const CKMBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of CKMBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of CKMBase. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * CKMBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::CKMBase"; } }; /** @endcond */ } #endif /* ThePEG_CKMBase_H */ diff --git a/StandardModel/O1AlphaS.h b/StandardModel/O1AlphaS.h --- a/StandardModel/O1AlphaS.h +++ b/StandardModel/O1AlphaS.h @@ -1,183 +1,183 @@ // -*- C++ -*- // // O1AlphaS.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_O1AlphaS_H #define ThePEG_O1AlphaS_H // This is the declaration of the O1AlphaS class. #include "AlphaSBase.h" namespace ThePEG { /** * O1AlphaS inherits from AlphaSBase and implements the leading order * running QCD coupling. The value is determined by a * \f$\Lambda_{QCD}\f$ parameter at a given number of * flavours. Optionally the coupling can be frozen under some minimum * scale to avoid divergencies or negative couplings. * * @see \ref O1AlphaSInterfaces "The interfaces" * defined for O1AlphaS. */ class O1AlphaS: public AlphaSBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ O1AlphaS() : theLambdaQCD(0.25*GeV), theLambdaFlavour(4), theMaxFlav(6), Q0(ZERO) {} //@} public: /** @name Virtual functions mandated by the sub-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 &) const; /** * Return the number of loops contributing to * the running this coupling. */ virtual unsigned int nloops () const { return 1; } /** * Return the flavour thresholds used. The returned vector contains * (in position i) the scales when the active number of * flavours changes from i to i+1. */ virtual vector flavourThresholds() const; /** * Return the \f$\Lambda_{QCD}\f$ used for different numbers of * active flavours. */ virtual vector LambdaQCDs() const; //@} /** * Return the maximum number of active flavours. */ int getMaxFlav() const { return theMaxFlav; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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$\Lambda_{QCD}\f$ for the number of flavours specified by * theLambdaFlavour. Other \f$\Lambda_{QCD}\f$ values for other * numbers of active flavours are calculated from * flavourThresholds() using a continuity requirement. */ Energy theLambdaQCD; /** * The number of flavours for which theLambdaQCD is given. */ int theLambdaFlavour; /** * The maximum number of active flavours. */ int theMaxFlav; /** * The scale below which \f$\alpha_S\f$ is frozen. */ Energy Q0; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initO1AlphaS; /** * Private and non-existent assignment operator. */ - O1AlphaS & operator=(const O1AlphaS &); + O1AlphaS & operator=(const O1AlphaS &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of O1AlphaS. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of O1AlphaS. */ typedef AlphaSBase NthBase; }; /** This template specialization informs ThePEG about the name of the * O1AlphaS class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::O1AlphaS"; } /** Return the name of the shared library be loaded to get access to * the O1AlphaS class and every other class it uses * (except the base class). */ static string library() { return "O1AlphaS.so"; } }; /** @endcond */ } #endif /* ThePEG_O1AlphaS_H */ diff --git a/StandardModel/RunningCoupling.h b/StandardModel/RunningCoupling.h --- a/StandardModel/RunningCoupling.h +++ b/StandardModel/RunningCoupling.h @@ -1,153 +1,153 @@ // -*- C++ -*- // // RunningCoupling.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 Leif Lonnblad, (C) 2009 Simon Platzer // // 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_RunningCoupling_H #define ThePEG_RunningCoupling_H // This is the declaration of the RunningCoupling class. #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/Repository/EventGenerator.h" #include "StandardModelBase.fh" namespace ThePEG { /** * RunningCoupling an abstract base class unifying the treatment * of running couplings in ThePEG. * * @see \ref RunningCouplingInterfaces "The interfaces" * defined for RunningCoupling. * @see StandardModelBase */ class RunningCoupling: public Interfaced { public: /** * The default constructor. */ RunningCoupling () : theScaleFactor(1.) {} /**@name Methods to be implemented by a derived class */ //@{ /** * 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 & sm) const = 0; /** * Return the number of loops contributing to * the running this coupling. The default returns * zero to ensure backward compatibility. */ virtual unsigned int nloops () const { return 0; } //@} /** * Return the value of the coupling at a given \a scale using the * StandardModelBase object used by the EventGenerator. */ double value(Energy2 scale) const { return value(scale,*(generator()->standardModel())); } /** * Return an overestimate to the running coupling at the * given scale. This is defined to aid veto algorithms * and by default returns the coupling itself, using the EventGenerators's * StandardModelBase object. */ virtual double overestimateValue (Energy2 scale) const { return value(scale); } /** * Return the ratio of the exact to the overestimated value * of the running coupling. The default implementation returns * one in accordance with the default implementation of * overestimateValue */ virtual double ratioToOverestimate (Energy2) const { return 1.; } /** * Return the scale factor, which may be used to globally * rescale the argument of the running coupling. */ double scaleFactor () const { return theScaleFactor; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); private: /** * Describe an abstract class without persistent data. */ static AbstractClassDescription initRunningCoupling; /** * Private and non-existent assignment operator. */ - RunningCoupling & operator=(const RunningCoupling &); + RunningCoupling & operator=(const RunningCoupling &) = delete; /** * The scale factor used to rescale the argument of * the running coupling. */ double theScaleFactor; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of RunningCoupling. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of RunningCoupling. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * RunningCoupling class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::RunningCoupling"; } }; /** @endcond */ } #endif /* ThePEG_RunningCoupling_H */ diff --git a/StandardModel/SimpleAlphaEM.h b/StandardModel/SimpleAlphaEM.h --- a/StandardModel/SimpleAlphaEM.h +++ b/StandardModel/SimpleAlphaEM.h @@ -1,106 +1,106 @@ // -*- C++ -*- // // SimpleAlphaEM.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_SimpleAlphaEM_H #define ThePEG_SimpleAlphaEM_H // This is the declaration of the SimpleAlphaEM class. #include "AlphaEMBase.h" namespace ThePEG { /** * SimpleAlphaEM inherits from AlphaEMBase and implements a simple * running of the electromagnetic coupling as parameterized by * H.~Buckhardt et al. * * @see \ref SimpleAlphaEMInterfaces "The interfaces" * defined for SimpleAlphaEM. */ class SimpleAlphaEM: public AlphaEMBase { public: /** * 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; /** * Return the number of loops contributing to * the running this coupling. */ virtual unsigned int nloops () const { return 1; } public: /** * Standard Init function used to initialize the interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initSimpleAlphaEM; /** * Private and non-existent assignment operator. */ - SimpleAlphaEM & operator=(const SimpleAlphaEM &); + SimpleAlphaEM & operator=(const SimpleAlphaEM &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of SimpleAlphaEM. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of SimpleAlphaEM. */ typedef AlphaEMBase NthBase; }; /** This template specialization informs ThePEG about the name of the * SimpleAlphaEM class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::SimpleAlphaEM"; } /** Return the name of the shared library be loaded to get access to * the SimpleAlphaEM class and every other class it uses * (except the base class). */ static string library() { return "SimpleAlphaEM.so"; } }; /** @endcond */ } #endif /* ThePEG_SimpleAlphaEM_H */ diff --git a/StandardModel/StandardCKM.h b/StandardModel/StandardCKM.h --- a/StandardModel/StandardCKM.h +++ b/StandardModel/StandardCKM.h @@ -1,151 +1,151 @@ // -*- C++ -*- // // StandardCKM.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_StandardCKM_H #define ThePEG_StandardCKM_H // This is the declaration of the StandardCKM class. #include "CKMBase.h" namespace ThePEG { /** * StandardCKM inherits from CKMBase and implements the standard * parameterization of the CKM matrix in terms of three angles and a * phase. * * @see \ref StandardCKMInterfaces "The interfaces" * defined for StandardCKM. */ class StandardCKM: public CKMBase { public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ StandardCKM() : theta12(0.222357), theta13(0.0003150), theta23(0.039009), delta(1.35819) {} //@} public: /** * Return the matrix of squared CKM matrix elements. The returned * matrix should be for \a nf families. */ virtual vector< vector > getMatrix(unsigned int nFamilies) 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 interface. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Describe a concrete class with persistent data. */ static ClassDescription initStandardCKM; /** * Private and non-existent assignment operator. */ - StandardCKM & operator=(const StandardCKM &); + StandardCKM & operator=(const StandardCKM &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of StandardCKM. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of StandardCKM. */ typedef CKMBase NthBase; }; /** This template specialization informs ThePEG about the name of the * StandardCKM class and the shared object where it is * defined. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::StandardCKM"; } /** Return the name of the shared library be loaded to get access to * the StandardCKM class and every other class it uses * (except the base class). */ static string library() { return "StandardCKM.so"; } }; /** @endcond */ } #endif /* ThePEG_StandardCKM_H */ diff --git a/StandardModel/StandardModelBase.h b/StandardModel/StandardModelBase.h --- a/StandardModel/StandardModelBase.h +++ b/StandardModel/StandardModelBase.h @@ -1,498 +1,498 @@ // -*- C++ -*- // // StandardModelBase.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_StandardModelBase_H #define ThePEG_StandardModelBase_H // This is the declaration of the StandardModelBase class. #include "ThePEG/Config/ThePEG.h" #include "AlphaEMBase.h" #include "CKMBase.h" #include "AlphaSBase.h" // #include "StandardModelBase.fh" // #include "StandardModelBase.xh" namespace ThePEG { /** * StandardModelBase is used to handle standard model parameters in an * EventGenerator. It uses AlphaEMBase, AlphaSBase and CKMBase to help * with the implementation of the electro-magnetic and QCD couplings * and the flavour mixing matrix. This means that StandardModelBase * does not need to be inherited from when it comes to standard model * parameters. Beyond the standard model parameters should be * implemented as sub-classes. * * @see \ref StandardModelBaseInterfaces "The interfaces" * defined for StandardModelBase. * @see EventGenerator * @see AlphaEMBase * @see AlphaSBase * @see CKMBase */ class StandardModelBase: public Interfaced { /** Declare a pointer to an AlphaEMBase object. */ typedef Ptr::pointer AEMPtr; /** Declare a pointer to an AlphaSBase object. */ typedef Ptr::pointer ASPtr; /** Declare a pointer to n CKMBase object. */ typedef Ptr::pointer CKMPtr; /** Declare a transient pointer to an AlphaEMBase object. */ typedef Ptr::transient_pointer tAEMPtr; /** Declare a transient pointer to an AlphaSBase object. */ typedef Ptr::transient_pointer tASPtr; /** Declare a transient pointer to a CKMBase object. */ typedef Ptr::transient_pointer tCKMPtr; public: /** @name Standard constructors and destructors. */ //@{ /** * Default constructor. */ StandardModelBase(); /** * Destructor. */ virtual ~StandardModelBase(); //@} public: /** * Return the number of families assumed in the standard model. */ unsigned int families() const { return theFamilies; } public: /** @name Functions accessing electro-weak parameters. */ /** * Return the electroweak scheme used */ unsigned int ewScheme() const { return theElectroWeakScheme; } /** * Set the electroweak scheme used */ void ewScheme(unsigned int s) { theElectroWeakScheme = s; } //@{ /** * Constant \f$\alpha_{EM}(q^2=0)\f$. */ double alphaEM() const { return theAlphaEM; } /** * Constant \f$\alpha_{EM}(q^2=m_Z^2)\f$. */ double alphaEMMZ() const { return theAlphaEMMZ; } /** * The electromagnetic coupling for vertex classes * in a well defined self-consistent EW scheme if requested */ double alphaEMME(Energy2 scale) const { if(theElectroWeakScheme==0) return alphaEM(scale); else if(scale>1e-6*GeV2) return theAlphaEMMZ; else return theAlphaEM; } /** * Running \f$\alpha_{EM}\f$. */ double alphaEM(Energy2 scale) const { return theRunningAlphaEM->value(scale, *this); } /** * Return a pointer to the object handling \f$\alpha_{EM}\f$. */ tAEMPtr alphaEMPtr() const { return theRunningAlphaEM; } /** * Return \f$\sin^2(\theta_W)\f$. */ double sin2ThetaW() const { return theSin2ThetaW; } /** * The Fermi constant */ InvEnergy2 fermiConstant() const {return theGF;} /** * The neutrino-photon coupling. */ double enu() const { return theEnu; } /** * The charged lepton-photon coupling. */ double ee() const { return theEe; } /** * The up-type-photon coupling. */ double eu() const { return theEu; } /** * The down-type-photon coupling. */ double ed() const { return theEd; } /** * The vector neutrino-\f$Z^0\f$ coupling. */ double vnu() const { return theVnu; } /** * The vector charged lepton-\f$Z^0\f$ coupling. */ double ve() const { return theVe; } /** * The vector up-type-\f$Z^0\f$ coupling. */ double vu() const { return theVu; } /** * The vector down-type-\f$Z^0\f$ coupling. */ double vd() const { return theVd; } /** * The axial neutrino-\f$Z^0\f$ coupling. */ double anu() const { return theAnu; } /** * The axial charged lepton-\f$Z^0\f$ coupling. */ double ae() const { return theAe; } /** * The axial up-type-\f$Z^0\f$ coupling. */ double au() const { return theAu; } /** * The axial down-type-\f$Z^0\f$ coupling. */ double ad() const { return theAd; } /** * Return a pointer to the CKMBase object used. */ tCKMPtr CKM() const { return theCKM; } /** * Return a square of the element of the Cabibbo-Kobayashi-Maskawa * Matrix. The fatrix element for the \a uf up-type family and \a df * down-type family. */ double CKM(unsigned int uf, unsigned int df) const; /** * Return the square of the elements of the Cabibbo-Kobayashi-Maskawa * Matrix. */ double CKM(const ParticleData & uType, const ParticleData & dType) const; //@} public: /** @name Functions accessing QCD parameters. */ //@{ /** * Return the number of colours. */ unsigned int Nc() const { return theNc; } /** * Return the number of avtive quark flavours for a given \a scale. */ unsigned int Nf(Energy2 scale) const { return theRunningAlphaS->Nf(scale); } /** * Return the constant strong coupling constant. */ double alphaS() const { return theAlphaS; } /** * Return the running strong coupling for a given \a scale */ double alphaS(Energy2 scale) const { return theRunningAlphaS->value(scale, *this); } /** * Return a pointer to the object handling \f$\alpha_S\f$. */ tASPtr alphaSPtr() const { return theRunningAlphaS; } /** * Return the \f$\Lambda_{QCD}\f$ for \a nflav active flavours. */ Energy LambdaQCD(unsigned int nflav) const { return theRunningAlphaS->LambdaQCD(nflav); } /** * Return the \f$\Lambda_{QCD}\f$ for the given \a scale. */ Energy LambdaQCD(Energy2 scale) const { return LambdaQCD(Nf(scale)); } //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @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 interface. */ static void Init(); /** * Overloaded function from Interfaced */ virtual bool preInitialize() const { return true; } protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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 number of families. */ unsigned int theFamilies; /** * The constant \f$\alpha_{EM}\f$. */ double theAlphaEM; /** * The constant \f$\alpha_{EM}\f$. */ double theAlphaEMMZ; /** * Pointer to an object capable of calculating the running * \f$\alpha_{EM}\f$. */ AEMPtr theRunningAlphaEM; /** * The \f$\sin^2(\theta_W)\f$ */ double theSin2ThetaW; /** * The Fermi contants \f$G_F\f$ */ InvEnergy2 theGF; /** * Coupling between a fundamental fermion and the photon. */ double theEnu; /** * Coupling between a fundamental fermion and the photon. */ double theEe; /** * Coupling between a fundamental fermion and the photon. */ double theEu; /** * Coupling between a fundamental fermion and the photon. */ double theEd; /** * Vector coupling between a fundamental fermion and Z^0. */ double theVnu; /** * Vector coupling between a fundamental fermion and Z^0. */ double theVe; /** * Vector coupling between a fundamental fermion and Z^0. */ double theVu; /** * Vector coupling between a fundamental fermion and Z^0. */ double theVd; /** * Axial coupling between a fundamental fermions and Z^0. */ double theAnu; /** * Axial coupling between a fundamental fermions and Z^0. */ double theAe; /** * Axial coupling between a fundamental fermions and Z^0. */ double theAu; /** * Axial coupling between a fundamental fermions and Z^0. */ double theAd; /** * If true, the electro-weak couplings are derived from * \f$\theta_W\f$ in the initialization. */ long recalculateEW; /** * A pointer to an object representing the Cabibbo-Kobayashi-Maskawa * matrix. */ CKMPtr theCKM; /** * The matrix of squared CKM elements set from theCKM at initialization. */ mutable vector< vector > theCKM2Matrix; /** * The number of colours; */ unsigned int theNc; /** * The fixed strong coupling. */ double theAlphaS; /** * Pointer to an object capable of calculating the running * \f$\alpha_{S}\f$. */ ASPtr theRunningAlphaS; /** * Electroweak scheme */ unsigned int theElectroWeakScheme; /** * Option for the calculation of the W/Z widths */ unsigned int theBosonWidthOption; private: /** * Describe a concrete class with persistent data. */ static ClassDescription initStandardModelBase; /** * Private and non-existent assignment operator. */ - StandardModelBase & operator=(const StandardModelBase &); + StandardModelBase & operator=(const StandardModelBase &) = delete; }; /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the base classes * of StandardModelBase. */ template <> struct BaseClassTrait: public ClassTraitsType { /** Typedef of the first base class of StandardModelBase. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of the * StandardModelBase class. */ template <> struct ClassTraits: public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "ThePEG::StandardModelBase"; } }; /** @endcond */ } #endif /* ThePEG_StandardModelBase_H */ diff --git a/Utilities/CFileLineReader.h b/Utilities/CFileLineReader.h --- a/Utilities/CFileLineReader.h +++ b/Utilities/CFileLineReader.h @@ -1,222 +1,222 @@ // -*- C++ -*- // // CFileLineReader.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_CFileLineReader_H #define THEPEG_CFileLineReader_H // // This is the declaration of the CFileLineReader class. // #include "ThePEG/Config/ThePEG.h" #include "CFileLineReader.fh" #include "CFile.h" #include #include namespace ThePEG { /** * CFileLineReader is a wrapper around a standard C FILE stream. With * it one reads one line at the time (with readline()) into an * internal buffer from which one can then read as from a standard * std::istream with a limited set of operator>> functions. It can be * thought of as an std::ifstream where the internal buffer must be * filled by hand one line at the time. * * Contrary to std::ifstream the CFileLineReader can also handle * gipped files and pipes. Gzipped files are automatically handles by * a pipe using the zcat command if the file name ends * with .gz. Also if a file name ends with a * | sign, the preceding string is interpreted as a * command defining a pipe from which to read. * * Since CFileLineReader is very close to the standard C FILE stream * it is in many cases much faster than eg. reading from lines via * std::istringstream. */ class CFileLineReader { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ CFileLineReader(); /** * Constructor taking a \a filename as argument. Optionally the size * \a len of the line buffer can be specified. If \a filename ends * with .gz a pipe is opened where the file is read by * zcat. If \a filename ends with a | * sign, the preceding string is interpreted as a command defining a * pipe from which to read. */ CFileLineReader(string filename, int len = defsize); /** * The destructor. */ ~CFileLineReader(); //@} /** @name Initialization functions. */ //@{ /** * Initialize with a \a filename. If \a filename ends with * .gz a pipe is opened where the file is read by * zcat. If \a filename ends with a | * sign, the preceding string is interpreted as a command defining a * pipe from which to read. */ void open(string filename); /** * If the file was opened from within this object, close it. */ void close(); //@} /** * Read a line from the underlying c-file into the line buffer. */ bool readline(); /** * Undo reading from the current line, ie. the next read will be * from the beginning of the current line. Afterwards the state will * be not bad. */ void resetline(); /** * Return a string containing what is left of the line buffer. */ string getline() const; /** * Return the underlying c-file. */ CFile cFile() const; /** * Return null if a previous read failed. */ operator void *(); /** * Return true if a previous read failed. */ bool operator!(); /** * Scan forward up and until the first occurrence of the given * character. * @return true if the given character was found. */ bool skip(char c); /** * Check if a given string is present in the current line buffer. */ bool find(string str) const; /** @name Operators to read from the line buffer. */ //@{ /** * Return the next character of the line-buffer. */ char getc(); /** * Read a long from the line buffer. */ CFileLineReader & operator>>(long & l); /** * Read an int from the line buffer. */ CFileLineReader & operator>>(int & i); /** * Read an unsigned long from the line buffer. */ CFileLineReader & operator>>(unsigned long & l); /** * Read an unsigned int from the line buffer. */ CFileLineReader & operator>>(unsigned int & i); /** * Read a double from the line buffer. */ CFileLineReader & operator>>(double & d); /** * Read a float from the line buffer. */ CFileLineReader & operator>>(float & f); /** * Read a (whitespace delimited) string from the line buffer. */ CFileLineReader & operator>>(std::string & s); //@} private: /** * The c-file to be read from. */ CFile file; /** * The length of the line buffer. */ int bufflen; /** * The line buffer. */ char * buff; /** * The current position in the line buffer. */ char * pos; /** * The current state is bad if a read has failed. */ bool bad; /** * The default size of the buffer. */ static const int defsize = 1024; private: /** * The copy constructor is private and not implemented. */ CFileLineReader(const CFileLineReader &); /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - CFileLineReader & operator=(const CFileLineReader &); + CFileLineReader & operator=(const CFileLineReader &) = delete; }; } #endif /* THEPEG_CFileLineReader_H */ diff --git a/Utilities/Current.h b/Utilities/Current.h --- a/Utilities/Current.h +++ b/Utilities/Current.h @@ -1,152 +1,152 @@ // -*- C++ -*- // // Current.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Current_H #define ThePEG_Current_H // This is the declaration of the Current class. namespace ThePEG { /** * The Current class keeps a static stack of objects of the templated * class, which can be used anywhere by any class. When an object is * active it adds itself to the stack which can be used by any other * object through the static functions of the Current class. If * someone needs to use an alternative object a new Current object can * be constructed with a pointer to the desired object * as argument and that object will the be used by the static Current * functions until the Current object is destructed. * * Default-contructed objects of the Current class can be used as a * pointer to the currently chosen object on the stack. * * The typical use case for this class is a handler class which uses a * number of objects which do not have a reference back to the * handler, but still need to acces some member functions. In a member * function the handler class will construct a Current object: * Current<Handler> current(this); in any following * function called in this member function, any object can then access * the handlers methods as * Current<Handler>()->memfun();. * */ template class Current { public: /** * Default constructor does nothing. */ Current() : pushed(false) {} /** * Copy-constructor does nothing. */ Current(const Current &) : pushed(false) {} /** * Construct a new object specifying a new object, \a o, to be used * during this objects lifetime. The object must not be deleted * until the Current object us destroyed. */ Current(T * t) : pushed(false) { if ( t ) { theStack.push_back(t); pushed = true; } } /** * The destructor removing the object specified in the constructor * from the stack. */ ~Current() { if ( pushed ) theStack.pop_back(); } public: /** * Returns true if there is no currently chosen object. */ static bool isVoid() { return theStack.empty() || !(theStack.back()); } /** * Return a reference to the currently chosen object. */ static T & current() { return *theStack.back(); } /** * Return a reference to the currently chosen object. */ T & operator*() const { return *theStack.back(); } /** * Return a pointer to the currently chosen object. */ T * operator->() const { return theStack.back(); } /** * Pointer to the stack */ static T * ptr() { return theStack.back(); } /** * Test for existance */ operator bool() const { return ptr(); } /** * Test for existance */ bool operator!() const { return !ptr(); } private: /** * The stack of objects requested. */ static vector theStack; /** * True if this object is responsible for pushing an object * onto the stack. */ bool pushed; private: /** * Private and non-existent assignment operator. */ - Current & operator=(const Current &); + Current & operator=(const Current &) = delete; }; template std::vector ThePEG::Current::theStack; } #endif /* ThePEG_Current_H */ diff --git a/Utilities/DebugItem.h b/Utilities/DebugItem.h --- a/Utilities/DebugItem.h +++ b/Utilities/DebugItem.h @@ -1,104 +1,104 @@ // -*- C++ -*- #ifndef ThePEG_DebugItem_H #define ThePEG_DebugItem_H // // This is the declaration of the DebugItem class. // #include "ThePEG/Config/ThePEG.h" namespace ThePEG { /** * The DebugItem class can be used to efficiently handle detailed * debug options. The actual objects are used anywhere in a function * where optional debugging should be done. At that point a static * object of DebugItem should be constructed giving a name to be used * (it should be static to ensure that the initialization is only done * once). After that the object is automatically cast to a bool * indicating whether or not debugging has been requested for this * item. */ class DebugItem { public: /** @name Standard constructors and destructors. */ //@{ /** * The only relevant constructor. The string should typically be on * the form "namspace::class::function". If the Debug::level is * larger than or equal to the given \a level this DebugItem will be * turned on. */ DebugItem(string itemname, int level = 100); //@} public: /** * Switch on all DebugItem objects matching the given string. If \a * after is positive delay the DebugItem until that number of * tics. If the string is on the form "=" the integer * will be taken as the delay. */ static void setDebugItem(string itemname, long after = 0); /** * Advance one tic, opssibly switching on more debug items. */ static void tic(); /** * Cheap way of testing if debugging should be done. */ operator bool () const { #ifndef ThePEG_NO_DEBUG return debug; #else return false; #endif } private: /** * Set to true if debugging requested. */ bool debug; /** * Counter for number of tics. */ static long & ticker(); /** * The DebugItem objects registered, indexed by their name. */ static multimap & items(); /** * The DebugItem objects registered, indexed by the tic at which * they should be turned on.. */ static multimap & itemtics(); /** * The DebugItem names registered together with the tic at which it * should be turned on. */ static map & nametics(); private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - DebugItem & operator=(const DebugItem &); + DebugItem & operator=(const DebugItem &) = delete; }; } #endif /* ThePEG_DebugItem_H */ diff --git a/Utilities/Direction.h b/Utilities/Direction.h --- a/Utilities/Direction.h +++ b/Utilities/Direction.h @@ -1,161 +1,161 @@ // -*- C++ -*- // // Direction.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Direction_H #define ThePEG_Direction_H // This is the declaration of the Direction class. #include "ThePEG/Config/ThePEG.h" #include "Direction.xh" namespace ThePEG { template /** * A Direction object can be used to specify that some * following operations should be assumed to be performed with the * z-direction of the momenta reversed. As an example, if * Direction<0>::pos() is true, the method * Lorentz5Momentum::dirPlus() will return the positive, * light-cone component, and Lorentz5Momentum::dirMinus() * the negative, while if Direction<0>::pos() is false * the behavior of the methods are reversed. * * Direction is templated with an integer template argument * (default = 0), and only one object per class can be instatiated at * the time. Attempts to instatiate a second object of a * Direction class will result in an exception being * thrown. To have several different directions classes with different * template arguments must be instantiated. Direction<0> is * reserved for Lorentz5Momentum. Attempts to use the * static methods of a Direction class when no object has * been instatiated will result in an exception being thrown. * * @see Lorentz5Momentum */ class Direction { public: /** The enum defining the directions. */ enum Dir { Neg = -1, /**< Reversed direction. */ Negative = -1, /**< Reversed direction. */ Undefined = 0, /**< No direction has been defined. */ Pos = 1, /**< Standard (positive) direction. */ Positive = 1 /**< Standard (positive) direction. */ }; public: /** * Create an object with a given direction. */ Direction(Dir newDirection) { if ( theDirection != Undefined ) throw MultipleDirectionException(I); if ( newDirection == Positive ) theDirection = Positive; else if ( newDirection == Negative ) theDirection = Negative; else throw UndefinedDirectionException(I); } /** * Create an object with a positive direction if rnd > 0.5, * otherwise set the negative direction. */ Direction(double rnd) { if ( theDirection != Undefined ) throw MultipleDirectionException(I); theDirection = rnd > 0 ? Positive : Negative; } /** * Create an object with a positive direction if p is true, * otherwise set the negative direction. */ Direction(bool p) { if ( theDirection != Undefined ) throw MultipleDirectionException(I); theDirection = p ? Positive : Negative; } /** * Destructure makeing the static variable undefined. */ ~Direction() { theDirection = Undefined; } public: /** * Set the direction. */ static void set(Dir newDirection) { if ( newDirection == Positive ) theDirection = Positive; else if ( newDirection == Negative ) theDirection = Negative; else throw UndefinedDirectionException(I); } /** * Reverse the direction. */ static void reverse() { theDirection = pos() ? Negative : Positive; } /** * Return true if the direction is positive. */ static bool pos() { return dir() == Positive; } /** * Return true if the direction is negative (reversed). */ static bool neg() { return dir() == Negative; } /** * Return the direction. */ static Dir dir() { if ( theDirection == Undefined ) throw UndefinedDirectionException(I); return theDirection; } private: /** * The direction. */ static Dir theDirection; private: /** * Default ctors and assignment is private and not implemented. */ Direction(); /** * Default ctors and assignment is private and not implemented. */ Direction(const Direction &); /** * Default ctors and assignment is private and not implemented. */ - Direction & operator=(const Direction &); + Direction & operator=(const Direction &) = delete; }; template typename Direction::Dir Direction::theDirection = Direction::Undefined; } #endif /* ThePEG_Direction_H */ diff --git a/Utilities/HoldFlag.h b/Utilities/HoldFlag.h --- a/Utilities/HoldFlag.h +++ b/Utilities/HoldFlag.h @@ -1,147 +1,147 @@ // -*- C++ -*- // // HoldFlag.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HoldFlag_H #define ThePEG_HoldFlag_H // This is the declaration of the HoldFlag class. namespace ThePEG { template /** * HoldFlag objects are used to temporarily change the value * of an object, restoring the original value when the * HoldFlag object is destructed. * * @see Level */ class HoldFlag { public: /** * Constructor setting a temporary value for the given object. * @param newFlag the object which value is temporarily changed. * @param holdFlag the temporary value for the newFlag object. */ HoldFlag(T & newFlag, const T & holdFlag) : theFlag(newFlag), oldFlag(holdFlag) { std::swap(theFlag, oldFlag); } /** * Constructor setting the a temporary value for the given object. * @param newFlag the object which value is temporarily changed. * @param holdFlag the temporary value for the newFlag object. * @param finalFlag the newFlag object will be given the value * finalFlag when the HoldFlag object is destroyed. */ HoldFlag(T & newFlag, const T & holdFlag, const T & finalFlag) : theFlag(newFlag), oldFlag(holdFlag) { std::swap(theFlag, oldFlag); oldFlag = finalFlag; } /** * Destructor. Restores the corresponding object to its original * value. */ ~HoldFlag() { std::swap(theFlag, oldFlag); } private: /** * The object to be changed. */ T & theFlag; /** * The value which will be restored when this is destroyed. */ T oldFlag; /** * Default constructor is private and not implemented. */ HoldFlag(); /** * Copy constructor is private and not implemented. */ HoldFlag(const HoldFlag &); /** * Assignment is private and not implemented. */ - HoldFlag & operator=(const HoldFlag &); + HoldFlag & operator=(const HoldFlag &) = delete; }; /** * Specialization of HoldFlag for boolean variables. */ template <> class HoldFlag { public: /** * Constructor setting the a temporary value for the bool variable. * @param newFlag the boolean variable which value is temporarily changed. * @param holdFlag the temporary value for the newFlag variable. */ HoldFlag(bool & newFlag, bool holdFlag = true) : theFlag(newFlag), oldFlag(newFlag) { theFlag = holdFlag; } /** * Constructor setting the a temporary value for the bool variable. * @param newFlag the boolean variable which value is temporarily changed. * @param holdFlag the temporary value for the newFlag variable. * @param finalFlag the newFlag variable will be given the value * finalFlag when the HoldFlag object is destroyed. */ HoldFlag(bool & newFlag, bool holdFlag, bool finalFlag) : theFlag(newFlag), oldFlag(finalFlag) { theFlag = holdFlag; } /** * Destructor. Restores the corresponding variable to its original * value. */ ~HoldFlag() { theFlag = oldFlag; } private: /** * The variable to be changed. */ bool & theFlag; /** * The value which will be restored when this is destroyed. */ bool oldFlag; /** * Default constructor is private and not implemented. */ HoldFlag(); /** * Copy constructor is private and not implemented. */ HoldFlag(const HoldFlag &); /** * Assignment is private and not implemented. */ - HoldFlag & operator=(const HoldFlag &); + HoldFlag & operator=(const HoldFlag &) = delete; }; } #endif /* ThePEG_HoldFlag_H */ diff --git a/Utilities/Level.h b/Utilities/Level.h --- a/Utilities/Level.h +++ b/Utilities/Level.h @@ -1,63 +1,63 @@ // -*- C++ -*- // // Level.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Level_H #define ThePEG_Level_H // This is the declaration of the Level class. #include "ThePEG/Config/ThePEG.h" namespace ThePEG { /** * Level is used to increment temporarily a given integer * variable. Everytime a Level object is created with a given integer * variable as argument, the variable will be incremented. When the * corresponding Level object is destroyed, the associated integer * variable is decremented again. * * @see HoldFlag */ template class Level { public: /** Constructor taking an integer variable which is incremented. A * reference to the variable will be stored. */ Level(T & newLevel) : theLevel(++newLevel) {} /** Destructor decrementing the associated integer variable. */ ~Level() { --theLevel; } private: /** A reference to the integer variable to be decremmmented when * this object is destroyed. */ T & theLevel; /** * Default constructor is private and not implemented. */ Level(); /** * Copy constructor is private and not implemented. */ Level(const Level &); /** * Assignment is private and not implemented. */ - Level & operator=(const Level &); + Level & operator=(const Level &) = delete; }; } #endif /* ThePEG_Level_H */ diff --git a/Utilities/Named.h b/Utilities/Named.h --- a/Utilities/Named.h +++ b/Utilities/Named.h @@ -1,86 +1,87 @@ // -*- C++ -*- // // Named.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Named_H #define ThePEG_Named_H // This is the declaration of the Named class. #include namespace ThePEG { /** * The Named class is a simple concrete base class to * used by classes of objects with a name. It just defines a string * member variable with corresponding (protected) set and get * functions. */ class Named { public: /** * Constructor with name. */ Named(const string & newName = string()) : theName(newName) {} /** + * Explicit default copy-constructor (too avoid compiler warnings) + */ + Named(const Named & ) = default; + + /** * Return name. */ const string & name() const { return theName; } /** * Test for equality. */ - bool operator == (const Named & other) const - { + bool operator == (const Named & other) const { return theName == other.name(); } /** * Lexicographical comparison. */ - bool operator < (const Named & other) const - { + bool operator < (const Named & other) const { return theName < other.name(); } protected: /** * Assignment. */ - const Named & operator = (const Named & other) - { + const Named & operator = (const Named & other) { if (this != &other) theName = other.name(); return *this; } /** * Set new name. */ - const string & name(const string & newName) - { + const string & name(const string & newName) { return theName = newName; } private: /** * The string containing the name. */ string theName; }; } #endif /* ThePEG_Named_H */ diff --git a/Utilities/ObjectIndexer.h b/Utilities/ObjectIndexer.h --- a/Utilities/ObjectIndexer.h +++ b/Utilities/ObjectIndexer.h @@ -1,184 +1,184 @@ // -*- C++ -*- // // ObjectIndexer.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_ObjectIndexer_H #define THEPEG_ObjectIndexer_H // This is the declaration of the ObjectIndexer class. #include "ThePEG/Config/ThePEG.h" #include namespace ThePEG { /** * This is a templated class which dynamically associates (reference * counted) objects to integer indices. By default, all indices will * be non-negative, but explicit usage of negative indices is * allowed as long as they do not include NoIndex. */ template (-1)> class ObjectIndexer { public: ThePEG_DECLARE_TEMPLATE_POINTERS(ObjT,TPtr); /** Map of objects to indices */ typedef map IndexObjectMap; /** Map of indices to objects. */ typedef map ObjectIndexMap; public: /** * Empty constructor. */ ObjectIndexer(): next(0) {} /** * Return the index for the given object. If the object is not known, * a new index will be created. */ IntT operator()(tTPtr o) { typename ObjectIndexMap::iterator it = objectIndex.find(o); if ( it == objectIndex.end() ) { IntT i = next++; objectIndex[o] = i; indexObject[i] = o; return i; } else return it->second; } /** * Return the index for the given object. If the object is not known, * NoIndex will be returned. */ IntT operator()(tTPtr o) const { return find(o); } /** * Return the index for the given object. If the object is not known, * NoIndex will be returned. */ IntT find(tTPtr o) const { typename ObjectIndexMap::const_iterator it = objectIndex.find(o); return it == objectIndex.end()? NoIndex: it->second; } /** * Return the object for the given index. If the index is not known, * a new object will be (default) created. */ tTPtr operator()(IntT i) { if ( i == NoIndex ) return tTPtr(); typename IndexObjectMap::iterator it = indexObject.find(i); if ( it == indexObject.end() ) { TPtr o = new_ptr(); objectIndex[o] = i; indexObject[i] = o; next = max(next, i + 1); return o; } else return it->second; } /** * Return the object for the given index. If the index is not known, * a null pointer will be returned. */ tTPtr operator()(IntT i) const { return find(i); } /** * Return the object for the given index. If the index is not known, * a null pointer will be returned. */ tTPtr find(IntT i) const { typename IndexObjectMap::const_iterator it = indexObject.find(i); return it == indexObject.end()? tTPtr(): it->second; } /** * Associate the given object with the given index. Possible other * associations involving the index or the object is removed. If the * given index is NoIndex, this function does nothing. */ void operator()(IntT i, tTPtr o) { if ( i == NoIndex ) return; typename IndexObjectMap::iterator iit = indexObject.find(i); if ( iit != indexObject.end() ) objectIndex.erase(iit->second); typename ObjectIndexMap::iterator oit = objectIndex.find(o); if ( oit != objectIndex.end() ) indexObject.erase(oit->second); objectIndex[o] = i; indexObject[i] = o; next = max(next, i + 1); } /** * Return true if the given object is known. */ bool included(tTPtr o) const { return objectIndex.find(o) != objectIndex.end(); } /** * Return true if the given index is known. */ bool included(IntT i) const { return indexObject.find(i) != indexObject.end(); } /** * Remove all associations. */ void clear() { indexObject.clear(); objectIndex.clear(); } /** * Return true if no associations has been made. */ bool empty() const { return indexObject.empty() && objectIndex.empty(); } private: /** * All known objects keyed by their indices. */ IndexObjectMap indexObject; /** * All known indices keyed by the corresponding objects. */ ObjectIndexMap objectIndex; /** * The next index to be used. */ IntT next; private: /** * Private and non-existent assignment operator. */ - ObjectIndexer & operator=(const ObjectIndexer &); + ObjectIndexer & operator=(const ObjectIndexer &) = delete; }; } #endif /* THEPEG_ObjectIndexer_H */ diff --git a/Utilities/Rebinder.h b/Utilities/Rebinder.h --- a/Utilities/Rebinder.h +++ b/Utilities/Rebinder.h @@ -1,128 +1,128 @@ // -*- C++ -*- // // Rebinder.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_Rebinder_H #define ThePEG_Rebinder_H #include "ThePEG/Config/ThePEG.h" #include "Rebinder.fh" #include namespace ThePEG { /** * Rebinder is a class associating pairs of pointers to objects. It is * typically used when cloning a set of objects which have pointers to * eachother. The Rebinder is then set up so that a cloned object can * easily be retrieved given a pointer to the original one. The cloned * objects can then use the Rebinder to change their pointers so that * they henceforth points to the cloned copies. */ template class Rebinder { public: /** Default constructor. */ Rebinder() {} public: ThePEG_DECLARE_TEMPLATE_POINTERS(T,TPtr); /** Map associating pairs of objects. */ typedef std::map MapType; /** The iterator of the underlying map. */ typedef typename MapType::const_iterator const_iterator; public: /** * Return a pointer to the object associated with the argument. */ TPtr & operator[](tcTPtr t) { return theMap[t]; } /** * Return a pointer to the object associated with the argument. If * no corresponding object is found a null pointer given by R() is * returned. * @param r a pointer to an object of a type which is derived from T. */ template R translate(const R & r) const { const_iterator it = theMap.find(r); return it == theMap.end()? R(): dynamic_ptr_cast(it->second); } /** * Insert pointers to objects into the output iterator, pointers to * objects corresponding to the ones given by the range of input * iterators. If a given object in the input iterator range does not * exists, a null pointer will be inserted in the output iterator. */ template void translate(OutputIterator r, InputIterator first, InputIterator last) const { while ( first != last ) *r++ = translate(*first++); } /** * Return a pointer to the object associated with the argument. If * no corresponding object is found an exception is thrown. * @param r a pointer to an object of a type which is derived from T. */ template R alwaysTranslate(const R & r) const { R ret; if ( !r ) return ret; const_iterator it = theMap.find(r); ret = (it == theMap.end()? R(): dynamic_ptr_cast(it->second)); if ( !ret ) throw std::runtime_error("Rebinder exception"); return ret; } /** * Insert pointers to objects into the output iterator, pointers to * objects corresponding to the ones given by the range of input * iterators. If a given object in the input iterator range does not * exists, an exception will be thrown. */ template void alwaysTranslate(OutputIterator r, InputIterator first, InputIterator last) const { while ( first != last ) *r++ = alwaysTranslate(*first++); } /** * Acces the underlying map representation. */ const MapType & map() const { return theMap; } private: /** * The underlying map representation. */ MapType theMap; private: /** The copy constructor is private and not implemented */ Rebinder(const Rebinder &); /** The assignment operator is private and not implemented */ - Rebinder & operator=(const Rebinder &); + Rebinder & operator=(const Rebinder &) = delete; }; } #endif /* ThePEG_Rebinder_H */ diff --git a/Vectors/HepMCConverter.h b/Vectors/HepMCConverter.h --- a/Vectors/HepMCConverter.h +++ b/Vectors/HepMCConverter.h @@ -1,226 +1,226 @@ // -*- C++ -*- // // HepMCConverter.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_HepMCConverter_H #define ThePEG_HepMCConverter_H // This is the declaration of the HepMCConverter class. #include "ThePEG/Config/ThePEG.h" #include "ThePEG/EventRecord/Event.h" #include "HepMCTraits.h" namespace ThePEG { /** * The HepMCConverter defines only one public static function which * converts a ThePEG::Event object to a * HepMC::GenEvent. All mother-daughter relationships and * colour information is preserved. * * @see Event * @see Particle * * @author Leif Lönnblad */ template > class HepMCConverter { public: /** @cond EXCEPTIONCLASSES */ /** Exception class for HepMCConverter. */ struct HepMCConverterException: public Exception {}; /** @endcond */ /** * Help class to represent a temporary vertex which can be * converted to a GenVertex. */ struct Vertex { /** Particles going in to the vertex. */ tcParticleSet in; /** Particles going out of the vertex. */ tcParticleSet out; }; /** Forward typedefs from Traits class. */ typedef typename Traits::ParticleT GenParticle; /** Forward typedefs from Traits class. */ typedef typename Traits::ParticlePtrT GenParticlePtrT; /** Forward typedefs from Traits class. */ typedef typename Traits::EventT GenEvent; /** Forward typedefs from Traits class. */ typedef typename Traits::VertexT GenVertex; /** Forward typedefs from Traits class. */ typedef typename Traits::VertexPtrT GenVertexPtrT; /** Forward typedefs from Traits class. */ typedef typename Traits::PdfInfoT PdfInfo; /** Map ThePEG particles to HepMC particles. */ typedef map ParticleMap; /** Map ThePEG colour lines to HepMC colour indices. */ typedef map FlowMap; /** Map ThePEG particles to vertices. */ typedef map VertexMap; /** Map vertices to GenVertex */ typedef map GenVertexMap; public: /** * Convert a ThePEG::Event to a HepMC::GenEvent. The caller is * responsible for deleting the constructed GenEvent object. If \a * nocopies is true, only final copies of particles connected with * Particle::previous() and Particle::next() will be entered in the * HepMC::GenEvent. In the GenEvent object, the energy/momentum * variables will be in units of \a eunit and lengths variables in * units of \a lunit. */ static GenEvent * convert(const Event & ev, bool nocopies = false, Energy eunit = Traits::defaultEnergyUnit(), Length lunit = Traits::defaultLengthUnit()); /** * Convert a ThePEG::Event to a HepMC::GenEvent. The caller supplies * a GenEvent object, \a gev, which will be filled. If \a nocopies * is true, only final copies of particles connected with * Particle::previous() and Particle::next() will be entered in the * HepMC::GenEvent. In the GenEvent object, the energy/momentum * variables will be in units of \a eunit and lengths variables in * units of \a lunit. */ static void convert(const Event & ev, GenEvent & gev, bool nocopies, Energy eunit, Length lunit); /** * Convert a ThePEG::Event to a HepMC::GenEvent. The caller supplies * a GenEvent object, \a gev, which will be filled. If \a nocopies * is true, only final copies of particles connected with * Particle::previous() and Particle::next() will be entered in the * HepMC::GenEvent. In the GenEvent object, the energy/momentum * variables will be in units of \a eunit and lengths variables in * units of \a lunit. */ static void convert(const Event & ev, GenEvent & gev, bool nocopies = false); private: /** * The proper constructors are private. The class is only * instantiated within the convert method. */ HepMCConverter(const Event & ev, bool nocopies, Energy eunit, Length lunit); /** * The proper constructors are private. The class is only * instantiated within the convert method. */ HepMCConverter(const Event & ev, GenEvent & gev, bool nocopies, Energy eunit, Length lunit); /** * Common init function used by the constructors. */ void init(const Event & ev, bool nocopies); /** * Default constructor is unimplemented and private and should never be used. */ HepMCConverter(); /** * Copy constructor is unimplemented and private and should never be used. */ HepMCConverter(const HepMCConverter &); /** * Assignment is unimplemented and private and should never be used. */ - HepMCConverter & operator=(const HepMCConverter &); + HepMCConverter & operator=(const HepMCConverter &) = delete; private: /** * Create a GenParticle from a ThePEG Particle. */ GenParticlePtrT createParticle(tcPPtr p) const; /** * Join the decay vertex of the parent with the decay vertex of the * child. */ void join(tcPPtr parent, tcPPtr child); /** * Create a GenVertex from a temporary Vertex. */ GenVertexPtrT createVertex(Vertex * v); /** * Create and set a PdfInfo object for the event */ void setPdfInfo(const Event & e); private: /** * The constructed GenEvent. */ GenEvent * geneve; /** * The translation table between the ThePEG particles and the * GenParticles. */ ParticleMap pmap; /** * The translation table between ThePEG ColourLine objects and HepMC * Flow indices. */ FlowMap flowmap; /** * All temporary vertices created. */ vector vertices; /** * The mapping of particles to their production vertices. */ VertexMap prov; /** * The mapping of particles to their decy vertices. */ VertexMap decv; /** * The mapping between temporary vertices and the created GenVertex Objects. */ GenVertexMap vmap; /** * The energy unit to be used in the GenEvent. */ Energy energyUnit; /** * The length unit to be used in the GenEvent. */ Length lengthUnit; }; } #include "HepMCConverter.tcc" #endif /* ThePEG_HepMCConverter_H */ diff --git a/src/TestLHAPDF.h b/src/TestLHAPDF.h --- a/src/TestLHAPDF.h +++ b/src/TestLHAPDF.h @@ -1,89 +1,89 @@ // -*- C++ -*- // // TestLHAPDF.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2017 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_TestLHAPDF_H #define ThePEG_TestLHAPDF_H // // This is the declaration of the TestLHAPDF class. // // CLASSDOC SUBSECTION Description: // // // // CLASSDOC SUBSECTION See also: // // .h, // .h. // #include "ThePEG/Repository/Main.h" namespace ThePEG { /** * Class derived from Main to do simple tests of the LHAPDF class. */ class TestLHAPDF: public Main { public: /** * Standard Init function used to initialize the interfaces. This is * where all the tests are done. */ static void Init(); private: /** * Describe a concrete class without persistent data. */ static NoPIOClassDescription initTestLHAPDF; /** * Private and non-existent assignment operator. */ - TestLHAPDF & operator=(const TestLHAPDF &); + TestLHAPDF & operator=(const TestLHAPDF &) = delete; }; } // CLASSDOC OFF #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ // The following template specialization informs ThePEG about the // base class of TestLHAPDF. template <> struct BaseClassTrait: public ClassTraitsType { typedef Main NthBase; }; // The following template specialization informs ThePEG about the // name of this class and the shared object where it is defined. template <> struct ClassTraits : public ClassTraitsBase { static string className() { return "ThePEG::TestLHAPDF"; } // Return the class name. static string library() { return "TestLHAPDF.so"; } // Return the name of the shared library to be loaded to get // access to this class and every other class it uses // (except the base class). }; /** @endcond */ } #endif /* ThePEG_TestLHAPDF_H */