|
|
|||
File indexing completed on 2026-08-06 09:24:10
0001 // -*- C++ -*- 0002 // 0003 // MatchboxReweightBase.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_MatchboxReweightBase_H 0010 #define HERWIG_MatchboxReweightBase_H 0011 // 0012 // This is the declaration of the MatchboxReweightBase class. 0013 // 0014 0015 #include "ThePEG/Handlers/HandlerBase.h" 0016 #include "ThePEG/Handlers/StandardXComb.h" 0017 0018 namespace Herwig { 0019 0020 using namespace ThePEG; 0021 0022 /** 0023 * \ingroup Matchbox 0024 * \author Simon Platzer 0025 * 0026 * \brief MatchboxReweightBase is the base class 0027 * for reweighting MatchboxMEBase matrix elements 0028 * as |M|^2 ( w_1 + ... + w_n ) 0029 * 0030 */ 0031 class MatchboxReweightBase: public HandlerBase { 0032 0033 public: 0034 0035 /** 0036 * Clone this reweight. 0037 */ 0038 Ptr<MatchboxReweightBase>::ptr cloneMe() const { 0039 return dynamic_ptr_cast<Ptr<MatchboxReweightBase>::ptr>(clone()); 0040 } 0041 0042 /** 0043 * Clone the dependencies, using a given prefix. 0044 */ 0045 virtual void cloneDependencies(const std::string& prefix = ""); 0046 0047 /** 0048 * Set the XComb object. 0049 */ 0050 virtual void setXComb(tStdXCombPtr) = 0; 0051 0052 /** 0053 * Return true, if applies to the process in the xcomb. 0054 */ 0055 virtual bool apply() const = 0; 0056 0057 /** 0058 * Inform this matrix element that a new phase space 0059 * point is about to be generated, so all caches should 0060 * be flushed. 0061 */ 0062 virtual void flushCaches() = 0; 0063 0064 /** 0065 * Evaluate the reweight. 0066 */ 0067 virtual double evaluate() const = 0; 0068 0069 /** 0070 * Set veto scales on the particles at the given 0071 * SubProcess which has been generated using this 0072 * matrix element. 0073 */ 0074 virtual void setVetoScales(tSubProPtr) const {} 0075 0076 public: 0077 0078 /** 0079 * Dump the setup to an ostream 0080 */ 0081 virtual void print(ostream&) const {} 0082 0083 /** 0084 * Print debug information on the last event 0085 */ 0086 virtual void printLastEvent(ostream&) const {} 0087 0088 public: 0089 0090 /** @name Functions used by the persistent I/O system. */ 0091 //@{ 0092 /** 0093 * Function used to write out object persistently. 0094 * @param os the persistent output stream written to. 0095 */ 0096 void persistentOutput(PersistentOStream & os) const; 0097 0098 /** 0099 * Function used to read in object persistently. 0100 * @param is the persistent input stream read from. 0101 * @param version the version number of the object when written. 0102 */ 0103 void persistentInput(PersistentIStream & is, int version); 0104 //@} 0105 0106 /** 0107 * The standard Init function used to initialize the interfaces. 0108 * Called exactly once for each class by the class description system 0109 * before the main function starts or 0110 * when this class is dynamically loaded. 0111 */ 0112 static void Init(); 0113 0114 0115 // If needed, insert declarations of virtual function defined in the 0116 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). 0117 0118 private: 0119 0120 /** 0121 * The assignment operator is private and must never be called. 0122 * In fact, it should not even be implemented. 0123 */ 0124 MatchboxReweightBase & operator=(const MatchboxReweightBase &) = delete; 0125 0126 }; 0127 0128 } 0129 0130 0131 #endif /* HERWIG_MatchboxReweightBase_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|