Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ana Namespace Reference

Cuts and Vars for the 2020 FD DiF Study. More...

Namespaces

 Beam
 
 covmx
 
 Current
 Enumeration for interaction currents (CC/NC)
 
 DecompType
 
 Flavors
 Enumeration of neutrino transition modes.
 
 label
 
 muonid_classifier
 
 Neutrino
 
 nueccinc
 
 Sign
 Enumeration for neutrino sign (neutrino/antineutrino)
 
 xsec
 

Classes

class  _IConstrainedFitVar
 
class  _IFitVar
 
class  ASCIIMaker
 Helper class for MakeTextListFile. More...
 
class  AtmConstraint
 
class  Bayesian1DMarginal
 
class  BayesianMarginal
 The result of marginalizing over a set of Bayesian MCMC samples down to a few dimensions. More...
 
class  BayesianSurface
 
class  BeamIntensitySyst
 Shift beam intensity - reweights nslcs dist to fake a different intensity. More...
 
class  BeamNueScaleSyst
 Absolute scale of beam $ \nu_e $'s systematic. More...
 
class  BeamSyst
 Beam systematics: More...
 
class  BeamSystOrWeightBase
 
class  BeamWeightFunc
 Incorporate into a weight Var like Var wei(BeamWeight(... More...
 
class  BENDecomp
 
class  BigChi2SingleSampleExperiment
 
class  Binning
 Represent the binning of a Spectrum's x-axis. More...
 
class  BolombMuESyst2019
 
class  BPFAllTrkLenHelper
 
class  CCFlavSel
 Helper for defining true CC event cuts. More...
 
class  CheatDecomp
 Just return the ND truth spectra as the decomposition. More...
 
struct  CompareByID
 
class  CompNormSyst
 
class  ConstrainedFitVarWithPrior
 Version of FitVarWithPrior for use with constrained FitVar_StanSupports. More...
 
class  ContainFxn
 functions for sliding containment, useful for modeling smaller detector for early reach More...
 
class  ContainmentSyst
 
class  CorrMuEScaleSyst2019
 
class  CorrMuEScaleSyst2020
 
class  CosmicBkgScaleSyst
 Dummy syst to communicate with SingleSampleExperiment. More...
 
class  CountingExperiment
 Compare a data spectrum to MC expectation using only the event count. More...
 
class  CovarianceMatrix
 A class for generating a covariance matrices as a function of oscillation parameters and systematics as nuisance parameters. More...
 
class  CovMxExperiment
 Compare a data spectrum to MC using a covariance matrix in the chi^2. More...
 
class  CovMxManager
 
class  CovMxSurface
 
class  CrossSectionAnalysis
 Generic organizational class for a cross section analysis. More...
 
class  CrossSectionSpectra
 
class  CSVMaker
 
struct  CutDef
 Struct to hold cut information. More...
 
class  CutOptimization
 
class  CutVarCache
 Helper for SpectrumLoader::HandleRecord. More...
 
struct  CVNPng
 
struct  CVNPngTruthSel
 
struct  DataMCComponents
 
struct  DataMCComponets
 
class  DataMCPair
 
class  DecompWeightFunc
 
class  DepMan
 Deep magic to fix static initialization order. Here Be Dragons! More...
 
class  DirectHadEScaleSyst2017
 Absolute fit hadronic energy scale systematic. More...
 
class  DirectRelHadEScaleSyst2017
 Relative fit hadronic energy scale systematic. More...
 
class  DISHighWScaleSyst
 
class  Dmsq32Constraint
 A simple Gaussian constraint on dmsq32, dependent on the hierarchy. More...
 
class  DontAddDirectory
 Prevent histograms being added to the current directory. More...
 
class  DummyAnaSyst
 
class  DummyNue2017Syst
 
class  DummyNumu2017Syst
 
class  DummyRockScaleSyst
 
class  EmpiricalMECWgt2020
 
class  EvtRNGSyst
 
class  FakeDecomp
 Uses MC for $ \nu_\mu $ CC and NC components, assigns remainder of data to $ \nu_e $ CC. More...
 
class  FCBin
 A collection of Feldman-Cousins experiments at the same oscillation parameters. More...
 
class  FCCollection
 Collection of FCPoint. Serializable to/from a file. More...
 
class  FCPoint
 Represents the results of a single Feldman-Cousins pseudo-experiment. More...
 
class  FCSurface
 Pseudo-experiments, binned to match a log-likelihood surface. More...
 
class  FDExtrap
 
class  FDHadEnergyScaleSyst
 FD hadronic energy scale systematic. More...
 
class  FDMuEnergyScaleSyst
 FD muon energy scale systematic. More...
 
class  FDPredictionGenerator
 
class  FDPredictionSterile
 Take the output of an extrapolation and oscillate it as required. More...
 
class  FileListSource
 Simple file source based on an explicit list provided by the user. More...
 
class  FileReducer
 Create smaller CAFs. More...
 
class  fIsFiducialVariable
 
class  fIsPi0LVariable
 
class  fIsPi0Variable
 
class  Fit2SinSqTheta23SinSq2Theta13
 $ 2\sin^2\theta_{23}\sin^22\theta_{13} $ More...
 
class  FitDelta13InPiUnitsSterile
 $ \delta_{13}/\pi $ More...
 
class  FitDelta14InPiUnitsSterile
 $ \delta_{13}/\pi $ More...
 
class  FitDelta24InPiUnitsSterile
 $ \delta_{24}/\pi $ More...
 
class  FitDeltaCPT
 
class  FitDeltaInPiUnits
 $ \delta_{CP}/\pi $ More...
 
class  FitDmSq21
 $ \Delta m^2_{21} $ More...
 
class  FitDmSq21CPT
 FitDmSq21, but for one sign only. More...
 
class  FitDmSq32
 $ \Delta m^2_{32} $ More...
 
class  FitDmSq32CPT
 FitDmSq32, but for one sign only. More...
 
class  FitDmSq32CPTHierarchy
 
class  FitDmSq32InvertedHierarchy
 
class  FitDmSq32NormalHierarchy
 
class  FitDmSq32Scaled
 $ \Delta m^2_{32}\times10^3{\rm eV}^2 $ More...
 
class  FitDmSq32ScaledCPT
 FitDmSq32Scaled, but for one sign only. More...
 
class  FitDmSq32ScaledIH
 
class  FitDmSq32ScaledNH
 
class  FitDmSq32Sterile
 $ \Delta m^2_{32} $ More...
 
class  FitDmSq41Sterile
 $ \Delta m^2_{41} $ More...
 
class  FitDmSq43Sterile
 $ \Delta m^2_{43} $ More...
 
class  FitEpsMuTau
 $ \epsilon_{\mu\tau} $ More...
 
class  FitInAnaBinsBkgdEstimator
 Fits the background and signal in each analysis bin independently. More...
 
class  FitSigmaCPT
 
class  FitSinSq2Theta12
 $ \sin^22\theta_{12} $ More...
 
class  FitSinSq2Theta12CPT
 FitSinSq2Theta12, but for one sign only. More...
 
class  FitSinSq2Theta13
 $ \sin^22\theta_{13} $ More...
 
class  FitSinSq2Theta13CPT
 FitSinSq2Theta13, but for one sign only. More...
 
class  FitSinSq2Theta13Sterile
 $ \sin^2 2 \theta_{13} $ More...
 
class  FitSinSq2Theta23
 $ \sin^22\theta_{23} $ More...
 
class  FitSinSq2Theta23CPT
 FitSinSq2Theta23, but for one sign only. More...
 
class  FitSinSqTheta13Sterile
 $ \sin^2\theta_{13} $ More...
 
class  FitSinSqTheta14Sterile
 $ \sin^2\theta_{14} $ More...
 
class  FitSinSqTheta23
 $ \sin^2\theta_{23} $ More...
 
class  FitSinSqTheta23CPT
 FitSinSqTheta23CPT, but for one sign only. More...
 
class  FitSinSqTheta23CPTOctant
 FitSinSqTheta23CPT, but forcing octant. More...
 
class  FitSinSqTheta23LowerOctant
 $ \sin^2\theta_{23} Lower Octant$ More...
 
class  FitSinSqTheta23Sterile
 $ \sin^2\theta_{23} $ More...
 
class  FitSinSqTheta23UpperOctant
 $ \sin^2\theta_{23} Upper Octant$ More...
 
class  FitSinSqTheta24Sterile
 $ \sin^2\theta_{24} $ More...
 
class  FitSinSqTheta34Sterile
 $ \sin^2\theta_{34} $ More...
 
class  FitTanSqTheta12
 $ \tan^2\theta_{12} $ More...
 
class  FitTheta13
 $ \theta_{13} $ More...
 
class  FitTheta13InDegreesSterile
 $ \theta_{13} $ More...
 
class  FitTheta13Sterile
 $ \theta_{13} $ More...
 
class  FitTheta14InDegreesSterile
 $ \theta_{14} $ More...
 
class  FitTheta14Sterile
 $ \theta_{14} $ More...
 
class  FitTheta23InDegreesSterile
 $ \theta_{23} $ More...
 
class  FitTheta23Sterile
 $ \theta_{23} $ More...
 
class  FitTheta24InDegreesSterile
 $ \theta_{24} $ More...
 
class  FitTheta24Sterile
 $ \theta_{24} $ More...
 
class  FitTheta34InDegreesSterile
 $ \theta_{34} $ More...
 
class  FitTheta34Sterile
 $ \theta_{34} $ More...
 
class  FitVarsProduct
 Fit the product of two variables (made from angles so their ranges are 0-1). See also FitVarsProductMarg. More...
 
class  FitVarsProductMarg
 See the documentation for FitVarsProductMarg. More...
 
class  FitVarWithPrior
 A convenience FitVar_StanSupport that wraps a pre-existing FitVar_StanSupport with a function you specify (enables re-use of functions) More...
 
class  FixGibuuWeight
 Must include this weight whenever working with GiBUU files. More...
 
class  FloatingExceptionOnNaN
 Alter floating-point exception flag. More...
 
class  FluxDecomp
 
class  FluxMultiverseSyst
 Obtain PPFX GENIE systematic band. More...
 
class  FluxReweight
 Extrapolation for flux true space reweight. More...
 
class  FrequentistSurface
 Log-likelihood scan across two parameters. More...
 
class  GaussianConstraint
 A simple Gaussian constraint on an arbitrary IFitVar. More...
 
class  GaussianPriorSystShifts
 
class  GenericCut
 Template for Cut and SpillCut. More...
 
class  GenericHistAxis
 Collect information describing the x-axis of an analysis histogram. More...
 
class  GenericSystComponentScale
 Uncertainty in the scale of a single component of the spectrum. More...
 
class  GenericSystematicDef
 
class  GenericVar
 Template for Var and SpillVar. More...
 
class  GenieMultiverseNormalizedSpectra
 
class  GenieMultiverseParameters
 
class  GenieMultiverseSpectra
 
class  GeniePCASyst
 
class  GetAntiNueBDT
 
class  GetAntiNueBDTCVN
 
class  GetAntiNumuBDT
 
class  GetAntiNumuBDTCVN
 
class  GetBDTCosRej_BPF_FHCHigh
 
class  GetBDTCosRej_BPF_FHCPer1
 
class  GetBDTCosRej_BPF_FHCPer2
 
class  GetBDTCosRej_BPF_RHCHigh
 
class  GetBDTCosRej_Kal_FHCHigh
 
class  GetBDTCosRej_Kal_FHCPer1
 
class  GetBDTCosRej_Kal_FHCPer2
 
class  GetBDTCosRej_Kal_RHCHigh
 
class  GetBestBPFTrack
 
class  GetBestPionID
 
class  GetBestPionTrack
 
class  GetBestTrack
 
class  GetBPFMuonID
 
class  GetGammaIDVal
 
class  GetMuonID
 
class  GetNCCosRej
 
class  GetNCCosRejG
 
class  GetNCCosRejKeras
 
class  GetNCCosRejp1
 
class  GetNCCosRejp2
 
class  GetNCCosRejp3_5
 
class  GetNCCosRejp4_6
 
class  GetNCPi0BDTID
 
class  GetPionID
 
class  GetPionIDVal
 
class  GetPionTrack
 
class  GetProtonIDVal
 
class  GetWtMinervaND
 
class  GetWtMippNA49NOvAFD
 
class  GetWtMippNA49NOvAND
 
class  GradientDescent
 
class  HadEnergyScaleSyst
 Absolute fit hadronic energy scale systematic. More...
 
class  HistCache
 Helper for Spectrum. More...
 
struct  HistDef
 
class  HistogramTypePolicy
 
class  IBkgdEstimator
 
class  IConstrainedFitVar
 
class  ICrossSectionAnalysis
 
class  IDecomp
 Standard interface to all decomposition techniques. More...
 
class  IExperiment
 Base class defining interface for experiments. More...
 
class  IExtrap
 Interface to extrapolation procedures. More...
 
class  IFDHSilent
 ifdh calls between construction and destruction produce no output More...
 
class  IFileSource
 Interface class for accessing ROOT files in sequence. More...
 
class  IFitter
 Base class for fitters. More...
 
class  IFitVar
 Interface definition for fittable variables. More...
 
class  IFitVarOrISyst
 
class  InstallHandlers
 
class  InteractionSpectra
 
class  IPrediction
 Standard interface to all prediction techniques. More...
 
class  IPredictionGenerator
 Given loaders and an MC shift, Generate() generates an IPrediction. More...
 
class  IRescaledSigmaSyst
 
class  ISignalEstimator
 
class  ISurface
 
class  ISyst
 Encapsulate code to systematically shift a caf::SRProxy. More...
 
class  IUnfold
 
class  KaonScaleSyst
 
class  KrigeKernel
 Helper for SurfaceKrige. More...
 
class  Kriger
 https://en.wikipedia.org/wiki/Kriging More...
 
class  LEMScaleSyst
 LEM-shift systematic. More...
 
class  LeptonAngleSyst
 
class  Loaders
 Collection of SpectrumLoaders for many configurations. More...
 
class  MCMCSamples
 
struct  MDCMPFitResults
 
struct  MDCMPHelper
 Help reduce verbosity when passing hist values between MichelDecomp funcs. More...
 
class  MECDoubleGaussEnhSyst
 
class  MECGaussEnhSyst
 
class  MemoryTupleWriter
 
struct  mHistAxisDef
 
struct  mHistAxisSTDef
 
class  MichelDecomp
 
class  MichelTaggingSyst2018
 
class  MichelTaggingSyst2020
 
class  MINERvA_MEC_Wgt_Var
 
class  MinosResSuppSyst
 
class  MinuitFitter
 Perform MINUIT fits in one or two dimensions. More...
 
class  ModularExtrap
 Extrapolate each component using a separate ModularExtrapComponent. More...
 
class  ModularExtrapComponent
 Base class for component extrapolation. More...
 
class  ModularExtrapSterile
 
class  MuEnergyScaleSyst
 Absolute fit muon energy scale systematic. More...
 
class  MuEScaleSyst2017
 Absolute fit muon energy scale systematic. More...
 
class  MultiExperiment
 Combine multiple component experiments. More...
 
class  MultiHistContainer
 
struct  MultiHistDef
 
struct  MultiSyst
 
class  MultiVar
 
class  MultiVar2DFunc
 
class  Multiverse
 
class  MultiverseCorrelation
 Calculate bin to bin correlation matrix from the universe technique. More...
 
class  MyWrongSignScale
 
class  NCDecomp
 Uses MC for $ \nu_\mu $ CC and $ \nu_e $ CC components, assigns remainder of data to NC. More...
 
class  NCFlavSel
 
class  NCScaleSyst
 Absolute Neutral Current scale systematic. More...
 
class  NCtest
 
class  NDExtrap
 
class  NDExtrapBeamComponent
 
class  NDExtrapComponent
 
class  NDOscCurve
 Transition probability for any one channel as a function of energy. More...
 
class  NDOscillatableSpectrum
 Spectrum with true L/E information, allowing it to be oscillated More...
 
class  NDPredGenerator
 
class  NDPredictionGenerator
 Generates Near Detector predictions. More...
 
class  NDPredictionSterile
 Take the output of an extrapolation and oscillate it as required. More...
 
class  NeutronVisEScaleSyst2018
 
struct  NoCut
 
class  NoExtrapGenerator
 Generates FD-only predictions (no extrapolation) More...
 
class  NoOscPredictionGenerator
 
class  NoReweight
 "Extrapolates" component by returning FD Monte Carlo. More...
 
class  NormSyst
 Absolute normalization systematic. More...
 
class  NotContainFxn
 
class  NOvARwgtSyst
 Base class for systs actually implemented in NOvARwgt. More...
 
class  NueAcceptSystBkg2018FHC
 FHC systs. More...
 
class  NueAcceptSystBkg2018RHC
 RHC systs. More...
 
class  NueAcceptSystSignalKin2018FHC
 
class  NueAcceptSystSignalKin2018RHC
 
class  NueAcceptSystSignalKin2020FHC
 
class  NueAcceptSystSignalKin2020RHC
 
class  NueBkgdComboExtrapGenerator
 Generates extrapolated Nue background-only predictions using Michel+BEN decomposition. More...
 
class  NueBkgdPropExtrapGenerator
 Generates extrapolated Nue background-only predictions using ProportionalDecomp. More...
 
class  NueComboExtrapGenerator
 Generates extrapolated Nue predictions using Michel+BEN decomposition. More...
 
class  NueDecomp
 Uses MC for $ \nu_\mu $ CC and NC components, assigns remainder of data to $ \nu_e $ CC. More...
 
class  NueExtrapSystBkg2017
 
class  NueExtrapSystSignalKin2017
 
struct  NueMCComponents
 
class  NuePlotStyle
 
class  NuePropExtrapGenerator
 Generates extrapolated Nue predictions using ProportionalDecomp. More...
 
class  NuePropExtrapRHCGenerator
 
class  NueSignalExtrapGenerator
 Generates extrapolated Nue signal-only predictions. More...
 
class  NueSurface
 Surface with axes $ \sin^22\theta_{13} $ and $ \delta_{CP} $. More...
 
class  Nuetest
 
class  NullLoader
 Dummy loader that doesn't load any files. More...
 
class  NumuAnalysis
 Produce IExperiment objects encapsulating the $ \nu_\mu $ analysis. More...
 
class  NumuCC2p2hAnalysis
 
class  NumuCC2p2hBkgdEstimator
 Fits the background and signal in each analysis bin independently. More...
 
class  NumuCCIncAnalysis
 Generic organizational class for a cross section analysis. More...
 
class  NumuCCIncPionTemplateFitter
 
class  NumuCCScaleSyst
 
class  NumuDecomp
 Uses MC for NC and $ \nu_e $ CC components, assigns remainder of data to $ \nu_\mu $ CC. More...
 
class  NumuEnergyScaleSyst
 
class  NumuExtrapGenerator
 Generates extrapolated Numu predictions. More...
 
class  NumuGEANTNormSyst
 Normalization component of the numu GEANT systematic, see docdb 13539. More...
 
class  NumuGEANTScaleSyst
 Energy scale component of the numu GEANT systematic, see docdb 13539. More...
 
class  NumuNCScaleSyst
 
class  NumuNormSyst
 
class  NumuRelEnergyScaleSyst
 
class  NumuRelNormSyst
 
class  NumuSummedSmallGENIESyst
 SummedSmallGENIE systematics, from histograms: More...
 
class  NumuSurface
 Surface with axes $ \sin^2\theta_{23} $ and $ \Delta m^2_{32} $. More...
 
class  NumuTauContaminationSyst
 
class  Numutest
 
class  Nus17FlatSyst
 Nus group systematic applied as a flat shift only dependent on NC or CC. More...
 
class  Nus17SystFromHist
 
class  Nus18BaseSyst
 
class  Nus18FlatSyst
 Nus group systematic applied as a flat shift only dependent on NC or CC. More...
 
class  Nus18SystFromHist
 
class  NusFlatSyst
 Nus group systematic applied as a flat shift only dependent on NC or CC. More...
 
class  NusISyst
 
class  NusSystematicsMaker
 
class  NusSystFromHist
 
class  NusSystLoaderShift
 
class  NusSystMaker
 
class  NusSystShift
 
class  NusSystShiftSigma
 
class  NusSystSystShift
 
class  NusSystWeightShift
 
struct  NuTruthHistDef
 
class  NuTruthSpillCut
 
class  NuWROSyst
 Reweight events to match NuWRO. More...
 
struct  One
 
struct  OscCache
 
class  OscCalcNoHash
 Helper for FrequentistSurface::FillSurfacePoint. More...
 
class  OscCovMxExperiment
 Compare a single data spectrum to the MC + cosmics expectation. More...
 
class  OscCurve
 Transition probability for any one channel as a function of energy. More...
 
class  OscillatableSpectrum
 Spectrum with true energy information, allowing it to be oscillated More...
 
class  OscWeightFunc
 Helper for OscWeight. More...
 
struct  PIDCutDef
 Struct to hold PID cut information. More...
 
class  PileupMuESyst2019
 
class  PileupMuESyst2020
 
struct  PlotOptions
 
struct  PredDef
 Struct to hold prediction information. More...
 
class  PredictExtendOwning
 
class  PredictionAddRock
 
class  PredictionCombinePeriods
 Sum MC predictions from different periods scaled according to data POT targets. More...
 
class  PredictionExtendToPeripheral
 
class  PredictionExtrap
 Take the output of an extrapolation and oscillate it as required. More...
 
class  PredictionExtrapSum
 Class to sum a set of PredictionExtraps. More...
 
class  PredictionInterp
 Implements systematic errors by interpolation between shifted templates. More...
 
class  PredictionNoExtrap
 Prediction that just uses FD MC, with no extrapolation. More...
 
class  PredictionNoOsc
 Prediction that wraps a simple Spectrum. More...
 
struct  predictions
 
class  PredictionScaleComp
 Prediction broken down into arbitrary components whose scales can be varied independently. More...
 
class  PredictionSterile
 A prediction object compatible with sterile oscillations. More...
 
class  PredictionSyst3Flavor2020
 Loads shifted spectra from files. More...
 
class  PredictionSystJoint2018
 Loads shifted spectra from files. More...
 
class  PredictionSystJointDemo
 Loads shifted spectra from files. More...
 
class  PredictionSystNue2017
 Loads shifted spectra from files. More...
 
class  PredictionSystNumu2017
 Loads shifted spectra from files. More...
 
class  PredictionWriter
 
class  PredictionXSecTuning
 Prediction that wraps a simple Spectrum. More...
 
class  Prod3AbsCalibLoaders
 
class  Prod3CalibShapeLoaders
 
class  Prod3CherenkovLoaders
 
class  Prod3DataLoaders
 Provide the data loaders only, base class for other loaders. More...
 
class  Prod3LightLevelLoaders
 
class  Prod3LoadersBase
 
class  Prod3NomLoaders
 For nominal spectra and reweighting systs (xsec/flux) More...
 
class  Prod4AbsCalibLoaders
 Loaders for absolute calibration paths/definitions. More...
 
class  Prod4CalibShapeLoaders
 Loaders for calibration shape paths/definitions. More...
 
class  Prod4CherenkovLoaders
 Loaders for Cherenkov paths/definitions. More...
 
class  Prod4DataLoaders
 Provide the data loaders only, base class for other loaders. More...
 
class  Prod4DQFailCheck
 
class  Prod4DQFailCheckBase
 
class  Prod4LightLevelLoaders
 Loaders for light level paths/definitions. More...
 
class  Prod4LoadersBase
 Base class for prod4 loaders. More...
 
class  Prod4NomLoaders
 For nominal spectra and reweighting systs (xsec/flux) More...
 
class  Prod5AbsCalibLoaders
 Loaders for absolute calibration paths/definitions. More...
 
class  Prod5CalibDriftLoaders
 Loaders for calibration drift (detector aging) paths/definitions. More...
 
class  Prod5CalibShapeLoaders
 Loaders for calibration shape paths/definitions. More...
 
class  Prod5CherenkovLoaders
 Loaders for Cherenkov paths/definitions. More...
 
class  Prod5DataLoaders
 Provide the data loaders only, base class for other loaders. More...
 
class  Prod5LightLevelLoaders
 Loaders for light level paths/definitions. More...
 
class  Prod5LoadersBase
 Base class for prod4 loaders. More...
 
class  Prod5NomLoaders
 For nominal spectra and reweighting systs (xsec/flux) More...
 
class  ProfilerSupport
 Support for the –prof commandline option. More...
 
class  Progress
 A simple ascii-art progress bar. More...
 
class  ProportionalDecomp
 Splits Data proportionally according to MC. More...
 
struct  Q3Q0Bin
 
class  QuantileCutGenerator
 Class to Generate a ana::Cut that passes events that fall into the requested quantile in quantile axis. It is specialised via the constructor arguments. More...
 
class  Ratio
 Represent the ratio between two spectra. More...
 
class  RatioError
 Given a numerator and denominator, this class calculates the ratio and associated error on that ratio, assuming the errors are gaussian counting errors, i.e. sqrt(n). More...
 
class  ReactorExperiment
 Very simple model allowing inclusion of reactor constraints. More...
 
class  ReactorExperimentNu
 For use in CPT analysis. More...
 
class  ReactorExperimentNubar
 For use in CPT analysis. More...
 
class  RecoReweight
 Extrapolates using reco-over-reco method. More...
 
class  Registry
 
class  RelMuEScaleSyst2017
 
class  RelNormSyst
 Relative (uncorrelated FD to ND) normalization systematic. More...
 
class  RemIDScaleSyst
 RemID-shift systematic. More...
 
class  ResolutionScan
 
class  ReweightableSpectrum
 Spectrum with the value of a second variable, allowing for reweighting More...
 
class  RockMuonNormSyst
 Rock muon normalization - reweights all events with vtx outside det. More...
 
class  SAMProjectSource
 Fetch files from a pre-existing SAM project. More...
 
class  SAMQuerySource
 File source based on a SAM query or dataset (definition) More...
 
class  Seed
 
class  SeedList
 
struct  SelDef
 
struct  ShiDef
 
class  SigmaDelta
 
class  SingleNucAnalysis
 
class  SingleSampleExperiment
 Compare a single data spectrum to the MC + cosmics expectation. More...
 
struct  SingleSyst
 
struct  SNameDef
 
class  SolarConstraints
 Constraints on the parameters $ \Delta m^2_{21} $ and $ \sin^22\theta_{12} $ from solar experiments. More...
 
class  SolarConstraintsNu
 For use in CPT analysis. More...
 
class  SolarConstraintsNubar
 For use in CPT analysis. More...
 
struct  SpecDef
 Structure to hold Spectra information. More...
 
class  Spectrum
 Representation of a spectrum in any variable, with associated POT. More...
 
class  SpectrumComponents
 
class  SpectrumHandler
 
class  SpectrumLoader
 Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files. More...
 
class  SpectrumLoaderBase
 Base class for the various types of spectrum loader. More...
 
class  SpectrumLoaderMockData
 SpectrumLoader for producing mock data and fake data. More...
 
class  SpectrumLoaderNuTreeSpillCuts
 
class  SpectrumStan
 
struct  SpectrumTypes
 
struct  SpectrumTypes< double >
 
struct  SpectrumTypes< stan::math::var >
 
class  Ssth23Constraint
 Simple Gaussian constraints on sin^2 th23. More...
 
struct  StanConfig
 Configuration parameters for the Stan MCMC fitter, bundled up together for easy storage and parameter passing. More...
 
class  StanFitSupport
 
class  StanFitter
 Fitter type that bolts the Stan fitting tools onto CAFAna. More...
 
class  SterileGenerator
 Generates extrapolated NC predictions using ProportionalDecomp. More...
 
struct  strings
 A helper structure to contain a group of string for plotting. More...
 
class  SummedSyst
 Generic way to add systematics in quadrature. More...
 
class  SurfaceKrige
 Generate an approximate surface faster. More...
 
class  SystConcat
 
class  SystFromWeight
 Simple adaptor class to convert a weight Var to an ISyst. More...
 
struct  SystResults
 
class  SystShifts
 Simple record of shifts applied to systematic parameters. More...
 
class  T2KToyExperiment
 T2K experiment, based on scaling published numbers. More...
 
class  Tangible
 
class  TargetCount
 Count number of targets within the main part of the ND (vSuperBlockND) More...
 
class  ThreadPool
 A very simple thread pool for use by Surface. More...
 
class  TreeMaker
 Helper class for MakeEventTTreeFile. More...
 
class  TrivialBkgdEstimator
 Just return the MC prediction for the background. More...
 
class  TrivialCrossSectionAnalysis
 
class  TrivialExtrap
 "Extrapolation" that simply returns the FD MC prediction More...
 
class  TrivialPrediction
 
class  TrivialSignalEstimator
 
class  TruthReweight
 Extrapolates component using truth-over-truth method. More...
 
class  TwoSampleDecomp
 Class for data driven decomposition of signal and background using two different samples with slightly different spectra. More...
 
class  UnCorrFDMuEScaleSyst2019
 
class  UnCorrFDMuEScaleSyst2020
 
class  UnCorrMuCatMuESyst2019
 
class  UnCorrMuCatMuESyst2020
 
class  UnCorrNDMuEScaleSyst2019
 
class  UnCorrNDMuEScaleSyst2020
 
class  UnfoldIterative
 
class  UnfoldMaxEnt
 Maximum entropy unfolding. More...
 
class  UnfoldSVD
 http://arxiv.org/abs/hep-ph/9509307 More...
 
class  UnfoldTikhonov
 
struct  UpDownPair
 
class  ValenciaMECWgt2020_Provisional
 
class  Var2DFunc
 Helper for Var2D. More...
 
class  Var3DFunc
 Helper for Var3D. More...
 
struct  VarDef
 Struct to hold Var/plot information. More...
 
struct  WeightDef
 Struct to hold weight information. More...
 
class  WildcardSource
 File source based on a wildcard (glob) More...
 
class  WrongSignContamination
 
class  WrongSignEnergyBin
 
class  WrongSignEnergyBinRHC
 
class  WrongSignScale
 Wrong sign scale systematic up and dn by 30%. More...
 
class  WrongSignScale100
 
class  XSecSysts
 
class  XSecTuningPredGenerator
 

Typedefs

typedef Tangible< CutSelection
 
typedef Tangible< HistAxisTangibleAxis
 
typedef double( ExposureFunc_t) (const caf::SRSpillProxy *spill)
 
typedef GenericCut< caf::SRProxyCut
 Representation of a cut (selection) to be applied to a caf::StandardRecord object. More...
 
typedef GenericCut< caf::SRSpillProxySpillCut
 Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts. More...
 
typedef GenericCut< caf::SRNeutrinoProxyNuTruthCut
 Cut designed to be used over the nuTree, ie all neutrinos, not just those that got slices. More...
 
typedef NuTruthCut SpillTruthCut
 Deprecated name, kept for backwards compatibility for now. More...
 
typedef GenericHistAxis< VarHistAxis
 
typedef GenericHistAxis< MultiVarMultiVarHistAxis
 
typedef GenericHistAxis< SpillVarSpillHistAxis
 
typedef GenericHistAxis< NuTruthVarNuTruthHistAxis
 
typedef _IFitVar< stan::math::varIFitVarStan
 
typedef _IConstrainedFitVar< stan::math::varIConstrainedFitVarStan
 
typedef GenericVar< caf::SRProxyVar
 Representation of a variable to be retrieved from a caf::StandardRecord object. More...
 
typedef GenericVar< caf::SRSpillProxySpillVar
 Equivalent of Var acting on caf::SRSpill. For use in making plots of POT per run etc. More...
 
typedef GenericVar< caf::SRNeutrinoProxyNuTruthVar
 Var designed to be used over the nuTree, ie all neutrinos, not just those that got slices. More...
 
typedef NuTruthVar SpillTruthVar
 Deprecated name, kept for backwards compatibility for now. More...
 
typedef GenericSystComponentScale< caf::SRProxySystComponentScale
 
typedef GenericSystComponentScale< caf::SRNeutrinoProxyNuTruthSystComponentScale
 
typedef GenieMultiverseSpectra MultiverseSpectra
 typedef for backward compatibility More...
 
typedef TH1 *( TransformFunc_t) (TH1 *)
 
typedef TH1 *( ProductFunc_t) (TH1 *, TH1 *)
 
typedef Spectrum *( TransformSpectraFunc_t) (Spectrum *)
 
typedef GenericSystematicDef< caf::SRProxySystematicDef
 
typedef GenericSystematicDef< caf::SRNeutrinoProxyNuTruthSystematicDef
 

Enumerations

enum  EModExtrapComps {
  kEEextrap, kEEAntiextrap, kMMextrap, kMMAntiextrap,
  kMEextrap, kMEAntiextrap, kEMextrap, kEMAntiextrap,
  kNCTotalextrap, kNCextrap, kNCAntiextrap, kMTextrap,
  kMTAntiextrap, kETextrap, kETAntiextrap, kEEextrap,
  kEEAntiextrap, kMMextrap, kMMAntiextrap, kMEextrap,
  kMEAntiextrap, kEMextrap, kEMAntiextrap, kNCTotalextrap,
  kNCextrap, kNCAntiextrap, kMTextrap, kMTAntiextrap,
  kETextrap, kETAntiextrap, kEEextrap, kEEAntiextrap,
  kMMextrap, kMMAntiextrap, kMEextrap, kMEAntiextrap,
  kEMextrap, kEMAntiextrap, kNCTotalextrap, kNCextrap,
  kNCAntiextrap, kMTextrap, kMTAntiextrap, kETextrap,
  kETAntiextrap
}
 
enum  EAnaType2020 { EAnaType2020::kNueAna, EAnaType2020::kNumuAna, EAnaType2020::k3FlavorAna }
 
enum  BeamType2020 { kFHC, kRHC, kBoth }
 
enum  EAnaType2018 { kNueAna2018, kNumuAna2018, kJointAna2018 }
 
enum  BeamType2018 {
  kFHC, kFHC, kRHC, kRHC,
  kBoth, kBoth
}
 
enum  NusSystsDetector { NusSystsDetector::kFar, NusSystsDetector::kNear, NusSystsDetector::kExtrap, NusSystsDetector::kBoth }
 
enum  NusSystsChannel { kNC, kBG, NusSystsChannel::kUnknown }
 
enum  NusSystsPolarity { NusSystsPolarity::kFHC, NusSystsPolarity::kRHC, NusSystsPolarity::kBoth }
 
enum  NusSystsPredType { NusSystsPredType::kExtrap, NusSystsPredType::kFD, NusSystsPredType::kND, NusSystsPredType::kUnknown }
 
enum  spec_handle_status { kSpecHelpUnloaded, kSpecHelpLoaders, kSpecHelpReady, kSpecHelpWent }
 
enum  spec_handle_log_level { kSpecHelp_LOG_NOTHING, kSpecHelp_LOG_ERROR, kSpecHelp_LOG_WARNING, kSpecHelp_LOG_INFO }
 
enum  ECAFType {
  kFullCAF, kDecaf, kNueConcat, kNumuConcat,
  kNusConcat
}
 
enum  EFlatness { kNormalCAF, kFlatCAF }
 
enum  DataSource { kBeam, kCosmic }
 Is this data-file representing beam spills or cosmic spills? More...
 
enum  SystMode { kSystExclude, kSystGaussian, kSystInteger }
 
enum  EBinType { kBinContent, kBinDensity }
 
enum  EExposureType { kPOT, kLivetime }
 For use as an argument to Spectrum::ToTH1. More...
 
enum  ExtrapVar { kExtrapPt, kExtrapTheta, kExtrapEmpty }
 
enum  DecompResult {
  DecompResult::nue, DecompResult::numu, DecompResult::NCtot, DecompResult::NC,
  DecompResult::NCbar, DecompResult::nuebar, DecompResult::numubar
}
 Simple way to remember what to ask the decomposition for. More...
 
enum  Quantile {
  Quantile::kGaussian1Sigma, Quantile::kGaussian2Sigma, Quantile::kGaussian3Sigma, Quantile::k0pc,
  Quantile::k90pc, Quantile::k95pc, Quantile::k100pc
}
 Type to specify quantile values, so that we don't run into floating-point matching issues. More...
 
enum  ENu2020ExtrapType {
  kNoExtrap, kProportional, kCombo, ENu2020ExtrapType::kPropPtExtrap,
  ENu2020ExtrapType::kComboPtExtrap, kFake, kNuMuNoExtrap, kNuMu,
  ENu2020ExtrapType::kNuMuPtExtrap
}
 
enum  ENu2018ExtrapType {
  kNoExtrap, kNoExtrap, kProportional, kProportional,
  kCombo, kCombo, kFake, kFake,
  kNuMuNoExtrap, kNuMuNoExtrap, kNuMu, kNuMu
}
 
enum  ENue2017ExtrapType { ENue2017ExtrapType::kNoExtrap, ENue2017ExtrapType::kProportional, ENue2017ExtrapType::kCombo }
 
enum  ENumu2017ExtrapType { ENumu2017ExtrapType::kNumuNoExtrap, ENumu2017ExtrapType::kNuMu }
 
enum  EModExtrapComps {
  kEEextrap, kEEAntiextrap, kMMextrap, kMMAntiextrap,
  kMEextrap, kMEAntiextrap, kEMextrap, kEMAntiextrap,
  kNCTotalextrap, kNCextrap, kNCAntiextrap, kMTextrap,
  kMTAntiextrap, kETextrap, kETAntiextrap, kEEextrap,
  kEEAntiextrap, kMMextrap, kMMAntiextrap, kMEextrap,
  kMEAntiextrap, kEMextrap, kEMAntiextrap, kNCTotalextrap,
  kNCextrap, kNCAntiextrap, kMTextrap, kMTAntiextrap,
  kETextrap, kETAntiextrap, kEEextrap, kEEAntiextrap,
  kMMextrap, kMMAntiextrap, kMEextrap, kMEAntiextrap,
  kEMextrap, kEMAntiextrap, kNCTotalextrap, kNCextrap,
  kNCAntiextrap, kMTextrap, kMTAntiextrap, kETextrap,
  kETAntiextrap
}
 
enum  EModExtrapComps {
  kEEextrap, kEEAntiextrap, kMMextrap, kMMAntiextrap,
  kMEextrap, kMEAntiextrap, kEMextrap, kEMAntiextrap,
  kNCTotalextrap, kNCextrap, kNCAntiextrap, kMTextrap,
  kMTAntiextrap, kETextrap, kETAntiextrap, kEEextrap,
  kEEAntiextrap, kMMextrap, kMMAntiextrap, kMEextrap,
  kMEAntiextrap, kEMextrap, kEMAntiextrap, kNCTotalextrap,
  kNCextrap, kNCAntiextrap, kMTextrap, kMTAntiextrap,
  kETextrap, kETAntiextrap, kEEextrap, kEEAntiextrap,
  kMMextrap, kMMAntiextrap, kMEextrap, kMEAntiextrap,
  kEMextrap, kEMAntiextrap, kNCTotalextrap, kNCextrap,
  kNCAntiextrap, kMTextrap, kMTAntiextrap, kETextrap,
  kETAntiextrap
}
 
enum  AngleShiftPlane { kAngleShiftXZ, kAngleShiftYZ }
 
enum  EAnaType2017 { kNueAna2017, kNumuAna2017, kJointAna2017 }
 
enum  NusChannel { kNC = 0, kNC, kBG = 1, kBG }
 
enum  UnfoldMethod_t { kIterative, kTikhonov, kSVD, kMaxEnt }
 Enumerator for unfolding methods. TODO: Allow swapping to RooUnfold, TUnfold, etc? More...
 
enum  MECGaussEnhParam {
  kGauss2DNorm, kGauss2DMeanQ0, kGauss2DMeanQ3, kGauss2DSigmaQ0,
  kGauss2DSigmaQ3, kGauss2DCorr, kGauss2DNorm, kGauss2DMeanQ0,
  kGauss2DMeanQ3, kGauss2DSigmaQ0, kGauss2DSigmaQ3, kGauss2DCorr
}
 
enum  MECDoubleGaussEnhParam {
  kGauss2DNorm_1, kGauss2DMeanQ0_1, kGauss2DMeanQ3_1, kGauss2DSigmaQ0_1,
  kGauss2DSigmaQ3_1, kGauss2DCorr_1, kGauss2DNorm_2, kGauss2DMeanQ0_2,
  kGauss2DMeanQ3_2, kGauss2DSigmaQ0_2, kGauss2DSigmaQ3_2, kGauss2DCorr_2,
  kBaseline
}
 
enum  MinosResSuppParam { kMinosResSuppNorm, kMinosResSuppQ0, kMinosResSuppNorm, kMinosResSuppQ0 }
 
enum  MECGaussEnhParam {
  kGauss2DNorm, kGauss2DMeanQ0, kGauss2DMeanQ3, kGauss2DSigmaQ0,
  kGauss2DSigmaQ3, kGauss2DCorr, kGauss2DNorm, kGauss2DMeanQ0,
  kGauss2DMeanQ3, kGauss2DSigmaQ0, kGauss2DSigmaQ3, kGauss2DCorr
}
 
enum  MinosResSuppParam { kMinosResSuppNorm, kMinosResSuppQ0, kMinosResSuppNorm, kMinosResSuppQ0 }
 

Functions

void MakeCutFlowVecs (std::vector< std::string > &NuMu_CutNames, std::vector< Cut > &NuMu_TieredCuts, std::vector< std::string > &Nue_CutNames, std::vector< Cut > &Nue_TieredCuts)
 
const IPredictionGetNuePrediction2020 (std::string decomp, osc::IOscCalculator *calc, bool corrSysts, std::string beam, bool isFakeData, bool GetFromUPS=false, bool minimizeMemory=true, bool NERSC=false)
 
std::pair< Spectrum *, double > GetNueCosmics2020 (std::string beam, bool GetFromUPS=false, bool NERSC=false)
 
SpectrumGetNueData2020 (std::string beam, bool GetFromUPS=false)
 
std::vector< const IPrediction * > GetNumuPredictions2020 (const int nq=4, std::string decomp="noPt", osc::IOscCalculator *calc=DefaultOscCalc(), bool useSysts=true, std::string beam="fhc", bool isFakeData=false, bool GetFromUPS=false, bool minimizeMemory=true, bool NERSC=false)
 
std::vector< std::pair< Spectrum *, double > > GetNumuCosmics2020 (const int nq=4, std::string beam="fhc", bool GetFromUPS=false, bool NERSC=false)
 
std::vector< Spectrum * > GetNumuData2020 (const int nq=4, std::string beam="fhc", bool GetFromUPS=false)
 
std::vector< const ISyst * > GetJointFitSystematicList (bool corrSysts, bool nueExclusive=false, bool numuExclusive=false, bool isFHC=true, bool isRHC=true, bool intersection=true, bool ptExtrap=true)
 
std::vector< std::pair< const ISyst *, const ISyst * > > GetCorrelations (bool isNue, bool isFHC, bool ptExtrap)
 
double GetPOT (bool isFHC=true)
 
double GetLT (bool isFHC=true)
 
std::pair< double, double > GetExposure (bool isFHC=true)
 
std::vector< predictionsLoadPredictions (bool corrSysts=false, bool runOnGrid=false, std::string decomp="", bool nue=true, bool numu=true, bool fhc=true, bool rhc=true, bool NERSC=false)
 
std::vector< Spectrum * > LoadRealData (bool runOnGrid=false, bool nue=true, bool numu=true, bool fhc=true, bool rhc=true)
 
const Var kdistTop ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float y_val=sr->vtx.elastic.vtx.y;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.y;if(tmp > y_val) y_val=tmp;}float dist_to_top=765-y_val;return dist_to_top;})
 
const Var kdistBottom ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float y_val=sr->vtx.elastic.vtx.y;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.y;if(tmp< y_val) y_val=tmp;}float dist_to_bot=y_val+749;return dist_to_bot;})
 
const Var kdistFront ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float z_val=sr->vtx.elastic.vtx.z;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.z;if(tmp< z_val) z_val=tmp;}return z_val;})
 
const Var kdistBack ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float z_val=sr->vtx.elastic.vtx.z;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.z;if(tmp > z_val) z_val=tmp;}return 5962-z_val;})
 
const Var kdistWest ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float x_val=sr->vtx.elastic.vtx.x;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.x;if(tmp< x_val) x_val=tmp;}float dist_to_west=x_val+758;return dist_to_west;})
 
const Var kdistEast ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float x_val=sr->vtx.elastic.vtx.x;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.x;if(tmp > x_val) x_val=tmp;}float dist_to_east=765-x_val;return dist_to_east;})
 
const Cut kSingleSlice ([](const caf::SRProxy *sr){return(sr->hdr.subevt< 2);})
 
const Cut kDiFBasicQuality ([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;return(kApplySecondAnalysisMask(sr)&&kCosRejVeto(sr));})
 
const Cut kLooseCVNeCut ([](const caf::SRProxy *sr){return sr->sel.cvnloosepreselptp.nueid > 0.3;})
 
const Cut kTestSuperLoose_PTP ([](const caf::SRProxy *sr){return(kNumuQuality(sr)&&kNumuContainFD2017(sr)&&sr->sel.remid.pid > 0.2 &&sr->sel.cvnloosepreselptp.numuid > 0.2);})
 
const Cut kTestSuperLoose_Old ([](const caf::SRProxy *sr){return(kNumuQuality(sr)&&kNumuContainFD2017(sr)&&sr->sel.remid.pid > 0.2 &&sr->sel.cvnoldpresel .numuid > 0.2);})
 
const Cut kTestLoose_PTP ([](const caf::SRProxy *sr){return(kNumuQuality(sr)&&kNumuContainFD2017(sr)&&sr->sel.remid.pid > 0.4 &&sr->sel.cvnloosepreselptp.numuid > 0.4);})
 
const Cut kTestLoose_Old ([](const caf::SRProxy *sr){return(kNumuQuality(sr)&&kNumuContainFD2017(sr)&&sr->sel.remid.pid > 0.4 &&sr->sel.cvnoldpresel .numuid > 0.4);})
 
const Cut kTestRelax_PTP ([](const caf::SRProxy *sr){return(kNumuQuality(sr)&&kNumuContainFD2017(sr)&&sr->sel.remid.pid > 0.6 &&sr->sel.cvnloosepreselptp.numuid > 0.6 &&sr->sel.cosrej.numucontpid2020 > 0.45);})
 
const Cut kTestRelax_Old ([](const caf::SRProxy *sr){return(kNumuQuality(sr)&&kNumuContainFD2017(sr)&&sr->sel.remid.pid > 0.6 &&sr->sel.cvnoldpresel .numuid > 0.6 &&sr->sel.cosrej.numucontpid2020 > 0.45);})
 
std::vector< std::pair< Cut, std::string > > BasicPIDPlots_Cuts (bool isFHC, bool isFD, bool isData)
 
std::vector< std::pair< Cut, std::string > > BasicPIDPlots2019_Cuts (bool isFHC, bool isFD, bool isData)
 
void DefaultFormatNue (DataMCComponents &comp, int linestyle=1)
 
const DataMCComponents GetNDCompsFromDecomp (const IDecomp *decomp)
 
const DataMCComponents GetNDDecompsFromDecomp (const IDecomp *decomp)
 
struct DataMCComponents GetFDMCComponents (osc::IOscCalculator *calc, IPrediction *pred_no, TString output_name="nue", int linestyle=1, bool bkgdetails=false)
 
void CompareNDDataOneMC (DataMCComponents h_no, DataMCComponents h_sh, TString plottitle, TString out_name, TString pidtag, AxisType pidaxis, bool printtable=true)
 
void CompareNDDataTwoMC (DataMCComponents hnom, DataMCComponents hplu, DataMCComponents hmin, TString plottitle, TString out_name, TString pidtag, AxisType pidaxis, bool printtable=true, bool decomps=false)
 
const IDecompGetDecomp (IPrediction *prediction, EModExtrapComps modExtrapComp)
 
void CompareNDDataMCFromVector (PredictionSyst3Flavor2020 *predictionSyst, const ISyst *syst, EModExtrapComps modExtrapComp, TString plottitle, TString out_name, TString tag, AxisType pidaxis, bool printtable=true)
 
void CompareOneShiftPred (IPrediction *pred_no, IPrediction *pred_sh, TString plottitle, TString out_name, TString pidtag, bool printtable=true, AxisType pidaxis=kNue1bin, bool PrintParams=false)
 
void CompareTwoShiftPred (IPrediction *pred_no, IPrediction *pred_pl, IPrediction *pred_mi, TString plottitle, TString out_name, TString pidtag, bool printtable=true, AxisType pidaxis=kNue1bin, bool PrintParams=false)
 
void ComparePredictionsFromVector (PredictionSyst3Flavor2020 *predictionSyst, const ISyst *syst, TString plottitle, TString out_name, bool printtable=true, AxisType pidaxis=kNue3bin)
 
double CalcChi2 (TH1 *hmc, TH1 *hdata)
 
TString MakeLatexCommandName (TString mystring)
 
TString FixPlotName (TString mystring)
 
void PrintLatexFigure (TString name, TString plotdir="plots/")
 
void PrintTableHeader (TString ltxcommand="", TString labelcol_style="l", TString bincol_style="| r r r", int nbins=1)
 
void PrintTableFooter ()
 
bool sort_chisq_sig (SystResults a, SystResults b)
 
bool sort_chisq_bkg (SystResults a, SystResults b)
 
bool sort_chisq_tot (SystResults a, SystResults b)
 
void SetVecValues_Diff (SystResults &MyVec, int Ind, double Sig0, double Sig1, double Bkg0, double Bkg1, double Tot0, double Tot1)
 
void SetVecValues_ChiSq (SystResults &MyVec, double Sig0, double Sig1, double Bkg0, double Bkg1, double Tot0, double Tot1)
 
void AddToSummaryV (TString ltxcommand, TString systName, const std::vector< TH1 * > &mcnom, const std::vector< TH1 * > &mcplu, const std::vector< TH1 * > &mcmin)
 
void ComparisonTableOne (const std::vector< TH1 * > &mcnom, const std::vector< TH1 * > &mcshift, const std::vector< TString > &labels, const TString ltxcommand="")
 
void ComparisonTableOneNbins (const std::vector< TH1 * > &mcnom, const std::vector< TH1 * > &mcshift, const std::vector< TString > &labels, TString ltxcommand, AxisType pidaxis)
 
void ComparisonTable (const std::vector< TH1 * > &mcnom, const std::vector< TH1 * > &mcplus, const std::vector< TH1 * > &mcminus, std::vector< TString > labels, TString ltxcommand="")
 
TString FixMeSummary (double number, bool isdiff=true)
 
void MakeSummaryV (TString sample="tot", TString xptype="nxp", bool sorted=false)
 
void ComparisonTableNbins (const std::vector< TH1 * > &mcnom, const std::vector< TH1 * > &mcplus, const std::vector< TH1 * > &mcminus, std::vector< TString > labels, TString ltxcommand="", AxisType pidaxis=kNue3bin)
 
void PrintRawEventCounts (TDirectory *dpred, TString title)
 
void PrintOscilationParameters (osc::IOscCalculator *calc, bool usingdumb)
 
std::string AnaTypeToString (const EAnaType2020 ana)
 
std::vector< const ISyst * > get3FlavorAna2020LargeXsecSysts (const EAnaType2020 ana)
 
void Add3FlavorAna2020XSecSysts (std::vector< const ISyst * > &systs, const EAnaType2020 ana, bool smallgenie)
 
void Add3FlavorAna2020BeamSysts (std::vector< const ISyst * > &systs, const EAnaType2020 ana)
 
void Add3FlavorAna2020CalibSysts (std::vector< const ISyst * > &systs)
 
void Add3FlavorAna2020LightSysts (std::vector< const ISyst * > &systs)
 
void Add3FlavorAna2020FileSysts (std::vector< const ISyst * > &systs)
 
void Add3FlavorAna2020MuEnergySysts (std::vector< const ISyst * > &systs, const EAnaType2020 ana)
 
void Add3FlavorAna2020LeptonAngleSysts (std::vector< const ISyst * > &systs, const bool ptExtrap)
 
void Add3FlavorAna2020NeutronSysts (std::vector< const ISyst * > &systs)
 
void Add3FlavorAna2020NueAcceptSysts (std::vector< const ISyst * > &systs, const EAnaType2020 ana, const BeamType2020 beam, const bool ptExtrap)
 
void Add3FlavorAna2020MichelTagSysts (std::vector< const ISyst * > &systs, const EAnaType2020 ana, const BeamType2020 beam)
 
void Add3FlavorAna2020NotCorrelSysts (std::vector< const ISyst * > &systs, const EAnaType2020 ana, const BeamType2020 beam, const bool ptExtrap)
 
void Add3FlavorAna2020NormSysts (std::vector< const ISyst * > &systs, const BeamType2020 beam)
 
void AddNonLoadable2020Systs (std::vector< const ISyst * > &systs, const EAnaType2020 ana)
 
void Add3FlavorAna2020OtherSysts (std::vector< const ISyst * > &systs, const EAnaType2020 ana, const BeamType2020 beam, const bool ptExtrap)
 
std::vector< const ISyst * > get3FlavorAna2020AllSysts (const EAnaType2020 ana, const bool smallgenie, const BeamType2020 beam, const bool isFit, const bool ptExtrap)
 
std::vector< const ISyst * > get3FlavorAna2020AllCPTSysts (const EAnaType2020 ana, const bool smallgenie, const BeamType2020 beam, const bool isFit, const bool ptExtrap)
 
std::vector< const ISyst * > get3FlavorAna2020SmallXsecSysts (const EAnaType2020 ana)
 
const SummedSystget3FlavorAna2020SummedSmallXsecSysts (const EAnaType2020 ana)
 
std::vector< const ISyst * > getAna2020NueOnly (const BeamType2020 beam, const bool ptExtrap)
 
std::vector< const ISyst * > getAna2020NumuOnly (const BeamType2020 beam)
 
std::vector< const ISyst * > GetSystematics2020 (const TString option)
 
std::vector< ShiDefGetShifts2020 (const TString option)
 
std::vector< SNameDefGetShiftNames2020 (const TString option)
 
void ResetOscCalcToTemplate (osc::IOscCalculatorAdjustable *calc, osc::IOscCalculatorAdjustable *tmp)
 
void ResetOscCalcToDefault (osc::IOscCalculatorAdjustable *calc)
 Reset calculator to default assumptions for all parameters. More...
 
osc::IOscCalculatorAdjustableDefaultOscCalc ()
 Create a new calculator with default assumptions for all parameters. More...
 
void ResetOscCalcToDefaultIH (osc::IOscCalculatorAdjustable *calc)
 
osc::IOscCalculatorAdjustableDefaultOscCalcIH ()
 
void ResetSterileCalcToDefault (osc::OscCalculatorSterile *calc)
 Reset calculator to default assumptions for all parameters. More...
 
osc::OscCalculatorSterileDefaultSterileCalc (int nflavors)
 Create a sterile calculator with default assumptions for all parameters. More...
 
double factorial (int x)
 There doesn't seem to be a standard header for this. Implement our own. More...
 
double PValueToSigma (double p)
 Compute the equivalent number of gaussian sigma for a p-value. More...
 
double CountingExperimentPValue (int N, double b0, double sigma)
 Compute the probability of seeing N or more events. More...
 
double CountingExperimentSigma (int N, double b0, double sigma)
 
double CountingExperimentPValueByLL (int N, double b0, double sigma)
 
double CountingExperimentSigmaByLL (int N, double b0, double sigma)
 
template<class T , class S >
bool printSeparatedValues (std::ostream &output, const std::vector< T > &values, bool firstValuePrinted, S separator, std::function< void(std::ostream &, const T &)> printValue)
 
std::string replaceAll (const std::string &str, const std::string &from, const std::string &to)
 
TString TableNum (float num)
 Format numbers for tables, with two nice digits after decimal. More...
 
std::string AnaTypeToString (const EAnaType2018 ana)
 
std::vector< const ISyst * > getAna2018LargeXsecSysts (const EAnaType2018 ana)
 
void AddJointAna2018XSecSysts (std::vector< const ISyst * > &systs, const EAnaType2018 ana, bool smallgenie)
 
void AddJointAna2018BeamSysts (std::vector< const ISyst * > &systs, const EAnaType2018 ana)
 
void AddJointAna2018FileSysts (std::vector< const ISyst * > &systs, const EAnaType2018 ana, const BeamType2018 beam)
 
void AddJointAna2018NotCorrelSysts (std::vector< const ISyst * > &systs, const EAnaType2018 ana, const BeamType2018 beam)
 
void AddJointAna2018OtherSysts (std::vector< const ISyst * > &systs, const EAnaType2018 ana, const BeamType2018 beam)
 
void AddNonLoadable2018Systs (std::vector< const ISyst * > &systs, const EAnaType2018 ana)
 
void AddWrongSignSysts (std::vector< const ISyst * > &systs, const EAnaType2018 ana)
 
std::vector< const ISyst * > getAllAna2018Systs (const EAnaType2018 ana, const bool smallgenie, const BeamType2018 beam, bool isFit)
 
std::vector< const ISyst * > getAllCPTSysts (const EAnaType2018 ana, const bool smallgenie, const BeamType2018 beam, bool isFit)
 
std::vector< const ISyst * > getAna2018SmallXsecSysts (const EAnaType2018 ana)
 
const SummedSystgetAna2018SummedSmallXsecSysts (const EAnaType2018 ana)
 
std::vector< const ISyst * > getAna2018NueOnly (const BeamType2018 beam)
 
std::vector< const ISyst * > getAna2018NumuOnly (const BeamType2018 beam)
 
void AddJointAna2018NormSysts (std::vector< const ISyst * > &systs, const EAnaType2018 ana=kJointAna2018)
 
void AddNueHistDefShowerND (std::vector< ana::HistDef > &hd)
 
void AddNueHistDefShowerFD (std::vector< HistDef > &hd)
 
void AddNueHistDefVertexND (std::vector< HistDef > &hd)
 
void AddNueHistDefVertexFD (std::vector< HistDef > &hd)
 
void AddNueHistDefShower (std::vector< HistDef > &hd)
 
void AddNueHistDefForLid (std::vector< HistDef > &hd)
 
void AddNueHistDefPIDs (std::vector< HistDef > &hd)
 
void AddNueHistDefConfusion (std::vector< HistDef > &hd)
 
void AddNueHistDefBasic (std::vector< HistDef > &hd)
 
void AddNueHistDefSelectionExtras (std::vector< HistDef > &hd)
 
void AddNueHistDefTruth (std::vector< HistDef > &hd)
 
void AddNueHistDefWeight (std::vector< HistDef > &hd)
 
void AddNueHistDefFinalStatesCvn (std::vector< HistDef > &hd)
 
void AddNueHistDefProngCVN (std::vector< HistDef > &hd)
 
void AddNueHistDefShowerND (std::vector< HistDef > &)
 
void AddNueHistDefForLem (std::vector< HistDef > &)
 
void FillWithDimColor (TH1 *h, bool usealpha)
 
void XAxisDeltaCPLabels (TH1 *axes, bool t2kunits=false)
 Label the x-axis with fractions of pi. More...
 
void Nue2017FourBinDivisions (const int color, const int style)
 
void Nue2017FourBinLabels (const double yNDC, const double textsize, const int color, const bool merged)
 
void Nue2017FourBinAxis (TH1 *axes, bool drawLabels, bool merged)
 
void Nue2018ThreeBinDivisions (bool coreOnly, const int color, const int style)
 
void Nue2018ThreeBinLabels (const double yNDC, const double textsize, const int color, const bool nd)
 
void Nue2018ThreeBinAxis (THStack *axes, bool drawLabels, bool merged, bool coreOnly)
 
void Nue2018ThreeBinAxis (TH1 *axes, bool drawLabels, bool merged, bool coreOnly)
 
void Nue2018ThreeBinDivisions_Reduced (bool coreOnly, const int color, const int style)
 
void Nue2018ThreeBinLabels_Reduced (const double yNDC, const double textsize, const int color, const bool nd)
 
void Nue2018ThreeBinAxis_Reduced (TH1 *axes, bool drawLabels, bool merged, bool coreOnly)
 
void Nue2018ThreeBinAxis_Reduced (THStack *axes, bool drawLabels, bool merged, bool coreOnly)
 
TH1 * RemoveBins (TH1 *h, bool sum)
 
TGraphAsymmErrors * PlotErrorBand (TH1 *&center, TH1 *&nom, std::vector< TH1 * > &ups, std::vector< TH1 * > &dns, int col, int errCol)
 
std::vector< const ISyst * > GetSystematics2018 (const TString option)
 
std::vector< ShiDefGetShifts2018 (const TString option)
 
std::vector< SNameDefGetShiftNames2018 (const TString option)
 
void AddNumuHistDefND (std::vector< HistDef > &hd)
 
void AddNumuMultiHistDefND (std::vector< MultiHistDef > &hd)
 
void AddNumuHistDefFD (std::vector< HistDef > &hd)
 
void AddNumuMultiHistDefFD (std::vector< MultiHistDef > &hd)
 
void AddNumuHistDefPIDs (std::vector< HistDef > &hd)
 
void AddNumuHistDefCosRej (std::vector< HistDef > &hd)
 
void AddNumuHistDefBasic (std::vector< HistDef > &hd)
 
void AddNumuHistDefSliceTruth (std::vector< HistDef > &hd)
 
void AddNumuHistDefNuTruth (std::vector< NuTruthHistDef > &hd)
 
void AddNumuHistDefWeight (std::vector< HistDef > &hd)
 
void AddNumuHistDefProngCVN (std::vector< HistDef > &hd)
 
void AddNumuHistDefBPF (std::vector< HistDef > &hd)
 
void AddNumuHistDefKalman (std::vector< HistDef > &hd)
 
void AddNumuHistDefReMId (std::vector< HistDef > &hd)
 
void AddNumuHistDefEnergy (std::vector< HistDef > &hd)
 
void AddNumuHistDefProng (std::vector< MultiHistDef > &hd)
 
void AddNumuHistDefLeftovers (std::vector< HistDef > &hd)
 
void AddNumuHistDefMultiVar (std::vector< MultiHistDef > &hd)
 
std::vector< HistDefgetAllNumuProd4NDHistDef ()
 
std::vector< HistDefgetAllNumuProd4FDHistDef ()
 
std::vector< HistDefgetAllNumuProd5NDHistDef ()
 
std::vector< NuTruthHistDefgetAllNumuProd5NDNuTruthHistDef ()
 
std::vector< MultiHistDefgetAllNumuProd5NDMultiHistDef ()
 
std::vector< HistDefgetAllNumuProd5FDHistDef ()
 
std::vector< NuTruthHistDefgetAllNumuProd5FDNuTruthHistDef ()
 
std::vector< MultiHistDefgetAllNumuProd5FDMultiHistDef ()
 
void AddNusHistDefAna01Basic (std::vector< HistDef > &hd)
 
void AddNusHistDefTruth (std::vector< HistDef > &hd)
 
void AddNusHistDefFDExtra (std::vector< HistDef > &hd)
 
void AddNusHistDefTrack (std::vector< HistDef > &hd)
 
std::vector< HistDefgetAllNusAna01NDHistDefs ()
 
std::vector< HistDefgetAllNusAna01FDHistDefs ()
 
IPredictionGetPrediction (NusSystsPredType pred_type, const HistAxis *axis, const HistAxis *numu_axis, const Cut *fd_cut, const Cut *nd_cut, const Cut *numu_cut, const SystShifts *shift_data, const SystShifts *shift_mc, const Var *weight, Loaders *loaders, Loaders *loaders_nd)
 
TH1 * GetSpectrum (IPrediction *pred, bool signal, double pot)
 
std::string MakeLatexCommandName (const std::string &instring)
 
std::string MakeLatexCommandName (std::string instring)
 
TH1 * DataMCComparison (const Spectrum &data, const Spectrum &mc, EBinType bintype)
 
TH1 * DataMCComparison (const Spectrum &data, const IPrediction *mc, osc::IOscCalculator *calc, const SystShifts &shifts, EBinType bintype)
 
TH1 * DataMCComparisonAreaNormalized (const Spectrum &data, const Spectrum &mc)
 
TH1 * DataMCComparisonAreaNormalized (const Spectrum &data, const IPrediction *mc, osc::IOscCalculator *calc)
 
TH1 * DataMCComparisonComponents (const Spectrum &data, const IPrediction *mc, osc::IOscCalculator *calc)
 Plot MC broken down into flavour components, overlayed with data. More...
 
void DataMCRatio (const Spectrum &data, const IPrediction *mc, osc::IOscCalculator *calc, double miny=0, double maxy=3)
 Plot data/MC ratio for the given spectrum. Normalize MC to Data by POT. More...
 
void DataMCRatio (const Spectrum &data, const Spectrum &mc, double miny=0, double maxy=3)
 Plot data/MC ratio for the given spectrum. Normalize MC to Data by POT. More...
 
void DataMCAreaNormalizedRatio (const Spectrum &data, const IPrediction *mc, osc::IOscCalculator *calc, double miny=0, double maxy=3)
 Plot data/MC ratio for the given spectrum. Normalize MC to Data by area. More...
 
void DataMCAreaNormalizedRatio (const Spectrum &data, const Spectrum &mc, double miny=0, double maxy=3)
 Plot data/MC ratio for the given spectrum. Normalize MC to Data by area. More...
 
void RatioPlot (const Spectrum &data, const Spectrum &expected, const Spectrum &fit, double miny=0, double maxy=1.2)
 Plot data/expected, compared with fit/expected. More...
 
void GetSystBands (osc::IOscCalculator *calc, IPrediction *pred, std::vector< const ISyst * > systs, std::vector< TH1 * > &hUps, std::vector< TH1 * > &hDns, double pot)
 
void GetBFSystBands (osc::IOscCalculator *calc, IPrediction *pred, std::vector< const ISyst * > systs, const SystShifts &bfshifts, std::vector< TH1 * > &hUps, std::vector< TH1 * > &hDns, double pot)
 
TGraphAsymmErrors * PlotWithSystErrorBand (IPrediction *pred, const std::vector< const ISyst * > &systs, osc::IOscCalculator *calc, double pot, int col=-1, int errCol=-1, float headroom=1.3, bool newaxis=true, EBinType bintype=kBinContent)
 Plot prediction with +/-1sigma error band. More...
 
TGraphAsymmErrors * PlotWithSystErrorBand (const Spectrum &nominal, const std::vector< Spectrum > &upShifts, const std::vector< Spectrum > &downShifts, double pot, int col=-1, int errCol=-1, float headroom=1.3, bool newaxis=true, EBinType bintype=kBinContent)
 Plot prediction with error band. More...
 
TGraphAsymmErrors * PlotWithSystErrorBand (TH1 *&nom, std::vector< TH1 * > &ups, std::vector< TH1 * > &dns, int col, int errCol, float headroom, bool newaxis)
 
void PlotWithAreaSystErrorBand (IPrediction *pred, const std::vector< const ISyst * > &systs, osc::IOscCalculator *calc, double pot, int col=-1, int errCol=-1, float headroom=1.3, bool newaxis=true, EBinType bintype=kBinContent)
 Plot prediction with +/-1sigma shape-only error band. More...
 
void PlotWithAreaSystErrorBand (const Spectrum &nominal, std::vector< Spectrum > upShifts, std::vector< Spectrum > downShifts, double pot, int col=-1, int errCol=-1, float headroom=1.3, bool newaxis=true, EBinType bintype=kBinContent)
 Plot prediction with error band where syst(s) is (are) shape-only. More...
 
void PlotWithSystErrorBandTwoPreds (const Spectrum &nominal, const std::vector< Spectrum > &upShifts, const std::vector< Spectrum > &downShifts, const Spectrum &nominal2, const std::vector< Spectrum > &upShifts2, const std::vector< Spectrum > &downShifts2, double pot, int col=-1, int errCol=-1, float headroom=1.3, bool newaxis=true, EBinType bintype=kBinContent)
 Plot two different predictions with +/-1sigma shape-only error bands. More...
 
TGraphAsymmErrors * PlotWithSystErrorBand_Quant (const int quant, IPrediction *pred, const std::vector< const ISyst * > &systs, osc::IOscCalculator *calc, double pot, int col, int errCol, float maxy, bool newaxis)
 
TGraphAsymmErrors * PlotWithSystErrorBand_Quant (const int quant, const Spectrum &nominal, const std::vector< Spectrum > &upShifts, const std::vector< Spectrum > &downShifts, double pot, int col, int errCol, float maxy, bool newaxis)
 
TGraphAsymmErrors * PlotWithSystErrorBand_Quant (const int quant, TH1 *&nom, std::vector< TH1 * > &ups, std::vector< TH1 * > &dns, int col, int errCol, float maxy, bool newaxis)
 
THStack * ToTHStack (const std::vector< std::pair< const Spectrum &, Color_t >> &s, double pot)
 Can call like ToTHStack({{h1, kRed}, {h2, kBlue}}, pot) More...
 
double PointDistanceToBox (double x, double y, double x0, double y0, double x1, double y1)
 Helper for AutoPlaceLegend. More...
 
TLegend * AutoPlaceLegend (double dx, double dy, double yPin=-1)
 Create a legend, maximizing distance from all histograms. More...
 
void ErrorBarChart (const std::map< std::string, std::pair< double, double >> &systErrors, const std::pair< double, double > &statErr=std::make_pair(0., 0.), const std::string &label="Error")
 Make a simple plot of relative size of different errors. More...
 
void CountingExperimentErrorBarChart (const std::map< std::string, double > &systs, double statErr=0, bool bkgdOrSig=false, bool shortchart=false)
 Make a simple plot of relative size of different errors. More...
 
TGraphAsymmErrors * GraphWithPoissonErrors (const TH1 *h, bool noErrorsXaxis=false, bool drawEmptyBins=true)
 Calculate statistical errors appropriate for small Poisson numbers. More...
 
TGraph * graphAsymmErrorScaled (TH1 *histScaled, TH1 *hist, double overallScale)
 
TGraph * graphAsymmErrorWithBkgScaled (TH1 *data, TH1 *bkgd, double overallScale)
 
TGraph * RatioAsymmError (TH1 *data, TH1 *pred)
 
TGraph * RatioAsymmErrorScaled (TH1 *data, TH1 *pred, double overallScale)
 
TGraph * RatioAsymmErrorWithBkg (TH1 *data, TH1 *pred, TH1 *bkgd)
 
TGraph * RatioAsymmErrorWithBkgScaled (TH1 *data, TH1 *pred, TH1 *bkgd, double overallScale)
 
TGraph * ShadeBetweenHistograms (TH1 *hmin, TH1 *hmax)
 
TGraphAsymmErrors * ProfileQuantile (const TH2 *hist, const std::string &axis_name, const std::string &graph_name="", const std::pair< double, double > &quantile_divisions={0.159, 0.841})
 Calculate profile with error bars corresponding to specified quantiles of a 2D distribution (by default, 68% coverage) More...
 
void drawBFSingle (double bfSin, double bfDm, Color_t color, Style_t marker, double size)
 Draw a single BF point. More...
 
void drawBFMirror (double bfSin, double bfDm, Color_t color, Style_t marker, double size)
 Draw best fit at both octants. Truth for neutrinos, not sure about antineutrinos. More...
 
void MakeHistCanvasReady_Quant (const int quant, TH1 *hist, double ymax)
 
void PimpHist (TH1 *hist, Style_t linestyle, Color_t linecolor, int linewidth, Style_t markerstyle, Color_t markercolor, double markersize)
 Pimp histogram once and for all. More...
 
void SplitCanvas (double ysplit, TPad *&p1, TPad *&p2)
 Split the current pad into two vertically stacked pieces, suitable for ratio plots and so on. More...
 
void SplitCanvasQuant (TCanvas *&canvas, TPad *&pad1, TPad *&pad2, TPad *&pad3, TPad *&pad4)
 
void CenterTitles (TH1 *histo)
 
bool SortSystsName (const ISyst *systA, const ISyst *systB)
 
TH1 * PlotSystShifts (const SystShifts &shifts, bool sortName)
 
TGraph * JoinGraphs (TGraph *a, TGraph *b, int fillcol=0)
 Join graphs and set a fill color. Useful for contours. More...
 
TGraph * ExtendGraphToTop (TGraph *g, int col, double xmin, double xmax, double y)
 
TPaveText * DrawBeamLabel (bool isFHC=true)
 Put the standardized beam label in the left corner of the active canvas. More...
 
TPaveText * DrawQuantLabel (int quant)
 
const std::string ECAFTypeToString (ECAFType type)
 
void AddHistDefRecoND (std::vector< HistDef > &hd)
 
void AddMultiHistDefRecoND (std::vector< MultiHistDef > &hd)
 
void AddHistDefTruthND (std::vector< HistDef > &hd)
 
void AddHistDefRecoFD (std::vector< HistDef > &hd)
 
void AddMultiHistDefRecoFD (std::vector< MultiHistDef > &hd)
 
void AddHistDefTruthFD (std::vector< HistDef > &hd)
 
void AddHistDefSlice (std::vector< HistDef > &hd)
 
void AddHistDefSliceTruth (std::vector< HistDef > &hd)
 
void AddNTHistDef (std::vector< NuTruthHistDef > &hd)
 
void AddNTHistDefND (std::vector< NuTruthHistDef > &hd)
 
void AddNTHistDefFD (std::vector< NuTruthHistDef > &hd)
 
void AddHistDefWeights (std::vector< HistDef > &hd)
 
void AddMultiHistDefProng (std::vector< MultiHistDef > &hd)
 
void AddHistDefProngCVN (std::vector< HistDef > &hd)
 
void AddHistDefPIDs (std::vector< HistDef > &hd)
 
void AddHistDefNumuND (std::vector< HistDef > &hd)
 
void AddHistDefNumuFD (std::vector< HistDef > &hd)
 
void AddHistDefNumuMuon (std::vector< HistDef > &hd)
 
void AddHistDefNumuRecoE (std::vector< HistDef > &hd)
 
void AddHistDefNumuNDDataMC (std::vector< HistDef > &hd)
 
void AddHistDefNueND (std::vector< HistDef > &hd)
 
void AddHistDefNueFD (std::vector< HistDef > &hd)
 
void AddHistDefNueShower (std::vector< HistDef > &hd)
 
void AddHistDefNueLID (std::vector< HistDef > &hd)
 
void AddHistDefNuePID (std::vector< HistDef > &hd)
 
void AddHistDefNueEnergy (std::vector< HistDef > &hd)
 
void AddHistDefNueSelectionExtras (std::vector< HistDef > &hd)
 
void AddHistDefNueDataMC (std::vector< HistDef > &hd)
 
void AddHistDefNusND (std::vector< HistDef > &hd)
 
void AddHistDefNusFD (std::vector< HistDef > &hd)
 
void AddHistDefXSecND (std::vector< HistDef > &hd)
 
void AddHistDefXSecFD (std::vector< HistDef > &hd)
 
void SetPaletteBlueRedWhite ()
 
void SetPaletteBlueRedCyclic ()
 
void SetPaletteWhiteBlueDark ()
 
void SetPaletteFernandaSunset ()
 
void SetPaletteLiudmilaViolet ()
 
void SetPaletteHeroBlue ()
 
void SetPaletteFlamenco ()
 
void SetPaletteErikaTeal ()
 
Binning TrueEnergyBins ()
 Default true-energy bin edges. More...
 
Binning TrueLOverTrueEBins ()
 Default trueL Over true-energy bin edges. More...
 
std::function< ExposureFunc_tCombineExposures (const std::function< ExposureFunc_t > &a, const std::function< ExposureFunc_t > &b)
 
Cut CutFromNuTruthCut (const NuTruthCut &stc)
 
void gdb_backtrace ()
 
void handle_terminate ()
 
void handle_signal (int sig, siginfo_t *, void *)
 
template<class T , class U >
void MakeTextListFileHelper (const T &source, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< U > &floatVars, const std::vector< U > &intVars, const SpillCut *spillCut)
 
void MakeTextListFile (const std::string &wildcard, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const std::vector< const Var * > &intVars, const SpillCut *spillCut=0)
 Make a file listing all the events passing the specified cut. More...
 
void MakeTextListFile (const std::vector< std::string > &fnames, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const std::vector< const Var * > &intVars, const SpillCut *spillCut=0)
 Make a file listing all the events passing the specified cut. More...
 
void MakeTextListFile (const std::string &wildcard, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const MultiVar * > &multivars={}, const SpillCut *spillCut=0)
 Make a file listing multi-var values. More...
 
template<class T >
void MakeEventListFileHelper (const T &source, const std::vector< Cut > &cuts, const std::vector< std::string > &outputs, bool includeSliceIndex, bool includeSliceTime, bool includeCycleNumber, const SpillCut *spillCut, bool includeBatchNumber)
 
void MakeEventListFile (const std::string &wildcard, const std::vector< Cut > &cuts, const std::vector< std::string > &outputs, bool includeSliceIndex=false, bool includeSliceTime=false, bool includeCycleNumber=false, const SpillCut *spillCut=0, bool includeBatchNumber=false)
 Make a set of files listing all the events passing cuts One output file is created for each cut in the cuts vector. More...
 
void MakeEventListFile (const std::vector< std::string > &fnames, const std::vector< Cut > &cuts, const std::vector< std::string > &outputs, bool includeSliceIndex=false, bool includeSliceTime=false, bool includeCycleNumber=false, const SpillCut *spillCut=0, bool includeBatchNumber=false)
 Make a set of files listing all the events passing cuts One output file is created for each cut in the cuts vector. More...
 
void MakeEventListFile (const std::string &wildcard, const Cut &cut, const std::string &output, bool includeSliceIndex=false, bool includeSliceTime=false, bool includeCycleNumber=false, const SpillCut *spillCut=0, bool includeBatchNumber=false)
 Make a file listing all the events passing the specified cut. More...
 
void MakeEventListFile (const std::vector< std::string > &fnames, const Cut &cut, const std::string &output, bool includeSliceIndex=false, bool includeSliceTime=false, bool includeCycleNumber=false, const SpillCut *spillCut=0, bool includeBatchNumber=false)
 Make a set of files listing all the events passing cuts One output file is created for each cut in the cuts vector. More...
 
void MakeEventTTreeFile (const std::string &wildcard, const std::string &output, const std::vector< std::pair< std::string, Cut >> &cuts, const std::vector< std::pair< std::string, Var >> &floatVars, const std::vector< std::pair< std::string, Var >> &intVars={}, const SpillCut *spillCut=0)
 Make a ROOT file listing all the events passing the specified cut. More...
 
void MakeTextListFile (const std::string &wildcard, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const SpillCut *spillCut=0)
 
void MakeTextListFile (const std::vector< std::string > &fnames, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const SpillCut *spillCut=0)
 
void ClearMultiNuInfo (caf::StandardRecord *sr)
 
void ClearPrimaryInfo (caf::StandardRecord *sr)
 
void ClearMichelTruthInfo (caf::StandardRecord *sr)
 
void ReduceForNueDecaf (caf::StandardRecord *sr)
 
void ReduceForNusDecaf (caf::StandardRecord *sr)
 
void ReduceForNumuDecaf (caf::StandardRecord *sr)
 
void ClearReweightInfo (caf::StandardRecord *sr)
 
void ClearKalmanInfo (caf::StandardRecord *sr)
 
void ClearCosmicTrackInfo (caf::StandardRecord *sr)
 
void ClearWindowTrackInfo (caf::StandardRecord *sr)
 
void ClearDiscreteTrackInfo (caf::StandardRecord *sr)
 
void ClearTrackInfo (caf::StandardRecord *sr)
 
void ClearSecondaryTrackInfo (caf::StandardRecord *sr)
 
void ClearElasticArmsInfo (caf::StandardRecord *sr)
 
void ClearProngInfo (caf::StandardRecord *sr)
 2D and 3D More...
 
void Clear2DProngInfo (caf::StandardRecord *sr)
 
void ClearHoughVertexInfo (caf::StandardRecord *sr)
 
void ResetBeamInfo (caf::StandardRecord *sr)
 
void ResetNumuEnergy (caf::StandardRecord *sr)
 
void ResetBPFEnergy (caf::StandardRecord *sr)
 
void ResetLEMInfo (caf::StandardRecord *sr)
 
void ResetLIDInfo (caf::StandardRecord *sr)
 
void ResetRVPInfo (caf::StandardRecord *sr)
 
void ResetCosRejInfo (caf::StandardRecord *sr)
 
void ResetNueCosRejInfo (caf::StandardRecord *sr)
 
void ResetContainInfo (caf::StandardRecord *sr)
 
void ResetNueEnergyInfo (caf::StandardRecord *sr)
 
void ClearKalman2DInfo (caf::StandardRecord *sr)
 
void ClearShowerLIDRecoInfo (caf::StandardRecord *sr)
 
void ClearShowerLIDPIDInfo (caf::StandardRecord *sr)
 
TGraph * MakeGraph (const std::string &wildcard, const Cut &cut, const Var &VarX, const Var &VarY, const SpillCut *spillCut=0)
 Get a graph with two variables when a histogram is not the best choice. More...
 
MultiVar GetMultiDVarHelper (const std::vector< MultiVar > &vars, const std::vector< Binning > &bins)
 Overloaded version specific for MultiVars (plumbing is different) More...
 
HistAxis HistAxisFromNuTruthHistAxis (NuTruthHistAxis ntha, double _default)
 
template<typename T >
T GetMultiDVarHelper (const std::vector< T > &vars, const std::vector< Binning > &bins)
 
stan::math::var StanExp (const stan::math::var &x)
 
stan::math::var StanLog (const stan::math::var &x)
 
template<>
std::unique_ptr< osc::IOscCalculatorLoadFrom< osc::IOscCalculator > (TDirectory *dir)
 
template<>
std::unique_ptr< osc::IOscCalculatorAdjustableLoadFrom< osc::IOscCalculatorAdjustable > (TDirectory *dir)
 
template<>
void SaveTo (const osc::IOscCalculator &x, TDirectory *dir)
 
template<class T >
std::unique_ptr< TLoadFrom (TDirectory *dir)
 
template<>
std::unique_ptr< IDecompLoadFrom< IDecomp > (TDirectory *dir)
 
template<>
std::unique_ptr< IExtrapLoadFrom< IExtrap > (TDirectory *dir)
 
template<>
std::unique_ptr< IPredictionLoadFrom< IPrediction > (TDirectory *dir)
 
template<>
std::unique_ptr< IExperimentLoadFrom< IExperiment > (TDirectory *dir)
 
template<>
std::unique_ptr< ModularExtrapComponentLoadFrom< ModularExtrapComponent > (TDirectory *dir)
 
template<>
std::unique_ptr< IBkgdEstimatorLoadFrom< IBkgdEstimator > (TDirectory *dir)
 
template<class T >
void SaveTo (const T &x, TDirectory *dir)
 
template<class T >
std::unique_ptr< TLoadFromFile (TFile *fin, const std::string &label)
 
template<class T >
std::unique_ptr< TLoadFromFile (const std::string &fname, const std::string &label)
 
template<class T >
void SaveToFile (const T &x, const std::string &fname, const std::string &label)
 
MultiVar MultiVar2D (const MultiVar &a, const Binning &binsa, const MultiVar &b, const Binning &binsb)
 
MultiVar MultiVar2D (const MultiVar &a, int na, double a0, double a1, const MultiVar &b, int nb, double b0, double b1)
 
Ratio operator/ (const Spectrum &lhs, const Spectrum &rhs)
 
template<class T , class U >
void ProjectionX (T *from, U *to)
 Helper for Unweighted. More...
 
template<class T , class U >
void ProjectionY (T *from, U *to)
 Helper for WeightingVariable. More...
 
template<class T , class U >
void WeightedByHelper (const T *from, const TH1 *ws, U *to)
 
template<class T >
void ReweightByRecoRatioHelper (T *hist, const TH1 *ws)
 
template<class T >
void ReweightByTrueRatioHelper (T *hist, const TH1D *ws)
 
template<class T >
void ReweightToTrueSpectrumHelper (T *hist, TH1D *hcorr)
 
template<class T >
void ReweightToRecoSpectrumHelper (T *hist, TH1D *hcorr)
 
unsigned int PeriodFromRunFD (int run)
 : Helper function to compute the period given a run number for the FD. More...
 
unsigned int PeriodFromRunND (int run)
 : Helper function to compute the period given a run number for the ND. More...
 
Spectrum operator* (const Ratio &lhs, const Spectrum &rhs)
 
VarOscWeight (osc::IOscCalculator *calc)
 
stan::math::var LogLikelihood (const std::vector< stan::math::var > &exp, const TH1 *obs)
 Variant that handles the prediction in the form of Stan vars. More...
 
std::vector< SystShiftsGetSystShiftsMultiverse (const std::vector< std::pair< const ISyst *, SystMode > > systConfigs, const int nUniverses, const int seed)
 
std::string UniqueName ()
 Return a different string each time, for creating histograms. More...
 
std::unique_ptr< TMatrixDCalcCovMx (const std::vector< TArrayD * > &binSets, int firstBin=0, int lastBin=-1)
 Compute bin-to-bin covariance matrix from a collection of sets of bin contents. More...
 
double LogLikelihood (const TH1 *exp, const TH1 *obs, bool useOverflow=false)
 The log-likelihood formula from the PDG. More...
 
double LogLikelihoodDerivative (double e, double o, double dedx)
 
double LogLikelihoodDerivative (const TH1D *eh, const TH1D *oh, const std::vector< double > &dedx)
 
double Chi2CovMx (const TVectorD *e, const TVectorD *o, const TMatrixD *covmxinv)
 
double Chi2CovMx (const TH1 *e, const TH1 *o, const TMatrixD *covmxinv)
 
TH2F * ExpandedHistogram (const std::string &title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax)
 
std::unique_ptr< TMatrixDSymmMxInverse (const TMatrixD &mx)
 
TH1D * MakeTH1D (const char *name, const char *title, const Binning &bins)
 
TH1F * MakeTH1F (const char *name, const char *title, const Binning &bins)
 
TH2D * MakeTH2D (const char *name, const char *title, const Binning &binsx, const Binning &binsy)
 
TH2F * MakeTH2F (const char *name, const char *title, const Binning &binsx, const Binning &binsy)
 
TH3D * MakeTH3D (const char *name, const char *title, const Binning &binsx, const Binning &binsy, const Binning &binsz)
 
TH2 * ToTH2 (const Spectrum &s, double exposure, ana::EExposureType expotype, const Binning &binsx, const Binning &binsy, ana::EBinType bintype)
 
TH2 * ToTH2 (const Ratio &r, const Binning &binsx, const Binning &binsy)
 
TH2 * ToTH2Helper (std::unique_ptr< TH1 > h1, const Binning &binsx, const Binning &binsy, ana::EBinType bintype)
 
TH3 * ToTH3 (const Spectrum &s, double exposure, ana::EExposureType expotype, const Binning &binsx, const Binning &binsy, const Binning &binsz, ana::EBinType bintype)
 
TH3 * ToTH3 (const Ratio &r, const Binning &binsx, const Binning &binsy, const Binning &binsz)
 
TH3 * ToTH3Helper (std::unique_ptr< TH1 > h1, const Binning &binsx, const Binning &binsy, const Binning &binsz, ana::EBinType bintype)
 
std::vector< std::string > Wildcard (const std::string &wildcardString)
 
std::string FindPackageDir (std::string Dir)
 
std::string FindCAFAnaDir ()
 
std::vector< std::string > LoadFileList (const std::string &listfile)
 
std::map< std::string, std::string > GetCAFMetadata (TDirectory *dir)
 
void CombineMetadata (std::map< std::string, std::string > &base, const std::map< std::string, std::string > &add, std::set< std::string > &mask)
 
void WriteCAFMetadata (TDirectory *dir, const std::map< std::string, std::string > &meta)
 
TVector3 NuMIBeamDirection (caf::Det_t det)
 
bool RunningOnGrid ()
 
size_t JobNumber ()
 
bool SAMDefinitionExists (const std::string &def)
 
bool AlmostEqual (double a, double b)
 
std::string pnfs2xrootd (std::string loc, bool unauth)
 
std::size_t Hash (const std::vector< std::size_t > &vals)
 
std::size_t Hash (const caf::SRSpillProxy *sr)
 
std::size_t Hash (const caf::SRProxy *sr)
 
template<typename T , typename U , typename std::enable_if_t< std::is_convertible_v< double, T > &&std::is_convertible_v< double, U >, int > = 0>
decltype(T(0)-U(0)) LogLikelihood (T exp, U obs)
 The log-likelihood formula for a single bin. More...
 
template<class T >
double ValHelper (const GenericVar< T > &v, const std::string &op, double c, const T *sr)
 
template<class T >
void ValHelper (const GenericVar< T > &va, const GenericVar< T > &vb, const std::string &op, const T *sr, double &a, double &b)
 
 COMPARISON (>, Greater)
 
 COMPARISON (>=, GreaterEquals)
 
 COMPARISON (<, Less)
 
 COMPARISON (<=, LessEquals)
 
 COMPARISON (==, Equals)
 
 COMPARISON (!=, NotEquals)
 
template<class T >
GenericVar< TVar2D (const GenericVar< T > &a, const Binning &binsa, const GenericVar< T > &b, const Binning &binsb)
 Variable formed from two input variables. More...
 
template<class T >
GenericVar< TVar2D (const GenericVar< T > &a, int na, double a0, double a1, const GenericVar< T > &b, int nb, double b0, double b1)
 Variable formed from two input variables. More...
 
template Var Var2D (const Var &, const Binning &, const Var &, const Binning &)
 
template Var Var2D (const Var &, int, double, double, const Var &, int, double, double)
 
template<class T >
GenericVar< TVar3D (const GenericVar< T > &a, const Binning &binsa, const GenericVar< T > &b, const Binning &binsb, const GenericVar< T > &c, const Binning &binsc)
 This is just like a Var2D, but useful for 3D Spectra. More...
 
template<class T >
GenericVar< TVar3D (const GenericVar< T > &a, int na, double a0, double a1, const GenericVar< T > &b, int nb, double b0, double b1, const GenericVar< T > &c, int nc, double c0, double c1)
 This is just like a Var2D, but useful for 3D Spectra. More...
 
template Var Var3D (const Var &, const Binning &, const Var &, const Binning &, const Var &, const Binning &)
 
template Var Var3D (const Var &, int, double, double, const Var &, int, double, double, const Var &, int, double, double)
 
Var Scaled (const Var &v, double s)
 Use to rescale another variable. More...
 
Var Constant (double c)
 Use to weight events up and down by some factor. More...
 
Var Sqrt (const Var &v)
 Use to take sqrt of a var. More...
 
Var VarFromNuTruthVar (const NuTruthVar &stv, double _default)
 
template<class T >
GenericCut< Toperator> (double c, const GenericVar< T > &v)
 
template<class T >
GenericCut< Toperator< (double c, const GenericVar< T > &v)
 
template<class T >
GenericCut< Toperator>= (double c, const GenericVar< T > &v)
 
template<class T >
GenericCut< Toperator<= (double c, const GenericVar< T > &v)
 
template<class T >
GenericCut< Toperator!= (double c, const GenericVar< T > &v)
 
std::pair< int, intcalcFirstLastLivePlane (int plane, std::bitset< 14 > binary, caf::Det_t det)
 
bool PassesPreselFunc (const caf::SRProxy *sr)
 Helper for kPassesPresel. More...
 
bool kNue2017BasicPartFunc (const caf::SRProxy *sr)
 
const Cut kNue2017BasicPart (kNue2017BasicPartFunc)
 
bool kNue2018PeripheralPreselFunc (const caf::SRProxy *sr)
 
bool kNue2018CVNVsCosPIDFunc (const caf::SRProxy *sr)
 
bool kNue2018FDPeripheralFunc (const caf::SRProxy *sr)
 Use this cut for the full FD Peripheral sample, the same for RHC and FHC. More...
 
const Cut kNue2018PeripheralPresel (kNue2018PeripheralPreselFunc)
 
const Cut kNue2018CVNVsCosPID (kNue2018CVNVsCosPIDFunc)
 
const Cut kNue2018FDPeripheral (kNue2018FDPeripheralFunc)
 
const HistAxis kNue2018Axis ("NuE Energy / Analysis Bin", kNue2018Binning, kNue2018AnaBin)
 Use this Axis for Ana2018, official Axis. More...
 
bool kNue2020CVN_VsCosPIDFunc (const caf::SRProxy *sr)
 
bool kNue2020FDPeripheralFunc (const caf::SRProxy *sr)
 Use this cut for the full FD Peripheral sample, the same for RHC and FHC. More...
 
bool kNue2020FDPeripheralFunc_MRBrem (const caf::SRProxy *sr)
 
const Cut kNue2020CVN_VsCosPID (kNue2020CVN_VsCosPIDFunc)
 
const Cut kNue2020FDPeripheral (kNue2020FDPeripheralFunc)
 
const Cut kNue2020FDPeripheral_MRBrem (kNue2020FDPeripheralFunc_MRBrem)
 
double ZFrontPosition (int diblock)
 
double ZEndPosition (int diblock)
 
Cut k2018PIDs (double bdtCut, double remidCut, double cvnCut)
 
Cut OverlayCutFromNuTruthCut (const NuTruthCut stc)
 
const TVector3 ovtxmin (-180,-180, 25)
 
const TVector3 ovtxmax (180, 180, 1150)
 
const TVector3 ovtxminLoose (-220,-220, 0)
 
const TVector3 ovtxmaxLoose (220, 220, 1150)
 
int PeriodFromHeader (const caf::SRHeaderProxy &hdr)
 
int PeriodFromNeutrino (const caf::SRNeutrinoProxy *truth)
 
const SpillCut kStandardDQCuts_FD_Prod4Motivated (Prod4DQFailCheck{})
 
TH2 * MakeQuantileHistogram (SpectrumLoader &loader, const HistAxis &independentAxis, const HistAxis &quantileAxis, const Cut &cut, const SpillCut &spillCut, const SystShifts &shift, const Var &wei)
 Returns a TH2D with xAxis as independentAxis and yAxis as quantileAxis Quantiles in yAxis can be calculated from this using ana::GetQuantileBins. More...
 
std::vector< std::vector< double > > GetQuantileBins (TH2 *quantileHist, const HistAxis &independentAxis, const HistAxis &quantileAxis, const unsigned int &numQuantiles, const bool verbose)
 Returns a 2D vector First index is the independentAxis bin number Second index is the high bin edge for a quantile [i][j-1] is jth quantile's low edge for ith independentAxis bin [i][j] is jth quantile's high edge for ith independentAxis bin. More...
 
std::vector< std::vector< double > > GetQuantileBins (SpectrumLoader &loader, const HistAxis &independentAxis, const HistAxis &quantileAxis, const Cut &cut, const unsigned int &numQuantiles, const SpillCut &spillCut, const SystShifts &shift, const Var &wei, const bool verbose)
 Returns a 2D vector First index is the independentAxis bin number Second index is the high bin edge for a quantile [i][j-1] is jth quantile's low edge for ith independentAxis bin [i][j] is jth quantile's high edge for ith independentAxis bin. More...
 
const Cut QuantileCut (const std::vector< std::vector< double >> &quantileBins, const HistAxis &independentAxis, const HistAxis &quantileAxis, const unsigned int &quantile)
 Returns a Cut that will only pass events falling into a particular quantile of quantileAxis, where quantiles have been calculated for each independentAxis bin Quantiles have been precalculated in 'quantileBins' (number of quantiles, bin edges etc.) More...
 
std::vector< CutQuantileCuts (SpectrumLoader &loader, const HistAxis &independentAxis, const HistAxis &quantileAxis, const Cut &cut, const unsigned int &numQuantiles, const SpillCut &spillCut, const SystShifts &shift, const Var &wei, const bool verbose)
 Returns a vector of Cuts, each one for a different quantile An individual cut will only pass events falling into a particular quantile of quantileAxis, where quantiles have been calculated for each independentAxis bin. More...
 
std::vector< CutQuantileCutsFromTH2 (TH2 *quantileHist, const HistAxis &independentAxis, const HistAxis &quantileAxis, const unsigned int &numQuantiles, const bool verbose)
 : Do the same as the QuantileCuts function but taking in the TH2 instead of making it. More...
 
std::vector< CutQuantileAndPIDCutsFromTH2 (TH2 *quantileHist, const HistAxis &independentAxis, const HistAxis &quantileAxis, const unsigned int &numQuantiles, const bool rhc, const bool verbose)
 
std::vector< CutGetNumuEhadFracQuantCuts2020 (const bool isRHC, const unsigned int nquants)
 
std::vector< CutGetNumuPtQuantCuts2020 (const bool isRHC, const unsigned int ehad_quant, const unsigned int nquants)
 
std::vector< CutGetNueQuantCuts2020 (const bool isRHC, const caf::Det_t det, const unsigned int nquants, const ExtrapVar var)
 
void CleanSpillQualityInfo (caf::SRSpill *spill, const caf::SRSpillProxy *spillProxy)
 
Cut CVNVetoOverlapWindowCut (int tlo, int thi)
 Apply a time window plus additionally cut the 1usec at the start/end of CVNVeto windows, while correctly computing livetime. More...
 
Cut WindowCut_FD_MR (int tlo, int thi)
 
const Cut kIsSig (CCFlavSel(12, 14))
 Select CC $ \nu_\mu\to\nu_e $. More...
 
const Cut kIsNumuCC (CCFlavSel(14, 14))
 Select CC $ \nu_\mu\to\nu_\mu $. More...
 
const Cut kIsBeamNue (CCFlavSel(12, 12))
 Select CC $ \nu_e\to\nu_e $. More...
 
const Cut kIsNumuApp (CCFlavSel(14, 12))
 Select CC $ \nu_e\to\nu_\mu $. More...
 
const Cut kIsTauFromMu (CCFlavSel(16, 14))
 Select CC $ \nu_\mu\to\nu_\tau $. More...
 
const Cut kIsTauFromE (CCFlavSel(16, 12))
 Select CC $ \nu_e\to\nu_\tau $. More...
 
const Var kNueCVNProngBin ([](const caf::SRProxy *sr){if(!kCutCVNProngMaxProtonScore(sr)) return float(0.5);else return float(1.5);return float(-1.5);})
 
const AtmConstraintT2KAtmConstraint ()
 Constraint from T2K's Oct 31, 2014 paper, arXiv 1410.1532v1. More...
 
const AtmConstraintMINOSAtmConstraint ()
 
const Dmsq32Constraint kDmsq32ConstraintPDG2015 (2.44e-3, 0.06e-3, 2.49e-3, 0.06e-3)
 
const Dmsq32Constraint kDmsq32ConstraintPDG2017 (2.45e-3, 0.05e-3, 2.52e-3, 0.05e-3)
 
const Dmsq32Constraint kDmsq32ConstraintPDG2019 (2.444e-3, 0.034e-3, 2.55e-3, 0.04e-3)
 
const ReactorExperimentDayaBayConstraint2014 ()
 A ReactorExperiment initialized with the Nu2014 Daya Bay constraints. More...
 
const ReactorExperimentWorldReactorConstraint2015 ()
 Weighted average of all experiments as of first nue paper writing. More...
 
const ReactorExperimentWorldReactorConstraint2016 ()
 Updated value for SecondAna based on the latest PDG. More...
 
const ReactorExperimentWorldReactorConstraint2017 ()
 Reactor constraint from PDG 2017. More...
 
const ReactorExperimentReactorConstraintNuFit2018nu ()
 Reactor constraint from NuFit 4.0 2018 CPT nu. More...
 
const ReactorExperimentReactorConstraintNuFit2018bar ()
 Reactor constraint from NuFit 4.0 2018 CPT bar. More...
 
const ReactorExperimentWorldReactorConstraint2019 ()
 Reactor constraint from PDG 2019. More...
 
const SolarConstraints kSolarConstraintsPDG2017 (7.53e-5, 0.18e-5, 0.851, 0.020)
 
const SolarConstraintsNu kSolarConstraintsNuFit2018nu (7.39e-5, 0.21e-5, 0.856, 0.020)
 
const SolarConstraintsNubar kSolarConstraintsNuFit2018bar (7.39e-5, 0.21e-5, 0.856, 0.020)
 
const Ssth23Constraint kSsth23ConstraintNumu2016 (0.406, 0.029, 0.022, 0.621, 0.022, 0.029)
 
const Ssth23Constraint kSsth23ConstraintPDG2015 (0.514, 0.055, 0.056)
 
const Ssth23Constraint kSsth23ConstraintMinos2014 (0.41, 0.26/1.64, 0.06/1.64)
 
const Ssth23Constraint kSsth23ConstraintPDG2017 (0.51, 0.04, 0.04)
 
const Cut kNCBeamNue (NCFlavSel(12, 12))
 Select NC $ \nu_e\to\nu_e $. More...
 
const Cut kNCNueApp (NCFlavSel(12, 14))
 Select NC $ \nu_\mu\to\nu_e $. More...
 
const Cut kNCBeamNumu (NCFlavSel(14, 14))
 Select NC $ \nu_\mu\to\nu_\mu $. More...
 
const Cut kNCNumuApp (NCFlavSel(14, 12))
 Select NC $ \nu_e\to\nu_\mu $. More...
 
const Cut kNCTauFromMu (NCFlavSel(16, 14))
 Select NC $ \nu_\mu\to\nu_\tau $. More...
 
const Cut kNCTauFromE (NCFlavSel(16, 12))
 Select NC $ \nu_e\to\nu_\tau $. More...
 
double SimpleFOM (const Spectrum &obs, const Spectrum &unosc, double pot=0)
 Figure-of-merit with no systematics, for binned data. More...
 
TGraph * Profile (const IExperiment *expt, osc::IOscCalculatorAdjustable *calc, const IFitVar *v, int nbinsx, double minx, double maxx, double minchi=-1, const std::vector< const IFitVar * > &profVars={}, const std::vector< const ISyst * > &profSysts={}, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systsSeedPts={}, std::map< const IFitVar *, TGraph * > &profVarsMap=empty_vars_map, std::map< const ISyst *, TGraph * > &systsMap=empty_syst_map, MinuitFitter::FitOpts opts=MinuitFitter::kNormal)
 $\chi^2$ scan in one variable, profiling over all others More...
 
TGraph * SqrtProfile (const IExperiment *expt, osc::IOscCalculatorAdjustable *calc, const IFitVar *v, int nbinsx, double minx, double maxx, double minchi=-1, std::vector< const IFitVar * > profVars={}, std::vector< const ISyst * > profSysts={}, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systsSeedPts={}, std::map< const IFitVar *, TGraph * > &profVarsMap=empty_vars_map, std::map< const ISyst *, TGraph * > &systsMap=empty_syst_map, MinuitFitter::FitOpts opts=MinuitFitter::kNormal)
 Forward to Profile but sqrt the result for a crude significance. More...
 
TGraph * Slice (const IExperiment *expt, osc::IOscCalculatorAdjustable *calc, const IFitVar *v, int nbinsx, double minx, double maxx, double minchi=-1, MinuitFitter::FitOpts opts=MinuitFitter::kNormal)
 $\chi^2$ scan in one variable, holding all others constant More...
 
TGraph * SqrtSlice (const IExperiment *expt, osc::IOscCalculatorAdjustable *calc, const IFitVar *v, int nbinsx, double minx, double maxx, double minchi=-1, MinuitFitter::FitOpts opts=MinuitFitter::kNormal)
 Forward to Slice but sqrt the result for a crude significance. More...
 
TGraph * FindValley (const IExperiment *expt, osc::IOscCalculatorAdjustable *calc, const IFitVar &scanVar, const IFitVar &fitVar, int nbinsx, double xmin, double xmax, const std::vector< const IFitVar * > &profVars={}, const std::vector< const ISyst * > &profSysts={}, const SeedList &seedPts=SeedList(), const std::vector< SystShifts > &systsSeedPts={}, bool transpose=false, MinuitFitter::FitOpts opts=MinuitFitter::kNormal)
 Find the minimum in one variable as a function of another. More...
 
std::vector< double > FindCurveCrossings (TH1 *h, double critVal)
 Intended for use on the output of Profile. More...
 
TH2 * Gaussian68Percent2D (const FrequentistSurface &s)
 Up-value surface for 68% confidence in 2D in gaussian approximation. More...
 
TH2 * Gaussian90Percent2D (const FrequentistSurface &s)
 Up-value surface for 90% confidence in 2D in gaussian approximation. More...
 
TH2 * Gaussian95Percent2D (const FrequentistSurface &s)
 Up-value surface for 95% confidence in 2D in gaussian approximation. More...
 
TH2 * Gaussian2Sigma2D (const FrequentistSurface &s)
 Up-value surface for 2 sigma confidence in 2D in gaussian approximation. More...
 
TH2 * Gaussian99Percent2D (const FrequentistSurface &s)
 Up-value surface for 99% confidence in 2D in gaussian approximation. More...
 
TH2 * Gaussian3Sigma2D (const FrequentistSurface &s)
 Up-value surface for 3 sigma confidence in 2D in gaussian approximation. More...
 
TH2 * Gaussian68Percent1D (const FrequentistSurface &s)
 Up-value surface for 68% confidence in 1D in gaussian approximation. More...
 
TH2 * Gaussian90Percent1D (const FrequentistSurface &s)
 Up-value surface for 90% confidence in 1D in gaussian approximation. More...
 
TH2 * Gaussian95Percent1D (const FrequentistSurface &s)
 Up-value surface for 95% confidence in 1D in gaussian approximation. More...
 
TH2 * Gaussian2Sigma1D (const FrequentistSurface &s)
 Up-value surface for 2 sigma confidence in 1D in gaussian approximation. More...
 
TH2 * Gaussian99Percent1D (const FrequentistSurface &s)
 Up-value surface for 99% confidence in 1D in gaussian approximation. More...
 
TH2 * Gaussian3Sigma1D (const FrequentistSurface &s)
 Up-value surface for 3 sigma confidence in 1D in gaussian approximation. More...
 
TH2 * Flat (double level, const ISurface &s)
 Helper function for the gaussian approximation surfaces. More...
 
stan::math::var PriorUniformInFitVar (const stan::math::var &, const osc::IOscCalculatorAdjustableStan *)
 Prior uniform in the variable that is being fitted. More...
 
stan::math::var UniformTh23Prior_FitSS2Th23 (const stan::math::var &ss2th23, const osc::IOscCalculatorAdjustableStan *)
 Prior uniform in theta_23 for use when fitting sin^2(2*theta_23). More...
 
stan::math::var UniformTh23Prior_FitSSTh23 (const stan::math::var &ssth23, const osc::IOscCalculatorAdjustableStan *)
 Prior uniform in theta_23 for use when fitting sin^2(theta_23) More...
 
SeedList RefineSeeds (const SeedList &seeds, const IExperiment *expt, const std::vector< const IFitVar * > &vars, const osc::IOscCalculatorAdjustable *calc, double dchisq_max=-1)
 Refine an initial list of seeds by exploring stats-only fits. More...
 
std::ostream & operator<< (std::ostream &os, const Seed &seed)
 
std::ostream & operator<< (std::ostream &os, const SeedList &seeds)
 
bool operator< (StanConfig::Verbosity a, StanConfig::Verbosity b)
 Allow for comparing them, since kQuiet is definitely "less" verbose than kVerbose. More...
 
bool operator> (StanConfig::Verbosity a, StanConfig::Verbosity b)
 
SystShifts GetShift (TString systName, double sigma)
 
void ComparisonTable (std::vector< TH1 * > mcnom, std::vector< TH1 * > mcshift, std::vector< TString > labels, TString ltxcommand="")
 
void ComparisonTable (std::vector< TH1 * > mcnom, std::vector< TH1 * > mcplus, std::vector< TH1 * > mcminus, std::vector< TString > labels, TString ltxcommand="")
 
void FixLegend (TLegend *leg, TString opt="default")
 
TLegend * DefaultNueLegend (bool sig=true, bool tot=true, bool data=false, double x1=kLegendDefaultX1, double y1=kLegendDefaultY1, double x2=kLegendDefaultX2, double y2=kLegendDefaultY2)
 
TLegend * CustomLegend (std::vector< TH1 * >h, std::vector< bool >isdata, std::vector< TString >title, double x1=kLegendDefaultX1, double y1=kLegendDefaultY1, double x2=kLegendDefaultX2, double y2=kLegendDefaultY2)
 
TCanvas * ExPIDPlot (std::vector< TH1 * > topHistos, std::vector< TString > topOption)
 
TCanvas * RatioPlot (std::vector< TH1 * > topHistos, std::vector< TString > topOption, std::vector< TH1 * > bottomHistos, std::vector< TString > bottomOption, TString pidtag, bool pidaxis=false)
 
void PlotDataMC (std::vector< TH1 * >vnom, std::vector< bool >isdata, TLegend *leg, TString pidtag="", TString htag="", TString out_name="plot_FD", bool ratioplot=false, bool ratioerrors=false, bool pidaxis=0)
 
void PlotNDDataTotalMCComparison (TH1 *hdata, std::vector< TH1 * > htots, TLegend *leg, TString pidtag="", TString out_name="plot_nd", bool ratioplot=false, bool pidaxis=false)
 
void PlotMCComponentsComparison (std::vector< TH1 * >vnom, std::vector< TH1 * >vshi, TLegend *leg, TString pidtag="", TString out_name="plot_nd", bool ratioplot=false, bool ratioerrors=false, bool pidaxis=0)
 
void CompareNDDataMC (TDirectory *d_no, TDirectory *d_sh, TString plottitle, TString out_name, TString pidtag, bool printtable=true, bool pidaxis=0)
 
void ComparePredictions (IPrediction *pred_no, IPrediction *pred_sh, TString plottitle, TString out_name, TString pidtag, bool printtable=true, bool pidaxis=false)
 
void FormatErrorBand (TH1 *hplus, TH1 *hminus, bool signal=false, bool fixbins=false)
 
void PlotMCComponentsErrorBand (std::vector< TH1 * >vnom, std::vector< TH1 * >vshi, TLegend *leg, TString pidtag="", TString out_name="plot_nd", bool ratioplot=false, bool ratioerrors=false, bool pidaxis=0)
 
struct NueMCComponents GetNDMCComponents (TDirectory *d_no, double kNDPOT, int linestyle=1)
 
void CompareNDDataMC (TDirectory *d_no, TDirectory *d_pl, TDirectory *d_mi, TString plottitle, TString out_name, TString pidtag, bool printtable=true, bool pidaxis=0)
 
struct NueMCComponents GetFDMCComponents (IPrediction *pred_no, int linestyle=1)
 
TString Latexify (TString s)
 
void ComparePredictions (IPrediction *pred_no, IPrediction *pred_pl, IPrediction *pred_mi, TString plottitle, TString out_name, TString pidtag, bool printtable=true, bool pidaxis=false)
 
void MakeNueSystematicsFile (IPrediction *pred_no, IPrediction *pred_sh, TString pid, TString sigma, TFile *nue_syst_file)
 
const Cut kW_TL ([](const caf::SRProxy *sr){bool IsTrue=(sr->trk.kalman.tracks[0].start.X()< XCent && sr->trk.kalman.tracks[0].start.Y() > YCent);return IsTrue;})
 
const Cut kW_TR ([](const caf::SRProxy *sr){bool IsTrue(sr->trk.kalman.tracks[0].start.X() > XCent && sr->trk.kalman.tracks[0].start.Y() > YCent);return IsTrue;})
 
const Cut kW_BL ([](const caf::SRProxy *sr){bool IsTrue(sr->trk.kalman.tracks[0].start.X()< XCent && sr->trk.kalman.tracks[0].start.Y()< YCent);return IsTrue;})
 
const Cut kW_BR ([](const caf::SRProxy *sr){bool IsTrue(sr->trk.kalman.tracks[0].start.X() > XCent && sr->trk.kalman.tracks[0].start.Y()< YCent);return IsTrue;})
 
const Var kKalFwdCell ([](const caf::SRProxy *sr){return sr->sel.contain.kalfwdcell;})
 
const Var kKalBakCell ([](const caf::SRProxy *sr){return sr->sel.contain.kalbakcell;})
 
const Var kMaxKalYPos ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return std::max(sr->trk.kalman.tracks[0].start.Y()/100, sr->trk.kalman.tracks[0].stop.Y()/100);})
 
const Var kMaxKalZPos ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return std::max(sr->trk.kalman.tracks[0].start.Z()/100, sr->trk.kalman.tracks[0].stop.Z()/100);})
 
const Var kScattTrLen ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float)((float) sr->sel.cosrej.scatt/(float) sr->trk.kalman.tracks[0].len);})
 
const Var kMinCellEdg ([](const caf::SRProxy *sr){return std::min((sr->sel.contain.kalfwdcell+sr->sel.contain.kalbakcell), (sr->sel.contain.cosfwdcell+sr->sel.contain.cosbakcell));})
 
const Var kRatOfKalHi ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float)((float) sr->trk.kalman.tracks[0].nhit/(float) sr->slc.nhit);})
 
const Var kSANumuContPID ([](const caf::SRProxy *sr){return sr->sel.cosrej.numuSAcontpid;})
 
const Var kFirstCell ([](const caf::SRProxy *sr){return sr->slc.firstcell;})
 
const Var kLastCell ([](const caf::SRProxy *sr){return sr->slc.lastcell;})
 
const Var kVisESlc ([](const caf::SRProxy *sr){return sr->slc.calE;})
 
const Var kNHitSlc ([](const caf::SRProxy *sr){return sr->slc.nhit;})
 
const Var kEnPHSlc ([](const caf::SRProxy *sr){if(sr->slc.nhit< 1) return-10.0f;return(float)(sr->slc.calE)/(float)(1.78 *sr->slc.nhit);})
 
const Var kVisETrk ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float) sr->trk.kalman.tracks[0].calE;})
 
const Var kNHitTrk ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float) sr->trk.kalman.tracks[0].nhit;})
 
const Var kEnPHTrk ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float)(sr->trk.kalman.tracks[0].calE)/(float)(1.78 *sr->trk.kalman.tracks[0].nhit);})
 
const Var kVisEHad ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float)(sr->slc.calE-sr->trk.kalman.tracks[0].calE);})
 
const Var kNHitHad ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float)(sr->slc.nhit-sr->trk.kalman.tracks[0].nhit);})
 
const Var kEnPHHad ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;return(float)(sr->slc.calE-sr->trk.kalman.tracks[0].calE)/(float)(1.78 *(sr->slc.nhit-sr->trk.kalman.tracks[0].nhit));})
 
const Var kTrkLenXY ([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks< 1) return-10.0f;float XLen=(sr->trk.kalman.tracks[0].start.X()-sr->trk.kalman.tracks[0].stop.X())/100;float YLen=(sr->trk.kalman.tracks[0].start.Y()-sr->trk.kalman.tracks[0].stop.Y())/100;return XLen-YLen;})
 
const Var kTrueHFrE ([](const caf::SRProxy *sr){float HadE=kTrueHadE(sr);float TruE=kTrueE(sr);return(HadE/TruE);})
 
double CalcPrimE (const caf::SRProxy *sr, int WhPDG, bool GetUncontE)
 
const Var kNeutrinoEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=sr->mc.nu[0].E;return ThisEn;})
 
const Var kTotUncontEn ([](const caf::SRProxy *sr){float TotEn=0.0;for(unsigned int PrimL=0;PrimL< sr->mc.nu[0].prim.size();++PrimL){TotEn+=sr->mc.nu[0].prim[PrimL].totEscE;} std::cout<< "Energy "<< TotEn<< " Run "<< sr->hdr.run<< ", SubRun "<< sr->hdr.subrun<< ", Cycle "<< sr->hdr.cycle<< ", Batch "<< sr->hdr.batch<< ", Event "<< sr->hdr.evt<< ", Slice "<< sr->hdr.subevt<< std::endl;return TotEn;})
 
const Var kMuonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 13, false);return ThisEn;})
 
const Var kUncontMuonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 13, true);return ThisEn;})
 
const Var kNeutronEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2112, false);return ThisEn;})
 
const Var kUncontNeutronEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2112, true);return ThisEn;})
 
const Var kProtonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2212, false);return ThisEn;})
 
const Var kUncontProtonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 2212, true);return ThisEn;})
 
const Var kPionEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 211, false);return ThisEn;})
 
const Var kUncontPionEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 211, true);return ThisEn;})
 
const Var kPi0En ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 111, false);return ThisEn;})
 
const Var kUncontPi0En ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 111, true);return ThisEn;})
 
const Var kPhotonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 22, false);return ThisEn;})
 
const Var kUncontPhotonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 22, true);return ThisEn;})
 
const Var kKaonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 321, false);return ThisEn;})
 
const Var kUncontKaonEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 321, true);return ThisEn;})
 
const Var kElectronEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 11, false);return ThisEn;})
 
const Var kUncontElectronEn ([](const caf::SRProxy *sr){float ThisEn=0.;ThisEn=CalcPrimE(sr, 11, true);return ThisEn;})
 
const Var kNuMinusAll ([](const caf::SRProxy *sr){return kNeutrinoEn(sr)-kMuonEn(sr)-kNeutronEn(sr)-kProtonEn(sr)-kPionEn(sr)-kPi0En(sr)-kPhotonEn(sr)-kKaonEn(sr)-kElectronEn(sr);})
 
const Var kUncontMiscEn ([](const caf::SRProxy *sr){return kTotUncontEn(sr)-kUncontMuonEn(sr)-kUncontNeutronEn(sr)-kUncontProtonEn(sr)-kUncontPionEn(sr)-kUncontPi0En(sr)-kUncontPhotonEn(sr)-kUncontKaonEn(sr)-kUncontElectronEn(sr);})
 
double CalcFracE (const caf::SRProxy *sr, int WhPDG, bool GetUncontE, bool UncontOverTotal=false)
 
const Var kTotUncontEnFrac ([](const caf::SRProxy *sr){if(sr->mc.nu[0].E<=0.0) return-5.0;else return(kTotUncontEn(sr)/sr->mc.nu[0].E);})
 
const Var kMuonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 13, false);})
 
const Var kUncontMuonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 13, true);})
 
const Var kUncontMuonEnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 13, true, true);})
 
const Var kNeutronEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 2112, false);})
 
const Var kUncontNeutronEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 2112, true);})
 
const Var kUncontNeutronEnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 2112, true, true);})
 
const Var kProtonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 2212, false);})
 
const Var kUncontProtonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 2212, true);})
 
const Var kUncontProtonEnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 2212, true, true);})
 
const Var kPionEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 211, false);})
 
const Var kUncontPionEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 211, true);})
 
const Var kUncontPionEnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 211, true, true);})
 
const Var kPi0EnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 111, false);})
 
const Var kUncontPi0EnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 111, true);})
 
const Var kUncontPi0EnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 111, true, true);})
 
const Var kPhotonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 22, false);})
 
const Var kUncontPhotonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 22, true);})
 
const Var kUncontPhotonEnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 22, true, true);})
 
const Var kKaonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 321, false);})
 
const Var kUncontKaonEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 321, true);})
 
const Var kUncontKaonEnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 321, true, true);})
 
const Var kElectronEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 11, false);})
 
const Var kUncontElectronEnFrac ([](const caf::SRProxy *sr){return CalcFracE(sr, 11, true);})
 
const Var kUncontElectronEnFracTot ([](const caf::SRProxy *sr){return CalcFracE(sr, 11, true, true);})
 
const Var kNNeutrons ([](const caf::SRProxy *sr){float NPar=0.;if(DEBUGGING){std::cout<< "\nLooking at event "<< sr->hdr.evt<< ", there are "<< sr->mc.nu.size()<< ", the 0th neutrino is a "<< sr->mc.nu[0].pdg<< ", with Energy "<< sr->mc.nu[0].E<< ". There were a total of "<< sr->mc.nu[0].prim.size()<< " other primaries associated with that neutrino, "<< sr->mc.nu[0].nneutron<< " were neutrons."<< std::endl;if(kIsDytmanMEC(sr)) std::cout<< " The neutrino was a MEC"<< std::endl;else if(kIsDIS(sr)) std::cout<< " The neutrino was a DIS"<< std::endl;else if(kIsRes(sr)) std::cout<< " The neutrino was a Resonance"<< std::endl;else if(kIsCoh(sr)) std::cout<< " The neutrino was a Coherent"<< std::endl;float TotEn=0.0;for(unsigned int PrimL=0;PrimL< sr->mc.nu[0].prim.size();++PrimL){std::cout<< "\t\tLooking at Prim "<< PrimL<< " of "<< sr->mc.nu[0].prim.size()<< ", it was a "<< sr->mc.nu[0].prim[PrimL].pdg<< ", VisE "<< sr->mc.nu[0].prim[PrimL].visE<< ", VisEInslc "<< sr->mc.nu[0].prim[PrimL].visEinslc<< ", E0 "<< sr->mc.nu[0].prim[PrimL].p.E<< ", enteringE "<< sr->mc.nu[0].prim[PrimL].enteringE<< ", totEscE "<< sr->mc.nu[0].prim[PrimL].totEscE<< std::endl;TotEn+=sr->mc.nu[0].prim[PrimL].totEscE;}std::cout<< "\tThe total uncontained energy was "<< TotEn<< std::endl;NPar=sr->mc.nu[0].nneutron;}return NPar;})
 
const Var kNProtons ([](const caf::SRProxy *sr){float NPar=0.;NPar=sr->mc.nu[0].nproton;return NPar;})
 
const Var kNPions ([](const caf::SRProxy *sr){float NPar=0.;NPar=sr->mc.nu[0].npiplus+sr->mc.nu[0].npiminus;return NPar;})
 
const Var kNPi0s ([](const caf::SRProxy *sr){float NPar=0.;NPar=sr->mc.nu[0].npizero;return NPar;})
 
std::vector< std::string > MakeUnblindList ()
 
const std::vector< std::string > fnamefardata_unblind (MakeUnblindList())
 
std::vector< std::string > MakeNumiUnblindList ()
 
std::string StringFromInt (int i, bool withE20)
 Helper function that takes an integer and turns it into a string. More...
 
std::string StringFromDouble (double pot)
 
void SqrtError (TH1 *nom)
 Set the errors of the input histogram to be their square roots. More...
 
void ZeroError (TH1 *nom)
 Set the errors of the input histogram to 0. More...
 
void AddErrorInQuadrature (TH1 *nom, TH1 *up, bool use_max)
 
void AddErrorInQuadrature (TH1 *nom, TH1 *up, TH1 *down, bool use_max)
 
TH1 * GetNC (IDecomp *specs, double POT)
 
TH1 * GetNC (IPrediction *specs, double POT)
 
TH1 * GetBG (IDecomp *specs, double POT)
 
TH1 * GetBG (IPrediction *specs, double POT)
 
void InitializeSystText (FILE *text, strings strs)
 Print some initial text about a systematic – the systematic type and sample. More...
 
void LoadMaps (TDirectory *dir, std::map< std::string, IDecomp * > *nominal, std::map< std::string, std::map< std::string, std::map< int, IDecomp * > > > *shifted)
 
void LoadMaps (TDirectory *dir, std::map< std::string, PredictionNoExtrap * > *nominal, std::map< std::string, std::map< std::string, std::map< int, PredictionNoExtrap * > > > *shifted)
 
void LoadMaps (TDirectory *dir, std::map< std::string, PredictionSterile * > *nominal, std::map< std::string, std::map< std::string, std::map< int, PredictionSterile * > > > *shifted)
 
void PlotMultiSyst (TH1 *h, std::vector< TH1 * > hp, TDirectory *out, FILE *text, strings strs)
 Plot multiple systematics. More...
 
void PlotSyst (TH1 *h, TH1 *hp1, TH1 *hm1, TH1 *hp2, TH1 *hm2, TDirectory *out, FILE *text, strings strs)
 
void PlotMultiSyst (TH1 *nom, std::vector< IDecomp * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotMultiSyst (TH1 *nom, std::vector< PredictionNoExtrap * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotMultiSyst (TH1 *nom, std::vector< PredictionSterile * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 Plot multiple systematics. More...
 
void PlotSyst (TH1 *nom, std::map< int, IDecomp * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSyst (TH1 *nom, std::map< int, PredictionNoExtrap * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSyst (TH1 *nom, std::map< int, PredictionSterile * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSystBand (TH1 *h, TDirectory *out, FILE *text, strings strs)
 
void SaveMaps (TDirectory *out, std::map< std::string, IDecomp * > decomps_nominal, std::map< std::string, std::map< std::string, std::map< int, IDecomp * > > > decomps_shifted, std::map< std::string, PredictionNoExtrap * > predsNE_nominal, std::map< std::string, std::map< std::string, std::map< int, PredictionNoExtrap * > > > predsNE_shifted, std::map< std::string, PredictionSterile * > predsSt_nominal, std::map< std::string, std::map< std::string, std::map< int, PredictionSterile * > > > predsSt_shifted)
 Save all of the objects in the input maps to the out directory/file. More...
 
TLatex * DrawLatexLines (double x, double y, std::string sPOT)
 Draw common TLatex lines. More...
 
void DrawLineArrow (double cut, bool left, TH1 *h)
 
void SetHistOptions (TH1 *h, double max, std::string title, int ndiv, Color_t col, bool fill)
 Set common options for a TLegend. More...
 
void SetLegendOptions (TLegend *leg)
 Set common options for a TLegend. More...
 
void PlotStack (Spectrum spectra[], TDirectory *rootOut, FILE *textOFS, std::string name, std::string det, double POT, double potEquiv, PlotOptions opt, Spectrum *dataspec)
 
void PlotSpectra (Spectrum spectra[], TDirectory *rootOut, FILE *textOFS, std::string name, std::string title, std::string det, int POT, std::string option)
 
void PlotSpectra (Spectrum spectraND[], Spectrum spectraFD[], Spectrum spectraSt[], Spectrum spectraUn[], TDirectory *rootOut, FILE *textOFS, std::string name, std::string title, int POT, std::string option)
 Make canvases for ND, FD with 3 flavor osc, FD with 4 flavor osc, FD with no osc. More...
 
void PlotSpectra (Spectrum spectraND[], Spectrum spectraFD[], Spectrum spectraFS[], TDirectory *rootOut, FILE *textOFS, std::string name, std::string title, int POT, std::string option)
 Make canvases for ND, FD with 3 flavor orsc, FD with 4 flavor osc. More...
 
void PlotSpectra (IDecomp *decomp, IPrediction *predFD, osc::IOscCalculator *calc, IPrediction *predSt, osc::IOscCalculator *calcst, Spectrum sCos, TDirectory *rootOut, FILE *textOFS, std::string name, std::string title, int POT, std::string option)
 
void PlotSpectra (IDecomp *decomp, IPrediction *predFD, Spectrum sCos, TDirectory *rootOut, FILE *textOFS, std::string name, std::string title, int POT, std::string option)
 
void PlotSpectra (IPrediction *predFD, Spectrum sCos, osc::IOscCalculator *calc, TDirectory *rootOut, FILE *textOFS, std::string name, std::string title, int POT, std::string option)
 Make canvas for FD with 3 flavor osc directly from CAFAna object inputs. More...
 
void PlotPurEff (Spectrum pureff[], Spectrum effcyD[], TDirectory *out, std::string name, std::string title)
 
void PlotPurEff (Spectrum pureffND[], Spectrum effcyDND[], Spectrum pureffFD[], Spectrum effcyDFD[], Spectrum pureffFS[], Spectrum effcyDFS[], TDirectory *out, std::string name, std::string title)
 Plot pur/eff for ND, FD assuming 3 flavor osc, FD assuming 4 flavor osc. More...
 
void Make2DFrom1D (Spectrum spectra[], const Binning &binsX, const Binning &binsY, TDirectory *rootOut, std::string name, std::string det, std::string labelX, std::string labelY, std::string option)
 
void Make2DFrom1D (Spectrum spectraND[], Spectrum spectraFD[], Spectrum spectraFS[], const Binning &binsX, const Binning &binsY, TDirectory *rootOut, std::string name, std::string labelX, std::string labelY, std::string option)
 Create output for 'pseudo-2D spectra' at ND, FD with 3 flavor osc, FD with 4 flavor osc. More...
 
void AddErrorInQuadrature (TH1 *nom, TH1 *up1, TH1 *down1, TH1 *up2, TH1 *down2, bool use_max=false)
 
void LoadMaps (TDirectory *dir, std::map< std::string, NDPredictionSterile * > *nominal, std::map< std::string, std::map< std::string, std::map< int, NDPredictionSterile * > > > *shifted)
 
void LoadMaps (TDirectory *dir, std::map< std::string, FDPredictionSterile * > *nominal, std::map< std::string, std::map< std::string, std::map< int, FDPredictionSterile * > > > *shifted)
 
void PlotSyst (TH1 *h, TH1 *hp1, TDirectory *out, FILE *text, strings strs)
 
void PlotSyst (TH1 *h, TH1 *hp1, TH1 *hm1, TDirectory *out, FILE *text, strings strs)
 
void PlotSyst (TH1 *nom, TH1 *hup, TH1 *hdn, TH1 *hsx, TDirectory *rootOUT, FILE *textOFS, strings strs)
 
void PlotMultiSyst (TH1 *nom, std::vector< NDPredictionSterile * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 Plot multiple systematics. More...
 
void PlotMultiSyst (TH1 *nom, std::vector< FDPredictionSterile * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 Plot multiple systematics. More...
 
void PlotSyst (TH1 *nom, IPrediction *shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSyst (TH1 *nom, std::map< int, IPrediction * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSyst (TH1 *nom, std::map< int, NDPredictionSterile * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSyst (TH1 *nom, std::map< int, FDPredictionSterile * > shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void SaveMaps (TDirectory *out, std::map< std::string, NDPredictionSterile * > predsND_nominal, std::map< std::string, std::map< std::string, std::map< int, NDPredictionSterile * > > > predsND_shifted)
 
void SaveMaps (TDirectory *out, std::map< std::string, FDPredictionSterile * > predsFD_nominal, std::map< std::string, std::map< std::string, std::map< int, FDPredictionSterile * > > > predsFD_shifted)
 
void SaveMaps (TDirectory *out, std::map< std::string, PredictionSterile * > preds_nominal, std::map< std::string, std::map< std::string, std::map< int, PredictionSterile * > > > preds_shifted)
 
std::vector< std::string > MakeCosOutOfTimeList ()
 
const std::vector< std::string > fnameblind_concat (MakeCosOutOfTimeList())
 
const Cut kNDTruthFull ([](const caf::SRProxy *sr){if(sr->hdr.ismc==false){return true;}if(sr->mc.nnu< 1){return false;}if(sr->mc.nu[0].vtx.X()< NDL){return false;}if(sr->mc.nu[0].vtx.X() > NDR){return false;}if(sr->mc.nu[0].vtx.Y()< NDB){return false;}if(sr->mc.nu[0].vtx.Y() > NDT){return false;}if(sr->mc.nu[0].vtx.Z()< NDF){return false;}double NDM=1587.;if(sr->mc.nu[0].vtx.Z() > NDM){return false;}if(sr->mc.nu[0].vtx.Z() > NDE){double MCT=(2./3.)*(NDT-NDB)+NDB;if(sr->mc.nu[0].vtx.Y() > MCT){return false;}}return true;})
 
void PlotSyst (TH1 *nom, IDecomp *shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSyst (TH1 *nom, PredictionNoExtrap *shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
void PlotSyst (TH1 *nom, PredictionSterile *shifts, TDirectory *out, FILE *text, strings strs, double POT, bool NC, bool use_max)
 
std::string getNue2018PredFile (std::string beam, bool IsRealNDData=true)
 
std::string getNumu2018PredFile (std::string beam, bool IsRealNDData=true)
 
std::string getNumu2018PredVar (std::string extrap, int quant)
 
std::string getNue2018PredVar (std::string extrap, int sigma=0)
 
const NumuExtrapGenerator kNumuCCExtrap (kNumuCCAxis, kNumuFD, kNumuND)
 
const NumuExtrapGenerator kNumuQEExtrap (kNumuQEAxis, kNumuQEFD, kNumuQEND)
 
const NumuExtrapGenerator kNumuNonQEExtrap (kNumuNonQEAxis, kNumuNonQEFD, kNumuNonQEND)
 
void DefaultFormatNue (DataMCComponets &comp, int linestyle=1)
 
struct DataMCComponets GetNDComponents (TDirectory *d_no, double kNDPOT, int linestyle=1)
 
void CompareNDDataOneMC (TDirectory *d_no, TDirectory *d_sh, TString plottitle, TString out_name, TString pidtag, bool printtable=true, AxisType pidaxis=kNue1bin)
 
void CompareNDDataTwoMC (TDirectory *d_no, TDirectory *d_pl, TDirectory *d_mi, TString plottitle, TString out_name, TString pidtag, bool printtable=true, AxisType pidaxis=kNue1bin)
 
void CompareNDDataMCFromVector (TDirectory *d_no, std::vector< TDirectory * > d_sh, TString plottitle, TString out_name, TString tag, bool printtable=true, AxisType pidaxis=kNue1bin)
 
void ComparePredictionsFromVector (TDirectory *dpred_no, std::vector< TDirectory * > dpred_sh, TString plottitle, TString out_name, bool printtable=true, AxisType pidaxis=kNue1bin)
 
void ComparePredictionsPeripheralFromVector (TDirectory *dpred_no_xp, TDirectory *dpred_no_nxp, std::vector< TDirectory * > dpred_sh_xp, std::vector< TDirectory * > dpred_sh_nxp, TString plottitle, TString out_name, bool printtable=true, AxisType pidaxis=kNue4bin)
 
void ComparisonTableOneNbins (const std::vector< TH1 * > &mcnom, const std::vector< TH1 * > &mcshift, const std::vector< TString > &labels, TString ltxcommand, int N=3)
 
void MakeSummaryV (bool signal=true, TString xptype="nxp", bool sorted=false)
 
void ComparisonTableNbins (const std::vector< TH1 * > &mcnom, const std::vector< TH1 * > &mcplus, const std::vector< TH1 * > &mcminus, std::vector< TString > labels, TString ltxcommand="", int N=3)
 
void CompareNDDataTwoMC (DataMCComponents hnom, DataMCComponents hplu, DataMCComponents hmin, TString plottitle, TString out_name, TString pidtag, AxisType pidaxis, bool printtable=true)
 
void CompareNDDataMCFromVector (PredictionSystJoint2018 *predictionSyst, const ISyst *syst, EModExtrapComps modExtrapComp, TString plottitle, TString out_name, TString tag, AxisType pidaxis, bool printtable=true)
 
void ComparePredictionsFromVector (PredictionSystJoint2018 *predictionSyst, const ISyst *syst, TString plottitle, TString out_name, bool printtable=true, AxisType pidaxis=kNue3bin)
 
const DataMCComponents GetNDComponents (const IDecomp *decomp)
 
const Var kTrueEVis ([](const caf::SRProxy *sr){if(sr->mc.nu.empty()) return 0.;double ret=sr->mc.nu[0].E;if(!sr->mc.nu[0].iscc) ret *=sr->mc.nu[0].y;return ret;})
 
const Var kCVNeSS ([](const caf::SRProxy *sr){return sr->sel.cvnProd3Train.nueid;})
 $ \nu_e $ CVN short-simple PID More...
 
const Var kCVNeELU ([](const caf::SRProxy *sr){return sr->sel.cvn.nueid;})
 $ \nu_e $ CVN ELU PID More...
 
const Var kCVNe2017 ([](const caf::SRProxy *sr){return sr->sel.cvn2017.nueid;})
 $ \nu_e $ CVN 2017 PID More...
 
const Cut kNearestSliceCosRejCoreNoCVN ([](const caf::SRProxy *sr){if(kNue2018CorePresel(sr)){return!(sr->slc.closestslicetime >-100.&& sr->slc.closestslicetime< 100.&& sr->slc.closestsliceminfromtop< 400 && sr->slc.closestslicemindist< 500.);}return false;})
 
const Var kOneSelBinRHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.89) return float(0.5);else return float(-5.0);})
 
const Var kOneAnaBinRHC ([](const caf::SRProxy *sr){int selBin=kOneSelBinRHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kOneBinRHCAxis ("NuE Energy / RHC Analysis Bin", kNue2018Binning, kOneAnaBinRHC)
 
const Var kTwoSelBinRHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.76 &&sr->sel.cvnProd3Train.nueid< 0.96) return float(0.5);else if(sr->sel.cvnProd3Train.nueid >=0.96) return float(1.5);else return float(-5.0);})
 
const Var kTwoAnaBinRHC ([](const caf::SRProxy *sr){int selBin=kTwoSelBinRHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kTwoBinRHCAxis ("NuE Energy / RHC Analysis Bin", kNue2018Binning, kTwoAnaBinRHC)
 
const Var kTwoSelBinHiPurRHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.89 &&sr->sel.cvnProd3Train.nueid< 0.99) return float(0.5);else if(sr->sel.cvnProd3Train.nueid >=0.99) return float(1.5);else return float(-5.0);})
 
const Var kTwoAnaBinHiPurRHC ([](const caf::SRProxy *sr){int selBin=kTwoSelBinHiPurRHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kTwoBinHiPurRHCAxis ("NuE Energy / RHC Analysis Bin", kNue2018Binning, kTwoAnaBinHiPurRHC)
 
const Var kThreeSelBinRHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.71 &&sr->sel.cvnProd3Train.nueid< 0.92) return float(0.5);else if(sr->sel.cvnProd3Train.nueid >=0.92 && sr->sel.cvnProd3Train.nueid< 0.98) return float(1.5);else if(sr->sel.cvnProd3Train.nueid >=0.98) return float(2.5);else return float(-5.0);})
 
const Var kThreeAnaBinRHC ([](const caf::SRProxy *sr){int selBin=kThreeSelBinRHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kThreeBinRHCAxis ("NuE Energy / RHC Analysis Bin", kNue2018Binning, kThreeAnaBinRHC)
 
const Var kFourSelBinRHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.71 && sr->sel.cvnProd3Train.nueid< 0.92) return float(0.5);else if(sr->sel.cvnProd3Train.nueid >=0.92 && sr->sel.cvnProd3Train.nueid< 0.98) return float(1.5);else if(sr->sel.cvnProd3Train.nueid >=0.98 && sr->sel.cvnProd3Train.nueid< 0.99) return float(2.5);else if(sr->sel.cvnProd3Train.nueid >=0.99) return float(3.5);else return float(-5.0);})
 
const Var kFourAnaBinRHC ([](const caf::SRProxy *sr){int selBin=kFourSelBinRHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kFourBinRHCAxis ("NuE Energy / RHC Analysis Bin", kNue2018Binning, kFourAnaBinRHC)
 
const Var kOneSelBinFHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.86) return float(0.5);else return float(-5.0);})
 
const Var kOneAnaBinFHC ([](const caf::SRProxy *sr){int selBin=kOneSelBinFHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kOneBinFHCAxis ("NuE Energy / FHC Analysis Bin", kNue2018Binning, kOneAnaBinFHC)
 
const Var kTwoSelBinFHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.72 &&sr->sel.cvnProd3Train.nueid< 0.94) return float(0.5);else if(sr->sel.cvnProd3Train.nueid >=0.94) return float(1.5);else return float(-5.0);})
 
const Var kTwoAnaBinFHC ([](const caf::SRProxy *sr){int selBin=kTwoSelBinFHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kTwoBinFHCAxis ("NuE Energy / FHC Analysis Bin", kNue2018Binning, kTwoAnaBinFHC)
 
const Var kThreeSelBinFHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.54 &&sr->sel.cvnProd3Train.nueid< 0.84) return float(0.5);else if(sr->sel.cvnProd3Train.nueid >=0.84 && sr->sel.cvnProd3Train.nueid< 0.96) return float(1.5);else if(sr->sel.cvnProd3Train.nueid >=0.96) return float(2.5);else return float(-5.0);})
 
const Var kThreeAnaBinFHC ([](const caf::SRProxy *sr){int selBin=kThreeSelBinFHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kThreeBinFHCAxis ("NuE Energy / FHC Analysis Bin", kNue2018Binning, kThreeAnaBinFHC)
 
const Var kFourSelBinFHC ([](const caf::SRProxy *sr){if(sr->sel.cvnProd3Train.nueid >=0.54 && sr->sel.cvnProd3Train.nueid< 0.84) return float(0.5);else if(sr->sel.cvnProd3Train.nueid >=0.84 && sr->sel.cvnProd3Train.nueid< 0.96) return float(1.5);else if(sr->sel.cvnProd3Train.nueid >=0.96 && sr->sel.cvnProd3Train.nueid< 0.99) return float(2.5);else if(sr->sel.cvnProd3Train.nueid >=0.99) return float(3.5);else return float(-5.0);})
 
const Var kFourAnaBinFHC ([](const caf::SRProxy *sr){int selBin=kFourSelBinFHC(sr);float nuE=kNueEnergy2018(sr);int nuEBin=nuE/0.5;assert(nuEBin<=8 &&"An event with nuE > 4.5 should never happen");int anaBin=9 *selBin+nuEBin;return anaBin;})
 
const HistAxis kFourBinFHCAxis ("NuE Energy / FHC Analysis Bin", kNue2018Binning, kFourAnaBinFHC)
 
const Cut kNueFHCSosbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.nueid > 0.97);})
 
const Cut kNueFHCSossbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.nueid > 0.86);})
 
const Cut kNueFHCSosbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.nueid > 0.93);})
 
const Cut kNueFHCSossbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.nueid > 0.66);})
 
const Cut kNueFHCSosbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.nueid > 0.96);})
 
const Cut kNueFHCSossbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.nueid > 0.66);})
 
const Cut kNueRHCSosbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.nueid > 0.98);})
 
const Cut kNueRHCSossbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.nueid > 0.89);})
 
const Cut kNueRHCSosbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.nueid > 0.92);})
 
const Cut kNueRHCSossbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.nueid > 0.67);})
 
const Cut kNueRHCSosbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.nueid > 0.94);})
 
const Cut kNueRHCSossbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.nueid > 0.72);})
 
const Var kCVNmuSS ([](const caf::SRProxy *sr){return sr->sel.cvnProd3Train.numuid;})
 $ \nu_e $ CVN short-simple PID More...
 
const Var kCVNmuELU ([](const caf::SRProxy *sr){return sr->sel.cvn.numuid;})
 $ \nu_e $ CVN ELU PID More...
 
const Var kCVNmu2017 ([](const caf::SRProxy *sr){return sr->sel.cvn2017.numuid;})
 $ \nu_e $ CVN 2017 PID More...
 
const Cut kNumu2017remid ([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.5);})
 Numu RemID cut. More...
 
const Cut kNumuFHCSosbRemID ([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.99);})
 
const Cut kNumuFHCSossbRemID ([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.68);})
 
const Cut kNumuRHCSosbRemID ([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.99);})
 
const Cut kNumuRHCSossbRemID ([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.69);})
 
const Cut kNumuFHCSosbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.numuid > 0.98);})
 
const Cut kNumuFHCSossbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.numuid > 0.38);})
 
const Cut kNumuFHCSosbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.numuid > 0.98);})
 
const Cut kNumuFHCSossbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.numuid > 0.52);})
 
const Cut kNumuFHCSosbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.numuid > 0.98);})
 
const Cut kNumuFHCSossbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.numuid > 0.43);})
 
const Cut kNumuRHCSosbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.numuid > 0.99);})
 
const Cut kNumuRHCSossbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.numuid > 0.36);})
 
const Cut kNumuRHCSosbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.numuid > 0.95);})
 
const Cut kNumuRHCSossbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.numuid > 0.50);})
 
const Cut kNumuRHCSosbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.numuid > 0.97);})
 
const Cut kNumuRHCSossbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.numuid > 0.34);})
 
const Var kCVNncSS ([](const caf::SRProxy *sr){return sr->sel.cvnProd3Train.ncid;})
 $ nc $ CVN short-simple PID More...
 
const Var kCVNncELU ([](const caf::SRProxy *sr){return sr->sel.cvn.ncid;})
 $ nc $ CVN ELU PID More...
 
const Var kCVNnc2017 ([](const caf::SRProxy *sr){return sr->sel.cvn2017.ncid;})
 $ nc $ CVN 2017 PID More...
 
const Cut kNusFHCSosbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.ncid > 0.99);})
 
const Cut kNusFHCSossbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.ncid > 0.24);})
 
const Cut kNusFHCSosbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.ncid > 0.97);})
 
const Cut kNusFHCSossbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.ncid > 0.21);})
 
const Cut kNusFHCSosbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.ncid > 0.88);})
 
const Cut kNusFHCSossbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.ncid > 0.24);})
 
const Cut kNusRHCSosbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.ncid > 0.99);})
 
const Cut kNusRHCSossbCVNSS ([](const caf::SRProxy *sr){return(sr->sel.cvnProd3Train.ncid > 0.24);})
 
const Cut kNusRHCSosbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.ncid > 0.99);})
 
const Cut kNusRHCSossbCVNELU ([](const caf::SRProxy *sr){return(sr->sel.cvn.ncid > 0.20);})
 
const Cut kNusRHCSosbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.ncid > 0.85);})
 
const Cut kNusRHCSossbCVN2017 ([](const caf::SRProxy *sr){return(sr->sel.cvn2017.ncid > 0.22);})
 
const std::vector< VarDefGetVars (TString opt, TString type="all")
 
std::vector< CutDefGetCuts (TString opt, bool pastCuts=false, bool noCut=true)
 
std::vector< WeightDefGetWeights (TString opt, bool noWeight=false)
 
std::vector< std::vector< PIDCutDef > > GetPIDCuts (TString opt, bool noCut=true)
 
NuTruthVarGetPPFXFluxUnivWgtSmooth_NT (int UnivIdx)
 
BeamSystGetPPFXUnivSyst (int UnivIdx)
 
BeamSystGetPPFXPrincipals (int PCIdx)
 
BeamSystGetFluxPrincipals2018 (int PCIdx)
 
BeamSystGetFluxPrincipals2020 (int PCIdx)
 
BeamSystGetPPFXPrincipalsSBAna (int PCIdx)
 
BeamSystGetFluxPrincipalsND2018 (int PCIdx)
 
const NuTruthVar kPPFXFluxCVWgtSmooth_NT (BeamWeightFunc(FindCAFAnaDir()+"/data/beam/ppfx_smooth_multiverse_weights_2020.root","ppfx_cv"))
 
std::vector< intGetDummyShifts (const ISyst *s)
 
GeniePCASystGetGeniePrincipals2020Small (int PCIdx)
 
GeniePCASystGetGeniePrincipals2018 (int PCIdx)
 
GeniePCASystGetGeniePrincipals2018Small (int PCIdx)
 
std::string AnaTypeToString (const EAnaType2017 ana)
 
std::vector< const ISyst * > getAna2017LargeXsecSysts (const EAnaType2017 ana)
 
std::vector< const ISyst * > getAna2017SmallXsecSysts (const EAnaType2017 ana)
 
const SummedSystgetAna2017SummedSmallXsecSysts (const EAnaType2017 ana)
 
void AddJointAna2017XSecSysts (std::vector< const ISyst * > &systs, const EAnaType2017 ana, bool smallgenie)
 
void AddJointAna2017BeamSysts (std::vector< const ISyst * > &systs, const EAnaType2017 ana)
 
void AddJointAna2017FileSysts (std::vector< const ISyst * > &systs, const EAnaType2017 ana)
 
void AddJointAna2017NormSysts (std::vector< const ISyst * > &systs, const EAnaType2017 ana)
 
void AddJointAna2017OtherSysts (std::vector< const ISyst * > &systs, const EAnaType2017 ana)
 
std::vector< const ISyst * > getAllAna2017Systs (const EAnaType2017 ana, const bool smallgenie)
 
std::vector< const ISyst * > getAllDirectNumuSysts2018 ()
 
std::vector< const ISyst * > getAllDirectNumuSysts2017 ()
 Get a vector of all the numu group systs. More...
 
void GetSystType (std::string syst_type, bool &use_xsec, bool &use_nonxsec)
 
std::vector< const ISyst * > GetNus18Systs (bool rhc, std::string det_type, std::string syst_type)
 
std::vector< const ISyst * > GetNus18BaseSysts (bool rhc, std::string syst_type)
 
std::vector< const ISyst * > GetNus18FHCNDSysts (std::string syst_type)
 
std::vector< const ISyst * > GetNus18RHCNDSysts (std::string syst_type)
 
std::vector< const ISyst * > GetNus18FHCFDSysts (std::string syst_type)
 
std::vector< const ISyst * > GetNus18RHCFDSysts (std::string syst_type)
 
std::vector< const ISyst * > GetNus18RHCExtrapSysts ()
 
std::string LoadSystematics (std::string polarity, bool extrap=false)
 Function to load systematics. More...
 
std::vector< const ISyst * > getAllNusSysts ()
 Get a vector of all the nus group systs. More...
 
double GetBinScaleWS (double nuE=0.)
 
void CheckSystsMatchWithNOvARwgt (const std::vector< const ISyst * > &systsHere, const novarwgt::Tune &novaRwgtTune)
 Compare the list of systs made here to what is expected for a given NOvARwgt tune. More...
 
std::vector< const ISyst * > getAllXsecNuTruthSysts_2020 ()
 Get master XSec syst list for 2020 analyses. More...
 
std::vector< const ISyst * > getAllXsecSysts_2020 ()
 
std::vector< const ISyst * > getAllXsecNuTruthSysts_2018_base ()
 Get master XSec syst list for 2018 analyses. More...
 
std::vector< const ISyst * > getAllXsecNuTruthSysts_2018 ()
 
std::vector< const ISyst * > getAllXsecNuTruthSysts_2018_RPAFix ()
 
std::vector< const ISyst * > getAllXsecSysts_2018_RPAFix ()
 
std::vector< const ISyst * > getAllXsecSysts_2018 ()
 Get master XSec syst list for 2018 analyses. More...
 
std::vector< const ISyst * > getAllXsecNuTruthSysts_2017 ()
 Get master XSec syst list for 2017 analyses (NuTruthSyst variant) More...
 
std::vector< const ISyst * > getAllXsecSysts_2017 ()
 Get master XSec syst list for 2017 analyses. More...
 
const NOvARwgtSystGetGenieKnobSyst (rwgt::ReweightLabel_t knobIdx, std::string altShortName="", std::string altLatexName="")
 Convenience function to get a GENIE knob syst. (Allows using the GENIE knob name & description as the default.) More...
 
const TSpline3 ND_mu_BPFE_p1 ("ND_mu_BPFE_p1", xknot_ND_mu_BPFE_p1, yknot_ND_mu_BPFE_p1, N_ND_mu_BPFE_p1,"b1,e1", m1_ND_mu_BPFE_p1, m2_ND_mu_BPFE_p1)
 
const TSpline3 ND_mu_BPFE_p2 ("ND_mu_BPFE_p2", xknot_ND_mu_BPFE_p2, yknot_ND_mu_BPFE_p2, N_ND_mu_BPFE_p2,"b1,e1", m1_ND_mu_BPFE_p2, m2_ND_mu_BPFE_p2)
 
const TSpline3 ND_mu_BPFE_p3 ("ND_mu_BPFE_p3", xknot_ND_mu_BPFE_p3, yknot_ND_mu_BPFE_p3, N_ND_mu_BPFE_p3,"b1,e1", m1_ND_mu_BPFE_p3, m2_ND_mu_BPFE_p3)
 
const TSpline3 ND_mu_BPFE_p4 ("ND_mu_BPFE_p4", xknot_ND_mu_BPFE_p4, yknot_ND_mu_BPFE_p4, N_ND_mu_BPFE_p4,"b1,e1", m1_ND_mu_BPFE_p4, m2_ND_mu_BPFE_p4)
 
const TSpline3 ND_mu_BPFE_p5 ("ND_mu_BPFE_p5", xknot_ND_mu_BPFE_p5, yknot_ND_mu_BPFE_p5, N_ND_mu_BPFE_p5,"b1,e1", m1_ND_mu_BPFE_p5, m2_ND_mu_BPFE_p5)
 
const TSpline3 ND_mu_BPFE_p6 ("ND_mu_BPFE_p6", xknot_ND_mu_BPFE_p6, yknot_ND_mu_BPFE_p6, N_ND_mu_BPFE_p6,"b1,e1", m1_ND_mu_BPFE_p6, m2_ND_mu_BPFE_p6)
 
const TSpline3 FD_mu_BPFE_p1 ("FD_mu_BPFE_p1", xknot_FD_mu_BPFE_p1, yknot_FD_mu_BPFE_p1, N_FD_mu_BPFE_p1,"b1,e1", m1_FD_mu_BPFE_p1, m2_FD_mu_BPFE_p1)
 
const TSpline3 FD_mu_BPFE_p2 ("FD_mu_BPFE_p2", xknot_FD_mu_BPFE_p2, yknot_FD_mu_BPFE_p2, N_FD_mu_BPFE_p2,"b1,e1", m1_FD_mu_BPFE_p2, m2_FD_mu_BPFE_p2)
 
const TSpline3 FD_mu_BPFE_p3 ("FD_mu_BPFE_p3", xknot_FD_mu_BPFE_p3, yknot_FD_mu_BPFE_p3, N_FD_mu_BPFE_p3,"b1,e1", m1_FD_mu_BPFE_p3, m2_FD_mu_BPFE_p3)
 
const TSpline3 FD_mu_BPFE_p4 ("FD_mu_BPFE_p4", xknot_FD_mu_BPFE_p4, yknot_FD_mu_BPFE_p4, N_FD_mu_BPFE_p4,"b1,e1", m1_FD_mu_BPFE_p4, m2_FD_mu_BPFE_p4)
 
const TSpline3 FD_mu_BPFE_p5 ("FD_mu_BPFE_p5", xknot_FD_mu_BPFE_p5, yknot_FD_mu_BPFE_p5, N_FD_mu_BPFE_p5,"b1,e1", m1_FD_mu_BPFE_p5, m2_FD_mu_BPFE_p5)
 
const TSpline3 FD_mu_BPFE_p6 ("FD_mu_BPFE_p6", xknot_FD_mu_BPFE_p6, yknot_FD_mu_BPFE_p6, N_FD_mu_BPFE_p6,"b1,e1", m1_FD_mu_BPFE_p6, m2_FD_mu_BPFE_p6)
 
const TSpline3 ND_mu_calE_p1 ("ND_mu_calE_p1", xknot_ND_mu_calE_p1, yknot_ND_mu_calE_p1, N_ND_mu_calE_p1,"b1,e1", m1_ND_mu_calE_p1, m2_ND_mu_calE_p1)
 
const TSpline3 ND_mu_calE_p2 ("ND_mu_calE_p2", xknot_ND_mu_calE_p2, yknot_ND_mu_calE_p2, N_ND_mu_calE_p2,"b1,e1", m1_ND_mu_calE_p2, m2_ND_mu_calE_p2)
 
const TSpline3 ND_mu_calE_p3 ("ND_mu_calE_p3", xknot_ND_mu_calE_p3, yknot_ND_mu_calE_p3, N_ND_mu_calE_p3,"b1,e1", m1_ND_mu_calE_p3, m2_ND_mu_calE_p3)
 
const TSpline3 ND_mu_calE_p4 ("ND_mu_calE_p4", xknot_ND_mu_calE_p4, yknot_ND_mu_calE_p4, N_ND_mu_calE_p4,"b1,e1", m1_ND_mu_calE_p4, m2_ND_mu_calE_p4)
 
const TSpline3 ND_mu_calE_p5 ("ND_mu_calE_p5", xknot_ND_mu_calE_p5, yknot_ND_mu_calE_p5, N_ND_mu_calE_p5,"b1,e1", m1_ND_mu_calE_p5, m2_ND_mu_calE_p5)
 
const TSpline3 ND_mu_calE_p6 ("ND_mu_calE_p6", xknot_ND_mu_calE_p6, yknot_ND_mu_calE_p6, N_ND_mu_calE_p6,"b1,e1", m1_ND_mu_calE_p6, m2_ND_mu_calE_p6)
 
const TSpline3 FD_mu_calE_p1 ("FD_mu_calE_p1", xknot_FD_mu_calE_p1, yknot_FD_mu_calE_p1, N_FD_mu_calE_p1,"b1,e1", m1_FD_mu_calE_p1, m2_FD_mu_calE_p1)
 
const TSpline3 FD_mu_calE_p2 ("FD_mu_calE_p2", xknot_FD_mu_calE_p2, yknot_FD_mu_calE_p2, N_FD_mu_calE_p2,"b1,e1", m1_FD_mu_calE_p2, m2_FD_mu_calE_p2)
 
const TSpline3 FD_mu_calE_p3 ("FD_mu_calE_p3", xknot_FD_mu_calE_p3, yknot_FD_mu_calE_p3, N_FD_mu_calE_p3,"b1,e1", m1_FD_mu_calE_p3, m2_FD_mu_calE_p3)
 
const TSpline3 FD_mu_calE_p4 ("FD_mu_calE_p4", xknot_FD_mu_calE_p4, yknot_FD_mu_calE_p4, N_FD_mu_calE_p4,"b1,e1", m1_FD_mu_calE_p4, m2_FD_mu_calE_p4)
 
const TSpline3 FD_mu_calE_p5 ("FD_mu_calE_p5", xknot_FD_mu_calE_p5, yknot_FD_mu_calE_p5, N_FD_mu_calE_p5,"b1,e1", m1_FD_mu_calE_p5, m2_FD_mu_calE_p5)
 
const TSpline3 FD_mu_calE_p6 ("FD_mu_calE_p6", xknot_FD_mu_calE_p6, yknot_FD_mu_calE_p6, N_FD_mu_calE_p6,"b1,e1", m1_FD_mu_calE_p6, m2_FD_mu_calE_p6)
 
const TSpline3 ND_had_calE_p1 ("ND_had_calE_p1", xknot_ND_had_calE_p1, yknot_ND_had_calE_p1, N_ND_had_calE_p1,"b1,e1", m1_ND_had_calE_p1, m2_ND_had_calE_p1)
 
const TSpline3 ND_had_calE_p2 ("ND_had_calE_p2", xknot_ND_had_calE_p2, yknot_ND_had_calE_p2, N_ND_had_calE_p2,"b1,e1", m1_ND_had_calE_p2, m2_ND_had_calE_p2)
 
const TSpline3 ND_had_calE_p3 ("ND_had_calE_p3", xknot_ND_had_calE_p3, yknot_ND_had_calE_p3, N_ND_had_calE_p3,"b1,e1", m1_ND_had_calE_p3, m2_ND_had_calE_p3)
 
const TSpline3 ND_had_calE_p4 ("ND_had_calE_p4", xknot_ND_had_calE_p4, yknot_ND_had_calE_p4, N_ND_had_calE_p4,"b1,e1", m1_ND_had_calE_p4, m2_ND_had_calE_p4)
 
const TSpline3 ND_had_calE_p5 ("ND_had_calE_p5", xknot_ND_had_calE_p5, yknot_ND_had_calE_p5, N_ND_had_calE_p5,"b1,e1", m1_ND_had_calE_p5, m2_ND_had_calE_p5)
 
const TSpline3 ND_had_calE_p6 ("ND_had_calE_p6", xknot_ND_had_calE_p6, yknot_ND_had_calE_p6, N_ND_had_calE_p6,"b1,e1", m1_ND_had_calE_p6, m2_ND_had_calE_p6)
 
const TSpline3 FD_had_calE_p1 ("FD_had_calE_p1", xknot_FD_had_calE_p1, yknot_FD_had_calE_p1, N_FD_had_calE_p1,"b1,e1", m1_FD_had_calE_p1, m2_FD_had_calE_p1)
 
const TSpline3 FD_had_calE_p2 ("FD_had_calE_p2", xknot_FD_had_calE_p2, yknot_FD_had_calE_p2, N_FD_had_calE_p2,"b1,e1", m1_FD_had_calE_p2, m2_FD_had_calE_p2)
 
const TSpline3 FD_had_calE_p3 ("FD_had_calE_p3", xknot_FD_had_calE_p3, yknot_FD_had_calE_p3, N_FD_had_calE_p3,"b1,e1", m1_FD_had_calE_p3, m2_FD_had_calE_p3)
 
const TSpline3 FD_had_calE_p4 ("FD_had_calE_p4", xknot_FD_had_calE_p4, yknot_FD_had_calE_p4, N_FD_had_calE_p4,"b1,e1", m1_FD_had_calE_p4, m2_FD_had_calE_p4)
 
const TSpline3 FD_had_calE_p5 ("FD_had_calE_p5", xknot_FD_had_calE_p5, yknot_FD_had_calE_p5, N_FD_had_calE_p5,"b1,e1", m1_FD_had_calE_p5, m2_FD_had_calE_p5)
 
const TSpline3 FD_had_calE_p6 ("FD_had_calE_p6", xknot_FD_had_calE_p6, yknot_FD_had_calE_p6, N_FD_had_calE_p6,"b1,e1", m1_FD_had_calE_p6, m2_FD_had_calE_p6)
 
const TSpline3 ND_EM_calE_p1 ("ND_EM_calE_p1", xknot_ND_EM_calE_p1, yknot_ND_EM_calE_p1, N_ND_EM_calE_p1,"b1,e1", m1_ND_EM_calE_p1, m2_ND_EM_calE_p1)
 
const TSpline3 ND_EM_calE_p2 ("ND_EM_calE_p2", xknot_ND_EM_calE_p2, yknot_ND_EM_calE_p2, N_ND_EM_calE_p2,"b1,e1", m1_ND_EM_calE_p2, m2_ND_EM_calE_p2)
 
const TSpline3 ND_EM_calE_p3 ("ND_EM_calE_p3", xknot_ND_EM_calE_p3, yknot_ND_EM_calE_p3, N_ND_EM_calE_p3,"b1,e1", m1_ND_EM_calE_p3, m2_ND_EM_calE_p3)
 
const TSpline3 ND_EM_calE_p4 ("ND_EM_calE_p4", xknot_ND_EM_calE_p4, yknot_ND_EM_calE_p4, N_ND_EM_calE_p4,"b1,e1", m1_ND_EM_calE_p4, m2_ND_EM_calE_p4)
 
const TSpline3 ND_EM_calE_p5 ("ND_EM_calE_p5", xknot_ND_EM_calE_p5, yknot_ND_EM_calE_p5, N_ND_EM_calE_p5,"b1,e1", m1_ND_EM_calE_p5, m2_ND_EM_calE_p5)
 
const TSpline3 ND_EM_calE_p6 ("ND_EM_calE_p6", xknot_ND_EM_calE_p6, yknot_ND_EM_calE_p6, N_ND_EM_calE_p6,"b1,e1", m1_ND_EM_calE_p6, m2_ND_EM_calE_p6)
 
const TSpline3 FD_EM_calE_p1 ("FD_EM_calE_p1", xknot_FD_EM_calE_p1, yknot_FD_EM_calE_p1, N_FD_EM_calE_p1,"b1,e1", m1_FD_EM_calE_p1, m2_FD_EM_calE_p1)
 
const TSpline3 FD_EM_calE_p2 ("FD_EM_calE_p2", xknot_FD_EM_calE_p2, yknot_FD_EM_calE_p2, N_FD_EM_calE_p2,"b1,e1", m1_FD_EM_calE_p2, m2_FD_EM_calE_p2)
 
const TSpline3 FD_EM_calE_p3 ("FD_EM_calE_p3", xknot_FD_EM_calE_p3, yknot_FD_EM_calE_p3, N_FD_EM_calE_p3,"b1,e1", m1_FD_EM_calE_p3, m2_FD_EM_calE_p3)
 
const TSpline3 FD_EM_calE_p4 ("FD_EM_calE_p4", xknot_FD_EM_calE_p4, yknot_FD_EM_calE_p4, N_FD_EM_calE_p4,"b1,e1", m1_FD_EM_calE_p4, m2_FD_EM_calE_p4)
 
const TSpline3 FD_EM_calE_p5 ("FD_EM_calE_p5", xknot_FD_EM_calE_p5, yknot_FD_EM_calE_p5, N_FD_EM_calE_p5,"b1,e1", m1_FD_EM_calE_p5, m2_FD_EM_calE_p5)
 
const TSpline3 FD_EM_calE_p6 ("FD_EM_calE_p6", xknot_FD_EM_calE_p6, yknot_FD_EM_calE_p6, N_FD_EM_calE_p6,"b1,e1", m1_FD_EM_calE_p6, m2_FD_EM_calE_p6)
 
const TSpline3 ND_garbage_calE_p1 ("ND_garbage_calE_p1", xknot_ND_garbage_calE_p1, yknot_ND_garbage_calE_p1, N_ND_garbage_calE_p1,"b1,e1", m1_ND_garbage_calE_p1, m2_ND_garbage_calE_p1)
 
const TSpline3 ND_garbage_calE_p2 ("ND_garbage_calE_p2", xknot_ND_garbage_calE_p2, yknot_ND_garbage_calE_p2, N_ND_garbage_calE_p2,"b1,e1", m1_ND_garbage_calE_p2, m2_ND_garbage_calE_p2)
 
const TSpline3 ND_garbage_calE_p3 ("ND_garbage_calE_p3", xknot_ND_garbage_calE_p3, yknot_ND_garbage_calE_p3, N_ND_garbage_calE_p3,"b1,e1", m1_ND_garbage_calE_p3, m2_ND_garbage_calE_p3)
 
const TSpline3 ND_garbage_calE_p4 ("ND_garbage_calE_p4", xknot_ND_garbage_calE_p4, yknot_ND_garbage_calE_p4, N_ND_garbage_calE_p4,"b1,e1", m1_ND_garbage_calE_p4, m2_ND_garbage_calE_p4)
 
const TSpline3 ND_garbage_calE_p5 ("ND_garbage_calE_p5", xknot_ND_garbage_calE_p5, yknot_ND_garbage_calE_p5, N_ND_garbage_calE_p5,"b1,e1", m1_ND_garbage_calE_p5, m2_ND_garbage_calE_p5)
 
const TSpline3 ND_garbage_calE_p6 ("ND_garbage_calE_p6", xknot_ND_garbage_calE_p6, yknot_ND_garbage_calE_p6, N_ND_garbage_calE_p6,"b1,e1", m1_ND_garbage_calE_p6, m2_ND_garbage_calE_p6)
 
const TSpline3 FD_garbage_calE_p1 ("FD_garbage_calE_p1", xknot_FD_garbage_calE_p1, yknot_FD_garbage_calE_p1, N_FD_garbage_calE_p1,"b1,e1", m1_FD_garbage_calE_p1, m2_FD_garbage_calE_p1)
 
const TSpline3 FD_garbage_calE_p2 ("FD_garbage_calE_p2", xknot_FD_garbage_calE_p2, yknot_FD_garbage_calE_p2, N_FD_garbage_calE_p2,"b1,e1", m1_FD_garbage_calE_p2, m2_FD_garbage_calE_p2)
 
const TSpline3 FD_garbage_calE_p3 ("FD_garbage_calE_p3", xknot_FD_garbage_calE_p3, yknot_FD_garbage_calE_p3, N_FD_garbage_calE_p3,"b1,e1", m1_FD_garbage_calE_p3, m2_FD_garbage_calE_p3)
 
const TSpline3 FD_garbage_calE_p4 ("FD_garbage_calE_p4", xknot_FD_garbage_calE_p4, yknot_FD_garbage_calE_p4, N_FD_garbage_calE_p4,"b1,e1", m1_FD_garbage_calE_p4, m2_FD_garbage_calE_p4)
 
const TSpline3 FD_garbage_calE_p5 ("FD_garbage_calE_p5", xknot_FD_garbage_calE_p5, yknot_FD_garbage_calE_p5, N_FD_garbage_calE_p5,"b1,e1", m1_FD_garbage_calE_p5, m2_FD_garbage_calE_p5)
 
const TSpline3 FD_garbage_calE_p6 ("FD_garbage_calE_p6", xknot_FD_garbage_calE_p6, yknot_FD_garbage_calE_p6, N_FD_garbage_calE_p6,"b1,e1", m1_FD_garbage_calE_p6, m2_FD_garbage_calE_p6)
 
double getMuonEnergy (const TSpline3 &spline_calE, const TSpline3 &spline_BPFE, const caf::SRProxy *sr)
 : function to compute the muon energy More...
 
double getEMShowerEnergy (const TSpline3 &spline_calE, const caf::SRProxy *sr)
 : function to compute the EM shower energy More...
 
double getHadronEnergy (const TSpline3 &spline_calE, const caf::SRProxy *sr)
 : function to compute the hadron energy More...
 
double takeOutTrash (const TSpline3 &spline_calE, const caf::SRProxy *sr)
 : function to compute v3 of the garbage bin. this takes out muons, EM showers, and general hadrons, everything else in the garbage bin More...
 
float CVNFinalStateScore2018 (const caf::SRProxy *sr, int target)
 
double GetCVNProngMuonScore (unsigned int ProngIdx, caf::SRProxy *sr)
 Function to return "adjusted" CVN-prong muon score: More...
 
double EMScore (unsigned int ProngIdx, const caf::SRProxy *sr)
 
double HadScore (unsigned int ProngIdx, const caf::SRProxy *sr)
 
double HadScoreWithMuon (unsigned int ProngIdx, const caf::SRProxy *sr)
 
bool IsNumuCCPionByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event pion selection criteria More...
 
bool IsNumuCCProtonByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event proton selection criteria More...
 
bool IsNumuCCHadronByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event hadron selection criteria More...
 
bool IsNumuCCEMShowerByCVN (unsigned int ProngIdx, const caf::SRProxy *sr)
 : Returns a bool if prong passes NumuCC event EM selection criteria More...
 
std::vector< const IFitVar * > getNumuMarginalisedOscParam ()
 
std::vector< const IFitVar * > getNumuMarginalisedBar ()
 
std::vector< const IFitVar * > getNumuMarginalisedNu ()
 
FitVarsProduct FitVarSinSqTheta23SinSq2Theta13 ()
 Return a FitVarsProduct for $ \sin^2\theta_{23}\sin^22\theta_{13} $. More...
 
FitVarsProductMarg FitSinSqTheta23SinSq2Theta13Marg ()
 
Fit2SinSqTheta23SinSq2Theta13 FitVar2SinSqTheta23SinSq2Theta13 ()
 Return a Fit2SinSqTheta23SinSq2Theta13 for $ 2\sin^2\theta_{23}\sin^22\theta_{13} $. More...
 
FitVarsProductMarg FitVarSinSqTheta23SinSq2Theta13Marg ()
 Return a FitVarsProductMarg to marginalize over this if using kFitSinSqTheta23SinSq2Theta13. More...
 
NuTruthVar VarFromNOvARwgt (const novarwgt::IWeightGenerator *wgtr)
 
template<typename T , typename... Args>
NuTruthVar VarFromNOvARwgt (Args &&...args)
 
MultiVar constructPng2dVar (const std::function< double(const caf::SRProngProxy *png2d)> &func)
 
MultiVar constructPng3dVar (const std::function< double(const caf::SRFuzzyKProngProxy *png)> &func)
 
MultiVar constructCVNPng3dVar (const std::function< double(const caf::SRFuzzyKProngProxy *png)> &func, bool isMuonID)
 
MultiVar constructBPFPng3dVar (const std::function< double(const caf::SRBpfTrackProxy *bpf)> &func, size_t bpfIdx)
 
const std::vector< std::pair< std::string, Var > > kSliceVarDefs ({{"coarseTiming", kCoarseTiming},{"lowGain", kLowGain},{"remPngCalE", kRemPngCalE},{"nHit", kNHit},{"calE", SIMPLEVAR(slc.calE)},{"orphCalE", SIMPLEVAR(vtx.elastic.fuzzyk.orphCalE)}})
 
const std::vector< std::pair< std::string, MultiVar > > kPng2dVarDefs ({SIMPLE_PNG2D_VAR(dir.x), SIMPLE_PNG2D_VAR(dir.y), SIMPLE_PNG2D_VAR(dir.z), SIMPLE_PNG2D_VAR(nhit), SIMPLE_PNG2D_VAR(nhitx), SIMPLE_PNG2D_VAR(nhity), SIMPLE_PNG2D_VAR(nplane), SIMPLE_PNG2D_VAR(len), SIMPLE_PNG2D_VAR(weightedCalE), SIMPLE_PNG2D_VAR(calE), SIMPLE_PNG2D_VAR(start.x), SIMPLE_PNG2D_VAR(start.y),})
 
const std::vector< std::pair< std::string, MultiVar > > kPng3dVarDefs ({SIMPLE_PNG3D_VAR(dir.x), SIMPLE_PNG3D_VAR(dir.y), SIMPLE_PNG3D_VAR(dir.z), SIMPLE_PNG3D_VAR(start.x), SIMPLE_PNG3D_VAR(start.y), SIMPLE_PNG3D_VAR(start.z), SIMPLE_PNG3D_VAR(len), SIMPLE_PNG3D_VAR(weightedCalE), SIMPLE_PNG3D_VAR(calE), SIMPLE_PNG3D_VAR(nhit), SIMPLE_PNG3D_VAR(nhitx), SIMPLE_PNG3D_VAR(nhity), SIMPLE_PNG3D_VAR(nplane), CVN_PNG3D_VAR(cvnpart.muonid, true), CVN_PNG3D_VAR(cvnpart.electronid, false), CVN_PNG3D_VAR(cvnpart.pionid, false), CVN_PNG3D_VAR(cvnpart.protonid, false), CVN_PNG3D_VAR(cvnpart.photonid, false), BPF_PNG3D_VAR(energy, 0), BPF_PNG3D_VAR(overlapE, 0), BPF_PNG3D_VAR(momentum.x, 0), BPF_PNG3D_VAR(momentum.y, 0), BPF_PNG3D_VAR(momentum.z, 0), BPF_PNG3D_VAR(nhit, 0), BPF_PNG3D_VAR(nhitx, 0), BPF_PNG3D_VAR(nhity, 0), BPF_PNG3D_VAR(nplane, 0), BPF_PNG3D_VAR(energy, 1), BPF_PNG3D_VAR(overlapE, 1), BPF_PNG3D_VAR(momentum.x, 1), BPF_PNG3D_VAR(momentum.y, 1), BPF_PNG3D_VAR(momentum.z, 1), BPF_PNG3D_VAR(nhit, 1), BPF_PNG3D_VAR(nhitx, 1), BPF_PNG3D_VAR(nhity, 1), BPF_PNG3D_VAR(nplane, 1), BPF_PNG3D_VAR(energy, 2), BPF_PNG3D_VAR(overlapE, 2), BPF_PNG3D_VAR(momentum.x, 2), BPF_PNG3D_VAR(momentum.y, 2), BPF_PNG3D_VAR(momentum.z, 2), BPF_PNG3D_VAR(nhit, 2), BPF_PNG3D_VAR(nhitx, 2), BPF_PNG3D_VAR(nhity, 2),})
 
float TAKEPol6_biasHM (float kepol6_biasHM)
 
double NueRecoE_2017FDFit (double rawEM, double rawHA)
 
double NueRecoE_2018RHCFit (double rawEM, double rawHA)
 
double NueRecoE_2018FHCFit (double rawEM, double rawHA)
 
double NueRecoE_2020RHCFit_2D3D (double rawEM, double rawHA)
 
double NueRecoE_2020RHCFit (double rawEM, double rawHA)
 
double NueRecoE_2020FHCFit_2D3D (double rawEM, double rawHA)
 
double NueRecoE_2020FHCFit (double rawEM, double rawHA)
 
double predict_special_fd_p1_muon_energy (double trkLen)
 
double predict_special_fd_p2_muon_energy (double trkLen)
 
double predict_special_fd_p3_muon_energy (double trkLen)
 
double predict_special_fd_p5_muon_energy (double trkLen)
 
double predict_special_fd_p1_had_energy (double hadVisE)
 
double predict_special_fd_p2_had_energy (double hadVisE)
 
double predict_special_fd_p3_had_energy (double hadVisE)
 
double predict_special_fd_p5_had_energy (double hadVisE)
 
double predict_special_nd_p3_act_energy (double ndtrklenact)
 
double predict_special_nd_p3_cat_energy (double ndtrklencat)
 
double predict_special_nd_p3_had_energy (double hadVisE)
 
double predict_special_fd_p1_muon_energy_corr (double trkLen, bool ismc)
 
double predict_special_fd_p2_muon_energy_corr (double trkLen, bool ismc)
 
double predict_special_fd_p3_muon_energy_corr (double trkLen, bool ismc)
 
double predict_special_fd_p5_muon_energy_corr (double trkLen, bool ismc)
 
double predict_special_fd_p1_had_energy_corr (double hadVisE, bool ismc)
 
double predict_special_fd_p2_had_energy_corr (double hadVisE, bool ismc)
 
double predict_special_fd_p3_had_energy_corr (double hadVisE, bool ismc)
 
double predict_special_fd_p5_had_energy_corr (double hadVisE, bool ismc)
 
double predict_special_fd_muon_energy (double trkLen, int run, bool ismc)
 
double predict_special_fd_had_energy (double hadVisE, int run, bool ismc)
 
double predict_special_nd_act_energy (double ndtrklenact)
 
double predict_special_nd_cat_energy (double ndtrklencat)
 
double predict_special_nd_had_energy (double hadVisE)
 
Var initNumuMuE2020FDpXVar (const std::function< NumuEnergyFunc::prod5_fd_energy_p_func_t > &f)
 
Var initNumuHadE2020FDpXVar (const std::function< NumuEnergyFunc::prod5_fd_energy_p_func_t > &f)
 
Var initNumuMuE2020NDpXVar (const std::function< NumuEnergyFunc::prod5_nd_energy_p_func_t > &f_act, const std::function< NumuEnergyFunc::prod5_nd_energy_p_func_t > &f_cat)
 
Var initNumuHadE2020NDpXVar (const std::function< NumuEnergyFunc::prod5_nd_energy_p_func_t > &f)
 
Var initNumuMuE2020Var (const std::function< NumuEnergyFunc::prod5_fd_energy_func_t > &f_fd, const std::function< NumuEnergyFunc::prod5_nd_energy_func_t > &f_nd_act, const std::function< NumuEnergyFunc::prod5_nd_energy_func_t > &f_nd_cat)
 
Var initNumuHadE2020Var (const std::function< NumuEnergyFunc::prod5_fd_energy_func_t > &f_fd, const std::function< NumuEnergyFunc::prod5_nd_energy_func_t > &f_nd)
 
Var initNumuMuE2018FDpXVar (const std::function< NumuEnergyFunc::prod4_fd_energy_p_func_t > &f)
 
Var initNumuHadE2018FDpXVar (const std::function< NumuEnergyFunc::prod4_fd_energy_p_func_t > &f)
 
Var initNumuMuE2018NDpXVar (const std::function< NumuEnergyFunc::prod4_nd_energy_p_func_t > &f_act, const std::function< NumuEnergyFunc::prod4_nd_energy_p_func_t > &f_cat)
 
Var initNumuHadE2018NDpXVar (const std::function< NumuEnergyFunc::prod4_nd_energy_p_func_t > &f)
 
Var initNumuMuE2018Var (const std::function< NumuEnergyFunc::prod4_fd_energy_func_t > &f_fd, const std::function< NumuEnergyFunc::prod4_nd_energy_func_t > &f_nd_act, const std::function< NumuEnergyFunc::prod4_nd_energy_func_t > &f_nd_cat)
 
Var initNumuHadE2018Var (const std::function< NumuEnergyFunc::prod4_fd_energy_func_t > &f_fd, const std::function< NumuEnergyFunc::prod4_nd_energy_func_t > &f_nd)
 
float TAMuE (double trklen)
 
float TAGetNDActLen (double trkLenact, double trkLencat)
 
float TAHadEND (double HadVisE)
 
float SAMuE (double trkLen)
 
float SAGetNDCatEffLen (double trkLenCat)
 
float SAHadEFD (double hadVisE, int run)
 
float SAHadEND (double hadVisE)
 
double SAMuEND (double lenact, double lencat, double actE, double tranE, double catE)
 
Var OverlayVarFromNuTruthVar (const NuTruthVar stv, double _default)
 
int PDG_cvnmax (std::map< int, double > ScorePDGmap)
 
const MultiVar kPcvn_el (CVNPng(kElectronPDG))
 
const MultiVar kPcvn_mu (CVNPng(kMuonPDG ))
 
const MultiVar kPcvn_pr (CVNPng(kProtonPDG))
 
const MultiVar kPcvn_pi (CVNPng(kPionPDG ))
 
const MultiVar kPcvn_ga (CVNPng(kGammaPDG ))
 
const MultiVar kPcvn_ot (CVNPng(0 ))
 
const MultiVar kPcvn_el_mc_el (CVNPngTruthSel(kElectronPDG, kElectronPDG))
 
const MultiVar kPcvn_mu_mc_el (CVNPngTruthSel(kElectronPDG, kMuonPDG ))
 
const MultiVar kPcvn_pr_mc_el (CVNPngTruthSel(kElectronPDG, kProtonPDG))
 
const MultiVar kPcvn_pi_mc_el (CVNPngTruthSel(kElectronPDG, kPionPDG ))
 
const MultiVar kPcvn_ga_mc_el (CVNPngTruthSel(kElectronPDG, kGammaPDG ))
 
const MultiVar kPcvn_ot_mc_el (CVNPngTruthSel(kElectronPDG, 0 ))
 
const MultiVar kPcvn_el_mc_mu (CVNPngTruthSel(kMuonPDG, kElectronPDG))
 
const MultiVar kPcvn_mu_mc_mu (CVNPngTruthSel(kMuonPDG, kMuonPDG ))
 
const MultiVar kPcvn_pr_mc_mu (CVNPngTruthSel(kMuonPDG, kProtonPDG))
 
const MultiVar kPcvn_pi_mc_mu (CVNPngTruthSel(kMuonPDG, kPionPDG ))
 
const MultiVar kPcvn_ga_mc_mu (CVNPngTruthSel(kMuonPDG, kGammaPDG ))
 
const MultiVar kPcvn_ot_mc_mu (CVNPngTruthSel(kMuonPDG, 0 ))
 
const MultiVar kPcvn_el_mc_pr (CVNPngTruthSel(kProtonPDG, kElectronPDG))
 
const MultiVar kPcvn_mu_mc_pr (CVNPngTruthSel(kProtonPDG, kMuonPDG ))
 
const MultiVar kPcvn_pr_mc_pr (CVNPngTruthSel(kProtonPDG, kProtonPDG))
 
const MultiVar kPcvn_pi_mc_pr (CVNPngTruthSel(kProtonPDG, kPionPDG ))
 
const MultiVar kPcvn_ga_mc_pr (CVNPngTruthSel(kProtonPDG, kGammaPDG ))
 
const MultiVar kPcvn_ot_mc_pr (CVNPngTruthSel(kProtonPDG, 0 ))
 
const MultiVar kPcvn_el_mc_pi (CVNPngTruthSel(kPionPDG, kElectronPDG))
 
const MultiVar kPcvn_mu_mc_pi (CVNPngTruthSel(kPionPDG, kMuonPDG ))
 
const MultiVar kPcvn_pr_mc_pi (CVNPngTruthSel(kPionPDG, kProtonPDG))
 
const MultiVar kPcvn_pi_mc_pi (CVNPngTruthSel(kPionPDG, kPionPDG ))
 
const MultiVar kPcvn_ga_mc_pi (CVNPngTruthSel(kPionPDG, kGammaPDG ))
 
const MultiVar kPcvn_ot_mc_pi (CVNPngTruthSel(kPionPDG, 0 ))
 
const MultiVar kPcvn_el_mc_ga (CVNPngTruthSel(kGammaPDG, kElectronPDG))
 
const MultiVar kPcvn_mu_mc_ga (CVNPngTruthSel(kGammaPDG, kMuonPDG ))
 
const MultiVar kPcvn_pr_mc_ga (CVNPngTruthSel(kGammaPDG, kProtonPDG))
 
const MultiVar kPcvn_pi_mc_ga (CVNPngTruthSel(kGammaPDG, kPionPDG ))
 
const MultiVar kPcvn_ga_mc_ga (CVNPngTruthSel(kGammaPDG, kGammaPDG ))
 
const MultiVar kPcvn_ot_mc_ga (CVNPngTruthSel(kGammaPDG, 0 ))
 
const MultiVar kPcvn_el_mc_ot (CVNPngTruthSel(0, kElectronPDG))
 
const MultiVar kPcvn_mu_mc_ot (CVNPngTruthSel(0, kMuonPDG ))
 
const MultiVar kPcvn_pr_mc_ot (CVNPngTruthSel(0, kProtonPDG))
 
const MultiVar kPcvn_pi_mc_ot (CVNPngTruthSel(0, kPionPDG ))
 
const MultiVar kPcvn_ga_mc_ot (CVNPngTruthSel(0, kGammaPDG ))
 
const MultiVar kPcvn_ot_mc_ot (CVNPngTruthSel(0, 0 ))
 
int GetPPFXNuniverses ()
 
std::vector< NuTruthVarGetkPPFXFluxUnivWgtST ()
 
std::vector< VarGetkPPFXFluxUnivWgt ()
 
static void best_spline_seeds (unsigned int m, double *xknot, double *yknot)
 
static double best_spline_mode_fcn (double x, const TH1 *h)
 
static void best_spline_fcn0 (int &, double *, double &chi2, double *par, int)
 
static void best_spline_fcn1 (int &, double *, double &chi2, double *par, int)
 
static TGraphErrors * best_spline_make_mode_graph (TH2 *h)
 
double best_spline_find_mode (TH1 *h, double *sig=0)
 Given a 1D histogram, find an estimate of the mode following the method of Bickel, Journal of Statistical Computation and Simulation; 73 (2003), 899-912. More...
 
void best_spline_set_objective (char obj)
 Allow switching between the two objective functions (minimum overall chi^2 or minimum approach to the modes of the distributions. More...
 
TGraphErrors * best_spline_get_mode_graph ()
 If we've chosen to fit to modes, get access to the graph of the modes vs. x. More...
 
static void best_spline_set_histo (TH2 *h)
 
TSpline3 best_spline (TH2 *histo, unsigned int m, double *xknot, double *yknot, double *b1rtn, double *e1rtn, double *chi2=0, double *sigxknot=0, double *sigyknot=0, double *sigb1rtn=0, double *sige1rtn=0, const char *title=0)
 Find the best spline that passes through a set of data. More...
 
TH1F * make_simple_res_plot (TH2 *h, const TSpline3 &spl)
 : do as the function name says... More...
 
static TH2 * make_test_th2 ()
 
void test_best_spline_seeds ()
 
void test_best_spline (int m)
 
void test_best_spline_mode_graph ()
 
void test_best_spline_find_mode ()
 
bool ProngTruthCut (unsigned int pIdx, const caf::SRProxy *sr, std::vector< int > pdgCodes, double eff=0.0, double pur=0.0)
 : Returns true if the prong matches the truth criteria. More...
 
bool hasBPFE (unsigned int pIdx, const caf::SRProxy *sr)
 
double getMuonEnergyByTruth (TSpline3 spline_calE, TSpline3 spline_BPFE, const caf::SRProxy *sr)
 : function to compute the muon energy More...
 
double getEMShowerEnergyByTruth (TSpline3 spline_calE, const caf::SRProxy *sr)
 : function to compute the EM shower energy More...
 
double getHadronEnergyByTruth (TSpline3 spline_calE, const caf::SRProxy *sr)
 : function to compute the hadron energy More...
 
double takeOutTrashByTruth (TSpline3 spline_calE, const caf::SRProxy *sr)
 : function to compute v3 of the garbage bin. this takes out muons, EM showers, and general hadrons, everything else in the garbage bin More...
 
double CalibrationBugCorrectionFactor (const caf::SRHeaderProxy &hdr)
 See docdb 23597. More...
 
NuTruthVar VarFromNOvATune (const novarwgt::Tune &tune)
 Build a CAFAna NuTruthVar from a novarwgt::Tune instance. More...
 
const novarwgt::Tune kXsecCVTune2020_Provisional ({{"MEC", novarwgt::GetWeighter< EmpiricalMECWgt2020 >()},})
 
const novarwgt::Tune kXsecCVTune2020Gauss_Provisional ({{"MEC", novarwgt::GetWeighter< ValenciaMECWgt2020_Provisional >()},})
 
UpDownPair< SpectrumCopyUpDownSpectrum (const UpDownPair< Spectrum > &copy)
 
UpDownPair< SpectrumCopyUpDownSpectrum (UpDownPair< Spectrum > &&copy)
 
void SaveToUpDownSpectra (const UpDownPair< Spectrum > &save, TDirectory *dir)
 
UpDownPair< SpectrumLoadFromUpDownSpectra (TDirectory *dir)
 
std::pair< Spectrum *, Spectrum * > Efficiency (SpectrumLoaderBase &loader, const NuTruthHistAxis &axis, const Cut &seln, const NuTruthCut &truthSeln, const SystShifts &shift, const NuTruthVar &weight)
 
bool IsCCQEOnCarbon (const caf::SRNeutrinoProxy *nu, int pdg)
 
bool IsNCQEOnCarbon (const caf::SRNeutrinoProxy *nu, int pdg)
 
bool IsFiducial (const TVector3 &nuVtx, const TVector3 &min, const TVector3 &max)
 
SpectrumDeriveFlux (SpectrumLoaderBase &loader, const Binning &bi