ATLAS Offline Software
List of all members
ThePEG::BB4LPowhegLesHouchesFileReader Class Reference

BB4LPowhegLesHouchesFileReader is an base class to be used for objects which reads event files from matrix element generators. More...

#include <BB4LPowhegLesHouchesFileReader.h>

Inheritance diagram for ThePEG::BB4LPowhegLesHouchesFileReader:
Collaboration diagram for ThePEG::BB4LPowhegLesHouchesFileReader:

Public Member Functions

Standard constructors and destructors.
 BB4LPowhegLesHouchesFileReader ()
 Default constructor. More...
 
 BB4LPowhegLesHouchesFileReader (const BB4LPowhegLesHouchesFileReader &)
 Copy-constructor. More...
 
virtual ~BB4LPowhegLesHouchesFileReader ()
 Destructor. More...
 
Virtual functions specified by the LesHouchesReader base class.
virtual void initialize (LesHouchesEventHandler &eh)
 Initialize. More...
 
virtual void open ()
 Open a file with events. More...
 
virtual void close ()
 Close the file from which events have been read. More...
 
virtual bool doReadEvent ()
 Read the next event from the file or stream into the corresponding protected variables. More...
 
string filename () const
 Return the name of the file from where to read events. More...
 
virtual vector< string > optWeightsNamesFunc ()
 Return the optional weights information string ("Names") More...
 
double eventWeight ()
 

Protected Member Functions

Clone Methods.
virtual IBPtr clone () const
 Make a simple clone of this object. More...
 
virtual IBPtr fullclone () const
 Make a clone of this object, possibly modifying the cloned object to make it sane. More...
 

Functions used by the persistent I/O system.

void persistentOutput (PersistentOStream &os) const
 Function used to write out object persistently. More...
 
void persistentInput (PersistentIStream &is, int version)
 Function used to read in object persistently. More...
 
void erase_substr (std::string &subject, const std::string &search)
 Erases all occurences of a substring from a string. More...
 
static void Init ()
 Standard Init function used to initialize the interfaces. More...
 

Standard (and non-standard) Interfaced functions.

CFileLineReader m_cfile
 The wrapper around the C FILE stream from which to read. More...
 
long m_neve
 The number of events in this file. More...
 
long m_ieve
 The current event number. More...
 
string m_LHFVersion
 If the file is a standard Les Houches formatted file (LHF) this is its version number. More...
 
string m_outsideblock
 If LHF. More...
 
string m_headerblock
 If LHF. More...
 
string m_initComments
 If LHF. More...
 
map< string, string > m_initAttributes
 If LHF. More...
 
string m_eventComments
 If LHF. More...
 
map< string, string > m_eventAttributes
 If LHF. More...
 
string m_theFileName
 The name of the file from where to read events. More...
 
bool m_theQNumbers
 Whether or not to search for QNUMBERS stuff. More...
 
bool m_theIncludeFxFxTags
 Include/Read FxFx tags. More...
 
bool m_theIncludeCentral
 Include central weight (for backup use) More...
 
DecayerPtr m_theDecayer
 Decayer for any decay modes read from the file. More...
 
map< string, string > m_scalemap
 Further information on the weights. More...
 
map< string, double > m_optionalWeightsTemp
 Temporary holder for optional weights. More...
 
static ClassDescription< BB4LPowhegLesHouchesFileReaderm_initBB4LPowhegLesHouchesFileReader
 Describe an abstract base class with persistent data. More...
 
virtual void doinit ()
 Initialize this object after the setup phase before saving an EventGenerator to disk. More...
 
virtual bool preInitialize () const
 Return true if this object needs to be initialized before all other objects because it needs to extract PDFs from the event file. More...
 
BB4LPowhegLesHouchesFileReaderoperator= (const BB4LPowhegLesHouchesFileReader &)=delete
 Private and non-existent assignment operator. More...
 

Detailed Description

BB4LPowhegLesHouchesFileReader is an base class to be used for objects which reads event files from matrix element generators.

It inherits from LesHouchesReader and extends it by defining a file handle to be read from, which is opened and closed by the open() and close() functions. Note that the file handle is a standard C filehandle and not a C++ stream. This is because there is no standard way in C++ to connect a pipe to a stream for reading eg. gzipped files. This class is able to read plain event files conforming to the Les Houches Event File accord.

See also
Th1e interfaces defined for BB4LPowhegLesHouchesFileReader.
Event
LesHouchesReader

Definition at line 39 of file BB4LPowhegLesHouchesFileReader.h.

Constructor & Destructor Documentation

◆ BB4LPowhegLesHouchesFileReader() [1/2]

ThePEG::BB4LPowhegLesHouchesFileReader::BB4LPowhegLesHouchesFileReader ( )
inline

Default constructor.

Definition at line 48 of file BB4LPowhegLesHouchesFileReader.h.

48  : m_neve(0), m_ieve(0), m_theQNumbers(false),
49  m_theIncludeFxFxTags(false),
50  m_theIncludeCentral(true) {}

◆ BB4LPowhegLesHouchesFileReader() [2/2]

ThePEG::BB4LPowhegLesHouchesFileReader::BB4LPowhegLesHouchesFileReader ( const BB4LPowhegLesHouchesFileReader )

Copy-constructor.

Note that a file which is opened in the object copied from will have to be reopened in this.

◆ ~BB4LPowhegLesHouchesFileReader()

virtual ThePEG::BB4LPowhegLesHouchesFileReader::~BB4LPowhegLesHouchesFileReader ( )
virtual

Destructor.

Member Function Documentation

◆ clone()

virtual IBPtr ThePEG::BB4LPowhegLesHouchesFileReader::clone ( ) const
protectedvirtual

Make a simple clone of this object.

Returns
a pointer to the new object.

◆ close()

virtual void ThePEG::BB4LPowhegLesHouchesFileReader::close ( )
virtual

Close the file from which events have been read.

◆ doinit()

virtual void ThePEG::BB4LPowhegLesHouchesFileReader::doinit ( )
protectedvirtual

Initialize this object after the setup phase before saving an EventGenerator to disk.

Exceptions
InitExceptionif object could not be initialized properly.

◆ doReadEvent()

virtual bool ThePEG::BB4LPowhegLesHouchesFileReader::doReadEvent ( )
virtual

Read the next event from the file or stream into the corresponding protected variables.

Return false if there is no more events or if this was not a LHF event file.

◆ erase_substr()

void ThePEG::BB4LPowhegLesHouchesFileReader::erase_substr ( std::string &  subject,
const std::string &  search 
)

Erases all occurences of a substring from a string.

◆ eventWeight()

double ThePEG::BB4LPowhegLesHouchesFileReader::eventWeight ( )
inline

Definition at line 106 of file BB4LPowhegLesHouchesFileReader.h.

106 {return powheg_weight;}

◆ filename()

string ThePEG::BB4LPowhegLesHouchesFileReader::filename ( ) const
inline

Return the name of the file from where to read events.

Definition at line 98 of file BB4LPowhegLesHouchesFileReader.h.

98 { return m_theFileName; }

◆ fullclone()

virtual IBPtr ThePEG::BB4LPowhegLesHouchesFileReader::fullclone ( ) const
protectedvirtual

Make a clone of this object, possibly modifying the cloned object to make it sane.

Returns
a pointer to the new object.

◆ Init()

static void ThePEG::BB4LPowhegLesHouchesFileReader::Init ( )
static

Standard Init function used to initialize the interfaces.

◆ initialize()

virtual void ThePEG::BB4LPowhegLesHouchesFileReader::initialize ( LesHouchesEventHandler &  eh)
virtual

Initialize.

This function is called by the LesHouchesEventHandler to which this object is assigned.

◆ open()

virtual void ThePEG::BB4LPowhegLesHouchesFileReader::open ( )
virtual

Open a file with events.

Derived classes should overwrite it and first calling it before reading in the run information into the corresponding protected variables.

◆ operator=()

BB4LPowhegLesHouchesFileReader& ThePEG::BB4LPowhegLesHouchesFileReader::operator= ( const BB4LPowhegLesHouchesFileReader )
privatedelete

Private and non-existent assignment operator.

◆ optWeightsNamesFunc()

virtual vector<string> ThePEG::BB4LPowhegLesHouchesFileReader::optWeightsNamesFunc ( )
virtual

Return the optional weights information string ("Names")

◆ persistentInput()

void ThePEG::BB4LPowhegLesHouchesFileReader::persistentInput ( PersistentIStream &  is,
int  version 
)

Function used to read in object persistently.

Parameters
isthe persistent input stream read from.
versionthe version number of the object when written.

◆ persistentOutput()

void ThePEG::BB4LPowhegLesHouchesFileReader::persistentOutput ( PersistentOStream &  os) const

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ preInitialize()

virtual bool ThePEG::BB4LPowhegLesHouchesFileReader::preInitialize ( ) const
protectedvirtual

Return true if this object needs to be initialized before all other objects because it needs to extract PDFs from the event file.

Member Data Documentation

◆ m_cfile

CFileLineReader ThePEG::BB4LPowhegLesHouchesFileReader::m_cfile
protected

The wrapper around the C FILE stream from which to read.

Definition at line 177 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_eventAttributes

map<string,string> ThePEG::BB4LPowhegLesHouchesFileReader::m_eventAttributes
protected

If LHF.

Map of attributes (name-value pairs) found in the last event tag.

Definition at line 229 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_eventComments

string ThePEG::BB4LPowhegLesHouchesFileReader::m_eventComments
protected

If LHF.

Additional comments found with the last read event.

Definition at line 223 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_headerblock

string ThePEG::BB4LPowhegLesHouchesFileReader::m_headerblock
protected

If LHF.

All lines from the header block.

Definition at line 207 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_ieve

long ThePEG::BB4LPowhegLesHouchesFileReader::m_ieve
protected

The current event number.

Definition at line 189 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_initAttributes

map<string,string> ThePEG::BB4LPowhegLesHouchesFileReader::m_initAttributes
protected

If LHF.

Map of attributes (name-value pairs) found in the init tag.

Definition at line 218 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_initBB4LPowhegLesHouchesFileReader

ClassDescription<BB4LPowhegLesHouchesFileReader> ThePEG::BB4LPowhegLesHouchesFileReader::m_initBB4LPowhegLesHouchesFileReader
staticprivate

Describe an abstract base class with persistent data.

Definition at line 275 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_initComments

string ThePEG::BB4LPowhegLesHouchesFileReader::m_initComments
protected

If LHF.

Additional comments found in the init block.

Definition at line 212 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_LHFVersion

string ThePEG::BB4LPowhegLesHouchesFileReader::m_LHFVersion
protected

If the file is a standard Les Houches formatted file (LHF) this is its version number.

If empty, this is not a Les Houches formatted file

Definition at line 196 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_neve

long ThePEG::BB4LPowhegLesHouchesFileReader::m_neve
protected

The number of events in this file.

Definition at line 184 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_optionalWeightsTemp

map<string,double> ThePEG::BB4LPowhegLesHouchesFileReader::m_optionalWeightsTemp
private

Temporary holder for optional weights.

Definition at line 267 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_outsideblock

string ThePEG::BB4LPowhegLesHouchesFileReader::m_outsideblock
protected

If LHF.

All lines (since the last open() or readEvent()) outside the header, init and event tags.

Definition at line 202 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_scalemap

map<string,string> ThePEG::BB4LPowhegLesHouchesFileReader::m_scalemap
private

Further information on the weights.

Definition at line 261 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_theDecayer

DecayerPtr ThePEG::BB4LPowhegLesHouchesFileReader::m_theDecayer
private

Decayer for any decay modes read from the file.

Definition at line 256 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_theFileName

string ThePEG::BB4LPowhegLesHouchesFileReader::m_theFileName
private

The name of the file from where to read events.

Definition at line 236 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_theIncludeCentral

bool ThePEG::BB4LPowhegLesHouchesFileReader::m_theIncludeCentral
private

Include central weight (for backup use)

Definition at line 251 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_theIncludeFxFxTags

bool ThePEG::BB4LPowhegLesHouchesFileReader::m_theIncludeFxFxTags
private

Include/Read FxFx tags.

Definition at line 246 of file BB4LPowhegLesHouchesFileReader.h.

◆ m_theQNumbers

bool ThePEG::BB4LPowhegLesHouchesFileReader::m_theQNumbers
private

Whether or not to search for QNUMBERS stuff.

Definition at line 241 of file BB4LPowhegLesHouchesFileReader.h.


The documentation for this class was generated from the following file:
ThePEG::BB4LPowhegLesHouchesFileReader::m_theIncludeFxFxTags
bool m_theIncludeFxFxTags
Include/Read FxFx tags.
Definition: BB4LPowhegLesHouchesFileReader.h:246
ThePEG::BB4LPowhegLesHouchesFileReader::m_theFileName
string m_theFileName
The name of the file from where to read events.
Definition: BB4LPowhegLesHouchesFileReader.h:236
ThePEG::BB4LPowhegLesHouchesFileReader::m_ieve
long m_ieve
The current event number.
Definition: BB4LPowhegLesHouchesFileReader.h:189
ThePEG::BB4LPowhegLesHouchesFileReader::m_neve
long m_neve
The number of events in this file.
Definition: BB4LPowhegLesHouchesFileReader.h:184
ThePEG::BB4LPowhegLesHouchesFileReader::m_theIncludeCentral
bool m_theIncludeCentral
Include central weight (for backup use)
Definition: BB4LPowhegLesHouchesFileReader.h:251
powheg_weight
double powheg_weight
Definition: BB4LPowhegLesHouchesFileReader.h:18
ThePEG::BB4LPowhegLesHouchesFileReader::m_theQNumbers
bool m_theQNumbers
Whether or not to search for QNUMBERS stuff.
Definition: BB4LPowhegLesHouchesFileReader.h:241