|
|
|||
File indexing completed on 2026-08-06 09:24:14
0001 // -*- C++ -*- 0002 // 0003 // TreePhasespace.h is a part of Herwig - A multi-purpose Monte Carlo event generator 0004 // Copyright (C) 2002-2019 The Herwig Collaboration 0005 // 0006 // Herwig is licenced under version 3 of the GPL, see COPYING for details. 0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 0008 // 0009 #ifndef Herwig_TreePhasespace_H 0010 #define Herwig_TreePhasespace_H 0011 // 0012 // This is the declaration of the TreePhasespace class. 0013 // 0014 0015 #include "Herwig/MatrixElement/Matchbox/Phasespace/MatchboxPhasespace.h" 0016 #include "Herwig/MatrixElement/Matchbox/Phasespace/TreePhasespaceChannels.h" 0017 0018 namespace Herwig { 0019 0020 using namespace ThePEG; 0021 0022 /** 0023 * \ingroup Matchbox 0024 * \author Simon Platzer, Ken Arnold 0025 * 0026 * \brief TreePhasespace is a multi-channel phase space generator 0027 * adapting to singularity structures as determined from the matrix 0028 * elements diagrams. 0029 * 0030 * @see \ref TreePhasespaceInterfaces "The interfaces" 0031 * defined for TreePhasespace. 0032 */ 0033 class TreePhasespace: public MatchboxPhasespace { 0034 0035 public: 0036 0037 /** 0038 * The default constructor. 0039 */ 0040 TreePhasespace(); 0041 0042 public: 0043 0044 /** 0045 * Prepare a phase space generator for the given xcomb object. 0046 */ 0047 virtual void setXComb(tStdXCombPtr); 0048 0049 /** 0050 * Generate a phase space point and return its weight. 0051 */ 0052 virtual double generateTwoToNKinematics(const double*, 0053 vector<Lorentz5Momentum>& momenta); 0054 0055 /** 0056 * Return the number of random numbers required to produce a given 0057 * multiplicity final state. 0058 */ 0059 virtual int nDimPhasespace(int nFinal) const { 0060 if ( nFinal == 1 ) 0061 return 1; 0062 return 3*(nFinal - 1); // one additional number needed for channel selection 0063 } 0064 0065 public: 0066 0067 /** @name Functions used by the persistent I/O system. */ 0068 //@{ 0069 /** 0070 * Function used to write out object persistently. 0071 * @param os the persistent output stream written to. 0072 */ 0073 void persistentOutput(PersistentOStream & os) const; 0074 0075 /** 0076 * Function used to read in object persistently. 0077 * @param is the persistent input stream read from. 0078 * @param version the version number of the object when written. 0079 */ 0080 void persistentInput(PersistentIStream & is, int version); 0081 //@} 0082 0083 /** 0084 * The standard Init function used to initialize the interfaces. 0085 * Called exactly once for each class by the class description system 0086 * before the main function starts or 0087 * when this class is dynamically loaded. 0088 */ 0089 static void Init(); 0090 0091 protected: 0092 0093 /** @name Clone Methods. */ 0094 //@{ 0095 /** 0096 * Make a simple clone of this object. 0097 * @return a pointer to the new object. 0098 */ 0099 virtual IBPtr clone() const; 0100 0101 /** Make a clone of this object, possibly modifying the cloned object 0102 * to make it sane. 0103 * @return a pointer to the new object. 0104 */ 0105 virtual IBPtr fullclone() const; 0106 //@} 0107 0108 0109 // If needed, insert declarations of virtual function defined in the 0110 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). 0111 0112 0113 protected: 0114 0115 /** @name Standard Interfaced functions. */ 0116 //@{ 0117 /** 0118 * Initialize this object after the setup phase before saving an 0119 * EventGenerator to disk. 0120 * @throws InitException if object could not be initialized properly. 0121 */ 0122 virtual void doinit(); 0123 0124 /** 0125 * Initialize this object. Called in the run phase just before 0126 * a run begins. 0127 */ 0128 virtual void doinitrun(); 0129 //@} 0130 0131 0132 private: 0133 0134 /** 0135 * The object storing channel maps 0136 */ 0137 Ptr<TreePhasespaceChannels>::ptr theChannelMap; 0138 0139 /** 0140 * Map xcomb's to channel vectors indexed by diagram id. 0141 */ 0142 map<tStdXCombPtr, 0143 map<Ptr<Tree2toNDiagram>::ptr, 0144 pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> > >& 0145 channelMap() { return theChannelMap->channelMap(); } 0146 0147 /** 0148 * The currently active channels. 0149 */ 0150 map<tStdXCombPtr, 0151 map<Ptr<Tree2toNDiagram>::ptr, 0152 pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> > >::iterator 0153 lastChannelsIterator; 0154 0155 /** 0156 * The phase space info object to be used. 0157 */ 0158 PhasespaceHelpers::PhasespaceInfo lastPhasespaceInfo; 0159 0160 /** 0161 * Parameter steering from which on propagator virtualities are 0162 * sampled flat. 0163 */ 0164 double x0; 0165 0166 /** 0167 * Parameter steering at which virtuality singularities of 0168 * propagators are actually cut off. 0169 */ 0170 double xc; 0171 0172 /** 0173 * Parameter steering from which on propagator virtualities are 0174 * sampled flat. 0175 */ 0176 Energy M0; 0177 0178 /** 0179 * Parameter steering at which virtuality singularities of 0180 * propagators are actually cut off. 0181 */ 0182 Energy Mc; 0183 0184 /** 0185 * Choose whether to also use mirrored phase space generation 0186 */ 0187 bool theIncludeMirrored; 0188 0189 /** 0190 * Return the currently active channels. 0191 */ 0192 map<Ptr<Tree2toNDiagram>::ptr, 0193 pair <PhasespaceHelpers::PhasespaceTree, PhasespaceHelpers::PhasespaceTree> >& lastChannels() { 0194 return lastChannelsIterator->second; 0195 } 0196 0197 private: 0198 0199 /** 0200 * The assignment operator is private and must never be called. 0201 * In fact, it should not even be implemented. 0202 */ 0203 TreePhasespace & operator=(const TreePhasespace &) = delete; 0204 0205 }; 0206 0207 } 0208 0209 #endif /* Herwig_TreePhasespace_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|