_HADES_CLASS_DESCRIPTION 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.41 $ Modified by $Author: wuestenf $ on $Date: 2008-09-23 13:21:45 $
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_t | mainFileInDirOutDirNevtStar(Int_t argc, Char_t** argv, Int_t (*) (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_t* 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_t | usageFileInDirOutDirNevtStart(const Char_t* name) |
static Bool_t | usageFileInDirOutDirNevtStart(TString name) |
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
replaces for a given histogramm hist with geant pid numbers on axis the numbers by the pid name
replaces for a the active histogramm with geant pid numbers on axis the numbers by the pid name
replaces for a given histogramm hist with geant process numbers on axis the numbers by the process name
replaces for the active histogramm hist with geant process numbers on axis the numbers by the process name
function returning the relation of pt to theta for a given 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
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
function to add mdc detector to hades detector valid beamtime names are: nov01 nov02 sep03 jan04 aug04 jan05 sep05 apr06 may06 apr07 oct07
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} };
print a counter message if eventiter is x = eventiter*stepsize % where stepsize is given in percentage default stepsize 5% = 0.05
calls hades event loop generates info output returns number of processed events
prints the usage for an executable: name of the following syntax executable inputfile inDir outputDir [number of events [start evt]] returns always kTRUE;
main function part for compiled macros the macro function must have the syntax Int_t 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
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
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
provides for geant pid index corresponding pid name in latex representation
provides for geant process index corresponding process name in latex representation
{ setPersistency(b, persistentArray, nPersistent, 1000); }