|
|
|||
File indexing completed on 2026-08-06 09:24:16
0001 // -*- C++ -*- 0002 #ifndef Herwig_MEMultiChannel_H 0003 #define Herwig_MEMultiChannel_H 0004 // 0005 // This is the declaration of the MEMultiChannel class. 0006 // 0007 0008 #include "ThePEG/MatrixElement/MEBase.h" 0009 #include "Herwig/Decay/PhaseSpaceMode.fh" 0010 0011 namespace Herwig { 0012 0013 using namespace ThePEG; 0014 0015 /** 0016 * Here is the documentation of the MEMultiChannel class. 0017 * 0018 * @see \ref MEMultiChannelInterfaces "The interfaces" 0019 * defined for MEMultiChannel. 0020 */ 0021 class MEMultiChannel: public MEBase { 0022 0023 public: 0024 0025 /** 0026 * The default constructor. 0027 */ 0028 MEMultiChannel() {}; 0029 0030 /** 0031 * The destructor. 0032 */ 0033 virtual ~MEMultiChannel(); 0034 //@} 0035 0036 public: 0037 0038 /** @name Virtual functions required by the MEBase class. */ 0039 //@{ 0040 0041 /** 0042 * The matrix element for the kinematical configuration 0043 * previously provided by the last call to setKinematics(), suitably 0044 * scaled by sHat() to give a dimension-less number. 0045 * @return the matrix element scaled with sHat() to give a 0046 * dimensionless number. 0047 */ 0048 double me2() const {return me2(-1);} 0049 0050 /** 0051 * Return the scale associated with the last set phase space point. 0052 */ 0053 virtual Energy2 scale() const; 0054 0055 /** 0056 * The number of internal degrees of freedom used in the matrix 0057 * element. 0058 */ 0059 virtual int nDim() const; 0060 0061 /** 0062 * Generate internal degrees of freedom given nDim() uniform 0063 * random numbers in the interval \f$ ]0,1[ \f$. To help the phase space 0064 * generator, the dSigHatDR should be a smooth function of these 0065 * numbers, although this is not strictly necessary. 0066 * @param r a pointer to the first of nDim() consecutive random numbers. 0067 * @return true if the generation succeeded, otherwise false. 0068 */ 0069 virtual bool generateKinematics(const double * r); 0070 0071 /** 0072 * Return the matrix element squared differential in the variables 0073 * given by the last call to generateKinematics(). 0074 */ 0075 virtual CrossSection dSigHatDR() const; 0076 0077 /** 0078 * Add all possible diagrams with the add() function. 0079 */ 0080 virtual void getDiagrams() const; 0081 0082 /** 0083 * Get diagram selector. With the information previously supplied with the 0084 * setKinematics method, a derived class may optionally 0085 * override this method to weight the given diagrams with their 0086 * (although certainly not physical) relative probabilities. 0087 * @param dv the diagrams to be weighted. 0088 * @return a Selector relating the given diagrams to their weights. 0089 */ 0090 virtual Selector<DiagramIndex> diagrams(const DiagramVector & dv) const; 0091 0092 /** 0093 * Return a Selector with possible colour geometries for the selected 0094 * diagram weighted by their relative probabilities. 0095 * @param diag the diagram chosen. 0096 * @return the possible colour geometries weighted by their 0097 * relative probabilities. 0098 */ 0099 virtual Selector<const ColourLines *> 0100 colourGeometries(tcDiagPtr diag) const; 0101 //@} 0102 0103 protected : 0104 0105 /** 0106 * Add a phase-space mode 0107 */ 0108 void addMode(PhaseSpaceModePtr mode) { 0109 modes_.push_back(mode); 0110 } 0111 0112 /** 0113 * Access to the modes 0114 */ 0115 tPhaseSpaceModePtr mode(unsigned int imode) const { 0116 return modes_[imode]; 0117 } 0118 0119 public: 0120 0121 /** @name Functions used by the persistent I/O system. */ 0122 //@{ 0123 /** 0124 * Function used to write out object persistently. 0125 * @param os the persistent output stream written to. 0126 */ 0127 void persistentOutput(PersistentOStream & os) const; 0128 0129 /** 0130 * Function used to read in object persistently. 0131 * @param is the persistent input stream read from. 0132 * @param version the version number of the object when written. 0133 */ 0134 void persistentInput(PersistentIStream & is, int version); 0135 //@} 0136 0137 /** 0138 * The standard Init function used to initialize the interfaces. 0139 * Called exactly once for each class by the class description system 0140 * before the main function starts or 0141 * when this class is dynamically loaded. 0142 */ 0143 static void Init(); 0144 0145 protected: 0146 0147 /** @name Standard Interfaced functions. */ 0148 //@{ 0149 /** 0150 * Initialize this object after the setup phase before saving an 0151 * EventGenerator to disk. 0152 * @throws InitException if object could not be initialized properly. 0153 */ 0154 virtual void doinit(); 0155 0156 /** 0157 * Initialize this object. Called in the run phase just before 0158 * a run begins. 0159 */ 0160 virtual void doinitrun(); 0161 //@} 0162 0163 protected: 0164 0165 /** 0166 * Return the matrix element squared for a given mode and phase-space channel. 0167 * @param ichan The channel we are calculating the matrix element for. 0168 * @param part The decaying Particle. 0169 * @param outgoing The particles produced in the decay 0170 * @param momenta The momenta of the particles produced in the decay 0171 * @param meopt Option for the calculation of the matrix element 0172 * @return The matrix element squared for the phase-space configuration. 0173 */ 0174 virtual double me2(const int ichan) const = 0; 0175 0176 /** 0177 * Access the mode currently being used 0178 */ 0179 unsigned int iMode() {return iMode_;} 0180 0181 /** 0182 * Set the mode currently begining used 0183 */ 0184 void iMode(unsigned int in) const {iMode_=in;} 0185 0186 private: 0187 0188 /** 0189 * The assignment operator is private and must never be called. 0190 * In fact, it should not even be implemented. 0191 */ 0192 MEMultiChannel & operator=(const MEMultiChannel &) = delete; 0193 0194 private: 0195 0196 /** 0197 * The phase-space modes 0198 */ 0199 vector<PhaseSpaceModePtr> modes_; 0200 0201 /** 0202 * Map from the phase space channels to the modes 0203 */ 0204 mutable vector<map <int,int> > channelMap_; 0205 0206 /** 0207 * The mode currently begining used 0208 */ 0209 mutable unsigned int iMode_; 0210 }; 0211 0212 } 0213 0214 #endif /* Herwig_MEMultiChannel_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|