Classes | Typedefs | Enumerations | Functions | Variables
cmf Namespace Reference

Module to combine a set of results into a single file currently only does one data product type at a time. More...

Classes

class  BeamSyst
 
class  CAFToEventList
 
class  CalibSyst
 
class  ChiSqrCalculator
 
struct  ChiSqrInfo
 
class  CMFCappedEventList
 
class  CMFDecorrelator
 
class  CMFSpectraMaker
 
class  CombineResults
 
class  ContourFromLibrary
 
class  CovarianceBinUtility
 
class  CovarianceFitHelper
 
class  CovarianceMatrixFitter
 
class  CovarianceMatrixMaker
 
class  CovarianceTools
 
struct  CovFitIteration
 
struct  DataVars
 
class  DataVarVals
 Base container for the MC related Vars that constitute an event. More...
 
class  Event
 
class  EventId
 
class  EventList
 
class  EventListManipulator
 
class  FakeUniverse
 
class  FCResultCollection
 
class  FCUniverseCollection
 
struct  FileExtracts
 
class  FitFeldmanCousinsPoint
 
class  GridPoint
 
struct  HiddenParameterConfig
 
class  InputPoint
 
class  Location
 
class  MCVarVals
 Base container for the MC related Vars that constitute an event. More...
 
struct  MetaData
 
struct  MetaDataLite
 
class  OscPar
 
class  OscParamPoint
 
class  Parameter
 
class  ParameterUtility
 
struct  PeriodRun
 
class  PlotUtilities
 
class  PointResult
 
class  PointSpectra
 
struct  POTLiveTime
 
class  PredictionLibraryMaker
 
class  RandomUniverses
 
class  RandomUniverseUtility
 
class  SelectionUtility
 
class  ShifterAndWeighter
 
class  SpectrumPredictionMaker
 
struct  SpillSummary
 
struct  SubMatrixData
 
class  SystPar
 
struct  SystVar
 
struct  TruthVars
 
struct  WeightVars
 

Typedefs

typedef std::unique_ptr< EventEventPtr
 
typedef std::vector< EventPtrEventContainer
 
typedef std::vector< cmf::EventListEventListColl
 
typedef std::vector< cmf::SystVarSystVarColl
 
typedef enum cmf::det_type DetType_t
 
typedef enum cmf::beam_type BeamType_t
 
typedef enum cmf::chisqr_type ChiSqrCalc_t
 
typedef enum cmf::sel_type SelectionType_t
 
typedef enum cmf::interaction_type InteractionType_t
 
typedef enum cmf::file_type FileType_t
 
typedef enum cmf::osc_params OscParm_t
 
typedef enum cmf::calc_type CalcType_t
 
typedef enum cmf::covmat_type CovMat_t
 
typedef enum cmf::cont_type ContourType_t
 
typedef enum cmf::dataMC_type DataMC_t
 
typedef enum cmf::par_type ParType_t
 
typedef enum cmf::weight_type WeightType_t
 
typedef std::pair< std::string, cmf::DetType_tParameterDet
 
typedef std::vector< float > Spectrum
 
typedef std::map< double, double > ParamChiSqr
 
typedef std::map< cmf::OscParm_t, float > OscillationParameterMap
 
typedef std::map< cmf::GridPoint, double > PointMap
 
typedef std::map< cmf::GridPoint, std::vector< double > > UniverseChiSqrMap
 
typedef std::map< std::string, ParameterParameterSpaceLoc
 
typedef std::map< cmf::MetaData, cmf::SpillSummaryExposureMap
 
typedef std::vector< cmf::FakeUniverseFakeUniColl
 

Enumerations

enum  det_type {
  kUnknownDet = 0, kNEARDET, kFARDET, kMINOSNEAR,
  kMINOSFAR
}
 
enum  beam_type { kFHC = 0, kRHC, k0HC, kUnknownBeam }
 
enum  chisqr_type {
  kCovMat = 0, kPoisson, kCNP, kGauss,
  kUnknownChiSqr
}
 
enum  sel_type {
  kNuESelection = 0, kNuESelectionLowPID, kNuESelectionMidPID, kNuESelectionHighPID,
  kNuESelectionPeripheral, kNuMuSelection, kNuMuSelectionQ1, kNuMuSelectionQ2,
  kNuMuSelectionQ3, kNuMuSelectionQ4, kNCSelection, kUnknownSelection
}
 
enum  interaction_type {
  kUnknownInteraction = 0, kNuMuCC, kNuMuBarCC, kNuECC,
  kNuEBarCC, kNuTauCC, kNuTauBarCC, kNC,
  kCosmicMuon, kRockMuon, kUncategorised
}
 
enum  file_type {
  kBeam =0, kSwap, kTauSwap, kDataFile,
  kCosmicBackgroundFile, kRockFluxSwap, kRockNonSwap, kNumFileTypes,
  kBadFileType, kUnknownFileType
}
 
enum  osc_params {
  kL = 0, kRho, kDmsq21, kDmsq32,
  kTh12, kTh13, kTh23, kdCP,
  kTh14, kTh24, kTh34, kDmsq41,
  kd24, kEps_ee, kEps_emu, kEps_etau,
  kEps_mumu, kEps_mutau, kEps_tautau, kDelta_emu,
  kDelta_etau, kDelta_mutau, kNumOscParams
}
 
enum  calc_type { kPMNS =0, kNSI, kSterile }
 
enum  covmat_type { kStatMatrix =0, kSystMatrix, kTotalMatrix }
 
enum  cont_type {
  kAsimovContour =0, kMedianContour, kFCContour, kDataContour,
  kUnknownContour
}
 
enum  dataMC_type { kData = 0, kMC, kFakeData, kBoth }
 
enum  varpar_type {
  kUnknownVar = 0, kNuE_CVN, kNuE_NumMichel, kHad_RecoE,
  kLep_RecoE, kNu_RecoE, kLep_RecoE_MCFrac, kRecoQ2,
  kFake_Weight, kTrueE, kTruePDG, kTrueCCNC,
  kTrueIntType, kTruePDGOrig, kTrueParentPDG, kTrueParentPT,
  kTrueParentPZ, kTrueParentDecay, kTrueParentTargetPDG, kTrueHitNuc,
  kTrueIntMode, kXSecCVPPFX_Weight, kXSecCV2020Wgt, kPPFXFluxCVWgt,
  kRPACCQE_Weight, kRPARES_Weight, kDISvnCC1pi_Weight, kEmpiricalMEC_Weight,
  kEmpiricalMECtoGENIEQE_Weight, kEmpiricalMECtoGENIERES_Weight, kOtherDIS_Weight, kLightModelLightDownCalibUp,
  kLightModelLightUpCalibDown, kCkvProtonShiftDown, kRelativeCalibration, kAbsoluteCalibration,
  kCalibShape, kMinus2Sigma, kMinus1Sigma, kPlus1Sigma,
  kPlus2Sigma, kFirstSigmaVar, kMaCCRES =kFirstSigmaVar, kMvCCRES,
  kMaNCRES, kMvNCRES, kRPACCQEshapeEnh, kRPACCQEshapeSupp,
  kGENIEPCA00, kGENIEPCA01, kGENIEPCA02, kGENIEPCA03,
  kGENIEPCA04, kGENIEPCA05, kGENIEPCA06, kGENIEPCA07,
  kGENIEPCA08, kGENIEPCA09, kGENIEPCA10, kGENIEPCA11,
  kZNormCCQE, kZExpEV1Syst2020, kZExpEV2Syst2020, kZExpEV3Syst2020,
  kZExpEV4Syst2020, kRESLowQ2SuppSyst2020, khNFSISyst2020_MFP, khNFSISyst2020_EV1,
  kMECEnuShapeSyst2020Nu, kMECEnuShapeSyst2020AntiNu, kMECShapeSyst2020Nu, kMECShapeSyst2020AntiNu,
  kMECInitStateNPFracSyst2020Nu, kMECInitStateNPFracSyst2020AntiNu, kRadCorrNue, kRadCorrNuebar,
  k2ndClassCurrs, kUnCorrNDMuEScaleSyst2020, kUnCorrMuCatMuESyst2020, kPileupMuESyst2020,
  kCorrMuEScaleSyst2020, kNeutronVisEScalePrimariesSyst2018, kMichelTaggingSyst2020, kAna2020NormFHC,
  kAna2020NormRHC, kTauScaleSyst, kNorm_1Nux, kMeanQ0_1Nux,
  kMeanQ3_1Nux, kSigmaQ0_1Nux, kSigmaQ3_1Nux, kCorr_1Nux,
  kNorm_2Nux, kMeanQ0_2Nux, kMeanQ3_2Nux, kSigmaQ0_2Nux,
  kSigmaQ3_2Nux, kCorr_2Nux, kBaselineNux, kDISvpCC0pi_2020,
  kDISvpCC1pi_2020, kDISvpCC2pi_2020, kDISvpCC3pi_2020, kDISvpNC0pi_2020,
  kDISvpNC1pi_2020, kDISvpNC2pi_2020, kDISvpNC3pi_2020, kDISvnCC0pi_2020,
  kDISvnCC1pi_2020, kDISvnCC2pi_2020, kDISvnCC3pi_2020, kDISvnNC0pi_2020,
  kDISvnNC1pi_2020, kDISvnNC2pi_2020, kDISvnNC3pi_2020, kDISvbarpCC0pi_2020,
  kDISvbarpCC1pi_2020, kDISvbarpCC2pi_2020, kDISvbarpCC3pi_2020, kDISvbarpNC0pi_2020,
  kDISvbarpNC1pi_2020, kDISvbarpNC2pi_2020, kDISvbarpNC3pi_2020, kDISvbarnCC0pi_2020,
  kDISvbarnCC1pi_2020, kDISvbarnCC2pi_2020, kDISvbarnCC3pi_2020, kDISvbarnNC0pi_2020,
  kDISvbarnNC1pi_2020, kDISvbarnNC2pi_2020, kDISvbarnNC3pi_2020, kFormZone_2020,
  khNFSISyst2020_EV2, khNFSISyst2020_EV3, kCOHCCScaleSyst2018, kCOHNCScaleSyst2018,
  kMaNCEL, kEtaNCEL, kAhtBY, kBhtBY,
  kCV1uBY, kCV2uBY, kAGKY_xF1pi, kAGKY_pT1pi,
  kBR1gamma, kBR1eta, kTheta_Delta2Npi, kLastSigmaVar =kTheta_Delta2Npi
}
 
enum  par_type { kOscPar = 0, kCMFSystPar, kOtherSystPar, kUnknownPar }
 
enum  weight_type { kSystWgtOnly =0, kOscWgtOnly, kSystAndOscWgt, kAllWgt }
 

Functions

std::ostream & operator<< (std::ostream &o, cmf::Event const &event)
 
cmf::EventListColl::iterator FindEventList (cmf::MetaData const &md, cmf::EventListColl &eventListColl)
 
void SerializeEvents (TTree *eventTree, cmf::MetaData const &md, cmf::EventList const &events)
 
void SerializeEventListColl (std::string const &dirName, cmf::EventListColl const &listColl)
 
void FillSpectrumFromSingleList (cmf::EventList const &list, cmf::MetaData const &md, cmf::ExposureMap const &exposureMap, std::vector< float > &spectrum, std::vector< float > &count, bool applyExposureNorm)
 
void FillSpectrum (cmf::EventListColl const &eventLists, cmf::ExposureMap const &exposureMap, std::vector< float > &spectrum, std::vector< float > &count, cmf::InteractionType_t intType, bool applyExposureNorm)
 
void FillSpectrum (cmf::EventListColl const &eventLists, cmf::ExposureMap const &exposureMap, std::vector< float > &spectrum, std::vector< float > &count, bool applyExposureNorm)
 
std::ostream & operator<< (std::ostream &o, cmf::MCVarVals const &mcvv)
 
std::ostream & operator<< (std::ostream &o, cmf::SystVar const &sv)
 
std::ostream & operator<< (std::ostream &o, cmf::EventId const &evid)
 
std::ostream & operator<< (std::ostream &o, cmf::DataVarVals const &dvv)
 
static float RecoEnergy (float leptonicEnergy, float hadronicEnergy, cmf::MetaData const &md)
 
static float NuMuEnergy (float leptonicEnergy, float hadronicEnergy)
 
static float NuEEnergy (float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType)
 
static float NCEnergy (float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType, cmf::DetType_t const &detector)
 
static const std::set< cmf::DetType_tcDetIds ({cmf::kNEARDET, cmf::kFARDET})
 
static const std::set< cmf::BeamType_tcBeamTypes ({kFHC, kRHC})
 
static const std::map< std::string, uint8_t > kVarNameToKey ({{"NuE_CVN", cmf::kNuE_CVN},{"NuE_NumMichel", cmf::kNuE_NumMichel},{"Had_RecoE", cmf::kHad_RecoE},{"Lep_RecoE", cmf::kLep_RecoE},{"Nu_RecoE", cmf::kNu_RecoE},{"Lep_RecoE_MCFrac", cmf::kLep_RecoE_MCFrac},{"Reco_Q2", cmf::kRecoQ2},{"Fake_Weight", cmf::kFake_Weight},{"TrueE", cmf::kTrueE},{"TruePDG", cmf::kTruePDG},{"TrueCCNC", cmf::kTrueCCNC},{"TrueIntType", cmf::kTrueIntType},{"TruePDGOrig", cmf::kTruePDGOrig},{"TrueParentPDG", cmf::kTrueParentPDG},{"TrueParentPT", cmf::kTrueParentPT},{"TrueParentPZ", cmf::kTrueParentPZ},{"TrueParentDecay", cmf::kTrueParentDecay},{"TrueParentTargetPDG", cmf::kTrueParentTargetPDG},{"TrueHitNuc", cmf::kTrueHitNuc},{"TrueIntMode", cmf::kTrueIntMode},{"XsecCV2020", cmf::kXSecCV2020Wgt},{"PPFXFluxCV", cmf::kPPFXFluxCVWgt},{"RPARES", cmf::kRPARES_Weight},{"-2sigma", cmf::kMinus2Sigma},{"-1sigma", cmf::kMinus1Sigma},{"+1sigma", cmf::kPlus1Sigma},{"+2sigma", cmf::kPlus2Sigma},{"lightmodel-lightdown", cmf::kLightModelLightDownCalibUp},{"lightmodel-lightup", cmf::kLightModelLightUpCalibDown},{"ckv-proton", cmf::kCkvProtonShiftDown},{"RelativeCalibration", cmf::kRelativeCalibration},{"AbsoluteCalibration", cmf::kAbsoluteCalibration},{"CalibrationShape", cmf::kCalibShape},{"MaNCEL", cmf::kMaNCEL},{"EtaNCEL", cmf::kEtaNCEL},{"AhtBY", cmf::kAhtBY},{"BhtBY", cmf::kBhtBY},{"CV1uBY", cmf::kCV1uBY},{"CV2uBY", cmf::kCV2uBY},{"AGKY_xF1pi", cmf::kAGKY_xF1pi},{"AGKY_pT1pi", cmf::kAGKY_pT1pi},{"BR1gamma", cmf::kBR1gamma},{"BR1eta", cmf::kBR1eta},{"Theta_Delta2Npi", cmf::kTheta_Delta2Npi},{"MvCCRES", cmf::kMvCCRES},{"MaCCRES", cmf::kMaCCRES},{"MvNCRES", cmf::kMvNCRES},{"MaNCRES", cmf::kMaNCRES},{"RPACCQEshapeEnh", cmf::kRPACCQEshapeEnh},{"RPACCQEshapeSupp", cmf::kRPACCQEshapeSupp},{"COHCCScale2018", cmf::kCOHCCScaleSyst2018},{"COHNCScale2018", cmf::kCOHNCScaleSyst2018},{"ZExpAxialFFSyst2020_eV1", cmf::kZExpEV1Syst2020},{"ZExpAxialFFSyst2020_eV2", cmf::kZExpEV2Syst2020},{"ZExpAxialFFSyst2020_eV3", cmf::kZExpEV3Syst2020},{"ZExpAxialFFSyst2020_eV4", cmf::kZExpEV4Syst2020},{"ZNormCCQE", cmf::kZNormCCQE},{"RESLowQ2SuppSyst2020", cmf::kRESLowQ2SuppSyst2020},{"hNFSISyst2020_MFP", cmf::khNFSISyst2020_MFP},{"hNFSISyst2020_EV1", cmf::khNFSISyst2020_EV1},{"MECEnuShapeSyst2020Nu", cmf::kMECEnuShapeSyst2020Nu},{"MECEnuShapeSyst2020AntiNu", cmf::kMECEnuShapeSyst2020AntiNu},{"MECShapeSyst2020Nu", cmf::kMECShapeSyst2020Nu},{"MECShapeSyst2020AntiNu", cmf::kMECShapeSyst2020AntiNu},{"MECInitStateNPFracSyst2020Nu", cmf::kMECInitStateNPFracSyst2020Nu},{"MECInitStateNPFracSyst2020AntiNu", cmf::kMECInitStateNPFracSyst2020AntiNu},{"RadCorrNue", cmf::kRadCorrNue},{"RadCorrNuebar", cmf::kRadCorrNuebar},{"2ndClassCurrs", cmf::k2ndClassCurrs},{"GENIEPCA00", cmf::kGENIEPCA00},{"GENIEPCA01", cmf::kGENIEPCA01},{"GENIEPCA02", cmf::kGENIEPCA02},{"GENIEPCA03", cmf::kGENIEPCA03},{"GENIEPCA04", cmf::kGENIEPCA04},{"GENIEPCA05", cmf::kGENIEPCA05},{"GENIEPCA06", cmf::kGENIEPCA06},{"GENIEPCA07", cmf::kGENIEPCA07},{"GENIEPCA08", cmf::kGENIEPCA08},{"GENIEPCA09", cmf::kGENIEPCA09},{"GENIEPCA10", cmf::kGENIEPCA10},{"GENIEPCA11", cmf::kGENIEPCA11},{"UnCorrNDMuEScaleSyst2020", cmf::kUnCorrNDMuEScaleSyst2020},{"UnCorrMuCatMuESyst2020", cmf::kUnCorrMuCatMuESyst2020},{"PileupMuESyst2020", cmf::kPileupMuESyst2020},{"CorrMuEScaleSyst2020", cmf::kCorrMuEScaleSyst2020},{"NeutronVisEScalePrimariesSyst2018", cmf::kNeutronVisEScalePrimariesSyst2018},{"MichelTaggingSyst2020", cmf::kMichelTaggingSyst2020},{"Ana2020NormFHC", cmf::kAna2020NormFHC},{"Ana2020NormRHC", cmf::kAna2020NormRHC},{"Norm_1Nux", cmf::kNorm_1Nux},{"MeanQ0_1Nux", cmf::kMeanQ0_1Nux},{"MeanQ3_1Nux", cmf::kMeanQ3_1Nux},{"SigmaQ0_1Nux", cmf::kSigmaQ0_1Nux},{"SigmaQ3_1Nux", cmf::kSigmaQ3_1Nux},{"Corr_1Nux", cmf::kCorr_1Nux},{"Norm_2Nux", cmf::kNorm_2Nux},{"MeanQ0_2Nux", cmf::kMeanQ0_2Nux},{"MeanQ3_2Nux", cmf::kMeanQ3_2Nux},{"SigmaQ0_2Nux", cmf::kSigmaQ0_2Nux},{"SigmaQ3_2Nux", cmf::kSigmaQ3_2Nux},{"Corr_2Nux", cmf::kCorr_2Nux},{"BaselineNux", cmf::kBaselineNux},{"TauScaleSyst", cmf::kTauScaleSyst},{"DISvpCC0pi_2020", cmf::kDISvpCC0pi_2020},{"DISvpCC1pi_2020", cmf::kDISvpCC1pi_2020},{"DISvpCC2pi_2020", cmf::kDISvpCC2pi_2020},{"DISvpCC3pi_2020", cmf::kDISvpCC3pi_2020},{"DISvpNC0pi_2020", cmf::kDISvpNC0pi_2020},{"DISvpNC1pi_2020", cmf::kDISvpNC1pi_2020},{"DISvpNC2pi_2020", cmf::kDISvpNC2pi_2020},{"DISvpNC3pi_2020", cmf::kDISvpNC3pi_2020},{"DISvnCC0pi_2020", cmf::kDISvnCC0pi_2020},{"DISvnCC1pi_2020", cmf::kDISvnCC1pi_2020},{"DISvnCC2pi_2020", cmf::kDISvnCC2pi_2020},{"DISvnCC3pi_2020", cmf::kDISvnCC3pi_2020},{"DISvnNC0pi_2020", cmf::kDISvnNC0pi_2020},{"DISvnNC1pi_2020", cmf::kDISvnNC1pi_2020},{"DISvnNC2pi_2020", cmf::kDISvnNC2pi_2020},{"DISvnNC3pi_2020", cmf::kDISvnNC3pi_2020},{"DISvbarpCC0pi_2020", cmf::kDISvbarpCC0pi_2020},{"DISvbarpCC1pi_2020", cmf::kDISvbarpCC1pi_2020},{"DISvbarpCC2pi_2020", cmf::kDISvbarpCC2pi_2020},{"DISvbarpCC3pi_2020", cmf::kDISvbarpCC3pi_2020},{"DISvbarpNC0pi_2020", cmf::kDISvbarpNC0pi_2020},{"DISvbarpNC1pi_2020", cmf::kDISvbarpNC1pi_2020},{"DISvbarpNC2pi_2020", cmf::kDISvbarpNC2pi_2020},{"DISvbarpNC3pi_2020", cmf::kDISvbarpNC3pi_2020},{"DISvbarnCC0pi_2020", cmf::kDISvbarnCC0pi_2020},{"DISvbarnCC1pi_2020", cmf::kDISvbarnCC1pi_2020},{"DISvbarnCC2pi_2020", cmf::kDISvbarnCC2pi_2020},{"DISvbarnCC3pi_2020", cmf::kDISvbarnCC3pi_2020},{"DISvbarnNC0pi_2020", cmf::kDISvbarnNC0pi_2020},{"DISvbarnNC1pi_2020", cmf::kDISvbarnNC1pi_2020},{"DISvbarnNC2pi_2020", cmf::kDISvbarnNC2pi_2020},{"DISvbarnNC3pi_2020", cmf::kDISvbarnNC3pi_2020},{"FormZone_2020", cmf::kFormZone_2020},{"hNFSISyst2020_EV2", cmf::khNFSISyst2020_EV2},{"hNFSISyst2020_EV3", cmf::khNFSISyst2020_EV3},{"COHCCScaleSyst2018", cmf::kCOHCCScaleSyst2018},{"COHNCScaleSyst2018", cmf::kCOHNCScaleSyst2018}})
 
std::ostream & operator<< (std::ostream &o, cmf::FakeUniverse const &fu)
 
std::ostream & operator<< (std::ostream &o, cmf::GridPoint const &gp)
 
std::ostream & operator<< (std::ostream &o, cmf::OscParamPoint const &hpp)
 
std::ostream & operator<< (std::ostream &o, cmf::InputPoint const &ip)
 
std::ostream & operator<< (std::ostream &o, cmf::Parameter const &par)
 
std::ostream & operator<< (std::ostream &o, cmf::Location const &loc)
 
std::ostream & operator<< (std::ostream &o, cmf::PointResult const &pr)
 
static long DetectorTypeKey (cmf::DetType_t const &det)
 
static long PeriodKey (long const &ep)
 
static long FileTypeKey (cmf::FileType_t const &ft)
 
static long BeamTypeKey (cmf::BeamType_t const &bt)
 
static long SelectionTypeKey (cmf::SelectionType_t const &st)
 
static long InteractionTypeKey (cmf::InteractionType_t const &it)
 
static long DetectorBeamSelectionTypesToKey (cmf::DetType_t const &det, cmf::BeamType_t const &bt, cmf::SelectionType_t const &sel)
 
static cmf::DetType_t KeyToDetectorType (long const &key)
 
static int KeyToEpoch (long const &key)
 
static cmf::FileType_t KeyToFileType (long const &key)
 
static cmf::BeamType_t KeyToBeamType (long const &key)
 
static cmf::SelectionType_t KeyToSelectionType (long const &key)
 
static cmf::InteractionType_t KeyToInteractionType (long const &key)
 
static std::string KeyToString (long const &key)
 
static int BeamToPeriod (cmf::BeamType_t const &beam)
 
static cmf::SelectionType_t StringToSelectionType (std::string const &str)
 
static cmf::BeamType_t StringToBeamType (std::string const &str)
 
static cmf::DetType_t StringToDetectorType (std::string const &str)
 
static cmf::OscParm_t StringToOscParmType (std::string const &str)
 
static cmf::ChiSqrCalc_t StringToChiSqrType (std::string const &str)
 
static cmf::ContourType_t StringToContourType (std::string const &str)
 
static cmf::BeamType_t PeriodToBeamType (std::string const &str)
 
static bool IsOscillationParameter (std::string const &str)
 
static bool IsAngleParameter (cmf::OscParm_t const &par)
 
static bool IsNuMuSelected (cmf::SelectionType_t const &sel)
 
static bool IsNuMuQuantiles (cmf::SelectionType_t const &sel)
 
static bool IsNuESelected (cmf::SelectionType_t const &sel)
 
static uint8_t VarNameToKey (std::string const &name)
 
static std::string KeyToVarName (uint8_t const &key)
 
long StringToKey (std::string const &str)
 
long PeriodStringToInt (std::string const &epochStr)
 
std::ostream & operator<< (std::ostream &o, SpillSummary const &ss)
 
double FitFunction_ForROOT (const double *params)
 
void ParameterSetToLocation (fhicl::ParameterSet const &pset, cmf::DetType_t const &det, cmf::Location &loc)
 
void ParameterSetToLocation (fhicl::ParameterSet const &pset, cmf::DetType_t const &det, cmf::ParameterSpaceLoc &loc)
 
template<class T >
static bool readSingleResult (art::Results const &r, std::string const &module, std::string const &instance, std::vector< T > &resvec)
 
template<class T >
static bool readVectorResults (art::Results const &r, std::string const &module, std::string const &instance, std::vector< T > &resvec, bool clearResVec=true)
 
template<class T >
static bool readVectorResults (art::Results const &r, std::string const &module, std::vector< T > &resvec, bool clearResVec=true)
 

Variables

static ShifterAndWeightergShifterAndWeighter = nullptr
 
static double gWeight
 
static double gNormalization
 
static float gLepE
 
static float gRecoE
 
static float gLepMass
 
static float gHadE
 
static int gBin
 
static int gOffset
 
static const double kGarbageDouble = std::numeric_limits<double>::max()
 
static const float kGarbageFloat = std::numeric_limits<float >::max()
 
const std::string cDetType_Strings [5]
 
const std::string cBeamType_Strings [4]
 
const std::string cBeamType_LatexStrings [4]
 
const std::string cChiSqrCalcType_Strings [5]
 
const std::string cSelectionType_Strings [12]
 
const std::string cSelectionType_LatexStrings [12]
 
const std::string cInteractionType_LatexStrings [11]
 
const std::string cInteractionType_Strings [11]
 
const std::string cFileTypeStrings [10]
 
const std::string cFileTypeStrings_Latex [10]
 
const double cOscParams_Scales [kNumOscParams]
 
const std::string cOscParams_LatexScales [kNumOscParams]
 
const std::string cOscParams_Strings [kNumOscParams]
 
const std::string cOscParams_Strings_Latex [kNumOscParams]
 
const std::string cContourTypeStrings [5]
 
static const uint8_t kNumSigmaSysts = kLastSigmaVar - kFirstSigmaVar + 1
 
static CovarianceFitHelpergCovFitHelp = nullptr
 
std::unique_ptr< cmf::EventListCollgMCEventLists
 
std::unique_ptr< cmf::ExposureMapgExposureMap
 
std::unique_ptr< cmf::LocationgLoc
 
std::unique_ptr< std::vector< double > > gFFVals
 
std::unique_ptr< std::vector< std::string > > gFFNames
 
ROOT::Math::Minimizer * gFFMin
 
cmf::ChiSqrCalc_t gChiSqrCalc
 
double gMinChiSqr
 
int gMinStatus
 
static const double gPI = 3.141592653589793238462643383279502884
 
static SpectrumPredictionMakergLPU = nullptr
 
static ChiSqrCalculatorgChiSqrCalculator = nullptr
 
static CovarianceBinUtilitygCovBinUtil = nullptr
 
static ParameterUtilitygParUtil = nullptr
 
static PlotUtilitiesgPlotUtil = nullptr
 
static RandomUniverseUtilitygRUU = nullptr
 
static SelectionUtilitygSU = nullptr
 

Detailed Description

Module to combine a set of results into a single file currently only does one data product type at a time.

Create a set of Covariance matrices to be used in fits.

Use covariance matrices in fits.

Author
brebe.nosp@m.l@fn.nosp@m.al.go.nosp@m.v

Typedef Documentation

typedef std::vector<EventPtr> cmf::EventContainer

Definition at line 92 of file Event.h.

typedef std::vector<cmf::EventList> cmf::EventListColl

Definition at line 147 of file Event.h.

typedef std::unique_ptr<Event> cmf::EventPtr

Definition at line 91 of file Event.h.

Definition at line 215 of file Structs.h.

typedef std::vector<cmf::FakeUniverse> cmf::FakeUniColl

Definition at line 43 of file CMFContourFromLibrary_plugin.cc.

typedef std::map<cmf::OscParm_t, float > cmf::OscillationParameterMap

Definition at line 741 of file Constants.h.

typedef std::map<double, double> cmf::ParamChiSqr

Definition at line 740 of file Constants.h.

Definition at line 734 of file Constants.h.

Definition at line 19 of file Parameter.h.

typedef std::map<cmf::GridPoint, double> cmf::PointMap

Definition at line 43 of file GridPointResult.h.

typedef std::vector<float> cmf::Spectrum

Definition at line 739 of file Constants.h.

typedef std::vector<cmf::SystVar> cmf::SystVarColl

Definition at line 219 of file VarVals.h.

typedef std::map<cmf::GridPoint, std::vector<double> > cmf::UniverseChiSqrMap

Definition at line 44 of file GridPointResult.h.

Enumeration Type Documentation

Enumerator
kFHC 
kRHC 
k0HC 
kUnknownBeam 

Definition at line 41 of file Constants.h.

41  {
42  kFHC = 0,
43  kRHC,
44  k0HC,
46  } BeamType_t;
enum cmf::beam_type BeamType_t
Enumerator
kPMNS 
kNSI 
kSterile 

Definition at line 321 of file Constants.h.

321  {
322  kPMNS=0,
323  kNSI,
324  kSterile
325  } CalcType_t;
enum cmf::calc_type CalcType_t
Enumerator
kCovMat 
kPoisson 
kCNP 
kGauss 
kUnknownChiSqr 

Definition at line 62 of file Constants.h.

62  {
63  kCovMat = 0,
64  kPoisson,
65  kCNP,
66  kGauss,
68  } ChiSqrCalc_t;
enum cmf::chisqr_type ChiSqrCalc_t
Enumerator
kAsimovContour 
kMedianContour 
kFCContour 
kDataContour 
kUnknownContour 

Definition at line 337 of file Constants.h.

Enumerator
kStatMatrix 
kSystMatrix 
kTotalMatrix 

Definition at line 329 of file Constants.h.

329  {
330  kStatMatrix=0,
331  kSystMatrix,
333  }CovMat_t;
enum cmf::covmat_type CovMat_t
Enumerator
kData 
kMC 
kFakeData 
kBoth 

Definition at line 353 of file Constants.h.

353  {
354  kData = 0,
355  kMC,
356  kFakeData,
357  kBoth
358  } DataMC_t;
const Color_t kMC
enum cmf::dataMC_type DataMC_t
Enumerator
kUnknownDet 
kNEARDET 
kFARDET 
kMINOSNEAR 
kMINOSFAR 

Definition at line 21 of file Constants.h.

21  {
22  kUnknownDet = 0,
23  kNEARDET,
24  kFARDET,
25  kMINOSNEAR,
26  kMINOSFAR
27  }DetType_t;
enum cmf::det_type DetType_t
Enumerator
kBeam 
kSwap 
kTauSwap 
kDataFile 
kCosmicBackgroundFile 
kRockFluxSwap 
kRockNonSwap 
kNumFileTypes 
kBadFileType 
kUnknownFileType 

Definition at line 163 of file Constants.h.

Enumerator
kUnknownInteraction 
kNuMuCC 
kNuMuBarCC 
kNuECC 
kNuEBarCC 
kNuTauCC 
kNuTauBarCC 
kNC 
kCosmicMuon 
kRockMuon 
kUncategorised 

Definition at line 123 of file Constants.h.

Enumerator
kL 
kRho 
kDmsq21 
kDmsq32 
kTh12 
kTh13 
kTh23 
kdCP 
kTh14 
kTh24 
kTh34 
kDmsq41 
kd24 
kEps_ee 
kEps_emu 
kEps_etau 
kEps_mumu 
kEps_mutau 
kEps_tautau 
kDelta_emu 
kDelta_etau 
kDelta_mutau 
kNumOscParams 

Definition at line 201 of file Constants.h.

Enumerator
kOscPar 
kCMFSystPar 
kOtherSystPar 
kUnknownPar 

Definition at line 718 of file Constants.h.

718  {
719  kOscPar = 0,
720  kCMFSystPar,
723  } ParType_t;
enum cmf::par_type ParType_t
Enumerator
kNuESelection 
kNuESelectionLowPID 
kNuESelectionMidPID 
kNuESelectionHighPID 
kNuESelectionPeripheral 
kNuMuSelection 
kNuMuSelectionQ1 
kNuMuSelectionQ2 
kNuMuSelectionQ3 
kNuMuSelectionQ4 
kNCSelection 
kUnknownSelection 

Definition at line 78 of file Constants.h.

Enumerator
kUnknownVar 
kNuE_CVN 
kNuE_NumMichel 
kHad_RecoE 
kLep_RecoE 
kNu_RecoE 
kLep_RecoE_MCFrac 
kRecoQ2 
kFake_Weight 
kTrueE 
kTruePDG 
kTrueCCNC 
kTrueIntType 
kTruePDGOrig 
kTrueParentPDG 
kTrueParentPT 
kTrueParentPZ 
kTrueParentDecay 
kTrueParentTargetPDG 
kTrueHitNuc 
kTrueIntMode 
kXSecCVPPFX_Weight 
kXSecCV2020Wgt 
kPPFXFluxCVWgt 
kRPACCQE_Weight 
kRPARES_Weight 
kDISvnCC1pi_Weight 
kEmpiricalMEC_Weight 
kEmpiricalMECtoGENIEQE_Weight 
kEmpiricalMECtoGENIERES_Weight 
kOtherDIS_Weight 
kLightModelLightDownCalibUp 
kLightModelLightUpCalibDown 
kCkvProtonShiftDown 
kRelativeCalibration 
kAbsoluteCalibration 
kCalibShape 
kMinus2Sigma 
kMinus1Sigma 
kPlus1Sigma 
kPlus2Sigma 
kFirstSigmaVar 
kMaCCRES 
kMvCCRES 
kMaNCRES 
kMvNCRES 
kRPACCQEshapeEnh 
kRPACCQEshapeSupp 
kGENIEPCA00 
kGENIEPCA01 
kGENIEPCA02 
kGENIEPCA03 
kGENIEPCA04 
kGENIEPCA05 
kGENIEPCA06 
kGENIEPCA07 
kGENIEPCA08 
kGENIEPCA09 
kGENIEPCA10 
kGENIEPCA11 
kZNormCCQE 
kZExpEV1Syst2020 
kZExpEV2Syst2020 
kZExpEV3Syst2020 
kZExpEV4Syst2020 
kRESLowQ2SuppSyst2020 
khNFSISyst2020_MFP 
khNFSISyst2020_EV1 
kMECEnuShapeSyst2020Nu 
kMECEnuShapeSyst2020AntiNu 
kMECShapeSyst2020Nu 
kMECShapeSyst2020AntiNu 
kMECInitStateNPFracSyst2020Nu 
kMECInitStateNPFracSyst2020AntiNu 
kRadCorrNue 
kRadCorrNuebar 
k2ndClassCurrs 
kUnCorrNDMuEScaleSyst2020 
kUnCorrMuCatMuESyst2020 
kPileupMuESyst2020 
kCorrMuEScaleSyst2020 
kNeutronVisEScalePrimariesSyst2018 
kMichelTaggingSyst2020 
kAna2020NormFHC 
kAna2020NormRHC 
kTauScaleSyst 
kNorm_1Nux 
kMeanQ0_1Nux 
kMeanQ3_1Nux 
kSigmaQ0_1Nux 
kSigmaQ3_1Nux 
kCorr_1Nux 
kNorm_2Nux 
kMeanQ0_2Nux 
kMeanQ3_2Nux 
kSigmaQ0_2Nux 
kSigmaQ3_2Nux 
kCorr_2Nux 
kBaselineNux 
kDISvpCC0pi_2020 
kDISvpCC1pi_2020 
kDISvpCC2pi_2020 
kDISvpCC3pi_2020 
kDISvpNC0pi_2020 
kDISvpNC1pi_2020 
kDISvpNC2pi_2020 
kDISvpNC3pi_2020 
kDISvnCC0pi_2020 
kDISvnCC1pi_2020 
kDISvnCC2pi_2020 
kDISvnCC3pi_2020 
kDISvnNC0pi_2020 
kDISvnNC1pi_2020 
kDISvnNC2pi_2020 
kDISvnNC3pi_2020 
kDISvbarpCC0pi_2020 
kDISvbarpCC1pi_2020 
kDISvbarpCC2pi_2020 
kDISvbarpCC3pi_2020 
kDISvbarpNC0pi_2020 
kDISvbarpNC1pi_2020 
kDISvbarpNC2pi_2020 
kDISvbarpNC3pi_2020 
kDISvbarnCC0pi_2020 
kDISvbarnCC1pi_2020 
kDISvbarnCC2pi_2020 
kDISvbarnCC3pi_2020 
kDISvbarnNC0pi_2020 
kDISvbarnNC1pi_2020 
kDISvbarnNC2pi_2020 
kDISvbarnNC3pi_2020 
kFormZone_2020 
khNFSISyst2020_EV2 
khNFSISyst2020_EV3 
kCOHCCScaleSyst2018 
kCOHNCScaleSyst2018 
kMaNCEL 
kEtaNCEL 
kAhtBY 
kBhtBY 
kCV1uBY 
kCV2uBY 
kAGKY_xF1pi 
kAGKY_pT1pi 
kBR1gamma 
kBR1eta 
kTheta_Delta2Npi 
kLastSigmaVar 

Definition at line 365 of file Constants.h.

365  {
366  kUnknownVar = 0,
367 
368  // Data info - kFake_Weight is in this group because it only applies to fake data
369  kNuE_CVN,
371  kHad_RecoE,
372  kLep_RecoE,
373  kNu_RecoE,
375  kRecoQ2,
376  kFake_Weight,
377 
378  // Truth information
379  kTrueE,
380  kTruePDG,
381  kTrueCCNC,
382  kTrueIntType,
383  kTruePDGOrig,
389  kTrueHitNuc,
390  kTrueIntMode,
391 
392  // MC Reweighting info
396  kRPACCQE_Weight, // TODO: deprecated, delete
398  kDISvnCC1pi_Weight, // TODO: deprecated, delete
399  kEmpiricalMEC_Weight, // TODO: deprecated, delete
400  kEmpiricalMECtoGENIEQE_Weight, // TODO: deprecated, delete
401  kEmpiricalMECtoGENIERES_Weight, // TODO: deprecated, delete
402  kOtherDIS_Weight, // TODO: deprecated, delete
403 
404  // calibration related uncertainties
410  kCalibShape,
411 
412  // Systematic uncertainties where we store -2, -1, +1, +2 sigma values
413  kMinus2Sigma,
414  kMinus1Sigma,
415  kPlus1Sigma,
416  kPlus2Sigma,
419  kMvCCRES,
420  kMaNCRES,
421  kMvNCRES,
424 
425  // new for 2020
426  kGENIEPCA00,
427  kGENIEPCA01,
428  kGENIEPCA02,
429  kGENIEPCA03,
430  kGENIEPCA04,
431  kGENIEPCA05,
432  kGENIEPCA06,
433  kGENIEPCA07,
434  kGENIEPCA08,
435  kGENIEPCA09,
436  kGENIEPCA10,
437  kGENIEPCA11,
438  kZNormCCQE,
452  kRadCorrNue,
464  kNorm_1Nux,
465  kMeanQ0_1Nux,
466  kMeanQ3_1Nux,
469  kCorr_1Nux,
470  kNorm_2Nux,
471  kMeanQ0_2Nux,
472  kMeanQ3_2Nux,
475  kCorr_2Nux,
476  kBaselineNux,
477 
515  kMaNCEL,
516  kEtaNCEL,
517  kAhtBY,
518  kBhtBY,
519  kCV1uBY,
520  kCV2uBY,
521  kAGKY_xF1pi,
522  kAGKY_pT1pi,
523  kBR1gamma,
524  kBR1eta,
527 
528  // The following variables are not currently used
529  //----------------
530  // kVecCCQE_shape,
531  // kMaCOHpi,
532  // kR0COHpi,
533  // kNormDISCC,
534  // kRnubarnuCC,
535  // kDISNuclMod,
536  // kMFP_pi,
537  // kMFP_N,
538  // kFrCEx_pi,
539  // kFrElas_pi,
540  // kFrAbs_pi,
541  // kFrPiProd_pi,
542  // kFrInel_N,
543  // kFrPiProd_N,
544  // kCCQEMomDistroFGtoSF,
545 
546  /* kNormCCQE_EnuDep , */
547  /* kNormCCRES , */
548  /* kMaCCRES_shape , */
549  /* kMvCCRES_shape , */
550  /* kNormNCRES , */
551  /* kMaNCRES_shape , */
552  /* kMvNCRES_shape , */
553  /* kNCGENIE , */
554  /* kNormCCQE , */
555  /* kMaCCQE_shape , */
556  /* kRvpCC1pi , */
557  /* kRvpCC2pi , */
558  /* kRvpNC1pi , */
559  /* kRvpNC2pi , */
560  /* kRvnCC1pi , */
561  /* kRvnCC2pi , */
562  /* kRvnNC1pi , */
563  /* kRvnNC2pi , */
564  /* kRvbarpCC1pi , */
565  /* kRvbarpCC2pi , */
566  /* kRvbarpNC1pi , */
567  /* kRvbarpNC2pi , */
568  /* kRvbarnCC1pi , */
569  /* kRvbarnCC2pi , */
570  /* kRvbarnNC1pi , */
571  /* kRvbarnNC2pi , */
572  };
Enumerator
kSystWgtOnly 
kOscWgtOnly 
kSystAndOscWgt 
kAllWgt 

Definition at line 725 of file Constants.h.

725  {
726  kSystWgtOnly=0,
727  kOscWgtOnly,
729  kAllWgt
730  } WeightType_t;
enum cmf::weight_type WeightType_t

Function Documentation

static int cmf::BeamToPeriod ( cmf::BeamType_t const &  beam)
inlinestatic

Definition at line 236 of file StaticFuncs.h.

References kFHC, and kRHC.

Referenced by InteractionTypeKey(), and cmf::SelectionUtility::SelectionsToUseAsMetaData().

237 {
238  if (beam == cmf::kFHC) return 1;
239  else if(beam == cmf::kRHC) return 4;
240 
241  return 0;
242 }
static long cmf::BeamTypeKey ( cmf::BeamType_t const &  bt)
inlinestatic

Definition at line 18 of file StaticFuncs.h.

Referenced by cmf::MetaData::BeamTypeKey(), DetectorBeamSelectionTypesToKey(), KeyToInteractionType(), and KeyToSelectionType().

18 { return (bt + 1) * 10000; }
static const std::set<cmf::BeamType_t> cmf::cBeamTypes ( {kFHC, kRHC )
static
static const std::set<cmf::DetType_t> cmf::cDetIds ( {cmf::kNEARDET, cmf::kFARDET )
static
static long cmf::DetectorBeamSelectionTypesToKey ( cmf::DetType_t const &  det,
cmf::BeamType_t const &  bt,
cmf::SelectionType_t const &  sel 
)
inlinestatic
static long cmf::DetectorTypeKey ( cmf::DetType_t const &  det)
inlinestatic
static long cmf::FileTypeKey ( cmf::FileType_t const &  ft)
inlinestatic

Definition at line 17 of file StaticFuncs.h.

Referenced by cmf::MetaData::FileKey(), KeyToBeamType(), KeyToInteractionType(), KeyToSelectionType(), and StringToKey().

17 { return (ft + 1) * 100000; }
void cmf::FillSpectrum ( cmf::EventListColl const &  eventLists,
cmf::ExposureMap const &  exposureMap,
std::vector< float > &  spectrum,
std::vector< float > &  count,
cmf::InteractionType_t  intType,
bool  applyExposureNorm 
)

Definition at line 148 of file SpectrumTools.cxx.

References FillSpectrumFromSingleList(), cmf::CovarianceBinUtility::Instance(), and fetch_tb_beamline_files::md.

Referenced by cmf::CovarianceMatrixFitter::FillDataSpectrum(), cmf::CovarianceFitHelper::FillDataSpectrum(), cmf::CMFSpectraMaker::FillHistograms(), cmf::CovarianceFitHelper::FillMCSpectrum(), cmf::CovarianceMatrixMaker::FillSpectrum(), cmf::SpectrumPredictionMaker::MakePredictions(), cmf::CMFDecorrelator::writeResults(), and cmf::RandomUniverses::writeResults().

154  {
155 
156  // resize the spectrum if it is empty
157  if(spectrum.size() == 0){
158  spectrum.resize(cmf::CovarianceBinUtility::Instance()->TotalBins(), 0.);
159  count .resize(cmf::CovarianceBinUtility::Instance()->TotalBins(), 0.);
160  }
161 
162  // loop over each list and fill the spectrum
163  for(auto const& itr : eventLists){
164  auto const& md = itr.ListMetaData();
165 
166  if(md.interactionType != intType) continue;
167 
169  md,
170  exposureMap,
171  spectrum,
172  count,
173  applyExposureNorm);
174  } // end loop over lists of events
175 
176  }
void FillSpectrumFromSingleList(cmf::EventList const &list, cmf::MetaData const &md, cmf::ExposureMap const &exposureMap, std::vector< float > &spectrum, std::vector< float > &count, bool applyExposureNorm)
static CovarianceBinUtility * Instance()
void cmf::FillSpectrum ( cmf::EventListColl const &  eventLists,
cmf::ExposureMap const &  exposureMap,
std::vector< float > &  spectrum,
std::vector< float > &  count,
bool  applyExposureNorm 
)

Definition at line 179 of file SpectrumTools.cxx.

References FillSpectrumFromSingleList(), cmf::CovarianceBinUtility::Instance(), and fetch_tb_beamline_files::md.

184  {
185  // resize the spectrum if it is empty
186  if(spectrum.size() == 0){
187  spectrum.resize(cmf::CovarianceBinUtility::Instance()->TotalBins(), 0.);
188  count .resize(cmf::CovarianceBinUtility::Instance()->TotalBins(), 0.);
189  }
190 
191  // loop over each list and fill the spectrum
192  for(auto const& itr : eventLists){
193  auto const& md = itr.ListMetaData();
194 
196  md,
197  exposureMap,
198  spectrum,
199  count,
200  applyExposureNorm);
201  } // end loop over lists of events
202  }
void FillSpectrumFromSingleList(cmf::EventList const &list, cmf::MetaData const &md, cmf::ExposureMap const &exposureMap, std::vector< float > &spectrum, std::vector< float > &count, bool applyExposureNorm)
static CovarianceBinUtility * Instance()
void cmf::FillSpectrumFromSingleList ( cmf::EventList const &  list,
cmf::MetaData const &  md,
cmf::ExposureMap const &  exposureMap,
std::vector< float > &  spectrum,
std::vector< float > &  count,
bool  applyExposureNorm 
)

Definition at line 29 of file SpectrumTools.cxx.

References cmf::MetaData::detector, cmf::MetaData::DetectorBeamSelectionKey(), cmf::CovarianceBinUtility::EnergyToBin(), evt, cmf::MetaData::fileType, cmf::ShifterAndWeighter::FractionalShift(), gBin, gLepMass, gNormalization, cmf::SpillSummary::goodPOT, gWeight, cmf::CovarianceBinUtility::Instance(), cmf::ShifterAndWeighter::Instance(), cmf::MetaData::isMC, cmf::MetaData::IsNuMuSelected(), kCosmicBackgroundFile, kDataFile, cmf::CovarianceBinUtility::KeyToOffset(), kHad_RecoE, kLep_RecoE, kUnknownInteraction, cmf::EventList::ListSpillSummary(), cmf::SpillSummary::liveTime, LOG_DEBUG, cmf::MetaData::period, RecoEnergy(), cmf::MetaData::selectionType, cmf::MetaData::ToString(), and cmf::ShifterAndWeighter::Weight().

Referenced by FillSpectrum().

35  {
36 
37  // figure out the offset for this metadata
38  gOffset = cmf::CovarianceBinUtility::Instance()->KeyToOffset(md.DetectorBeamSelectionKey());
39 
40  if(!md.isMC){
41  // fill the spectrum
42  for(auto const& evt : list){
43  gLepE = evt->DataVals().val_at(cmf::kLep_RecoE, md);
44  gHadE = evt->DataVals().val_at(cmf::kHad_RecoE, md);
45 
47 
49 
50  ++spectrum[gBin];
51  ++count[gBin];
52  } // end loop over the events
53  } // end if looking at a data lists
54  else{
55 
56  // the exposure maps are stored for the data, not MC, so create
57  // a temporary md to get the proper exposure
58  cmf::MetaData tmpmd(false,
59  md.detector,
61  md.selectionType,
63  md.period);
64 
65  if (applyExposureNorm){
66  auto const exItr = exposureMap.find(cmf::MetaData(tmpmd));
67  if (md.fileType == kCosmicBackgroundFile){
68  gNormalization = (exItr != exposureMap.end()) ? exItr->second.liveTime : 0.;
69  gNormalization /= list.ListSpillSummary().liveTime;
70  }
71  else {
72  gNormalization = (exItr != exposureMap.end()) ? exItr->second.goodPOT : 0.;
73  gNormalization /= list.ListSpillSummary().goodPOT;
74  }
75 
76  LOG_DEBUG("SpectrumTools")
77  << md.ToString()
78  << " bin offset: "
79  << gOffset
80  << " exposure "
81  << exItr->second.goodPOT
82  << " spill summary "
83  << list.ListSpillSummary().goodPOT
84  << " normalization "
85  << gNormalization;
86 
87  }
88  else gNormalization = 1;
89 
90  // for nu_mu energy we have to subtract off the muon rest mass before
91  // scaling, but we can figure out the rest mass before looping over any
92  // events
93  gLepMass = (md.IsNuMuSelected()) ? 0.1056583668 : 0.;
94 
95  // fill the spectrum
96  for(auto const& evt : list){
97 
99  md);
100 
101  // get any shifts to the hadronic and leptonic energy
102  gLepE = evt->DataVals().val_at(cmf::kLep_RecoE, md) - gLepMass;
104  gLepE += gLepMass;
105  gHadE = (evt->DataVals().val_at(cmf::kHad_RecoE, md) *
107 
109 
110  if(gRecoE < cmf::CovarianceBinUtility::Instance()->SelectionLowEdge(md) ) continue;
111 
113 
114  // if(std::isnan(gWeight))
115  // LOG_VERBATIM("SpectrumTools")
116  // << "FillSpectrumFromSingleList "
117  // << md.ToString()
118  // << " "
119  // << md.IsCosmicMuon()
120  // << " "
121  // << evt->MCValsFilled()
122  // << " "
123  // << evt->DataVals().DataVars().fFake_Weight
124  // << " "
125  // << evt->DataVals().val_at(cmf::kFake_Weight, md)
126  // << " "
127  // << gLepE
128  // << " "
129  // << gHadE
130  // << " "
131  // << gRecoE
132  // << " "
133  // << gBin
134  // << " "
135  // << gWeight
136  // << " "
137  // << gNormalization;
138 
139  spectrum[gBin] += gNormalization * gWeight;
140  ++count[gBin];
141  } // end loop over events
142  } // end if looking at a MC event list
143 
144  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
int KeyToOffset(long const &key, bool allSels=false)
static double gNormalization
static float gRecoE
double Weight(cmf::EventPtr const &curEvent, cmf::MetaData const &md)
static double gWeight
int EnergyToBin(double const &energy, cmf::MetaData const &md)
static int gOffset
int evt
static ShifterAndWeighter * Instance()
static float RecoEnergy(float leptonicEnergy, float hadronicEnergy, cmf::MetaData const &md)
Definition: VarVals.h:313
static float gHadE
static float gLepMass
static float gLepE
float FractionalShift(uint8_t const &param)
static int gBin
static CovarianceBinUtility * Instance()
cmf::EventListColl::iterator cmf::FindEventList ( cmf::MetaData const &  md,
cmf::EventListColl eventListColl 
)

Definition at line 44 of file Event.cxx.

References fetch_tb_beamline_files::md.

Referenced by cmf::EventList::AddEvent(), cmf::EventListManipulator::Deserialize(), cmf::CAFToEventList::endJob(), and cmf::CAFToEventList::InitializeEventListColls().

46  {
47  for(auto itr = eventListColl.begin(); itr < eventListColl.end(); ++itr){
48  if( itr->ListMetaData() == md) return itr;
49  }
50 
51  return eventListColl.end();
52  }
double cmf::FitFunction_ForROOT ( const double *  params)

Definition at line 50 of file CovarianceFitHelper.cxx.

References cmf::CovarianceFitHelper::AddIteration(), cmf::ChiSqrCalculator::ChiSqr(), cmf::CovarianceFitHelper::FillMCSpectrum(), MECModelEnuComparisons::i, cmf::ChiSqrCalculator::Instance(), cmf::CovarianceFitHelper::Instance(), cmf::ShifterAndWeighter::Instance(), IsAngleParameter(), LOG_DEBUG, LOG_VERBATIM, cet::pow(), cmf::ShifterAndWeighter::SetCurrentVals(), std::sin(), and StringToOscParmType().

Referenced by cmf::CovarianceFitHelper::InitializeMinimizer().

51  {
52  // debug
53  LOG_VERBATIM("CovarianceFit") << "Processing guess: ";
54 
55  for(size_t i = 0; i < gFFVals->size(); ++i){
56  (*gFFVals)[i] = params[i];
57 
59  LOG_VERBATIM("CovarianceFit")
60  << "\t"
61  << (*gFFNames)[i]
62  << " : "
63  << params[i]
64  << "; sin^2("
65  << (*gFFNames)[i]
66  << "): "
67  << std::pow(std::sin(params[i]), 2.);
68  else if ((*gFFNames)[i] == "dCP")
69  LOG_VERBATIM("CovarianceFit")
70  << "\t"
71  << (*gFFNames)[i]
72  << " : "
73  << params[i]
74  << " = "
75  << params[i] / gPI
76  << " (pi)";
77  else
78  LOG_VERBATIM("CovarianceFit")
79  << "\t"
80  << (*gFFNames)[i]
81  << " : "
82  << params[i];
83  }
84 
85  // Now update the ShifterAndWeighter to check the goodness of fit
87  gFFVals->data());
88 
89  LOG_DEBUG("CovarianceMatrixFitter")
90  << "fill the MC spectrum with the new values";
91 
92  // fill the MC spectrum
94 
95  LOG_DEBUG("CovarianceMatrixFitter")
96  << "get the new chi^2";
97 
98  // Get Chisq
100  *gFFNames,
101  gFFVals->data());
102 
103  LOG_DEBUG("CovarianceMatrixFitter")
104  << "add to the iterations";
105 
106  // store this iteration of the fitter
108  *gFFNames,
109  *gFFVals,
110  gChiSqrCalc);
111 
112  LOG_VERBATIM("CovarianceFit")
113  << "\t"
114  << "FitValue = "
115  << chisq;
116 
117  // Return the fit value; that's what we're looking to minimize
118  return chisq;
119  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
constexpr T pow(T x)
Definition: pow.h:75
static bool IsAngleParameter(cmf::OscParm_t const &par)
Definition: StaticFuncs.h:346
static ShifterAndWeighter * Instance()
static cmf::ChiSqrCalculator * Instance()
double ChiSqr(cmf::ChiSqrCalc_t const &chiSqrCalc, std::vector< std::string > const &pars, const double *vals)
static CovarianceFitHelper * Instance()
void FillMCSpectrum(cmf::EventListColl const &eventLists)
std::unique_ptr< cmf::EventListColl > gMCEventLists
void AddIteration(double const &chi2, std::vector< std::string > const &pars, std::vector< double > const &vals, cmf::ChiSqrCalc_t const &chiSqrCalc=cmf::kCovMat)
T sin(T number)
Definition: d0nt_math.hpp:132
static const double gPI
std::unique_ptr< std::vector< double > > gFFVals
#define LOG_VERBATIM(category)
cmf::ChiSqrCalc_t gChiSqrCalc
void SetCurrentVals(cmf::Location const &loc)
static cmf::OscParm_t StringToOscParmType(std::string const &str)
std::unique_ptr< std::vector< std::string > > gFFNames
static long cmf::InteractionTypeKey ( cmf::InteractionType_t const &  it)
inlinestatic
static bool cmf::IsAngleParameter ( cmf::OscParm_t const &  par)
inlinestatic
static bool cmf::IsNuESelected ( cmf::SelectionType_t const &  sel)
inlinestatic
static bool cmf::IsNuMuQuantiles ( cmf::SelectionType_t const &  sel)
inlinestatic
static bool cmf::IsNuMuSelected ( cmf::SelectionType_t const &  sel)
inlinestatic
static bool cmf::IsOscillationParameter ( std::string const &  str)
static
static cmf::BeamType_t cmf::KeyToBeamType ( long const &  key)
inlinestatic

Definition at line 132 of file StaticFuncs.h.

References DetectorTypeKey(), mkDefs::fileType, FileTypeKey(), KeyToDetectorType(), KeyToEpoch(), KeyToFileType(), kUnknownBeam, kUnknownDet, kUnknownFileType, LOG_DEBUG, and PeriodKey().

Referenced by cmf::CovarianceBinUtility::BinToBeamType(), cmf::ChiSqrCalculator::FindReducedMatrixBin(), InteractionTypeKey(), KeyToInteractionType(), cmf::CovarianceBinUtility::KeyToOffset(), KeyToSelectionType(), and KeyToString().

133 {
134  auto detType = cmf::KeyToDetectorType(key);
136  auto epoch = cmf::KeyToEpoch(key);
137 
138  long tmpKey = key - cmf::PeriodKey(epoch);
139 
140  if(detType != cmf::kUnknownDet ) tmpKey -= cmf::DetectorTypeKey(detType);
142 
143  if(tmpKey < 10000) return cmf::kUnknownBeam;
144 
145  LOG_DEBUG("StaticFuncs")
146  << "KeyToBeam: "
147  << key
148  << " "
149  << detType
150  << "/"
151  << cmf::DetectorTypeKey(detType)
152  << " "
153  << fileType
154  << "/"
156  << " "
157  << tmpKey
158  << " "
159  << (tmpKey / 10000) - 1;
160 
161 
162  return (cmf::BeamType_t)((tmpKey / 10000) - 1);
163 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:15
fileType
Definition: mkDefs.py:112
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:16
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:105
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:80
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:17
enum cmf::beam_type BeamType_t
static cmf::DetType_t cmf::KeyToDetectorType ( long const &  key)
inlinestatic

Definition at line 66 of file StaticFuncs.h.

References kUnknownDet, and LOG_DEBUG.

Referenced by cmf::CovarianceBinUtility::BinToDetector(), cmf::ChiSqrCalculator::FindReducedMatrixBin(), InteractionTypeKey(), KeyToBeamType(), KeyToEpoch(), KeyToFileType(), KeyToInteractionType(), cmf::CovarianceBinUtility::KeyToOffset(), KeyToSelectionType(), KeyToString(), cmf::CovarianceBinUtility::SelectionBinToEnergy(), and cmf::CovarianceBinUtility::SelectionHighEdges().

67 {
68  if(key < 1000000000) return cmf::kUnknownDet;
69 
70  LOG_DEBUG("StaticFuncs")
71  << "KeyToDetector: "
72  << key
73  << " "
74  << (key / 1000000000);
75 
76  return (cmf::DetType_t)(key / 1000000000);
77 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
enum cmf::det_type DetType_t
static int cmf::KeyToEpoch ( long const &  key)
inlinestatic

Definition at line 80 of file StaticFuncs.h.

References DetectorTypeKey(), findDuplicateFiles::key, KeyToDetectorType(), kUnknownDet, and LOG_DEBUG.

Referenced by InteractionTypeKey(), KeyToBeamType(), KeyToFileType(), KeyToInteractionType(), KeyToSelectionType(), and KeyToString().

81 {
82  auto detType = cmf::KeyToDetectorType(key);
83 
84  long tmpKey = key;
85  if(detType != cmf::kUnknownDet) tmpKey -= cmf::DetectorTypeKey(detType);
86 
87  if(tmpKey < 10000000) return 0;
88 
89  LOG_DEBUG("StaticFuncs")
90  << "KeyToEpoch: "
91  << key
92  << " "
93  << detType
94  << "/"
95  << cmf::DetectorTypeKey(detType)
96  << " "
97  << tmpKey
98  << " "
99  << (tmpKey / 10000000);
100 
101  return (tmpKey / 10000000);
102 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:15
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
static cmf::FileType_t cmf::KeyToFileType ( long const &  key)
inlinestatic

Definition at line 105 of file StaticFuncs.h.

References DetectorTypeKey(), KeyToDetectorType(), KeyToEpoch(), kUnknownDet, kUnknownFileType, LOG_DEBUG, and PeriodKey().

Referenced by InteractionTypeKey(), KeyToBeamType(), KeyToInteractionType(), KeyToSelectionType(), and KeyToString().

106 {
107  auto detType = cmf::KeyToDetectorType(key);
108  auto epoch = cmf::KeyToEpoch(key);
109 
110  // if the epoch is not part of the key, KeyToEpoch returns 0
111  long tmpKey = key - cmf::PeriodKey(epoch);
112  if(detType != cmf::kUnknownDet) tmpKey -= cmf::DetectorTypeKey(detType);
113 
114  if(tmpKey < 100000) return cmf::kUnknownFileType;
115 
116  LOG_DEBUG("StaticFuncs")
117  << "KeyToFile: "
118  << key
119  << " "
120  << detType
121  << "/"
122  << cmf::DetectorTypeKey(detType)
123  << " "
124  << tmpKey
125  << " "
126  << (tmpKey / 100000) - 1;
127 
128  return (cmf::FileType_t)((tmpKey / 100000) - 1);
129 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:15
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:16
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:80
enum cmf::file_type FileType_t
static cmf::InteractionType_t cmf::KeyToInteractionType ( long const &  key)
inlinestatic

Definition at line 204 of file StaticFuncs.h.

References BeamTypeKey(), DetectorTypeKey(), mkDefs::fileType, FileTypeKey(), KeyToBeamType(), KeyToDetectorType(), KeyToEpoch(), KeyToFileType(), KeyToSelectionType(), kUnknownBeam, kUnknownDet, kUnknownFileType, kUnknownInteraction, kUnknownSelection, PeriodKey(), and SelectionTypeKey().

Referenced by InteractionTypeKey(), and KeyToString().

205 {
206  auto detType = cmf::KeyToDetectorType(key);
207  auto beamType = cmf::KeyToBeamType(key);
209  auto selType = cmf::KeyToSelectionType(key);
210  auto epoch = cmf::KeyToEpoch(key);
211 
212  long tmpKey = key - cmf::PeriodKey(epoch);
213  if(detType != cmf::kUnknownDet ) tmpKey -= cmf::DetectorTypeKey(detType);
214  if(beamType != cmf::kUnknownBeam ) tmpKey -= cmf::BeamTypeKey(beamType);
216  if(selType != cmf::kUnknownSelection) tmpKey -= cmf::SelectionTypeKey(selType);
217 
218  if(tmpKey < 1) return cmf::kUnknownInteraction;
219 
220  return (cmf::InteractionType_t)(tmpKey);
221 }
enum cmf::interaction_type InteractionType_t
static long SelectionTypeKey(cmf::SelectionType_t const &st)
Definition: StaticFuncs.h:19
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:15
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:132
fileType
Definition: mkDefs.py:112
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:16
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:105
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:80
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:17
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:166
static long BeamTypeKey(cmf::BeamType_t const &bt)
Definition: StaticFuncs.h:18
static cmf::SelectionType_t cmf::KeyToSelectionType ( long const &  key)
inlinestatic

Definition at line 166 of file StaticFuncs.h.

References BeamTypeKey(), DetectorTypeKey(), mkDefs::fileType, FileTypeKey(), KeyToBeamType(), KeyToDetectorType(), KeyToEpoch(), KeyToFileType(), kUnknownBeam, kUnknownDet, kUnknownFileType, kUnknownSelection, LOG_DEBUG, and PeriodKey().

Referenced by cmf::CovarianceBinUtility::BinToSelection(), cmf::ChiSqrCalculator::FindReducedMatrixBin(), InteractionTypeKey(), KeyToInteractionType(), cmf::CovarianceBinUtility::KeyToOffset(), KeyToString(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), cmf::CovarianceBinUtility::SelectionBinToEnergy(), and cmf::CovarianceBinUtility::SelectionHighEdges().

167 {
168  auto detType = cmf::KeyToDetectorType(key);
169  auto beamType = cmf::KeyToBeamType(key);
171  auto epoch = cmf::KeyToEpoch(key);
172 
173  long tmpKey = key - cmf::PeriodKey(epoch);
174  if(detType != cmf::kUnknownDet ) tmpKey -= cmf::DetectorTypeKey(detType);
175  if(beamType != cmf::kUnknownBeam ) tmpKey -= cmf::BeamTypeKey(beamType);
177 
178  if(tmpKey < 100) return cmf::kUnknownSelection;
179 
180  LOG_DEBUG("StaticFuncs")
181  << "KeyToSelection: "
182  << key
183  << " "
184  << detType
185  << "/"
186  << cmf::DetectorTypeKey(detType)
187  << " "
188  << beamType
189  << "/"
190  << cmf::BeamTypeKey(beamType)
191  << " "
192  << fileType
193  << "/"
195  << " "
196  << tmpKey
197  << " "
198  << (tmpKey / 100) - 1;
199 
200  return (cmf::SelectionType_t)((tmpKey / 100) - 1);
201 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:15
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:132
enum cmf::sel_type SelectionType_t
fileType
Definition: mkDefs.py:112
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:16
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:105
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:80
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:17
static long BeamTypeKey(cmf::BeamType_t const &bt)
Definition: StaticFuncs.h:18
static std::string cmf::KeyToString ( long const &  key)
inlinestatic

Definition at line 224 of file StaticFuncs.h.

References cBeamType_Strings, cDetType_Strings, cFileTypeStrings, cInteractionType_Strings, cSelectionType_Strings, KeyToBeamType(), KeyToDetectorType(), KeyToEpoch(), KeyToFileType(), KeyToInteractionType(), KeyToSelectionType(), and art::to_string().

Referenced by cmf::CovarianceBinUtility::BinToEnergy(), cmf::EventListManipulator::Deserialize(), cmf::CovarianceBinUtility::FillOffsetAndBinMaps(), cmf::ChiSqrCalculator::FindReducedMatrixBin(), InteractionTypeKey(), and cmf::RandomUniverseUtility::PoissonSpectrumBinByBin().

225 {
227  "Period" +
233 }
const std::string cSelectionType_Strings[12]
Definition: Constants.h:93
static cmf::InteractionType_t KeyToInteractionType(long const &key)
Definition: StaticFuncs.h:204
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:132
const std::string cInteractionType_Strings[11]
Definition: Constants.h:149
const std::string cFileTypeStrings[10]
Definition: Constants.h:176
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:105
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:80
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:166
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
const std::string cDetType_Strings[5]
Definition: Constants.h:29
const std::string cBeamType_Strings[4]
Definition: Constants.h:51
static std::string cmf::KeyToVarName ( uint8_t const &  key)
inlinestatic

Definition at line 560 of file StaticFuncs.h.

References kVarNameToKey().

Referenced by InteractionTypeKey(), cmf::Parameter::Name(), operator<<(), cmf::DataVarVals::set_val_at(), and testSystematics().

561 {
562  for(auto const& itr : cmf::kVarNameToKey){
563  if(itr.second == key) return itr.first;
564  }
565  // if (key == cmf::kNuE_CVN ) return "NuE_CVN";
566  // else if(key == cmf::kNuE_NumMichel ) return "NuE_NumMichel";
567  // else if(key == cmf::kHad_RecoE ) return "Had_RecoE";
568  // else if(key == cmf::kLep_RecoE ) return "Lep_RecoE";
569  // else if(key == cmf::kNu_RecoE ) return "Nu_RecoE";
570  // else if(key == cmf::kLep_RecoE_MCFrac) return "Lep_RecoE_MCFrac";
571  // else if(key == cmf::kRecoQ2 ) return "Reco_Q2";
572  // else if(key == cmf::kFake_Weight ) return "Fake_Weight";
573 
574  // else if(key == cmf::kTrueE ) return "TrueE";
575  // else if(key == cmf::kTruePDG ) return "TruePDG";
576  // else if(key == cmf::kTrueCCNC ) return "TrueCCNC";
577  // else if(key == cmf::kTrueIntType ) return "TrueIntType";
578  // else if(key == cmf::kTruePDGOrig ) return "TruePDGOrig";
579  // else if(key == cmf::kTrueParentPDG ) return "TrueParentPDG";
580  // else if(key == cmf::kTrueParentPT ) return "TrueParentPT";
581  // else if(key == cmf::kTrueParentPZ ) return "TrueParentPZ";
582  // else if(key == cmf::kTrueParentDecay ) return "TrueParentDecay";
583  // else if(key == cmf::kTrueParentTargetPDG) return "TrueParentTargetPDG";
584  // else if(key == cmf::kTrueHitNuc ) return "TrueHitNuc";
585  // else if(key == cmf::kTrueIntMode ) return "TrueIntMode";
586 
587  // else if(key == cmf::kXSecCVPPFX_Weight) return "XsecCVWgt";
588  // else if(key == cmf::kXSecCV2020Wgt ) return "XsecCV2020";
589  // else if(key == cmf::kPPFXFluxCVWgt ) return "PPFXFluxCV";
590  // else if(key == cmf::kRPARES_Weight ) return "RPARESWgt";
591 
592  // else if(key == cmf::kMinus2Sigma) return "-2sigma";
593  // else if(key == cmf::kMinus1Sigma) return "-1sigma";
594  // else if(key == cmf::kPlus1Sigma ) return "+1sigma";
595  // else if(key == cmf::kPlus2Sigma ) return "+2sigma";
596 
597  // // calibration
598  // else if(key == cmf::kLightModelLightUpCalibDown) return "lightmodel-lightdown-calibupWgt";
599  // else if(key == cmf::kLightModelLightDownCalibUp) return "lightmodel-lightup-calibdownWgt";
600  // else if(key == cmf::kCkvProtonShiftDown ) return "ckv-proton-shift-downWgt";
601  // else if(key == cmf::kRelativeCalibration ) return "RelativeCalibrationWgt";
602  // else if(key == cmf::kAbsoluteCalibration ) return "AbsoluteCalibrationWgt";
603  // else if(key == cmf::kCalibShape ) return "CalibrationShapeWgt";
604 
605  // //GENIE knobs
606 
607  // // NC elastic parameters
608  // else if(key == cmf::kMaNCEL ) return "MaNCEL";
609  // else if(key == cmf::kEtaNCEL) return "EtaNCEL";
610 
611  // // DIS tweaking parameters
612  // else if(key == cmf::kAhtBY ) return "AhtBY";
613  // else if(key == cmf::kBhtBY ) return "BhtBY";
614  // else if(key == cmf::kCV1uBY) return "CV1uBY";
615  // else if(key == cmf::kCV2uBY) return "CV2uBY";
616 
617  // // Hadronization (free nucleon target)
618  // else if(key == cmf::kAGKY_xF1pi) return "AGKY_xF1pi";
619  // else if(key == cmf::kAGKY_pT1pi) return "AGKY_pT1pi";
620 
621  // // Resonance decays
622  // else if(key == cmf::kBR1gamma ) return "BR1gamma";
623  // else if(key == cmf::kBR1eta ) return "BR1eta";
624  // else if(key == cmf::kTheta_Delta2Npi) return "Theta_Delta2Npi";
625 
626  // else if(key == cmf::kMvCCRES ) return "MvCCRES";
627  // else if(key == cmf::kMaCCRES ) return "MaCCRES";
628  // else if(key == cmf::kMaNCRES ) return "MaNCRES";
629  // else if(key == cmf::kRPACCQEshapeEnh ) return "RPACCQEshapeEnh";
630  // else if(key == cmf::kRPACCQEshapeSupp) return "RPACCQEshapeSupp";
631 
632  // // coherent scattering
633  // else if(key == cmf::kCOHCCScaleSyst2018) return "COHCCScale2018";
634  // else if(key == cmf::kCOHNCScaleSyst2018) return "COHNCScale2018";
635 
636  // // 2020
637  // else if(key == cmf::kZExpEV1Syst2020 ) return "ZExpAxialFFSyst2020_eV1";
638  // else if(key == cmf::kZExpEV2Syst2020 ) return "ZExpAxialFFSyst2020_eV2";
639  // else if(key == cmf::kZExpEV3Syst2020 ) return "ZExpAxialFFSyst2020_eV3";
640  // else if(key == cmf::kZExpEV4Syst2020 ) return "ZExpAxialFFSyst2020_eV4";
641  // else if(key == cmf::kZNormCCQE ) return "ZNormCCQE";
642  // else if(key == cmf::kRESLowQ2SuppSyst2020 ) return "RESLowQ2SuppSyst2020";
643  // else if(key == cmf::khNFSISyst2020_MFP ) return "hNFSISyst2020_MFP";
644  // else if(key == cmf::khNFSISyst2020_EV1 ) return "hNFSISyst2020_EV1";
645  // else if(key == cmf::kMECEnuShapeSyst2020Nu ) return "MECEnuShapeSyst2020Nu";
646  // else if(key == cmf::kMECEnuShapeSyst2020AntiNu ) return "MECEnuShapeSyst2020AntiNu";
647  // else if(key == cmf::kMECShapeSyst2020Nu ) return "MECShapeSyst2020Nu";
648  // else if(key == cmf::kMECShapeSyst2020AntiNu ) return "MECShapeSyst2020AntiNu";
649  // else if(key == cmf::kMECInitStateNPFracSyst2020Nu ) return "MECInitStateNPFracSyst2020Nu";
650  // else if(key == cmf::kMECInitStateNPFracSyst2020AntiNu ) return "MECInitStateNPFracSyst2020AntiNu";
651  // else if(key == cmf::kRadCorrNue ) return "RadCorrNue";
652  // else if(key == cmf::kRadCorrNuebar ) return "RadCorrNuebar";
653  // else if(key == cmf::k2ndClassCurrs ) return "2ndClassCurrs";
654  // else if(key == cmf::kGENIEPCA00 ) return "GENIEPCA00";
655  // else if(key == cmf::kGENIEPCA01 ) return "GENIEPCA01";
656  // else if(key == cmf::kGENIEPCA02 ) return "GENIEPCA02";
657  // else if(key == cmf::kGENIEPCA03 ) return "GENIEPCA03";
658  // else if(key == cmf::kGENIEPCA04 ) return "GENIEPCA04";
659  // else if(key == cmf::kGENIEPCA05 ) return "GENIEPCA05";
660  // else if(key == cmf::kGENIEPCA06 ) return "GENIEPCA06";
661  // else if(key == cmf::kGENIEPCA07 ) return "GENIEPCA07";
662  // else if(key == cmf::kGENIEPCA08 ) return "GENIEPCA08";
663  // else if(key == cmf::kGENIEPCA09 ) return "GENIEPCA09";
664  // else if(key == cmf::kGENIEPCA10 ) return "GENIEPCA10";
665  // else if(key == cmf::kGENIEPCA11 ) return "GENIEPCA11";
666  // else if(key == cmf::kMvNCRES ) return "MvNCRES";
667  // else if(key == cmf::kUnCorrNDMuEScaleSyst2020 ) return "UnCorrNDMuEScaleSyst2020";
668  // else if(key == cmf::kUnCorrMuCatMuESyst2020 ) return "UnCorrMuCatMuESyst2020";
669  // else if(key == cmf::kPileupMuESyst2020 ) return "PileupMuESyst2020";
670  // else if(key == cmf::kCorrMuEScaleSyst2020 ) return "CorrMuEScaleSyst2020";
671  // else if(key == cmf::kNeutronVisEScalePrimariesSyst2018) return "NeutronVisEScalePrimariesSyst2018";
672  // else if(key == cmf::kMichelTaggingSyst2020 ) return "MichelTaggingSyst2020";
673  // else if(key == cmf::kAna2020NormFHC ) return "Ana2020NormFHC";
674  // else if(key == cmf::kAna2020NormRHC ) return "Ana2020NormRHC";
675  // else if(key == cmf::kNorm_1Nux ) return "Norm_1Nux";
676  // else if(key == cmf::kMeanQ0_1Nux ) return "MeanQ0_1Nux";
677  // else if(key == cmf::kMeanQ3_1Nux ) return "MeanQ3_1Nux";
678  // else if(key == cmf::kSigmaQ0_1Nux ) return "SigmaQ0_1Nux";
679  // else if(key == cmf::kSigmaQ3_1Nux ) return "SigmaQ3_1Nux";
680  // else if(key == cmf::kCorr_1Nux ) return "Corr_1Nux";
681  // else if(key == cmf::kNorm_2Nux ) return "Norm_2Nux";
682  // else if(key == cmf::kMeanQ0_2Nux ) return "MeanQ0_2Nux";
683  // else if(key == cmf::kMeanQ3_2Nux ) return "MeanQ3_2Nux";
684  // else if(key == cmf::kSigmaQ0_2Nux ) return "SigmaQ0_2Nux";
685  // else if(key == cmf::kSigmaQ3_2Nux ) return "SigmaQ3_2Nux";
686  // else if(key == cmf::kCorr_2Nux ) return "Corr_2Nux";
687  // else if(key == cmf::kBaselineNux ) return "BaselineNux";
688  // else if(key == cmf::kTauScaleSyst ) return "TauScaleSyst";
689  // else if(key == cmf::kDISvpCC0pi_2020 ) return "DISvpCC0pi_2020";
690  // else if(key == cmf::kDISvpCC1pi_2020 ) return "DISvpCC1pi_2020";
691  // else if(key == cmf::kDISvpCC2pi_2020 ) return "DISvpCC2pi_2020";
692  // else if(key == cmf::kDISvpCC3pi_2020 ) return "DISvpCC3pi_2020";
693  // else if(key == cmf::kDISvpNC0pi_2020 ) return "DISvpNC0pi_2020";
694  // else if(key == cmf::kDISvpNC1pi_2020 ) return "DISvpNC1pi_2020";
695  // else if(key == cmf::kDISvpNC2pi_2020 ) return "DISvpNC2pi_2020";
696  // else if(key == cmf::kDISvpNC3pi_2020 ) return "DISvpNC3pi_2020";
697  // else if(key == cmf::kDISvnCC0pi_2020 ) return "DISvnCC0pi_2020";
698  // else if(key == cmf::kDISvnCC1pi_2020 ) return "DISvnCC1pi_2020";
699  // else if(key == cmf::kDISvnCC2pi_2020 ) return "DISvnCC2pi_2020";
700  // else if(key == cmf::kDISvnCC3pi_2020 ) return "DISvnCC3pi_2020";
701  // else if(key == cmf::kDISvnNC0pi_2020 ) return "DISvnNC0pi_2020";
702  // else if(key == cmf::kDISvnNC1pi_2020 ) return "DISvnNC1pi_2020";
703  // else if(key == cmf::kDISvnNC2pi_2020 ) return "DISvnNC2pi_2020";
704  // else if(key == cmf::kDISvnNC3pi_2020 ) return "DISvnNC3pi_2020";
705  // else if(key == cmf::kDISvbarpCC0pi_2020 ) return "DISvbarpCC0pi_2020";
706  // else if(key == cmf::kDISvbarpCC1pi_2020 ) return "DISvbarpCC1pi_2020";
707  // else if(key == cmf::kDISvbarpCC2pi_2020 ) return "DISvbarpCC2pi_2020";
708  // else if(key == cmf::kDISvbarpCC3pi_2020 ) return "DISvbarpCC3pi_2020";
709  // else if(key == cmf::kDISvbarpNC0pi_2020 ) return "DISvbarpNC0pi_2020";
710  // else if(key == cmf::kDISvbarpNC1pi_2020 ) return "DISvbarpNC1pi_2020";
711  // else if(key == cmf::kDISvbarpNC2pi_2020 ) return "DISvbarpNC2pi_2020";
712  // else if(key == cmf::kDISvbarpNC3pi_2020 ) return "DISvbarpNC3pi_2020";
713  // else if(key == cmf::kDISvbarnCC0pi_2020 ) return "DISvbarnCC0pi_2020";
714  // else if(key == cmf::kDISvbarnCC1pi_2020 ) return "DISvbarnCC1pi_2020";
715  // else if(key == cmf::kDISvbarnCC2pi_2020 ) return "DISvbarnCC2pi_2020";
716  // else if(key == cmf::kDISvbarnCC3pi_2020 ) return "DISvbarnCC3pi_2020";
717  // else if(key == cmf::kDISvbarnNC0pi_2020 ) return "DISvbarnNC0pi_2020";
718  // else if(key == cmf::kDISvbarnNC1pi_2020 ) return "DISvbarnNC1pi_2020";
719  // else if(key == cmf::kDISvbarnNC2pi_2020 ) return "DISvbarnNC2pi_2020";
720  // else if(key == cmf::kDISvbarnNC3pi_2020 ) return "DISvbarnNC3pi_2020";
721  // else if(key == cmf::kFormZone_2020 ) return "FormZone_2020";
722  // else if(key == cmf::khNFSISyst2020_EV2 ) return "hNFSISyst2020_EV2";
723  // else if(key == cmf::khNFSISyst2020_EV3 ) return "hNFSISyst2020_EV3";
724  // else if(key == cmf::kCOHCCScaleSyst2018 ) return "COHCCScaleSyst2018";
725  // else if(key == cmf::kCOHNCScaleSyst2018 ) return "COHNCScaleSyst2018";
726 
727  return "Unknown";
728 
729  //else if( isSumSmallXSecJoint2017Key(key) ) return "SumSmallXSecJoint2017";
730 
731  // CCQE parameters
732  //else if(key == cmf::kNormCCQE ) return "NormCCQE";
733  //else if(key == cmf::kNormCCQE_EnuDep ) return "NormCCQE_EnuDep";
734  //else if(key == cmf::kMaCCQE_shape ) return "MaCCQE_shape";
735  //else if(key == cmf::kVecCCQE_shape ) return "VecCCQE_shape";
736 
737  // Resonant production: CC
738  //else if(key == cmf::kNormCCRES ) return "NormCCRES";
739  //else if(key == cmf::kMaCCRES_shape ) return "MaCCRES_shape";
740  //else if(key == cmf::kMvCCRES_shape ) return "MvCCRES_shape";
741  //else if(key == cmf::kMaCCRES ) return "MaCCRES";
742 
743  // Resonant production: NC
744  //else if(key == cmf::kNormNCRES ) return "NormNCRES";
745  //else if(key == cmf::kMaNCRES_shape ) return "MaNCRES_shape";
746  //else if(key == cmf::kMvNCRES_shape ) return "MvNCRES_shape";
747 
748  // Coherent pion production
749  //else if(key == cmf::kMaCOHpi ) return "MaCOHpi";
750  //else if(key == cmf::kR0COHpi ) return "R0COHpi";
751 
752  // Non-resonant background
753  //else if(key == cmf::kRvpCC1pi ) return "RvpCC1pi";
754  //else if(key == cmf::kRvpCC2pi ) return "RvpCC2pi";
755  //else if(key == cmf::kRvpNC1pi ) return "RvpNC1pi";
756  //else if(key == cmf::kRvpNC2pi ) return "RvpNC2pi";
757  //else if(key == cmf::kRvnCC1pi ) return "RvnCC1pi";
758  //else if(key == cmf::kRvnCC2pi ) return "RvnCC2pi";
759  //else if(key == cmf::kRvnNC1pi ) return "RvnNC1pi";
760  //else if(key == cmf::kRvnNC2pi ) return "RvnNC2pi";
761  //else if(key == cmf::kRvbarpCC1pi ) return "RvbarpCC1pi";
762  //else if(key == cmf::kRvbarpCC2pi ) return "RvbarpCC2pi";
763  //else if(key == cmf::kRvbarpNC1pi ) return "RvbarpNC1pi";
764  //else if(key == cmf::kRvbarpNC2pi ) return "RvbarpNC2pi";
765  //else if(key == cmf::kRvbarnCC1pi ) return "RvbarnCC1pi";
766  //else if(key == cmf::kRvbarnCC2pi ) return "RvbarnCC2pi";
767  //else if(key == cmf::kRvbarnNC1pi ) return "RvbarnNC1pi";
768  //else if(key == cmf::kRvbarnNC2pi ) return "RvbarnNC2pi";
769 
770  //else if(key == cmf::kAhtBYshape ) return "AhtBYshape";
771  //else if(key == cmf::kBhtBYshape ) return "BhtBYshape";
772  //else if(key == cmf::kCV1uBYshape ) return "CV1uBYshape";
773  //else if(key == cmf::kCV2uBYshape ) return "CV2uBYshape";
774  //else if(key == cmf::kNormDISCC ) return "NormDISCC";
775  //else if(key == cmf::kRnubarnuCC ) return "RnubarnuCC";
776  //else if(key == cmf::kDISNuclMod ) return "DISNuclMod";
777 
778  //else if(key == cmf::kNCGENIE ) return "NC";
779 
780  // Medium-effects to hadronization
781 
782  // Intranuclear rescattering parameters.
783 // else if(key == cmf::kMFP_pi ) return "MFP_pi";
784 // else if(key == cmf::kMFP_N ) return "MFP_N";
785 // else if(key == cmf::kFrPiProd_pi ) return "FrPiProd_pi";
786 // else if(key == cmf::kFrPiProd_N ) return "FrPiProd_N";
787 
788  // Nuclear model
789 // else if(key == cmf::kCCQEMomDistroFGtoSF) return "CCQEMomDistroFGtoSF";
790 
791 
792  // 2017 RPA shape systematics
793 }
static const std::map< std::string, uint8_t > kVarNameToKey({{"NuE_CVN", cmf::kNuE_CVN},{"NuE_NumMichel", cmf::kNuE_NumMichel},{"Had_RecoE", cmf::kHad_RecoE},{"Lep_RecoE", cmf::kLep_RecoE},{"Nu_RecoE", cmf::kNu_RecoE},{"Lep_RecoE_MCFrac", cmf::kLep_RecoE_MCFrac},{"Reco_Q2", cmf::kRecoQ2},{"Fake_Weight", cmf::kFake_Weight},{"TrueE", cmf::kTrueE},{"TruePDG", cmf::kTruePDG},{"TrueCCNC", cmf::kTrueCCNC},{"TrueIntType", cmf::kTrueIntType},{"TruePDGOrig", cmf::kTruePDGOrig},{"TrueParentPDG", cmf::kTrueParentPDG},{"TrueParentPT", cmf::kTrueParentPT},{"TrueParentPZ", cmf::kTrueParentPZ},{"TrueParentDecay", cmf::kTrueParentDecay},{"TrueParentTargetPDG", cmf::kTrueParentTargetPDG},{"TrueHitNuc", cmf::kTrueHitNuc},{"TrueIntMode", cmf::kTrueIntMode},{"XsecCV2020", cmf::kXSecCV2020Wgt},{"PPFXFluxCV", cmf::kPPFXFluxCVWgt},{"RPARES", cmf::kRPARES_Weight},{"-2sigma", cmf::kMinus2Sigma},{"-1sigma", cmf::kMinus1Sigma},{"+1sigma", cmf::kPlus1Sigma},{"+2sigma", cmf::kPlus2Sigma},{"lightmodel-lightdown", cmf::kLightModelLightDownCalibUp},{"lightmodel-lightup", cmf::kLightModelLightUpCalibDown},{"ckv-proton", cmf::kCkvProtonShiftDown},{"RelativeCalibration", cmf::kRelativeCalibration},{"AbsoluteCalibration", cmf::kAbsoluteCalibration},{"CalibrationShape", cmf::kCalibShape},{"MaNCEL", cmf::kMaNCEL},{"EtaNCEL", cmf::kEtaNCEL},{"AhtBY", cmf::kAhtBY},{"BhtBY", cmf::kBhtBY},{"CV1uBY", cmf::kCV1uBY},{"CV2uBY", cmf::kCV2uBY},{"AGKY_xF1pi", cmf::kAGKY_xF1pi},{"AGKY_pT1pi", cmf::kAGKY_pT1pi},{"BR1gamma", cmf::kBR1gamma},{"BR1eta", cmf::kBR1eta},{"Theta_Delta2Npi", cmf::kTheta_Delta2Npi},{"MvCCRES", cmf::kMvCCRES},{"MaCCRES", cmf::kMaCCRES},{"MvNCRES", cmf::kMvNCRES},{"MaNCRES", cmf::kMaNCRES},{"RPACCQEshapeEnh", cmf::kRPACCQEshapeEnh},{"RPACCQEshapeSupp", cmf::kRPACCQEshapeSupp},{"COHCCScale2018", cmf::kCOHCCScaleSyst2018},{"COHNCScale2018", cmf::kCOHNCScaleSyst2018},{"ZExpAxialFFSyst2020_eV1", cmf::kZExpEV1Syst2020},{"ZExpAxialFFSyst2020_eV2", cmf::kZExpEV2Syst2020},{"ZExpAxialFFSyst2020_eV3", cmf::kZExpEV3Syst2020},{"ZExpAxialFFSyst2020_eV4", cmf::kZExpEV4Syst2020},{"ZNormCCQE", cmf::kZNormCCQE},{"RESLowQ2SuppSyst2020", cmf::kRESLowQ2SuppSyst2020},{"hNFSISyst2020_MFP", cmf::khNFSISyst2020_MFP},{"hNFSISyst2020_EV1", cmf::khNFSISyst2020_EV1},{"MECEnuShapeSyst2020Nu", cmf::kMECEnuShapeSyst2020Nu},{"MECEnuShapeSyst2020AntiNu", cmf::kMECEnuShapeSyst2020AntiNu},{"MECShapeSyst2020Nu", cmf::kMECShapeSyst2020Nu},{"MECShapeSyst2020AntiNu", cmf::kMECShapeSyst2020AntiNu},{"MECInitStateNPFracSyst2020Nu", cmf::kMECInitStateNPFracSyst2020Nu},{"MECInitStateNPFracSyst2020AntiNu", cmf::kMECInitStateNPFracSyst2020AntiNu},{"RadCorrNue", cmf::kRadCorrNue},{"RadCorrNuebar", cmf::kRadCorrNuebar},{"2ndClassCurrs", cmf::k2ndClassCurrs},{"GENIEPCA00", cmf::kGENIEPCA00},{"GENIEPCA01", cmf::kGENIEPCA01},{"GENIEPCA02", cmf::kGENIEPCA02},{"GENIEPCA03", cmf::kGENIEPCA03},{"GENIEPCA04", cmf::kGENIEPCA04},{"GENIEPCA05", cmf::kGENIEPCA05},{"GENIEPCA06", cmf::kGENIEPCA06},{"GENIEPCA07", cmf::kGENIEPCA07},{"GENIEPCA08", cmf::kGENIEPCA08},{"GENIEPCA09", cmf::kGENIEPCA09},{"GENIEPCA10", cmf::kGENIEPCA10},{"GENIEPCA11", cmf::kGENIEPCA11},{"UnCorrNDMuEScaleSyst2020", cmf::kUnCorrNDMuEScaleSyst2020},{"UnCorrMuCatMuESyst2020", cmf::kUnCorrMuCatMuESyst2020},{"PileupMuESyst2020", cmf::kPileupMuESyst2020},{"CorrMuEScaleSyst2020", cmf::kCorrMuEScaleSyst2020},{"NeutronVisEScalePrimariesSyst2018", cmf::kNeutronVisEScalePrimariesSyst2018},{"MichelTaggingSyst2020", cmf::kMichelTaggingSyst2020},{"Ana2020NormFHC", cmf::kAna2020NormFHC},{"Ana2020NormRHC", cmf::kAna2020NormRHC},{"Norm_1Nux", cmf::kNorm_1Nux},{"MeanQ0_1Nux", cmf::kMeanQ0_1Nux},{"MeanQ3_1Nux", cmf::kMeanQ3_1Nux},{"SigmaQ0_1Nux", cmf::kSigmaQ0_1Nux},{"SigmaQ3_1Nux", cmf::kSigmaQ3_1Nux},{"Corr_1Nux", cmf::kCorr_1Nux},{"Norm_2Nux", cmf::kNorm_2Nux},{"MeanQ0_2Nux", cmf::kMeanQ0_2Nux},{"MeanQ3_2Nux", cmf::kMeanQ3_2Nux},{"SigmaQ0_2Nux", cmf::kSigmaQ0_2Nux},{"SigmaQ3_2Nux", cmf::kSigmaQ3_2Nux},{"Corr_2Nux", cmf::kCorr_2Nux},{"BaselineNux", cmf::kBaselineNux},{"TauScaleSyst", cmf::kTauScaleSyst},{"DISvpCC0pi_2020", cmf::kDISvpCC0pi_2020},{"DISvpCC1pi_2020", cmf::kDISvpCC1pi_2020},{"DISvpCC2pi_2020", cmf::kDISvpCC2pi_2020},{"DISvpCC3pi_2020", cmf::kDISvpCC3pi_2020},{"DISvpNC0pi_2020", cmf::kDISvpNC0pi_2020},{"DISvpNC1pi_2020", cmf::kDISvpNC1pi_2020},{"DISvpNC2pi_2020", cmf::kDISvpNC2pi_2020},{"DISvpNC3pi_2020", cmf::kDISvpNC3pi_2020},{"DISvnCC0pi_2020", cmf::kDISvnCC0pi_2020},{"DISvnCC1pi_2020", cmf::kDISvnCC1pi_2020},{"DISvnCC2pi_2020", cmf::kDISvnCC2pi_2020},{"DISvnCC3pi_2020", cmf::kDISvnCC3pi_2020},{"DISvnNC0pi_2020", cmf::kDISvnNC0pi_2020},{"DISvnNC1pi_2020", cmf::kDISvnNC1pi_2020},{"DISvnNC2pi_2020", cmf::kDISvnNC2pi_2020},{"DISvnNC3pi_2020", cmf::kDISvnNC3pi_2020},{"DISvbarpCC0pi_2020", cmf::kDISvbarpCC0pi_2020},{"DISvbarpCC1pi_2020", cmf::kDISvbarpCC1pi_2020},{"DISvbarpCC2pi_2020", cmf::kDISvbarpCC2pi_2020},{"DISvbarpCC3pi_2020", cmf::kDISvbarpCC3pi_2020},{"DISvbarpNC0pi_2020", cmf::kDISvbarpNC0pi_2020},{"DISvbarpNC1pi_2020", cmf::kDISvbarpNC1pi_2020},{"DISvbarpNC2pi_2020", cmf::kDISvbarpNC2pi_2020},{"DISvbarpNC3pi_2020", cmf::kDISvbarpNC3pi_2020},{"DISvbarnCC0pi_2020", cmf::kDISvbarnCC0pi_2020},{"DISvbarnCC1pi_2020", cmf::kDISvbarnCC1pi_2020},{"DISvbarnCC2pi_2020", cmf::kDISvbarnCC2pi_2020},{"DISvbarnCC3pi_2020", cmf::kDISvbarnCC3pi_2020},{"DISvbarnNC0pi_2020", cmf::kDISvbarnNC0pi_2020},{"DISvbarnNC1pi_2020", cmf::kDISvbarnNC1pi_2020},{"DISvbarnNC2pi_2020", cmf::kDISvbarnNC2pi_2020},{"DISvbarnNC3pi_2020", cmf::kDISvbarnNC3pi_2020},{"FormZone_2020", cmf::kFormZone_2020},{"hNFSISyst2020_EV2", cmf::khNFSISyst2020_EV2},{"hNFSISyst2020_EV3", cmf::khNFSISyst2020_EV3},{"COHCCScaleSyst2018", cmf::kCOHCCScaleSyst2018},{"COHNCScaleSyst2018", cmf::kCOHNCScaleSyst2018}})
static const std::map<std::string, uint8_t> cmf::kVarNameToKey ( {{"NuE_CVN", cmf::kNuE_CVN},{"NuE_NumMichel", cmf::kNuE_NumMichel},{"Had_RecoE", cmf::kHad_RecoE},{"Lep_RecoE", cmf::kLep_RecoE},{"Nu_RecoE", cmf::kNu_RecoE},{"Lep_RecoE_MCFrac", cmf::kLep_RecoE_MCFrac},{"Reco_Q2", cmf::kRecoQ2},{"Fake_Weight", cmf::kFake_Weight},{"TrueE", cmf::kTrueE},{"TruePDG", cmf::kTruePDG},{"TrueCCNC", cmf::kTrueCCNC},{"TrueIntType", cmf::kTrueIntType},{"TruePDGOrig", cmf::kTruePDGOrig},{"TrueParentPDG", cmf::kTrueParentPDG},{"TrueParentPT", cmf::kTrueParentPT},{"TrueParentPZ", cmf::kTrueParentPZ},{"TrueParentDecay", cmf::kTrueParentDecay},{"TrueParentTargetPDG", cmf::kTrueParentTargetPDG},{"TrueHitNuc", cmf::kTrueHitNuc},{"TrueIntMode", cmf::kTrueIntMode},{"XsecCV2020", cmf::kXSecCV2020Wgt},{"PPFXFluxCV", cmf::kPPFXFluxCVWgt},{"RPARES", cmf::kRPARES_Weight},{"-2sigma", cmf::kMinus2Sigma},{"-1sigma", cmf::kMinus1Sigma},{"+1sigma", cmf::kPlus1Sigma},{"+2sigma", cmf::kPlus2Sigma},{"lightmodel-lightdown", cmf::kLightModelLightDownCalibUp},{"lightmodel-lightup", cmf::kLightModelLightUpCalibDown},{"ckv-proton", cmf::kCkvProtonShiftDown},{"RelativeCalibration", cmf::kRelativeCalibration},{"AbsoluteCalibration", cmf::kAbsoluteCalibration},{"CalibrationShape", cmf::kCalibShape},{"MaNCEL", cmf::kMaNCEL},{"EtaNCEL", cmf::kEtaNCEL},{"AhtBY", cmf::kAhtBY},{"BhtBY", cmf::kBhtBY},{"CV1uBY", cmf::kCV1uBY},{"CV2uBY", cmf::kCV2uBY},{"AGKY_xF1pi", cmf::kAGKY_xF1pi},{"AGKY_pT1pi", cmf::kAGKY_pT1pi},{"BR1gamma", cmf::kBR1gamma},{"BR1eta", cmf::kBR1eta},{"Theta_Delta2Npi", cmf::kTheta_Delta2Npi},{"MvCCRES", cmf::kMvCCRES},{"MaCCRES", cmf::kMaCCRES},{"MvNCRES", cmf::kMvNCRES},{"MaNCRES", cmf::kMaNCRES},{"RPACCQEshapeEnh", cmf::kRPACCQEshapeEnh},{"RPACCQEshapeSupp", cmf::kRPACCQEshapeSupp},{"COHCCScale2018", cmf::kCOHCCScaleSyst2018},{"COHNCScale2018", cmf::kCOHNCScaleSyst2018},{"ZExpAxialFFSyst2020_eV1", cmf::kZExpEV1Syst2020},{"ZExpAxialFFSyst2020_eV2", cmf::kZExpEV2Syst2020},{"ZExpAxialFFSyst2020_eV3", cmf::kZExpEV3Syst2020},{"ZExpAxialFFSyst2020_eV4", cmf::kZExpEV4Syst2020},{"ZNormCCQE", cmf::kZNormCCQE},{"RESLowQ2SuppSyst2020", cmf::kRESLowQ2SuppSyst2020},{"hNFSISyst2020_MFP", cmf::khNFSISyst2020_MFP},{"hNFSISyst2020_EV1", cmf::khNFSISyst2020_EV1},{"MECEnuShapeSyst2020Nu", cmf::kMECEnuShapeSyst2020Nu},{"MECEnuShapeSyst2020AntiNu", cmf::kMECEnuShapeSyst2020AntiNu},{"MECShapeSyst2020Nu", cmf::kMECShapeSyst2020Nu},{"MECShapeSyst2020AntiNu", cmf::kMECShapeSyst2020AntiNu},{"MECInitStateNPFracSyst2020Nu", cmf::kMECInitStateNPFracSyst2020Nu},{"MECInitStateNPFracSyst2020AntiNu", cmf::kMECInitStateNPFracSyst2020AntiNu},{"RadCorrNue", cmf::kRadCorrNue},{"RadCorrNuebar", cmf::kRadCorrNuebar},{"2ndClassCurrs", cmf::k2ndClassCurrs},{"GENIEPCA00", cmf::kGENIEPCA00},{"GENIEPCA01", cmf::kGENIEPCA01},{"GENIEPCA02", cmf::kGENIEPCA02},{"GENIEPCA03", cmf::kGENIEPCA03},{"GENIEPCA04", cmf::kGENIEPCA04},{"GENIEPCA05", cmf::kGENIEPCA05},{"GENIEPCA06", cmf::kGENIEPCA06},{"GENIEPCA07", cmf::kGENIEPCA07},{"GENIEPCA08", cmf::kGENIEPCA08},{"GENIEPCA09", cmf::kGENIEPCA09},{"GENIEPCA10", cmf::kGENIEPCA10},{"GENIEPCA11", cmf::kGENIEPCA11},{"UnCorrNDMuEScaleSyst2020", cmf::kUnCorrNDMuEScaleSyst2020},{"UnCorrMuCatMuESyst2020", cmf::kUnCorrMuCatMuESyst2020},{"PileupMuESyst2020", cmf::kPileupMuESyst2020},{"CorrMuEScaleSyst2020", cmf::kCorrMuEScaleSyst2020},{"NeutronVisEScalePrimariesSyst2018", cmf::kNeutronVisEScalePrimariesSyst2018},{"MichelTaggingSyst2020", cmf::kMichelTaggingSyst2020},{"Ana2020NormFHC", cmf::kAna2020NormFHC},{"Ana2020NormRHC", cmf::kAna2020NormRHC},{"Norm_1Nux", cmf::kNorm_1Nux},{"MeanQ0_1Nux", cmf::kMeanQ0_1Nux},{"MeanQ3_1Nux", cmf::kMeanQ3_1Nux},{"SigmaQ0_1Nux", cmf::kSigmaQ0_1Nux},{"SigmaQ3_1Nux", cmf::kSigmaQ3_1Nux},{"Corr_1Nux", cmf::kCorr_1Nux},{"Norm_2Nux", cmf::kNorm_2Nux},{"MeanQ0_2Nux", cmf::kMeanQ0_2Nux},{"MeanQ3_2Nux", cmf::kMeanQ3_2Nux},{"SigmaQ0_2Nux", cmf::kSigmaQ0_2Nux},{"SigmaQ3_2Nux", cmf::kSigmaQ3_2Nux},{"Corr_2Nux", cmf::kCorr_2Nux},{"BaselineNux", cmf::kBaselineNux},{"TauScaleSyst", cmf::kTauScaleSyst},{"DISvpCC0pi_2020", cmf::kDISvpCC0pi_2020},{"DISvpCC1pi_2020", cmf::kDISvpCC1pi_2020},{"DISvpCC2pi_2020", cmf::kDISvpCC2pi_2020},{"DISvpCC3pi_2020", cmf::kDISvpCC3pi_2020},{"DISvpNC0pi_2020", cmf::kDISvpNC0pi_2020},{"DISvpNC1pi_2020", cmf::kDISvpNC1pi_2020},{"DISvpNC2pi_2020", cmf::kDISvpNC2pi_2020},{"DISvpNC3pi_2020", cmf::kDISvpNC3pi_2020},{"DISvnCC0pi_2020", cmf::kDISvnCC0pi_2020},{"DISvnCC1pi_2020", cmf::kDISvnCC1pi_2020},{"DISvnCC2pi_2020", cmf::kDISvnCC2pi_2020},{"DISvnCC3pi_2020", cmf::kDISvnCC3pi_2020},{"DISvnNC0pi_2020", cmf::kDISvnNC0pi_2020},{"DISvnNC1pi_2020", cmf::kDISvnNC1pi_2020},{"DISvnNC2pi_2020", cmf::kDISvnNC2pi_2020},{"DISvnNC3pi_2020", cmf::kDISvnNC3pi_2020},{"DISvbarpCC0pi_2020", cmf::kDISvbarpCC0pi_2020},{"DISvbarpCC1pi_2020", cmf::kDISvbarpCC1pi_2020},{"DISvbarpCC2pi_2020", cmf::kDISvbarpCC2pi_2020},{"DISvbarpCC3pi_2020", cmf::kDISvbarpCC3pi_2020},{"DISvbarpNC0pi_2020", cmf::kDISvbarpNC0pi_2020},{"DISvbarpNC1pi_2020", cmf::kDISvbarpNC1pi_2020},{"DISvbarpNC2pi_2020", cmf::kDISvbarpNC2pi_2020},{"DISvbarpNC3pi_2020", cmf::kDISvbarpNC3pi_2020},{"DISvbarnCC0pi_2020", cmf::kDISvbarnCC0pi_2020},{"DISvbarnCC1pi_2020", cmf::kDISvbarnCC1pi_2020},{"DISvbarnCC2pi_2020", cmf::kDISvbarnCC2pi_2020},{"DISvbarnCC3pi_2020", cmf::kDISvbarnCC3pi_2020},{"DISvbarnNC0pi_2020", cmf::kDISvbarnNC0pi_2020},{"DISvbarnNC1pi_2020", cmf::kDISvbarnNC1pi_2020},{"DISvbarnNC2pi_2020", cmf::kDISvbarnNC2pi_2020},{"DISvbarnNC3pi_2020", cmf::kDISvbarnNC3pi_2020},{"FormZone_2020", cmf::kFormZone_2020},{"hNFSISyst2020_EV2", cmf::khNFSISyst2020_EV2},{"hNFSISyst2020_EV3", cmf::khNFSISyst2020_EV3},{"COHCCScaleSyst2018", cmf::kCOHCCScaleSyst2018},{"COHNCScaleSyst2018", cmf::kCOHNCScaleSyst2018}}  )
static

Referenced by KeyToVarName(), and VarNameToKey().

float cmf::NCEnergy ( float  leptonicEnergy,
float  hadronicEnergy,
cmf::BeamType_t const &  beamType,
cmf::DetType_t const &  detector 
)
inlinestatic

Definition at line 361 of file VarVals.h.

References stan::math::exp(), kFARDET, kFHC, kNEARDET, kRHC, pars(), and cet::pow().

Referenced by cmf::DataVarVals::DataVars(), and RecoEnergy().

365 {
366  // Note: leptonicEnergy must be the EM-like energy, as calculated by kEME_2020
367  // and hadronicEnergy must be the hadronic-like energy, as calculated by kHADE_2020
368  // If we don't have a tuned correction return the total calorimetric energy
369  if (beamType != kFHC ||
371  return leptonicEnergy + hadronicEnergy;
372 
373  // Set up correction parameters
374  double pars[4][6] = { {1.049, 0.795, 0.8409, 0.17, 0.82, -1.00}, // ND FHC
375  {1.025, 0.797, 0.9162, 0.53, -0.26, -1.48}, // FD FHC
376  {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00}, // ND RHC
377  {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00} };// FD RHC
378 
379  // set detector/beam index
380  int detCur = (detector == cmf::kFARDET) + ((beamType == kRHC)<<1); // bitshift magic
381 
382  // return the energy estimator
383  return (leptonicEnergy / pars[detCur][0] + hadronicEnergy / pars[detCur][1])
384  / (pars[detCur][2] + pars[detCur][3] * std::pow(leptonicEnergy + hadronicEnergy + pars[detCur][4],2) * std::exp(pars[detCur][5] * (leptonicEnergy + hadronicEnergy)));
385 }
constexpr T pow(T x)
Definition: pow.h:75
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
std::string pars("Th23Dmsq32")
float cmf::NuEEnergy ( float  leptonicEnergy,
float  hadronicEnergy,
cmf::BeamType_t const &  beamType 
)
inlinestatic

Definition at line 338 of file VarVals.h.

References e, kFHC, PandAna.Demos.pi0_spectra::p0, plot_validation_datamc::p1, plot_validation_datamc::p2, make_associated_cosmic_defs::p3, make_associated_cosmic_defs::p4, and make_associated_cosmic_defs::p5.

Referenced by cmf::DataVarVals::DataVars(), and RecoEnergy().

341 {
342  // p0 and p3 are 0.0 for both FHC and RHC
343  // 2020
344  float p0 = 0.0;
345  float p1 = (beamType == kFHC) ? 1.01777 : 0.988258;
346  float p2 = (beamType == kFHC) ? 1.10868 : 1.20084;
347  float p3 = 0.0;
348  float p4 = (beamType == kFHC) ? 1.43541e-03 : 1.92904e-07;
349  float p5 = (beamType == kFHC) ? 1.09628e-01 : 1.20704e-07;
350  float fr = (beamType == kFHC) ? 1. / 1.0355622 : 1. / 1.0111873;
351 
352  return fr *(( p5 * hadronicEnergy * hadronicEnergy) +
353  ( p4 * leptonicEnergy * leptonicEnergy) +
354  ( p3 * leptonicEnergy * hadronicEnergy) +
355  ( p2 * hadronicEnergy) +
356  ( p1 * leptonicEnergy) +
357  p0 );
358 }
Float_t e
Definition: plot.C:35
float cmf::NuMuEnergy ( float  leptonicEnergy,
float  hadronicEnergy 
)
inlinestatic

Definition at line 330 of file VarVals.h.

Referenced by cmf::DataVarVals::DataVars(), and RecoEnergy().

332 {
333  return leptonicEnergy + hadronicEnergy;
334 
335 }
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::Event const &  event 
)

Definition at line 27 of file Event.cxx.

References cmf::Event::DataVals(), cmf::Event::DataValsFilled(), allTimeWatchdog::endl, cmf::Event::EventID(), cmf::Event::EventIDFilled(), cmf::Event::MCVals(), cmf::Event::MCValsFilled(), and msf_helper::o.

Referenced by cmf::DataVarVals::DataVarVals(), cmf::MCVarVals::MCVarVals(), cmf::SystVar::operator<(), and cmf::Parameter::SetValue().

28  {
29  o << "Event Variables are: \n";
30 
31  if(event.EventIDFilled() ) o << event.EventID() ;
32  if(event.DataValsFilled()) o << event.DataVals();
33  if(event.MCValsFilled() ) o << event.MCVals() ;
34 
35  o << std::endl;
36 
37  return o;
38  }
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::GridPoint const &  gp 
)

Definition at line 32 of file GridPointResult.cxx.

References cOscParams_Strings, IsAngleParameter(), msf_helper::o, cmf::GridPoint::X(), cmf::GridPoint::XPar(), cmf::GridPoint::Y(), and cmf::GridPoint::YPar().

33  {
34 
35  if(cmf::IsAngleParameter(gp.XPar()))
36  o << "sin^{2}("
37  << cmf::cOscParams_Strings[gp.XPar()]
38  << ") : ";
39  else
40  o << cmf::cOscParams_Strings[gp.XPar()]
41  << " : ";
42 
43  o << gp.X()
44  << " ";
45 
46  if(cmf::IsAngleParameter(gp.YPar()))
47  o << "sin^{2}("
48  << cmf::cOscParams_Strings[gp.YPar()]
49  << ") : ";
50  else
51  o << cmf::cOscParams_Strings[gp.YPar()]
52  << " : ";
53 
54  o << gp.Y();
55 
56  return o;
57  }
static bool IsAngleParameter(cmf::OscParm_t const &par)
Definition: StaticFuncs.h:346
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:272
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::InputPoint const &  ip 
)

Definition at line 36 of file InputPoint.cxx.

References allTimeWatchdog::endl, cmf::InputPoint::FDParameters(), IsOscillationParameter(), cmf::InputPoint::NDParameters(), msf_helper::o, cet::pow(), std::sin(), string, and febshutoff_auto::val.

37  {
38 
39  double val;
41 
42  o << "InputPoint ND" << std::endl;
43 
44  for(auto const& itr : ip.NDParameters()){
45  name = itr.first;
46  val = itr.second.Value();
47  if (name == "dCP")
48  o << "\t" << std::setw(20) << name << " " << std::setw(10) << val << " = " << val/TMath::Pi() << "(pi)" << " fixed: " << itr.second.IsFixed() << std::endl;
49  else if(name == "Th23")
50  o << "\t" << std::setw(20) << name << " " << std::setw(10) << val << ": sin^2(Th23) : " << std::pow(std::sin(val), 2.) << " fixed: " << itr.second.IsFixed() << std::endl;
51  else if(cmf::IsOscillationParameter(name))
52  o << "\t" << std::setw(20) << name << " " << std::setw(10) << val << " fixed: " << itr.second.IsFixed() << std::endl;
53  else
54  o << "\t"<< std::setw(10) << name << " " << std::setw(10) << val << " fixed: " << itr.second.IsFixed() << std::endl;
55  }
56 
57  o << std::endl
58  << "\nInputPoint FD:"
59  << std::endl;
60  for(auto const& itr : ip.FDParameters() ){
61  name = itr.first;
62  val = itr.second.Value();
63  if(name == "dCP")
64  o << "\t" << std::setw(20) << name << " " << std::setw(10) << val << " = " << val / TMath::Pi() << "(pi)" << " fixed: " << itr.second.IsFixed() << std::endl;
65  else if(name == "Th23")
66  o << "\t" << std::setw(20) << name << " " << std::setw(10) << val << ": sin^2(Th23) : " << std::pow(std::sin(val), 2.) << " fixed: " << itr.second.IsFixed() << std::endl;
67  else if(cmf::IsOscillationParameter(name))
68  o << "\t" << std::setw(20) << name << " " << std::setw(10) << val << " fixed: " << itr.second.IsFixed() << std::endl;
69  else
70  o << "\t" << std::setw(10) << name << " " << std::setw(10) << val << " fixed: " << itr.second.IsFixed() << std::endl;
71  }
72 
73  o << std::endl;
74 
75  return o;
76  }
const XML_Char * name
Definition: expat.h:151
constexpr T pow(T x)
Definition: pow.h:75
TString ip
Definition: loadincs.C:5
static bool IsOscillationParameter(std::string const &str)
T sin(T number)
Definition: d0nt_math.hpp:132
enum BeamMode string
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::FakeUniverse const &  fu 
)

Definition at line 57 of file FakeUniverse.cxx.

References cOscParams_Strings, allTimeWatchdog::endl, and cmf::FakeUniverse::OscParMap().

58  {
59  o << "universe location ";
60 
61  for(auto const& itr : fu.OscParMap())
62  o << cmf::cOscParams_Strings[itr.first]
63  << " "
64  << itr.second
65  << " ";
66 
67  o << std::endl;
68 
69 // for(size_t b = 0; b < fu.AsimovSpectrum().size(); ++b){
70 // o << "fake universe spectrum bin "
71 // << b
72 // << " poisson: "
73 // << fu.PoissonSpectrum()[b]
74 // << " asimov: "
75 // << fu.AsimovSpectrum()[b]
76 // << "\n";
77 // }
78 
79  return o;
80  }
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:272
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::PointResult const &  pr 
)

Definition at line 59 of file PointResult.cxx.

References cmf::PointResult::ChiSqr(), cOscParams_Strings, allTimeWatchdog::endl, IsAngleParameter(), kdCP, msf_helper::o, cmf::PointResult::ParameterSpaceLocation(), cet::pow(), art::right(), and std::sin().

60  {
61  o << "PointResult:" << std::endl
62  << "\tChiSqr = " << std::setw(5) << std::right << pr.ChiSqr() << std::endl;
63 
64  o << "Oscillation parameters:" << std::endl;
65  for(auto itr : pr.ParameterSpaceLocation() ){
66  if(itr.first == cmf::kdCP)
67  o << "\t" << std::setw(20) << cmf::cOscParams_Strings[itr.first] << " " << itr.second << " = " << itr.second/TMath::Pi() << "(pi)" << std::endl;
68  else if(cmf::IsAngleParameter(itr.first))
69  o << "\t" << std::setw(20) << cmf::cOscParams_Strings[itr.first] << " " << itr.second << ": sin^2(" << cmf::cOscParams_Strings[itr.first] << ") : " << std::pow(std::sin(itr.second), 2.) << std::endl;
70  else o << "\t" << std::setw(20) << cmf::cOscParams_Strings[itr.first] << " " << itr.second << std::endl;
71  }
72 
73  return o;
74  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
constexpr T pow(T x)
Definition: pow.h:75
static bool IsAngleParameter(cmf::OscParm_t const &par)
Definition: StaticFuncs.h:346
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:272
T sin(T number)
Definition: d0nt_math.hpp:132
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::MCVarVals const &  mcvv 
)

Definition at line 71 of file VarVals.cxx.

References allTimeWatchdog::endl, kDISvnCC1pi_Weight, kEmpiricalMEC_Weight, kEmpiricalMECtoGENIEQE_Weight, kEmpiricalMECtoGENIERES_Weight, KeyToVarName(), kOtherDIS_Weight, kRPACCQE_Weight, kRPARES_Weight, kTrueCCNC, kTrueE, kTrueHitNuc, kTrueIntMode, kTrueIntType, kTrueParentDecay, kTrueParentPDG, kTrueParentPT, kTrueParentPZ, kTrueParentTargetPDG, kTruePDG, kTruePDGOrig, kXSecCVPPFX_Weight, msf_helper::o, and cmf::MCVarVals::val_at().

72  {
73  o << "Event MC related variables are: "
74  << "\n\t" << cmf::KeyToVarName(cmf::kTrueE) << " " << mcvv.val_at(cmf::kTrueE )
75  << "\n\t" << cmf::KeyToVarName(cmf::kTruePDG) << " " << mcvv.val_at(cmf::kTruePDG )
76  << "\n\t" << cmf::KeyToVarName(cmf::kTrueCCNC) << " " << mcvv.val_at(cmf::kTrueCCNC )
77  << "\n\t" << cmf::KeyToVarName(cmf::kTrueIntType) << " " << mcvv.val_at(cmf::kTrueIntType )
78  << "\n\t" << cmf::KeyToVarName(cmf::kTruePDGOrig) << " " << mcvv.val_at(cmf::kTruePDGOrig )
79  << "\n\t" << cmf::KeyToVarName(cmf::kTrueParentPDG) << " " << mcvv.val_at(cmf::kTrueParentPDG )
80  << "\n\t" << cmf::KeyToVarName(cmf::kTrueParentPT) << " " << mcvv.val_at(cmf::kTrueParentPT )
81  << "\n\t" << cmf::KeyToVarName(cmf::kTrueParentPZ) << " " << mcvv.val_at(cmf::kTrueParentPZ )
82  << "\n\t" << cmf::KeyToVarName(cmf::kTrueParentDecay) << " " << mcvv.val_at(cmf::kTrueParentDecay )
83  << "\n\t" << cmf::KeyToVarName(cmf::kTrueParentTargetPDG) << " " << mcvv.val_at(cmf::kTrueParentTargetPDG)
84  << "\n\t" << cmf::KeyToVarName(cmf::kTrueHitNuc) << " " << mcvv.val_at(cmf::kTrueHitNuc )
85  << "\n\t" << cmf::KeyToVarName(cmf::kTrueIntMode) << " " << mcvv.val_at(cmf::kTrueIntMode )
86  << "\n\t" << cmf::KeyToVarName(cmf::kXSecCVPPFX_Weight) << " " << mcvv.val_at(cmf::kXSecCVPPFX_Weight )
87  << "\n\t" << cmf::KeyToVarName(cmf::kRPACCQE_Weight) << " " << mcvv.val_at(cmf::kRPACCQE_Weight )
88  << "\n\t" << cmf::KeyToVarName(cmf::kRPARES_Weight) << " " << mcvv.val_at(cmf::kRPARES_Weight )
89  << "\n\t" << cmf::KeyToVarName(cmf::kDISvnCC1pi_Weight) << " " << mcvv.val_at(cmf::kDISvnCC1pi_Weight )
90  << "\n\t" << cmf::KeyToVarName(cmf::kEmpiricalMEC_Weight) << " " << mcvv.val_at(cmf::kEmpiricalMEC_Weight)
93  << "\n\t" << cmf::KeyToVarName(cmf::kOtherDIS_Weight) << " " << mcvv.val_at(cmf::kOtherDIS_Weight )
94  << "\n\t and too many GENIE knobs to list"
95  << std::endl;
96 
97  return o;
98  }
static std::string KeyToVarName(uint8_t const &key)
Definition: StaticFuncs.h:560
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::Parameter const &  par 
)

Definition at line 89 of file Parameter.cxx.

References allTimeWatchdog::endl, cmf::Parameter::IsConstrained(), cmf::Parameter::IsFixed(), cmf::Parameter::IsNuisance(), cmf::Parameter::IsOscPar(), cmf::Parameter::LowerBound(), cmf::Parameter::Name(), msf_helper::o, cmf::Parameter::UpperBound(), and cmf::Parameter::Value().

89  {
90 
91  o << "-- parameter: "
92  << std::setw(30) << par.Name() << std::setw(10)
93  << " val: " << par.Value()
94  << " fixed: " << par.IsFixed()
95  << " oscillation " << par.IsOscPar()
96  << " nuisance " << par.IsNuisance()
97  << " constrained " << par.IsConstrained()
98  << " lower: " << par.LowerBound()
99  << " upper: " << par.UpperBound()
100  << std::endl;
101 
102  return o;
103  }
Int_t par
Definition: SimpleIterate.C:24
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::SystVar const &  sv 
)

Definition at line 101 of file VarVals.cxx.

References cmf::SystVar::fMinus1Sigma, cmf::SystVar::fMinus2Sigma, cmf::SystVar::fPlus1Sigma, cmf::SystVar::fPlus2Sigma, cmf::SystVar::fType, KeyToVarName(), and msf_helper::o.

102  {
103  o << cmf::KeyToVarName(sv.fType)
104  << " | -2 sigma wgt: "
105  << sv.fMinus2Sigma
106  << " | -1 sigma wgt: "
107  << sv.fMinus1Sigma
108  << " | 1 sigma wgt: "
109  << sv.fPlus1Sigma
110  << " | 2 sigma wgt: "
111  << sv.fPlus2Sigma
112  << " | ";
113 
114  return o;
115  }
static std::string KeyToVarName(uint8_t const &key)
Definition: StaticFuncs.h:560
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::Location const &  loc 
)

Definition at line 106 of file Parameter.cxx.

References cOscParams_Strings, allTimeWatchdog::endl, cmf::Location::FDLocation(), kFARDET, kL, kNEARDET, cmf::Location::Location(), cmf::Location::NDLocation(), and msf_helper::o.

106  {
107  o << std::endl;
108  for(auto const& itr : loc.NDLocation()){
109  o << " -- parameter: "
110  << std::setw(30)
111  << itr.first
112  << std::setw(15)
113  << " val ND: "
114  << itr.second.Value()
115  << " fixed: "
116  << std::setw(5)
117  << itr.second.IsFixed();
118  if(loc.FDLocation().count(itr.first) > 0)
119  o << " val FD: "
120  << std::setw(15)
121  << " "
122  << loc.FDLocation().find(itr.first)->second.Value()
123  << " fixed: "
124  << std::setw(5)
125  << itr.second.IsFixed();
126 
127  o << std::endl;
128  }
129  for(auto const& itr : loc.FDLocation()){
130  if(loc.NDLocation().count(itr.first) < 1)
131  o << " -- parameter: "
132  << std::setw(30)
133  << itr.first
134  << std::setw(15)
135  << " val FD: "
136  << itr.second.Value()
137  << " fixed: "
138  << std::setw(5)
139  << itr.second.IsFixed()
140  << std::endl;
141  }
142 
143  return o;
144  }
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::EventId const &  evid 
)

Definition at line 148 of file VarVals.cxx.

References cmf::EventId::cycle, cmf::EventId::event, msf_helper::o, cmf::EventId::run, cmf::EventId::slice, and cmf::EventId::subrun.

149  {
150  o << "run "
151  << evid.run
152  << "\tsubrun "
153  << evid.subrun
154  << "\tevent "
155  << evid.event
156  << "\tcycle "
157  << evid.cycle
158  << "\tslice "
159  << evid.slice;
160 
161  return o;
162  }
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::OscParamPoint const &  hpp 
)

Definition at line 196 of file GridPointResult.cxx.

References cOscParams_Strings, allTimeWatchdog::endl, msf_helper::o, and cmf::OscParamPoint::OscPointAsVec().

197  {
198  for(auto const& itr : hpp.OscPointAsVec())
199  o << cmf::cOscParams_Strings[itr.Param()]
200  << " "
201  << itr.Value()
202  << " ";
203 
204  o << std::endl;
205 
206  return o;
207  }
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:272
std::ostream& cmf::operator<< ( std::ostream &  o,
SpillSummary const &  ss 
)
inline

Definition at line 199 of file Structs.h.

References cmf::SpillSummary::goodPOT, cmf::SpillSummary::liveTime, cmf::SpillSummary::numGoodSpills, msf_helper::o, cmf::SpillSummary::totalNumSpills, and cmf::SpillSummary::totalPOT.

200  {
201  o << "good POT: "
202  << ss.goodPOT
203  << " total POT: "
204  << ss.totalPOT
205  << " live time: "
206  << ss.liveTime
207  << " good spills: "
208  << ss.numGoodSpills
209  << " total spills: "
210  << ss.totalNumSpills;
211 
212  return o;
213  }
Float_t ss
Definition: plot.C:24
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::DataVarVals const &  dvv 
)

Definition at line 209 of file VarVals.cxx.

References allTimeWatchdog::endl, cmf::MetaData::isMC, KeyToVarName(), kFake_Weight, kHad_RecoE, kLep_RecoE, kLep_RecoE_MCFrac, kNu_RecoE, kNuE_CVN, kNuE_NumMichel, kNuESelection, kNuMuSelection, msf_helper::o, cmf::MetaData::selectionType, and cmf::DataVarVals::val_at().

210  {
211  cmf::MetaData numumd;
212  cmf::MetaData nuemd;
213 
214  numumd.isMC = false;
215  nuemd .isMC = false;
218 
219  o << "Event Data related variables are: "
220  << "\n\t" << cmf::KeyToVarName(cmf::kNuE_CVN) << " " << dvv.val_at(cmf::kNuE_CVN, nuemd )
221  << "\n\t" << cmf::KeyToVarName(cmf::kNuE_NumMichel) << " " << dvv.val_at(cmf::kNuE_NumMichel, nuemd )
222  << "\n\t" << cmf::KeyToVarName(cmf::kHad_RecoE) << " " << dvv.val_at(cmf::kHad_RecoE, nuemd )
223  << "\n\t" << cmf::KeyToVarName(cmf::kLep_RecoE) << " " << dvv.val_at(cmf::kLep_RecoE, nuemd )
224  << "\n\t" << cmf::KeyToVarName(cmf::kLep_RecoE_MCFrac) << " " << dvv.val_at(cmf::kLep_RecoE_MCFrac, numumd)
225  << "\n\t" << cmf::KeyToVarName(cmf::kNu_RecoE ) << " nue " << dvv.val_at(cmf::kNu_RecoE, nuemd )
226  << "\n\t" << cmf::KeyToVarName(cmf::kNu_RecoE ) << " numu " << dvv.val_at(cmf::kNu_RecoE, numumd)
227  << "\n\t" << cmf::KeyToVarName(cmf::kFake_Weight) << " " << dvv.val_at(cmf::kFake_Weight, nuemd )
228  << std::endl;
229 
230  return o;
231  }
cmf::SelectionType_t selectionType
Definition: Structs.h:116
static std::string KeyToVarName(uint8_t const &key)
Definition: StaticFuncs.h:560
void cmf::ParameterSetToLocation ( fhicl::ParameterSet const &  pset,
cmf::DetType_t const &  det,
cmf::Location loc 
)

Definition at line 10 of file ParameterUtility.cxx.

References fillBadChanDBTables::det, fhicl::ParameterSet::get(), fhicl::ParameterSet::get_names(), cmf::Location::InsertParameter(), fhicl::ParameterSet::is_empty(), LOG_DEBUG, ParseFluxesFile::param, sigma(), string, StringToDetectorType(), fhicl::ParameterSet::to_indented_string(), febshutoff_auto::val, and variance().

Referenced by cmf::CovarianceMatrixFitter::FillDataSpectrum(), cmf::ParameterUtility::Initialize(), and cmf::CovarianceMatrixFitter::writeResults().

13  {
14  // nothing to be done with an empty parameter set
15  if(pset.is_empty()) return;
16 
18  bool fixed;
19  bool nuisance;
20  bool constraint;
21  float centralVal;
22  float variance;
23  float sigma;
24  double val;
25  float lowerBound;
26  float upperBound;
27  std::string parstr;
28  std::string detstr;
29 
30  auto const& parNames = pset.get_names();
31 
32  for(auto const& itr : parNames){
33 
34  param = pset.get<fhicl::ParameterSet>(itr);
35 
36  LOG_DEBUG("ParameterSetToLocation")
37  << param.to_indented_string();
38 
39  detstr = param.get<std::string>("Detector", "BOTH");
40  parstr = param.get<std::string>("Parameter" );
41  fixed = param.get<bool >("Fixed", true );
42  val = param.get<double >("Value", 0. );
43  nuisance = param.get<bool >("Nuisance", false );
44  sigma = param.get<float >("Sigma", 1.e6 );
45  centralVal = param.get<float >("CentralValue", 0. );
46  variance = param.get<float >("Variance", 1.e-5 );
47  constraint = param.get<bool >("Constraint", false );
48  lowerBound = param.get<float >("LoVal", 0. );
49  upperBound = param.get<float >("HiVal", 1.e6 );
50 
51  // remove any Wgt from the parameter name
52  if(parstr.find("Wgt") != std::string::npos) parstr.erase(parstr.find("Wgt"), 3);
53 
54  if(detstr == "BOTH" || cmf::StringToDetectorType(detstr) == det){
56  det,
57  val,
58  fixed,
59  sigma,
60  centralVal,
61  variance,
62  nuisance,
63  constraint,
64  lowerBound,
65  upperBound));
66 
67  LOG_DEBUG("ParameterSpaceLoc")
68  << "inserting parameter "
69  << parstr;
70 
71  } // end if using the correct detector
72 
73  } // end loop over parameter names
74 
75  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
T get(std::string const &key) const
Definition: ParameterSet.h:231
static cmf::DetType_t StringToDetectorType(std::string const &str)
Definition: StaticFuncs.h:271
void InsertParameter(cmf::Parameter const &par)
Definition: Parameter.cxx:206
double sigma(TH1F *hist, double percentile)
std::string to_indented_string() const
double variance(Eigen::VectorXd x)
enum BeamMode string
void cmf::ParameterSetToLocation ( fhicl::ParameterSet const &  pset,
cmf::DetType_t const &  det,
cmf::ParameterSpaceLoc loc 
)

Definition at line 78 of file ParameterUtility.cxx.

References fillBadChanDBTables::det, fhicl::ParameterSet::get(), fhicl::ParameterSet::get_names(), fhicl::ParameterSet::is_empty(), LOG_DEBUG, ParseFluxesFile::param, sigma(), string, StringToDetectorType(), fhicl::ParameterSet::to_indented_string(), febshutoff_auto::val, and variance().

81  {
82  // nothing to be done with an empty parameter set
83  if(pset.is_empty()) return;
84 
86  bool fixed;
87  bool nuisance;
88  bool constraint;
89  float centralVal;
90  float variance;
91  float sigma;
92  double val;
93  float lowerBound;
94  float upperBound;
95  std::string parstr;
96  std::string detstr;
97 
98  auto const& parNames = pset.get_names();
99 
100  for(auto const& itr : parNames){
101 
102  param = pset.get<fhicl::ParameterSet>(itr);
103 
104  LOG_DEBUG("ParameterSetToLocation")
105  << param.to_indented_string();
106 
107  detstr = param.get<std::string>("Detector", "BOTH");
108  parstr = param.get<std::string>("Parameter" );
109  fixed = param.get<bool >("Fixed", true );
110  val = param.get<double >("Value", 0. );
111  nuisance = param.get<bool >("Nuisance", false );
112  sigma = param.get<float >("Sigma", 1.e6 );
113  centralVal = param.get<float >("CentralValue", 0. );
114  variance = param.get<float >("Variance", 1.e-5 );
115  constraint = param.get<bool >("Constraint", false );
116  lowerBound = param.get<float >("LoVal", 0. );
117  upperBound = param.get<float >("HiVal", 1.e6 );
118 
119  // remove any Wgt from the parameter name
120  if(parstr.find("Wgt") != std::string::npos) parstr.erase(parstr.find("Wgt"), 3);
121 
122  if(detstr == "BOTH" || cmf::StringToDetectorType(detstr) == det){
123  loc.emplace(parstr, cmf::Parameter(parstr,
124  det,
125  val,
126  fixed,
127  sigma,
128  centralVal,
129  variance,
130  nuisance,
131  constraint,
132  lowerBound,
133  upperBound));
134 
135  LOG_DEBUG("ParameterSpaceLoc")
136  << "inserting parameter "
137  << loc.find(parstr)->second.Name()
138  << " "
139  << loc.find(parstr)->second.Value()
140  << " / "
141  << val;
142 
143  } // end if using the correct detector
144 
145  } // end loop over parameter names
146 
147  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
T get(std::string const &key) const
Definition: ParameterSet.h:231
static cmf::DetType_t StringToDetectorType(std::string const &str)
Definition: StaticFuncs.h:271
double sigma(TH1F *hist, double percentile)
std::string to_indented_string() const
double variance(Eigen::VectorXd x)
enum BeamMode string
static long cmf::PeriodKey ( long const &  ep)
inlinestatic
long cmf::PeriodStringToInt ( std::string const &  epochStr)

Definition at line 67 of file Structs.cxx.

References LOG_DEBUG, and LOG_WARNING.

Referenced by cmf::MetaData::MetaData(), and cmf::MetaDataLite::MetaDataLite().

67  {
68  size_t first = epochStr.find_first_of("abcdefghijklmnopqrstuvwxyz");
69  if(first != std::string::npos){
70  LOG_WARNING("MetaData")
71  << "use of subperiods is deprecated, only full periods are used";
72 
73  //auto alpha = epochStr.substr(first, first + 1);
74  //return (std::stol(epochStr.substr(0, first).c_str(), nullptr, 0) * 1000 + static_cast<int>(*(alpha.c_str())));
75  }
76 
77  LOG_DEBUG("MetaData")
78  << epochStr
79  << " "
80  << std::stol(epochStr.substr(0, epochStr.length()).c_str(), nullptr, 0);
81 
82  return std::stol(epochStr.substr(0, epochStr.length()).c_str(), nullptr, 0);
83  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
#define LOG_WARNING(category)
static cmf::BeamType_t cmf::PeriodToBeamType ( std::string const &  str)
static
template<class T >
static bool cmf::readSingleResult ( art::Results const &  r,
std::string const &  module,
std::string const &  instance,
std::vector< T > &  resvec 
)
static
template<class T >
static bool cmf::readVectorResults ( art::Results const &  r,
std::string const &  module,
std::string const &  instance,
std::vector< T > &  resvec,
bool  clearResVec = true 
)
static
template<class T >
static bool cmf::readVectorResults ( art::Results const &  r,
std::string const &  module,
std::vector< T > &  resvec,
bool  clearResVec = true 
)
static
float cmf::RecoEnergy ( float  leptonicEnergy,
float  hadronicEnergy,
cmf::MetaData const &  md 
)
inlinestatic

Definition at line 313 of file VarVals.h.

References cmf::MetaData::BeamType(), cmf::MetaData::detector, cmf::MetaData::IsNCSelected(), cmf::MetaData::IsNuESelected(), cmf::MetaData::IsNuMuSelected(), NCEnergy(), NuEEnergy(), NuMuEnergy(), and cmf::MetaData::selectionType.

Referenced by cmf::DataVarVals::DataVars(), FillSpectrumFromSingleList(), cmf::EventListManipulator::FillTextFile(), and cmf::DataVarVals::NuRecoEVal().

316 {
317  if (md.IsNuMuSelected()) return cmf::NuMuEnergy(leptonicEnergy, hadronicEnergy );
318  else if(md.IsNCSelected() ) return cmf::NCEnergy (leptonicEnergy, hadronicEnergy, md.BeamType(), md.detector);
319  else if(md.IsNuESelected() ) return cmf::NuEEnergy (leptonicEnergy, hadronicEnergy, md.BeamType());
320  else
321  throw cet::exception("DataVarVals")
322  << "Unknown selection type "
323  << md.selectionType
324  << " requested to be used in calculating reconstructed energy";
325 
326  return std::numeric_limits<float>::lowest();
327 }
static float NuMuEnergy(float leptonicEnergy, float hadronicEnergy)
Definition: VarVals.h:330
static float NuEEnergy(float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType)
Definition: VarVals.h:338
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
static float NCEnergy(float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType, cmf::DetType_t const &detector)
Definition: VarVals.h:361
static long cmf::SelectionTypeKey ( cmf::SelectionType_t const &  st)
inlinestatic
void cmf::SerializeEventListColl ( std::string const &  dirName,
cmf::EventListColl const &  listColl 
)

Definition at line 117 of file Event.cxx.

References dir, fetch_tb_beamline_files::md, art::TFileDirectory::mkdir(), SerializeEvents(), ss, and cmf::MetaData::ToString().

Referenced by cmf::EventList::AddEvent(), and cmf::CAFToEventList::endJob().

119  {
120 
121  // make a directory in the output file, and the act of making it puts us
122  // into that directory of the file
124  auto dir = tfs->mkdir(dirName.c_str());
125 
128 
129  // first the metadata tree
130  // leave this pointer dangling because the fileService created & manages it
131  TTree *metadataTree = dir.make<TTree>( "metadata", "Event list metadata" );
132  metadataTree->Branch("metadata", &md);
133  metadataTree->Branch("spillsummary", &ss);
134 
135  for(auto const& itr : listColl){
136 
137  md = itr.ListMetaData();
138  ss = itr.ListSpillSummary();
139 
140  metadataTree->Fill();
141 
142  // same principle as above for the event tree
143  TTree *eventTree = dir.make<TTree>(md.ToString().c_str(), "CovarianceMatrixFit event records");
144 
145  cmf::SerializeEvents(eventTree,
146  md,
147  itr);
148 
149  } // end loop over the lists
150  }
TFileDirectory mkdir(std::string const &dir, std::string const &descr="")
Float_t ss
Definition: plot.C:24
void SerializeEvents(TTree *eventTree, cmf::MetaData const &md, cmf::EventList const &events)
Definition: Event.cxx:55
std::string ToString() const
Definition: Structs.cxx:133
std::string dirName
Definition: PlotSpectra.h:47
TDirectory * dir
Definition: macro.C:5
void cmf::SerializeEvents ( TTree *  eventTree,
cmf::MetaData const &  md,
cmf::EventList const &  events 
)

Definition at line 55 of file Event.cxx.

References cmf::DataVars::DataVars(), cmf::MetaData::isMC, kMinus1Sigma, kMinus2Sigma, kPlus1Sigma, kPlus2Sigma, string, cmf::TruthVars::TruthVars(), and cmf::WeightVars::WeightVars().

Referenced by cmf::EventList::AddEvent(), cmf::CMFCappedEventList::Serialize(), and SerializeEventListColl().

58  {
59 
60  cmf::DataVars dataVars;
61  cmf::TruthVars truthVars;
62  cmf::WeightVars weightVars;
63  cmf::EventId eventId;
64 
65  std::string eventidst("run/I:subrun/I:event/I:cycle/I:slice/I");
66  std::string datavarst("fNue_CVN/F:fNuE_NumMichel/F:fHad_RecoE/F:fLep_RecoE/F:fLep_RecoE_MCFrac/F:fRecoQ2/F:fFake_Weight/F");
67  std::string weightvst("fXSecCVPPFX_Weight/F:fRPACCQE_Weight/F:fRPARES_Weight/F:fDISvnCC1pi_Weight/F:fEmpiricalMEC_Weight/F:fEmpiricalMECtoGENIEQE_Weight/F:fEmpiricalMECtoGENIERES_Weight/F:fOtherDIS_Weight/F:fXSecCVPPFX2020_Weight/F:fPPFXFluxCV_Weight/F");
68  std::string truthvrst("fTrueE/F:fTruePDG/F:fTrueCCNC/F:fTrueIntType/F:fTruePDGOrig/F:fTrueParentPDG/F:fTrueNucHit/F:fTrueParentPT/F:fTrueParentPZ/F:fTrueParentDecay/F:fTrueParentTargetPDG/F:fTrueIntMode/F");
69 
70  eventTree->Branch("eventId" , &eventId , eventidst.c_str());
71  eventTree->Branch("dataVars", &dataVars, datavarst.c_str());
72 
73  std::vector<unsigned char> systVarKeys;
74  std::vector<float> systVarMinus2Wgts;
75  std::vector<float> systVarMinus1Wgts;
76  std::vector<float> systVarPlus1Wgts;
77  std::vector<float> systVarPlus2Wgts;
78  if(md.isMC){
79  eventTree->Branch("truthVars" , &truthVars , truthvrst.c_str());
80  eventTree->Branch("weightVars", &weightVars, weightvst.c_str());
81  eventTree->Branch("systVarKeys", &systVarKeys );
82  eventTree->Branch("systVarMinus2Wgts", &systVarMinus2Wgts );
83  eventTree->Branch("systVarMinus1Wgts", &systVarMinus1Wgts );
84  eventTree->Branch("systVarPlus1Wgts", &systVarPlus1Wgts );
85  eventTree->Branch("systVarPlus2Wgts", &systVarPlus2Wgts );
86  } // end if MC
87 
88  for(auto & itr : events){
89 
90  eventId = itr->EventID();
91  dataVars = itr->DataVals().DataVars();
92 
93  if(md.isMC){
94  truthVars = itr->MCVals().TruthVars();
95  weightVars = itr->MCVals().WeightVars();
96  systVarKeys .clear();
97  systVarMinus2Wgts.clear();
98  systVarMinus1Wgts.clear();
99  systVarPlus1Wgts .clear();
100  systVarPlus2Wgts .clear();
101  for(auto const& systItr : itr->MCVals().SystematicShifts()){
102  systVarKeys.emplace_back(systItr.Type());
103  systVarMinus2Wgts.emplace_back(systItr.SigmaWeight(cmf::kMinus2Sigma));
104  systVarMinus1Wgts.emplace_back(systItr.SigmaWeight(cmf::kMinus1Sigma));
105  systVarPlus1Wgts .emplace_back(systItr.SigmaWeight(cmf::kPlus1Sigma));
106  systVarPlus2Wgts .emplace_back(systItr.SigmaWeight(cmf::kPlus2Sigma));
107  }
108  }
109 
110  eventTree->Fill();
111  }
112  }
void events(int which)
Definition: Cana.C:52
enum BeamMode string
static cmf::BeamType_t cmf::StringToBeamType ( std::string const &  str)
inlinestatic

Definition at line 262 of file StaticFuncs.h.

References kFHC, kRHC, and kUnknownBeam.

Referenced by InteractionTypeKey().

263 {
264  if (str == "RHC") return cmf::kRHC;
265  else if(str == "FHC") return cmf::kFHC;
266 
267  return cmf::kUnknownBeam;
268 }
static cmf::ChiSqrCalc_t cmf::StringToChiSqrType ( std::string const &  str)
static
static cmf::ContourType_t cmf::StringToContourType ( std::string const &  str)
static
static cmf::DetType_t cmf::StringToDetectorType ( std::string const &  str)
inlinestatic
long cmf::StringToKey ( std::string const &  str)

Definition at line 15 of file Structs.cxx.

References DetectorTypeKey(), FileTypeKey(), InteractionTypeKey(), kBeam, kCosmicMuon, kDataFile, findDuplicateFiles::key, kFARDET, kNC, kNEARDET, kNuEBarCC, kNuECC, kNuESelection, kNuESelectionHighPID, kNuESelectionLowPID, kNuESelectionMidPID, kNuESelectionPeripheral, kNuMuBarCC, kNuMuCC, kNuMuSelection, kNuMuSelectionQ1, kNuMuSelectionQ2, kNuMuSelectionQ3, kNuMuSelectionQ4, kNuTauBarCC, kNuTauCC, kRockFluxSwap, kRockNonSwap, kSwap, kTauSwap, PeriodKey(), and SelectionTypeKey().

16  {
17  long key = 0;
18 
19  // check for the detector
20  if (str.find("Near") != std::string::npos) key += cmf::DetectorTypeKey(cmf::kNEARDET);
21  else if(str.find("Far" ) != std::string::npos) key += cmf::DetectorTypeKey(cmf::kFARDET );
22 
23  // check the period
24  if(str.find("Period") != std::string::npos)
25  key += cmf::PeriodKey(std::stol(str.substr(str.find("Period") + 6, std::string::npos)));
26  else if(str.find("P") != std::string::npos)
27  key += cmf::PeriodKey(std::stol(str.substr(str.find("P") + 1, std::string::npos)));
28 
29  // check the file type
30  if (str.find("Beam" ) != std::string::npos) key += cmf::FileTypeKey(cmf::kBeam );
31  else if(str.find("TauSwap" ) != std::string::npos) key += cmf::FileTypeKey(cmf::kTauSwap );
32  else if(str.find("FluxSwap" ) != std::string::npos) key += cmf::FileTypeKey(cmf::kSwap );
33  else if(str.find("RockFluxSwap") != std::string::npos) key += cmf::FileTypeKey(cmf::kRockFluxSwap);
34  else if(str.find("RockNonSwap" ) != std::string::npos) key += cmf::FileTypeKey(cmf::kRockNonSwap );
35  else if(str.find("Data" ) != std::string::npos) key += cmf::FileTypeKey(cmf::kDataFile );
36 
37  // check for a selection
38  if (str.find("NuMuSelQ1" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuMuSelectionQ1 );
39  else if(str.find("NuMuSelQ2" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuMuSelectionQ2 );
40  else if(str.find("NuMuSelQ3" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuMuSelectionQ3 );
41  else if(str.find("NuMuSelQ4" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuMuSelectionQ4 );
42  else if(str.find("NuMuSel" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuMuSelection );
43  else if(str.find("NuESel_AllPID" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuESelection );
44  else if(str.find("NuESel_LowPID" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuESelectionLowPID );
45  else if(str.find("NuESel_MidPID" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuESelectionMidPID );
46  else if(str.find("NuESel_HighPID" ) != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuESelectionHighPID );
47  else if(str.find("NuESel_Peripheral") != std::string::npos) key += cmf::SelectionTypeKey(cmf::kNuESelectionPeripheral);
48 
49  // check for an interaction type
50  if (str.find("NuMuCC" ) != std::string::npos) key += cmf::InteractionTypeKey(cmf::kNuMuCC );
51  else if(str.find("NuMuBarCC" ) != std::string::npos) key += cmf::InteractionTypeKey(cmf::kNuMuBarCC );
52  else if(str.find("NuECC" ) != std::string::npos) key += cmf::InteractionTypeKey(cmf::kNuECC );
53  else if(str.find("NuEBarCC" ) != std::string::npos) key += cmf::InteractionTypeKey(cmf::kNuEBarCC );
54  else if(str.find("NuTauCC" ) != std::string::npos) key += cmf::InteractionTypeKey(cmf::kNuTauCC );
55  else if(str.find("NuTauBarCC") != std::string::npos) key += cmf::InteractionTypeKey(cmf::kNuTauBarCC);
56  else if(str.find("NC" ) != std::string::npos) key += cmf::InteractionTypeKey(cmf::kNC );
57  else if(str.find("CosmicMuon") != std::string::npos) key += cmf::InteractionTypeKey(cmf::kCosmicMuon);
58 
59  // check if this is data or MC, multiply by +/- 1 depending on the answer
60  if (str.find("MC") != std::string::npos) key *= 1;
61  else if(str.find("Data") != std::string::npos) key *= -1;
62 
63  return key;
64  }
static long SelectionTypeKey(cmf::SelectionType_t const &st)
Definition: StaticFuncs.h:19
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:15
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:16
static long InteractionTypeKey(cmf::InteractionType_t const &it)
Definition: StaticFuncs.h:20
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:17
static cmf::OscParm_t cmf::StringToOscParmType ( std::string const &  str)
static
static cmf::SelectionType_t cmf::StringToSelectionType ( std::string const &  str)
inlinestatic

Definition at line 245 of file StaticFuncs.h.

References kNCSelection, kNuESelection, kNuESelectionHighPID, kNuESelectionLowPID, kNuESelectionPeripheral, kNuMuSelection, kNuMuSelectionQ1, kNuMuSelectionQ2, kNuMuSelectionQ3, kNuMuSelectionQ4, and kUnknownSelection.

Referenced by cmf::SelectionUtility::Initialize(), and InteractionTypeKey().

246 {
247  if (str == "NuESel_LowPID" ) return cmf::kNuESelectionLowPID;
248  else if(str == "NuESel_HighPID" ) return cmf::kNuESelectionHighPID;
249  else if(str == "NuESel_Peripheral") return cmf::kNuESelectionPeripheral;
250  else if(str == "NuESel_AllPID" ) return cmf::kNuESelection;
251  else if(str == "NuMuSel" ) return cmf::kNuMuSelection;
252  else if(str == "NuMuSelQ1" ) return cmf::kNuMuSelectionQ1;
253  else if(str == "NuMuSelQ2" ) return cmf::kNuMuSelectionQ2;
254  else if(str == "NuMuSelQ3" ) return cmf::kNuMuSelectionQ3;
255  else if(str == "NuMuSelQ4" ) return cmf::kNuMuSelectionQ4;
256  else if(str == "NCSel" ) return cmf::kNCSelection;
257 
258  return cmf::kUnknownSelection;
259 }
static uint8_t cmf::VarNameToKey ( std::string const &  name)
inlinestatic

Definition at line 381 of file StaticFuncs.h.

References febshutoff_auto::end, kUnknownVar, kVarNameToKey(), and LOG_VERBATIM.

Referenced by cmf::ShifterAndWeighter::CMFSystVarWeight(), cmf::CAFToEventList::FillMCVals(), InteractionTypeKey(), and cmf::Parameter::Parameter().

382 {
383  auto const& itr = cmf::kVarNameToKey.find(name);
384  if(itr != cmf::kVarNameToKey.end()) return itr->second;
385  // if (name.find("NuE_CVN") != std::string::npos) return cmf::kNuE_CVN;
386  // else if(name.find("NuE_NumMichel") != std::string::npos) return cmf::kNuE_NumMichel;
387  // else if(name.find("Had_RecoE") != std::string::npos) return cmf::kHad_RecoE;
388  // else if(name.find("Lep_RecoE") != std::string::npos) return cmf::kLep_RecoE;
389  // else if(name.find("Nu_RecoE") != std::string::npos) return cmf::kNu_RecoE;
390  // else if(name.find("Lep_RecoE_MCFrac") != std::string::npos) return cmf::kLep_RecoE_MCFrac;
391  // else if(name.find("Reco_Q2") != std::string::npos) return cmf::kRecoQ2;
392  // else if(name.find("Fake_Weight") != std::string::npos) return cmf::kFake_Weight;
393 
394  // else if(name.find("TrueE") != std::string::npos) return cmf::kTrueE;
395  // else if(name.find("TruePDG") != std::string::npos) return cmf::kTruePDG;
396  // else if(name.find("TrueCCNC") != std::string::npos) return cmf::kTrueCCNC;
397  // else if(name.find("TrueIntType") != std::string::npos) return cmf::kTrueIntType;
398  // else if(name.find("TruePDGOrig") != std::string::npos) return cmf::kTruePDGOrig;
399  // else if(name.find("TrueParentPDG") != std::string::npos) return cmf::kTrueParentPDG;
400  // else if(name.find("TrueParentPT") != std::string::npos) return cmf::kTrueParentPT;
401  // else if(name.find("TrueParentPZ") != std::string::npos) return cmf::kTrueParentPZ;
402  // else if(name.find("TrueParentDecay") != std::string::npos) return cmf::kTrueParentDecay;
403  // else if(name.find("TrueParentTargetPDG") != std::string::npos) return cmf::kTrueParentTargetPDG;
404  // else if(name.find("TrueHitNuc") != std::string::npos) return cmf::kTrueHitNuc;
405  // else if(name.find("TrueIntMode") != std::string::npos) return cmf::kTrueIntMode;
406 
407  // // TODO change XSecCVWgt to include PPFX label
408  // // else if(name.find("XsecCVWgt") != std::string::npos) return cmf::kXSecCVPPFX_Weight;
409  // else if(name.find("XsecCV2020") != std::string::npos) return cmf::kXSecCV2020Wgt;
410  // else if(name.find("PPFXFluxCV") != std::string::npos) return cmf::kPPFXFluxCVWgt;
411  // else if(name.find("RPARES") != std::string::npos) return cmf::kRPARES_Weight;
412 
413  // // Variables for the size of a shift
414  // else if(name.find("-2sigma") != std::string::npos) return cmf::kMinus2Sigma;
415  // else if(name.find("-1sigma") != std::string::npos) return cmf::kMinus1Sigma;
416  // else if(name.find("+1sigma") != std::string::npos) return cmf::kPlus1Sigma;
417  // else if(name.find("+2sigma") != std::string::npos) return cmf::kPlus2Sigma;
418 
419  // // Calibration
420  // else if(name.find("lightmodel-lightdown") != std::string::npos) return cmf::kLightModelLightDownCalibUp;
421  // else if(name.find("lightmodel-lightup") != std::string::npos) return cmf::kLightModelLightUpCalibDown;
422  // else if(name.find("ckv-proton") != std::string::npos) return cmf::kCkvProtonShiftDown;
423  // else if(name.find("RelativeCalibration") != std::string::npos) return cmf::kRelativeCalibration;
424  // else if(name.find("AbsoluteCalibration") != std::string::npos) return cmf::kAbsoluteCalibration;
425  // else if(name.find("CalibrationShape") != std::string::npos) return cmf::kCalibShape;
426 
427  // //GENIE knobs
428 
429  // // NC elastic parameters
430  // else if(name.find("MaNCEL") != std::string::npos) return cmf::kMaNCEL;
431  // else if(name.find("EtaNCEL") != std::string::npos) return cmf::kEtaNCEL;
432 
433  // // DIS tweaking parameters
434  // else if(name.find("AhtBY") != std::string::npos) return cmf::kAhtBY;
435  // else if(name.find("BhtBY") != std::string::npos) return cmf::kBhtBY;
436  // else if(name.find("CV1uBY") != std::string::npos) return cmf::kCV1uBY;
437  // else if(name.find("CV2uBY") != std::string::npos) return cmf::kCV2uBY;
438 
439  // // Hadronization (free nucleon target)
440  // else if(name.find("AGKY_xF1pi") != std::string::npos) return cmf::kAGKY_xF1pi;
441  // else if(name.find("AGKY_pT1pi") != std::string::npos) return cmf::kAGKY_pT1pi;
442 
443  // // Resonance decays
444  // else if(name.find("BR1gamma") != std::string::npos) return cmf::kBR1gamma;
445  // else if(name.find("BR1eta") != std::string::npos) return cmf::kBR1eta;
446  // else if(name.find("Theta_Delta2Npi") != std::string::npos) return cmf::kTheta_Delta2Npi;
447 
448  // else if(name.find("MvCCRES") != std::string::npos) return cmf::kMvCCRES;
449  // else if(name.find("MaCCRES") != std::string::npos) return cmf::kMaCCRES;
450  // else if(name.find("MaNCRES") != std::string::npos) return cmf::kMaNCRES;
451  // else if(name.find("RPACCQEshapeEnh") != std::string::npos) return cmf::kRPACCQEshapeEnh;
452  // else if(name.find("RPACCQEshapeSupp") != std::string::npos) return cmf::kRPACCQEshapeSupp;
453 
454  // // coherent scattering
455  // else if(name.find("COHCCScale2018") != std::string::npos) return cmf::kCOHCCScaleSyst2018;
456  // else if(name.find("COHNCScale2018") != std::string::npos) return cmf::kCOHNCScaleSyst2018;
457 
458  // // 2020
459  // else if(name.find("ZExpAxialFFSyst2020_eV1") != std::string::npos) return cmf::kZExpEV1Syst2020;
460  // else if(name.find("ZExpAxialFFSyst2020_eV2") != std::string::npos) return cmf::kZExpEV2Syst2020;
461  // else if(name.find("ZExpAxialFFSyst2020_eV3") != std::string::npos) return cmf::kZExpEV3Syst2020;
462  // else if(name.find("ZExpAxialFFSyst2020_eV4") != std::string::npos) return cmf::kZExpEV4Syst2020;
463  // else if(name.find("ZNormCCQE") != std::string::npos) return cmf::kZNormCCQE;
464  // else if(name.find("RESLowQ2SuppSyst2020") != std::string::npos) return cmf::kRESLowQ2SuppSyst2020;
465  // else if(name.find("hNFSISyst2020_MFP") != std::string::npos) return cmf::khNFSISyst2020_MFP;
466  // else if(name.find("hNFSISyst2020_EV1") != std::string::npos) return cmf::khNFSISyst2020_EV1;
467  // else if(name.find("MECEnuShapeSyst2020Nu") != std::string::npos) return cmf::kMECEnuShapeSyst2020Nu;
468  // else if(name.find("MECEnuShapeSyst2020AntiNu") != std::string::npos) return cmf::kMECEnuShapeSyst2020AntiNu;
469  // else if(name.find("MECShapeSyst2020Nu") != std::string::npos) return cmf::kMECShapeSyst2020Nu;
470  // else if(name.find("MECShapeSyst2020AntiNu") != std::string::npos) return cmf::kMECShapeSyst2020AntiNu;
471  // else if(name.find("MECInitStateNPFracSyst2020Nu") != std::string::npos) return cmf::kMECInitStateNPFracSyst2020Nu;
472  // else if(name.find("MECInitStateNPFracSyst2020AntiNu") != std::string::npos) return cmf::kMECInitStateNPFracSyst2020AntiNu;
473  // else if(name.find("RadCorrNue") != std::string::npos) return cmf::kRadCorrNue;
474  // else if(name.find("RadCorrNuebar") != std::string::npos) return cmf::kRadCorrNuebar;
475  // else if(name.find("2ndClassCurrs") != std::string::npos) return cmf::k2ndClassCurrs;
476  // else if(name.find("GENIEPCA00") != std::string::npos) return cmf::kGENIEPCA00;
477  // else if(name.find("GENIEPCA01") != std::string::npos) return cmf::kGENIEPCA01;
478  // else if(name.find("GENIEPCA02") != std::string::npos) return cmf::kGENIEPCA02;
479  // else if(name.find("GENIEPCA03") != std::string::npos) return cmf::kGENIEPCA03;
480  // else if(name.find("GENIEPCA04") != std::string::npos) return cmf::kGENIEPCA04;
481  // else if(name.find("GENIEPCA05") != std::string::npos) return cmf::kGENIEPCA05;
482  // else if(name.find("GENIEPCA06") != std::string::npos) return cmf::kGENIEPCA06;
483  // else if(name.find("GENIEPCA07") != std::string::npos) return cmf::kGENIEPCA07;
484  // else if(name.find("GENIEPCA08") != std::string::npos) return cmf::kGENIEPCA08;
485  // else if(name.find("GENIEPCA09") != std::string::npos) return cmf::kGENIEPCA09;
486  // else if(name.find("GENIEPCA10") != std::string::npos) return cmf::kGENIEPCA10;
487  // else if(name.find("GENIEPCA11") != std::string::npos) return cmf::kGENIEPCA11;
488  // else if(name.find("MvNCRES") != std::string::npos) return cmf::kMvNCRES;
489  // else if(name.find("UnCorrNDMuEScaleSyst2020") != std::string::npos) return cmf::kUnCorrNDMuEScaleSyst2020 ;
490  // else if(name.find("UnCorrMuCatMuESyst2020") != std::string::npos) return cmf::kUnCorrMuCatMuESyst2020 ;
491  // else if(name.find("PileupMuESyst2020") != std::string::npos) return cmf::kPileupMuESyst2020 ;
492  // else if(name.find("CorrMuEScaleSyst2020") != std::string::npos) return cmf::kCorrMuEScaleSyst2020 ;
493  // else if(name.find("NeutronVisEScalePrimariesSyst2018") != std::string::npos) return cmf::kNeutronVisEScalePrimariesSyst2018;
494  // else if(name.find("MichelTaggingSyst2020") != std::string::npos) return cmf::kMichelTaggingSyst2020 ;
495  // else if(name.find("Ana2020NormFHC") != std::string::npos) return cmf::kAna2020NormFHC ;
496  // else if(name.find("Ana2020NormRHC") != std::string::npos) return cmf::kAna2020NormRHC ;
497  // else if(name.find("Norm_1Nux" ) != std::string::npos) return cmf::kNorm_1Nux ;
498  // else if(name.find("MeanQ0_1Nux" ) != std::string::npos) return cmf::kMeanQ0_1Nux ;
499  // else if(name.find("MeanQ3_1Nux" ) != std::string::npos) return cmf::kMeanQ3_1Nux ;
500  // else if(name.find("SigmaQ0_1Nux") != std::string::npos) return cmf::kSigmaQ0_1Nux ;
501  // else if(name.find("SigmaQ3_1Nux") != std::string::npos) return cmf::kSigmaQ3_1Nux ;
502  // else if(name.find("Corr_1Nux") != std::string::npos) return cmf::kCorr_1Nux ;
503  // else if(name.find("Norm_2Nux" ) != std::string::npos) return cmf::kNorm_2Nux ;
504  // else if(name.find("MeanQ0_2Nux" ) != std::string::npos) return cmf::kMeanQ0_2Nux ;
505  // else if(name.find("MeanQ3_2Nux" ) != std::string::npos) return cmf::kMeanQ3_2Nux ;
506  // else if(name.find("SigmaQ0_2Nux") != std::string::npos) return cmf::kSigmaQ0_2Nux ;
507  // else if(name.find("SigmaQ3_2Nux") != std::string::npos) return cmf::kSigmaQ3_2Nux ;
508  // else if(name.find("Corr_2Nux") != std::string::npos) return cmf::kCorr_2Nux ;
509  // else if(name.find("BaselineNux") != std::string::npos) return cmf::kBaselineNux ;
510  // else if(name.find("TauScaleSyst") != std::string::npos) return cmf::kTauScaleSyst ;
511  // else if(name.find("DISvpCC0pi_2020") != std::string::npos) return cmf::kDISvpCC0pi_2020 ;
512  // else if(name.find("DISvpCC1pi_2020") != std::string::npos) return cmf::kDISvpCC1pi_2020 ;
513  // else if(name.find("DISvpCC2pi_2020") != std::string::npos) return cmf::kDISvpCC2pi_2020 ;
514  // else if(name.find("DISvpCC3pi_2020") != std::string::npos) return cmf::kDISvpCC3pi_2020 ;
515  // else if(name.find("DISvpNC0pi_2020") != std::string::npos) return cmf::kDISvpNC0pi_2020 ;
516  // else if(name.find("DISvpNC1pi_2020") != std::string::npos) return cmf::kDISvpNC1pi_2020 ;
517  // else if(name.find("DISvpNC2pi_2020") != std::string::npos) return cmf::kDISvpNC2pi_2020 ;
518  // else if(name.find("DISvpNC3pi_2020") != std::string::npos) return cmf::kDISvpNC3pi_2020 ;
519  // else if(name.find("DISvnCC0pi_2020") != std::string::npos) return cmf::kDISvnCC0pi_2020 ;
520  // else if(name.find("DISvnCC1pi_2020") != std::string::npos) return cmf::kDISvnCC1pi_2020 ;
521  // else if(name.find("DISvnCC2pi_2020") != std::string::npos) return cmf::kDISvnCC2pi_2020 ;
522  // else if(name.find("DISvnCC3pi_2020") != std::string::npos) return cmf::kDISvnCC3pi_2020 ;
523  // else if(name.find("DISvnNC0pi_2020") != std::string::npos) return cmf::kDISvnNC0pi_2020 ;
524  // else if(name.find("DISvnNC1pi_2020") != std::string::npos) return cmf::kDISvnNC1pi_2020 ;
525  // else if(name.find("DISvnNC2pi_2020") != std::string::npos) return cmf::kDISvnNC2pi_2020 ;
526  // else if(name.find("DISvnNC3pi_2020") != std::string::npos) return cmf::kDISvnNC3pi_2020 ;
527  // else if(name.find("DISvbarpCC0pi_2020") != std::string::npos) return cmf::kDISvbarpCC0pi_2020 ;
528  // else if(name.find("DISvbarpCC1pi_2020") != std::string::npos) return cmf::kDISvbarpCC1pi_2020 ;
529  // else if(name.find("DISvbarpCC2pi_2020") != std::string::npos) return cmf::kDISvbarpCC2pi_2020 ;
530  // else if(name.find("DISvbarpCC3pi_2020") != std::string::npos) return cmf::kDISvbarpCC3pi_2020 ;
531  // else if(name.find("DISvbarpNC0pi_2020") != std::string::npos) return cmf::kDISvbarpNC0pi_2020 ;
532  // else if(name.find("DISvbarpNC1pi_2020") != std::string::npos) return cmf::kDISvbarpNC1pi_2020 ;
533  // else if(name.find("DISvbarpNC2pi_2020") != std::string::npos) return cmf::kDISvbarpNC2pi_2020 ;
534  // else if(name.find("DISvbarpNC3pi_2020") != std::string::npos) return cmf::kDISvbarpNC3pi_2020 ;
535  // else if(name.find("DISvbarnCC0pi_2020") != std::string::npos) return cmf::kDISvbarnCC0pi_2020 ;
536  // else if(name.find("DISvbarnCC1pi_2020") != std::string::npos) return cmf::kDISvbarnCC1pi_2020 ;
537  // else if(name.find("DISvbarnCC2pi_2020") != std::string::npos) return cmf::kDISvbarnCC2pi_2020 ;
538  // else if(name.find("DISvbarnCC3pi_2020") != std::string::npos) return cmf::kDISvbarnCC3pi_2020 ;
539  // else if(name.find("DISvbarnNC0pi_2020") != std::string::npos) return cmf::kDISvbarnNC0pi_2020 ;
540  // else if(name.find("DISvbarnNC1pi_2020") != std::string::npos) return cmf::kDISvbarnNC1pi_2020 ;
541  // else if(name.find("DISvbarnNC2pi_2020") != std::string::npos) return cmf::kDISvbarnNC2pi_2020 ;
542  // else if(name.find("DISvbarnNC3pi_2020") != std::string::npos) return cmf::kDISvbarnNC3pi_2020 ;
543  // else if(name.find("FormZone_2020") != std::string::npos) return cmf::kFormZone_2020 ;
544  // else if(name.find("hNFSISyst2020_EV2") != std::string::npos) return cmf::khNFSISyst2020_EV2 ;
545  // else if(name.find("hNFSISyst2020_EV3") != std::string::npos) return cmf::khNFSISyst2020_EV3 ;
546  // else if(name.find("COHCCScaleSyst2018") != std::string::npos) return cmf::kCOHCCScaleSyst2018 ;
547  // else if(name.find("COHNCScaleSyst2018") != std::string::npos) return cmf::kCOHNCScaleSyst2018 ;
548 
549  LOG_VERBATIM("VarNameToKey")
550  << "Variable name "
551  << name
552  << " does not correspond to any key, returning 0";
553 
554  return cmf::kUnknownVar;
555 }
const XML_Char * name
Definition: expat.h:151
#define LOG_VERBATIM(category)
static const std::map< std::string, uint8_t > kVarNameToKey({{"NuE_CVN", cmf::kNuE_CVN},{"NuE_NumMichel", cmf::kNuE_NumMichel},{"Had_RecoE", cmf::kHad_RecoE},{"Lep_RecoE", cmf::kLep_RecoE},{"Nu_RecoE", cmf::kNu_RecoE},{"Lep_RecoE_MCFrac", cmf::kLep_RecoE_MCFrac},{"Reco_Q2", cmf::kRecoQ2},{"Fake_Weight", cmf::kFake_Weight},{"TrueE", cmf::kTrueE},{"TruePDG", cmf::kTruePDG},{"TrueCCNC", cmf::kTrueCCNC},{"TrueIntType", cmf::kTrueIntType},{"TruePDGOrig", cmf::kTruePDGOrig},{"TrueParentPDG", cmf::kTrueParentPDG},{"TrueParentPT", cmf::kTrueParentPT},{"TrueParentPZ", cmf::kTrueParentPZ},{"TrueParentDecay", cmf::kTrueParentDecay},{"TrueParentTargetPDG", cmf::kTrueParentTargetPDG},{"TrueHitNuc", cmf::kTrueHitNuc},{"TrueIntMode", cmf::kTrueIntMode},{"XsecCV2020", cmf::kXSecCV2020Wgt},{"PPFXFluxCV", cmf::kPPFXFluxCVWgt},{"RPARES", cmf::kRPARES_Weight},{"-2sigma", cmf::kMinus2Sigma},{"-1sigma", cmf::kMinus1Sigma},{"+1sigma", cmf::kPlus1Sigma},{"+2sigma", cmf::kPlus2Sigma},{"lightmodel-lightdown", cmf::kLightModelLightDownCalibUp},{"lightmodel-lightup", cmf::kLightModelLightUpCalibDown},{"ckv-proton", cmf::kCkvProtonShiftDown},{"RelativeCalibration", cmf::kRelativeCalibration},{"AbsoluteCalibration", cmf::kAbsoluteCalibration},{"CalibrationShape", cmf::kCalibShape},{"MaNCEL", cmf::kMaNCEL},{"EtaNCEL", cmf::kEtaNCEL},{"AhtBY", cmf::kAhtBY},{"BhtBY", cmf::kBhtBY},{"CV1uBY", cmf::kCV1uBY},{"CV2uBY", cmf::kCV2uBY},{"AGKY_xF1pi", cmf::kAGKY_xF1pi},{"AGKY_pT1pi", cmf::kAGKY_pT1pi},{"BR1gamma", cmf::kBR1gamma},{"BR1eta", cmf::kBR1eta},{"Theta_Delta2Npi", cmf::kTheta_Delta2Npi},{"MvCCRES", cmf::kMvCCRES},{"MaCCRES", cmf::kMaCCRES},{"MvNCRES", cmf::kMvNCRES},{"MaNCRES", cmf::kMaNCRES},{"RPACCQEshapeEnh", cmf::kRPACCQEshapeEnh},{"RPACCQEshapeSupp", cmf::kRPACCQEshapeSupp},{"COHCCScale2018", cmf::kCOHCCScaleSyst2018},{"COHNCScale2018", cmf::kCOHNCScaleSyst2018},{"ZExpAxialFFSyst2020_eV1", cmf::kZExpEV1Syst2020},{"ZExpAxialFFSyst2020_eV2", cmf::kZExpEV2Syst2020},{"ZExpAxialFFSyst2020_eV3", cmf::kZExpEV3Syst2020},{"ZExpAxialFFSyst2020_eV4", cmf::kZExpEV4Syst2020},{"ZNormCCQE", cmf::kZNormCCQE},{"RESLowQ2SuppSyst2020", cmf::kRESLowQ2SuppSyst2020},{"hNFSISyst2020_MFP", cmf::khNFSISyst2020_MFP},{"hNFSISyst2020_EV1", cmf::khNFSISyst2020_EV1},{"MECEnuShapeSyst2020Nu", cmf::kMECEnuShapeSyst2020Nu},{"MECEnuShapeSyst2020AntiNu", cmf::kMECEnuShapeSyst2020AntiNu},{"MECShapeSyst2020Nu", cmf::kMECShapeSyst2020Nu},{"MECShapeSyst2020AntiNu", cmf::kMECShapeSyst2020AntiNu},{"MECInitStateNPFracSyst2020Nu", cmf::kMECInitStateNPFracSyst2020Nu},{"MECInitStateNPFracSyst2020AntiNu", cmf::kMECInitStateNPFracSyst2020AntiNu},{"RadCorrNue", cmf::kRadCorrNue},{"RadCorrNuebar", cmf::kRadCorrNuebar},{"2ndClassCurrs", cmf::k2ndClassCurrs},{"GENIEPCA00", cmf::kGENIEPCA00},{"GENIEPCA01", cmf::kGENIEPCA01},{"GENIEPCA02", cmf::kGENIEPCA02},{"GENIEPCA03", cmf::kGENIEPCA03},{"GENIEPCA04", cmf::kGENIEPCA04},{"GENIEPCA05", cmf::kGENIEPCA05},{"GENIEPCA06", cmf::kGENIEPCA06},{"GENIEPCA07", cmf::kGENIEPCA07},{"GENIEPCA08", cmf::kGENIEPCA08},{"GENIEPCA09", cmf::kGENIEPCA09},{"GENIEPCA10", cmf::kGENIEPCA10},{"GENIEPCA11", cmf::kGENIEPCA11},{"UnCorrNDMuEScaleSyst2020", cmf::kUnCorrNDMuEScaleSyst2020},{"UnCorrMuCatMuESyst2020", cmf::kUnCorrMuCatMuESyst2020},{"PileupMuESyst2020", cmf::kPileupMuESyst2020},{"CorrMuEScaleSyst2020", cmf::kCorrMuEScaleSyst2020},{"NeutronVisEScalePrimariesSyst2018", cmf::kNeutronVisEScalePrimariesSyst2018},{"MichelTaggingSyst2020", cmf::kMichelTaggingSyst2020},{"Ana2020NormFHC", cmf::kAna2020NormFHC},{"Ana2020NormRHC", cmf::kAna2020NormRHC},{"Norm_1Nux", cmf::kNorm_1Nux},{"MeanQ0_1Nux", cmf::kMeanQ0_1Nux},{"MeanQ3_1Nux", cmf::kMeanQ3_1Nux},{"SigmaQ0_1Nux", cmf::kSigmaQ0_1Nux},{"SigmaQ3_1Nux", cmf::kSigmaQ3_1Nux},{"Corr_1Nux", cmf::kCorr_1Nux},{"Norm_2Nux", cmf::kNorm_2Nux},{"MeanQ0_2Nux", cmf::kMeanQ0_2Nux},{"MeanQ3_2Nux", cmf::kMeanQ3_2Nux},{"SigmaQ0_2Nux", cmf::kSigmaQ0_2Nux},{"SigmaQ3_2Nux", cmf::kSigmaQ3_2Nux},{"Corr_2Nux", cmf::kCorr_2Nux},{"BaselineNux", cmf::kBaselineNux},{"TauScaleSyst", cmf::kTauScaleSyst},{"DISvpCC0pi_2020", cmf::kDISvpCC0pi_2020},{"DISvpCC1pi_2020", cmf::kDISvpCC1pi_2020},{"DISvpCC2pi_2020", cmf::kDISvpCC2pi_2020},{"DISvpCC3pi_2020", cmf::kDISvpCC3pi_2020},{"DISvpNC0pi_2020", cmf::kDISvpNC0pi_2020},{"DISvpNC1pi_2020", cmf::kDISvpNC1pi_2020},{"DISvpNC2pi_2020", cmf::kDISvpNC2pi_2020},{"DISvpNC3pi_2020", cmf::kDISvpNC3pi_2020},{"DISvnCC0pi_2020", cmf::kDISvnCC0pi_2020},{"DISvnCC1pi_2020", cmf::kDISvnCC1pi_2020},{"DISvnCC2pi_2020", cmf::kDISvnCC2pi_2020},{"DISvnCC3pi_2020", cmf::kDISvnCC3pi_2020},{"DISvnNC0pi_2020", cmf::kDISvnNC0pi_2020},{"DISvnNC1pi_2020", cmf::kDISvnNC1pi_2020},{"DISvnNC2pi_2020", cmf::kDISvnNC2pi_2020},{"DISvnNC3pi_2020", cmf::kDISvnNC3pi_2020},{"DISvbarpCC0pi_2020", cmf::kDISvbarpCC0pi_2020},{"DISvbarpCC1pi_2020", cmf::kDISvbarpCC1pi_2020},{"DISvbarpCC2pi_2020", cmf::kDISvbarpCC2pi_2020},{"DISvbarpCC3pi_2020", cmf::kDISvbarpCC3pi_2020},{"DISvbarpNC0pi_2020", cmf::kDISvbarpNC0pi_2020},{"DISvbarpNC1pi_2020", cmf::kDISvbarpNC1pi_2020},{"DISvbarpNC2pi_2020", cmf::kDISvbarpNC2pi_2020},{"DISvbarpNC3pi_2020", cmf::kDISvbarpNC3pi_2020},{"DISvbarnCC0pi_2020", cmf::kDISvbarnCC0pi_2020},{"DISvbarnCC1pi_2020", cmf::kDISvbarnCC1pi_2020},{"DISvbarnCC2pi_2020", cmf::kDISvbarnCC2pi_2020},{"DISvbarnCC3pi_2020", cmf::kDISvbarnCC3pi_2020},{"DISvbarnNC0pi_2020", cmf::kDISvbarnNC0pi_2020},{"DISvbarnNC1pi_2020", cmf::kDISvbarnNC1pi_2020},{"DISvbarnNC2pi_2020", cmf::kDISvbarnNC2pi_2020},{"DISvbarnNC3pi_2020", cmf::kDISvbarnNC3pi_2020},{"FormZone_2020", cmf::kFormZone_2020},{"hNFSISyst2020_EV2", cmf::khNFSISyst2020_EV2},{"hNFSISyst2020_EV3", cmf::khNFSISyst2020_EV3},{"COHCCScaleSyst2018", cmf::kCOHCCScaleSyst2018},{"COHNCScaleSyst2018", cmf::kCOHNCScaleSyst2018}})

Variable Documentation

const std::string cmf::cBeamType_LatexStrings[4]
Initial value:
= { "FHC",
"RHC",
"0HC"
"Unknown Beam" }

Definition at line 56 of file Constants.h.

Referenced by cmf::CovarianceFitHelper::Make1DSpectra(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), and cmf::MetaData::ToStringLatex().

const std::string cmf::cBeamType_Strings[4]
const std::string cmf::cChiSqrCalcType_Strings[5]
Initial value:
= {"CovMat",
"Poisson",
"CNP",
"Gauss",
"UnknownChiSqr"}

Definition at line 70 of file Constants.h.

Referenced by cmf::CovarianceFitHelper::MakeIterationGraphs().

const std::string cmf::cContourTypeStrings[5]
Initial value:
= {"Asimov",
"Median",
"Feldman-Cousins",
"Data",
"UnknownContour"}

Definition at line 345 of file Constants.h.

const std::string cmf::cDetType_Strings[5]
const std::string cmf::cFileTypeStrings[10]
Initial value:
= {"Beam",
"FluxSwap",
"TauSwap",
"Data",
"CosmicBackground",
"RockFluxSwap",
"RockNonSwap",
"num_file_types",
"bad_file_type",
"UnknownFileType"}

Definition at line 176 of file Constants.h.

Referenced by cmf::MetaData::DetectorFilePeriodString(), KeyToString(), cmf::CovarianceFitHelper::Make1DSpectra(), and cmf::MetaData::ToString().

const std::string cmf::cFileTypeStrings_Latex[10]
Initial value:
= {"Beam",
"Flux Swap",
"#tau Swap",
"Data",
"Cosmic #mu Background",
"Rock Flux Swap #mu Background",
"Rock Non Swap #mu Background",
"num_file_types",
"bad_file_type",
"none_set"}

Definition at line 187 of file Constants.h.

Referenced by cmf::MetaData::ToStringLatex().

const std::string cmf::cInteractionType_LatexStrings[11]
Initial value:
={"Unknown Interaction",
"#nu_{#mu} CC",
"#bar{#nu}_{#mu} CC",
"#nu_{e} CC",
"#bar{#nu}_{e} CC",
"#nu_{#tau} CC",
"#bar{#nu}_{#tau} CC",
"NC",
"Cosmic Muon",
"Rock Muon",
"Uncategorised Interaction"}

Definition at line 137 of file Constants.h.

Referenced by cmf::MetaData::ToStringLatex().

const std::string cmf::cInteractionType_Strings[11]
Initial value:
={"UnknownInteraction",
"NuMuCC",
"NuMuBarCC",
"NuECC",
"NuEBarCC",
"NuTauCC",
"NuTauBarCC",
"NC",
"CosmicMuon",
"RockMuon",
"UncategorisedInteraction"}

Definition at line 149 of file Constants.h.

Referenced by KeyToString(), cmf::CMFSpectraMaker::reconfigure(), and cmf::MetaData::ToString().

const std::string cmf::cOscParams_LatexScales[kNumOscParams]
Initial value:
= {" (m)",
" (g/cc)",
" (#times10^{-5} eV^{2})",
" (#times10^{-3} eV^{2})",
"",
"",
"",
" (#pi rad)",
"",
"",
"",
"(eV^{2})",
" (#pi rad)",
"",
"", "",
"",
"",
"",
"",
"",
""}

Definition at line 250 of file Constants.h.

Referenced by cmf::FitFeldmanCousinsPoint::beginJob(), and cmf::PlotUtilities::Initialize().

const double cmf::cOscParams_Scales[kNumOscParams]
Initial value:
= {1.,
1.,
1.e5,
1.e3,
1.,
1.,
1.,
1. / 3.14159,
1.,
1.,
1.,
1.,
1. / 3.14159,
1.,
1.,
1.,
1.,
1.,
1.,
1.,
1.,
1.}

Definition at line 227 of file Constants.h.

Referenced by cmf::FitFeldmanCousinsPoint::beginJob(), cmf::FitFeldmanCousinsPoint::FillHistograms(), cmf::PlotUtilities::Initialize(), and cmf::ContourFromLibrary::MakeAndStorePlots().

const std::string cmf::cOscParams_Strings[kNumOscParams]
const std::string cmf::cOscParams_Strings_Latex[kNumOscParams]
Initial value:
= {"L",
"#rho",
"#Delta m^{2}_{21}",
"#Delta m^{2}_{32}",
"#theta_{12}",
"#theta_{13}",
"#theta_{23}",
"#delta_{CP}",
"#theta_{14}",
"#theta_{24}",
"#theta_{34}",
"#Delta m^{2}_{41}",
"#delta_{24}",
"#epsilon_{ee}",
"#epsilon_{e#mu}",
"#epsilon_{e#tau}",
"#epsilon_{#mu#mu}",
"#epsilon_{#mu#tau}",
"#epsilon_{#tau#tau}",
"#delta_{e#mu}",
"#delta_{e#tau}",
"#delta_{#mu#tau}"}

Definition at line 295 of file Constants.h.

Referenced by cmf::FitFeldmanCousinsPoint::beginJob(), cmf::PlotUtilities::Make1DPlot(), cmf::PlotUtilities::Make2DContours(), and cmf::PlotUtilities::MakeGeneric2DHist().

const std::string cmf::cSelectionType_LatexStrings[12]
Initial value:
= {"#nu_{e} Selection",
"#nu_{e} Selection - Low PID",
"#nu_{e} Selection - Mid PID",
"#nu_{e} Selection - High PID",
"#nu_{e} Selection - Peripheral",
"#nu_{#mu} Selection",
"#nu_{#mu} Selection - Quantile 1",
"#nu_{#mu} Selection - Quantile 2",
"#nu_{#mu} Selection - Quantile 3",
"#nu_{#mu} Selection - Quantile 4",
"NC Selection",
"Unknown Selection"}

Definition at line 106 of file Constants.h.

Referenced by cmf::CovarianceFitHelper::Make1DSpectra(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), and cmf::MetaData::ToStringLatex().

const std::string cmf::cSelectionType_Strings[12]
Initial value:
= {"NuESel_AllPID",
"NuESel_LowPID",
"NuESel_MidPID",
"NuESel_HighPID",
"NuESel_Peripheral",
"NuMuSel",
"NuMuSelQ1",
"NuMuSelQ2",
"NuMuSelQ3",