38 std::string observablename =
"pTV";
41 RooRealVar obsvar(observablename.c_str(),
"p_{T}^{V}", 10, 600);
47 RooRealVar cHq3(
"cHq3",
"EFT modifier", 0.0, 1.0);
48 cHq3.setAttribute(
"NewPhysics",
true);
52 std::string infilename = std::string(
gROOT->GetTutorialDir()) +
"/roofit/input_histos_rf_lagrangianmorph.root";
53 std::vector<std::string> samplelist = {
"SM_NPsq0",
"cHq3_NPsq1",
"cHq3_NPsq2"};
71 morphfunc.setParameter(
"cHq3", 0.01);
72 auto morph_hist_0p01 = morphfunc.createTH1(
"morph_cHq3=0.01");
73 morphfunc.setParameter(
"cHq3", 0.25);
74 auto morph_hist_0p25 = morphfunc.createTH1(
"morph_cHq3=0.25");
75 morphfunc.setParameter(
"cHq3", 0.5);
76 auto morph_hist_0p5 = morphfunc.createTH1(
"morph_cHq3=0.5");
77 RooDataHist morph_datahist_0p01(
"morph_dh_cHq3=0.01",
"", {obsvar}, morph_hist_0p01);
78 RooDataHist morph_datahist_0p25(
"morph_dh_cHq3=0.25",
"", {obsvar}, morph_hist_0p25);
79 RooDataHist morph_datahist_0p5(
"morph_dh_cHq3=0.5",
"", {obsvar}, morph_hist_0p5);
84 TFile *file =
new TFile(infilename.c_str(),
"READ");
86 file->GetObject(samplelist[0].c_str(), folder);
87 TH1 *input_hist0 =
dynamic_cast<TH1 *
>(folder->
FindObject(observablename.c_str()));
89 file->GetObject(samplelist[1].c_str(), folder);
90 TH1 *input_hist1 =
dynamic_cast<TH1 *
>(folder->
FindObject(observablename.c_str()));
92 file->GetObject(samplelist[2].c_str(), folder);
93 TH1 *input_hist2 =
dynamic_cast<TH1 *
>(folder->
FindObject(observablename.c_str()));
97 RooDataHist input_dh0(samplelist[0],
"", {obsvar}, input_hist0);
98 RooDataHist input_dh1(samplelist[1],
"", {obsvar}, input_hist1);
99 RooDataHist input_dh2(samplelist[2],
"", {obsvar}, input_hist2);
101 auto frame0 = obsvar.frame(
Title(
"Input templates for p_{T}^{V}"));
109 auto frame1 = obsvar.
frame(
Title(
"Morphed templates for selected values"));
123 std::unique_ptr<RooDataSet>
data{model.generate({cHq3, obsvar}, 1000000)};
125 hh_data->
SetTitle(
"Morphing prediction");
133 gPad->SetLeftMargin(0.15);
134 gPad->SetRightMargin(0.05);
141 leg1->
AddEntry(
"SM_NPsq0",
"SM",
"LP");
143 leg1->
AddEntry(
"cHq3_NPsq1",
"c_{Hq^(3)}=1.0 at #Lambda^{-2}",
"LP");
145 leg1->
AddEntry(
"cHq3_NPsq2",
"c_{Hq^(3)}=1.0 at #Lambda^{-4}",
"LP");
149 gPad->SetLeftMargin(0.15);
150 gPad->SetRightMargin(0.05);
158 leg2->
AddEntry(
"morph_dh_cHq3=0.01",
"c_{Hq^{(3)}}=0.01",
"L");
160 leg2->
AddEntry(
"morph_dh_cHq3=0.25",
"c_{Hq^{(3)}}=0.25",
"L");
162 leg2->
AddEntry(
"morph_dh_cHq3=0.5",
"c_{Hq^{(3)}}=0.5",
"L");
167 gPad->SetLeftMargin(0.12);
168 gPad->SetRightMargin(0.18);
177 hh_data->
Draw(
"COLZ");
178 c1->SaveAs(
"rf711_lagrangianmorph.png");
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
R__EXTERN TStyle * gStyle
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Container class to hold N-dimensional binned data.
RooPlot * plotOn(RooPlot *frame, PlotOpt o) const override
Back end function to plotting functionality.
Class RooLagrangianMorphing is a implementation of the method of Effective Lagrangian Morphing,...
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
Variable that can be changed from the outside.
The RooWrapperPdf is a class that can be used to convert a function into a PDF.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates, that is,...
static void InvertPalette()
Invert the current color palette.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
<div class="legacybox"><h2>Legacy Code</h2> TFolder is a legacy interface: there will be no bug fixes...
TObject * FindObject(const char *name) const override
Search object identified by name in the tree of folders inside this folder.
TH1 is the base class of all histogram classes in ROOT.
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
void SetTitle(const char *title) override
Change/set the title.
void Draw(Option_t *option="") override
Draw this histogram with options.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
void Draw(Option_t *option="") override
Draw this legend with its current attributes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Mother of all ROOT objects.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
void SetPalette(Int_t ncolors=kBird, Int_t *colors=nullptr, Float_t alpha=1.)
See TColor::SetPalette.
void SetNumberContours(Int_t number=20)
Set the default number of contour levels when drawing 2-d plots.
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg={})
RooCmdArg DataError(Int_t)
RooCmdArg MarkerColor(Color_t color)
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg DrawOption(const char *opt)
RooCmdArg XErrorSize(double width)
RooCmdArg MarkerSize(Size_t size)
RooCmdArg LineColor(Color_t color)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
std::string observableName
std::vector< std::string > folderNames