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.

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 
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(), DedxComp(), DedxCompBirk(), DedxGamma(), DoUnfolding(), eff_plots(), fa_numuContours(), 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(), HadEFit(), heatMap(), genie::HAIntranuke.Inelastic(), genie::HAIntranuke2018.Inelastic(), genie::EffectiveSF.LoadConfig(), lutz(), make_spallt8mev(), makePlots(), MakeProfileHadEFD(), MakeProfileHadEND(), MakeProfileMuEFD(), MakeProfileMuEND(), MakeSampleHistograms(), makeXSecPlots1D(), makeXSecPlots2D(), MakingProfile(), MakingProfileActCatcherND(), MakingProfileAllCatcherND(), MakingProfileHadCC(), MakingProfileHadCCND(), MakingProfileHadNonQE(), MakingProfileHadNonQEND(), MakingProfileHadQE(), MakingProfileHadQEND(), MakingProfileND(), genie::EffectiveSF.ModelType(), mre_blessed(), MuonFit(), PhotonSim(), PhotonSim_mp(), pidPlot(), pidPlotProng(), PionDedxComp(), plot_hits0(), plot_hits1(), plot_pi0_xcheck(), plot_positions(), PlotDeltaSigmaWithSigma(), 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(), bpfit::BreakPointAna.analyze(), d3sigma_calc(), d4sigma_calc(), d4sigma_hist(), genie::PythiaDecayer.Decay(), hough::Hough2P.FindPeaks(), earms::Minimizer.Fit(), get_sa_syst_mags(), get_sa_systs_mags_v2(), GetCommandLineArgs(), airshower::AirSlicer.GetHoughAngles(), airshower::AirSlicer.GetHoughMap(), airshower::AirSlicer.GetHoughRhos(), hough::Hough2P.Map(), hough::MultiHough2P.Map(), earms::Minimizer.Minimizer(), hough::MultiHough2P.MultiMap(), 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(), genie::flux::GAstroFlux.SetDetectorPosition(), genie::GHepParticle.SetLastDaughter(), genie::GHepParticle.SetPolarization(), wsnumu::WSNumuObj.SetTheta(), jmshower::JMShower.SetTheta(), ana.TAKEPol6_biasHM(), util::HoughCalc.TestHit(), geo::CellGeo.TranslateCell(), 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.