Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CommonUtils.h File Reference
#include <functional>
#include <limits>
#include <TColor.h>
#include <TDirectory.h>
#include <TH1F.h>
#include <TString.h>
+ Include dependency graph for CommonUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ResidualPullHandle
 
struct  SingleHandle
 This is a s. More...
 
struct  AcceptCombination
 
struct  AcceptAll
 This Struct is to accept all values - a placeholder. More...
 
struct  AcceptRange
 
struct  DirectAccessor< primitive_t >
 
struct  DivisionAccessor< primitive_one_t, primitive_two_t >
 
struct  ResidualAccessor
 
struct  QopResidualAccessor
 
struct  PtResidualAccessor
 This the dedicted pT residual accessor. More...
 
struct  PtErrorAccessor
 

Functions

template<typename hist_t >
void setHistStyle (hist_t *hist, short color=1)
 
template<typename eff_t >
void setEffStyle (eff_t *eff, short color=1)
 
template<typename hist_t >
void adaptColorPalette (hist_t *h, float rmin, float rmax, float rgood, float rwindow, int n)
 
template<typename eff_t >
void adaptEffRange (eff_t *eff, float minScale=1, float maxScale=1.1)
 
template<typename dir_t , typename tree_t >
void estimateResiudalRange (ResidualPullHandle &handle, dir_t &directory, tree_t &tree, unsigned long peakEntries, unsigned int hBarcode)
 
template<typename dir_t , typename tree_t >
void estimateIntegerRange (SingleHandle &handle, dir_t &directory, tree_t &tree, unsigned long peakEntries, unsigned int startBins, unsigned int addBins, unsigned int hBarcode)
 
void bookHistograms (ResidualPullHandle &handle, float pullRange, unsigned int hBins, unsigned int hBarcode)
 
template<typename tree_t >
unsigned long estimateEntries (const tree_t &tree, unsigned long configuredEntries)
 

Function Documentation

template<typename hist_t >
void adaptColorPalette ( hist_t *  h,
float  rmin,
float  rmax,
float  rgood,
float  rwindow,
int  n 
)

Helper function: set color palette

Template Parameters
typeof the histogram
Parameters
hthe histogram in question
rminthe range min value
rmaxthe range max value
rgoodthe good value of the mistogram
rwindowthe window around the good value to be declared good
nthe number of divisions

Definition at line 70 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 70 of file CommonUtils.h

References Acts::Test::blue, Acts::Test::green, and Acts::Test::red.

Referenced by boundParamResolution().

+ Here is the caller graph for this function:

template<typename eff_t >
void adaptEffRange ( eff_t *  eff,
float  minScale = 1,
float  maxScale = 1.1 
)

Helper function: increase eff range by a scale factor. Note that it assumes the eff has already been drawn

Template Parameters
eff_tthe efficiency histogram type
Parameters
effthe efficiency histogram
minScalethe minimum of the scale
maxScalethe maximum of the scale

Definition at line 98 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 98 of file CommonUtils.h

References ymax, and ymin.

void bookHistograms ( ResidualPullHandle handle,
float  pullRange,
unsigned int  hBins,
unsigned int  hBarcode 
)

Helper method to book residual and pull histograms

Parameters
handlethe residual/pull handle
pullRangethe symmetric pull range for plotting
hBinsthe number of histograms bins
hBarcoodea temporary unique barcode for ROOT memory management

Definition at line 459 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 459 of file CommonUtils.h

References ResidualPullHandle::errorStr, ResidualPullHandle::pullHist, ResidualPullHandle::range, ResidualPullHandle::residualHist, ResidualPullHandle::residualStr, ResidualPullHandle::residualUnit, and ResidualPullHandle::tag.

template<typename tree_t >
unsigned long estimateEntries ( const tree_t &  tree,
unsigned long  configuredEntries 
)

Helper method to get and opentially overwrite the entries to be processed

Template Parameters
tree_tthe type of the tree
Parameters
treeis the TTree/TChain in question
configuredEntriesis a configuration parameter
Returns
the number of entries

Definition at line 493 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 493 of file CommonUtils.h

template<typename dir_t , typename tree_t >
void estimateIntegerRange ( SingleHandle handle,
dir_t &  directory,
tree_t &  tree,
unsigned long  peakEntries,
unsigned int  startBins,
unsigned int  addBins,
unsigned int  hBarcode 
)

Range estimation for integer values

Template Parameters
dir_tthe type of the directory to change into for writing
tree_tthe type of the tree to Draw from
Parameters
handlethe residual/pull handle to be processed
directorythe writable directory
treethe tree from which is drawn
peakEntriesthe number of entries for the range peak
hBarcodea temporary unique ROOT barcode for memory managements

Definition at line 417 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 417 of file CommonUtils.h

References SingleHandle::bins, add_histos_bX::ib, SingleHandle::range, and SingleHandle::rangeDrawStr.

template<typename dir_t , typename tree_t >
void estimateResiudalRange ( ResidualPullHandle handle,
dir_t &  directory,
tree_t &  tree,
unsigned long  peakEntries,
unsigned int  hBarcode 
)

Range estimation for residuals

Template Parameters
dir_tthe type of the directory to change into for writing
tree_tthe type of the tree to Draw from
Parameters
handlethe residual/pull handle to be processed
directorythe writable directory
treethe tree from which is drawn
peakEntriesthe number of entries for the range peak
hBarcodea temporary unique ROOT barcode for memory managements

Definition at line 383 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 383 of file CommonUtils.h

References ResidualPullHandle::range, ResidualPullHandle::rangeCutStr, ResidualPullHandle::rangeDrawStr, ResidualPullHandle::rangeHist, ResidualPullHandle::rangeMaxStr, and rms().

+ Here is the call graph for this function:

template<typename eff_t >
void setEffStyle ( eff_t *  eff,
short  color = 1 
)

Helper function: function to set up the efficiency histogram style

Template Parameters
eff_tthe efficiency histogram type
Parameters
effthe efficiency histogram
colorthe color to be set

Definition at line 51 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 51 of file CommonUtils.h

References color.

Referenced by reconstructionPerformance().

+ Here is the caller graph for this function:

template<typename hist_t >
void setHistStyle ( hist_t *  hist,
short  color = 1 
)

Helper function: function to set up the histogram style

Template Parameters
hist_tthe histogram type
Parameters
histthe histogram
colorthe color

Definition at line 27 of file CommonUtils.h.

View newest version in sPHENIX GitHub at line 27 of file CommonUtils.h

References color.

Referenced by boundParamResolution(), and reconstructionPerformance().

+ Here is the caller graph for this function: