Public Member Functions | List of all members
AntarcticaMapPlotter Class Reference

Class to plot reconstructed events onto a picture of Antarctica. More...

#include <AntarcticaMapPlotter.h>

Public Member Functions

 AntarcticaMapPlotter ()
 Constructor.
 
 AntarcticaMapPlotter (TString name, TString title, Int_t nBinsX, Int_t nBinsY)
 Constructor. More...
 
 ~AntarcticaMapPlotter ()
 Destructor. More...
 
void addHistogram (TString name, TString title, Int_t nBinsX, Int_t nBinsY)
 Creates a new histogram to go in the internal map and sets it as the current histogram. More...
 
void addTGraph (TString name, TString title, Int_t n=0, Double_t *latitude=NULL, Double_t *longitude=NULL)
 Creates a new graph to go in the internal map and sets it as the current histogram. More...
 
Int_t setCurrentHistogram (TString name)
 Sets the current histogram pointer* hCurrent. More...
 
void DrawHist (TString opt)
 Draws the canvas, image and histogram.
 
TH2D * getCurrentHistogram ()
 Return pointer to current histogram. More...
 
Int_t Fill (Double_t latitude, Double_t longitude, Double_t weight=1)
 How to fill the histogram, converts latitude and longitude into x/y bins first. More...
 
Int_t setCurrentTGraph (TString name)
 Sets the current histrogram pointer* hCurrent. More...
 
void DrawTGraph (TString opt)
 Draws the canvas, image and histogram.
 
TGraph * getCurrentTGraph ()
 Return pointer to current TGraph. More...
 

Detailed Description

Class to plot reconstructed events onto a picture of Antarctica.

Much of the hard geometry stuff was done by Ryan and I've copied it from some EventCorrelator macros.

Definition at line 29 of file AntarcticaMapPlotter.h.

Inheritance diagram for AntarcticaMapPlotter:

Constructor & Destructor Documentation

AntarcticaMapPlotter::AntarcticaMapPlotter ( TString  name,
TString  title,
Int_t  nBinsX,
Int_t  nBinsY 
)

Constructor.

Parameters
nameis the histogram name
titleis the histogram title
nBinsXis the number of bins on the x-axis
nBinsYis the number of bins on the y-axis

Definition at line 23 of file AntarcticaMapPlotter.cxx.

AntarcticaMapPlotter::~AntarcticaMapPlotter ( )

Destructor.

Deletes all internal hists and TGraphs, like a good destructor should.

Definition at line 38 of file AntarcticaMapPlotter.cxx.

Member Function Documentation

void AntarcticaMapPlotter::addHistogram ( TString  name,
TString  title,
Int_t  nBinsX,
Int_t  nBinsY 
)

Creates a new histogram to go in the internal map and sets it as the current histogram.

Parameters
nameis the histogram name
titleis the histogram title
nBinsXis the number of bins on the x-axis
nBinsYis the number of bins on the y-axis

Definition at line 249 of file AntarcticaMapPlotter.cxx.

void AntarcticaMapPlotter::addTGraph ( TString  name,
TString  title,
Int_t  n = 0,
Double_t *  latitudes = NULL,
Double_t *  longitudes = NULL 
)

Creates a new graph to go in the internal map and sets it as the current histogram.

Parameters
nameis the histogram name
titleis the histogram title
nis the number of points
latitudesis a pointer to an array of latitude values
longitudesis a pointer to an array of longitude values

Definition at line 276 of file AntarcticaMapPlotter.cxx.

Int_t AntarcticaMapPlotter::Fill ( Double_t  latitude,
Double_t  longitude,
Double_t  weight = 1 
)

How to fill the histogram, converts latitude and longitude into x/y bins first.

Parameters
latitudeis the latitude.
longitudeis the longitude.
weightis the weight to fill with, by default=1.
Returns
the corresponding global bin number which has its content incremented by 1 (copied from TH2).

Definition at line 153 of file AntarcticaMapPlotter.cxx.

TH2D * AntarcticaMapPlotter::getCurrentHistogram ( )

Return pointer to current histogram.

Returns
pointer to current histogram

Definition at line 352 of file AntarcticaMapPlotter.cxx.

TGraph * AntarcticaMapPlotter::getCurrentTGraph ( )

Return pointer to current TGraph.

Returns
pointer to current TGraph

Definition at line 338 of file AntarcticaMapPlotter.cxx.

Int_t AntarcticaMapPlotter::setCurrentHistogram ( TString  name)

Sets the current histogram pointer* hCurrent.

Returns
0 on failure (TH2D with name not in* hists) and 1 on success.

Definition at line 222 of file AntarcticaMapPlotter.cxx.

Int_t AntarcticaMapPlotter::setCurrentTGraph ( TString  name)

Sets the current histrogram pointer* hCurrent.

Returns
0 on failure (TGraph with name not in* grs) and 1 on success.

Definition at line 313 of file AntarcticaMapPlotter.cxx.


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