2 #include "sbnanaobj/StandardRecord/Proxy/SRProxy.h"
9 auto& det = sr->truth.det;
14 bool detector_cut = all || nd || ub || fd;
15 if(!sr->truth.iscc ||
abs(sr->truth.pdg) != 14 || isnan(sr->fake_reco.nuE) || !detector_cut)
17 double particle_energy = 0.0;
20 particle_energy += sr->fake_reco.lepton.ke;
23 for(
const auto& hadron: sr->fake_reco.hadrons) {
24 particle_energy += hadron.ke;
28 for(
const auto& hadron: sr->fake_reco.hadrons) {
29 if(hadron.pid == 2112) {
30 particle_energy += hadron.ke;
35 for(
const auto& hadron: sr->fake_reco.hadrons) {
36 if(hadron.pid == 111) {
37 particle_energy += hadron.ke;
42 for(
const auto& hadron: sr->fake_reco.hadrons) {
43 auto pid = hadron.pid;
44 if(pid == 2212 ||
abs(pid) == 211) {
45 particle_energy += hadron.ke;
54 scale *= std::sqrt(particle_energy);
57 scale /= std::sqrt(particle_energy + 0.1);
60 sr->fake_reco.nuE += particle_energy * scale;
const EnergyScaleSyst kEnergyScaleHadronSqrtUBBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kMicroBooNE, 0.10,"EnergyScaleHadronSqrtUBBig","Uncorrelated MicroBooNE sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrtND(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kSBND, 0.02,"EnergyScaleMuonInvSqrtND","Uncorrelated SBND inv sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronUBBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kMicroBooNE, 0.10,"EnergyScaleHadronUBBig","Uncorrelated MicroBooNE linear E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonNDBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kSBND, 0.05,"EnergyScaleMuonNDBig","Uncorrelated SBND linear E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuon(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kAll, 0.02,"EnergyScaleMuon","Correlated linear E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrtUB(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kMicroBooNE, 0.02,"EnergyScaleMuonInvSqrtUB","Uncorrelated MicroBooNE inv sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronInvSqrt(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kAll, 0.05,"EnergyScaleHadronInvSqrt","Correlated inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrtFDBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kICARUS, 0.05,"EnergyScaleMuonInvSqrtFDBig","Uncorrelated ICARUS inv sqrt E_{#mu} scale")
std::vector< const ISyst * > GetBigEnergySysts()
const EnergyScaleSyst kEnergyScaleHadronFDBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kICARUS, 0.10,"EnergyScaleHadronFDBig","Uncorrelated ICARUS linear E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonND(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kSBND, 0.02,"EnergyScaleMuonND","Uncorrelated SBND linear E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronSqrt(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kAll, 0.05,"EnergyScaleHadronSqrt","Correlated sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronSqrtBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kAll, 0.10,"EnergyScaleHadronSqrtBig","Correlated sqrt E_{had} scale")
void Shift(double sigma, caf::SRSliceProxy *sr, double &weight) const override
Perform the systematic shift.
process_name opflashCryoW ana
const EnergyScaleSyst kEnergyScaleMuonUB(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kMicroBooNE, 0.02,"EnergyScaleMuonUB","Uncorrelated MicroBooNE linear E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronFD(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kICARUS, 0.05,"EnergyScaleHadronFD","Uncorrelated ICARUS linear E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrtFD(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kICARUS, 0.02,"EnergyScaleMuonSqrtFD","Uncorrelated ICARUS sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronInvSqrtFD(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kICARUS, 0.05,"EnergyScaleHadronInvSqrtFD","Uncorrelated ICARUS inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kAll, 0.05,"EnergyScaleMuonBig","Correlated linear E_{#mu} scale ")
caf::Proxy< caf::SRSlice > SRSliceProxy
const EnergyScaleSyst kEnergyScaleHadronBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kAll, 0.10,"EnergyScaleHadronBig","Correlated linear E_{had} scale")
EnergyScaleSystParticle part
const EnergyScaleSyst kEnergyScaleHadron(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kAll, 0.05,"EnergyScaleHadron","Correlated linear E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrtBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kAll, 0.05,"EnergyScaleMuonInvSqrtBig","Correlated inv sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronInvSqrtNDBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kSBND, 0.10,"EnergyScaleHadronInvSqrtNDBig","Uncorrelated SBND inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronInvSqrtBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kAll, 0.10,"EnergyScaleHadronInvSqrtBig","Correlated inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronInvSqrtUBBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kMicroBooNE, 0.10,"EnergyScaleHadronInvSqrtUBBig","Uncorrelated MicroBooNE inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronSqrtFDBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kICARUS, 0.10,"EnergyScaleHadronSqrtFDBig","Uncorrelated ICARUS sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronInvSqrtFDBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kICARUS, 0.10,"EnergyScaleHadronInvSqrtFDBig","Uncorrelated ICARUS inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronInvSqrtUB(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kMicroBooNE, 0.05,"EnergyScaleHadronInvSqrtUB","Uncorrelated MicroBooNE inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronUB(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kMicroBooNE, 0.05,"EnergyScaleHadronUB","Uncorrelated MicroBooNE linear E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrtUBBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kMicroBooNE, 0.05,"EnergyScaleMuonInvSqrtUBBig","Uncorrelated MicroBooNE inv sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrt(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kAll, 0.02,"EnergyScaleMuonInvSqrt","Correlated inv sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronND(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kSBND, 0.05,"EnergyScaleHadronND","Uncorrelated SBND linear E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrtUBBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kMicroBooNE, 0.05,"EnergyScaleMuonSqrtUBBig","Uncorrelated MicroBooNE sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrtND(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kSBND, 0.02,"EnergyScaleMuonSqrtND","Uncorrelated SBND sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrt(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kAll, 0.02,"EnergyScaleMuonSqrt","Correlated sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrtNDBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kSBND, 0.05,"EnergyScaleMuonSqrtNDBig","Uncorrelated SBND sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronSqrtFD(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kICARUS, 0.05,"EnergyScaleHadronSqrtFD","Uncorrelated ICARUS sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronSqrtUB(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kMicroBooNE, 0.05,"EnergyScaleHadronSqrtUB","Uncorrelated MicroBooNE sqrt E_{had} scale")
EnergyScaleSystDetector detector
const EnergyScaleSyst kEnergyScaleMuonFDBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kICARUS, 0.05,"EnergyScaleMuonFDBig","Uncorrelated ICARUS linear E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonFD(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kICARUS, 0.02,"EnergyScaleMuonFD","Uncorrelated ICARUS linear E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronNDBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kSBND, 0.10,"EnergyScaleHadronNDBig","Uncorrelated SBND linear E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonUBBig(EnergyScaleSystTerm::kConstant, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kMicroBooNE, 0.05,"EnergyScaleMuonUBBig","Uncorrelated MicroBooNE linear E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrtFDBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kICARUS, 0.05,"EnergyScaleMuonSqrtFDBig","Uncorrelated ICARUS sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrtNDBig(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kSBND, 0.05,"EnergyScaleMuonInvSqrtNDBig","Uncorrelated SBND inv sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonInvSqrtFD(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kICARUS, 0.02,"EnergyScaleMuonInvSqrtFD","Uncorrelated ICARUS inv sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleHadronSqrtND(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kSBND, 0.05,"EnergyScaleHadronSqrtND","Uncorrelated SBND sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrtBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kAll, 0.05,"EnergyScaleMuonSqrtBig","Correlated sqrt E_{#mu} scale")
const EnergyScaleSyst kEnergyScaleMuonSqrtUB(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kMuon, EnergyScaleSystDetector::kMicroBooNE, 0.02,"EnergyScaleMuonSqrtUB","Uncorrelated MicroBooNE sqrt E_{#mu} scale")
std::vector< const ISyst * > GetEnergySysts()
const EnergyScaleSyst kEnergyScaleHadronInvSqrtND(EnergyScaleSystTerm::kInverseSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kSBND, 0.05,"EnergyScaleHadronInvSqrtND","Uncorrelated SBND inv sqrt E_{had} scale")
const EnergyScaleSyst kEnergyScaleHadronSqrtNDBig(EnergyScaleSystTerm::kSqrt, EnergyScaleSystParticle::kHadron, EnergyScaleSystDetector::kSBND, 0.10,"EnergyScaleHadronSqrtNDBig","Uncorrelated SBND sqrt E_{had} scale")