44 #include "TGraphAsymmErrors.h" 53 TLatex*
prelim =
new TLatex(.9, .95,
"NOvA Preliminary");
54 prelim->SetTextColor(
kBlue);
56 prelim->SetTextSize(2/30.);
57 prelim->SetTextAlign(32);
92 virtual double LowLimit()
const {
return 0.514;}
123 gStyle->SetPadLeftMargin(0.12);
124 gStyle->SetTitleOffset(1.15,
"x");
125 gStyle->SetTitleOffset(0.95,
"y");
132 std::vector<const ISyst*> systs_XSec;
133 std::vector<const ISyst*> systs_Beam;
134 std::vector<const ISyst*> systs_FileSysts;
135 std::vector<const ISyst*> systs_Others;
141 std::map< TString, std::vector<const ISyst*> > mapSystLists;
142 mapSystLists[
"XSec"] = systs_XSec;
143 mapSystLists[
"Beam"] = systs_Beam;
144 mapSystLists[
"FileSysts"] = systs_FileSysts;
145 mapSystLists[
"Others"] = systs_Others;
154 TFile* fSurfSens =
new TFile(
"resultCont__allSysts.root");
156 fSurfSens ->
Close();
157 double bestFitDm = surfaceSens -> fBestFitY;
158 double bestFitSsq = surfaceSens -> fBestFitX;
159 std::cout<<
"Best fit from result contour: ssqth23: " << bestFitSsq
160 <<
", dm^2_32: " << bestFitDm <<
std::endl;
164 for(
auto const& thisSystList: mapSystLists){
167 TCanvas* cZoom =
new TCanvas(
"cZoom",(NameZoom).c_str());
168 cZoom->SetBottomMargin(0.15);
169 TH2* h2d = (TH2*) surfaceSens ->
ToTH2();
173 h2d ->
GetYaxis()->SetRangeUser(2.4,2.48);
174 h2d ->
GetXaxis()->SetRangeUser(0.455,0.48);
180 TCanvas*
c =
new TCanvas(
"c",(Name).c_str());
181 c->SetBottomMargin(0.15);
186 TLegend *
leg =
new TLegend(0.15, 0.65, 0.60, 0.85);
190 std::vector<const ISyst*> systList = thisSystList.second;
192 for(
const ISyst*
s: systList){
194 TGraph*
g =
new TGraph;
195 TGraph* gLO =
new TGraph;
213 std::vector<const IExperiment*> vConstraints;
214 vConstraints.push_back(&expt1);
215 vConstraints.push_back(&expt2);
216 vConstraints.push_back(&expt3);
217 vConstraints.push_back(&expt4);
225 g->SetPoint(g->GetN(),
236 gLO->SetPoint(gLO->GetN(),
251 g->SetLineColor(7-nOfGraphs/2);
252 g->SetLineStyle(nOfGraphs%2 + 1);
254 gLO->SetLineColor(7-nOfGraphs/2);
255 gLO->SetLineStyle(nOfGraphs%2 + 1);
259 g->SetLineColor(nOfGraphs%10);
260 g->SetLineStyle((nOfGraphs-10)%10);
262 gLO->SetLineColor(nOfGraphs%10);
263 gLO->SetLineStyle((nOfGraphs-10)%10);
269 g->SetTitle((
s->LatexName()).c_str());
271 g->SetMarkerStyle(0);
273 gLO->SetTitle((
s->LatexName()).c_str());
274 gLO->SetFillColor(10);
275 gLO->SetMarkerStyle(0);
276 gLO->SetLineWidth(3);
278 leg->AddEntry(g, (
s->LatexName()).c_str(),
"l");
295 c->SaveAs((
"plots/"+Name+
".root").c_str());
296 c->SaveAs((
"plots/"+Name+
".pdf").c_str());
297 c->SaveAs((
"plots/"+Name+
".png").c_str());
305 cZoom->SaveAs((
"plots/"+NameZoom+
".root").c_str());
306 cZoom->SaveAs((
"plots/"+NameZoom+
".pdf").c_str());
307 cZoom->SaveAs((
"plots/"+NameZoom+
".png").c_str());
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
virtual void SetL(double L)=0
bin1_2sigma SetFillColor(3)
Cuts and Vars for the 2020 FD DiF Study.
void ResetOscCalcToDefault(osc::IOscCalcAdjustable *calc)
Reset calculator to default assumptions for all parameters.
void AddJointAna2017OtherSysts(std::vector< const ISyst * > &systs, const EAnaType2017 ana)
double GetValue(const osc::IOscCalcAdjustable *osc) const override
correl_xv GetYaxis() -> SetDecimals()
virtual void SetDmsq21(const T &dmsq21)=0
Simple record of shifts applied to systematic parameters.
Spectrum PredictSyst(osc::IOscCalc *calc, const SystShifts &shift) const override
virtual void SetTh13(const T &th13)=0
virtual std::string LatexName() const
virtual std::string ShortName() const
virtual T GetTh23() const
T sqr(T x)
More efficient square function than pow(x,2)
Encapsulate code to systematically shift a caf::SRProxy.
ntuple SetFillStyle(1001)
virtual void SetDmsq32(const T &dmsq32)=0
virtual std::string LatexName() const
Representation of a spectrum in any variable, with associated POT.
Log-likelihood scan across two parameters.
void DrawBestFit(Color_t color, Int_t marker=kFullCircle) const
Draw the best fit point.
Spectrum FakeData(double pot) const
Synonymous with AsimovData(). Retained for compatibility.
virtual double LowLimit() const
correl_xv GetXaxis() -> SetDecimals()
void DrawContour(TH2 *fc, Style_t style, Color_t color, double minchi=-1)
Loads shifted spectra from files.
virtual std::unique_ptr< IFitSummary > Fit(osc::IOscCalcAdjustable *seed, SystShifts &bestSysts=junkShifts, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systSeedPts={}, Verbosity verb=kVerbose) const
Master fitting method. Depends on FitHelper and FitHelperSeeded.
Optimized version of OscCalcPMNS.
const ReactorExperiment * WorldReactorConstraint2017()
Reactor constraint from PDG 2017.
void RestartCalculator(osc::IOscCalcAdjustable *calc)
void AddJointAna2017XSecSysts(std::vector< const ISyst * > &systs, const EAnaType2017 ana, bool smallgenie)
const ConstrainedFitVarWithPrior fitDmSq32Scaled_UniformPrior & kFitDmSq32Scaled
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
Oscillation probability calculators.
cout<< "--"<< endl;for(Int_t iP=1;iP<=hyz->GetNbinsX();iP++){for(Int_t iC=1;iC<=hyz->GetNbinsY();iC++){if(hyv->GetBinContent(iP, iC)>-999){goal_hyv-> SetBinContent(iP, iC,-(dy[iP-1][iC-1]))
virtual double HighLimit() const
virtual double LowLimit() const
Combine multiple component experiments.
const FitSinSqTheta23UO kFitSinSqTheta23UO
virtual void SetRho(double rho)=0
const SolarConstraints kSolarConstraintsPDG2017(7.53e-5, 0.18e-5, 0.851, 0.020)
void AddJointAna2017FileSysts(std::vector< const ISyst * > &systs, const EAnaType2017 ana)
void AddJointAna2017BeamSysts(std::vector< const ISyst * > &systs, const EAnaType2017 ana)
virtual std::string ShortName() const
TH2 * Gaussian90Percent2D(const FrequentistSurface &s)
Up-value surface for 90% confidence in 2D in gaussian approximation.
const ConstrainedFitVarWithPrior fitSsqTh23_UniformPriorSsqTh23 & kFitSinSqTheta23
virtual void SetTh23(const T &th23)=0
A simple ascii-art progress bar.
const FitSinSqTheta23LO kFitSinSqTheta23LO
virtual double GetValue(const osc::IOscCalcAdjustable *osc) const
virtual void SetValue(osc::IOscCalcAdjustable *osc, double val) const
void SetShift(const ISyst *syst, double shift, bool force=false)
virtual double HighLimit() const
TH2 * ToTH2(const Spectrum &s, double exposure, ana::EExposureType expotype, const Binning &binsx, const Binning &binsy, ana::EBinType bintype)
For use with Var2D.
virtual void SetTh12(const T &th12)=0
virtual void SetdCP(const T &dCP)=0
Compare a single data spectrum to the MC + cosmics expectation.
Perform MINUIT fits in one or two dimensions.