ThePEG  1.8.0
Classes | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes
ThePEG::MadGraphReader Class Reference

MadGraphReader inherits from LesHouchesFileReader and is able to read event files produced by the MadGraph/MadEvent program. More...

#include <MadGraphReader.h>

Inheritance diagram for ThePEG::MadGraphReader:
Inheritance graph
[legend]

List of all members.

Classes

struct  WeightedException
 Exception class used to inform about inability to work with some weighted event files. More...

Public Member Functions

Standard constructors and destructors.
 MadGraphReader ()
 Default constructor.
Virtual functions specified by the LesHouchesReader base class.
virtual void open ()
 Open a file or stream with events and read in the run information into the corresponding protected variables.
virtual long scan ()
 Scan the file or stream to obtain information about cross section weights and particles etc.
virtual bool doReadEvent ()
 Read the next event form the file or stream into the corresponding protected variables.
Functions used by the persistent I/O system.
void persistentOutput (PersistentOStream &os) const
 Function used to write out object persistently.
void persistentInput (PersistentIStream &is, int version)
 Function used to read in object persistently.
- Public Member Functions inherited from ThePEG::LesHouchesFileReader
string filename () const
 Return the name of the file from where to read events.
 LesHouchesFileReader ()
 Default constructor.
 LesHouchesFileReader (const LesHouchesFileReader &)
 Copy-constructor.
virtual ~LesHouchesFileReader ()
 Destructor.
virtual void initialize (LesHouchesEventHandler &eh)
 Initialize.
virtual void close ()
 Close the file from which events have been read.
- Public Member Functions inherited from ThePEG::LesHouchesReader
 LesHouchesReader (bool active=false)
 Default constructor.
 LesHouchesReader (const LesHouchesReader &)
 Copy-constructor.
virtual ~LesHouchesReader ()
 Destructor.
virtual double getEvent ()
 Calls readEvent() or uncacheEvent() to read information into the LesHouches common block variables.
virtual bool readEvent ()
 Calls doReadEvent() and performs pre-defined reweightings.
virtual void skip (long n)
 Skip n events.
tXCombPtr getXComb ()
 Get an XComb object.
tSubProPtr getSubProcess ()
 Get a SubProcess object corresponding to the information in the Les Houches common block variables.
virtual void initStat ()
 Take the information corresponding to the HEPRUP common block and initialize the statistics for this reader.
double reweight ()
 Reweights the current event using the reweights and preweights vectors.
virtual void fillEvent ()
 Converts the information in the Les Houches common block variables into a Particle objects.
void reset ()
 Removes the particles created in the last generated event, preparing to produce a new one.
virtual void setWeightScale (long neve)
 Possibility for subclasses to recover from non-conformant settings of XMAXUP when an event file has been scanned with neve events.
long NEvents () const
 The number of events found in this reader.
long currentPosition () const
 The number of events produced so far.
long maxScan () const
 The maximum number of events to scan to collect information about processes and cross sections.
bool active () const
 Return true if this reader is active.
bool negativeWeights () const
 True if negative weights may be produced.
const XSecStatxSecStats () const
 The collected cross section statistics for this reader.
const StatMapprocessStats () const
 Collected statistics about the individual processes.
void select (double weight)
 Select the current event.
void accept ()
 Accept the current event assuming it was previously selcted.
void reject (double w)
 Reject the current event assuming it was previously accepted.
virtual void increaseMaxXSec (CrossSection maxxsec)
 Increase the overestimated cross section for this reader.
tPExtrPtr partonExtractor () const
 The PartonExtractor object used to construct remnants.
tCascHdlPtr CKKWHandler () const
 Return a possibly null pointer to a CascadeHandler to be used for CKKW-reweighting.
const PartonPairVecpartonBins () const
 The pairs of PartonBin objects describing the partons which can be extracted by the PartonExtractor object.
const XCombMapxCombs () const
 The map of XComb objects indexed by the corresponding PartonBin pair.
const Cutscuts () const
 The Cuts object to be used for this reader.
double eventWeight () const
 The current event weight given by XWGTUP times possible reweighting.
const map< string, double > & optionalEventWeights () const
 Return the optional named weights associated to the current event.
const PBIPairpartonBinInstances () const
 The pair of PartonBinInstance objects describing the current incoming partons in the event.
const PPairbeams () const
 Return the instances of the beam particles for the current event.
const PPairincoming () const
 Return the instances of the incoming particles to the sub process for the current event.
const PVectoroutgoing () const
 Return the instances of the outgoing particles from the sub process for the current event.
const PVectorintermediates () const
 Return the instances of the intermediate particles in the sub process for the current event.
int maxMultCKKW () const
 If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the highest multiplicity matrix element in the group.
int minMultCKKW () const
 If this reader is to be used (possibly together with others) for CKKW reweighting and veto, this should give the multiplicity of outgoing particles in the lowest multiplicity matrix element in the group.
- Public Member Functions inherited from ThePEG::LastXCombInfo<>
const XComblastXComb () const
 Return a reference to the last selected XComb.
tXCPtr lastXCombPtr () const
 Return a pointer to the last selected XComb.
const XComblastHeadXComb () const
 If the last selected XComb object belongs to a group of XComb's return a reference to the head XComb object for this group.
tXCPtr lastHeadXCombPtr () const
 If the last selected XComb object belongs to a group of XComb's return a pointer to the head XComb object for this group.
const EventHandlerlastEventHandler () const
 Return a reference to the currently used EventHandler.
tPExtrPtr lastExtractor () const
 A pointer to the currently used parton extractor.
PDFT pdf (tcPPtr parton) const
 Return the parton density used to extract the given parton.
const CutslastCuts () const
 A reference to the currently used kinematical cuts.
tCutsPtr lastCutsPtr () const
 A pointer to the currently used kinematical cuts.
const PPairlastParticles () const
 Return the pair of incoming parton instances.
Energy2 lastS () const
 The last generated total energy squared of the incoming particles.
const PPairlastPartons () const
 Return the pair of incoming parton instances.
Energy2 lastSHat () const
 The last used interval in total parton-parton energy squared.
double lastTau () const
 Return lastSHat()/lastS().
double lastY () const
 The generated rapidity of the hard scattering sub-system.
double lastP1 () const
 Log of one over the momentum fraction of the first incoming particle w.r.t.
double lastP2 () const
 Log of one over the momentum fraction of the second incoming particle w.r.t.
double lastL1 () const
 Log of one over the first incoming parton momentum fraction w.r.t.
double lastL2 () const
 Log of one over the second incoming parton momentum fraction w.r.t.
double lastX1 () const
 The first incoming parton momentum fraction w.r.t.
double lastX2 () const
 The second incoming parton momentum fraction w.r.t.
double lastE1 () const
 Return 1-lastX1() to highest possible precision for x $\rightarrow$ 1.
double lastE2 () const
 Return 1-lastX2() to highest possible precision for x $\rightarrow$ 1.
double lastFL1L2 () const
 The product of the parton density functions at the last generated phase-space point.
Energy2 lastScale () const
 The chosen scale of the hard scattering.
double lastAlphaS () const
 Get the $\alpha_S$ used in the hard scattering.
double lastAlphaEM () const
 Get the $\alpha_{EM}$ used in the hard scattering.
const vector< Lorentz5Momentum > & meMomenta () const
 Return the momenta of the incoming and outgoing partons to be used by the matrix element object, in the order specified by the TreeDiagram objects given by the matrix element.
double lastME2 () const
 Return the matrix element squared as calculated for the last phase space point.
double jacobian () const
 Get the last jacobian obtained when generating the kinematics for the call to dSigHatDR.
CrossSection lastMECrossSection () const
 Return the partonic cross section as calculated for the last phase space point.
double lastMEPDFWeight () const
 Return the PDF weight as calculated for the last phase space point, if the matrix element does supply PDF weights.
tSubProPtr subProcess () const
 Return the SubProcess object corresponding to the last generated sub-process.
const cPDVectormePartonData () const
 Return the incoming and outgoing parton types to be used by the matrix element object, in the order specified by the TreeDiagram objects given by the matrix element.

Static Public Member Functions

static void Init ()
 Standard Init function used to initialize the interfaces.

Protected Member Functions

string scanCuts (string)
 Interface function to scan a madgraph file and extract information about used cuts.
long numberOfEvents (string)
 Function to extract the number of events from a string.
Clone Methods.
virtual IBPtr clone () const
 Make a simple clone of this object.
virtual IBPtr fullclone () const
 Make a clone of this object, possibly modifying the cloned object to make it sane.
Standard Interfaced functions.
virtual void doinit ()
 Initialize this object after the setup phase before saving an EventGenerator to disk.
CutsPtr initCuts ()
 Called from doinit() to extract cuts from the event file and add the corresponding objects to the current EventGenerator.
virtual void initPDFs ()
 Called from LesHouchesReader::doinit() to extract PDFs from the event file and add the corresponding objects to the current EventGenerator.
virtual bool preInitialize () const
 Return true if this object needs to be initialized before all other objects because it needs to extract cuts from the event file.
virtual void dofinish ()
 Finalize this object.
- Protected Member Functions inherited from ThePEG::LesHouchesFileReader
- Protected Member Functions inherited from ThePEG::LesHouchesReader
virtual bool checkPartonBin ()
 Check the existence of a pair of PartonBin objects corresponding to the current event.
virtual void createParticles ()
 Create instances of all particles in the event and store them in particleIndex.
virtual tcPBPair createPartonBinInstances ()
 Using the already created particles create a pair of PartonBinInstance objects corresponding to the incoming partons.
virtual void createBeams ()
 Create instances of the incoming beams in the event and store them in particleIndex.
virtual void connectMothers ()
 Go through the mother indices and connect up the Particles.
void NEvents (long x)
 The number of events in this reader.
XCombMapxCombs ()
 The map of XComb objects indexed by the corresponding PartonBin pair.
virtual void doinitrun ()
 Initialize this object.
string cacheFileName () const
 Name of file used to cache the events form the reader in a fast-readable form.
bool cutEarly () const
 Determines whether to apply cuts to events converting them to ThePEG format.
CFile cacheFile () const
 File stream for the cache.
void openReadCacheFile ()
 Open the cache file for reading.
void openWriteCacheFile ()
 Open the cache file for writing.
void closeCacheFile ()
 Close the cache file;.
void cacheEvent () const
 Write the current event to the cache file.
bool uncacheEvent ()
 Read an event from the cache file.
void reopen ()
 Reopen a reader.

Protected Attributes

Energy fixedScale
 Fixed scale.
double fixedAEM
 Fixed $\alpha_{EM}$.
double fixedAS
 Fixed $\alpha_S$.
map< string, double > cuts
 New MadGraph files contain suitable information about cuts used in the generation.
bool doInitCuts
 If true, cuts may be extracted from the event file during initialization.
- Protected Attributes inherited from ThePEG::LesHouchesFileReader
CFileLineReader cfile
 The wrapper around the C FILE stream from which to read.
long neve
 The number of events in this file.
long ieve
 The current event number.
string LHFVersion
 If the file is a standard Les Houches formatted file (LHF) this is its version number.
string outsideBlock
 If LHF.
string headerBlock
 If LHF.
string initComments
 If LHF.
map< string, string > initAttributes
 If LHF.
string eventComments
 If LHF.
map< string, string > eventAttributes
 If LHF.

Private Member Functions

MadGraphReaderoperator= (const MadGraphReader &)
 Private and non-existent assignment operator.

Static Private Attributes

static ClassDescription
< MadGraphReader
initMadGraphReader
 Describe a concrete class with persistent data.

Detailed Description

MadGraphReader inherits from LesHouchesFileReader and is able to read event files produced by the MadGraph/MadEvent program.

See also:
The interfaces defined for MadGraphReader.

Definition at line 24 of file MadGraphReader.h.


Member Function Documentation

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

Make a simple clone of this object.

Returns:
a pointer to the new object.

Reimplemented from ThePEG::LesHouchesFileReader.

virtual void ThePEG::MadGraphReader::dofinish ( )
inlineprotectedvirtual

Finalize this object.

Called in the run phase just after a run has ended. Used eg. to write out statistics.

Reimplemented from ThePEG::LesHouchesReader.

Definition at line 141 of file MadGraphReader.h.

References ThePEG::XSecStat::accepted(), ThePEG::LesHouchesReader::stats, and ThePEG::Interfaced::useMe().

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

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

Exceptions:
InitExceptionif object could not be initialized properly.

Reimplemented from ThePEG::LesHouchesFileReader.

virtual bool ThePEG::MadGraphReader::doReadEvent ( )
virtual

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

Return false if there is no more events.

Reimplemented from ThePEG::LesHouchesFileReader.

virtual IBPtr ThePEG::MadGraphReader::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.

Reimplemented from ThePEG::LesHouchesFileReader.

void ThePEG::MadGraphReader::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.

Reimplemented from ThePEG::LesHouchesFileReader.

void ThePEG::MadGraphReader::persistentOutput ( PersistentOStream os) const

Function used to write out object persistently.

Parameters:
osthe persistent output stream written to.

Reimplemented from ThePEG::LesHouchesFileReader.

virtual long ThePEG::MadGraphReader::scan ( )
virtual

Scan the file or stream to obtain information about cross section weights and particles etc.

This function should fill the variables corresponding to the /HEPRUP/ common block. The function returns the number of events scanned. This version calls the base class function and the readjusts the values in HEPRUP to cure some inconsistencies in the MadGraph files.

Reimplemented from ThePEG::LesHouchesReader.

string ThePEG::MadGraphReader::scanCuts ( string  )
protected

Interface function to scan a madgraph file and extract information about used cuts.

The corresponding cut objects are created in the Repository and assigned to this reader.


Member Data Documentation

map<string,double> ThePEG::MadGraphReader::cuts
protected

New MadGraph files contain suitable information about cuts used in the generation.

The non-zero ones are stored in this map.

Definition at line 188 of file MadGraphReader.h.

double ThePEG::MadGraphReader::fixedAEM
protected

Fixed $\alpha_{EM}$.

Old MadGraph files do not necessarily contain information about the value of $\alpha_{EM}$. In this case this is used instead.

Definition at line 175 of file MadGraphReader.h.

double ThePEG::MadGraphReader::fixedAS
protected

Fixed $\alpha_S$.

Old MadGraph files do not necessarily contain information about the value of $\alpha_S$. In this case this is used instead.

Definition at line 182 of file MadGraphReader.h.

Energy ThePEG::MadGraphReader::fixedScale
protected

Fixed scale.

Old MadGraph files do not necessarily contain information about the factorization (or renormalization) scale. In this case this is used instead.

Definition at line 168 of file MadGraphReader.h.


The documentation for this class was generated from the following file: