CombineHarvester
ch Namespace Reference

Namespaces

 syst
 
 tupleprint
 

Data Structures

class  AutoRebin
 Tests for any bins below a certain threshold and if they exist merges them with neighborouring bins. More...
 
class  BinByBinFactory
 Merges bin uncertainties and creates bin-by-bin statistical uncertainties. More...
 
class  CardWriter
 Automates the writing of datacards into directory structures. More...
 
class  CombineHarvester
 
struct  HistMapping
 
class  FnTimer
 Determine the total amount of time spent in a function. More...
 
class  Object
 
class  Observation
 
class  Parameter
 
class  Process
 
struct  SOverBInfo
 
class  Systematic
 
class  CMSHistFuncFactory
 

Typedefs

typedef std::vector< std::pair< int, std::string > > Categories
 
using json = nlohmann::json
 

Functions

template<typename Range , typename Predicate >
void erase_if (Range &r, Predicate p)
 
template<typename Range , typename Predicate >
bool any_of (const Range &r, Predicate p)
 
template<typename Range , typename T >
bool contains (const Range &r, T p)
 
template<typename R , typename T >
bool contains (const std::initializer_list< R > &r, T p)
 
template<typename T >
bool contains_rgx (const std::vector< boost::regex > &r, T p)
 
template<typename Input , typename Filter , typename Converter >
void FilterContaining (Input &in, Filter const &filter, Converter fn, bool cond)
 
template<typename Input , typename Filter , typename Converter >
void FilterContainingRgx (Input &in, Filter const &filter, Converter fn, bool cond)
 
template<typename Input , typename Filter , typename Converter , typename Funcarg >
void FilterContaining (Input &in, Filter const &filter, Converter fn, Funcarg arg, bool cond)
 
template<typename Input , typename Filter , typename Converter , typename Funcarg >
void FilterContainingRgx (Input &in, Filter const &filter, Converter fn, Funcarg arg, bool cond)
 
template<typename Function >
void CloneObs (ch::CombineHarvester &src, ch::CombineHarvester &dest, Function func)
 Duplicate Observation objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance. More...
 
template<typename Function >
void CloneProcs (ch::CombineHarvester &src, ch::CombineHarvester &dest, Function func)
 Duplicate Process objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance. More...
 
template<typename Function >
void CloneSysts (ch::CombineHarvester &src, ch::CombineHarvester &dest, Function func)
 Duplicate Systematic objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance. More...
 
template<typename Function >
void CloneProcsAndSysts (ch::CombineHarvester &src, ch::CombineHarvester &dest, Function func)
 Duplicate the Process and Systematic objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance. More...
 
void SplitSyst (ch::CombineHarvester &cb, std::string const &syst_in, std::string const &split1, std::string const &split2, double val1, double val2)
 Replace all instances of an existing systematic with two copies having modified values. More...
 
void AddSystematics_et_mt (CombineHarvester &cb)
 
void AddSystematics_em (CombineHarvester &cb)
 
void AddSystematics_ee_mm (CombineHarvester &cb)
 
void AddSystematics_tt (CombineHarvester &cb)
 
void AddMSSMSystematics (CombineHarvester &cb, CombineHarvester src)
 
void AddMSSMSystematics (CombineHarvester &cb)
 
void AddMSSMUpdateSystematics_et_mt (CombineHarvester &cb, CombineHarvester src)
 
void AddMSSMUpdateSystematics_et_mt (CombineHarvester &cb)
 
void AddMSSMUpdateSystematics_em (CombineHarvester &cb, CombineHarvester src)
 
void AddMSSMUpdateSystematics_em (CombineHarvester &cb)
 
void AddMSSMUpdateSystematics_mm (CombineHarvester &cb, CombineHarvester src)
 
void AddMSSMUpdateSystematics_mm (CombineHarvester &cb)
 
void AddMSSMUpdateSystematics_tt (CombineHarvester &cb, CombineHarvester src)
 
void AddMSSMUpdateSystematics_tt (CombineHarvester &cb)
 
void AddSystematics_hhh_et_mt (CombineHarvester &cb, CombineHarvester src)
 
void AddSystematics_hhh_et_mt (CombineHarvester &cb)
 
void AddSystematics_hhh_tt (CombineHarvester &cb, CombineHarvester src)
 
void AddSystematics_hhh_tt (CombineHarvester &cb)
 
void AddSystematics_AZh (CombineHarvester &cb, CombineHarvester src)
 
void AddSystematics_AZh (CombineHarvester &cb)
 
Json::Value ExtractJsonFromFile (std::string const &file)
 Extracts a Json::Value from the specified input file. More...
 
Json::Value ExtractJsonFromString (std::string const &str)
 Extracts a Json::Value from the given input string. More...
 
void UpdateJson (Json::Value &a, Json::Value const &b)
 Updates the values in one json from the values in another. More...
 
Json::Value MergedJson (int argc, char *argv[])
 Create a single merged Json::Value from a mixture of json files and json-formatted strings. More...
 
Json::Value MergedJson (std::vector< std::string > const &vec)
 Create a single merged Json::Value from a mixture of json files and json-formatted strings. More...
 
void LogLine (std::ostream &stream, std::string const &func, std::string const &message)
 Writes a logging message to a given ostream. More...
 
std::string FnError (std::string const &message, std::string const &file, unsigned line, std::string const &fn)
 Generates an error message which includes the name of the calling function and the filename and line number where the error occured. More...
 
std::string GetQualififedName (std::string const &str)
 Extracts the fully-qualified function name from a complete function signature. More...
 
template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&... args)
 
void ParseCombineWorkspace (CombineHarvester &cb, RooWorkspace &ws, std::string const &modelcfg, std::string const &data, bool verbose=false)
 
void ParseCombineWorkspacePy (CombineHarvester &cb, RooWorkspace const &ws, std::string const &modelcfg, std::string const &data, bool verbose=false)
 
RooAbsReal * FindAddPdf (RooAbsReal *input)
 
double IntegrateFloatRange (TH1F const *hist, double xmin, double xmax)
 
std::unique_ptr< TH1 > GetClonedTH1 (TFile *file, std::string const &path)
 
template<class T >
void WriteToTFile (T *ptr, TFile *file, std::string const &path)
 
template<class T >
OpenFromTFile (std::string const &fullpath)
 
template<class T >
OpenFromTFile (TFile *file, std::string const &path)
 
RooArgSet ParametersByName (RooAbsReal const *pdf, RooArgSet const *dat_vars)
 
std::vector< ch::ParameterExtractFitParameters (RooFitResult const &res)
 
std::vector< ch::ParameterExtractSampledFitParameters (RooFitResult const &res)
 
void SetStandardBinNames (CombineHarvester &cb, std::string const &pattern="$ANALYSIS_$CHANNEL_$BINID_$ERA")
 
void SetStandardBinName (ch::Object *obj, std::string pattern)
 
template<class T , class U >
bool MatchingProcess (T const &first, U const &second)
 
template<class T , class U >
void SetProperties (T *first, U const *second)
 
void SetFromBinName (ch::Object *input, std::string parse_rules)
 
TGraph TGraphFromTable (std::string filename, std::string const &x_column, std::string const &y_column)
 
template<class T >
std::vector< T > Join (std::vector< std::vector< T >> const &in)
 
std::vector< std::string > JoinStr (std::vector< std::vector< std::string >> const &in)
 
template<class T >
std::vector< T > Set2Vec (std::set< T > const &in)
 
RooDataHist TH1F2Data (TH1F const &hist, RooRealVar const &x, std::string const &name)
 
TH1F RebinHist (TH1F const &hist)
 
TH1F RestoreBinning (TH1F const &src, TH1F const &ref)
 
std::vector< std::vector< unsigned > > GenerateCombinations (std::vector< unsigned > vec)
 
std::vector< std::string > ParseFileLines (std::string const &file_name)
 
bool is_float (std::string const &str)
 
std::vector< std::string > MassesFromRange (std::string const &input, std::string const &fmt="%.0f")
 Generate a vector of mass values using ranges and intervals specified in a string. More...
 
std::vector< std::string > ValsFromRange (std::string const &input, std::string const &fmt="%.0f")
 Generate a vector of values using ranges and intervals specified in a string. More...
 
bool HasNegativeBins (TH1 const *h)
 
void ZeroNegativeBins (TH1 *h)
 
template<class... Args>
std::string Tuple2String (const std::tuple< Args... > &t)
 Format any std::tuple as a string. More...
 
boost::filesystem::path make_relative (boost::filesystem::path p_from, boost::filesystem::path p_to)
 Determine the relative path from one file to another. More...
 
void PrintSystematic (ch::Systematic *syst)
 
void ValidateShapeUncertaintyDirection (CombineHarvester &cb, json &jsobj)
 
void ValidateShapeUncertaintyDirection (CombineHarvester &cb)
 
void CheckEmptyShapes (CombineHarvester &cb, json &jsobj)
 
void CheckEmptyShapes (CombineHarvester &cb)
 
void CheckEmptyBins (CombineHarvester &cb, json &jsobj)
 
void CheckEmptyBins (CombineHarvester &cb)
 
void CheckNormEff (CombineHarvester &cb, double maxNormEff, json &jsobj)
 
void CheckNormEff (CombineHarvester &cb, double maxNormEff)
 
void CheckSizeOfShapeEffect (CombineHarvester &cb, json &jsobj)
 
void CheckSizeOfShapeEffect (CombineHarvester &cb)
 
void CheckSmallSignals (CombineHarvester &cb, double minSigFrac, json &jsobj)
 
void CheckSmallSignals (CombineHarvester &cb, double minSigFrac)
 
void ValidateShapeTemplates (CombineHarvester &cb, json &jsobj)
 
void ValidateShapeTemplates (CombineHarvester &cb)
 
void ValidateCards (CombineHarvester &cb, std::string const &filename, double maxNormEff, double minSigFrac)
 
void swap (CombineHarvester &first, CombineHarvester &second)
 
std::ostream & operator<< (std::ostream &out, HistMapping const &val)
 
void swap (Object &first, Object &second)
 
void swap (Observation &first, Observation &second)
 
std::ostream & operator<< (std::ostream &out, Observation const &val)
 
void swap (Parameter &first, Parameter &second)
 
std::ostream & operator<< (std::ostream &out, Parameter &val)
 
void swap (Process &first, Process &second)
 
std::ostream & operator<< (std::ostream &out, Process const &val)
 
void swap (Systematic &first, Systematic &second)
 
std::ostream & operator<< (std::ostream &out, Systematic const &val)
 
void PrintProc (ch::Process *proc)
 
TH1F AsTH1F (TH1 const *hist)
 
std::string BuildRooMorphing (RooWorkspace &ws, CombineHarvester &cb, std::string const &bin, std::string const &process, RooAbsReal &mass_var, std::string norm_postfix, bool allow_morph, bool verbose, bool force_template_limit, TFile *file)
 [part1] More...
 
TGraph GraphFromSpline (RooSpline1D const *spline)
 
void MakeMorphDebugPlots (RooMorphingPdf *pdf, RooAbsReal *mass, std::vector< double > const &masses, TFile *f, TH1 *ref_bins=nullptr)
 

Typedef Documentation

◆ Categories

typedef std::vector<std::pair<int, std::string> > ch::Categories

Definition at line 28 of file CombineHarvester.h.

◆ json

typedef nlohmann::json ch::json

Definition at line 25 of file ValidationTools.h.

Function Documentation

◆ erase_if()

template<typename Range , typename Predicate >
void ch::erase_if ( Range &  r,
Predicate  p 
)

Definition at line 12 of file Algorithm.h.

◆ any_of()

template<typename Range , typename Predicate >
bool ch::any_of ( const Range &  r,
Predicate  p 
)

Definition at line 17 of file Algorithm.h.

◆ contains() [1/2]

template<typename Range , typename T >
bool ch::contains ( const Range &  r,
p 
)

Definition at line 22 of file Algorithm.h.

◆ contains() [2/2]

template<typename R , typename T >
bool ch::contains ( const std::initializer_list< R > &  r,
p 
)

Definition at line 29 of file Algorithm.h.

◆ contains_rgx()

template<typename T >
bool ch::contains_rgx ( const std::vector< boost::regex > &  r,
p 
)

Definition at line 34 of file Algorithm.h.

◆ FilterContaining() [1/2]

template<typename Input , typename Filter , typename Converter >
void ch::FilterContaining ( Input &  in,
Filter const &  filter,
Converter  fn,
bool  cond 
)

Definition at line 41 of file Algorithm.h.

◆ FilterContainingRgx() [1/2]

template<typename Input , typename Filter , typename Converter >
void ch::FilterContainingRgx ( Input &  in,
Filter const &  filter,
Converter  fn,
bool  cond 
)

Definition at line 49 of file Algorithm.h.

◆ FilterContaining() [2/2]

template<typename Input , typename Filter , typename Converter , typename Funcarg >
void ch::FilterContaining ( Input &  in,
Filter const &  filter,
Converter  fn,
Funcarg  arg,
bool  cond 
)

Definition at line 59 of file Algorithm.h.

◆ FilterContainingRgx() [2/2]

template<typename Input , typename Filter , typename Converter , typename Funcarg >
void ch::FilterContainingRgx ( Input &  in,
Filter const &  filter,
Converter  fn,
Funcarg  arg,
bool  cond 
)

Definition at line 67 of file Algorithm.h.

◆ CloneObs()

template<typename Function >
void ch::CloneObs ( ch::CombineHarvester src,
ch::CombineHarvester dest,
Function  func 
)

Duplicate Observation objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance.

All entries in src will be copied into dest (which could well be the same instance). The third argument is a function or callable that accepts a single ch::Observation * argument, and that will be applied for each duplicated object.

Definition at line 22 of file CopyTools.h.

◆ CloneProcs()

template<typename Function >
void ch::CloneProcs ( ch::CombineHarvester src,
ch::CombineHarvester dest,
Function  func 
)

Duplicate Process objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance.

All entries in src will be copied into dest (which could well be the same instance). The third argument is a function or callable that accepts a single ch::Process * argument, and that will be applied for each duplicated object.

Definition at line 41 of file CopyTools.h.

◆ CloneSysts()

template<typename Function >
void ch::CloneSysts ( ch::CombineHarvester src,
ch::CombineHarvester dest,
Function  func 
)

Duplicate Systematic objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance.

All entries in src will be copied into dest (which could well be the same instance). The third argument is a function or callable that accepts a single ch::Systematic * argument, and that will be applied for each duplicated object.

Definition at line 60 of file CopyTools.h.

◆ CloneProcsAndSysts()

template<typename Function >
void ch::CloneProcsAndSysts ( ch::CombineHarvester src,
ch::CombineHarvester dest,
Function  func 
)

Duplicate the Process and Systematic objects in one instance, which are then modified by a user-supplied function, before being inserted into another instance.

All entries in src will be copied into dest (which could well be the same instance). The third argument is a function or callable that accepts a single ch::Object * argument, and that will be applied for each duplicated object.

This function is useful for making a full copy of an existing process. As an example, in the Run I SM HTT analysis a search for a second Higgs boson was performed. This meant taking the mH=125 GeV signal process and converting it into a background for all signal mass hypotheses. This can be achieved with

ch::CloneProcsAndSysts(cb.cp().signals().mass({"125"}), cb,
                  [](ch::Object* p) {
 p->set_process(p->process() + "_SM125");
 p->set_signal(false);
 p->set_mass("*");
});

Definition at line 93 of file CopyTools.h.

◆ SplitSyst()

void ch::SplitSyst ( ch::CombineHarvester cb,
std::string const &  syst_in,
std::string const &  split1,
std::string const &  split2,
double  val1,
double  val2 
)

Replace all instances of an existing systematic with two copies having modified values.

The function copies every Systematic object with a given name twice, modifies the name and value of each copy, before removing all instances of the original.

Parameters
cbCombineHarvester instance to modify
syst_inname of systematic that should be removed and split into two
split1the new name for the first duplicate
split2the new name for the second duplicate
val1the new uncertainty value for the first duplicate
val2the new uncertainty value for the second duplicate

Definition at line 9 of file CopyTools.cc.

◆ AddSystematics_et_mt()

void ch::AddSystematics_et_mt ( CombineHarvester cb)

Definition at line 416 of file HttSystematics_SMLegacy.cc.

◆ AddSystematics_em()

void ch::AddSystematics_em ( CombineHarvester cb)

Definition at line 222 of file HttSystematics_SMLegacy.cc.

◆ AddSystematics_ee_mm()

void ch::AddSystematics_ee_mm ( CombineHarvester cb)

Definition at line 18 of file HttSystematics_SMLegacy.cc.

◆ AddSystematics_tt()

void ch::AddSystematics_tt ( CombineHarvester cb)

Definition at line 860 of file HttSystematics_SMLegacy.cc.

◆ AddMSSMSystematics() [1/2]

void ch::AddMSSMSystematics ( CombineHarvester cb,
CombineHarvester  src 
)

Definition at line 18 of file HttSystematics_MSSMLegacy.cc.

◆ AddMSSMSystematics() [2/2]

void ch::AddMSSMSystematics ( CombineHarvester cb)

Definition at line 158 of file HttSystematics_MSSMLegacy.cc.

◆ AddMSSMUpdateSystematics_et_mt() [1/2]

void ch::AddMSSMUpdateSystematics_et_mt ( CombineHarvester cb,
CombineHarvester  src 
)

[part1]

[part1]

[part1]

[part1]

Definition at line 18 of file HttSystematics_MSSMUpdate.cc.

◆ AddMSSMUpdateSystematics_et_mt() [2/2]

void ch::AddMSSMUpdateSystematics_et_mt ( CombineHarvester cb)

Definition at line 335 of file HttSystematics_MSSMUpdate.cc.

◆ AddMSSMUpdateSystematics_em() [1/2]

void ch::AddMSSMUpdateSystematics_em ( CombineHarvester cb,
CombineHarvester  src 
)

Definition at line 342 of file HttSystematics_MSSMUpdate.cc.

◆ AddMSSMUpdateSystematics_em() [2/2]

void ch::AddMSSMUpdateSystematics_em ( CombineHarvester cb)

Definition at line 468 of file HttSystematics_MSSMUpdate.cc.

◆ AddMSSMUpdateSystematics_mm() [1/2]

void ch::AddMSSMUpdateSystematics_mm ( CombineHarvester cb,
CombineHarvester  src 
)

Definition at line 475 of file HttSystematics_MSSMUpdate.cc.

◆ AddMSSMUpdateSystematics_mm() [2/2]

void ch::AddMSSMUpdateSystematics_mm ( CombineHarvester cb)

Definition at line 582 of file HttSystematics_MSSMUpdate.cc.

◆ AddMSSMUpdateSystematics_tt() [1/2]

void ch::AddMSSMUpdateSystematics_tt ( CombineHarvester cb,
CombineHarvester  src 
)

Definition at line 589 of file HttSystematics_MSSMUpdate.cc.

◆ AddMSSMUpdateSystematics_tt() [2/2]

void ch::AddMSSMUpdateSystematics_tt ( CombineHarvester cb)

Definition at line 729 of file HttSystematics_MSSMUpdate.cc.

◆ AddSystematics_hhh_et_mt() [1/2]

void ch::AddSystematics_hhh_et_mt ( CombineHarvester cb,
CombineHarvester  src 
)

Definition at line 19 of file HhhSystematics.cc.

◆ AddSystematics_hhh_et_mt() [2/2]

void ch::AddSystematics_hhh_et_mt ( CombineHarvester cb)

Definition at line 227 of file HhhSystematics.cc.

◆ AddSystematics_hhh_tt() [1/2]

void ch::AddSystematics_hhh_tt ( CombineHarvester cb,
CombineHarvester  src 
)

Definition at line 235 of file HhhSystematics.cc.

◆ AddSystematics_hhh_tt() [2/2]

void ch::AddSystematics_hhh_tt ( CombineHarvester cb)

Definition at line 305 of file HhhSystematics.cc.

◆ AddSystematics_AZh() [1/2]

void ch::AddSystematics_AZh ( CombineHarvester cb,
CombineHarvester  src 
)

Definition at line 20 of file AZhSystematics.cc.

◆ AddSystematics_AZh() [2/2]

void ch::AddSystematics_AZh ( CombineHarvester cb)

Definition at line 194 of file AZhSystematics.cc.

◆ ExtractJsonFromFile()

Json::Value ch::ExtractJsonFromFile ( std::string const &  file)

Extracts a Json::Value from the specified input file.

Parameters
fileThe full path to the input json file

Definition at line 8 of file JsonTools.cc.

◆ ExtractJsonFromString()

Json::Value ch::ExtractJsonFromString ( std::string const &  str)

Extracts a Json::Value from the given input string.

Parameters
strMust be a valid JSON object, including the enclosing curly braces, e.g: { key : "value" }.

Definition at line 17 of file JsonTools.cc.

◆ UpdateJson()

void ch::UpdateJson ( Json::Value &  a,
Json::Value const &  b 
)

Updates the values in one json from the values in another.

All the values in b are entered into a, overwritting any already defined in a.

Parameters
aThe Json::Value to be updated
bThe Json::Value containing the updates

Definition at line 24 of file JsonTools.cc.

◆ MergedJson() [1/2]

Json::Value ch::MergedJson ( int  argc,
char *  argv[] 
)

Create a single merged Json::Value from a mixture of json files and json-formatted strings.

Each string contained in argv must either be the name of a file containing json data or a string of json-formatted text. A string will only be assumed to indicate a file when it ends with the file extension .json.

Note
It is assumed that the arguments of this function are those passed to a main function, and accordingly the first element of argv will be ignored.
Parameters
argcNumber of arguments contained in argv
argvAn array of strings

Definition at line 35 of file JsonTools.cc.

◆ MergedJson() [2/2]

Json::Value ch::MergedJson ( std::vector< std::string > const &  vec)

Create a single merged Json::Value from a mixture of json files and json-formatted strings.

Each string contained in vec must either be the name of a file containing json data or a string of json-formatted text. A string will only be assumed to indicate a file when it ends with the file extension .json.

Parameters
vecVector of input strings

Definition at line 51 of file JsonTools.cc.

◆ LogLine()

void ch::LogLine ( std::ostream &  stream,
std::string const &  func,
std::string const &  message 
)

Writes a logging message to a given ostream.

Should be used with the macro LOGLINE which will call this function and automatically insert the name of the calling function, e.g.:

 void MyFunc() {
   LOGLINE(std::cout, "Some message");
 }

produces

 [MyFunc] Some message

Definition at line 27 of file Logging.cc.

◆ FnError()

std::string ch::FnError ( std::string const &  message,
std::string const &  file,
unsigned  line,
std::string const &  fn 
)

Generates an error message which includes the name of the calling function and the filename and line number where the error occured.

Should be used via the macro FNERROR which calls this function and inserts the file, line and fn arguments automatically.

Definition at line 32 of file Logging.cc.

◆ GetQualififedName()

std::string ch::GetQualififedName ( std::string const &  str)

Extracts the fully-qualified function name from a complete function signature.

The input str will typically be the compiler variable __PRETTY_FUNCTION__. The return type and arguments are then removed, e.g.:

 std::string ch::GetQualififedName(std::string const& str)

would be converted to

 ch::GetQualififedName

Definition at line 8 of file Logging.cc.

◆ make_unique()

template<typename T , typename... Args>
std::unique_ptr<T> ch::make_unique ( Args &&...  args)

Definition at line 8 of file MakeUnique.h.

◆ ParseCombineWorkspace()

void ch::ParseCombineWorkspace ( CombineHarvester cb,
RooWorkspace &  ws,
std::string const &  modelcfg,
std::string const &  data,
bool  verbose = false 
)

Definition at line 22 of file ParseCombineWorkspace.cc.

◆ ParseCombineWorkspacePy()

void ch::ParseCombineWorkspacePy ( CombineHarvester cb,
RooWorkspace const &  ws,
std::string const &  modelcfg,
std::string const &  data,
bool  verbose = false 
)

Definition at line 16 of file ParseCombineWorkspace.cc.

◆ FindAddPdf()

RooAbsReal * ch::FindAddPdf ( RooAbsReal *  input)

Definition at line 128 of file ParseCombineWorkspace.cc.

◆ IntegrateFloatRange()

double ch::IntegrateFloatRange ( TH1F const *  hist,
double  xmin,
double  xmax 
)

Definition at line 38 of file SOverBTools.cc.

◆ GetClonedTH1()

std::unique_ptr< TH1 > ch::GetClonedTH1 ( TFile *  file,
std::string const &  path 
)

Definition at line 12 of file TFileIO.cc.

◆ WriteToTFile()

template<class T >
void ch::WriteToTFile ( T *  ptr,
TFile *  file,
std::string const &  path 
)

Definition at line 31 of file TFileIO.h.

◆ OpenFromTFile() [1/2]

template<class T >
T ch::OpenFromTFile ( std::string const &  fullpath)

Definition at line 54 of file TFileIO.h.

◆ OpenFromTFile() [2/2]

template<class T >
T ch::OpenFromTFile ( TFile *  file,
std::string const &  path 
)

Definition at line 79 of file TFileIO.h.

◆ ParametersByName()

RooArgSet ch::ParametersByName ( RooAbsReal const *  pdf,
RooArgSet const *  dat_vars 
)

Definition at line 18 of file Utilities.cc.

◆ ExtractFitParameters()

std::vector< ch::Parameter > ch::ExtractFitParameters ( RooFitResult const &  res)

Definition at line 46 of file Utilities.cc.

◆ ExtractSampledFitParameters()

std::vector< ch::Parameter > ch::ExtractSampledFitParameters ( RooFitResult const &  res)

Definition at line 60 of file Utilities.cc.

◆ SetStandardBinNames()

void ch::SetStandardBinNames ( CombineHarvester cb,
std::string const &  pattern = "$ANALYSIS_$CHANNEL_$BINID_$ERA" 
)

Definition at line 78 of file Utilities.cc.

◆ SetStandardBinName()

void ch::SetStandardBinName ( ch::Object obj,
std::string  pattern 
)

Definition at line 84 of file Utilities.cc.

◆ MatchingProcess()

template<class T , class U >
bool ch::MatchingProcess ( T const &  first,
U const &  second 
)

Definition at line 43 of file Utilities.h.

◆ SetProperties()

template<class T , class U >
void ch::SetProperties ( T *  first,
U const *  second 
)

Definition at line 59 of file Utilities.h.

◆ SetFromBinName()

void ch::SetFromBinName ( ch::Object input,
std::string  parse_rules 
)

Definition at line 96 of file Utilities.cc.

◆ TGraphFromTable()

TGraph ch::TGraphFromTable ( std::string  filename,
std::string const &  x_column,
std::string const &  y_column 
)

Definition at line 121 of file Utilities.cc.

◆ Join()

template<class T >
std::vector<T> ch::Join ( std::vector< std::vector< T >> const &  in)

Definition at line 83 of file Utilities.h.

◆ JoinStr()

std::vector< std::string > ch::JoinStr ( std::vector< std::vector< std::string >> const &  in)

Definition at line 153 of file Utilities.cc.

◆ Set2Vec()

template<class T >
std::vector<T> ch::Set2Vec ( std::set< T > const &  in)

Definition at line 101 of file Utilities.h.

◆ TH1F2Data()

RooDataHist ch::TH1F2Data ( TH1F const &  hist,
RooRealVar const &  x,
std::string const &  name 
)

Definition at line 158 of file Utilities.cc.

◆ RebinHist()

TH1F ch::RebinHist ( TH1F const &  hist)

Definition at line 170 of file Utilities.cc.

◆ RestoreBinning()

TH1F ch::RestoreBinning ( TH1F const &  src,
TH1F const &  ref 
)

Definition at line 181 of file Utilities.cc.

◆ GenerateCombinations()

std::vector< std::vector< unsigned > > ch::GenerateCombinations ( std::vector< unsigned >  vec)

Definition at line 191 of file Utilities.cc.

◆ ParseFileLines()

std::vector< std::string > ch::ParseFileLines ( std::string const &  file_name)

Definition at line 224 of file Utilities.cc.

◆ is_float()

bool ch::is_float ( std::string const &  str)

Definition at line 241 of file Utilities.cc.

◆ MassesFromRange()

std::vector< std::string > ch::MassesFromRange ( std::string const &  input,
std::string const &  fmt = "%.0f" 
)

Generate a vector of mass values using ranges and intervals specified in a string.

The input string should be of the format:

m1-m2:r1,m3,m4,m5-m6:r2,...

where mi and ri must both be positive. A term like mi-mj:r (where mi must be < mj) genrates masses starting at mi and increasing by an interval r up to mj.

This function returns a vector of ordered mass values converted to strings.

Note
Use the function ch::ValsFromRange if you need to include negative numbers - this uses a different syntax for the ranges so doesn't suffer from the amiguity of the - sign
Parameters
inputThe input string to decode
fmtThe format specifier for converting floating-point mass values to strings

Definition at line 249 of file Utilities.cc.

◆ ValsFromRange()

std::vector< std::string > ch::ValsFromRange ( std::string const &  input,
std::string const &  fmt = "%.0f" 
)

Generate a vector of values using ranges and intervals specified in a string.

The input string should be of the format:

m1:m2|r1,m3,m4,m5:m6|r2,...

where mi and ri can be positive or negative. A term like mi-mj:r (where mi must be < mj) genrates values starting at mi and increasing by an interval r up to mj.

This function returns a vector of ordered values converted to strings.

Parameters
inputThe input string to decode
fmtThe format specifier for converting floating-point values to strings

Definition at line 281 of file Utilities.cc.

◆ HasNegativeBins()

bool ch::HasNegativeBins ( TH1 const *  h)

Definition at line 339 of file Utilities.cc.

◆ ZeroNegativeBins()

void ch::ZeroNegativeBins ( TH1 *  h)

Definition at line 349 of file Utilities.cc.

◆ Tuple2String()

template<class... Args>
std::string ch::Tuple2String ( const std::tuple< Args... > &  t)

Format any std::tuple as a string.

For a tuple containing objects X0,X1,...,Xn creates a string of the form (x0,x1,...,xn) where xi is the result of the output stream (<<) operator for Xi.

Parameters
tThe input std::tuple
Returns
A formatted string of the tuple elements

Definition at line 214 of file Utilities.h.

◆ make_relative()

boost::filesystem::path ch::make_relative ( boost::filesystem::path  p_from,
boost::filesystem::path  p_to 
)

Determine the relative path from one file to another.

Based on the example given here: https://svn.boost.org/trac/boost/ticket/6249

The main use of this function is to determine the relative path from a text datacard file to its associated ROOT file that must be written in the histogram mapping lines.

Parameters
p_fromThe start point of the relative path
p_toThe end point of the relative path
Returns
Relative path from p_from to p_to

Definition at line 313 of file Utilities.cc.

◆ PrintSystematic()

void ch::PrintSystematic ( ch::Systematic syst)

Definition at line 19 of file ValidationTools.cc.

◆ ValidateShapeUncertaintyDirection() [1/2]

void ch::ValidateShapeUncertaintyDirection ( CombineHarvester cb,
json jsobj 
)

Definition at line 29 of file ValidationTools.cc.

◆ ValidateShapeUncertaintyDirection() [2/2]

void ch::ValidateShapeUncertaintyDirection ( CombineHarvester cb)

Definition at line 37 of file ValidationTools.cc.

◆ CheckEmptyShapes() [1/2]

void ch::CheckEmptyShapes ( CombineHarvester cb,
json jsobj 
)

Definition at line 89 of file ValidationTools.cc.

◆ CheckEmptyShapes() [2/2]

void ch::CheckEmptyShapes ( CombineHarvester cb)

Definition at line 115 of file ValidationTools.cc.

◆ CheckEmptyBins() [1/2]

void ch::CheckEmptyBins ( CombineHarvester cb,
json jsobj 
)

Definition at line 189 of file ValidationTools.cc.

◆ CheckEmptyBins() [2/2]

void ch::CheckEmptyBins ( CombineHarvester cb)

Definition at line 175 of file ValidationTools.cc.

◆ CheckNormEff() [1/2]

void ch::CheckNormEff ( CombineHarvester cb,
double  maxNormEff,
json jsobj 
)

Definition at line 157 of file ValidationTools.cc.

◆ CheckNormEff() [2/2]

void ch::CheckNormEff ( CombineHarvester cb,
double  maxNormEff 
)

Definition at line 138 of file ValidationTools.cc.

◆ CheckSizeOfShapeEffect() [1/2]

void ch::CheckSizeOfShapeEffect ( CombineHarvester cb,
json jsobj 
)

Definition at line 238 of file ValidationTools.cc.

◆ CheckSizeOfShapeEffect() [2/2]

void ch::CheckSizeOfShapeEffect ( CombineHarvester cb)

Definition at line 208 of file ValidationTools.cc.

◆ CheckSmallSignals() [1/2]

void ch::CheckSmallSignals ( CombineHarvester cb,
double  minSigFrac,
json jsobj 
)

Definition at line 280 of file ValidationTools.cc.

◆ CheckSmallSignals() [2/2]

void ch::CheckSmallSignals ( CombineHarvester cb,
double  minSigFrac 
)

Definition at line 264 of file ValidationTools.cc.

◆ ValidateShapeTemplates() [1/2]

void ch::ValidateShapeTemplates ( CombineHarvester cb,
json jsobj 
)

Definition at line 46 of file ValidationTools.cc.

◆ ValidateShapeTemplates() [2/2]

void ch::ValidateShapeTemplates ( CombineHarvester cb)

Definition at line 66 of file ValidationTools.cc.

◆ ValidateCards()

void ch::ValidateCards ( CombineHarvester cb,
std::string const &  filename,
double  maxNormEff,
double  minSigFrac 
)

Definition at line 296 of file ValidationTools.cc.

◆ swap() [1/6]

void ch::swap ( CombineHarvester first,
CombineHarvester second 
)

Definition at line 36 of file CombineHarvester.cc.

◆ operator<<() [1/5]

std::ostream& ch::operator<< ( std::ostream &  out,
HistMapping const &  val 
)

Definition at line 70 of file HistMapping.cc.

◆ swap() [2/6]

void ch::swap ( Object first,
Object second 
)

Definition at line 18 of file Object.cc.

◆ swap() [3/6]

void ch::swap ( Observation first,
Observation second 
)

Definition at line 33 of file Observation.cc.

◆ operator<<() [2/5]

std::ostream& ch::operator<< ( std::ostream &  out,
Observation const &  val 
)

Definition at line 144 of file Observation.cc.

◆ swap() [4/6]

void ch::swap ( Parameter first,
Parameter second 
)

Definition at line 21 of file Parameter.cc.

◆ operator<<() [3/5]

std::ostream& ch::operator<< ( std::ostream &  out,
Parameter val 
)

Definition at line 73 of file Parameter.cc.

◆ swap() [5/6]

void ch::swap ( Process first,
Process second 
)

Definition at line 36 of file Process.cc.

◆ operator<<() [4/5]

std::ostream& ch::operator<< ( std::ostream &  out,
Process const &  val 
)

Definition at line 170 of file Process.cc.

◆ swap() [6/6]

void ch::swap ( Systematic first,
Systematic second 
)

Definition at line 63 of file Systematic.cc.

◆ operator<<() [5/5]

std::ostream& ch::operator<< ( std::ostream &  out,
Systematic const &  val 
)

Definition at line 268 of file Systematic.cc.

◆ PrintProc()

void ch::PrintProc ( ch::Process proc)

Definition at line 23 of file ValidationTools.cc.

◆ AsTH1F()

TH1F ch::AsTH1F ( TH1 const *  hist)
inline

Definition at line 20 of file MorphFunctions.h.

◆ BuildRooMorphing()

std::string ch::BuildRooMorphing ( RooWorkspace &  ws,
CombineHarvester cb,
std::string const &  bin,
std::string const &  process,
RooAbsReal &  mass_var,
std::string  norm_postfix,
bool  allow_morph,
bool  verbose,
bool  force_template_limit = false,
TFile *  file = nullptr 
)

[part1]

[part1]

[part2]

[part2]

[part3]

[part3]

[part4]

[part4]

[part5]

[part5]

[part6]

[part6]

[part1]

[part2]

[part2]

[part3]

[part3]

[part4]

[part4]

[part5]

[part5]

[part6]

[part6]

Definition at line 20 of file MorphFunctions.cc.

◆ GraphFromSpline()

TGraph ch::GraphFromSpline ( RooSpline1D const *  spline)

◆ MakeMorphDebugPlots()

void ch::MakeMorphDebugPlots ( RooMorphingPdf *  pdf,
RooAbsReal *  mass,
std::vector< double > const &  masses,
TFile *  f,
TH1 *  ref_bins = nullptr 
)

Definition at line 627 of file MorphFunctions.cc.