Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
HistFactoryImpl.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 * Authors:
4 * Jonas Rembser, CERN 2023
5 *
6 * Copyright (c) 2023, CERN
7 *
8 * Redistribution and use in source and binary forms,
9 * with or without modification, are permitted according to the terms
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11 */
12
13#ifndef HistFactoryImplHelpers_h
14#define HistFactoryImplHelpers_h
15
17
18#include <RooGlobalFunc.h>
19#include <RooWorkspace.h>
20
21#include <ROOT/RSpan.hxx>
22
23namespace RooStats {
24namespace HistFactory {
25namespace Detail {
26
27namespace MagicConstants {
28
29constexpr double defaultGammaMin = 0;
30constexpr double defaultShapeFactorGammaMax = 1000;
31constexpr double defaultShapeSysGammaMax = 10;
32constexpr double defaultStatErrorGammaMax = 10;
33constexpr double minShapeUncertainty = 0.0;
34
35} // namespace MagicConstants
36
37template <class Arg_t, class... Params_t>
38Arg_t &getOrCreate(RooWorkspace &ws, std::string const &name, Params_t &&...params)
39{
40 Arg_t *arg = static_cast<Arg_t *>(ws.obj(name));
41 if (arg)
42 return *arg;
43 Arg_t newArg(name.c_str(), name.c_str(), std::forward<Params_t>(params)...);
45 return *static_cast<Arg_t *>(ws.obj(name));
46}
47
48void configureConstrainedGammas(RooArgList const &gammas, std::span<const double> relSigmas, double minSigma);
49
51 std::vector<std::unique_ptr<RooAbsPdf>> constraints;
52 std::vector<RooRealVar*> globalObservables;
53};
54
56 std::span<const double> relSigmas, double minSigma,
58
59} // namespace Detail
60} // namespace HistFactory
61} // namespace RooStats
62
63#endif
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
Definition TGX11.cxx:110
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
Persistable container for RooFit projects.
TObject * obj(RooStringView name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name)
bool import(const RooAbsArg &arg, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={})
Import a RooAbsArg object, e.g.
RooCmdArg RecycleConflictNodes(bool flag=true)
RooCmdArg Silence(bool flag=true)
void configureConstrainedGammas(RooArgList const &gammas, std::span< const double > relSigmas, double minSigma)
Configure constrained gamma parameters for fitting.
Arg_t & getOrCreate(RooWorkspace &ws, std::string const &name, Params_t &&...params)
CreateGammaConstraintsOutput createGammaConstraints(RooArgList const &paramList, std::span< const double > relSigmas, double minSigma, Constraint::Type type)
Namespace for the RooStats classes.
Definition Asimov.h:19
std::vector< std::unique_ptr< RooAbsPdf > > constraints