diff --git a/Analysis/EventShapes.h b/Analysis/EventShapes.h --- a/Analysis/EventShapes.h +++ b/Analysis/EventShapes.h @@ -1,692 +1,692 @@ // -*- C++ -*- // // EventShapes.h is a part of ThePEG - Toolkit for HEP Event Generation // Copyright (C) 1999-2007 Leif Lonnblad // // ThePEG is licenced under version 2 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef ThePEG_EventShapes_H #define ThePEG_EventShapes_H // // This is the declaration of the EventShapes class. // #include "ThePEG/Interface/Interfaced.h" #include "ThePEG/Handlers/AnalysisHandler.h" #include "ThePEG/Vectors/Lorentz5Vector.h" #include "ThePEG/Vectors/ThreeVector.h" #include "ThePEG/EventRecord/Particle.h" #include "EventShapes.fh" namespace ThePEG { /** * * The EventShapes class is designed so that certain event shapes, such * as the thrust are only calculated once per event given the speed of * the calculation. * * @see \ref EventShapesInterfaces "The interfaces" defined for * EventShapes. */ class EventShapes: public Interfaced { public: /** * Member to reset the particles to be considered */ inline void reset(const tPVector &part) { _pv.resize(part.size()); for(unsigned int ix=0;ixmomentum(); _thrustDone = false; _spherDone = false; _linTenDone = false; _hemDone = false; _useCmBoost = false; } public: /** * Member functions to return thrust related shapes */ //@{ /** * The thrust */ inline double thrust() { checkThrust(); return _thrust[0]; } /** * The major */ inline double thrustMajor() { checkThrust(); return _thrust[1]; } /** * The minor */ inline double thrustMinor() { checkThrust(); return _thrust[2]; } /** * The oblateness */ inline double oblateness() { checkThrust(); return _thrust[1]-_thrust[2]; } /** * The thrust axis */ inline Axis thrustAxis() { checkThrust(); return _thrustAxis[0]; } /** * The major axis */ inline Axis majorAxis() { checkThrust(); return _thrustAxis[1]; } /** * The minor axis */ inline Axis minorAxis() { checkThrust(); return _thrustAxis[2]; } //@} /** * Linear momentum tensor related event shapes */ //@{ /** * The C parameter */ inline double CParameter() { checkLinTen(); return 3.*(_linTen[0]*_linTen[1]+_linTen[1]*_linTen[2] +_linTen[2]*_linTen[0]); } /** * The D parameter */ inline double DParameter() { checkLinTen(); return 27.*(_linTen[0]*_linTen[1]*_linTen[2]); } /** * The eigenvalues in descending order */ inline vector linTenEigenValues() { checkLinTen(); return _linTen; } /** * The eigenvectors in order of descending eigenvalue */ inline vector linTenEigenVectors() { checkLinTen(); return _linTenAxis; } //@} /** * Quadratic momentum tensor related variables */ //@{ /** * The sphericity */ inline double sphericity() { checkSphericity(); return 3./2.*(_spher[1]+_spher[2]); } /** * The aplanarity */ inline double aplanarity() { checkSphericity(); return 3./2.*_spher[2]; } /** * The planarity */ inline double planarity() { checkSphericity(); return _spher[1]-_spher[2]; } /** * The sphericity axis */ inline Axis sphericityAxis() { checkSphericity(); return _spherAxis[0]; } /** * The sphericity eigenvalues */ inline vector sphericityEigenValues() { checkSphericity(); return _spher; } /** * The sphericity eigenvectors */ inline vector sphericityEigenVectors() { checkSphericity(); return _spherAxis; } //@} /** * Jet mass related event shapes */ //@{ /** * The high hemishpere mass squared divided by the visible energy * squared */ inline double Mhigh2() { checkHemispheres(); return _mPlus; } /** * The low hemishpere mass squared divided by the visible energy * squared */ inline double Mlow2() { checkHemispheres(); return _mMinus; } /** * The difference between the * hemishpere masses squared divided by the visible energy squared */ inline double Mdiff2() { checkHemispheres(); return _mPlus-_mMinus; } //@} /** * Jet broadening related event shapes */ //@{ /** * The wide jet broadening */ inline double Bmax() { checkHemispheres(); return _bPlus; } /** * The narrow jet broadening */ inline double Bmin() { checkHemispheres(); return _bMinus; } /** * The sum of the jet broadenings */ inline double Bsum() { checkHemispheres(); return _bPlus+_bMinus; } /** * The difference of the jet broadenings */ inline double Bdiff() { checkHemispheres(); return _bPlus-_bMinus; } //@} /** * Single particle variables which do not depend on event shapes axes */ //@{ /** * The scaled momentum \f$\xi=-\log\left( p/E_{\rm beam}\right)\f$. */ inline double getXi(const Lorentz5Momentum & p, const Energy & Ebeam) { return((Ebeam > 0*MeV && p.vect().mag() > 0*MeV) ? log(Ebeam/p.vect().mag()) : -1.); } /** * Transverse momentum with respect to the beam */ inline Energy getPt(const Lorentz5Momentum & p) { return p.perp(); } /** * Rapidity with respect to the beam direction */ inline double getRapidity(const Lorentz5Momentum & p) { return (p.t() > p.z() ? p.rapidity() : 1e99); } //@} /** * Single particle variables related to one of the shape axis. */ //@{ /** * Transverse momentum with respect to the thrust axis in the event plane */ inline Energy ptInT(const Lorentz5Momentum & p) { checkThrust(); return p.vect()*_thrustAxis[1]; } /** * Transverse momentum with respect to the thrust axis out of the * event plane */ inline Energy ptOutT(const Lorentz5Momentum & p) { checkThrust(); return p.vect()*_thrustAxis[2]; } /** * Rapidity with respect to the thrust axis */ inline double yT(const Lorentz5Momentum & p) { checkThrust(); return (p.t() > p.vect()*_thrustAxis[0] ? p.rapidity(_thrustAxis[0]) : 1e99); } /** * Transverse momentum with respect to the sphericity axis in the * event plane */ inline Energy ptInS(const Lorentz5Momentum & p) { checkSphericity(); return p.vect()*_spherAxis[1]; } /** * Transverse momentum with respect to the sphericity axis out of the * event plane */ inline Energy ptOutS(const Lorentz5Momentum & p) { checkSphericity(); return p.vect()*_spherAxis[2]; } /** * Rapidity with respect to the sphericity axis */ inline double yS(const Lorentz5Momentum & p) { checkSphericity(); return (p.t() > p.vect()*_spherAxis[0] ? p.rapidity(_spherAxis[0]) : 1e99); } //@} /** * Energy-energy correlation (EEC) @param hi is the histogram and has * to be provided externally It is understood that the range of the * histogam is -1 < cos(chi) < 1. hi.front() contains the bin [-1 < * cos(chi) < -1+delta] and hi.back() the bin [1-delta < cos(chi) < * 1]. delta = 2/hi.size(). We use classical indices to access the * vector. */ void bookEEC(vector & hi); /** * Before writing the histogram it has to be normalized according to * the number of events. */ inline void normalizeEEC(vector & hi, long evts) { for (unsigned int bin = 0; bin < hi.size(); bin++) bin /= (hi.size()*evts); } /** * The asymmetry of EEC is calculated from a given \f$\cos\chi\f$ and * EEC histogram, which is a vector as described above. */ inline double AEEC(vector & hi, double& coschi) { if (coschi > 0. && coschi <= 1.) { int i = static_cast( floor((-coschi+1.)/2.*hi.size()) ); int j = static_cast( floor(( coschi+1.)/2.*hi.size()) ); return hi[i]-hi[j]; } else { return 1e99; } } public: /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or when this class is dynamically * loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. @return a pointer to the new * object. */ inline virtual IBPtr clone() const {return new_ptr(*this);} /** Make a clone of this object, possibly modifying the cloned object * to make it sane. @return a pointer to the new object. */ inline virtual IBPtr fullclone() const {return new_ptr(*this);} //@} private: /** * Check whether the initialization of a certain class of event shapes * has been calculated and if not do so */ //@{ /** * Check if thrust related variables have been calculated and if not * do so */ inline void checkThrust() { if (!_thrustDone) { _thrustDone = true; calculateThrust(); } } /** * Check if the linear tensor related variables have been calculated * and if not do so */ inline void checkLinTen() { if (!_linTenDone) { _linTenDone = true; diagonalizeTensors(true, _useCmBoost); } } /** * Check if the quadratic tensor related variables have been * calculated and if not do so */ inline void checkSphericity() { if (!_spherDone) { _spherDone = true; diagonalizeTensors(false, _useCmBoost); } } /** * Check if the hemisphere mass variables and jet broadenings have * been calculated and if not do so */ inline void checkHemispheres() { if (!_hemDone) { _hemDone = true; calcHemisphereMasses(); } } //@} /** * Methods that actually calculate the event shapes */ //@{ /** * Calculate the hemisphere masses and jet broadenings */ void calcHemisphereMasses(); /** * Calculate the thrust and related axes */ void calculateThrust(); /** * Diagonalize the tensors @param linear switch between * diagonalization of linear/quadratic tensor. @param cmboost tells * whether to boost into cm frame of all momenta first, or not * (default off, and no interface to this). */ void diagonalizeTensors(bool linear, bool cmboost); /** * Quite general diagonalization of a symmetric Matrix T, given as an * array of doubles. The symmetry is not checked explicitly as this * is clear in the context. It uses an explicit generic solution of * the eigenvalue problem and no numerical approximation, based on * Cardano's formula. @param T Matrix to be diagonalised */ vector eigenvalues(const double T[3][3]); /** * The eigenvector of @param T to a given eigenvalue @param lam */ Axis eigenvector(const double T[3][3], const double &lam); /** * The eigenvectors of @param T corresponding to the eigenvectors * @param lam . The ordering of the vectors corresponds to the * ordering of the eigenvalues. */ vector eigenvectors(const double T[3][3], const vector &lam); /** * Member to calculate the thrust * @param p The three vectors * @param t The thrust-squared (up to an Energy scale factor) * @param taxis The thrust axis */ void calcT(const vector &p, Energy2 &t, Axis &taxis); /** * Member to calculate the major * @param p The three vectors * @param m The major-squared (up to an Energy scale factor) * @param maxis The major axis */ void calcM(const vector &p, Energy2 &m, Axis &maxis); //@} private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static NoPIOClassDescription initEventShapes; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - EventShapes & operator=(const EventShapes &); + EventShapes & operator=(const EventShapes &) = delete; private: /** * Vector of particle momenta to be analysed */ vector _pv; /** * Various event shape axes */ //@{ /** * The thrust related axes */ vector _thrustAxis; /** * The sphericity related axes */ vector _spherAxis; /** * The linearised tensor axes */ vector _linTenAxis; //@} /** * Values of axis related event shapes */ //@{ /** * Values of thrust related variables */ vector _thrust; /** * Values of sphericity related variables */ vector _spher; /** * Values of linearized tensor related variables */ vector _linTen; //@} /** * Whether or not certain event axes have been calculated */ //@{ /** * Whether or not the thrust is calculated */ bool _thrustDone; /** * Whether or not the sphericity is calculated */ bool _spherDone; /** * Whether or not the linearizes tensor is calculated */ bool _linTenDone; /** * Whether or not the hemisphere masses have been calculated */ bool _hemDone; //@} /** * Whether ot not to boost to the CMS frame for the tensor diagonalizations */ bool _useCmBoost; /** * Hemisphere masses */ //@{ /** * The high hemisphere mass */ double _mPlus; /** * The low hemisphere mass */ double _mMinus; //@} /** * The jet broadenings */ //@{ /** * The wide jet broadening */ double _bPlus; /** * The narrow jet broadening */ double _bMinus; //@} }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of EventShapes. */ template <> struct BaseClassTrait { /** Typedef of the first base class of EventShapes. */ typedef Interfaced NthBase; }; /** This template specialization informs ThePEG about the name of * the EventShapes 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::EventShapes"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the EventShapes class and any other class on which it depends * (except the base class). */ static string library() { return "LEPEventShapes.so"; } }; /** @endcond */ } #endif /* ThePEG_EventShapes_H */ diff --git a/Analysis/LEPEventShapes.h b/Analysis/LEPEventShapes.h --- a/Analysis/LEPEventShapes.h +++ b/Analysis/LEPEventShapes.h @@ -1,281 +1,281 @@ // -*- C++ -*- #ifndef THEPEG_LEPEventShapes_H #define THEPEG_LEPEventShapes_H // // This is the declaration of the LEPEventShapes class. // #include "ThePEG/Handlers/AnalysisHandler.h" #include "ThePEG/Vectors/Lorentz5Vector.h" #include "EventShapes.h" #include "LEPEventShapes.fh" namespace ThePEG { /** * The LEPEventShapes class performs the analysis of global event shapes and * compares with LEP data. This handler is solely intended as a slave * handler for the EventShapesMasterAnalysis class. * * @see \ref LEPEventShapesInterfaces "The interfaces" * defined for LEPEventShapes */ class LEPEventShapes: public AnalysisHandler { public: /** @name Virtual functions required by the AnalysisHandler class. */ //@{ /** * Analyze a given Event. Note that a fully generated event * may be presented several times, if it has been manipulated in * between. The default version of this function will call transform * to make a lorentz transformation of the whole event, then extract * all final state particles and call analyze(tPVector) of this * analysis object and those of all associated analysis objects. The * default version will not, however, do anything on events which * have not been fully generated, or have been manipulated in any * way. * @param event pointer to the Event to be analyzed. * @param ieve the event number. * @param loop the number of times this event has been presented. * If negative the event is now fully generated. * @param state a number different from zero if the event has been * manipulated in some way since it was last presented. */ virtual void analyze(tEventPtr event, long ieve, int loop, int state); /** * Transform the event to the desired Lorentz frame and return the * corresponding LorentzRotation. * @param event a pointer to the Event to be transformed. * @return the LorentzRotation used in the transformation. */ virtual LorentzRotation transform(tEventPtr event) const; /** * Analyze the given vector of particles. The default version calls * analyze(tPPtr) for each of the particles. * @param particles the vector of pointers to particles to be analyzed */ virtual void analyze(const tPVector & particles); /** * Analyze the given particle. * @param particle pointer to the particle to be analyzed. */ virtual void analyze(tPPtr particle); //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ inline virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ inline virtual IBPtr fullclone() const; //@} protected: /** @name Standard Interfaced functions. */ //@{ /** * 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: /** * Function that creates a dataset using the specified binning * datavalue and error. */ void dataSet(const std::string & path, const std::string & title, const std::vector & bins, const std::vector & y, const std::vector & yerr); private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initLEPEventShapes; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - LEPEventShapes & operator=(const LEPEventShapes &); + LEPEventShapes & operator=(const LEPEventShapes &) = delete; private: /** * Histogram for \f$1-T\f$ distribution. */ tH1DPtr _omthr; /** * Histogram for the major distribution */ tH1DPtr _maj; /** * Histogram for the minor distribution */ tH1DPtr _min; /** * Histogram for the oblateness distribution */ tH1DPtr _obl; /** * Histogram for the sphericity distribution */ tH1DPtr _sph; /** * Histogram for the aplanarity distribution */ tH1DPtr _apl; /** * Histogram for the planarity distribution */ tH1DPtr _pla; /** * Histogram for the C distribution */ tH1DPtr _c; /** * Histogram for the D distribution */ tH1DPtr _d; /** * Histogram for the \f$M_{\rm high}\f$ distribution */ tH1DPtr _mhi; /** * Histogram for the \f$M_{\rm low}\f$ distribution */ tH1DPtr _mlo; /** * Histogram for the \f$M_{\rm high}-M_{\rm low}\f$ distribution */ tH1DPtr _mdiff; /** * Histogram for the \f$B_{\rm max}\f$ distribution */ tH1DPtr _bmax; /** * Histogram for the \f$B_{\rm min}\f$ distribution */ tH1DPtr _bmin; /** * Histogram for the \f$B_{\rm max}+B_{\rm min}\f$ distribution */ tH1DPtr _bsum; /** * Histogram for the \f$B_{\rm max}-B_{\rm min}\f$ distribution */ tH1DPtr _bdiff; /** * Pointer to the object which calculates the event shapes */ EventShapesPtr _shapes; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of LEPEventShapes. */ template <> struct BaseClassTrait { /** Typedef of the first base class of LEPEventShapes. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the LEPEventShapes 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::LEPEventShapes"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the LEPEventShapes class and any other class on which it depends * (except the base class). */ static string library() { return "LEPEventShapes.so"; } }; /** @endcond */ } #include "LEPEventShapes.icc" #ifndef ThePEG_TEMPLATES_IN_CC_FILE // #include "LEPEventShapes.tcc" #endif #endif /* THEPEG_LEPEventShapes_H */ diff --git a/Analysis/MultiplicityCount.h b/Analysis/MultiplicityCount.h --- a/Analysis/MultiplicityCount.h +++ b/Analysis/MultiplicityCount.h @@ -1,275 +1,275 @@ // -*- C++ -*- #ifndef THEPEG_MultiplicityCount_H #define THEPEG_MultiplicityCount_H // // This is the declaration of the MultiplicityCount class. // #include "ThePEG/Handlers/AnalysisHandler.h" #include "ThePEG/Repository/Repository.h" #include "ThePEG/PDT/ParticleData.h" #include "MultiplicityCount.fh" namespace ThePEG { /** * Enumeration for species of particle */ enum ParticleSpecies { lightMeson=0,strangeMeson,lightBaryon,other }; /** * Struct for the multiplcity data */ struct MultiplicityInfo { /** * Default constructor * @param mult The observed multiplcity. * @param error The error on the observed multiplicity * @param type The type of particle */ inline MultiplicityInfo(double mult=0.,double error=0., ParticleSpecies type=other); /** * The observed multiplicity */ double mult; /** * The error on the observed multiplicity */ double error; /** * The type of particle */ ParticleSpecies type; /** * Number of particles of this type */ double actualCount; /** * Sum of squares of number per event for error */ double sumofsquares; /** * The average number per event * @param N The sum of the event weights */ double mean(double N); /** * The error on the average number per event * @param N The sum of the event weights */ double stderror(double N); /** * Is the result more than \f$3\sigma\f$ from the experimental result * @param N The sum of the event weights */ bool serious(double N); }; /** * The MultiplicityCount class is designed to count particle multiplicities and * compare them to LEP data. * * @see \ref MultiplicityCountInterfaces "The interfaces" * defined for MultiplicityCount. */ class MultiplicityCount: public AnalysisHandler { public: /** * The default constructor. */ MultiplicityCount(); public: /** @name Virtual functions required by the AnalysisHandler class. */ //@{ /** * Analyze a given Event. Note that a fully generated event * may be presented several times, if it has been manipulated in * between. The default version of this function will call transform * to make a lorentz transformation of the whole event, then extract * all final state particles and call analyze(tPVector) of this * analysis object and those of all associated analysis objects. The * default version will not, however, do anything on events which * have not been fully generated, or have been manipulated in any * way. * @param event pointer to the Event to be analyzed. * @param ieve the event number. * @param loop the number of times this event has been presented. * If negative the event is now fully generated. * @param state a number different from zero if the event has been * manipulated in some way since it was last presented. */ virtual void analyze(tEventPtr event, long ieve, int loop, int state); /** * Transform the event to the desired Lorentz frame and return the * corresponding LorentzRotation. * @param event a pointer to the Event to be transformed. * @return the LorentzRotation used in the transformation. */ virtual LorentzRotation transform(tEventPtr event) const; /** * Analyze the given vector of particles. The default version calls * analyze(tPPtr) for each of the particles. * @param particles the vector of pointers to particles to be analyzed */ virtual void analyze(const tPVector & particles); /** * Analyze the given particle. * @param particle pointer to the particle to be analyzed. */ virtual void analyze(tPPtr particle); //@} public: /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ inline virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ inline virtual IBPtr fullclone() const; //@} protected: /** @name Standard Interfaced functions. */ //@{ /** * Finalize this object. Called in the run phase just after a * run has ended. Used eg. to write out statistics. */ inline virtual void dofinish(); //@} private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static NoPIOClassDescription initMultiplicityCount; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MultiplicityCount & operator=(const MultiplicityCount &); + MultiplicityCount & operator=(const MultiplicityCount &) = delete; private: /** * The PDG codes of the particles */ vector _particlecodes; /** * The multiplcity */ vector _multiplicity; /** * The error */ vector _error; /** * Species of particle */ vector _species; /** * Map of PDG codes to multiplicity info */ map _data; /** * Map of number of final-state particles to PDG code */ map _finalstatecount; /** * Particles in hard process */ map _collisioncount; /** * The sum of the event weights */ double weightSum; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of MultiplicityCount. */ template <> struct BaseClassTrait { /** Typedef of the first base class of MultiplicityCount. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the MultiplicityCount 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::MultiplicityCount"; } /** Return the name(s) of the shared library (or libraries) be loaded to get * access to the MultiplicityCount class and any other class on which it depends * (except the base class). */ static string library() { return "MultiplicityCount.so"; } }; /** @endcond */ } #include "MultiplicityCount.icc" #ifndef ThePEG_TEMPLATES_IN_CC_FILE // #include "MultiplicityCount.tcc" #endif #endif /* THEPEG_MultiplicityCount_H */ diff --git a/Decay/TestDecays.h b/Decay/TestDecays.h --- a/Decay/TestDecays.h +++ b/Decay/TestDecays.h @@ -1,87 +1,87 @@ // -*- C++ -*- #ifndef THEPEG_TestDecays_H #define THEPEG_TestDecays_H // // This is the declaration of the TestDecays class. // // CLASSDOC SUBSECTION Description: // // // // CLASSDOC SUBSECTION See also: // // .h, // .h. // #include "ThePEG/Repository/Main.h" // #include "TestDecays.fh" // #include "TestDecays.xh" namespace ThePEG { class TestDecays: public Main { public: inline TestDecays(); inline TestDecays(const TestDecays &); virtual ~TestDecays(); // Standard ctors and dtor. public: static void testDecay(tEGPtr eg, long id, int N); static void testGG(tEGPtr eg, Energy W, int N); static void Init(); // Standard Init function used to initialize the interfaces. private: static NoPIOClassDescription initTestDecays; // Describe a concrete class without persistent data. - TestDecays & operator=(const TestDecays &); + TestDecays & operator=(const TestDecays &) = delete; // Private and non-existent assignment operator. }; } // CLASSDOC OFF namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ // The following template specialization informs ThePEG about the // base class of TestDecays. 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::TestDecays"; } // Return the class name. static string library() { return "TestDecays.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 */ } #include "TestDecays.icc" #ifndef ThePEG_TEMPLATES_IN_CC_FILE // #include "TestDecays.tcc" #endif #endif /* THEPEG_TestDecays_H */ diff --git a/HZTOOL/HZTool.h b/HZTOOL/HZTool.h --- a/HZTOOL/HZTool.h +++ b/HZTOOL/HZTool.h @@ -1,300 +1,300 @@ // -*- C++ -*- #ifndef THEPEG_HZTool_H #define THEPEG_HZTool_H // // This is the declaration of the HZTool class. // #include "ThePEG/Handlers/AnalysisHandler.h" namespace ThePEG { /** * This class wraps the HZTool fortran library. The specified * functions of in the HZTool library will be called for each event * (after the ThePEG::Event is first converted to a HepMC::GenEvent * and then translated to the HEPEVT fortran common block). Note that * only one HZTool AnalysisHandler can be used for a given * EventGenerator, otherwise the result is undefined. * * @see \ref HZToolInterfaces "The interfaces" * defined for HZTool. */ class HZTool: public AnalysisHandler { public: /** * Typedef of pointer to standard HZTool analysis routine. */ typedef void (*HZAnaFn)(const int &); /** * A vector of function pointers. */ typedef vector HZAnaFnVector; /** * A vector of strings. */ typedef vector StringVector; public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ inline HZTool(); /** * The copy constructor. */ inline HZTool(const HZTool &); /** * The destructor. */ virtual ~HZTool(); //@} public: /** @name Virtual functions required by the AnalysisHandler class. */ //@{ /** * Analyze a given Event. Note that a fully generated event * may be presented several times, if it has been manipulated in * between. The default version of this function will call transform * to make a lorentz transformation of the whole event, then extract * all final state particles and call analyze(tPVector) of this * analysis object and those of all associated analysis objects. The * default version will not, however, do anything on events which * have not been fully generated, or have been manipulated in any * way. * @param event pointer to the Event to be analyzed. * @param ieve the event number. * @param loop the number of times this event has been presented. * If negative the event is now fully generated. * @param state a number different from zero if the event has been * manipulated in some way since it was last presented. */ virtual void analyze(tEventPtr event, long ieve, int loop, int state); /** * Transform the event to the desired Lorentz frame and return the * corresponding LorentzRotation. * @param event a pointer to the Event to be transformed. * @return the LorentzRotation used in the transformation. */ virtual LorentzRotation transform(tEventPtr event) const; /** * Analyze the given vector of particles. The default version calls * analyze(tPPtr) for each of the particles. * @param particles the vector of pointers to particles to be analyzed */ virtual void analyze(const tPVector & particles); /** * Analyze the given particle. * @param particle pointer to the particle to be analyzed. */ virtual void analyze(tPPtr particle); //@} public: /** * The filename to which the HZTool histograms are written. If empty * the name of the controlling EventGenerator is used instead. The * standard '.rz' suffix is added to the name. */ inline string filename() const; /** * Add the exchanged boson in a DIS event to the HEPEVT event * record. For some reason HZTool needs this, rather than figuring * it out from the scattered lepton. Also changes the direction of * the beams to fit the assumptions of HZTool. If this is not a DIS * event nothing is modified. * * @param sub the primary sub-process. */ static void addDISLepton(const SubProcess & sub); protected: /** * Return a function pointer to the standard HZTool analysis routine * called \a name. Returns null if no routine is found. */ static HZAnaFn getFunctionPointer(string name); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ inline virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ inline virtual IBPtr fullclone() const; //@} protected: /** @name Standard Interfaced functions. */ //@{ /** * 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 filename to which the HZTool histograms are written. If empty * the name of the controlling EventGenerator is used instead. The * standard '.rz' suffix is added to the name. */ string theFilename; /** * The names of the HZTool analysis routines to be called in this * analysis handler. */ StringVector functionNames; /** * The function pointers corresponding to the functionNames. */ HZAnaFnVector functions; /** * The sum of all event weights in a run. */ double sumweight; public: /** * Utility function for the interface. */ void insertFunction(string name, int pos); /** * Utility function for the interface. */ void setFunction(string name, int pos); /** * Utility function for the interface. */ void delFunction(int pos); /** * Exception class used if non existing HZTool function is requested. */ struct MissingFunction: public InterfaceException {}; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initHZTool; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - HZTool & operator=(const HZTool &); + HZTool & operator=(const HZTool &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of HZTool. */ template <> struct BaseClassTrait { /** Typedef of the first base class of HZTool. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the HZTool 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::HZTool"; } /** * The name of a file containing the dynamic library where the class * HZTool is implemented. It may also include several, space-separated, * libraries if the class HZTool 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 "HZTool.so"; } }; /** @endcond */ } #include "HZTool.icc" #ifndef ThePEG_TEMPLATES_IN_CC_FILE // #include "HZTool.tcc" #endif #endif /* THEPEG_HZTool_H */ diff --git a/HerwigTest/DYMass.h b/HerwigTest/DYMass.h --- a/HerwigTest/DYMass.h +++ b/HerwigTest/DYMass.h @@ -1,237 +1,237 @@ // -*- C++ -*- #ifndef THEPEG_DYMass_H #define THEPEG_DYMass_H // // This is the declaration of the DYMass class. // #include "ThePEG/Handlers/AnalysisHandler.h" #include "DYMass.fh" namespace ThePEG { /** * Here is the documentation of the DYMass class. * * @see \ref DYMassInterfaces "The interfaces" * defined for DYMass. */ class DYMass: public AnalysisHandler { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ inline DYMass(); /** * The copy constructor. */ inline DYMass(const DYMass &); /** * The destructor. */ virtual ~DYMass(); //@} public: /** @name Virtual functions required by the AnalysisHandler class. */ //@{ /** * Analyze a given Event. Note that a fully generated event * may be presented several times, if it has been manipulated in * between. The default version of this function will call transform * to make a lorentz transformation of the whole event, then extract * all final state particles and call analyze(tPVector) of this * analysis object and those of all associated analysis objects. The * default version will not, however, do anything on events which * have not been fully generated, or have been manipulated in any * way. * @param event pointer to the Event to be analyzed. * @param ieve the event number. * @param loop the number of times this event has been presented. * If negative the event is now fully generated. * @param state a number different from zero if the event has been * manipulated in some way since it was last presented. */ virtual void analyze(tEventPtr event, long ieve, int loop, int state); /** * Transform the event to the desired Lorentz frame and return the * corresponding LorentzRotation. * @param event a pointer to the Event to be transformed. * @return the LorentzRotation used in the transformation. */ virtual LorentzRotation transform(tEventPtr event) const; /** * Analyze the given vector of particles. The default version calls * analyze(tPPtr) for each of the particles. * @param particles the vector of pointers to particles to be analyzed */ virtual void analyze(const tPVector & particles); /** * Analyze the given particle. * @param particle pointer to the particle to be analyzed. */ virtual void analyze(tPPtr particle); //@} public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ inline virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ inline virtual IBPtr fullclone() const; //@} protected: /** @name Standard Interfaced functions. */ //@{ /** * Check sanity of the object during the setup phase. */ inline virtual void doupdate(); /** * Initialize this object after the setup phase before saving and * EventGenerator to disk. * @throws InitException if object could not be initialized properly. */ inline virtual void doinit(); /** * Initialize this object. Called in the run phase just before * a run begins. */ virtual void doinitrun(); /** * Finalize this object. Called in the run phase just after a * run has ended. Used eg. to write out statistics. */ virtual void dofinish(); /** * Rebind pointer to other Interfaced objects. Called in the setup phase * after all objects used in an EventGenerator has been cloned so that * the pointers will refer to the cloned objects afterwards. * @param trans a TranslationMap relating the original objects to * their respective clones. * @throws RebindException if no cloned object was found for a given * pointer. */ inline virtual void rebind(const TranslationMap & trans); /** * Return a vector of all pointers to Interfaced objects used in this * object. * @return a vector of pointers. */ inline virtual IVector getReferences(); //@} private: tH1DPtr hist; tH1DPtr vhist; private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initDYMass; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - DYMass & operator=(const DYMass &); + DYMass & operator=(const DYMass &) = delete; }; } // CLASSDOC OFF #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of DYMass. */ template <> struct BaseClassTrait { /** Typedef of the first base class of DYMass. */ typedef AnalysisHandler NthBase; }; /** This template specialization informs ThePEG about the name of * the DYMass 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::DYMass"; } /** Return the name of the shared library be loaded to get * access to the DYMass class and every other class it uses * (except the base class). */ static string library() { return "DYMass.so"; } }; /** @endcond */ } #include "DYMass.icc" #ifndef ThePEG_TEMPLATES_IN_CC_FILE // #include "DYMass.tcc" #endif #endif /* THEPEG_DYMass_H */ diff --git a/HerwigTest/MEqq2gZ2ll.h b/HerwigTest/MEqq2gZ2ll.h --- a/HerwigTest/MEqq2gZ2ll.h +++ b/HerwigTest/MEqq2gZ2ll.h @@ -1,128 +1,128 @@ // -*- C++ -*- #ifndef ThePEG_MEqq2gZ2ll_H #define ThePEG_MEqq2gZ2ll_H // // This is the declaration of the MEqq2gZ2ll class. // // CLASSDOC SUBSECTION Description: // // The MEqq2gZ2ll class implements the // e+e- -> gamma/Z0 -> // q+qbar matrix element. Both the continuum and // Z0 pole term as well as the interference term is // included. Although not a strict QCD matrix element the cass // inherits from ME2to2Base, mainly to inherit the // parameter for the number of active quark flavours. // // CLASSDOC SUBSECTION See also: // // ME2to2QCD.h. // #include "ThePEG/MatrixElement/ME2to2QCD.h" using namespace ThePEG; namespace Herwig { class MEqq2gZ2ll: public ME2to2QCD { public: MEqq2gZ2ll(); MEqq2gZ2ll(const MEqq2gZ2ll &); virtual ~MEqq2gZ2ll(); // Standard ctors and dtor public: virtual unsigned int orderInAlphaS() const; virtual unsigned int orderInAlphaEW() const; // Return the order in respective couplings in which this matrix // element is given. Returns 0 and 2 respectively. virtual double me2() const; // Return the matrix element for the kinematical configuation // previously provided by the last call to setKinematics(). virtual void getDiagrams() const; // Add all possible diagrams with the add() function. virtual Selector colourGeometries(tcDiagPtr diag) const; // Return a Selector with possible colour geometries for the selected // diagram weighted by their relative probabilities. virtual Selector diagrams(const DiagramVector &) const; // Weight the given diagrams with their relative probabilities. virtual Energy2 scale() const; // Return the scale associated with the last set phase space point. public: void persistentOutput(PersistentOStream &) const; void persistentInput(PersistentIStream &, int); // Standard functions for writing and reading from persistent streams. static void Init(); // Standard Init function used to initialize the interface. protected: virtual IBPtr clone() const; virtual IBPtr fullclone() const; // Standard clone methods virtual void doinit(); // Standard Interfaced virtual functions. protected: vector coefs; // Constants for the different terms set from the StandardModel in // the init() function. Energy2 mZ2; Energy2 GZ2; // The mass squared and width squared of the Z0. mutable double lastCont; mutable double lastBW; // The last continuum and Breit-Wigner terms to be used to select // primary diagram. private: static ClassDescription initMEqq2gZ2ll; - MEqq2gZ2ll & operator=(const MEqq2gZ2ll &); + MEqq2gZ2ll & operator=(const MEqq2gZ2ll &) = delete; // Private and non-existent assignment operator. }; } namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ template <> struct BaseClassTrait: public ClassTraitsType { typedef ME2to2QCD NthBase; }; template <> struct ClassTraits : public ClassTraitsBase { static string className() { return "/Herwig++/MEqq2gZ2ll"; } static string library() { return "MEqq2gZ2ll.so"; } }; /** @endcond */ } #include "MEqq2gZ2ll.icc" #endif /* ThePEG_MEqq2gZ2ll_H */ diff --git a/Misc/TestMisc.h b/Misc/TestMisc.h --- a/Misc/TestMisc.h +++ b/Misc/TestMisc.h @@ -1,84 +1,84 @@ // -*- C++ -*- #ifndef THEPEG_TestMisc_H #define THEPEG_TestMisc_H // // This is the declaration of the TestMisc class. // // CLASSDOC SUBSECTION Description: // // // // CLASSDOC SUBSECTION See also: // // .h, // .h. // #include "ThePEG/Repository/Main.h" // #include "TestMisc.fh" // #include "TestMisc.xh" namespace ThePEG { class TestMisc: public Main { public: inline TestMisc(); inline TestMisc(const TestMisc &); virtual ~TestMisc(); // Standard ctors and dtor. public: static void Init(); // Standard Init function used to initialize the interfaces. private: static NoPIOClassDescription initTestMisc; // Describe a concrete class without persistent data. - TestMisc & operator=(const TestMisc &); + TestMisc & operator=(const TestMisc &) = delete; // Private and non-existent assignment operator. }; } // CLASSDOC OFF namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ // The following template specialization informs ThePEG about the // base class of TestMisc. 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::TestMisc"; } // Return the class name. static string library() { return "TestMisc.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 */ } #include "TestMisc.icc" #ifndef ThePEG_TEMPLATES_IN_CC_FILE // #include "TestMisc.tcc" #endif #endif /* THEPEG_TestMisc_H */