HPTools
class description - source file - inheritance tree (.pdf)
private:
static Double_t ptinv(Double_t pt, Double_t theta, Double_t mass)
static Double_t PZf_pty1(Double_t* x, Double_t* par)
public:
HPTools()
HPTools(const HPTools&)
~HPTools()
static Int_t addSourceList(HDataSource* source, TString inputFile, TString inDir, Int_t refid = -1)
static TClass* Class()
static void geantPidAxis(TH1*, TString axis = X)
static void geantProcessAxis(TH1*, TString axis = X)
static TString getGeantPidNameLatex(Int_t index)
static TString getGeantProcessNameLatex(Int_t index)
static TH1F* getPairPidHistogramm(Axis_t min = 0, Axis_t max = 0, Int_t extBins = 0, Double_t extBinning = 1)
static Double_t getRhoVertex(HGeomVector& vector)
static Int_t hadesEventLoop(Int_t nEvents, Int_t startEvt)
static Bool_t hadesInit()
virtual TClass* IsA() const
static int mainFileInDirOutDirNevtStar(int argc, char** argv, int (*) (TString outDir, TString inputDir, TString inputFile, Int_t nEvents, Int_t startEvt) function)
static Bool_t mdcDetectorSetup(TString beamtime)
static Bool_t mdcDetectorSetup(const char* beamtime)
static Bool_t mdcDetectorSetup(Int_t (*)[4] mdcMods)
HPTools& operator=(const HPTools&)
static void plot_pty_PZ(Double_t mass = 139.)
static void plotGeantAxis(TAxis* axis)
static void plotGeantProcessAxis(TAxis* axis)
static void plotPolarSectorGrid()
static void printAnalysisFileInfo(Int_t startEvt, TString inputDir, TString outFile, TString outDir)
static void printCounter(Int_t eventiter, Int_t nEvents, Float_t stepsize = 0.05)
static void setPersistency(Bool_t b, Cat_t* persistentArray, UInt_t nPersistent, UInt_t clean = 0)
static void setPersistencyClean(Bool_t b, Cat_t* persistentArray, UInt_t nPersistent)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
static bool usageFileInDirOutDirNevtStart(const char* name)
static bool usageFileInDirOutDirNevtStart(TString name)
HPTools
Hydra Processing Tools
Author: Peter W.Zumbruch
Contact: P.Zumbruch@gsi.de
Created: Mar 21, 2002
Last modification: Oct 08, 2005
File: $RCSfile: hptools.cc,v $
Version: $Revision: 1.38 $
Modified by $Author: halo $ on $Date: 2006/08/12 13:05:25 $
Int_t addSourceList(HDataSource *source, TString inputFile, TString inDir, Int_t refid)
expects either a HRootSource (inheritant) or HldFileSource (inheritant) as source
adds to this given HDataSource source:
(a) inputFile ends with ".root or .hld": the root/hld inputfile
to be found in inDir with referenceId refId (default:-1)
(b) inputFile ends with ".txt": the list of root/hldfiles contained in inputFile
to be found in inDir with referenceId refId (default:-1)
if inputFile is not valid exit with exit(EXIT_FAILURE);
in case of an HRootSource it is check whether a Tree is contained
(no) exits with with exit(EXIT_FAILURE);
(yes) adds all entries together
return values:
RootSource: number of Events (default:-1)
HldSource: (default:-1)
inputfile example:
# comment line
file1.root
#file2.root
file3.root
void geantPidAxis(TH1 *hist, TString axis)
replaces for a given histogramm hist with geant pid numbers on axis
the numbers by the pid name
void plotGeantAxis(TAxis *axis)
replaces for a the active histogramm with geant pid numbers on axis
the numbers by the pid name
void geantProcessAxis(TH1 *hist, TString axis)
replaces for a given histogramm hist with geant process numbers on axis
the numbers by the process name
void plotGeantProcessAxis(TAxis *axis)
replaces for the active histogramm hist with geant process numbers on axis
the numbers by the process name
void plotPolarSectorGrid()
plots onto a polar plot a grid corresponding to the HADES orientation
Double_t ptinv(Double_t pt,Double_t theta, Double_t mass)
function returning the relation of pt to theta for a given mass
Double_t PZf_pty1(Double_t *x, Double_t *par)
void plot_pty_PZ(Double_t mass)
plotting grid of constant lab momentum and constant angles for a given mass
over the active histogramm assuming that it represents a pty distribution
void printAnalysisFileInfo(Int_t startEvt,TString inputDir,TString outFile, TString outDir)
depending on the startEvt number
the file information used in my analysis scripts is printed to stdout
startEvt == -1111: >> "outputName outputFile"
startEvt == -2222: >> "outputDir outputDirectory"
startEvt == -3333: >> "inputDir inputDirectory"
used to get information how the parameters about files are treated and processed before
running the macro itself completely
Bool_t mdcDetectorSetup(TString beamtime)
function to add mdc detector to hades detector
valid beamtime names are:
nov01
nov02
sep03
jan04
aug04
jan05
sep05
Bool_t mdcDetectorSetup(Int_t (*mdcMods)[4])
sets mdc Detector setup with the 6*4 matrix given via mdcMods
i.e. sep03_mdcMods[6][4] = { {1,1,1,1},
{1,1,1,1},
{1,1,1,0},
{1,1,1,1},
{1,1,1,1},
{1,1,1,0} };
void printCounter(Int_t eventiter,Int_t nEvents, Float_t stepsize)
print a counter message if eventiter is x = eventiter*stepsize %
where stepsize is given in percentage
default stepsize 5% = 0.05
Bool_t hadesInit()
calls hades::init and checks the output
if it has failed the hades object is deleted and the function exits with exit_code -1
returns kFALSE if init has failed
kTRUE otherwise
Int_t hadesEventLoop(Int_t nEvents, Int_t startEvt)
calls hades event loop
generates info output
returns number of processed events
bool usageFileInDirOutDirNevtStart(const char *name)
prints the usage for an executable: name
of the following syntax
executable inputfile inDir outputDir [number of events [start evt]]
returns always kTRUE;
int mainFileInDirOutDirNevtStar(int argc, char **argv,
int (*function) (TString outDir,
TString inputDir,
TString inputFile,
Int_t nEvents,
Int_t startEvt))
main function part for compiled macros
the macro function must have the syntax
int function(TString outDir, TString inputDir, TString inputFile, Int_t nEvents=0, Int_t startEvt=0)
the function should also contain a call to the function HPTools::printAnalysisFileInfo
passing this its function pointer (i.e. just its name without anything else)
together with argc and argv from the main function
to this function
delivers you the following behavior
(suppose the compiled executable's name is executable)
executable accepts the following usage:
executable inputfile inDir outputDir [number of events [start evt]]
in addition if either 'number of events' or 'start evt' is set to
'OUTPUTNAME', 'OUTPUTDIR', 'INPUTDIR', 'EXECUTABLE' (case insensitive)
the corresponding information is printed to stdout
Behaviour
(0) in any (yet known) case the return value is EXIT_SUCCESS
(1) passing less than 3 or more than 5 arguments to the function results in a
call to HPTools::usageFileInDirOutDirNevtStart
to explain right behavior
(1a) if called with option -h HPTools::usageFileInDirOutDirNevtStart will be called (help)
(2) function is called corresponding to aboves definition of executable
(3) if either 'number of events' or 'start evt' is set to
'OUTPUTNAME', 'OUTPUTDIR', 'INPUTDIR', 'EXECUTABLE' (case insensitive)
the corresponding information is printed to stdout
by calling the function with predefined negative 'start evt' values
making usage of HPTools::printAnalysisFileInfo
void setPersistency(Bool_t b, Cat_t *persistentArray, UInt_t nPersistent, UInt_t clean)
sets the persistency for the categories given in persistentArray[nPersistent]
to value of b
if clean > 0:
1. setting the first 'clean' categories' persistency to the inverse of b
2. sets the categories listet in the array to b
if not only item 2 is executed
TH1F* getPairPidHistogramm(Axis_t min, Axis_t max, Int_t extBins, Double_t extBinning)
returns a histogram with a variable binning
to plot geant pair ids like 8009 14014 ...
the axis is labeled correspondingly
min and max set a range
if extBins is set, extBins with extBinning [default=1] are added
TString getGeantPidNameLatex(Int_t index)
provides for geant pid index corresponding pid name in latex representation
TString getGeantProcessNameLatex(Int_t index)
provides for geant process index corresponding process name in latex representation
Inline Functions
void ~HPTools()
Bool_t mdcDetectorSetup(Int_t (*)[4] mdcMods)
Double_t getRhoVertex(HGeomVector& vector)
bool usageFileInDirOutDirNevtStart(TString name)
void setPersistencyClean(Bool_t b, Cat_t* persistentArray, UInt_t nPersistent)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
HPTools HPTools()
HPTools HPTools(const HPTools&)
HPTools& operator=(const HPTools&)
Last update: Fri Jan 26 12:20:01 2007
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.