HepMC3 event record library
Public Member Functions | Data Fields | Protected Member Functions
GenPdfInfo Class Reference

Stores additional information about PDFs. More...

#include <GenPdfInfo.h>

+ Inheritance diagram for GenPdfInfo:
+ Collaboration diagram for GenPdfInfo:

Public Member Functions

bool from_string (const std::string &att) override
 Implementation of Attribute::from_string. More...
 
bool to_string (std::string &att) const override
 Implementation of Attribute::to_string. More...
 
void set (const int &parton_id1, const int &parton_id2, const double &x1, const double &x2, const double &scale_in, const double &xf1, const double &xf2, const int &pdf_id1=0, const int &pdf_id2=0)
 Set all fields. More...
 
bool operator== (const GenPdfInfo &) const
 Operator ==. More...
 
bool operator!= (const GenPdfInfo &) const
 Operator !=. More...
 
bool is_valid () const
 Verify that the instance contains non-zero information. More...
 
virtual bool init ()
 Optionally initialize the attribute after from_string. More...
 
virtual bool init (const GenRunInfo &)
 Optionally initialize the attribute after from_string. More...
 
bool is_parsed () const
 Check if this attribute is parsed. More...
 
const std::string & unparsed_string () const
 Get unparsed string. More...
 
const GenEventevent () const
 
GenParticlePtr particle ()
 
ConstGenParticlePtr particle () const
 
GenVertexPtr vertex ()
 
ConstGenVertexPtr vertex () const
 

Data Fields

int parton_id [2]
 Parton PDG ID. More...
 
int pdf_id [2]
 LHAPDF ID code. More...
 
double scale
 Factorisation scale (in GEV) More...
 
double x [2]
 Parton momentum fraction. More...
 
double xf [2]
 PDF value. More...
 

Protected Member Functions

void set_is_parsed (bool flag)
 Set is_parsed flag. More...
 
void set_unparsed_string (const std::string &st)
 Set unparsed string. More...
 

Detailed Description

Stores additional information about PDFs.

This is an example of event attribute used to store PDF-related information

Note
Input parton flavour codes id1 & id2 are expected to obey the PDG code conventions, especially g = 21.
The contents of pdf1 and pdf2 are expected to be x*f(x). The LHAPDF set ids are the entries in the first column of http:///projects.hepforge.org/lhapdf/PDFsets.index
Examples:
HepMC3_fileIO_example.cc.

Definition at line 32 of file GenPdfInfo.h.

Member Function Documentation

const GenEvent* event ( ) const
inlineinherited

return the GenEvent to which this Attribute belongs, if at all.

Definition at line 109 of file Attribute.h.

References Attribute::m_event.

bool from_string ( const std::string &  att)
overridevirtual

Implementation of Attribute::from_string.

Implements Attribute.

Definition at line 18 of file GenPdfInfo.cc.

References GenPdfInfo::parton_id, GenPdfInfo::pdf_id, GenPdfInfo::scale, GenPdfInfo::x, and GenPdfInfo::xf.

virtual bool init ( )
inlinevirtualinherited

Optionally initialize the attribute after from_string.

Reimplemented in HEPEUPAttribute.

Definition at line 82 of file Attribute.h.

virtual bool init ( const GenRunInfo )
inlinevirtualinherited

Optionally initialize the attribute after from_string.

Is passed a reference to the GenRunInfo object to which the Attribute belongs.

Reimplemented in HEPEUPAttribute.

Definition at line 91 of file Attribute.h.

bool is_parsed ( ) const
inlineinherited

Check if this attribute is parsed.

Definition at line 103 of file Attribute.h.

References Attribute::m_is_parsed.

bool is_valid ( ) const

Verify that the instance contains non-zero information.

Definition at line 91 of file GenPdfInfo.cc.

References GenPdfInfo::parton_id, GenPdfInfo::pdf_id, GenPdfInfo::scale, GenPdfInfo::x, and GenPdfInfo::xf.

bool operator!= ( const GenPdfInfo a) const

Operator !=.

Definition at line 87 of file GenPdfInfo.cc.

bool operator== ( const GenPdfInfo a) const

Operator ==.

Definition at line 83 of file GenPdfInfo.cc.

GenParticlePtr particle ( )
inlineinherited

return the GenParticle to which this Attribute belongs, if at all.

Definition at line 114 of file Attribute.h.

References Attribute::m_particle.

ConstGenParticlePtr particle ( ) const
inlineinherited

return the GenParticle to which this Attribute belongs, if at all.

Definition at line 119 of file Attribute.h.

References Attribute::m_particle.

void set ( const int &  parton_id1,
const int &  parton_id2,
const double &  x1,
const double &  x2,
const double &  scale_in,
const double &  xf1,
const double &  xf2,
const int &  pdf_id1 = 0,
const int &  pdf_id2 = 0 
)

Set all fields.

Definition at line 69 of file GenPdfInfo.cc.

References GenPdfInfo::parton_id, GenPdfInfo::pdf_id, GenPdfInfo::scale, GenPdfInfo::x, and GenPdfInfo::xf.

void set_is_parsed ( bool  flag)
inlineprotectedinherited

Set is_parsed flag.

Definition at line 135 of file Attribute.h.

References Attribute::m_is_parsed.

void set_unparsed_string ( const std::string &  st)
inlineprotectedinherited

Set unparsed string.

Definition at line 138 of file Attribute.h.

References Attribute::m_string.

bool to_string ( std::string &  att) const
overridevirtual

Implementation of Attribute::to_string.

Implements Attribute.

Definition at line 50 of file GenPdfInfo.cc.

References GenPdfInfo::parton_id, GenPdfInfo::pdf_id, GenPdfInfo::scale, GenPdfInfo::x, and GenPdfInfo::xf.

const std::string& unparsed_string ( ) const
inlineinherited

Get unparsed string.

Definition at line 106 of file Attribute.h.

References Attribute::m_string.

GenVertexPtr vertex ( )
inlineinherited

return the GenVertex to which this Attribute belongs, if at all.

Definition at line 124 of file Attribute.h.

References Attribute::m_vertex.

ConstGenVertexPtr vertex ( ) const
inlineinherited

return the GenVertex to which this Attribute belongs, if at all.

Definition at line 129 of file Attribute.h.

References Attribute::m_vertex.

Field Documentation

int parton_id[2]

Parton PDG ID.

Definition at line 38 of file GenPdfInfo.h.

int pdf_id[2]

LHAPDF ID code.

Definition at line 39 of file GenPdfInfo.h.

double scale

Factorisation scale (in GEV)

Definition at line 40 of file GenPdfInfo.h.

double x[2]

Parton momentum fraction.

Definition at line 41 of file GenPdfInfo.h.

double xf[2]

PDF value.

Definition at line 42 of file GenPdfInfo.h.


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