|
|
|||
File indexing completed on 2026-08-06 09:38:19
0001 // -*- C++ -*- 0002 #ifndef ThePEG_NLOHepMCFile_H 0003 #define ThePEG_NLOHepMCFile_H 0004 // 0005 // This is the declaration of the NLOHepMCFile class. 0006 // 0007 #include <config.h> 0008 #include "ThePEG/Handlers/AnalysisHandler.h" 0009 #include "ThePEG/Config/HepMCHelper.h" 0010 namespace ThePEG { 0011 0012 /** 0013 * \author Simon Platzer 0014 * 0015 * \brief Write hard sub processes or sub process groups to HepMC. 0016 * 0017 */ 0018 class NLOHepMCFile: public AnalysisHandler { 0019 0020 public: 0021 0022 /** @name Standard constructors and destructors. */ 0023 //@{ 0024 /** 0025 * The default constructor. 0026 */ 0027 NLOHepMCFile(); 0028 0029 /** 0030 * The copy constructor. 0031 */ 0032 NLOHepMCFile(const NLOHepMCFile &); 0033 //@} 0034 0035 public: 0036 0037 /** @name Virtual functions required by the AnalysisHandler class. */ 0038 //@{ 0039 /** 0040 * Analyze a given Event. Note that a fully generated event 0041 * may be presented several times, if it has been manipulated in 0042 * between. The default version of this function will call transform 0043 * to make a lorentz transformation of the whole event, then extract 0044 * all final state particles and call analyze(tPVector) of this 0045 * analysis object and those of all associated analysis objects. The 0046 * default version will not, however, do anything on events which 0047 * have not been fully generated, or have been manipulated in any 0048 * way. 0049 * @param event pointer to the Event to be analyzed. 0050 * @param ieve the event number. 0051 * @param loop the number of times this event has been presented. 0052 * If negative the event is now fully generated. 0053 * @param state a number different from zero if the event has been 0054 * manipulated in some way since it was last presented. 0055 */ 0056 virtual void analyze(tEventPtr event, long ieve, int loop, int state); 0057 0058 /** 0059 * Produca a HepMC event for the given subprocess 0060 */ 0061 HepMC::GenEvent * makeEvent(tEventPtr event, tSubProPtr sub, long no, 0062 Energy eUnit, Length lUnit, 0063 CrossSection xsec, CrossSection xsecErr) const; 0064 0065 //@} 0066 0067 public: 0068 0069 /** @name Functions used by the persistent I/O system. */ 0070 //@{ 0071 /** 0072 * Function used to write out object persistently. 0073 * @param os the persistent output stream written to. 0074 */ 0075 void persistentOutput(PersistentOStream & os) const; 0076 0077 /** 0078 * Function used to read in object persistently. 0079 * @param is the persistent input stream read from. 0080 * @param version the version number of the object when written. 0081 */ 0082 void persistentInput(PersistentIStream & is, int version); 0083 //@} 0084 0085 /** 0086 * The standard Init function used to initialize the interfaces. 0087 * Called exactly once for each class by the class description system 0088 * before the main function starts or 0089 * when this class is dynamically loaded. 0090 */ 0091 static void Init(); 0092 0093 protected: 0094 0095 /** @name Standard Interfaced functions. */ 0096 //@{ 0097 /** 0098 * Initialize this object. Called in the run phase just before 0099 * a run begins. 0100 */ 0101 virtual void doinitrun(); 0102 0103 /** 0104 * Finalize this object. Called in the run phase just after a 0105 * run has ended. Used eg. to write out statistics. 0106 */ 0107 virtual void dofinish(); 0108 //@} 0109 0110 protected: 0111 0112 /** @name Clone Methods. */ 0113 //@{ 0114 /** 0115 * Make a simple clone of this object. 0116 * @return a pointer to the new object. 0117 */ 0118 virtual IBPtr clone() const; 0119 0120 /** Make a clone of this object, possibly modifying the cloned object 0121 * to make it sane. 0122 * @return a pointer to the new object. 0123 */ 0124 virtual IBPtr fullclone() const; 0125 //@} 0126 0127 0128 // If needed, insert declarations of virtual function defined in the 0129 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs). 0130 0131 private: 0132 0133 /** 0134 * The PDG ID to be used for remnants 0135 */ 0136 long _remnantId; 0137 0138 /** 0139 * The HepMC format 0140 */ 0141 int _format; 0142 0143 /** 0144 * The HepMC filename 0145 */ 0146 string _filename; 0147 0148 #ifdef HAVE_HEPMC_ROOTIO 0149 /** 0150 * The name of TTRee in ROOT file 0151 */ 0152 string _ttreename; 0153 0154 /** 0155 * The name of branch in ROOT file 0156 */ 0157 string _tbranchname; 0158 0159 #endif 0160 /** 0161 * The HepMC I/O handler 0162 */ 0163 #ifdef HAVE_HEPMC3 0164 HepMC::Writer *_hepmcio; 0165 #else 0166 HepMC::IO_BaseClass *_hepmcio; 0167 #endif 0168 0169 /** 0170 * The HepMC dump file 0171 */ 0172 ofstream _hepmcdump; 0173 0174 /** 0175 * Selector for the choice of units 0176 */ 0177 int _unitchoice; 0178 0179 /** 0180 * Choice of output precision in GenEvent format 0181 */ 0182 unsigned int _geneventPrecision; 0183 0184 /** 0185 * Count events 0186 */ 0187 unsigned long _eventNumber; 0188 0189 private: 0190 0191 /** 0192 * The assignment operator is private and must never be called. 0193 * In fact, it should not even be implemented. 0194 */ 0195 NLOHepMCFile & operator=(const NLOHepMCFile &) = delete; 0196 0197 }; 0198 0199 } 0200 0201 #endif /* ThePEG_NLOHepMCFile_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|