19 const char *cursor = att.data();
23 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
26 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
29 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
32 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
35 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
38 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
41 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
44 if( !(cursor = strchr(cursor+1,
' ')) )
return false;
53 snprintf(buf,255,
"%i %i %.8e %.8e %.8e %.8e %.8e %i %i",
69 void GenPdfInfo::set(
const int& parton_id1,
const int& parton_id2,
const double& x1,
const double& x2,
70 const double& scale_in,
const double& xf1,
const double& xf2,
71 const int& pdf_id1,
const int& pdf_id2) {
84 return ( memcmp( (
void*)
this, (
void*)&a,
sizeof(
class GenPdfInfo) ) == 0 );
88 return !( a == *this );
95 if(
x[0] != 0 )
return true;
96 if(
x[1] != 0 )
return true;
97 if(
scale != 0 )
return true;
98 if(
xf[0] != 0 )
return true;
99 if(
xf[1] != 0 )
return true;
100 if(
pdf_id[0] != 0 )
return true;
101 if(
pdf_id[1] != 0 )
return true;
bool to_string(std::string &att) const override
Implementation of Attribute::to_string.
int parton_id[2]
Parton PDG ID.
double x[2]
Parton momentum fraction.
double scale
Factorisation scale (in GEV)
Stores additional information about PDFs.
bool operator==(const GenPdfInfo &) const
Operator ==.
bool is_valid() const
Verify that the instance contains non-zero information.
int pdf_id[2]
LHAPDF ID code.
bool operator!=(const GenPdfInfo &) const
Operator !=.
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 of event attribute class GenPdfInfo.
bool from_string(const std::string &att) override
Implementation of Attribute::from_string.