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  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
 
struct  FileExtracts
 
class  FitFeldmanCousinsPoint
 
class  GeniePCASyst
 
struct  GENIEVar
 
struct  GENIEVars
 
class  GridPoint
 
struct  HiddenParameterConfig
 
class  InputPoint
 
struct  Location
 
class  MCVarVals
 Base container for the MC related Vars that constitute an event. More...
 
struct  MetaData
 
struct  MetaDataLite
 
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
 
struct  SystVar
 
struct  TruthVars
 
struct  WeightVars
 

Typedefs

typedef std::unique_ptr< EventEventPtr
 
typedef std::vector< EventPtrEventContainer
 
typedef std::map< cmf::MetaData, cmf::EventListEventListColl
 
typedef std::vector< cmf::SystVarSystVarColl
 
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::weight_type WeightType_t
 
typedef enum cmf::det_type DetType_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
 

Enumerations

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,
  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, kXSecCVWgt2020, kPPFXFluxCVWgt,
  kRPACCQE_Weight, kRPARES_Weight, kDISvnCC1pi_Weight, kEmpiricalMEC_Weight,
  kEmpiricalMECtoGENIEQE_Weight, kEmpiricalMECtoGENIERES_Weight, kOtherDIS_Weight, kMinus2Sigma,
  kMinus1Sigma, kPlus1Sigma, kPlus2Sigma, kFirstSigmaVar,
  kMaCCRES =kFirstSigmaVar, kMvCCRES, kMaNCRES, kRPACCQEshapeEnh,
  kRPACCQEshapeSupp, kGENIEPCA0, kGENIEPCA1, kGENIEPCA2,
  kGENIEPCA3, kGENIEPCA4, kGENIEPCA5, kGENIEPCA6,
  kGENIEPCA7, kGENIEPCA8, kGENIEPCA9, kGENIEPCA10,
  kGENIEPCA11, kMvNCRES, kZNormCCQE, kZExpEV1Syst2020,
  kZExpEV2Syst2020, kZExpEV3Syst2020, kZExpEV4Syst2020, kRESLowQ2SuppSyst2020,
  kDISvnCC1piWgt_2020, khNFSISyst2020_MFP, khNFSISyst2020_EV1, kMECEnuShapeSyst2020Nu,
  kMECEnuShapeSyst2020AntiNu, kMECShapeSyst2020Nu, kMECShapeSyst2020AntiNu, kMECInitStateNPFracSyst2020Nu,
  kMECInitStateNPFracSyst2020AntiNu, kRadCorrNue, kRadCorrNuebar, k2ndClassCurrs,
  kUnCorrNDMuEScaleSyst2020, kUnCorrMuCatMuESyst2020, kPileupMuESyst2020, kCorrMuEScaleSyst2020,
  kNeutronVisEScalePrimariesSyst2018, kMichelTaggingSyst2020, kAna2020NormFHC, kAna2020NormRHC,
  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, kTauScaleSyst, kLastSigmaVar =kTauScaleSyst, kLightModelLightDownCalibUp,
  kLightModelLightUpCalibDown, kCkvProtonShiftDown, kRelativeCalibration, kAbsoluteCalibration,
  kCalibShape, kMaNCEL, kEtaNCEL, kVecCCQE_shape,
  kMaCOHpi, kR0COHpi, kAhtBY, kBhtBY,
  kCV1uBY, kCV2uBY, kNormDISCC, kRnubarnuCC,
  kDISNuclMod, kAGKY_xF1pi, kAGKY_pT1pi, kMFP_pi,
  kMFP_N, kFrCEx_pi, kFrElas_pi, kFrAbs_pi,
  kFrPiProd_pi, kFrInel_N, kFrPiProd_N, kCCQEMomDistroFGtoSF,
  kBR1gamma, kBR1eta, kTheta_Delta2Npi
}
 
enum  weight_type { kSystWgtOnly =0, kOscWgtOnly, kSystAndOscWgt, kAllWgt }
 
enum  det_type {
  kUnknownDet = 0, kNEARDET, kFARDET, kMINOSNEAR,
  kMINOSFAR
}
 

Functions

std::ostream & operator<< (std::ostream &o, cmf::Event const &event)
 
cmf::EventListFindEventList (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 hadronicEnergy)
 
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})
 
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::ParameterSpaceLoc &loc, bool clearLoc)
 
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
 
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
 
const std::string cDetType_Strings [5]
 
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.

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::map<cmf::OscParm_t, float > cmf::OscillationParameterMap

Definition at line 572 of file Constants.h.

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

Definition at line 571 of file Constants.h.

typedef std::pair<std::string, cmf::DetType_t> cmf::ParameterDet

Definition at line 558 of file Constants.h.

typedef std::map<std::string, Parameter> cmf::ParameterSpaceLoc

Definition at line 15 of file Parameter.h.

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

Definition at line 42 of file GridPointResult.h.

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

Definition at line 570 of file Constants.h.

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

Definition at line 223 of file VarVals.h.

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

Definition at line 43 of file GridPointResult.h.

Enumeration Type Documentation

Enumerator
kFHC 
kRHC 
k0HC 
kUnknownBeam 

Definition at line 26 of file Constants.h.

26  {
27  kFHC = 0,
28  kRHC,
29  k0HC,
31  } BeamType_t;
enum fnex::beam_type BeamType_t
Enumerator
kPMNS 
kNSI 
kSterile 

Definition at line 300 of file Constants.h.

300  {
301  kPMNS=0,
302  kNSI,
303  kSterile
304  } CalcType_t;
enum cmf::calc_type CalcType_t
Enumerator
kCovMat 
kPoisson 
kCNP 
kGauss 
kUnknownChiSqr 

Definition at line 45 of file Constants.h.

45  {
46  kCovMat = 0,
47  kPoisson,
48  kCNP,
49  kGauss,
51  } ChiSqrCalc_t;
enum cmf::chisqr_type ChiSqrCalc_t
Enumerator
kAsimovContour 
kMedianContour 
kFCContour 
kDataContour 
kUnknownContour 

Definition at line 318 of file Constants.h.

Enumerator
kStatMatrix 
kSystMatrix 
kTotalMatrix 

Definition at line 309 of file Constants.h.

309  {
310  kStatMatrix=0,
311  kSystMatrix,
313  }CovMat_t;
enum cmf::covmat_type CovMat_t
Enumerator
kData 
kMC 
kFakeData 
kBoth 

Definition at line 332 of file Constants.h.

332  {
333  kData = 0,
334  kMC,
335  kFakeData,
336  kBoth
337  } DataMC_t;
const Color_t kMC
enum cmf::dataMC_type DataMC_t
Enumerator
kUnknownDet 
kNEARDET 
kFARDET 
kMINOSNEAR 
kMINOSFAR 

Definition at line 544 of file Constants.h.

544  {
545  kUnknownDet = 0,
546  kNEARDET,
547  kFARDET,
548  kMINOSNEAR,
549  kMINOSFAR
550  }DetType_t;
enum cmf::det_type DetType_t
Enumerator
kBeam 
kSwap 
kTauSwap 
kDataFile 
kCosmicBackgroundFile 
kRockFluxSwap 
kRockNonSwap 
kNumFileTypes 
kBadFileType 
kUnknownFileType 

Definition at line 148 of file Constants.h.

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

Definition at line 108 of file Constants.h.

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

Definition at line 187 of file Constants.h.

Enumerator
kNuESelection 
kNuESelectionLowPID 
kNuESelectionMidPID 
kNuESelectionHighPID 
kNuESelectionPeripheral 
kNuMuSelection 
kNuMuSelectionQ1 
kNuMuSelectionQ2 
kNuMuSelectionQ3 
kNuMuSelectionQ4 
kNCSelection 
kUnknownSelection 

Definition at line 62 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 
kXSecCVWgt2020 
kPPFXFluxCVWgt 
kRPACCQE_Weight 
kRPARES_Weight 
kDISvnCC1pi_Weight 
kEmpiricalMEC_Weight 
kEmpiricalMECtoGENIEQE_Weight 
kEmpiricalMECtoGENIERES_Weight 
kOtherDIS_Weight 
kMinus2Sigma 
kMinus1Sigma 
kPlus1Sigma 
kPlus2Sigma 
kFirstSigmaVar 
kMaCCRES 
kMvCCRES 
kMaNCRES 
kRPACCQEshapeEnh 
kRPACCQEshapeSupp 
kGENIEPCA0 
kGENIEPCA1 
kGENIEPCA2 
kGENIEPCA3 
kGENIEPCA4 
kGENIEPCA5 
kGENIEPCA6 
kGENIEPCA7 
kGENIEPCA8 
kGENIEPCA9 
kGENIEPCA10 
kGENIEPCA11 
kMvNCRES 
kZNormCCQE 
kZExpEV1Syst2020 
kZExpEV2Syst2020 
kZExpEV3Syst2020 
kZExpEV4Syst2020 
kRESLowQ2SuppSyst2020 
kDISvnCC1piWgt_2020 
khNFSISyst2020_MFP 
khNFSISyst2020_EV1 
kMECEnuShapeSyst2020Nu 
kMECEnuShapeSyst2020AntiNu 
kMECShapeSyst2020Nu 
kMECShapeSyst2020AntiNu 
kMECInitStateNPFracSyst2020Nu 
kMECInitStateNPFracSyst2020AntiNu 
kRadCorrNue 
kRadCorrNuebar 
k2ndClassCurrs 
kUnCorrNDMuEScaleSyst2020 
kUnCorrMuCatMuESyst2020 
kPileupMuESyst2020 
kCorrMuEScaleSyst2020 
kNeutronVisEScalePrimariesSyst2018 
kMichelTaggingSyst2020 
kAna2020NormFHC 
kAna2020NormRHC 
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 
kTauScaleSyst 
kLastSigmaVar 
kLightModelLightDownCalibUp 
kLightModelLightUpCalibDown 
kCkvProtonShiftDown 
kRelativeCalibration 
kAbsoluteCalibration 
kCalibShape 
kMaNCEL 
kEtaNCEL 
kVecCCQE_shape 
kMaCOHpi 
kR0COHpi 
kAhtBY 
kBhtBY 
kCV1uBY 
kCV2uBY 
kNormDISCC 
kRnubarnuCC 
kDISNuclMod 
kAGKY_xF1pi 
kAGKY_pT1pi 
kMFP_pi 
kMFP_N 
kFrCEx_pi 
kFrElas_pi 
kFrAbs_pi 
kFrPiProd_pi 
kFrInel_N 
kFrPiProd_N 
kCCQEMomDistroFGtoSF 
kBR1gamma 
kBR1eta 
kTheta_Delta2Npi 

Definition at line 342 of file Constants.h.

342  {
343  kUnknownVar = 0,
344 
345  // Data info - kFake_Weight is in this group because it only applies to fake data
346 // kNuE_LID = 9;
347 // kNuE_LEM = 10;
348  kNuE_CVN,
350  kHad_RecoE,
351  kLep_RecoE,
352  kNu_RecoE,
354  kRecoQ2,
355  kFake_Weight,
356 
357  // Truth information
358  kTrueE,
359  kTruePDG,
360  kTrueCCNC,
361  kTrueIntType,
362  kTruePDGOrig,
368  kTrueHitNuc,
369  kTrueIntMode,
370 
371  // MC Reweighting info
382 
383 
384  kMinus2Sigma,
385  kMinus1Sigma,
386  kPlus1Sigma,
387  kPlus2Sigma,
388 
389  // Systematic uncertainties where we store -2, -1, +1, +2 sigma values
391 #ifdef PRODUCTION4
393  kMaCCRES,
394 #endif
395 #ifdef PRODUCTION5
396  kMaCCRES=kFirstSigmaVar,
397 #endif
398  kMvCCRES,
399  kMaNCRES,
402 #ifdef PRODUCTION4
403  kFormZone,
404  kFrInel_pi,
405  kFrCEx_N,
406  kFrElas_N,
407  kFrAbs_N,
410 #endif
411 
412  // new for 2020
413  kGENIEPCA0,
414  kGENIEPCA1,
415  kGENIEPCA2,
416  kGENIEPCA3,
417  kGENIEPCA4,
418  kGENIEPCA5,
419  kGENIEPCA6,
420  kGENIEPCA7,
421  kGENIEPCA8,
422  kGENIEPCA9,
423  kGENIEPCA10,
424  kGENIEPCA11,
425  kMvNCRES,
426  kZNormCCQE,
441  kRadCorrNue,
452  kNorm_1Nux,
453  kMeanQ0_1Nux,
454  kMeanQ3_1Nux,
457  kCorr_1Nux,
458  kNorm_2Nux,
459  kMeanQ0_2Nux,
460  kMeanQ3_2Nux,
463  kCorr_2Nux,
464  kBaselineNux,
466 #ifdef PRODUCTION5
467  kLastSigmaVar=kTauScaleSyst,
468 #endif
469 
470  // calibration related uncertainties
476  kCalibShape,
477 
478  // The following variables are not currently used
479  //----------------
480  kMaNCEL,
481  kEtaNCEL,
483  kMaCOHpi,
484  kR0COHpi,
485  kAhtBY,
486  kBhtBY,
487  kCV1uBY,
488  kCV2uBY,
489  kNormDISCC,
490  kRnubarnuCC,
491  kDISNuclMod,
492  kAGKY_xF1pi,
493  kAGKY_pT1pi,
494  kMFP_pi,
495  kMFP_N,
496  kFrCEx_pi,
497  kFrElas_pi,
498  kFrAbs_pi,
499  kFrPiProd_pi,
500  kFrInel_N,
501  kFrPiProd_N,
503  kBR1gamma,
504  kBR1eta,
506 
507  /* kNormCCQE_EnuDep , */
508  /* kNormCCRES , */
509  /* kMaCCRES_shape , */
510  /* kMvCCRES_shape , */
511  /* kNormNCRES , */
512  /* kMaNCRES_shape , */
513  /* kMvNCRES_shape , */
514  /* kNCGENIE , */
515  /* kNormCCQE , */
516  /* kMaCCQE_shape , */
517  /* kRvpCC1pi , */
518  /* kRvpCC2pi , */
519  /* kRvpNC1pi , */
520  /* kRvpNC2pi , */
521  /* kRvnCC1pi , */
522  /* kRvnCC2pi , */
523  /* kRvnNC1pi , */
524  /* kRvnNC2pi , */
525  /* kRvbarpCC1pi , */
526  /* kRvbarpCC2pi , */
527  /* kRvbarpNC1pi , */
528  /* kRvbarpNC2pi , */
529  /* kRvbarnCC1pi , */
530  /* kRvbarnCC2pi , */
531  /* kRvbarnNC1pi , */
532  /* kRvbarnNC2pi , */
533  };
static const unsigned char kFrElas_N
Definition: VarVals.h:79
static const unsigned char kFormZone
Definition: VarVals.h:76
static const unsigned char kFrAbs_N
Definition: VarVals.h:80
static const unsigned char kMaCCQE
Definition: VarVals.h:70
static const unsigned char kCCQEPauliSupViaKF
Definition: VarVals.h:81
static const unsigned char kFrInel_pi
Definition: VarVals.h:77
static const unsigned char kFrCEx_N
Definition: VarVals.h:78
Enumerator
kSystWgtOnly 
kOscWgtOnly 
kSystAndOscWgt 
kAllWgt 

Definition at line 537 of file Constants.h.

537  {
538  kSystWgtOnly=0,
539  kOscWgtOnly,
541  kAllWgt
542  } WeightType_t;
enum cmf::weight_type WeightType_t

Function Documentation

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

Definition at line 240 of file StaticFuncs.h.

References kFHC, and kRHC.

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

241 {
242  if (beam == cmf::kFHC) return 1;
243  else if(beam == cmf::kRHC) return 4;
244 
245  return 0;
246 }
static long cmf::BeamTypeKey ( cmf::BeamType_t const &  bt)
inlinestatic

Definition at line 22 of file StaticFuncs.h.

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

22 { 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 21 of file StaticFuncs.h.

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

21 { 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(), fnex::CovarianceFitHelper::Iterations(), 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.second.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.second.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:453
static float gHadE
static float gLepMass
static float gLepE
float FractionalShift(uint8_t const &param)
static int gBin
static CovarianceBinUtility * Instance()
cmf::EventList & cmf::FindEventList ( cmf::MetaData const &  md,
cmf::EventListColl eventListColl 
)

Definition at line 44 of file Event.cxx.

References cmf::MetaData::ToString().

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

46  {
47  if(eventListColl.count(md))
48  return eventListColl.find(md)->second;
49 
50  throw cet::exception("FindEventList")
51  << "could not find an event list for "
52  << md.ToString()
53  << " in the event list collection";
54 
55  return eventListColl.begin()->second;
56  }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
double cmf::FitFunction_ForROOT ( const double *  params)

Definition at line 52 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(), LOG_DEBUG, LOG_VERBATIM, cet::pow(), cmf::ShifterAndWeighter::SetCurrentVals(), and std::sin().

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

53  {
54  // debug
55  LOG_VERBATIM("CovarianceFit") << "Processing guess: ";
56 
57  for(size_t i = 0; i < gFFVals->size(); ++i){
58  (*gFFVals)[i] = params[i];
59 
60  if((*gFFNames)[i] == "Th23")
61  LOG_VERBATIM("CovarianceFit")
62  << "\t"
63  << (*gFFNames)[i]
64  << " : "
65  << params[i]
66  << "; sin^2(Th23) : "
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 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)
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

Definition at line 363 of file StaticFuncs.h.

References kTh13, kTh14, kTh23, kTh24, and kTh34.

Referenced by cmf::FitFeldmanCousinsPoint::beginJob(), cmf::FitFeldmanCousinsPoint::FillHistograms(), InteractionTypeKey(), operator<<(), and cmf::ContourFromLibrary::readResults().

364 {
365  if(par == cmf::kTh13 ||
366  par == cmf::kTh23 ||
367  par == cmf::kTh14 ||
368  par == cmf::kTh24 ||
369  par == cmf::kTh34 ) return true;
370 
371  return false;
372 }
Int_t par
Definition: SimpleIterate.C:24
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 136 of file StaticFuncs.h.

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

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

137 {
138  auto detType = cmf::KeyToDetectorType(key);
140  auto epoch = cmf::KeyToEpoch(key);
141 
142  long tmpKey = key - cmf::PeriodKey(epoch);
143 
144  if(detType != cmf::kUnknownDet ) tmpKey -= cmf::DetectorTypeKey(detType);
146 
147  if(tmpKey < 10000) return cmf::kUnknownBeam;
148 
149  LOG_DEBUG("StaticFuncs")
150  << "KeyToBeam: "
151  << key
152  << " "
153  << detType
154  << "/"
155  << cmf::DetectorTypeKey(detType)
156  << " "
157  << fileType
158  << "/"
160  << " "
161  << tmpKey
162  << " "
163  << (tmpKey / 10000) - 1;
164 
165 
166  return (cmf::BeamType_t)((tmpKey / 10000) - 1);
167 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:19
fileType
Definition: mkDefs.py:112
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:70
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:20
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:109
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:84
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:21
enum cmf::beam_type BeamType_t
static cmf::DetType_t cmf::KeyToDetectorType ( long const &  key)
inlinestatic

Definition at line 70 of file StaticFuncs.h.

References kUnknownDet, and LOG_DEBUG.

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

71 {
72  if(key < 1000000000) return cmf::kUnknownDet;
73 
74  LOG_DEBUG("StaticFuncs")
75  << "KeyToDetector: "
76  << key
77  << " "
78  << (key / 1000000000);
79 
80  return (cmf::DetType_t)(key / 1000000000);
81 }
#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 84 of file StaticFuncs.h.

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

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

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

Definition at line 109 of file StaticFuncs.h.

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

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

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

Definition at line 208 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().

209 {
210  auto detType = cmf::KeyToDetectorType(key);
211  auto beamType = cmf::KeyToBeamType(key);
213  auto selType = cmf::KeyToSelectionType(key);
214  auto epoch = cmf::KeyToEpoch(key);
215 
216  long tmpKey = key - cmf::PeriodKey(epoch);
217  if(detType != cmf::kUnknownDet ) tmpKey -= cmf::DetectorTypeKey(detType);
218  if(beamType != cmf::kUnknownBeam ) tmpKey -= cmf::BeamTypeKey(beamType);
220  if(selType != cmf::kUnknownSelection) tmpKey -= cmf::SelectionTypeKey(selType);
221 
222  if(tmpKey < 1) return cmf::kUnknownInteraction;
223 
224  return (cmf::InteractionType_t)(tmpKey);
225 }
enum cmf::interaction_type InteractionType_t
static long SelectionTypeKey(cmf::SelectionType_t const &st)
Definition: StaticFuncs.h:23
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:19
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:136
fileType
Definition: mkDefs.py:112
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:70
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:20
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:109
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:84
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:21
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:170
static long BeamTypeKey(cmf::BeamType_t const &bt)
Definition: StaticFuncs.h:22
static cmf::SelectionType_t cmf::KeyToSelectionType ( long const &  key)
inlinestatic

Definition at line 170 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().

171 {
172  auto detType = cmf::KeyToDetectorType(key);
173  auto beamType = cmf::KeyToBeamType(key);
175  auto epoch = cmf::KeyToEpoch(key);
176 
177  long tmpKey = key - cmf::PeriodKey(epoch);
178  if(detType != cmf::kUnknownDet ) tmpKey -= cmf::DetectorTypeKey(detType);
179  if(beamType != cmf::kUnknownBeam ) tmpKey -= cmf::BeamTypeKey(beamType);
181 
182  if(tmpKey < 100) return cmf::kUnknownSelection;
183 
184  LOG_DEBUG("StaticFuncs")
185  << "KeyToSelection: "
186  << key
187  << " "
188  << detType
189  << "/"
190  << cmf::DetectorTypeKey(detType)
191  << " "
192  << beamType
193  << "/"
194  << cmf::BeamTypeKey(beamType)
195  << " "
196  << fileType
197  << "/"
199  << " "
200  << tmpKey
201  << " "
202  << (tmpKey / 100) - 1;
203 
204  return (cmf::SelectionType_t)((tmpKey / 100) - 1);
205 }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:19
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:136
enum cmf::sel_type SelectionType_t
fileType
Definition: mkDefs.py:112
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:70
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:20
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:109
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:84
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:21
static long BeamTypeKey(cmf::BeamType_t const &bt)
Definition: StaticFuncs.h:22
static std::string cmf::KeyToString ( long const &  key)
inlinestatic

Definition at line 228 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().

229 {
231  "Period" +
237 }
const std::string cSelectionType_Strings[12]
Definition: Constants.h:77
static cmf::InteractionType_t KeyToInteractionType(long const &key)
Definition: StaticFuncs.h:208
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:136
const std::string cInteractionType_Strings[11]
Definition: Constants.h:134
const std::string cFileTypeStrings[10]
Definition: Constants.h:161
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:70
static cmf::FileType_t KeyToFileType(long const &key)
Definition: StaticFuncs.h:109
static int KeyToEpoch(long const &key)
Definition: StaticFuncs.h:84
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:170
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
const std::string cDetType_Strings[5]
Definition: Constants.h:552
const std::string cBeamType_Strings[4]
Definition: Constants.h:33
static std::string cmf::KeyToVarName ( uint8_t const &  key)
inlinestatic

Definition at line 628 of file StaticFuncs.h.

References k2ndClassCurrs, kAbsoluteCalibration, kAGKY_pT1pi, kAGKY_xF1pi, kAhtBY, kAna2020NormFHC, kAna2020NormRHC, kBaselineNux, kBhtBY, kBR1eta, kBR1gamma, kCalibShape, kCCQEMomDistroFGtoSF, fnex::kCCQEPauliSupViaKF, kCkvProtonShiftDown, kCorr_1Nux, kCorr_2Nux, kCorrMuEScaleSyst2020, kCV1uBY, kCV2uBY, kDISNuclMod, kDISvnCC1pi_Weight, kDISvnCC1piWgt_2020, kEmpiricalMEC_Weight, kEmpiricalMECtoGENIEQE_Weight, kEmpiricalMECtoGENIERES_Weight, kEtaNCEL, kFake_Weight, fnex::kFormZone, fnex::kFrAbs_N, kFrAbs_pi, fnex::kFrCEx_N, kFrCEx_pi, fnex::kFrElas_N, kFrElas_pi, kFrInel_N, fnex::kFrInel_pi, kFrPiProd_N, kFrPiProd_pi, kGENIEPCA0, kGENIEPCA1, kGENIEPCA10, kGENIEPCA11, kGENIEPCA2, kGENIEPCA3, kGENIEPCA4, kGENIEPCA5, kGENIEPCA6, kGENIEPCA7, kGENIEPCA8, kGENIEPCA9, kHad_RecoE, khNFSISyst2020_EV1, khNFSISyst2020_MFP, kLep_RecoE, kLep_RecoE_MCFrac, kLightModelLightDownCalibUp, kLightModelLightUpCalibDown, fnex::kMaCCQE, kMaCCRES, kMaCOHpi, kMaNCEL, kMaNCRES, kMeanQ0_1Nux, kMeanQ0_2Nux, kMeanQ3_1Nux, kMeanQ3_2Nux, kMECEnuShapeSyst2020AntiNu, kMECEnuShapeSyst2020Nu, kMECInitStateNPFracSyst2020AntiNu, kMECInitStateNPFracSyst2020Nu, kMECShapeSyst2020AntiNu, kMECShapeSyst2020Nu, kMFP_N, kMFP_pi, kMichelTaggingSyst2020, kMinus1Sigma, kMinus2Sigma, kMvCCRES, kMvNCRES, kNeutronVisEScalePrimariesSyst2018, kNorm_1Nux, kNorm_2Nux, kNormDISCC, kNu_RecoE, kNuE_CVN, kNuE_NumMichel, kOtherDIS_Weight, kPileupMuESyst2020, kPlus1Sigma, kPlus2Sigma, kPPFXFluxCVWgt, kR0COHpi, kRadCorrNue, kRadCorrNuebar, kRecoQ2, kRelativeCalibration, kRESLowQ2SuppSyst2020, kRnubarnuCC, kRPACCQE_Weight, kRPACCQEshapeEnh, kRPACCQEshapeSupp, kRPARES_Weight, kSigmaQ0_1Nux, kSigmaQ0_2Nux, kSigmaQ3_1Nux, kSigmaQ3_2Nux, kTauScaleSyst, kTheta_Delta2Npi, kTrueCCNC, kTrueE, kTrueHitNuc, kTrueIntMode, kTrueIntType, kTrueParentDecay, kTrueParentPDG, kTrueParentPT, kTrueParentPZ, kTrueParentTargetPDG, kTruePDG, kTruePDGOrig, kUnCorrMuCatMuESyst2020, kUnCorrNDMuEScaleSyst2020, kVecCCQE_shape, kXSecCVPPFX_Weight, kXSecCVWgt2020, kZExpEV1Syst2020, kZExpEV2Syst2020, kZExpEV3Syst2020, kZExpEV4Syst2020, and kZNormCCQE.

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

629 {
630  // else if(key == cmf::kNuE_LID ) return "NuE_LID";
631  // else if(key == cmf::kNuE_LEM ) return "NuE_LEM";
632  if (key == cmf::kNuE_CVN ) return "NuE_CVN";
633  else if(key == cmf::kNuE_NumMichel ) return "NuE_NumMichel";
634  else if(key == cmf::kHad_RecoE ) return "Had_RecoE";
635  else if(key == cmf::kLep_RecoE ) return "Lep_RecoE";
636  else if(key == cmf::kNu_RecoE ) return "Nu_RecoE";
637  else if(key == cmf::kLep_RecoE_MCFrac ) return "Lep_RecoE_MCFrac";
638  else if(key == cmf::kRecoQ2 ) return "Reco_Q2";
639  else if(key == cmf::kFake_Weight ) return "Fake_Weight";
640 
641  else if(key == cmf::kTrueE ) return "TrueE";
642  else if(key == cmf::kTruePDG ) return "TruePDG";
643  else if(key == cmf::kTrueCCNC ) return "TrueCCNC";
644  else if(key == cmf::kTrueIntType ) return "TrueIntType";
645  else if(key == cmf::kTruePDGOrig ) return "TruePDGOrig";
646  else if(key == cmf::kTrueParentPDG ) return "TrueParentPDG";
647  else if(key == cmf::kTrueParentPT ) return "TrueParentPT";
648  else if(key == cmf::kTrueParentPZ ) return "TrueParentPZ";
649  else if(key == cmf::kTrueParentDecay ) return "TrueParentDecay";
650  else if(key == cmf::kTrueParentTargetPDG) return "TrueParentTargetPDG";
651  else if(key == cmf::kTrueHitNuc ) return "TrueHitNuc";
652  else if(key == cmf::kTrueIntMode ) return "TrueIntMode";
653 
654  else if(key == cmf::kXSecCVPPFX_Weight ) return "XsecCVWgt";
655  else if(key == cmf::kXSecCVWgt2020 ) return "XsecCVWgt2020";
656  else if(key == cmf::kPPFXFluxCVWgt ) return "PPFXFluxCVWgt";
657  else if(key == cmf::kRPACCQE_Weight ) return "RPACCQEWgt";
658  else if(key == cmf::kRPARES_Weight ) return "RPARESWgt";
659  else if(key == cmf::kDISvnCC1pi_Weight ) return "DISvnCC1piWgt";
660  else if(key == cmf::kEmpiricalMEC_Weight ) return "EmpiricalMECWgt";
661  else if(key == cmf::kEmpiricalMECtoGENIEQE_Weight ) return "EmpiricalMECtoGENIEQEWgt";
662  else if(key == cmf::kEmpiricalMECtoGENIERES_Weight) return "EmpiricalMECtoGENIERESWgt";
663  else if(key == cmf::kOtherDIS_Weight ) return "OtherDISWgt";
664 
665  else if(key == cmf::kMinus2Sigma ) return "-2sigma";
666  else if(key == cmf::kMinus1Sigma ) return "-1sigma";
667  else if(key == cmf::kPlus1Sigma ) return "+1sigma";
668  else if(key == cmf::kPlus2Sigma ) return "+2sigma";
669 
670  // calibration
671  else if(key == cmf::kLightModelLightUpCalibDown) return "lightmodel-lightdown-calibupWgt";
672  else if(key == cmf::kLightModelLightDownCalibUp) return "lightmodel-lightup-calibdownWgt";
673  else if(key == cmf::kCkvProtonShiftDown ) return "ckv-proton-shift-downWgt";
674  else if(key == cmf::kRelativeCalibration ) return "RelativeCalibrationWgt";
675  else if(key == cmf::kAbsoluteCalibration ) return "AbsoluteCalibrationWgt";
676  else if(key == cmf::kCalibShape ) return "CalibrationShapeWgt";
677 
678  //GENIE knobs
679  //else if( isSumSmallXSecJoint2017Key(key) ) return "SumSmallXSecJoint2017";
680 
681  // NC elastic parameters
682  else if(key == cmf::kMaNCEL ) return "MaNCEL";
683  else if(key == cmf::kEtaNCEL ) return "EtaNCEL";
684 
685  // CCQE parameters
686  //else if(key == cmf::kNormCCQE ) return "NormCCQE";
687  //else if(key == cmf::kNormCCQE_EnuDep ) return "NormCCQE_EnuDep";
688  //else if(key == cmf::kMaCCQE_shape ) return "MaCCQE_shape";
689 #ifdef PRODUCTION4
690  else if(key == cmf::kMaCCQE ) return "MaCCQE";
691 #endif
692  else if(key == cmf::kVecCCQE_shape ) return "VecCCQE_shape";
693 
694  // Resonant production: CC
695  //else if(key == cmf::kNormCCRES ) return "NormCCRES";
696  //else if(key == cmf::kMaCCRES_shape ) return "MaCCRES_shape";
697  //else if(key == cmf::kMvCCRES_shape ) return "MvCCRES_shape";
698  else if(key == cmf::kMaCCRES ) return "MaCCRES";
699  else if(key == cmf::kMvCCRES ) return "MvCCRES";
700 
701  // Resonant production: NC
702  //else if(key == cmf::kNormNCRES ) return "NormNCRES";
703  //else if(key == cmf::kMaNCRES_shape ) return "MaNCRES_shape";
704  //else if(key == cmf::kMvNCRES_shape ) return "MvNCRES_shape";
705  else if(key == cmf::kMaNCRES ) return "MaNCRES";
706  else if(key == cmf::kMvNCRES ) return "MvNCRES";
707 
708  // Coherent pion production
709  else if(key == cmf::kMaCOHpi ) return "MaCOHpi";
710  else if(key == cmf::kR0COHpi ) return "R0COHpi";
711 
712  // Non-resonant background
713  //else if(key == cmf::kRvpCC1pi ) return "RvpCC1pi";
714  //else if(key == cmf::kRvpCC2pi ) return "RvpCC2pi";
715  //else if(key == cmf::kRvpNC1pi ) return "RvpNC1pi";
716  //else if(key == cmf::kRvpNC2pi ) return "RvpNC2pi";
717  //else if(key == cmf::kRvnCC1pi ) return "RvnCC1pi";
718  //else if(key == cmf::kRvnCC2pi ) return "RvnCC2pi";
719  //else if(key == cmf::kRvnNC1pi ) return "RvnNC1pi";
720  //else if(key == cmf::kRvnNC2pi ) return "RvnNC2pi";
721  //else if(key == cmf::kRvbarpCC1pi ) return "RvbarpCC1pi";
722  //else if(key == cmf::kRvbarpCC2pi ) return "RvbarpCC2pi";
723  //else if(key == cmf::kRvbarpNC1pi ) return "RvbarpNC1pi";
724  //else if(key == cmf::kRvbarpNC2pi ) return "RvbarpNC2pi";
725  //else if(key == cmf::kRvbarnCC1pi ) return "RvbarnCC1pi";
726  //else if(key == cmf::kRvbarnCC2pi ) return "RvbarnCC2pi";
727  //else if(key == cmf::kRvbarnNC1pi ) return "RvbarnNC1pi";
728  //else if(key == cmf::kRvbarnNC2pi ) return "RvbarnNC2pi";
729 
730  // DIS tweaking parameters
731  else if(key == cmf::kAhtBY ) return "AhtBY";
732  else if(key == cmf::kBhtBY ) return "BhtBY";
733  else if(key == cmf::kCV1uBY ) return "CV1uBY";
734  else if(key == cmf::kCV2uBY ) return "CV2uBY";
735  //else if(key == cmf::kAhtBYshape ) return "AhtBYshape";
736  //else if(key == cmf::kBhtBYshape ) return "BhtBYshape";
737  //else if(key == cmf::kCV1uBYshape ) return "CV1uBYshape";
738  //else if(key == cmf::kCV2uBYshape ) return "CV2uBYshape";
739  else if(key == cmf::kNormDISCC ) return "NormDISCC";
740  else if(key == cmf::kRnubarnuCC ) return "RnubarnuCC";
741  else if(key == cmf::kDISNuclMod ) return "DISNuclMod";
742 
743  //else if(key == cmf::kNCGENIE ) return "NC";
744 
745  // Hadronization (free nucleon target)
746  else if(key == cmf::kAGKY_xF1pi ) return "AGKY_xF1pi";
747  else if(key == cmf::kAGKY_pT1pi ) return "AGKY_pT1pi";
748 
749  // Medium-effects to hadronization
750 #ifdef PRODUCTION4
751  else if(key == cmf::kFormZone ) return "FormZone";
752 #endif
753 
754  // Intranuclear rescattering parameters.
755  else if(key == cmf::kMFP_pi ) return "MFP_pi";
756  else if(key == cmf::kMFP_N ) return "MFP_N";
757 #ifdef PRODUCTION4
758  else if(key == cmf::kFrCEx_pi ) return "FrCEx_pi";
759  else if(key == cmf::kFrElas_pi ) return "FrElas_pi";
760  else if(key == cmf::kFrInel_pi ) return "FrInel_pi";
761  else if(key == cmf::kFrAbs_pi ) return "FrAbs_pi";
762  else if(key == cmf::kFrCEx_N ) return "FrCEx_N";
763  else if(key == cmf::kFrElas_N ) return "FrElas_N";
764  else if(key == cmf::kFrInel_N ) return "FrInel_N";
765  else if(key == cmf::kFrAbs_N ) return "FrAbs_N";
766 #endif
767  else if(key == cmf::kFrPiProd_pi ) return "FrPiProd_pi";
768  else if(key == cmf::kFrPiProd_N ) return "FrPiProd_N";
769 
770  // Nuclear model
771 #ifdef PRODUCTION4
772  else if(key == cmf::kCCQEPauliSupViaKF ) return "CCQEPauliSupViaKF";
773 #endif
774  else if(key == cmf::kCCQEMomDistroFGtoSF) return "CCQEMomDistroFGtoSF";
775 
776  // Resonance decays
777  else if(key == cmf::kBR1gamma ) return "BR1gamma";
778  else if(key == cmf::kBR1eta ) return "BR1eta";
779  else if(key == cmf::kTheta_Delta2Npi ) return "Theta_Delta2Npi";
780 
781  // 2017 RPA shape systematics
782  else if(key == cmf::kRPACCQEshapeEnh ) return "RPACCQEshapeEnh";
783  else if(key == cmf::kRPACCQEshapeSupp ) return "RPACCQEshapeSupp";
784 
785  // 2020
786  else if(key == cmf::kZExpEV1Syst2020 ) return "ZExpAxialFFSyst2020_eV1" ;
787  else if(key == cmf::kZExpEV2Syst2020 ) return "ZExpAxialFFSyst2020_eV2" ;
788  else if(key == cmf::kZExpEV3Syst2020 ) return "ZExpAxialFFSyst2020_eV3" ;
789  else if(key == cmf::kZExpEV4Syst2020 ) return "ZExpAxialFFSyst2020_eV4" ;
790  else if(key == cmf::kZNormCCQE ) return "ZNormCCQE";
791  else if(key == cmf::kRESLowQ2SuppSyst2020 ) return "RESLowQ2SuppSyst2020";
792  else if(key == cmf::kDISvnCC1piWgt_2020 ) return "DISvnCC1piWgt_2020";
793  else if(key == cmf::khNFSISyst2020_MFP ) return "hNFSISyst2020_MFP";
794  else if(key == cmf::khNFSISyst2020_EV1 ) return "hNFSISyst2020_EV1";
795  else if(key == cmf::kMECEnuShapeSyst2020Nu ) return "MECEnuShapeSyst2020Nu";
796  else if(key == cmf::kMECEnuShapeSyst2020AntiNu ) return "MECEnuShapeSyst2020AntiNu";
797  else if(key == cmf::kMECShapeSyst2020Nu ) return "MECShapeSyst2020Nu";
798  else if(key == cmf::kMECShapeSyst2020AntiNu ) return "MECShapeSyst2020AntiNu";
799  else if(key == cmf::kMECInitStateNPFracSyst2020Nu ) return "MECInitStateNPFracSyst2020Nu";
800  else if(key == cmf::kMECInitStateNPFracSyst2020AntiNu ) return "MECInitStateNPFracSyst2020AntiNu";
801  else if(key == cmf::kRadCorrNue ) return "RadCorrNue";
802  else if(key == cmf::kRadCorrNuebar ) return "RadCorrNuebar";
803  else if(key == cmf::k2ndClassCurrs ) return "2ndClassCurrs";
804  else if(key == cmf::kGENIEPCA0 ) return "GENIEPCA0";
805  else if(key == cmf::kGENIEPCA1 ) return "GENIEPCA1";
806  else if(key == cmf::kGENIEPCA2 ) return "GENIEPCA2";
807  else if(key == cmf::kGENIEPCA3 ) return "GENIEPCA3";
808  else if(key == cmf::kGENIEPCA4 ) return "GENIEPCA4";
809  else if(key == cmf::kGENIEPCA5 ) return "GENIEPCA5";
810  else if(key == cmf::kGENIEPCA6 ) return "GENIEPCA6";
811  else if(key == cmf::kGENIEPCA7 ) return "GENIEPCA7";
812  else if(key == cmf::kGENIEPCA8 ) return "GENIEPCA8";
813  else if(key == cmf::kGENIEPCA9 ) return "GENIEPCA9";
814  else if(key == cmf::kGENIEPCA10 ) return "GENIEPCA10";
815  else if(key == cmf::kGENIEPCA11 ) return "GENIEPCA11";
816  else if(key == cmf::kUnCorrNDMuEScaleSyst2020 ) return "UnCorrNDMuEScaleSyst2020" ;
817  else if(key == cmf::kUnCorrMuCatMuESyst2020 ) return "UnCorrMuCatMuESyst2020" ;
818  else if(key == cmf::kPileupMuESyst2020 ) return "PileupMuESyst2020" ;
819  else if(key == cmf::kCorrMuEScaleSyst2020 ) return "CorrMuEScaleSyst2020" ;
820  else if(key == cmf::kNeutronVisEScalePrimariesSyst2018) return "NeutronVisEScalePrimariesSyst2018" ;
821  else if(key == cmf::kMichelTaggingSyst2020 ) return "MichelTaggingSyst2020" ;
822  else if(key == cmf::kAna2020NormFHC ) return "Ana2020NormFHC" ;
823  else if(key == cmf::kAna2020NormRHC ) return "Ana2020NormRHC" ;
824  else if(key == cmf::kNorm_1Nux ) return "Norm_1Nux";
825  else if(key == cmf::kMeanQ0_1Nux ) return "MeanQ0_1Nux";
826  else if(key == cmf::kMeanQ3_1Nux ) return "MeanQ3_1Nux";
827  else if(key == cmf::kSigmaQ0_1Nux ) return "SigmaQ0_1Nux";
828  else if(key == cmf::kSigmaQ3_1Nux ) return "SigmaQ3_1Nux";
829  else if(key == cmf::kCorr_1Nux ) return "Corr_1Nux";
830  else if(key == cmf::kNorm_2Nux ) return "Norm_2Nux";
831  else if(key == cmf::kMeanQ0_2Nux ) return "MeanQ0_2Nux";
832  else if(key == cmf::kMeanQ3_2Nux ) return "MeanQ3_2Nux";
833  else if(key == cmf::kSigmaQ0_2Nux ) return "SigmaQ0_2Nux";
834  else if(key == cmf::kSigmaQ3_2Nux ) return "SigmaQ3_2Nux";
835  else if(key == cmf::kCorr_2Nux ) return "Corr_2Nux";
836  else if(key == cmf::kBaselineNux ) return "BaselineNux";
837  else if(key == cmf::kTauScaleSyst ) return "TauScaleSyst";
838 
839  return "Unknown";
840 }
static const unsigned char kFrElas_N
Definition: VarVals.h:79
static const unsigned char kFormZone
Definition: VarVals.h:76
static const unsigned char kFrAbs_N
Definition: VarVals.h:80
static const unsigned char kMaCCQE
Definition: VarVals.h:70
static const unsigned char kCCQEPauliSupViaKF
Definition: VarVals.h:81
static const unsigned char kFrInel_pi
Definition: VarVals.h:77
static const unsigned char kFrCEx_N
Definition: VarVals.h:78
float cmf::NCEnergy ( float  hadronicEnergy)
inlinestatic

Definition at line 517 of file VarVals.h.

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

518 {
519  return hadronicEnergy;
520 }
float cmf::NCEnergy ( float  leptonicEnergy,
float  hadronicEnergy,
cmf::BeamType_t const &  beamType,
cmf::DetType_t const &  detector 
)
inlinestatic

Definition at line 523 of file VarVals.h.

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

527 {
528  // Note: leptonicEnergy must be the EM-like energy, as calculated by kEME_2020
529  // and hadronicEnergy must be the hadronic-like energy, as calculated by kHADE_2020
530  // If we don't have a tuned correction return the total calorimetric energy
531  if (beamType != kFHC ||
533  return leptonicEnergy + hadronicEnergy;
534 
535  // Set up correction parameters
536  double pars[4][6] = { {1.049, 0.795, 0.8409, 0.17, 0.82, -1.00}, // ND FHC
537  {1.025, 0.797, 0.9162, 0.53, -0.26, -1.48}, // FD FHC
538  {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00}, // ND RHC
539  {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00} };// FD RHC
540 
541  // set detector/beam index
542  int detCur = (detector == cmf::kFARDET) + ((beamType == kRHC)<<1); // bitshift magic
543 
544  // return the energy estimator
545  return (leptonicEnergy / pars[detCur][0] + hadronicEnergy / pars[detCur][1])
546  / (pars[detCur][2] + pars[detCur][3] * std::pow(leptonicEnergy + hadronicEnergy + pars[detCur][4],2) * std::exp(pars[detCur][5] * (leptonicEnergy + hadronicEnergy)));
547 }
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 482 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().

485 {
486  // p0 and p3 are 0.0 for both FHC and RHC
487  // 2020
488  #ifdef PRODUCTION5
489  float p0 = 0.0;
490  float p1 = (beamType == kFHC) ? 1.01777 : 0.988258;
491  float p2 = (beamType == kFHC) ? 1.10868 : 1.20084;
492  float p3 = 0.0;
493  float p4 = (beamType == kFHC) ? 1.43541e-03 : 1.92904e-07;
494  float p5 = (beamType == kFHC) ? 1.09628e-01 : 1.20704e-07;
495  float fr = (beamType == kFHC) ? 1. / 1.0355622 : 1. / 1.0111873;
496  #else
497  // 2018
498  float p0 = 0.0;
499  float p1 = (beamType == kFHC) ? 1.00756 : 0.980479;
500  float p2 = (beamType == kFHC) ? 1.07093 : 1.45170;
501  float p3 = 0.0;
502  float p4 = (beamType == kFHC) ? 1.28608e-2 : -5.82609e-3;
503  float p5 = (beamType == kFHC) ? 2.27129e-1 : -2.27599e-1;
504  float fr = (beamType == kFHC) ? 1. / 1.0501206 : 1. / 1.001766;
505  #endif
506 
507  return fr *(( p5 * hadronicEnergy * hadronicEnergy) +
508  ( p4 * leptonicEnergy * leptonicEnergy) +
509  ( p3 * leptonicEnergy * hadronicEnergy) +
510  ( p2 * hadronicEnergy) +
511  ( p1 * leptonicEnergy) +
512  p0 );
513 }
Float_t e
Definition: plot.C:35
float cmf::NuMuEnergy ( float  leptonicEnergy,
float  hadronicEnergy 
)
inlinestatic

Definition at line 474 of file VarVals.h.

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

476 {
477  return leptonicEnergy + hadronicEnergy;
478 
479 }
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(), and cmf::SystVar::operator<().

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:363
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:253
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::FakeUniverse const &  fu 
)

Definition at line 33 of file FakeUniverse.cxx.

References cmf::FakeUniverse::AsimovSpectrum(), b, allTimeWatchdog::endl, cmf::FakeUniverse::EventCounts(), cmf::FakeUniverse::InputLocation(), msf_helper::o, and cmf::FakeUniverse::PoissonSpectrum().

34  {
35  o << "input location "
36  << fu.InputLocation()
37  << std::endl;
38 
39  for(size_t b = 0; b < fu.AsimovSpectrum().size(); ++b){
40  o << "fake universe spectrum bin "
41  << b
42  << " poisson: "
43  << fu.PoissonSpectrum()[b]
44  << " asimov: "
45  << fu.AsimovSpectrum()[b]
46  << " counts: "
47  << fu.EventCounts()[b]
48  << "\n";
49  }
50 
51  return o;
52  }
const hit & b
Definition: hits.cxx:21
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(), 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)
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
T sin(T number)
Definition: d0nt_math.hpp:132
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(Th23) : " << 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:363
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:253
T sin(T number)
Definition: d0nt_math.hpp:132
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::MCVarVals const &  mcvv 
)

Definition at line 77 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().

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

Definition at line 84 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().

84  {
85 
86  o << "-- parameter: "
87  << std::setw(30) << par.Name() << std::setw(10)
88  << " val: " << par.Value()
89  << " fixed: " << par.IsFixed()
90  << " oscillation " << par.IsOscPar()
91  << " nuisance " << par.IsNuisance()
92  << " constrained " << par.IsConstrained()
93  << " lower: " << par.LowerBound()
94  << " upper: " << par.UpperBound()
95  << std::endl;
96 
97  return o;
98  }
Int_t par
Definition: SimpleIterate.C:24
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::Location const &  loc 
)

Definition at line 101 of file Parameter.cxx.

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

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

Definition at line 107 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.

108  {
109  o << cmf::KeyToVarName(sv.fType)
110  << " | -2 sigma wgt: "
111  << sv.fMinus2Sigma
112  << " | -1 sigma wgt: "
113  << sv.fMinus1Sigma
114  << " | 1 sigma wgt: "
115  << sv.fPlus1Sigma
116  << " | 2 sigma wgt: "
117  << sv.fPlus2Sigma
118  << " | ";
119 
120  return o;
121  }
static std::string KeyToVarName(uint8_t const &key)
Definition: StaticFuncs.h:628
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::OscParamPoint const &  hpp 
)

Definition at line 136 of file GridPointResult.cxx.

References cOscParams_Strings, allTimeWatchdog::endl, and cmf::OscParamPoint::OscPoint().

137  {
138  for(auto const& p : hpp.OscPoint())
139  o << cmf::cOscParams_Strings[p.first]
140  << " "
141  << p.second
142  << " ";
143 
144  o << std::endl;
145 
146  return o;
147  }
const char * p
Definition: xmltok.h:285
const std::string cOscParams_Strings[kNumOscParams]
Definition: Constants.h:253
std::ostream& cmf::operator<< ( std::ostream &  o,
cmf::EventId const &  evid 
)

Definition at line 154 of file VarVals.cxx.

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

155  {
156  o << "run "
157  << evid.run
158  << "\tsubrun "
159  << evid.subrun
160  << "\tevent "
161  << evid.event
162  << "\tcycle "
163  << evid.cycle
164  << "\tslice "
165  << evid.slice;
166 
167  return o;
168  }
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 215 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().

216  {
217  cmf::MetaData numumd;
218  cmf::MetaData nuemd;
219 
220  numumd.isMC = false;
221  nuemd .isMC = false;
224 
225  o << "Event Data related variables are: "
226  << "\n\t" << cmf::KeyToVarName(cmf::kNuE_CVN) << " " << dvv.val_at(cmf::kNuE_CVN, nuemd )
227  << "\n\t" << cmf::KeyToVarName(cmf::kNuE_NumMichel) << " " << dvv.val_at(cmf::kNuE_NumMichel, nuemd )
228  << "\n\t" << cmf::KeyToVarName(cmf::kHad_RecoE) << " " << dvv.val_at(cmf::kHad_RecoE, nuemd )
229  << "\n\t" << cmf::KeyToVarName(cmf::kLep_RecoE) << " " << dvv.val_at(cmf::kLep_RecoE, nuemd )
230  << "\n\t" << cmf::KeyToVarName(cmf::kLep_RecoE_MCFrac) << " " << dvv.val_at(cmf::kLep_RecoE_MCFrac, numumd)
231  << "\n\t" << cmf::KeyToVarName(cmf::kNu_RecoE ) << " nue " << dvv.val_at(cmf::kNu_RecoE, nuemd )
232  << "\n\t" << cmf::KeyToVarName(cmf::kNu_RecoE ) << " numu " << dvv.val_at(cmf::kNu_RecoE, numumd)
233  << "\n\t" << cmf::KeyToVarName(cmf::kFake_Weight) << " " << dvv.val_at(cmf::kFake_Weight, nuemd )
234  << std::endl;
235 
236  return o;
237  }
cmf::SelectionType_t selectionType
Definition: Structs.h:116
static std::string KeyToVarName(uint8_t const &key)
Definition: StaticFuncs.h:628
void cmf::ParameterSetToLocation ( fhicl::ParameterSet const &  pset,
cmf::DetType_t const &  det,
cmf::ParameterSpaceLoc loc,
bool  clearLoc 
)

Definition at line 10 of file ParameterUtility.cxx.

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

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

14  {
15  // nothing to be done with an empty parameter set
16  if(pset.is_empty()) return;
17 
18  if(clearLoc) loc.clear();
19 
21  bool fixed;
22  bool nuisance;
23  bool constraint;
24  float centralVal;
25  //float variance;
26  float sigma;
27  double val;
28  float lowerBound;
29  float upperBound;
30  uint8_t pos;
31  uint8_t numSigWgt;
32  std::string parstr;
33  std::string detstr;
34 
35  auto const& parNames = pset.get_names();
36 
37  for(auto const& itr : parNames){
38 
39  param = pset.get<fhicl::ParameterSet>(itr);
40 
41  LOG_DEBUG("ParameterSetToLocation")
42  << param.to_indented_string();
43 
44  detstr = param.get<std::string>("Detector", "BOTH");
45  parstr = param.get<std::string>("Parameter" );
46  fixed = param.get<bool >("Fixed", true );
47  val = param.get<double >("Value", 0. );
48  nuisance = param.get<bool >("Nuisance", false );
49  sigma = param.get<float >("Sigma", 1.e6 );
50  centralVal = param.get<float >("CentralValue", 0. );
51  //variance = param.get<float >("Variance", false );
52  constraint = param.get<bool >("Constraint", false );
53  lowerBound = param.get<float >("LoVal", 0. );
54  upperBound = param.get<float >("HiVal", 1.e6 );
55 
56  if(detstr == "BOTH" || cmf::StringToDetectorType(detstr) == det){
57  loc.emplace(parstr, cmf::Parameter(parstr,
58  det,
59  val,
60  fixed,
61  pos,
62  numSigWgt,
63  sigma,
64  centralVal,
65  nuisance,
66  constraint,
67  lowerBound,
68  upperBound));
69 
70  LOG_DEBUG("ParameterSpaceLoc")
71  << "inserting parameter "
72  << loc.find(parstr)->second;
73 
74  } // end if using the correct detector
75 
76  } // end loop over parameter names
77 
78  }
#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:275
double sigma(TH1F *hist, double percentile)
std::string to_indented_string() const
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
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 453 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().

456 {
457  if (md.IsNuMuSelected()) return cmf::NuMuEnergy(leptonicEnergy, hadronicEnergy );
458  #ifdef PRODUCTION5
459  else if(md.IsNCSelected() ) return cmf::NCEnergy (leptonicEnergy, hadronicEnergy, md.BeamType(), md.detector);
460  #else
461  else if(md.IsNCSelected() ) return cmf::NCEnergy (hadronicEnergy);
462  #endif
463  else if(md.IsNuESelected() ) return cmf::NuEEnergy (leptonicEnergy, hadronicEnergy, md.BeamType());
464  else
465  throw cet::exception("DataVarVals")
466  << "Unknown selection type "
467  << md.selectionType
468  << " requested to be used in calculating reconstructed energy";
469 
470  return std::numeric_limits<float>::lowest();
471 }
static float NuMuEnergy(float leptonicEnergy, float hadronicEnergy)
Definition: VarVals.h:474
static float NuEEnergy(float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType)
Definition: VarVals.h:482
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
static float NCEnergy(float hadronicEnergy)
Definition: VarVals.h:517
static long cmf::SelectionTypeKey ( cmf::SelectionType_t const &  st)
inlinestatic
void cmf::SerializeEventListColl ( std::string const &  dirName,
cmf::EventListColl const &  listColl 
)

Definition at line 121 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().

123  {
124 
125  // make a directory in the output file, and the act of making it puts us
126  // into that directory of the file
128  auto dir = tfs->mkdir(dirName.c_str());
129 
132 
133  // first the metadata tree
134  // leave this pointer dangling because the fileService created & manages it
135  TTree *metadataTree = dir.make<TTree>( "metadata", "Event list metadata" );
136  metadataTree->Branch("metadata", &md);
137  metadataTree->Branch("spillsummary", &ss);
138 
139  for(auto const& itr : listColl){
140 
141  md = itr.second.ListMetaData();
142  ss = itr.second.ListSpillSummary();
143 
144  metadataTree->Fill();
145 
146  // same principle as above for the event tree
147  TTree *eventTree = dir.make<TTree>(md.ToString().c_str(), "CovarianceMatrixFit event records");
148 
149  cmf::SerializeEvents(eventTree,
150  md,
151  itr.second);
152 
153  } // end loop over the lists
154  }
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:59
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 59 of file Event.cxx.

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

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

62  {
63 
64  cmf::DataVars dataVars;
65  cmf::TruthVars truthVars;
66  cmf::WeightVars weightVars;
67  cmf::EventId eventId;
68 
69  std::string eventidst("run/I:subrun/I:event/I:cycle/I:slice/I");
70  std::string datavarst("fNue_CVN/F:fNuE_NumMichel/F:fHad_RecoE/F:fLep_RecoE/F:fLep_RecoE_MCFrac/F:fRecoQ2/F:fFake_Weight/F");
71  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");
72  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");
73  // truthvrst. append("fTrueParentPT/F:fTrueParentPZ/F:fTrueParentDecay/F:fTrueParentTargetPDG/F");
74 
75  eventTree->Branch("eventId" , &eventId , eventidst.c_str());
76  eventTree->Branch("dataVars", &dataVars, datavarst.c_str());
77 
78  std::vector<unsigned char> systVarKeys;
79  std::vector<float> systVarMinus2Wgts;
80  std::vector<float> systVarMinus1Wgts;
81  std::vector<float> systVarPlus1Wgts;
82  std::vector<float> systVarPlus2Wgts;
83  if(md.isMC){
84  eventTree->Branch("truthVars" , &truthVars , truthvrst.c_str());
85  eventTree->Branch("weightVars", &weightVars, weightvst.c_str());
86  eventTree->Branch("systVarKeys", &systVarKeys );
87  eventTree->Branch("systVarMinus2Wgts", &systVarMinus2Wgts );
88  eventTree->Branch("systVarMinus1Wgts", &systVarMinus1Wgts );
89  eventTree->Branch("systVarPlus1Wgts", &systVarPlus1Wgts );
90  eventTree->Branch("systVarPlus2Wgts", &systVarPlus2Wgts );
91  } // end if MC
92 
93  for(auto & itr : events){
94  eventId = itr->EventID();
95  dataVars = itr->DataVals().DataVars();
96 
97  if(md.isMC){
98  truthVars = itr->MCVals().TruthVars();
99  weightVars = itr->MCVals().WeightVars();
100  systVarKeys .clear();
101  systVarMinus2Wgts.clear();
102  systVarMinus1Wgts.clear();
103  systVarPlus1Wgts .clear();
104  systVarPlus2Wgts .clear();
105  for(auto const& systItr : itr->MCVals().SystematicShifts()){
106  systVarKeys.emplace_back(systItr.Type());
107  systVarMinus2Wgts.emplace_back(systItr.SigmaWeight(cmf::kMinus2Sigma));
108  systVarMinus1Wgts.emplace_back(systItr.SigmaWeight(cmf::kMinus1Sigma));
109  systVarPlus1Wgts .emplace_back(systItr.SigmaWeight(cmf::kPlus1Sigma));
110  systVarPlus2Wgts .emplace_back(systItr.SigmaWeight(cmf::kPlus2Sigma));
111  }
112  }
113 
114  eventTree->Fill();
115  }
116  }
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
void events(int which)
Definition: Cana.C:52
static cmf::BeamType_t cmf::StringToBeamType ( std::string const &  str)
inlinestatic

Definition at line 266 of file StaticFuncs.h.

References kFHC, kRHC, and kUnknownBeam.

Referenced by InteractionTypeKey().

267 {
268  if (str == "RHC") return cmf::kRHC;
269  else if(str == "FHC") return cmf::kFHC;
270 
271  return cmf::kUnknownBeam;
272 }
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:23
static long DetectorTypeKey(cmf::DetType_t const &det)
Definition: StaticFuncs.h:19
static long PeriodKey(long const &ep)
Definition: StaticFuncs.h:20
static long InteractionTypeKey(cmf::InteractionType_t const &it)
Definition: StaticFuncs.h:24
static long FileTypeKey(cmf::FileType_t const &ft)
Definition: StaticFuncs.h:21
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 249 of file StaticFuncs.h.

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

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

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

Definition at line 398 of file StaticFuncs.h.

References k2ndClassCurrs, kAbsoluteCalibration, kAGKY_pT1pi, kAGKY_xF1pi, kAhtBY, kAna2020NormFHC, kAna2020NormRHC, kBaselineNux, kBhtBY, kBR1eta, kBR1gamma, kCalibShape, kCCQEMomDistroFGtoSF, fnex::kCCQEPauliSupViaKF, kCkvProtonShiftDown, kCorr_1Nux, kCorr_2Nux, kCorrMuEScaleSyst2020, kCV1uBY, kCV2uBY, kDISNuclMod, kDISvnCC1pi_Weight, kDISvnCC1piWgt_2020, kEmpiricalMEC_Weight, kEmpiricalMECtoGENIEQE_Weight, kEmpiricalMECtoGENIERES_Weight, kEtaNCEL, kFake_Weight, fnex::kFormZone, fnex::kFrAbs_N, kFrAbs_pi, fnex::kFrCEx_N, kFrCEx_pi, fnex::kFrElas_N, kFrElas_pi, kFrInel_N, fnex::kFrInel_pi, kFrPiProd_N, kFrPiProd_pi, kGENIEPCA0, kGENIEPCA1, kGENIEPCA10, kGENIEPCA11, kGENIEPCA2, kGENIEPCA3, kGENIEPCA4, kGENIEPCA5, kGENIEPCA6, kGENIEPCA7, kGENIEPCA8, kGENIEPCA9, kHad_RecoE, khNFSISyst2020_EV1, khNFSISyst2020_MFP, kLep_RecoE, kLep_RecoE_MCFrac, kLightModelLightDownCalibUp, kLightModelLightUpCalibDown, fnex::kMaCCQE, kMaCCRES, kMaCOHpi, kMaNCEL, kMaNCRES, kMeanQ0_1Nux, kMeanQ0_2Nux, kMeanQ3_1Nux, kMeanQ3_2Nux, kMECEnuShapeSyst2020AntiNu, kMECEnuShapeSyst2020Nu, kMECInitStateNPFracSyst2020AntiNu, kMECInitStateNPFracSyst2020Nu, kMECShapeSyst2020AntiNu, kMECShapeSyst2020Nu, kMFP_N, kMFP_pi, kMichelTaggingSyst2020, kMinus1Sigma, kMinus2Sigma, kMvCCRES, kMvNCRES, kNeutronVisEScalePrimariesSyst2018, kNorm_1Nux, kNorm_2Nux, kNormDISCC, kNu_RecoE, kNuE_CVN, kNuE_NumMichel, kOtherDIS_Weight, kPileupMuESyst2020, kPlus1Sigma, kPlus2Sigma, kPPFXFluxCVWgt, kR0COHpi, kRadCorrNue, kRadCorrNuebar, kRecoQ2, kRelativeCalibration, kRESLowQ2SuppSyst2020, kRnubarnuCC, kRPACCQE_Weight, kRPACCQEshapeEnh, kRPACCQEshapeSupp, kRPARES_Weight, kSigmaQ0_1Nux, kSigmaQ0_2Nux, kSigmaQ3_1Nux, kSigmaQ3_2Nux, kTauScaleSyst, kTheta_Delta2Npi, kTrueCCNC, kTrueE, kTrueHitNuc, kTrueIntMode, kTrueIntType, kTrueParentDecay, kTrueParentPDG, kTrueParentPT, kTrueParentPZ, kTrueParentTargetPDG, kTruePDG, kTruePDGOrig, kUnCorrMuCatMuESyst2020, kUnCorrNDMuEScaleSyst2020, kUnknownVar, kVecCCQE_shape, kXSecCVPPFX_Weight, kXSecCVWgt2020, kZExpEV1Syst2020, kZExpEV2Syst2020, kZExpEV3Syst2020, kZExpEV4Syst2020, kZNormCCQE, LOG_DEBUG, and LOG_VERBATIM.

Referenced by fnex::Spectrum::BaseVals(), fnex::VarBinning::BinInfo(), cmf::CAFToEventList::FillMCVals(), cmf::ShifterAndWeighter::GENIESystWeight(), fnex::MCVarVals::GENIEWgts(), fnex::Spectrum::Histogram(), InteractionTypeKey(), fnex::IsDataVar(), fnex::IsMCVar(), cmf::ShifterAndWeighter::MaCCQEReducedWeight(), fnex::CorrSpec_NoExtrapNuMu::MakeCorrectedHistograms(), fnex::CorrSpec_SimpleExtrap::MakeCorrectedHistograms(), fnex::CorrSpec_SimpleNuMuExtrap::MakeCorrectedHistograms(), fnex::CorrSpec_NoExtrapNuMu::MakeUncorrectedHistograms(), fnex::CorrSpec_SimpleExtrap::MakeUncorrectedHistograms(), fnex::CorrSpec_SimpleNuMuExtrap::MakeUncorrectedHistograms(), cmf::Parameter::Parameter(), cmf::ShifterAndWeighter::RPACCQEshapeEnhWeight(), cmf::ShifterAndWeighter::RPACCQEshapeSuppWeight(), fnex::MCVarVals::set_GENIEWgt(), fnex::MCVarVals::set_val_at(), fnex::DataVarVals::set_val_at(), fnex::MCVarVals::SetGENIEVarVal(), cmf::ParameterUtility::SysParKeys(), fnex::MCVarVals::val_at(), fnex::DataVarVals::val_at(), and fnex::VarBinning::VarBinning().

399 {
400 
401  if (name.find("NuE_CVN") != std::string::npos) return cmf::kNuE_CVN;
402  else if(name.find("NuE_NumMichel") != std::string::npos) return cmf::kNuE_NumMichel;
403  else if(name.find("Had_RecoE") != std::string::npos) return cmf::kHad_RecoE;
404  else if(name.find("Lep_RecoE") != std::string::npos) return cmf::kLep_RecoE;
405  else if(name.find("Nu_RecoE") != std::string::npos) return cmf::kNu_RecoE;
406  else if(name.find("Lep_RecoE_MCFrac") != std::string::npos) return cmf::kLep_RecoE_MCFrac;
407  else if(name.find("Reco_Q2") != std::string::npos) return cmf::kRecoQ2;
408  else if(name.find("Fake_Weight") != std::string::npos) return cmf::kFake_Weight;
409 
410  else if(name.find("TrueE") != std::string::npos) return cmf::kTrueE;
411  else if(name.find("TruePDG") != std::string::npos) return cmf::kTruePDG;
412  else if(name.find("TrueCCNC") != std::string::npos) return cmf::kTrueCCNC;
413  else if(name.find("TrueIntType") != std::string::npos) return cmf::kTrueIntType;
414  else