10 #ifndef COVARIANCEMATRIXFIT_CORE_VARVALS_H_ 11 #define COVARIANCEMATRIXFIT_CORE_VARVALS_H_ 16 #include "cetlib_except/exception.h" 60 :
run (
std::numeric_limits<
int>::lowest())
62 , event (
std::numeric_limits<
int>::lowest())
64 , slice (
std::numeric_limits<
int>::lowest())
96 : fNuE_CVN (
std::numeric_limits<
float>::lowest())
97 , fNuE_NumMichel (
std::numeric_limits<
float>::lowest())
98 , fNu_RecoE (
std::numeric_limits<
float>::lowest())
99 , fHad_RecoE (
std::numeric_limits<
float>::lowest())
100 , fLep_RecoE (
std::numeric_limits<
float>::lowest())
101 , fLep_RecoE_MCFrac(0.)
102 , fRecoQ2 (
std::numeric_limits<
float>::lowest())
115 , fNuE_NumMichel (nuenummichel)
117 , fHad_RecoE (hadrece)
118 , fLep_RecoE (leprece)
119 , fLep_RecoE_MCFrac(leprecemcfrac)
121 , fFake_Weight (fakewgt)
138 : fXSecCVPPFX_Weight (1.)
139 , fRPACCQE_Weight (1.)
140 , fRPARES_Weight (1.)
141 , fDISvnCC1pi_Weight (1.)
142 , fEmpiricalMEC_Weight (1.)
143 , fEmpiricalMECtoGENIEQE_Weight (1.)
144 , fEmpiricalMECtoGENIERES_Weight(1.)
145 , fOtherDIS_Weight (1.)
146 , fXSecCV2020_Weight (1.)
147 , fPPFXFluxCV_Weight (1.)
180 , fMinus2Sigma(minus2)
181 , fMinus1Sigma(minus1)
186 uint8_t
Type()
const {
return fType; }
187 std::vector<float> SigmasAsVec()
const;
188 float SigmaWeight(uint8_t
const& sigmaLevel)
const;
205 return std::move(std::vector<float>({fMinus2Sigma,
249 , fSystematicShifts(gv)
254 float val_at(uint8_t
const& varkey)
const;
256 std::map<float, float> SystVarWgts(uint8_t
const& varkey)
const;
285 float val_at(uint8_t
const& varkey,
288 void set_val_at(uint8_t
const& varkey,
299 float hadronicEnergy,
303 float hadronicEnergy);
305 static float NuEEnergy(
float leptonicEnergy,
306 float hadronicEnergy,
309 static float NCEnergy(
float leptonicEnergy,
310 float hadronicEnergy,
318 float hadronicEnergy,
326 <<
"Unknown selection type " 328 <<
" requested to be used in calculating reconstructed energy";
330 return std::numeric_limits<float>::lowest();
335 float hadronicEnergy)
337 return leptonicEnergy + hadronicEnergy;
343 float hadronicEnergy,
349 float p1 = (beamType ==
kFHC) ? 1.01777 : 0.988258;
350 float p2 = (beamType ==
kFHC) ? 1.10868 : 1.20084;
352 float p4 = (beamType ==
kFHC) ? 1.43541
e-03 : 1.92904
e-07;
353 float p5 = (beamType ==
kFHC) ? 1.09628
e-01 : 1.20704
e-07;
354 float fr = (beamType ==
kFHC) ? 1. / 1.0355622 : 1. / 1.0111873;
356 return fr *(( p5 * hadronicEnergy * hadronicEnergy) +
357 ( p4 * leptonicEnergy * leptonicEnergy) +
358 ( p3 * leptonicEnergy * hadronicEnergy) +
359 ( p2 * hadronicEnergy) +
360 ( p1 * leptonicEnergy) +
366 float hadronicEnergy,
373 if (beamType !=
kFHC ||
375 return leptonicEnergy + hadronicEnergy;
378 double pars[4][6] = { {1.049, 0.795, 0.8409, 0.17, 0.82, -1.00},
379 {1.025, 0.797, 0.9162, 0.53, -0.26, -1.48},
380 {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00},
381 {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00} };
387 return (leptonicEnergy / pars[detCur][0] + hadronicEnergy / pars[detCur][1])
388 / (pars[detCur][2] + pars[detCur][3] *
std::pow(leptonicEnergy + hadronicEnergy + pars[detCur][4],2) *
std::exp(pars[detCur][5] * (leptonicEnergy + hadronicEnergy)));
float fDISvnCC1pi_Weight
Deprecated.
float fMinus2Sigma
weight associated with this change in the underlying parameter
float fTruePDGOrig
true PDG of original neutrino
static float NuMuEnergy(float leptonicEnergy, float hadronicEnergy)
MCVarVals(cmf::TruthVars const &tv, cmf::WeightVars const &wv, cmf::SystVarColl const &gv)
float fEmpiricalMECtoGENIEQE_Weight
Deprecated.
static float NuEEnergy(float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType)
bool operator==(cmf::SystVar const &other) const
float fEmpiricalMEC_Weight
Deprecated.
float fFake_Weight
Weight for fake data events.
cmf::WeightVars fWeightVars
float fRecoQ2
reconstructed Q^2
EventId(int r, int s, int e, int c, int slc)
float fPPFXFluxCV_Weight
For 2020 Ana, store weights seperately.
float fTrueHitNuc
true hit nucleus
float fTrueCCNC
true cc vs nc
float fTrueParentDecay
true parent decay mode
float fPlus2Sigma
weight associated with this change in the underlying parameter
enum cmf::det_type DetType_t
float fTrueParentPT
true p_T of neutrino parent
::xsd::cxx::tree::exception< char > exception
float fEmpiricalMECtoGENIERES_Weight
Deprecated.
uint8_t fType
key for this parameter
cmf::DataVars const & DataVars() const
float fRPARES_Weight
To be used for systematic evaluation ONLY.
std::ostream & operator<<(std::ostream &o, cmf::Event const &event)
cmf::SystVarColl fSystematicShifts
float fTrueE
True nu energy.
Base container for the MC related Vars that constitute an event.
float fLep_RecoE_MCFrac
fraction of leptonic energy in muon catcher
MCVarVals(cmf::TruthVars const &tv, cmf::WeightVars const &wv)
float SigmaWeight(uint8_t const &sigmaLevel) const
SystVar(uint8_t type, float minus2, float minus1, float plus1, float plus2)
float fTrueParentPDG
true PDG of neutrino parent
cmf::TruthVars fTruthVars
float fRPACCQE_Weight
Deprecated.
cmf::TruthVars const & TruthVars() const
float fMinus1Sigma
weight associated with this change in the underlying parameter
fvar< T > exp(const fvar< T > &x)
bool operator<(StanConfig::Verbosity a, StanConfig::Verbosity b)
Allow for comparing them, since kQuiet is definitely "less" verbose than kVerbose.
std::vector< float > SigmasAsVec() const
float fXSecCV2020_Weight
For 2020 Ana, store weights seperately.
bool operator==(FC &A, FC &B)
DataVars(float nuecvn, float nuenummichel, float nurece, float hadrece, float leprece, float leprecemcfrac, float recoQ2, float fakewgt)
Base container for the MC related Vars that constitute an event.
float fXSecCVPPFX_Weight
Deprecated, Was Tufts weight for SA.
float fTrueParentPZ
true p_Z of neutrino parent
std::vector< cmf::SystVar > SystVarColl
Module to combine a set of results into a single file currently only does one data product type at a ...
DataVarVals(cmf::DataVars const &dv)
static float RecoEnergy(float leptonicEnergy, float hadronicEnergy, cmf::MetaData const &md)
cmf::WeightVars const & WeightVars() const
enum cmf::beam_type BeamType_t
float fOtherDIS_Weight
Deprecated.
cmf::SystVarColl const & SystematicShifts() const
float fTrueIntType
true interaction type
float fTrueIntMode
true interaction mode
float fTrueParentTargetPDG
true parent pdg code off the target
float fPlus1Sigma
weight associated with this change in the underlying parameter
static float NCEnergy(float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType, cmf::DetType_t const &detector)