eicplot  trunk
EIC ROOT plotting utilities
Public Member Functions | Protected Attributes
erhic::Q2VsXPlot Class Reference

#include <Q2VsXPlot.h>

List of all members.

Public Member Functions

 Q2VsXPlot (const TString &name="", const TString &title="", const Int_t nXBins=100, const Double_t &xLow=1e-5, const Double_t &xHigh=1., const Int_t nQ2Bins=100, const Double_t &Q2Low=0.01, const Double_t &Q2High=100.)
virtual ~Q2VsXPlot ()
void setS (const Double_t &)
Double_t getS () const
void setYRange (const Range< double > &=Range< double >(0.01, 0.95))
void setYRange (double min, double max)
const Range< double > & getYRange () const
virtual void Draw (Option_t *="")
virtual void SetLineColor (Color_t)
virtual void SetLineStyle (Style_t)
virtual void SetLabelColor (Color_t, Option_t *)
TF1 * yLower ()
TF1 * yUpper ()
TText * GetLabelLower ()
TText * GetLabelUpper ()
TF1 * Q2FromSXY (Double_t y, const TString &name, TF1 *=NULL)
void SetLabel (const TF1 &, double y, TText &)

Protected Attributes

Double_t mS
TF1 * mYLowerFunction
 ! Squared centre-of-mass energy (GeV^2)
TF1 * mYUpperFunction
 ! Function defining lower line of constant y
Range< double > mYRange
 ! Function defining upper line of constant y
TText mTextYLower
 ! The pair of y values
TText mTextYUpper
 ! Text label for lower line of constant y

Detailed Description

A 2D histogram that automatically has log10 binning and draws a pair of lines of constant y (inelasticity).


Constructor & Destructor Documentation

erhic::Q2VsXPlot::Q2VsXPlot ( const TString &  name = "",
const TString &  title = "",
const Int_t  nXBins = 100,
const Double_t &  xLow = 1e-5,
const Double_t &  xHigh = 1.,
const Int_t  nQ2Bins = 100,
const Double_t &  Q2Low = 0.01,
const Double_t &  Q2High = 100. 
)

Constructor.

Destructor.


Member Function Documentation

void erhic::Q2VsXPlot::Draw ( Option_t *  option = "") [virtual]

Draws the histogram (see TH2 for valid options).

Returns the label for the lower y value, if it is valid, or NULL if it is not. The user should not delete the pointer.

Returns the label for the upper y value, if it is valid, or NULL if it is not. The user should not delete the pointer.

Double_t erhic::Q2VsXPlot::getS ( ) const [inline]

Returns the centre-of-mass energy used when computing lines of constant y.

const Range< double > & erhic::Q2VsXPlot::getYRange ( ) const [inline]

Returns the pair of y values.

TF1 * erhic::Q2VsXPlot::Q2FromSXY ( Double_t  y,
const TString &  name,
TF1 *  reference = NULL 
)

Generates a TF1, named "name" for a given value of y and the centre-of-mass energy specified by setS(). The function is allocated via new and must be deleted by the caller. Users can call this to obtain lines of constant y in addition to the two "free" ones maintained by Q2VsXPlot. If the third argument is non-NULL, copy its style options to the returned function.

void erhic::Q2VsXPlot::SetLabel ( const TF1 &  f,
double  y,
TText &  t 
)

Set label properties from a function and a y value

void erhic::Q2VsXPlot::SetLabelColor ( Color_t  colour,
Option_t *  opt 
) [virtual]

Set the colour of text labels. If the option is "line", sets the colour of the labels for lines of constant y. Otherwise, functions as TH2::SetLabelColor.

void erhic::Q2VsXPlot::SetLineColor ( Color_t  colour) [virtual]

Sets the colour of the lines of constant y (see TAttLine).

void erhic::Q2VsXPlot::SetLineStyle ( Style_t  style) [virtual]

Sets the style of the lines of constant y (see TAttLine).

void erhic::Q2VsXPlot::setS ( const Double_t &  s) [inline]

Sets the centre-of-mass energy to use when computing lines of constant y.

void erhic::Q2VsXPlot::setYRange ( const Range< double > &  range = Range<double>(0.01, 0.95))

Specify a pair of y values in the range (0, 1] for which to draw lines. Lines for values of y outside (0, 1] are not drawn.

void erhic::Q2VsXPlot::setYRange ( double  min,
double  max 
) [inline]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TF1 * erhic::Q2VsXPlot::yLower ( ) [inline]

Returns the line for the lower y value if that y value is valid, or NULL if not. The user should not delete the pointer.

TF1 * erhic::Q2VsXPlot::yUpper ( ) [inline]

Returns the line for the upper y value if that y value is valid, or NULL if not. The user should not delete the pointer.


The documentation for this class was generated from the following files: