LHEF  3.0(beta)
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
LHEF::Cut Struct Reference

The Cut class represents a cut used by the Matrix Element generator. More...

#include <LHEF.h>

Inheritance diagram for LHEF::Cut:
LHEF::TagBase

Public Member Functions

 Cut ()
 Intitialize default values.
 
 Cut (const XMLTag &tag, const std::map< std::string, std::set< long > > &ptypes)
 Create from XML tag.
 
void print (std::ostream &file) const
 Print out an XML tag.
 
bool match (long id1, long id2=0) const
 Check if a id1 matches p1 and id2 matches p2.
 
bool passCuts (const std::vector< long > &id, const std::vector< std::vector< double > > &p) const
 Check if the particles given as a vector of PDG id numbers, and a vector of vectors of momentum components, p, will pass the cut defined in this event.
 
bool outside (double value) const
 Return true if the given value is outside limits.
 
- Public Member Functions inherited from LHEF::TagBase
 TagBase ()
 Default constructor does nothing.
 
 TagBase (const AttributeMap &attr, std::string conts=std::string())
 Main constructor stores the attributes and contents of a tag.
 
bool getattr (std::string n, double &v, bool erase=true)
 Find an attribute named n and set the double variable v to the corresponding value.
 
bool getattr (std::string n, bool &v, bool erase=true)
 Find an attribute named n and set the bool variable v to true if the corresponding value is "yes".
 
bool getattr (std::string n, long &v, bool erase=true)
 Find an attribute named n and set the long variable v to the corresponding value.
 
bool getattr (std::string n, int &v, bool erase=true)
 Find an attribute named n and set the long variable v to the corresponding value.
 
bool getattr (std::string n, std::string &v, bool erase=true)
 Find an attribute named n and set the string variable v to the corresponding value.
 
void printattrs (std::ostream &file) const
 print out ' name="value"' for all unparsed attributes.
 
void closetag (std::ostream &file, std::string tag) const
 Print out end of tag marker.
 

Static Public Member Functions

static double eta (const std::vector< double > &p)
 Return the pseudorapidity of a particle with momentum p.
 
static double rap (const std::vector< double > &p)
 Return the true rapidity of a particle with momentum p.
 
static double deltaR (const std::vector< double > &p1, const std::vector< double > &p2)
 Return the delta-R of a particle pair with momenta p1 and p2.
 
- Static Public Member Functions inherited from LHEF::TagBase
static std::string yes ()
 Static string token for truth values.
 

Public Attributes

std::string type
 The variable in which to cut.
 
std::set< long > p1
 The first types particle types for which this cut applies.
 
std::string np1
 Symbolic name for p1.
 
std::set< long > p2
 The second type of particles for which this cut applies.
 
std::string np2
 Symbolic name for p1.
 
double min
 The minimum value of the variable.
 
double max
 The maximum value of the variable.
 
- Public Attributes inherited from LHEF::TagBase
XMLTag::AttributeMap attributes
 The attributes of this tag;.
 
std::string contents
 The contents of this tag.
 

Additional Inherited Members

- Public Types inherited from LHEF::TagBase
typedef XMLTag::AttributeMap AttributeMap
 Convenient typedef.
 

Detailed Description

The Cut class represents a cut used by the Matrix Element generator.

Definition at line 577 of file LHEF.h.

Member Function Documentation

bool LHEF::Cut::match ( long  id1,
long  id2 = 0 
) const
inline

Check if a id1 matches p1 and id2 matches p2.

Only non-zero values are considered.

Definition at line 657 of file LHEF.h.

References p1, and p2.

Referenced by passCuts().


The documentation for this struct was generated from the following file: