Variables
generate_hists Namespace Reference

Variables

string OUTDIR = "/nova/ana/users/jwolcott/mc_valid/new_test"
 
dictionary DATASET_NUMEVTS
 
list MOCK_DATA_DATASETS
 
list COMPONENT_DISTRIBUTIONS
 
 sum_f = ROOT.TF1("fsum", " + ".join(COMPONENT_DISTRIBUTIONS), 0, 5)
 
 integral = sum_f.Integral(0, 5)
 
list COMPONENT_FUNCTIONS = [ ROOT.TF1("%f * f%d" % (1./integral, fnum), distr, 0, 5) for fnum, distr in enumerate(COMPONENT_DISTRIBUTIONS) ]
 
list thresholds = [f.Integral(0, 5)/integral for f in COMPONENT_FUNCTIONS]
 
 outf = ROOT.TFile( os.path.join(OUTDIR, "test_hists_%s.root" % dataset_name), "recreate" )
 
list hists = []
 
 rnd = random.random()
 
 val = COMPONENT_FUNCTIONS[distr_num].GetRandom()
 
 h = len(COMPONENT_DISTRIBUTIONS)elsehists[0]
 

Detailed Description

  generate_hists.py:
   Make histograms to use for testing the validation system.
  
   Original author: J. Wolcott <jwolcott@fnal.gov>
      Date: September 2016

Variable Documentation

list generate_hists.COMPONENT_DISTRIBUTIONS
Initial value:
1 = [
2  "TMath::Gaus(x, 1)",
3  "TMath::Landau(x-2, 1)",
4  "2*TMath::Student(3*x, 5)",
5 ]

Definition at line 31 of file generate_hists.py.

list generate_hists.COMPONENT_FUNCTIONS = [ ROOT.TF1("%f * f%d" % (1./integral, fnum), distr, 0, 5) for fnum, distr in enumerate(COMPONENT_DISTRIBUTIONS) ]

Definition at line 40 of file generate_hists.py.

dictionary generate_hists.DATASET_NUMEVTS
Initial value:
1 = {
2  "test_dataset1": 1e5,
3  "test_dataset2": 1e4,
4  "test_dataset3": 1e3,
5 }

Definition at line 21 of file generate_hists.py.

generate_hists.h = len(COMPONENT_DISTRIBUTIONS)elsehists[0]

Definition at line 65 of file generate_hists.py.

list generate_hists.hists = []

Definition at line 49 of file generate_hists.py.

generate_hists.integral = sum_f.Integral(0, 5)

Definition at line 37 of file generate_hists.py.

list generate_hists.MOCK_DATA_DATASETS
Initial value:
1 = [
2  "test_dataset3",
3 ]

Definition at line 27 of file generate_hists.py.

string generate_hists.OUTDIR = "/nova/ana/users/jwolcott/mc_valid/new_test"

Definition at line 15 of file generate_hists.py.

Referenced by makeSystTable().

generate_hists.outf = ROOT.TFile( os.path.join(OUTDIR, "test_hists_%s.root" % dataset_name), "recreate" )

Definition at line 46 of file generate_hists.py.

generate_hists.rnd = random.random()

Definition at line 58 of file generate_hists.py.

Referenced by genie::HNIntranuke2018.AbsorbHN(), genie::MECGenerator.AddFinalStateLepton(), genie::AMNuGammaGenerator.AddPhoton(), ana::CovMxManager.AddSystematic(), INukeNucleonCorr.AvgCorrection(), ana::covmx::CovarianceMatrix.BuildFullCovMx(), genie::COHHadronicSystemGenerator.CalculateHadronicSystem_BergerSehgalFM(), genie::COHHadronicSystemGenerator.CalculateHadronicSystem_ReinSehgal(), genie::COHKinematicsGenerator.CalculateKin_AlvarezRuso(), genie::SKKinematicsGenerator.CalculateKin_AtharSingleKaon(), genie::COHKinematicsGenerator.CalculateKin_BergerSehgal(), genie::COHKinematicsGenerator.CalculateKin_BergerSehgalFM(), genie::COHKinematicsGenerator.CalculateKin_ReinSehgal(), ConvertToGTracker(), genie::KNOHadronization.DecayBackToBack(), genie::BaryonResonanceDecayer.DecayExclusive(), genie::KNOHadronization.DecayMethod2(), genie::MECGenerator.DecayNucleonCluster(), DrawBins(), genie::HNIntranuke2018.ElasHN(), genie::utils::intranuke.Equilibrium(), genie::utils::intranuke2018.Equilibrium(), fake_future_data(), fill_col(), genie::HNIntranuke2018.GammaInelasticHN(), genie::geometry::ROOTGeomAnalyzer.GenBoxRay(), evgen::SupernovaGen.Generate(), genie::KNOHadronization.GenerateBaryonPdgCode(), genie::CharmHadronization.GenerateCharmHadron(), genie::NucleonDecayPrimaryVtxGenerator.GenerateDecayedNucleonPosition(), genie::NucleonDecayPrimaryVtxGenerator.GenerateDecayProducts(), genie::NNBarOscPrimaryVtxGenerator.GenerateDecayProducts(), genie::GMCJDriver.GenerateEvent1Try(), genie::KNOHadronization.GenerateHadronCodes(), genie::flux::GMonoEnergeticFlux.GenerateNext(), genie::flux::GJPARCNuFlux.GenerateNext(), genie::flux::GDk2NuFlux.GenerateNext(), genie::flux::GSimpleNtpFlux.GenerateNext(), genie::flux::GNuMIFlux.GenerateNext(), genie::flux::GAtmoFlux.GenerateNext_1try(), genie::flux::GDk2NuFlux.GenerateNext_weighted(), genie::flux::GNuMIFlux.GenerateNext_weighted(), genie::SpectralFunc.GenerateNucleon(), genie::EffectiveSF.GenerateNucleon(), genie::LocalFGM.GenerateNucleon(), genie::FGMBodekRitchie.GenerateNucleon(), genie::SpectralFunc1d.GenerateNucleon(), genie::NNBarOscPrimaryVtxGenerator.GenerateOscillatingNeutronPosition(), genie::flux::GCylindTH1Flux.GeneratePhi(), genie::Intranuke.GenerateStep(), genie::Intranuke2018.GenerateStep(), INukeNucleonCorr.generateTargetNucleon(), genie::VertexGenerator.GenerateVertex(), genie::geometry::ROOTGeomAnalyzer.GenerateVertex(), genie::Intranuke.GenerateVertex(), genie::Intranuke2018.GenerateVertex(), genie::supernova::GFluxWindow.GenPosition(), GetDetectorVertex(), GetRandomRay(), GetTargetMaterial(), goodness_of_fit(), genie::HAIntranuke.HadronFateHA(), genie::HAIntranuke2018.HadronFateHA(), genie::HNIntranuke2018.HadronFateHN(), genie::PythiaHadronization.Hadronize(), genie::CharmHadronization.Hadronize(), genie::HAIntranuke.Inelastic(), genie::HAIntranuke2018.Inelastic(), genie::HAIntranuke.InelasticHA(), genie::HAIntranuke2018.InelasticHA(), genie::INukeHadroData2018.IntBounce(), genie::INukeHadroData.IntBounce(), joint_fit_2017_make_fc_slice(), joint_fit_2017_make_fc_surf(), genie::FermiMover.KickHitNucleon(), genie::flux::GDk2NuFlux.LoadBeamSimData(), genie::flux::GSimpleNtpFlux.LoadBeamSimData(), genie::flux::GNuMIFlux.LoadBeamSimData(), main(), make_fc_mh_nersc_2018(), make_fc_mh_nersc_2019(), make_fc_nus_surfs_nersc_2018(), make_fc_nus_surfs_nersc_2019(), make_fc_oct_nersc_2018(), make_fc_oct_nersc_2019(), make_fc_slices_nersc_2018(), make_fc_slices_nersc_2018_stats(), make_fc_slices_nersc_2019(), make_fc_surfaces_2020(), make_fc_surfaces_2020_validation(), make_fc_surfaces_nersc_2018(), make_fc_surfaces_nersc_2018_stats(), make_fc_surfaces_nersc_2019(), make_nus17_fc_surfs(), make_nus_fc_surfs(), ana::Spectrum.MockData(), nuebar_signif(), genie::NucDeExcitationSim.OxygenTargetSim(), genie::KNOHadronization.PhaseSpaceDecay(), genie::utils::intranuke.PhaseSpaceDecay(), genie::utils::intranuke2018.PhaseSpaceDecay(), genie::NucDeExcitationSim.Photon4P(), genie::NucDeExcitationSim.PhotonEnergySmearing(), genie::HAIntranuke.PiBounce(), genie::HAIntranuke2018.PiBounce(), genie::utils::intranuke.PionProduction(), genie::utils::intranuke2018.PionProduction(), genie::HAIntranuke.PnBounce(), genie::HAIntranuke2018.PnBounce(), genie::utils::intranuke.PreEquilibrium(), genie::utils::intranuke2018.PreEquilibrium(), genie::NuEPrimaryLeptonGenerator.ProcessEventRecord(), genie::INukeDeltaPropg.ProcessEventRecord(), genie::DFRHadronicSystemGenerator.ProcessEventRecord(), genie::PrimaryLeptonGenerator.ProcessEventRecord(), genie::NuEKinematicsGenerator.ProcessEventRecord(), genie::DFRKinematicsGenerator.ProcessEventRecord(), genie::QELKinematicsGenerator.ProcessEventRecord(), genie::COHElKinematicsGenerator.ProcessEventRecord(), genie::OutgoingDarkGenerator.ProcessEventRecord(), genie::RESKinematicsGenerator.ProcessEventRecord(), genie::DMELKinematicsGenerator.ProcessEventRecord(), genie::IBDKinematicsGenerator.ProcessEventRecord(), genie::DISKinematicsGenerator.ProcessEventRecord(), genie::QELEventGenerator.ProcessEventRecord(), genie::DMDISKinematicsGenerator.ProcessEventRecord(), genie::QELEventGeneratorSM.ProcessEventRecord(), SelectAnnihilationMode(), genie::BaryonResonanceDecayer.SelectDecayChannel(), genie::MECGenerator.SelectEmpiricalKinematics(), genie::flux::GAstroFlux::NuGenerator.SelectEnergy(), genie::KNOPythiaHadronization.SelectHadronizer(), SelectInitState(), genie::PhysInteractionSelector.SelectInteraction(), genie::ToyInteractionSelector.SelectInteraction(), genie::flux::GCylindTH1Flux.SelectNeutrino(), genie::flux::GAtmoFlux.SelectNeutrino(), genie::MECGenerator.SelectNSVLeptonKinematics(), genie::flux::GAstroFlux::NuGenerator.SelectNuPdg(), genie::flux::GAstroFlux::NuGenerator.SelectOrigin(), genie::RSPPResonanceSelector.SelectResonance(), genie::flux::GPointSourceAstroFlux.SelectSource(), genie::QELKinematicsGenerator.SpectralFuncExperimentalCode(), genie::DMELKinematicsGenerator.SpectralFuncExperimentalCode(), genie::supernova::OrderedSampler.Step(), test_stanfit_withsysts(), genie::utils::intranuke.ThreeBodyKinematics(), genie::utils::intranuke2018.ThreeBodyKinematics(), ThrowFakeData(), genie::utils::intranuke.TwoBodyKinematics(), genie::utils::intranuke2018.TwoBodyKinematics(), and genie::flux::GDk2NuFluxXMLHelper.~GDk2NuFluxXMLHelper().

generate_hists.sum_f = ROOT.TF1("fsum", " + ".join(COMPONENT_DISTRIBUTIONS), 0, 5)

Definition at line 36 of file generate_hists.py.

list generate_hists.thresholds = [f.Integral(0, 5)/integral for f in COMPONENT_FUNCTIONS]

Definition at line 41 of file generate_hists.py.

generate_hists.val = COMPONENT_FUNCTIONS[distr_num].GetRandom()

Definition at line 64 of file generate_hists.py.