Mēnsūra
Public Member Functions | List of all members
PECGeneratorReader Class Reference

Reads generator-level information about a process from a PEC file. More...

#include <PECGeneratorReader.hpp>

Inheritance diagram for PECGeneratorReader:
GeneratorReader ReaderPlugin Plugin

Public Member Functions

 PECGeneratorReader (std::string const name="Generator")
 Creates plugin with the given name. More...
 
 PECGeneratorReader (PECGeneratorReader const &src) noexcept
 Copy constructor.
 
 PECGeneratorReader (PECGeneratorReader &&)=default
 Default move constructor.
 
PECGeneratorReaderoperator= (PECGeneratorReader const &)=delete
 Assignment operator is deleted.
 
virtual void BeginRun (Dataset const &dataset) override
 Sets up reading of the tree with generator information. More...
 
virtual PluginClone () const override
 Creates a newly configured clone. More...
 
virtual double GetAltWeight (unsigned index) const override
 Returns alternative LHE-level weight with the given index. More...
 
virtual double GetNominalWeight () const override
 Returns nominal LHE-level weight for the current event. More...
 
virtual unsigned GetNumAltWeights () const override
 Returns number of available alternative weights. More...
 
int GetProcessID () const
 Returns process ID (as written in LHE file) of the current event.
 
void RequestAltWeights (bool on=true)
 Specifies whether alternative LHE-level weights should be read.
 
- Public Member Functions inherited from GeneratorReader
 GeneratorReader (std::string const name="Generator")
 Creates plugin with the given name. More...
 
- Public Member Functions inherited from ReaderPlugin
 ReaderPlugin (std::string const &name)
 Constructor.
 
 ReaderPlugin (ReaderPlugin const &)=default
 Default copy constructor.
 
 ReaderPlugin (ReaderPlugin &&)=default
 Default move constructor.
 
ReaderPluginoperator= (ReaderPlugin const &)=default
 Default assignment operator.
 
virtual ~ReaderPlugin ()
 Trivial destructor.
 
- Public Member Functions inherited from Plugin
 Plugin (std::string const &name)
 Constructor.
 
 Plugin (Plugin const &)=default
 Default copy constructor.
 
 Plugin (Plugin &&)=default
 Default move constructor.
 
Pluginoperator= (Plugin const &)=default
 Default assignment operator.
 
virtual ~Plugin ()
 Trivial destructor.
 
virtual void EndRun ()
 Performs necessary actions needed after processing of a dataset is finished. More...
 
Processor const & GetMaster () const
 Returns a reference to the master. More...
 
std::string const & GetName () const
 Returns name of the plugin.
 
EventOutcome ProcessEventToOutcome ()
 Processes a new event from the current dataset. More...
 
void SetMaster (Processor const *processor)
 Provides a pointer to an instance of Processor class that owns the plugin. More...
 

Additional Inherited Members

- Public Types inherited from Plugin
enum  EventOutcome { EventOutcome::Ok, EventOutcome::FilterFailed, EventOutcome::NoEvents }
 Outcome of processing of an event. More...
 
- Protected Member Functions inherited from Plugin
Plugin const * GetDependencyPlugin (std::string const &name) const
 Returns a pointer to a precedent plugin in the path with the given name. More...
 

Detailed Description

Reads generator-level information about a process from a PEC file.

This plugin reads information about generate process, such as LHE-level event weights, input state, etc. Other plugins should be used to access generator-level particles and jets.

This reader relies on PECInputData to get access to the input file. It should only be used with simulated datasets.

Constructor & Destructor Documentation

PECGeneratorReader::PECGeneratorReader ( std::string const  name = "Generator")

Creates plugin with the given name.

User is encouraged to keep the default name.

Member Function Documentation

void PECGeneratorReader::BeginRun ( Dataset const &  dataset)
overridevirtual

Sets up reading of the tree with generator information.

Reimplemented from Plugin.

Reimplemented from Plugin.

Plugin * PECGeneratorReader::Clone ( ) const
overridevirtual

Creates a newly configured clone.

Implemented from Plugin.

Implements Plugin.

double PECGeneratorReader::GetAltWeight ( unsigned  index) const
overridevirtual

Returns alternative LHE-level weight with the given index.

These weights are only available if they have been requested using method RequestAltWeights. Otherwise an exception is thrown.

Reimplemented from GeneratorReader.

Reimplemented from GeneratorReader.

double PECGeneratorReader::GetNominalWeight ( ) const
overridevirtual

Returns nominal LHE-level weight for the current event.

Reimplemented from GeneratorReader.

Implements GeneratorReader.

unsigned PECGeneratorReader::GetNumAltWeights ( ) const
overridevirtual

Returns number of available alternative weights.

Reimplemented from GeneratorReader.

Reimplemented from GeneratorReader.


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