HepMC3 event record library
include
HepMC3
GenPdfInfo.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// This file is part of HepMC
4
// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
5
//
6
#ifndef HEPMC3_GENPDFINFO_H
7
#define HEPMC3_GENPDFINFO_H
8
/**
9
* @file GenPdfInfo.h
10
* @brief Definition of event attribute \b class GenPdfInfo
11
*
12
* @class HepMC3::GenPdfInfo
13
* @brief Stores additional information about PDFs
14
*
15
* This is an example of event attribute used to store PDF-related information
16
*
17
* @note Input parton flavour codes id1 & id2 are expected to obey the
18
* PDG code conventions, especially g = 21.
19
*
20
* @note The contents of pdf1 and pdf2 are expected to be x*f(x).
21
* The LHAPDF set ids are the entries in the first column of
22
* http:///projects.hepforge.org/lhapdf/PDFsets.index
23
*
24
* @ingroup attributes
25
*
26
*/
27
#include <iostream>
28
#include "
HepMC3/Attribute.h
"
29
30
namespace
HepMC3
{
31
32
class
GenPdfInfo
:
public
Attribute
{
33
34
//
35
// Fields
36
//
37
public
:
38
int
parton_id
[2];
///< Parton PDG ID
39
int
pdf_id
[2];
///< LHAPDF ID code
40
double
scale
;
///< Factorisation scale (in GEV)
41
double
x
[2];
///< Parton momentum fraction
42
double
xf
[2];
///< PDF value
43
44
//
45
// Functions
46
//
47
public
:
48
/** @brief Implementation of Attribute::from_string */
49
bool
from_string
(
const
std::string &att)
override
;
50
51
/** @brief Implementation of Attribute::to_string */
52
bool
to_string
(std::string &att)
const override
;
53
54
/** @brief Set all fields */
55
void
set
(
const
int
& parton_id1,
const
int
& parton_id2,
const
double
& x1,
const
double
& x2,
56
const
double
& scale_in,
const
double
& xf1,
const
double
& xf2,
57
const
int
& pdf_id1 = 0,
const
int
& pdf_id2 = 0 );
58
59
bool
operator==
(
const
GenPdfInfo
& )
const
;
///< Operator ==
60
bool
operator!=
(
const
GenPdfInfo
& )
const
;
///< Operator !=
61
bool
is_valid
()
const
;
///< Verify that the instance contains non-zero information
62
};
63
64
}
// namespace HepMC3
65
66
#endif
HepMC3::GenPdfInfo::from_string
bool from_string(const std::string &att) override
Implementation of Attribute::from_string.
Definition:
GenPdfInfo.cc:19
HepMC3::GenPdfInfo::pdf_id
int pdf_id[2]
LHAPDF ID code.
Definition:
GenPdfInfo.h:39
HepMC3::GenPdfInfo::is_valid
bool is_valid() const
Verify that the instance contains non-zero information.
Definition:
GenPdfInfo.cc:92
HepMC3::GenPdfInfo
Stores additional information about PDFs.
Definition:
GenPdfInfo.h:32
HepMC3
HepMC3 main namespace.
Definition:
AnalysisExample.h:19
HepMC3::GenPdfInfo::operator==
bool operator==(const GenPdfInfo &) const
Operator ==.
Definition:
GenPdfInfo.cc:84
HepMC3::GenPdfInfo::to_string
bool to_string(std::string &att) const override
Implementation of Attribute::to_string.
Definition:
GenPdfInfo.cc:51
HepMC3::GenPdfInfo::x
double x[2]
Parton momentum fraction.
Definition:
GenPdfInfo.h:41
HepMC3::GenPdfInfo::xf
double xf[2]
PDF value.
Definition:
GenPdfInfo.h:42
HepMC3::Attribute
Base attribute class.
Definition:
Attribute.h:44
HepMC3::GenPdfInfo::scale
double scale
Factorisation scale (in GEV)
Definition:
GenPdfInfo.h:40
HepMC3::GenPdfInfo::set
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:
GenPdfInfo.cc:70
HepMC3::GenPdfInfo::parton_id
int parton_id[2]
Parton PDG ID.
Definition:
GenPdfInfo.h:38
Attribute.h
Definition of class Attribute, class IntAttribute and class StringAttribute.
HepMC3::GenPdfInfo::operator!=
bool operator!=(const GenPdfInfo &) const
Operator !=.
Definition:
GenPdfInfo.cc:88
Generated on Mon Aug 23 2021 00:00:00 for HepMC3 event record library by
1.8.20