Functions | Variables
chisquared Namespace Reference

Functions

def CalcChi2 (hmc, hdata, alpha=1.)
 

Variables

 hpred = TH1D("hpred", "", 20, 0, 20)
 
 hrand = TH1D("hrand", "", 20, 0, 20)
 
 rand = TRandom3(27565)
 
int val = 100
 
 c1 = TCanvas("c1","c1")
 
 chi2 = CalcChi2(hpred, hrand)
 
 Ndof = hpred.GetNbinsX()
 
 p = TMath.Prob(chi2, Ndof)
 
 halt = TH1D("halt", "", 20, 0, 20)
 
 c2 = TCanvas("c2","c2")
 
 hpred2 = hpred.Clone()
 
 hpred3 = hpred.Clone()
 
 c3 = TCanvas("c3","c3")
 
 hlike = TH1D("hlike", ";#theta;#chi^{2}", 400, 0.8, 1.2)
 
int min = 1000
 
int minval = 0
 
 theta = hlike.GetBinLowEdge(bin)
 
 c4 = TCanvas("c4", "c4")
 

Function Documentation

def chisquared.CalcChi2 (   hmc,
  hdata,
  alpha = 1. 
)

Definition at line 43 of file chisquared.py.

References PandAna.Demos.demo1.range, and std.sqrt().

43 def CalcChi2(hmc, hdata, alpha = 1.):
44  chi2 = 0
45  for i in range(1, hmc.GetNbinsX()+1):
46  ei = hmc.GetBinContent(i)*alpha
47  oi = hdata.GetBinContent(i)
48  sigma = sqrt(ei)
49  chi2 += (ei - oi)**2 / sigma**2
50  return chi2
51 
T sqrt(T number)
Definition: d0nt_math.hpp:156
def CalcChi2(hmc, hdata, alpha=1.)
Definition: chisquared.py:43

Variable Documentation

chisquared.c1 = TCanvas("c1","c1")

Definition at line 36 of file chisquared.py.

chisquared.c2 = TCanvas("c2","c2")

Definition at line 71 of file chisquared.py.

chisquared.c3 = TCanvas("c3","c3")

Definition at line 93 of file chisquared.py.

Referenced by attenuation_calibration_comparisons(), attenuation_calibration_comparisons_withfb(), avgefficiency(), calhit_validation_macro(), CompareToTrueSignal(), confusionMatrix(), confusionMatrixProng(), stan::optimization.CubicInterp(), DedxComp(), DedxCompBirk(), DedxGamma(), DoUnfolding(), eff_plots(), FidOptHist(), ana::nueccinc::NueCCIncTemplateFitter.FillCovarianceMatrix(), ana::NumuCCIncPionTemplateFitter.FillCovarianceMatrixExtra(), nueccinc_test::NueCCIncGlobalFitter.FillCovarianceMatrixFull(), nueccinc_test::NueCCIncGlobalFitter.FillCovarianceMatrixReduced(), fragmentEnergy(), fragmentEnergyDistributionDifferentAngles(), genie_syst_pca(), GetBackgroundStatisticalUncertainty(), getPlots(), getPlotsFromNtupleFD(), getPlotsFromNtupleND(), GetSelectedStatisticalUncertainty(), getSigmaPlots(), getSigmaPlotsAll(), stan::math.grad_inc_beta(), HadEFit(), heatMap(), genie::HAIntranuke.Inelastic(), genie::HAIntranuke2018.Inelastic(), genie::EffectiveSF.LoadConfig(), lutz(), make_eff_plots_areaNorm(), make_spallt8mev(), makePlots(), MakeProfileHadEFD(), MakeProfileHadEND(), MakeProfileMuEFD(), MakeProfileMuEND(), MakeSampleHistograms(), makeXSecPlots1D(), makeXSecPlots2D(), MakingProfile(), MakingProfileActCatcherND(), MakingProfileAllCatcherND(), MakingProfileHadCC(), MakingProfileHadCCND(), MakingProfileHadNonQE(), MakingProfileHadNonQEND(), MakingProfileHadQE(), MakingProfileHadQEND(), MakingProfileND(), genie::EffectiveSF.ModelType(), mrbrem_plots(), mre_blessed(), MuonFit(), PhotonSim(), PhotonSim_mp(), pidPlot(), pidPlotProng(), PionDedxComp(), plot_hits0(), plot_hits1(), plot_pi0_xcheck(), plot_positions(), PlotDeltaSigmaWithSigma(), cmf::ReadFitResults.plotResults(), fnex::ReadFitResults.plotResults(), ppfx_syst_pca_fn(), ProtonDedxComp(), ProtonDedxCompBirk(), osc::_PMNS< T >.SetMixBWCP(), ShwZOptHist(), slicer_production_validation(), stats(), validation(), xsec_tot_uncert_optimization(), and xsec_uncertainty_per_bin().

chisquared.c4 = TCanvas("c4", "c4")
chisquared.chi2 = CalcChi2(hpred, hrand)

Definition at line 52 of file chisquared.py.

chisquared.halt = TH1D("halt", "", 20, 0, 20)

Definition at line 63 of file chisquared.py.

chisquared.hlike = TH1D("hlike", ";#theta;#chi^{2}", 400, 0.8, 1.2)

Definition at line 110 of file chisquared.py.

chisquared.hpred = TH1D("hpred", "", 20, 0, 20)
chisquared.hpred2 = hpred.Clone()

Definition at line 88 of file chisquared.py.

chisquared.hpred3 = hpred.Clone()

Definition at line 90 of file chisquared.py.

chisquared.hrand = TH1D("hrand", "", 20, 0, 20)

Definition at line 16 of file chisquared.py.

chisquared.min = 1000

Definition at line 114 of file chisquared.py.

chisquared.minval = 0

Definition at line 115 of file chisquared.py.

Referenced by ana.PlotMultiSyst(), PlotSyst(), ana.PlotSyst(), and PlotSysts().

chisquared.Ndof = hpred.GetNbinsX()

Definition at line 53 of file chisquared.py.

chisquared.p = TMath.Prob(chi2, Ndof)

Definition at line 54 of file chisquared.py.

chisquared.rand = TRandom3(27565)

Definition at line 23 of file chisquared.py.

chisquared.theta = hlike.GetBinLowEdge(bin)

Definition at line 118 of file chisquared.py.

Referenced by util::HoughCalc.AddPoint(), fuzz::FuzzyKVertex.AddProng(), stan::math.algebra_solver(), bpfit::BreakPointAna.analyze(), stan::math.bernoulli_ccdf_log(), stan::math.bernoulli_cdf_log(), stan::math.bernoulli_log(), stan::math.bernoulli_logit_log(), stan::math.bernoulli_logit_lpmf(), stan::math.bernoulli_lpmf(), stan::math.binomial_ccdf_log(), stan::math.binomial_cdf_log(), stan::math.binomial_log(), stan::math.binomial_lpmf(), stan::math.categorical_log(), stan::math.categorical_logit_rng(), stan::math.categorical_lpmf(), d3sigma_calc(), d4sigma_calc(), d4sigma_hist(), genie::PythiaDecayer.Decay(), stan::math.dirichlet_log(), stan::math.dirichlet_lpmf(), stan::math.dirichlet_rng(), testbeam::BeamlineEventDisplay.DrawWCTrack(), hough::Hough2P.FindPeaks(), earms::Minimizer.Fit(), GetCommandLineArgs(), airshower::AirSlicer.GetHoughAngles(), airshower::AirSlicer.GetHoughMap(), airshower::AirSlicer.GetHoughRhos(), stan::math.log_mix_partial_helper(), stan::math.log_softmax(), hough::Hough2P.Map(), hough::MultiHough2P.Map(), earms::Minimizer.Minimizer(), hough::MultiHough2P.MultiMap(), stan::math.multinomial_log(), stan::math.multinomial_lpmf(), genie::HAIntranuke.PiBounce(), genie::HAIntranuke2018.PiBounce(), PlotDeltaFractionVsYear(), PlotSignificanceVsYear_FixDelta(), PlotSignificanceVsYear_FixTh23(), genie::HAIntranuke.PnBounce(), genie::HAIntranuke2018.PnBounce(), genie::QELEventGeneratorSM.ProcessEventRecord(), wsnumu::WSNumu.produce(), slid::SliceLIDBuilder.produce(), slid::LIDBuilder.produce(), slid::SPIDBuilder.produce(), genie::utils::phys.RWhitlow(), osc::OscCalculatorPMNSOptEigen.SaveLastParams(), genie::flux::GAstroFlux.SetDetectorPosition(), genie::GHepParticle.SetLastDaughter(), genie::GHepParticle.SetPolarization(), wsnumu::WSNumuObj.SetTheta(), jmshower::JMShower.SetTheta(), stan::io::reader< T >.simplex(), stan::math.softmax(), ana.TAKEPol6_biasHM(), TEST(), TEST_F(), util::HoughCalc.TestHit(), geo::CellGeo.TranslateCell(), stan::io::reader< T >.unit_vector(), validation(), geo::PlaneGeo.View(), brb::WCTrack.WCTrack(), genie::AlamSimoAtharVacasSKPXSec2014.XSec(), genie::flux::GDk2NuFluxXMLHelper.~GDk2NuFluxXMLHelper(), genie::flux::GNuMIFluxXMLHelper.~GNuMIFluxXMLHelper(), and jmshower::JMShower.~JMShower().

int chisquared.val = 100

Definition at line 26 of file chisquared.py.