[95a917c] | 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
|
---|