diff --git a/MatrixElement/Matchbox/Utility/DensityOperator.h b/MatrixElement/Matchbox/Utility/DensityOperator.h --- a/MatrixElement/Matchbox/Utility/DensityOperator.h +++ b/MatrixElement/Matchbox/Utility/DensityOperator.h @@ -1,248 +1,248 @@ // -*- C++ -*- // // DensityOperator.h is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2019 The Herwig Collaboration // // Herwig is licenced under version 2 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef Herwig_DensityOperator_H #define Herwig_DensityOperator_H // // This is the declaration of the DensityOperator class. // #include "ThePEG/Handlers/HandlerBase.h" #include "Herwig/MatrixElement/Matchbox/Utility/ColourBasis.h" #include #include #include namespace Herwig { using namespace ThePEG; typedef boost::numeric::ublas::vector CVector; /** * Here is the documentation of the DensityOperator class. * * @see \ref DensityOperatorInterfaces "The interfaces" * defined for DensityOperator. */ class DensityOperator: public HandlerBase { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ DensityOperator(); /** * The destructor. */ virtual ~DensityOperator(); //@} public: /** * Clears theDensityOperatorMap. */ void clear(); /** * Prepare for the given sub process. */ void prepare(const cPDVector&); /** * Fill the density operator for the given hard subprocess, summing over all * helicity configurations. */ void fill(const Ptr::ptr, const cPDVector&, const vector& momenta); /** * Evolve the density operator, by * M_{n+1} = -\sum_{i,k}{-4*pi*alpha_s/Ti2*V_{ij,k} T_{i,n}M_nT_{k,n}^\dag}, * see arXiv:1206.0180 eq. (5), note that the pi*pj factor is assumed to be * included in V_{ij,k}. */ void evolve(const map,Complex>& Vijk, const cPDVector& before, const cPDVector& after, const map,map >& emissionsMap, const bool splitAGluon, const bool initialGluonSplitting); /** * Calculate the colour matrix element correction. * -(1+delta(i,gluon))/Ti^2 Tr(Sn+1 Ti Mn Tk^dagger)/Tr(Sn Mn) * where the bracket in front compensates for the gluon symmetry factor, * Ti^2 is C_f or C_a, Sn+1 is the matrix of scalar products, and * Ti is the radiation matrix. * The first arg contains (emitter index, spectator index, emission pid) * */ double colourMatrixElementCorrection(const std::tuple& ikemission, const cPDVector& particles); /** * Checking colour conservation for the colour matrix element corrections. */ void colourConservation(const cPDVector& particles); /** * Get the colour basis. */ Ptr::tptr colourBasis() { return theColourBasis; } /** * Get the colour basis. */ const Ptr::tptr colourBasis() const { return theColourBasis; } /** * Set the colour basis. */ void colourBasis(Ptr::ptr ptr) { theColourBasis = ptr; } /** * Get the correlator map. */ const map,pair >,double>& correlatorMap() const { return theCorrelatorMap; } /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a 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: /** * Number of colours used in colourNorm. */ double Nc; /** * QCD vertex normalization. */ double TR; /** * Normalization of colour charges \mathbf{T}_{ij}^2. */ double colourNorm(const cPDPtr particle); /** * Fast evaluation of Tij*Mn, where a Tij is the matrix from ColourBasis::charge, * which is a sparse matrix, and Mn is the density operator, a dense matrix. * */ matrix prodSparseDense(const compressed_matrix&, const matrix&); /** * Fast evaluation of TijMn*Tkdagger, where a TijMn is the result from the method * prodSparseDense, a dense matrix, and Tkdagger is the transponse conjugate of * the matrix from ColourBasis::charge, a sparse matrix. * */ matrix prodDenseSparse(const matrix&, const compressed_matrix&); /** * Boosts a vector of momenta to the rest frame of the initial pair * of particles (the first 2 elements of the argument vector). Returns * the boosted vectors */ vector boostToRestFrame(const vector& momenta); /** * Boosts a vector of momenta to the rest frame of the initial pair */ bool compareMomentum(const Lorentz5Momentum& p, const Lorentz5Momentum& q); /** * Mapping of colour structures to density operator matrices. * */ map,matrix > theDensityOperatorMap; /** * Mapping of colour structures and legs to colour correlators. */ map,pair >,double> theCorrelatorMap; /** * A map from the hard subprocess particles to a map of amplitude colour * basis order to the normal ordered colour basis. */ map > theColourBasisToColourBasisMap; /** * Colour basis used. */ Ptr::ptr theColourBasis; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - DensityOperator & operator=(const DensityOperator &); + DensityOperator & operator=(const DensityOperator &) = delete; }; } #endif /* Herwig_DensityOperator_H */ diff --git a/PDF/HwRemDecayer.h b/PDF/HwRemDecayer.h --- a/PDF/HwRemDecayer.h +++ b/PDF/HwRemDecayer.h @@ -1,753 +1,753 @@ // -*- C++ -*- // // HwRemDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2019 The Herwig Collaboration // // Herwig is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef HERWIG_HwRemDecayer_H #define HERWIG_HwRemDecayer_H // // This is the declaration of the HwRemDecayer class. // #include "ThePEG/PDT/RemnantDecayer.h" #include "ThePEG/Handlers/EventHandler.h" #include "ThePEG/Repository/EventGenerator.h" #include "ThePEG/EventRecord/SubProcess.h" #include "ThePEG/PDF/BeamParticleData.h" #include "Herwig/Shower/ShowerAlpha.h" #include "Herwig/PDT/StandardMatchers.h" #include "ThePEG/PDT/StandardMatchers.h" #include "HwRemDecayer.fh" namespace Herwig { using namespace ThePEG; /** * The HwRemDecayer class is responsible for the decay of the remnants. Additional * secondary scatters have to be evolved backwards to a gluon, the * first/hard interaction has to be evolved back to a valence quark. * This is all generated inside this class, * which main methods are then called by the ShowerHandler. * * A simple forced splitting algorithm is used. * This takes the Remnant object produced from the PDF and backward * evolution (hadron - parton) and produce partons with the remaining * flavours and with the correct colour connections. * * The algorithim operates by starting with the parton which enters the hard process. * If this is from the sea there is a forced branching to produce the antiparticle * from a gluon branching. If the parton entering the hard process was a gluon, or * a gluon was produced from the first step of the algorithm, there is then a further * branching back to a valence parton. After these partons have been produced a quark or * diquark is produced to give the remaining valence content of the incoming hadron. * * The forced branching are generated using a scale between QSpac and EmissionRange times * the minimum scale. The energy fractions are then distributed using * \f[\frac{\alpha_S}{2\pi}\frac{P(z)}{z}f(x/z,\tilde{q})\f] * with the massless splitting functions. * * \author Manuel B\"ahr * * @see \ref HwRemDecayerInterfaces "The interfaces" * defined for HwRemDecayer. */ class HwRemDecayer: public RemnantDecayer { public: /** Typedef to store information about colour partners */ typedef vector > PartnerMap; public: /** * The default constructor. */ HwRemDecayer() : allowTop_(false), allowLeptons_(false), multiPeriph_(true), quarkPair_(false), ptmin_(-1.*GeV), beta_(ZERO), maxtrySoft_(10), colourDisrupt_(1.0), ladderbFactor_(0.0), ladderPower_(-0.08), ladderNorm_(1.0), ladderMult_(1.0), gaussWidth_(0.1), valOfN_(0), initTotRap_(0), _kinCutoff(0.75*GeV), _forcedSplitScale(2.5*GeV), _range(1.1), _zbin(0.05),_ybin(0.), _nbinmax(100), DISRemnantOpt_(0), PtDistribution_(0), pomeronStructure_(0), mg_(ZERO) {} /** @name Virtual functions required by the Decayer class. */ //@{ /** * Check if this decayer can perfom the decay specified by the * given decay mode. * @return true if this decayer can handle the given mode, otherwise false. */ virtual bool accept(const DecayMode &) const { return true; } /** * Return true if this decayer can handle the extraction of the \a * extracted parton from the given \a particle. */ virtual bool canHandle(tcPDPtr particle, tcPDPtr parton) const; /** * Return true if this decayed can extract more than one parton from * a particle. */ virtual bool multiCapable() const { return true; } /** * Perform a decay for a given DecayMode and a given Particle instance. * @param dm the DecayMode describing the decay. * @param p the Particle instance to be decayed. * @param step the step we are working on. * @return a ParticleVector containing the decay products. */ virtual ParticleVector decay(const DecayMode & dm, const Particle & p, Step & step) const; //@} public: /** * struct that is used to catch exceptions which are thrown * due to energy conservation issues of additional soft scatters */ struct ExtraSoftScatterVeto {}; /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); /** * Do several checks and initialization, for remnantdecay inside ShowerHandler. */ void initialize(pair rems, tPPair beam, Step & step, Energy forcedSplitScale); /** * Initialize the soft scattering machinery. * @param ptmin = the pt cutoff used in the UE model * @param beta = slope of the soft pt-spectrum */ void initSoftInteractions(Energy ptmin, InvEnergy2 beta); /** * Perform the acual forced splitting. * @param partons is a pair of ThePEG::Particle pointers which store the final * partons on which the shower ends. * @param pdfs are pointers to the pdf objects for both beams * @param first is a flage wether or not this is the first or a secondary interation */ void doSplit(pair partons, pair pdfs, bool first); /** * Perform the final creation of the diquarks. Set the remnant masses and do * all colour connections. * @param colourDisrupt = variable to control how many "hard" scatters * are colour isolated * @param softInt = parameter for the number of soft scatters */ void finalize(double colourDisrupt=0.0, unsigned int softInt=0); /** * Find the children */ void findChildren(tPPtr,vector &) const; protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const {return new_ptr(*this);} /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const {return new_ptr(*this);} //@} protected: /** @name Standard Interfaced functions. */ //@{ /** * Initialize this object after the setup phase before saving an * EventGenerator to disk. * @throws InitException if object could not be initialized properly. */ virtual void doinit() { Interfaced::doinit(); _ybin=0.25/_zbin; mg_ = getParticleData(ParticleID::g)->constituentMass(); } //@} private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - HwRemDecayer & operator=(const HwRemDecayer &); + HwRemDecayer & operator=(const HwRemDecayer &) = delete; public: /** * Simple struct to store info about baryon quark and di-quark * constituents. */ struct HadronContent { /** * manually extract the valence flavour \a id. */ inline void extract(int id) { for(unsigned int i=0; iid() == ParticleID::gamma || (hadron->id() == ParticleID::pomeron && pomeronStructure==1) || hadron->id() == ParticleID::reggeon) { flav[0] = id; flav[1] = -id; extracted = 0; flav.resize(2); } else if (hadron->id() == ParticleID::pomeron && pomeronStructure==0) { extracted = 0; } else { extracted = i; } break; } } } /** * Return a proper particle ID assuming that \a id has been removed * from the hadron. */ long RemID() const; /** * Method to determine whether \a parton is a quark from the sea. * @return TRUE if \a parton is neither a valence quark nor a gluon. */ bool isSeaQuark(tcPPtr parton) const { return ((parton->id() != ParticleID::g) && ( !isValenceQuark(parton) ) ); } /** * Method to determine whether \a parton is a valence quark. */ bool isValenceQuark(tcPPtr parton) const { return isValenceQuark(parton->id()); } /** * Method to determine whether \a parton is a quark from the sea. * @return TRUE if \a parton is neither a valence quark nor a gluon. */ bool isSeaQuarkData(tcPDPtr partonData) const { return ((partonData->id() != ParticleID::g) && ( !isValenceQuarkData(partonData) ) ); } /** * Method to determine whether \a parton is a valence quark. */ bool isValenceQuarkData(tcPDPtr partonData) const { int id(sign*partonData->id()); return find(flav.begin(),flav.end(),id) != flav.end(); } /** * Method to determine whether \a parton is a valence quark. */ bool isValenceQuark(int id) const { return find(flav.begin(),flav.end(),sign*id) != flav.end(); } /** The valence flavours of the corresponding baryon. */ vector flav; /** The array index of the extracted particle. */ int extracted; /** -1 if the particle is an anti-particle. +1 otherwise. */ int sign; /** The ParticleData objects of the hadron */ tcPDPtr hadron; /** Pomeron treatment */ unsigned int pomeronStructure; }; /** * Return the hadron content objects for the incoming particles. */ const pair& content() const { return theContent; } /** * Return a HadronContent struct from a PPtr to a hadron. */ HadronContent getHadronContent(tcPPtr hadron) const; /** * Set the hadron contents. */ void setHadronContent(tPPair beam) { theContent.first = getHadronContent(beam.first); theContent.second = getHadronContent(beam.second); } private: /** * Do the forced Splitting of the Remnant with respect to the * extracted parton \a parton. * @param parton = PPtr to the parton going into the subprocess. * @param content = HadronContent struct to keep track of flavours. * @param rem = Pointer to the ThePEG::RemnantParticle. * @param used = Momentum vector to keep track of remaining momenta. * @param partners = Vector of pairs filled with tPPtr to the particles * which should be colour connected. * @param pdf pointer to the PDF Object which is used for this particle * @param first = Flag for the first interaction. */ void split(tPPtr parton, HadronContent & content, tRemPPtr rem, Lorentz5Momentum & used, PartnerMap & partners, tcPDFPtr pdf, bool first); /** * Merge the colour lines of two particles * @param p1 = Pointer to particle 1 * @param p2 = Pointer to particle 2 * @param anti = flag to indicate, if (anti)colour was extracted as first parton. */ void mergeColour(tPPtr p1, tPPtr p2, bool anti) const; /** * Set the colour connections. * @param partners = Object that holds the information which particles to connect. * @param anti = flag to indicate, if (anti)colour was extracted as first parton. * @param disrupt parameter for disruption of the colour structure */ void fixColours(PartnerMap partners, bool anti, double disrupt) const; /** * Set the momenta of the Remnants properly and boost the decay particles. */ void setRemMasses() const; /** * This creates a parton from the remaining flavours of the hadron. The * last parton used was a valance parton, so only 2 (or 1, if meson) flavours * remain to be used. */ PPtr finalSplit(const tRemPPtr rem, long remID, Lorentz5Momentum usedMomentum) const { // Create the remnant and set its momentum, also reset all of the decay // products from the hadron PPtr remnant = new_ptr(Particle(getParticleData(remID))); Lorentz5Momentum prem(rem->momentum()-usedMomentum); prem.setMass(getParticleData(remID)->constituentMass()); prem.rescaleEnergy(); remnant->set5Momentum(prem); // Add the remnant to the step, but don't do colour connections thestep->addDecayProduct(rem,remnant,false); return remnant; } /** * This takes the particle and find a splitting for np -> p + child and * creates the correct kinematics and connects for such a split. This * Splitting has an upper bound on qtilde given by the energy argument * @param rem The Remnant * @param child The PDG code for the outgoing particle * @param oldQ The maximum scale for the evolution * @param oldx The fraction of the hadron's momentum carried by the last parton * @param pf The momentum of the last parton at input and after branching at output * @param p The total emitted momentum * @param content The content of the hadron */ PPtr forceSplit(const tRemPPtr rem, long child, Energy &oldQ, double &oldx, Lorentz5Momentum &pf, Lorentz5Momentum &p, HadronContent & content) const; /** * Check if a particle is a parton from a hadron or not * @param parton The parton to be tested */ bool isPartonic(tPPtr parton) const; /** @name Soft interaction methods. */ //@{ /** * Produce pt values according to dN/dp_T = N p_T exp(-beta_*p_T^2) */ Energy softPt() const; /** * Get the 2 pairs of 5Momenta for the scattering. Needs calling of * initSoftInteractions. */ void softKinematics(Lorentz5Momentum &r1, Lorentz5Momentum &r2, Lorentz5Momentum &g1, Lorentz5Momentum &g2) const; /** * Create N soft gluon interactions */ void doSoftInteractions(unsigned int N){ if(!multiPeriph_){ doSoftInteractions_old(N);} //outdated model for soft interactions else{ doSoftInteractions_multiPeriph(N); // Multiperipheral model } } /** * Create N soft gluon interactions (old version) */ void doSoftInteractions_old(unsigned int N); /** * Create N soft gluon interactions with multiperhpheral kinematics */ void doSoftInteractions_multiPeriph(unsigned int N); /** * Phase space generation for the ladder partons */ bool doPhaseSpaceGenerationGluons(vector &softGluons, Energy energy, unsigned int &its) const; /** * This returns the rotation matrix needed to rotate p into the z axis */ LorentzRotation rotate(const LorentzMomentum &p) const; /** * Methods to generate random distributions also all stolen form UA5Handler **/ template inline T gaussDistribution(T mean, T stdev) const{ double x = rnd(); x = sqrt(-2.*log(x)); double y; randAzm(x,x,y); return mean + stdev*x; } /** * This returns a random number with a flat distribution * [-A,A] plus gaussian tail with stdev B * TODO: Should move this to Utilities * @param A The width of the flat part * @param B The standard deviation of the gaussian tail * @return the randomly generated value */ inline double randUng(double A, double B) const{ double prun; if(A == 0.) prun = 0.; else prun = 1./(1.+B*1.2533/A); if(rnd() < prun) return 2.*(rnd()-0.5)*A; else { double temp = gaussDistribution(0.,B); if(temp < 0) return temp - abs(A); else return temp + abs(A); } } template inline void randAzm(T pt, T &px, T &py) const{ double c,s,cs; while(true) { c = 2.*rnd()-1.; s = 2.*rnd()-1.; cs = c*c+s*s; if(cs <= 1.&&cs!=0.) break; } T qt = pt/cs; px = (c*c-s*s)*qt; py = 2.*c*s*qt; } inline Energy randExt(Energy AM0,InvEnergy B) const{ double r = rnd(); // Starting value Energy am = AM0-log(r)/B; for(int i = 1; i<20; ++i) { double a = exp(-B*(am-AM0))/(1.+B*AM0); double f = (1.+B*am)*a-r; InvEnergy df = -B*B*am*a; Energy dam = -f/df; am += dam; if(am theanti; /** * variable to sum up the x values of the extracted particles */ pair theX; /**Pair of HadronContent structs to know about the quark content of the beams*/ pair theContent; /**Pair of Lorentz5Momentum to keep track of the forced splitting product momenta*/ pair theUsed; /** * Pair of PartnerMap's to store the particles, which will be colour * connected in the end. */ pair theMaps; /** * Variable to hold a pointer to the current step. The variable is used to * determine, wether decay(const DecayMode & dm, const Particle & p, Step & step) * has been called in this event or not. */ StepPtr thestep; /** * Pair of Remnant pointers. This is needed to boost * in the Remnant-Remnant CMF after all have been decayed. */ pair theRems; /** * The beam particle data for the current incoming hadron */ mutable tcPPtr theBeam; /** * the beam data */ mutable Ptr::const_pointer theBeamData; /** * The PDF for the current initial-state shower */ mutable tcPDFPtr _pdf; private: /** * Switch to control handling of top quarks in proton */ bool allowTop_; /** * Switch to control handling of charged leptons in proton */ bool allowLeptons_; /** * Switch to control using multiperipheral kinemaics */ bool multiPeriph_; /** * True if kinematics is to be calculated for quarks */ bool quarkPair_; /** @name Soft interaction variables. */ //@{ /** * Pair of soft Remnant pointers, i.e. Diquarks. */ tPPair softRems_; /** * ptcut of the UE model */ Energy ptmin_; /** * slope of the soft pt-spectrum: dN/dp_T = N p_T exp(-beta*p_T^2) */ InvEnergy2 beta_; /** * Maximum number of attempts for the regeneration of an additional * soft scattering, before the number of scatters is reduced. */ unsigned int maxtrySoft_; /** * Variable to store the relative number of colour disrupted * connections to additional soft subprocesses. */ double colourDisrupt_; /** * Variable to store the additive factor of the multiperipheral ladder multiplicity. */ double ladderbFactor_; /** * Variable of the parameterization of the ladder multiplicity. */ double ladderPower_; /** * Variable of the parameterization of the ladder multiplicity. */ double ladderNorm_; double ladderMult_; /** * Variable to store the gaussian width of the * fluctuation of the longitudinal momentum * fraction. */ double gaussWidth_; /** * Variable to store the current total multiplicity of a ladder. */ double valOfN_; /** * Variable to store the initial total rapidity between of the remnants. */ double initTotRap_; //@} /** @name Forced splitting variables. */ //@{ /** * The kinematic cut-off */ Energy _kinCutoff; /** * The PDF freezing scale as set in ShowerHandler */ Energy _forcedSplitScale; /** * Range for emission */ double _range; /** * Size of the bins in z for the interpolation */ double _zbin; /** * Size of the bins in y for the interpolation */ double _ybin; /** * Maximum number of bins for the z interpolation */ int _nbinmax; /** * Pointer to the object calculating the QCD coupling */ ShowerAlphaPtr _alphaS; /** * Pointer to the object calculating the QED coupling */ ShowerAlphaPtr _alphaEM; /** * Option for the DIS remnant */ unsigned int DISRemnantOpt_; /** * Option for the pT generation */ unsigned int PtDistribution_; /** * Option for the treatment of the pomeron structure */ unsigned int pomeronStructure_; //@} /** * The gluon constituent mass. */ Energy mg_; }; } #endif /* HERWIG_HwRemDecayer_H */ diff --git a/PDF/MultiPartonExtractor.h b/PDF/MultiPartonExtractor.h --- a/PDF/MultiPartonExtractor.h +++ b/PDF/MultiPartonExtractor.h @@ -1,114 +1,114 @@ // -*- C++ -*- #ifndef Herwig_MultiPartonExtractor_H #define Herwig_MultiPartonExtractor_H // // This is the declaration of the MultiPartonExtractor class. // #include "ThePEG/PDF/PartonExtractor.h" #include namespace Herwig { using namespace ThePEG; /** * The MultiPartonExtractor class inherits from the PartonExtractor of ThePEG * but allows more control over the PDFs used in the case that there are multiple * stages of parton extraction * * @see \ref MultiPartonExtractorInterfaces "The interfaces" * defined for MultiPartonExtractor. */ class MultiPartonExtractor: public PartonExtractor { public: /** * The default constructor. */ MultiPartonExtractor() {}; /** * 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; public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ 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, std::deque pdf ,PartonVector & pbins) const; protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - MultiPartonExtractor & operator=(const MultiPartonExtractor &); + MultiPartonExtractor & operator=(const MultiPartonExtractor &) = delete; /** * PDFBase object to override first PDF */ vector firstPDF_; /** * PDFBase object to override second PDF */ vector secondPDF_; }; } #endif /* Herwig_MultiPartonExtractor_H */ diff --git a/Shower/Dipole/Kernels/ColourMatrixElementCorrection.h b/Shower/Dipole/Kernels/ColourMatrixElementCorrection.h --- a/Shower/Dipole/Kernels/ColourMatrixElementCorrection.h +++ b/Shower/Dipole/Kernels/ColourMatrixElementCorrection.h @@ -1,171 +1,171 @@ // -*- C++ -*- // // ColourMatrixElementCorrection.h is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2019 The Herwig Collaboration // // Herwig is licenced under version 2 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef Herwig_ColourMatrixElementCorrection_H #define Herwig_ColourMatrixElementCorrection_H // // This is the declaration of the ColourMatrixElementCorrection class. // #include "Herwig/Shower/Dipole/Base/DipoleSplittingReweight.h" #include namespace Herwig { using namespace ThePEG; /** * \ingroup DipoleShower * \author Johan Thoren, Simon Platzer * * \brief ColourMatrixElementCorrection is implementing colour matrix element * corrections through the weighted Sudakov algorithm * * @see \ref ColourMatrixElementCorrectionInterfaces "The interfaces" * defined for ColourMatrixElementCorrection. */ class ColourMatrixElementCorrection: public DipoleSplittingReweight { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ ColourMatrixElementCorrection(); /** * The destructor. */ virtual ~ColourMatrixElementCorrection(); //@} public: /** * Calculate and cache the colour matrix element correction factor * for the given splitting type. */ double cmec(const DipoleSplittingInfo&) const; /** * Return the reweighting factor for the given splitting type. */ virtual double evaluate(const DipoleSplittingInfo& s) const { return cmec(s); } /** * Return the absolute value of the colour matrix element correction * as an enhancement hint for the sampling of the un-reweighted * splitting kernel. */ virtual double hint(const DipoleSplittingInfo& s) const { if ( hintOnly(s) ) return cmec(s); return abs(cmec(s))*lambda; } /** * Return true, if the reweight can be entirely absorbed into the hint. A * possible detuning will be switched off. */ virtual bool hintOnly(const DipoleSplittingInfo& s) const { return cmec(s) > 0.; } /** * Set the factor in front of enhance used by the veto algorithm. */ virtual void reweightFactor(const double c) { assert(c > 0.0); lambda = c; } /** * Set the factor in front of enhance used by the veto algorithm. */ virtual void negativeScaling(const double c) { assert(c >= 0.0); negCMECScaling = c; } public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} // If needed, insert declarations of virtual function defined in the // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). private: /** * Factor to shuffle the magnitude of the CMEC between the splitting kernel * and the weight in the reweighted veto algorithm. */ double lambda; /** * Scaling factor multiplying all of the negative colour matrix element * corrections. The physically sensible value is 1.0, but this factor can * be used to examine the effects of the negative contributions. */ double negCMECScaling; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - ColourMatrixElementCorrection & operator=(const ColourMatrixElementCorrection &); + ColourMatrixElementCorrection & operator=(const ColourMatrixElementCorrection &) = delete; }; } #endif /* Herwig_ColourMatrixElementCorrection_H */ diff --git a/Shower/Dipole/Kinematics/IFMassiveKinematics.h b/Shower/Dipole/Kinematics/IFMassiveKinematics.h --- a/Shower/Dipole/Kinematics/IFMassiveKinematics.h +++ b/Shower/Dipole/Kinematics/IFMassiveKinematics.h @@ -1,279 +1,279 @@ // -*- C++ -*- // // IFLightKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2019 The Herwig Collaboration // // Herwig is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef HERWIG_IFLightKinematics_H #define HERWIG_IFLightKinematics_H // // This is the declaration of the IFLightKinematics class. // #include "DipoleSplittingKinematics.h" namespace Herwig { using namespace ThePEG; /** * \ingroup DipoleShower * \author Simon Platzer, Martin Stoll * * \brief IFMassiveKinematics implements massless splittings * off an initial-final dipole. * * @see \ref IFMassiveKinematicsInterfaces "The interfaces" * defined for IFMassiveKinematics. */ class IFMassiveKinematics: public DipoleSplittingKinematics { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ IFMassiveKinematics(); /** * The destructor. */ virtual ~IFMassiveKinematics(); //@} public: /** * Return the boundaries in between the evolution * variable random number is to be sampled; the lower * cuoff is assumed to correspond to the infrared cutoff. */ virtual pair kappaSupport(const DipoleSplittingInfo& dIndex) const; /** * Return the boundaries in between the momentum * fraction random number is to be sampled. */ virtual pair xiSupport(const DipoleSplittingInfo& dIndex) const; /** * Return the boundaries on the momentum fraction */ virtual pair zBoundaries(Energy, const DipoleSplittingInfo&, const DipoleSplittingKernel&) const { return {0.0,1.0}; } /** * Return the dipole scale associated to the * given pair of emitter and spectator. This * should be the invariant mass or absolute value * final/final or initial/initial and the absolute * value of the momentum transfer for intial/final or * final/initial dipoles. */ virtual Energy dipoleScale(const Lorentz5Momentum& pEmitter, const Lorentz5Momentum& pSpectator) const; /** * Return the maximum pt for the given dipole scale. */ virtual Energy ptMax(Energy dScale, double emX, double specX, const DipoleSplittingInfo& dInfo, const DipoleSplittingKernel& split) const; /** * Return the maximum pt for the given dipole scale. */ virtual Energy ptMax(Energy dScale, double, double, const DipoleIndex& dIndex, const DipoleSplittingKernel& split, tPPtr emitter, tPPtr) const; /** * Return the maximum pt for the given dipole scale. */ virtual Energy ptMax(Energy, double, double, const DipoleIndex&, const DipoleSplittingKernel&) const { // Only the DipoleSplittingInfo version should be used for massive // dipoles, for now anyway. assert(false); return ZERO; } /** * Return the maximum virtuality for the given dipole scale. */ virtual Energy QMax(Energy dScale, double emX, double specX, const DipoleSplittingInfo& dInfo, const DipoleSplittingKernel& split) const; /** * Return the maximum virtuality for the given dipole scale. */ virtual Energy QMax(Energy, double, double, const DipoleIndex&, const DipoleSplittingKernel&) const { // Only the DipoleSplittingInfo version should be used for massive // dipoles, for now anyway. assert(false); return ZERO; } /** * Return the pt given a virtuality. */ virtual Energy PtFromQ(Energy scale, const DipoleSplittingInfo&) const; /** * Return the virtuality given a pt. */ virtual Energy QFromPt(Energy scale, const DipoleSplittingInfo&) const; /** * Return the random number associated to * the given pt. */ virtual double ptToRandom(Energy pt, Energy dScale, double emX, double specX, const DipoleIndex& dIndex, const DipoleSplittingKernel&) const; /** * Generate splitting variables given three random numbers * and the momentum fractions of the emitter and spectator. * Return true on success. */ virtual bool generateSplitting(double kappa, double xi, double phi, DipoleSplittingInfo& dIndex, const DipoleSplittingKernel&); /** * Generate the full kinematics given emitter and * spectator momentum and a previously completeted * DipoleSplittingInfo object. */ virtual void generateKinematics(const Lorentz5Momentum& pEmitter, const Lorentz5Momentum& pSpectator, const DipoleSplittingInfo& dInfo); public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} // If needed, insert declarations of virtual function defined in the // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). private: /** * The static object used to initialize the description of this class. * Indicates that this is a concrete class with persistent data. */ static ClassDescription initIFMassiveKinematics; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - IFMassiveKinematics & operator=(const IFMassiveKinematics &); + IFMassiveKinematics & operator=(const IFMassiveKinematics &) = delete; private: /** * Wether or not to choose the `collinear' scheme */ bool theCollinearScheme; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of IFMassiveKinematics. */ template <> struct BaseClassTrait { /** Typedef of the first base class of IFMassiveKinematics. */ typedef Herwig::DipoleSplittingKinematics NthBase; }; /** This template specialization informs ThePEG about the name of * the IFMassiveKinematics class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "Herwig::IFMassiveKinematics"; } /** * The name of a file containing the dynamic library where the class * IFMassiveKinematics is implemented. It may also include several, space-separated, * libraries if the class IFMassiveKinematics depends on other classes (base classes * excepted). In this case the listed libraries will be dynamically * linked in the order they are specified. */ static string library() { return "HwDipoleShower.so"; } }; /** @endcond */ } #endif /* HERWIG_IFMassiveKinematics_H */ diff --git a/Shower/Dipole/SpinCorrelations/DipoleShowerParticle.h b/Shower/Dipole/SpinCorrelations/DipoleShowerParticle.h --- a/Shower/Dipole/SpinCorrelations/DipoleShowerParticle.h +++ b/Shower/Dipole/SpinCorrelations/DipoleShowerParticle.h @@ -1,182 +1,182 @@ // -*- C++ -*- // // DipoleShowerParticle.h is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2019 The Herwig Collaboration // // Herwig is licenced under version 2 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef HERWIG_DipoleShowerParticle_H #define HERWIG_DipoleShowerParticle_H // // This is the declaration of the DipoleShowerParticle class. // #include "ThePEG/EventRecord/Particle.h" #include "ThePEG/Helicity/WaveFunction/WaveFunctionBase.h" #include "ThePEG/Helicity/WaveFunction/SpinorWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "DipoleShowerVertex.h" namespace Herwig { using namespace ThePEG; /** \ingroup DipoleShower * * \author Stephen Webster * */ class DipoleShowerParticle : public Base { public: /** * Default constructor */ DipoleShowerParticle() {} /** * Default destructor **/ ~DipoleShowerParticle() {} public: /** * Reset the member variables of the object. */ void clear(); /** * Set up the decay vertex for the emitter. */ void prepare( PPtr& part, const Helicity::Direction emmDir, const Helicity::Direction specDir, const Lorentz5Momentum& pVector, const Lorentz5Momentum& nVector ); /** * Return the associated decay vertex, * a DipoleShowerVertex. **/ DSVertexPtr decayVertex() { return theDecayVertex; } /** * Create fermion decay basis states. * It returns the decay basis states in the * decay frame as required for the mapping. */ vector > createFermionDecayStates(); /** * Create vector decay basis states. */ void createVectorDecayStates(); /** * Create fermion production basis states * for the given particle produced in the splitting. */ void createNewFermionSpinInfo( PPtr& outgoing, Helicity::Direction dir); /** * Create vector production basis states * for the given particle produced in the splitting. */ void createNewVectorSpinInfo( PPtr& outgoing, Helicity::Direction dir); /** * Create the mappings between the production * and decay states for the fermion and * store them in the associated decay vertex. * (No longer applicable) reason for passing the * decay states as an argument: * Previously used a check on zero values for computing * the mapping, rather than a 1e-5, this would only * work when using the original decay state as calculated * in the decay frame (i.e. without transforming to the * lab frame and back). Now it simply avoids doing an * unnecessary rotation of the decay basis */ void setFermionMapping( const vector>& decayBasis ); /** * Create the mappings between the production * and decay states the boson and * store them in the associated decay vertex. */ void setVectorMapping(); 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 pptr to this particle. */ PPtr theParticle; /** * The dipole shower vertex associated * with this particle. */ DSVertexPtr theDecayVertex; private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - DipoleShowerParticle & operator=(const DipoleShowerParticle &); + DipoleShowerParticle & operator=(const DipoleShowerParticle &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of DipoleShowerParticle. */ template <> struct BaseClassTrait { /** Typedef of the first base class of DipoleShowerParticle. */ typedef Base NthBase; }; /** This template specialization informs ThePEG about the name of * the DipoleShowerParticle class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "Herwig::DipoleShowerParticle"; } /** * The name of a file containing the dynamic library where the class * DipoleShowerParticle is implemented. It may also include several, space-separated, * libraries if the class DipoleShowerParticle depends on other classes (base classes * excepted). In this case the listed libraries will be dynamically * linked in the order they are specified. */ static string library() { return "HwDipoleShower.so"; } }; /** @endcond */ } #endif /* HERWIG_DipoleShowerParticle_H */ diff --git a/Shower/Dipole/SpinCorrelations/DipoleShowerVertex.h b/Shower/Dipole/SpinCorrelations/DipoleShowerVertex.h --- a/Shower/Dipole/SpinCorrelations/DipoleShowerVertex.h +++ b/Shower/Dipole/SpinCorrelations/DipoleShowerVertex.h @@ -1,285 +1,285 @@ // -*- C++ -*- // // DipoleShowerVertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2019 The Herwig Collaboration // // Herwig is licenced under version 2 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // #ifndef HERWIG_DipoleShowerVertex_H #define HERWIG_DipoleShowerVertex_H // // This is the declaration of the DipoleShowerVertex class. // #include "ThePEG/EventRecord/HelicityVertex.h" #include "Herwig/Decay/DecayMatrixElement.h" #include "DipoleShowerVertex.fh" namespace Herwig { using namespace ThePEG; /** \ingroup DipoleShower * * This class represents the vertex for a given splitting * in the dipole shower. * * \author Stephen Webster * */ class DipoleShowerVertex: public HelicityVertex { public: /** * Default constructor */ DipoleShowerVertex(); /** * Default destructor **/ ~DipoleShowerVertex() {} public: /** * Return the matrix element for this vertex. */ inline const DecayMEPtr ME() const { return theMatrixElement; } /** * Set the matrix element */ inline void ME(DecayMEPtr in) { theMatrixElement = in; } public: /** * Method to calculate the \f$\rho\f$ matrix for one of the decay products * in the frame of this splitting vertex. * * @param iprod The splitting product to compute the \f$\rho\f$ matrix for. */ RhoDMatrix getRhoMatrix(int iprod, bool ) const; /** * Method to calculate the \f$D\f$ matrix for the decaying * particle / the incoming to the vertex, in the frame of * the vertex. The argument is a dummy argument. */ RhoDMatrix getDMatrix(int) const; /** * Get the lorentz rotation from the working frame * to the frame of the splitting. */ LorentzRotation boostToSplitting(); /** * Set the p vector for this splitting */ void pVector( const Lorentz5Momentum& emitterMom ) { thePVector = emitterMom; } /** * Set the n vector for this splitting */ void nVector( const Lorentz5Momentum& nMom ) { theNVector = nMom; } /** * Set the emitter,Spectator Config (II,IF,FF,FI - F=true, I=false) */ void dipoleConfig(const pair& newConfig) { theDipoleConfig = newConfig; } /** * Return the p vector for this splitting */ Lorentz5Momentum pVector() const { return thePVector; } /** * Return the n/spectator vector for this splitting */ Lorentz5Momentum nVector() const { return theNVector; } /** * Return the emitter,Spectator Config (II,IF,FF,FI - F=true, I=false) */ const pair& dipoleConfig() const { return theDipoleConfig; } /** * Set the decay state to production state * mapping for this vertex. */ void mappingD2P( RhoDMatrix& mapping ) { theMappingDecay2Prod = mapping; } /** * Return the mapping from the decay * states to the production states. */ RhoDMatrix mappingD2P() { return theMappingDecay2Prod; } /** * Set the production state to decay state * mapping for this vertex. */ void mappingP2D( RhoDMatrix& mapping ) { theMappingProd2Decay = mapping; } /** * Return the mapping from the production * states to the decay states. */ RhoDMatrix mappingP2D() { return theMappingProd2Decay; } /** * Set the new to old spectator mapping * for this vertex. */ void mappingSpecNewToOld( RhoDMatrix& mapping ) { theMappingSpectatorNewToOld = mapping; } /** * Return the new to old spectator mapping * for this vertex. */ RhoDMatrix mappingSpecNewToOld() { return theMappingSpectatorNewToOld; } /** * Set the new to old spectator mapping * for this vertex. */ void mappingSpecOldToNew( RhoDMatrix& mapping ) { theMappingSpectatorOldToNew = mapping; } /** * Return the new to old spectator mapping * for this vertex. */ RhoDMatrix mappingSpecOldToNew() { return theMappingSpectatorOldToNew; } 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: /** * Storage of the decay matrix element. */ DecayMEPtr theMatrixElement; /** * The p vector of the 'splitting basis' * associated with this vertex. **/ Lorentz5Momentum thePVector; /** * The n vector of the 'splitting basis' * associated with this vertex. **/ Lorentz5Momentum theNVector; /** * Initial/final config {emitter, spectator} */ pair theDipoleConfig; /** * An indicator flag to record if the * boost to shower for this vertex has been done */ bool theBoostCalculated; /** * The lorentz transformation from the * working frame to this splitting. */ LorentzRotation theBoostToSplitting; /** * The mapping from the decay basis states * to the production basis states. */ RhoDMatrix theMappingDecay2Prod; /** * The mapping from the production basis states * to the decay basis states. */ RhoDMatrix theMappingProd2Decay; /** * The mapping from the new spectator basis * states to the old spectator basis states. */ RhoDMatrix theMappingSpectatorNewToOld; /** * The mapping from the old spectator basis * states to the new spectator basis states. */ RhoDMatrix theMappingSpectatorOldToNew; private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - DipoleShowerVertex & operator=(const DipoleShowerVertex &); + DipoleShowerVertex & operator=(const DipoleShowerVertex &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of DipoleShowerVertex. */ template <> struct BaseClassTrait { /** Typedef of the first base class of DipoleShowerVertex. */ typedef HelicityVertex NthBase; }; /** This template specialization informs ThePEG about the name of * the DipoleShowerVertex class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "Herwig::DipoleShowerVertex"; } /** * The name of a file containing the dynamic library where the class * DipoleShowerVertex is implemented. It may also include several, space-separated, * libraries if the class DipoleShowerVertex depends on other classes (base classes * excepted). In this case the listed libraries will be dynamically * linked in the order they are specified. */ static string library() { return "HwDipoleShower.so"; } }; /** @endcond */ } #endif /* HERWIG_DipoleShowerVertex_H */ diff --git a/Shower/Dipole/SpinCorrelations/DipoleVertexRecord.h b/Shower/Dipole/SpinCorrelations/DipoleVertexRecord.h --- a/Shower/Dipole/SpinCorrelations/DipoleVertexRecord.h +++ b/Shower/Dipole/SpinCorrelations/DipoleVertexRecord.h @@ -1,207 +1,207 @@ // -*- C++ -*- #ifndef Herwig_DipoleVertexRecord_H #define Herwig_DipoleVertexRecord_H // // This is the declaration of the DipoleVertexRecord class. // #include "ThePEG/Config/ThePEG.h" #include "Herwig/Shower/Dipole/Base/DipoleSplittingInfo.h" #include "Herwig/Shower/Dipole/Base/Dipole.h" #include "ThePEG/EventRecord/RhoDMatrix.h" #include "DipoleShowerParticle.h" namespace Herwig { using namespace ThePEG; /** * Here is the documentation of the DipoleVertexRecord class. */ class DipoleVertexRecord: public Base { public: /** @name Standard constructors and destructors. */ //@{ /** * The default constructor. */ DipoleVertexRecord() {} /** * The destructor. */ virtual ~DipoleVertexRecord() { clear(); } //@} public: /** * Prepare the emitter and spectator * for the spin correlations computations. **/ void prepareSplitting( const DipoleSplittingInfo& dInfo, const Dipole& dip); /** * Correctly initialise the decay matrix * to a delta matrix for an external particle. */ void initDecayMatrix(PPtr& particle, Helicity::Direction dir); /** * Compute the spin density matrix for the given emitter. * This tracks the path between the given emitter and * the previous emitter, calculating a rho/decay matrix * at each vertex as appropriate. */ RhoDMatrix emitterDensityMatrix(PPtr emitter); /** * Generate the spin-correlated azimuthal angle for a splitting. */ void generatePhi(DipoleSplittingInfo& dInfo, Dipole& dip); /** * Identify the type of particle and use the appropriate function * to set up the spin info. * Required for e.g. MPI */ void createSpinInfo(PPtr& part, const Helicity::Direction& dir); /** * Create and set up fermion spin info. * Required for e.g. MPI */ void createFermionSpinInfo(PPtr& part, const Helicity::Direction& dir); /** * Create and set up vector spin info. * Required for e.g. MPI */ void createVectorSpinInfo(PPtr& part, const Helicity::Direction& dir); /** * Update the vertex record following a splitting. */ void update(const DipoleSplittingInfo& dInfo); /** * For spectators. Set new particle spin info the that of the * old particle. Update the spin info to include any momentum changes. */ void updateSpinInfo( PPtr& oldPart, PPtr& newPart ); /** * Set the stopUpdate flag in the spin info of a particle * incoming to the current decay. */ void prepareParticleDecay( const PPtr& parent ); /** * Update the spin info of the incoming to the decay * following showering of the decay. */ void updateParticleDecay(); /** * SW 06/02/2019: Required for NearestNeighbourDipoleAnalysis tests. * Access the emitter info record. */ //map emitterInfoRecord() const { //return theEmitterInfoRecord; //} /** * SW 06/02/2019: Required for NearestNeighbourDipoleAnalysis tests. * Add a splitting to the emitter info record. */ // void addToRecord(const DipoleSplittingInfo& dInfo) { // assert(dInfo.emitter()); // theEmitterInfoRecord[dInfo.emitter()] = dInfo; // } /** * Clear the vertex record: Give up ownership * on any object involved in the evolution. */ virtual void clear(); /** * The standard Init function used to initialize the interfaces. * Called exactly 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 current emitter. */ DipoleShowerParticle theCurrentEmitter; /** * SW 06/02/2019: Required for NearestNeighbourDipoleAnalysis tests. * Record of the splittings as * required for the testing analysis. */ //map theEmitterInfoRecord; /** * The spin info of a particle incoming to the decay * under consideration. */ tcSpinPtr theDecayParentSpinInfo; /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ - DipoleVertexRecord & operator=(const DipoleVertexRecord &); + DipoleVertexRecord & operator=(const DipoleVertexRecord &) = delete; }; } #include "ThePEG/Utilities/ClassTraits.h" namespace ThePEG { /** @cond TRAITSPECIALIZATIONS */ /** This template specialization informs ThePEG about the * base classes of DipoleVertexRecord. */ template <> struct BaseClassTrait { /** Typedef of the first base class of DipoleVertexRecord. */ typedef Base NthBase; }; /** This template specialization informs ThePEG about the name of * the DipoleVertexRecord class and the shared object where it is defined. */ template <> struct ClassTraits : public ClassTraitsBase { /** Return a platform-independent class name */ static string className() { return "Herwig::DipoleVertexRecord"; } /** * The name of a file containing the dynamic library where the class * DipoleVertexRecord is implemented. It may also include several, space-separated, * libraries if the class DipoleVertexRecord depends on other classes (base classes * excepted). In this case the listed libraries will be dynamically * linked in the order they are specified. */ static string library() { return "HwDipoleShower.so"; } }; /** @endcond */ } #endif /* Herwig_DipoleVertexRecord_H */