thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
NLOHepMCFile.h
1 // -*- C++ -*-
2 #ifndef ThePEG_NLOHepMCFile_H
3 #define ThePEG_NLOHepMCFile_H
4 //
5 // This is the declaration of the NLOHepMCFile class.
6 //
7 #include <config.h>
8 #include "ThePEG/Handlers/AnalysisHandler.h"
9 #include "ThePEG/Config/HepMCHelper.h"
10 namespace ThePEG {
11 
19 
20 public:
21 
27  NLOHepMCFile();
28 
32  NLOHepMCFile(const NLOHepMCFile &);
33 
37  virtual ~NLOHepMCFile() {}
39 
40 public:
41 
61  virtual void analyze(tEventPtr event, long ieve, int loop, int state);
62 
66  HepMC::GenEvent * makeEvent(tEventPtr event, tSubProPtr sub, long no,
67  Energy eUnit, Length lUnit,
68  CrossSection xsec, CrossSection xsecErr) const;
69 
71 
72 public:
73 
80  void persistentOutput(PersistentOStream & os) const;
81 
87  void persistentInput(PersistentIStream & is, int version);
89 
96  static void Init();
97 
98 protected:
99 
106  virtual void doinitrun();
107 
112  virtual void dofinish();
114 
115 protected:
116 
123  virtual IBPtr clone() const;
124 
129  virtual IBPtr fullclone() const;
131 
132 
133 // If needed, insert declarations of virtual function defined in the
134 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
135 
136 private:
137 
142 
146  int _format;
147 
151  string _filename;
152 
153 #ifdef HAVE_HEPMC_ROOTIO
154 
157  string _ttreename;
158 
162  string _tbranchname;
163 
164 #endif
165 
168 #ifdef HAVE_HEPMC3
169  HepMC::Writer *_hepmcio;
170 #else
171  HepMC::IO_BaseClass *_hepmcio;
172 #endif
173 
177  ofstream _hepmcdump;
178 
183 
187  unsigned int _geneventPrecision;
188 
192  unsigned long _eventNumber;
193 
194 private:
195 
200  NLOHepMCFile & operator=(const NLOHepMCFile &) = delete;
201 
202 };
203 
204 }
205 
206 #endif /* ThePEG_NLOHepMCFile_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
unsigned int _geneventPrecision
Choice of output precision in GenEvent format.
Definition: NLOHepMCFile.h:187
string _filename
The HepMC filename.
Definition: NLOHepMCFile.h:151
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
virtual ~NLOHepMCFile()
The destructor.
Definition: NLOHepMCFile.h:37
Write hard sub processes or sub process groups to HepMC.
Definition: NLOHepMCFile.h:18
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
virtual void analyze(tEventPtr event, long ieve, int loop, int state)
Analyze a given Event.
The AnalysisHandler is the base class of all analysis objects which may be handled by the FullEventGe...
NLOHepMCFile()
The default constructor.
NLOHepMCFile & operator=(const NLOHepMCFile &)=delete
The assignment operator is private and must never be called.
InitState state() const
Return the state of initialization of this object.
static void Init()
The standard Init function used to initialize the interfaces.
HepMC::IO_BaseClass * _hepmcio
The HepMC I/O handler.
Definition: NLOHepMCFile.h:171
virtual void dofinish()
Finalize this object.
long _remnantId
The PDG ID to be used for remnants.
Definition: NLOHepMCFile.h:141
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
HepMC::GenEvent * makeEvent(tEventPtr event, tSubProPtr sub, long no, Energy eUnit, Length lUnit, CrossSection xsec, CrossSection xsecErr) const
Produca a HepMC event for the given subprocess.
int _format
The HepMC format.
Definition: NLOHepMCFile.h:146
int _unitchoice
Selector for the choice of units.
Definition: NLOHepMCFile.h:182
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
virtual void doinitrun()
Initialize this object.
unsigned long _eventNumber
Count events.
Definition: NLOHepMCFile.h:192
virtual IBPtr clone() const
Make a simple clone of this object.
ofstream _hepmcdump
The HepMC dump file.
Definition: NLOHepMCFile.h:177