GammaCombo  Rev:Unversioneddirectory
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ToyTree Class Reference

Interface class for the root trees that are written by the Plugin method and related functions. More...

#include <ToyTree.h>

Collaboration diagram for ToyTree:
Collaboration graph
[legend]

Public Member Functions

void activateAllBranches ()
 Activate all branches. More...
 
void activateBranch (const TString &bName)
 activate a single Tree More...
 
void activateCoreBranchesOnly ()
 Activate only core branches to speed up reading them. More...
 
void fill ()
 Save current values of the proxy variables as an event into the TTree. More...
 
OptParsergetArg ()
 
Long64_t GetEntries ()
 
void GetEntry (Long64_t i)
 
TString getName ()
 
float getScanpointMax ()
 Get maximum of scanpoint variable found in the TTree. More...
 
float getScanpointMin ()
 Get minimum of scanpoint variable found in the TTree. More...
 
int getScanpointN ()
 Get number of different values of the scanpoint variable found in the TTree. More...
 
float getScanpointyMax ()
 Get maximum of scanpointy variable found in the TTree. More...
 
float getScanpointyMin ()
 Get minimum of scanpointy variable found in the TTree. More...
 
int getScanpointyN ()
 Get number of different values of the scanpointy variable found in the TTree. More...
 
TTree * getTree ()
 
void init ()
 Initialize a new TTree, set up all its leaves, connect them to the proxy variables. More...
 
bool isWsVarAngle (TString var)
 Checks if a certain variable in the work space is an angle. More...
 
void open ()
 Provide the interface to read an external TChain. More...
 
void setCombiner (Combiner *c)
 Set the combiner to work with. More...
 
void setStoreGlob (bool flag)
 
void setStoreObs (bool flag)
 
void setStoreTh (bool flag)
 
void storeObservables ()
 Store the current workspace observables. More...
 
void storeParsFree ()
 Store the current workspace fit parameters as the free fit result. More...
 
void storeParsGau (const RooArgSet globalConstraintMeans)
 Store the current workspace fit parameters as the free fit result. More...
 
void storeParsPll ()
 Store the current workspace fit parameters as the profile likelihood parameters. More...
 
void storeParsScan ()
 Store the current workspace fit parameters as the scan fit result. More...
 
void storeTheory ()
 Store the current workspace theory parameters. More...
 
 ToyTree (Combiner *c, TChain *t=0)
 
 ToyTree (PDF_Datasets *p, OptParser *opt, TChain *t=0)
 
void writeToFile (TString fName)
 Save the TTree into a root file. More...
 
void writeToFile ()
 
 ~ToyTree ()
 

Public Attributes

float BergerBoos_id
 
float chi2min
 the chi2 of the fit with var fixed to scan point More...
 
float chi2minBkg
 the chi2 of the fit of the bkg hypothesis (for CLs method) More...
 
float chi2minBkgToy
 the chi2 of the fit of the hypothesis value to the bkg toy distribution (for CLs method) More...
 
float chi2minBkgToyPDF
 
float chi2minGlobal
 the chi2 of the free fit More...
 
float chi2minGlobalBkgToy
 the chi2 of the free fit to the bkg only toys More...
 
float chi2minGlobalToy
 the chi2 of the free fit to the toy More...
 
float chi2minGlobalToyPDF
 
float chi2minToy
 the chi2 of the fit to the toy with var fixed to scan point More...
 
float chi2minToyPDF
 
float covQualFree
 
float covQualScan
 
float covQualScanData
 
float genericProbPValue
 
float id
 an ID to distinguish different conditions, e.g. different toys in a coverage test More...
 
float nBergerBoos
 
float npoint
 an ID to distinguish different scan point More...
 
float nrun
 an ID to distinguish different runs, i.e. batch jobs More...
 
float ntoy
 an ID to distinguish different toys More...
 
float scanbest
 an alias to the free fit value of the scan variable More...
 
float scanbestBkg
 an alias to the free fit value of the scan variable on the bkg only toy (for CLs method) More...
 
float scanbesty
 an alias to the free fit value of the scan y variable in 2D scans More...
 
float scanpoint
 the scanpoint for 1D scans, or the x scanpoint for 2D scans More...
 
float scanpointy
 the y scanpoint for 2D scans More...
 
float statusFree
 
float statusFreePDF
 
float statusScan
 
float statusScanData
 
float statusScanPDF
 
TTree * t
 the tree More...
 

Private Member Functions

void computeMinMaxN ()
 Get min scanpoint, max scanpoint, and number of steps by looping over the tree. More...
 
void initMembers (TChain *t=0)
 Initialize the data members. More...
 

Private Attributes

OptParserarg
 command line arguments More...
 
Combinercomb
 combination bringing in the arg, workspace, and names More...
 
map< TString, float > constraintMeans
 values of global observables More...
 
TString globName
 set name of explicit set of global observables More...
 
TString name
 combiner name, ending up in titles and file names More...
 
map< string, float > observables
 values of the observables More...
 
TString obsName
 dataset name of observables, derived from name More...
 
map< string, float > parametersFree
 fit result of the free fit More...
 
map< string, float > parametersPll
 parameters of the profile likelihood curve of the data More...
 
map< string, float > parametersScan
 fit result of the scan fit More...
 
TString parsName
 set name of physics parameters, derived from name More...
 
TString pdfName
 PDF name in workspace, derived from name. More...
 
float scanpointMax
 maximum of the scanpoint, computed by computeMinMaxN(). More...
 
float scanpointMin
 minimum of the scanpoint, computed by computeMinMaxN(). More...
 
int scanpointN
 number of different values of the scanpoint, computed by computeMinMaxN(). More...
 
float scanpointyMax
 maximum of the scanpointy, computed by computeMinMaxN(). More...
 
float scanpointyMin
 minimum of the scanpointy, computed by computeMinMaxN(). More...
 
int scanpointyN
 number of different values of the scanpointy, computed by computeMinMaxN(). More...
 
bool storeGlob
 Boolean flag to control storing ToyTree global observables. Extremely handy in DatasetsScans. More...
 
bool storeObs
 Boolean flag to control storing ToyTree observables, can't store these for DatasetsScans. More...
 
bool storeTh
 Boolean flag to control storing ToyTree theory parameters. Not needed in DatasetsScans. More...
 
map< string, float > theory
 theory parameters (=observables at profile likelihood points) More...
 
TString thName
 set name of theory parameters, derived from name More...
 
RooWorkspace * w
 holds all input pdfs, parameters, and observables, as well as the combination More...
 

Detailed Description

Interface class for the root trees that are written by the Plugin method and related functions.

Definition at line 33 of file ToyTree.h.

Constructor & Destructor Documentation

§ ToyTree() [1/2]

ToyTree::ToyTree ( Combiner c,
TChain *  t = 0 
)

Definition at line 3 of file ToyTree.cpp.

§ ToyTree() [2/2]

ToyTree::ToyTree ( PDF_Datasets p,
OptParser opt,
TChain *  t = 0 
)

Definition at line 12 of file ToyTree.cpp.

§ ~ToyTree()

ToyTree::~ToyTree ( )

Definition at line 30 of file ToyTree.cpp.

Member Function Documentation

§ activateAllBranches()

void ToyTree::activateAllBranches ( )

Activate all branches.

Definition at line 297 of file ToyTree.cpp.

§ activateBranch()

void ToyTree::activateBranch ( const TString &  bName)

activate a single Tree

Definition at line 289 of file ToyTree.cpp.

§ activateCoreBranchesOnly()

void ToyTree::activateCoreBranchesOnly ( )

Activate only core branches to speed up reading them.

Definition at line 255 of file ToyTree.cpp.

§ computeMinMaxN()

void ToyTree::computeMinMaxN ( )
private

Get min scanpoint, max scanpoint, and number of steps by looping over the tree.

Definition at line 393 of file ToyTree.cpp.

§ fill()

void ToyTree::fill ( )

Save current values of the proxy variables as an event into the TTree.

Definition at line 103 of file ToyTree.cpp.

§ getArg()

OptParser* ToyTree::getArg ( )
inline

Definition at line 46 of file ToyTree.h.

§ GetEntries()

Long64_t ToyTree::GetEntries ( )

Definition at line 377 of file ToyTree.cpp.

§ GetEntry()

void ToyTree::GetEntry ( Long64_t  i)

Definition at line 383 of file ToyTree.cpp.

§ getName()

TString ToyTree::getName ( )
inline

Definition at line 49 of file ToyTree.h.

§ getScanpointMax()

float ToyTree::getScanpointMax ( )

Get maximum of scanpoint variable found in the TTree.

Definition at line 477 of file ToyTree.cpp.

§ getScanpointMin()

float ToyTree::getScanpointMin ( )

Get minimum of scanpoint variable found in the TTree.

Definition at line 468 of file ToyTree.cpp.

§ getScanpointN()

int ToyTree::getScanpointN ( )

Get number of different values of the scanpoint variable found in the TTree.

Definition at line 486 of file ToyTree.cpp.

§ getScanpointyMax()

float ToyTree::getScanpointyMax ( )

Get maximum of scanpointy variable found in the TTree.

Definition at line 504 of file ToyTree.cpp.

§ getScanpointyMin()

float ToyTree::getScanpointyMin ( )

Get minimum of scanpointy variable found in the TTree.

Definition at line 495 of file ToyTree.cpp.

§ getScanpointyN()

int ToyTree::getScanpointyN ( )

Get number of different values of the scanpointy variable found in the TTree.

Definition at line 513 of file ToyTree.cpp.

§ getTree()

TTree* ToyTree::getTree ( )
inline

Definition at line 56 of file ToyTree.h.

§ init()

void ToyTree::init ( )

Initialize a new TTree, set up all its leaves, connect them to the proxy variables.

Definition at line 136 of file ToyTree.cpp.

§ initMembers()

void ToyTree::initMembers ( TChain *  t = 0)
private

Initialize the data members.

Definition at line 36 of file ToyTree.cpp.

§ isWsVarAngle()

bool ToyTree::isWsVarAngle ( TString  var)

Checks if a certain variable in the work space is an angle.

Definition at line 522 of file ToyTree.cpp.

§ open()

void ToyTree::open ( )

Provide the interface to read an external TChain.

Definition at line 217 of file ToyTree.cpp.

§ setCombiner()

void ToyTree::setCombiner ( Combiner c)

Set the combiner to work with.

When setting a new combiner, different from the one used in the constructor, the new one needs to have the same structure, but can have different unique PDF IDs. This way we can, e.g. in the coverage test, save results from many different toys.

Definition at line 82 of file ToyTree.cpp.

§ setStoreGlob()

void ToyTree::setStoreGlob ( bool  flag)
inline

Definition at line 69 of file ToyTree.h.

§ setStoreObs()

void ToyTree::setStoreObs ( bool  flag)
inline

Definition at line 67 of file ToyTree.h.

§ setStoreTh()

void ToyTree::setStoreTh ( bool  flag)
inline

Definition at line 68 of file ToyTree.h.

§ storeObservables()

void ToyTree::storeObservables ( )

Store the current workspace observables.

Definition at line 370 of file ToyTree.cpp.

§ storeParsFree()

void ToyTree::storeParsFree ( )

Store the current workspace fit parameters as the free fit result.

Definition at line 324 of file ToyTree.cpp.

§ storeParsGau()

void ToyTree::storeParsGau ( const RooArgSet  globalConstraintMeans)

Store the current workspace fit parameters as the free fit result.

Definition at line 337 of file ToyTree.cpp.

§ storeParsPll()

void ToyTree::storeParsPll ( )

Store the current workspace fit parameters as the profile likelihood parameters.

Definition at line 306 of file ToyTree.cpp.

§ storeParsScan()

void ToyTree::storeParsScan ( )

Store the current workspace fit parameters as the scan fit result.

Definition at line 350 of file ToyTree.cpp.

§ storeTheory()

void ToyTree::storeTheory ( )

Store the current workspace theory parameters.

Definition at line 360 of file ToyTree.cpp.

§ writeToFile() [1/2]

void ToyTree::writeToFile ( TString  fName)

Save the TTree into a root file.

Definition at line 111 of file ToyTree.cpp.

§ writeToFile() [2/2]

void ToyTree::writeToFile ( )

Definition at line 121 of file ToyTree.cpp.

Member Data Documentation

§ arg

OptParser* ToyTree::arg
private

command line arguments

Definition at line 110 of file ToyTree.h.

§ BergerBoos_id

float ToyTree::BergerBoos_id

Definition at line 96 of file ToyTree.h.

§ chi2min

float ToyTree::chi2min

the chi2 of the fit with var fixed to scan point

Definition at line 75 of file ToyTree.h.

§ chi2minBkg

float ToyTree::chi2minBkg

the chi2 of the fit of the bkg hypothesis (for CLs method)

Definition at line 77 of file ToyTree.h.

§ chi2minBkgToy

float ToyTree::chi2minBkgToy

the chi2 of the fit of the hypothesis value to the bkg toy distribution (for CLs method)

Definition at line 80 of file ToyTree.h.

§ chi2minBkgToyPDF

float ToyTree::chi2minBkgToyPDF

Definition at line 102 of file ToyTree.h.

§ chi2minGlobal

float ToyTree::chi2minGlobal

the chi2 of the free fit

Definition at line 76 of file ToyTree.h.

§ chi2minGlobalBkgToy

float ToyTree::chi2minGlobalBkgToy

the chi2 of the free fit to the bkg only toys

Definition at line 81 of file ToyTree.h.

§ chi2minGlobalToy

float ToyTree::chi2minGlobalToy

the chi2 of the free fit to the toy

Definition at line 79 of file ToyTree.h.

§ chi2minGlobalToyPDF

float ToyTree::chi2minGlobalToyPDF

Definition at line 101 of file ToyTree.h.

§ chi2minToy

float ToyTree::chi2minToy

the chi2 of the fit to the toy with var fixed to scan point

Definition at line 78 of file ToyTree.h.

§ chi2minToyPDF

float ToyTree::chi2minToyPDF

Definition at line 100 of file ToyTree.h.

§ comb

Combiner* ToyTree::comb
private

combination bringing in the arg, workspace, and names

Definition at line 109 of file ToyTree.h.

§ constraintMeans

map<TString,float> ToyTree::constraintMeans
private

values of global observables

Definition at line 124 of file ToyTree.h.

§ covQualFree

float ToyTree::covQualFree

Definition at line 90 of file ToyTree.h.

§ covQualScan

float ToyTree::covQualScan

Definition at line 92 of file ToyTree.h.

§ covQualScanData

float ToyTree::covQualScanData

Definition at line 94 of file ToyTree.h.

§ genericProbPValue

float ToyTree::genericProbPValue

Definition at line 97 of file ToyTree.h.

§ globName

TString ToyTree::globName
private

set name of explicit set of global observables

Definition at line 117 of file ToyTree.h.

§ id

float ToyTree::id

an ID to distinguish different conditions, e.g. different toys in a coverage test

Definition at line 88 of file ToyTree.h.

§ name

TString ToyTree::name
private

combiner name, ending up in titles and file names

Definition at line 112 of file ToyTree.h.

§ nBergerBoos

float ToyTree::nBergerBoos

Definition at line 95 of file ToyTree.h.

§ npoint

float ToyTree::npoint

an ID to distinguish different scan point

Definition at line 87 of file ToyTree.h.

§ nrun

float ToyTree::nrun

an ID to distinguish different runs, i.e. batch jobs

Definition at line 85 of file ToyTree.h.

§ ntoy

float ToyTree::ntoy

an ID to distinguish different toys

Definition at line 86 of file ToyTree.h.

§ observables

map<string,float> ToyTree::observables
private

values of the observables

Definition at line 122 of file ToyTree.h.

§ obsName

TString ToyTree::obsName
private

dataset name of observables, derived from name

Definition at line 114 of file ToyTree.h.

§ parametersFree

map<string,float> ToyTree::parametersFree
private

fit result of the free fit

Definition at line 120 of file ToyTree.h.

§ parametersPll

map<string,float> ToyTree::parametersPll
private

parameters of the profile likelihood curve of the data

Definition at line 121 of file ToyTree.h.

§ parametersScan

map<string,float> ToyTree::parametersScan
private

fit result of the scan fit

Definition at line 119 of file ToyTree.h.

§ parsName

TString ToyTree::parsName
private

set name of physics parameters, derived from name

Definition at line 115 of file ToyTree.h.

§ pdfName

TString ToyTree::pdfName
private

PDF name in workspace, derived from name.

Definition at line 113 of file ToyTree.h.

§ scanbest

float ToyTree::scanbest

an alias to the free fit value of the scan variable

Definition at line 82 of file ToyTree.h.

§ scanbestBkg

float ToyTree::scanbestBkg

an alias to the free fit value of the scan variable on the bkg only toy (for CLs method)

Definition at line 84 of file ToyTree.h.

§ scanbesty

float ToyTree::scanbesty

an alias to the free fit value of the scan y variable in 2D scans

Definition at line 83 of file ToyTree.h.

§ scanpoint

float ToyTree::scanpoint

the scanpoint for 1D scans, or the x scanpoint for 2D scans

Definition at line 73 of file ToyTree.h.

§ scanpointMax

float ToyTree::scanpointMax
private

maximum of the scanpoint, computed by computeMinMaxN().

Definition at line 127 of file ToyTree.h.

§ scanpointMin

float ToyTree::scanpointMin
private

minimum of the scanpoint, computed by computeMinMaxN().

Definition at line 126 of file ToyTree.h.

§ scanpointN

int ToyTree::scanpointN
private

number of different values of the scanpoint, computed by computeMinMaxN().

Definition at line 128 of file ToyTree.h.

§ scanpointy

float ToyTree::scanpointy

the y scanpoint for 2D scans

Definition at line 74 of file ToyTree.h.

§ scanpointyMax

float ToyTree::scanpointyMax
private

maximum of the scanpointy, computed by computeMinMaxN().

Definition at line 130 of file ToyTree.h.

§ scanpointyMin

float ToyTree::scanpointyMin
private

minimum of the scanpointy, computed by computeMinMaxN().

Definition at line 129 of file ToyTree.h.

§ scanpointyN

int ToyTree::scanpointyN
private

number of different values of the scanpointy, computed by computeMinMaxN().

Definition at line 131 of file ToyTree.h.

§ statusFree

float ToyTree::statusFree

Definition at line 89 of file ToyTree.h.

§ statusFreePDF

float ToyTree::statusFreePDF

Definition at line 98 of file ToyTree.h.

§ statusScan

float ToyTree::statusScan

Definition at line 91 of file ToyTree.h.

§ statusScanData

float ToyTree::statusScanData

Definition at line 93 of file ToyTree.h.

§ statusScanPDF

float ToyTree::statusScanPDF

Definition at line 99 of file ToyTree.h.

§ storeGlob

bool ToyTree::storeGlob
private

Boolean flag to control storing ToyTree global observables. Extremely handy in DatasetsScans.

Definition at line 135 of file ToyTree.h.

§ storeObs

bool ToyTree::storeObs
private

Boolean flag to control storing ToyTree observables, can't store these for DatasetsScans.

Definition at line 133 of file ToyTree.h.

§ storeTh

bool ToyTree::storeTh
private

Boolean flag to control storing ToyTree theory parameters. Not needed in DatasetsScans.

Definition at line 134 of file ToyTree.h.

§ t

TTree* ToyTree::t

the tree

Definition at line 103 of file ToyTree.h.

§ theory

map<string,float> ToyTree::theory
private

theory parameters (=observables at profile likelihood points)

Definition at line 123 of file ToyTree.h.

§ thName

TString ToyTree::thName
private

set name of theory parameters, derived from name

Definition at line 116 of file ToyTree.h.

§ w

RooWorkspace* ToyTree::w
private

holds all input pdfs, parameters, and observables, as well as the combination

Definition at line 111 of file ToyTree.h.


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