cepgen is hosted by Hepforge, IPPP Durham
CepGen N/A
Central exclusive processes event generator

A one-dimensional graph object. More...

#include <include/CepGen/Utils/Graph.h>

+ Inheritance diagram for Graph1D:
+ Collaboration diagram for Graph1D:

Public Types

using axis_t = std::map<coord_t, Value>
 Metadata for an axis (coordinates and bins value)
 
using dual_axis_t = std::map<coord_t, axis_t>
 Metadata for a two-dimensional axis definition (coordinates and bins values)
 

Public Member Functions

 Graph1D (const std::string &name="", const std::string &title="")
 
Graph1DaddPoint (double x, double y)
 Add one value to the graph.
 
Graph1DaddPoint (double x, double y, double ex, double ey)
 Add one value and its uncertainties to the graph.
 
const axis_tpoints () const
 Retrieve all values in the graph.
 
double minimum () const
 Minimum value registered in this graph.
 
double maximum () const
 Maximum value registered in this graph.
 
double chi2 (const Graph1D &) const
 Compute the \(\chi^{2}\) between this graph and another.
 
std::set< double > xCoords () const
 List of horizontal axis coordinates.
 
const ValuevalueAt (double) const
 Retrieve the value of the graph at a given coordinate.
 
bool isGraph1D () const override
 Is this drawable a one-dimensional graph?
 
const std::string & name () const
 Drawable name.
 
void setName (const std::string &name)
 Set the drawable name.
 
const std::string & title () const
 Drawable name.
 
void setTitle (const std::string &title)
 Set the drawable title.
 
AxisInfoxAxis ()
 
const AxisInfoxAxis () const
 
AxisInfoyAxis ()
 
const AxisInfoyAxis () const
 
AxisInfozAxis ()
 
const AxisInfozAxis () const
 
virtual bool isHist1D () const
 Is this drawable a one-dimensional histogram?
 
virtual bool isHist2D () const
 Is this drawable a two-dimensional histogram?
 
virtual bool isGraph2D () const
 Is this drawable a two-dimensional graph?
 

Protected Attributes

std::string name_
 Computer-readable name.
 
std::string title_
 Human-readable title.
 
AxisInfo x_axis_
 x-axis metadata
 
AxisInfo y_axis_
 y-axis metadata
 
AxisInfo z_axis_
 z-axis metadata
 

Detailed Description

Definition at line 28 of file Graph.h.

Member Typedef Documentation

◆ axis_t

using axis_t = std::map<coord_t, Value>
inherited

Definition at line 88 of file Drawable.h.

◆ dual_axis_t

using dual_axis_t = std::map<coord_t, axis_t>
inherited

Definition at line 96 of file Drawable.h.

Constructor & Destructor Documentation

◆ Graph1D()

Graph1D ( const std::string & name = "",
const std::string & title = "" )
explicit

Member Function Documentation

◆ addPoint() [1/2]

Graph1D & addPoint ( double x,
double y )

◆ addPoint() [2/2]

Graph1D & addPoint ( double x,
double y,
double ex,
double ey )

◆ chi2()

double chi2 ( const Graph1D & ) const

◆ isGraph1D()

bool isGraph1D ( ) const
overridevirtual

Reimplemented from Drawable.

Definition at line 42 of file Graph.h.

◆ isGraph2D()

virtual bool isGraph2D ( ) const
virtualinherited

Reimplemented in Graph2D.

Definition at line 101 of file Drawable.h.

◆ isHist1D()

virtual bool isHist1D ( ) const
virtualinherited

Reimplemented in Hist1D.

Definition at line 98 of file Drawable.h.

◆ isHist2D()

virtual bool isHist2D ( ) const
virtualinherited

Reimplemented in Hist2D.

Definition at line 99 of file Drawable.h.

◆ maximum()

double maximum ( ) const

◆ minimum()

double minimum ( ) const

◆ name()

const std::string & name ( ) const
inherited

Definition at line 35 of file Drawable.h.

◆ points()

const axis_t & points ( ) const

Definition at line 34 of file Graph.h.

◆ setName()

void setName ( const std::string & name)
inherited

Definition at line 36 of file Drawable.h.

◆ setTitle()

void setTitle ( const std::string & title)
inherited

Definition at line 39 of file Drawable.h.

◆ title()

const std::string & title ( ) const
inherited

Definition at line 38 of file Drawable.h.

◆ valueAt()

const Value & valueAt ( double ) const

◆ xAxis() [1/2]

AxisInfo & xAxis ( )
inherited

Definition at line 72 of file Drawable.h.

◆ xAxis() [2/2]

const AxisInfo & xAxis ( ) const
inherited

Definition at line 73 of file Drawable.h.

◆ xCoords()

std::set< double > xCoords ( ) const

◆ yAxis() [1/2]

AxisInfo & yAxis ( )
inherited

Definition at line 74 of file Drawable.h.

◆ yAxis() [2/2]

const AxisInfo & yAxis ( ) const
inherited

Definition at line 75 of file Drawable.h.

◆ zAxis() [1/2]

AxisInfo & zAxis ( )
inherited

Definition at line 76 of file Drawable.h.

◆ zAxis() [2/2]

const AxisInfo & zAxis ( ) const
inherited

Definition at line 77 of file Drawable.h.

Member Data Documentation

◆ name_

std::string name_
protectedinherited

Definition at line 104 of file Drawable.h.

◆ title_

std::string title_
protectedinherited

Definition at line 105 of file Drawable.h.

◆ x_axis_

AxisInfo x_axis_
protectedinherited

Definition at line 106 of file Drawable.h.

◆ y_axis_

AxisInfo y_axis_
protectedinherited

Definition at line 107 of file Drawable.h.

◆ z_axis_

AxisInfo z_axis_
protectedinherited

Definition at line 108 of file Drawable.h.