21 const char *cursor = att.data();
25 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
28 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
31 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
34 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
37 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
40 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
43 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
46 if ( !(cursor = strchr(cursor+1,
' ')) )
return false;
53 std::array<char, 255> buf;
55 snprintf(buf.data(), buf.size(),
"%i %i %.8e %.8e %.8e %.8e %.8e %i %i",
71void GenPdfInfo::set(
const int& parton_id1,
const int& parton_id2,
const double& x1,
const double& x2,
72 const double& scale_in,
const double& xf1,
const double& xf2,
73 const int& pdf_id1,
const int& pdf_id2) {
86 return ( memcmp( (
void*)
this, (
void*)&a,
sizeof(
class GenPdfInfo) ) == 0 );
90 return !( a == *this );
97 if (
x[0] != 0 ) {
return true; }
98 if (
x[1] != 0 ) {
return true; }
99 if (
scale != 0 ) {
return true; }
100 if (
xf[0] != 0 ) {
return true; }
101 if (
xf[1] != 0 ) {
return true; }
102 if (
pdf_id[0] != 0 ) {
return true; }
103 if (
pdf_id[1] != 0 ) {
return true; }
Definition of event attribute class GenPdfInfo.
Stores additional information about PDFs.
int parton_id[2]
Parton PDG ID.
double scale
Factorisation scale (in GEV)
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.
int pdf_id[2]
LHAPDF ID code.
bool is_valid() const
Verify that the instance contains non-zero information.
bool from_string(const std::string &att) override
Implementation of Attribute::from_string.
double x[2]
Parton momentum fraction.
bool operator==(const GenPdfInfo &) const
Operator ==.
bool to_string(std::string &att) const override
Implementation of Attribute::to_string.
bool operator!=(const GenPdfInfo &) const
Operator !=.