13 #include "TDatabasePDG.h" 38 namespace simb {
class MCTruth; }
39 namespace simb {
class GTruth; }
40 namespace rwgt {
class NuReweight; }
102 fEnergyNeutrino = tfs->
make<TH1F>(
"fEnergyneutrino",
"Total number of events", 50, 0., 25);
103 fNeventsSubrun = tfs->
make<TH1F>(
"fNeventsSubrun",
"Total number of events", 1, 0., 1.);
106 for(
int i = 0; i < 3; i++) {
107 sprintf(name,
"fWgtQE_%dsigma", i+1);
108 fWgtQE[i] = tfs->
make<TH1F>(name,
"Evt Wgts", 100, 0., 2.0);
109 sprintf(name,
"fWgtRES_%dsigma", i+1);
110 fWgtRES[i] = tfs->
make<TH1F>(name,
"Evt Wgts", 100, 0., 2.0);
111 sprintf(name,
"fWgtDIS_%dsigma", i+1);
112 fWgtDIS[i] = tfs->
make<TH1F>(name,
"Evt Wgts", 100, 0., 2.0);
114 double sigma = (double)(i+1);
145 if (mclist->empty()) {
146 mf::LogWarning(
"ReweightAna") <<
"Error retrieving MCTruth list" ;
152 if (gtlist->empty()) {
157 LOG_DEBUG(
"ReweightAna")<<
"MC List sizes:" << mclist->size() <<
" " << gtlist->size() <<
"\n";
160 for(
size_t i_intx = 0; i_intx < mclist->size(); ++i_intx){
161 LOG_DEBUG(
"ReweightAna") <<
"start loop";
171 for(
int i = 0; i < 3; i++) {
174 if(mc_neutrino.
Mode()==0 && mc_neutrino.
CCNC()==0) {
177 else if(mc_neutrino.
Mode()==1 && mc_neutrino.
CCNC()==0) {
180 else if(mc_neutrino.
Mode()==2 && mc_neutrino.
CCNC()==0) {
double E(const int i=0) const
void AddReweightValue(ReweightLabel_t rLabel, double value)
Change a reweight parameter. If it hasn't been added yet add it.
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
tweak the 2pi non-RES bkg in the RES region, for v+n CC
TH1F * fNeventsSubrun
Total number of events per subrun.
const simb::MCNeutrino & GetNeutrino() const
void Configure()
Reconfigure the weight calculators.
SubRunNumber_t subRun() const
void endSubRun(art::SubRun const &sr)
tweak the 2pi non-RES bkg in the RES region, for v+p CC
const simb::MCParticle & Nu() const
tweak the 2pi non-RES bkg in the RES region, for v+p NC
object containing MC flux information
void beginSubRun(art::SubRun const &sr)
void analyze(art::Event const &evt)
std::string fMCTruthModuleLabel
label for module producing mc truth information
tweak the 2pi non-RES bkg in the RES region, for v+n NC
#define DEFINE_ART_MODULE(klass)
tweak Ma NCRES, affects d2sigma(NCRES)/dWdQ2 both in shape and normalization
tweak the 1pi non-RES bkg in the RES region, for v+n CC
T get(std::string const &key) const
std::string fPotLabel
Module that produced the POTSum object.
tweak the 1pi non-RES bkg in the RES region, for v+p NC
TH1F * fEnergyNeutrino
Total number of events.
void reconfigure(const fhicl::ParameterSet &p)
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void LoadMCInfo(art::Event const &evt)
tweak Ma CCRES, affects d2sigma(CCRES)/dWdQ2 both in shape and normalization
tweak Ma CCQE, affects dsigma(CCQE)/dQ2 both in shape and normalization
rwgt::NuReweight * fGrwgt[3]
X-sec weight calculator.
Event generator information.
Event generator information.
double CalcWeight(const simb::MCTruth &truth, const simb::GTruth >ruth) const
A module to check the results from the Monte Carlo generator.
tweak the 1pi non-RES bkg in the RES region, for v+p CC
tweak the 1pi non-RES bkg in the RES region, for v+n NC
Wrapper for reweightings neutrino interactions within the ART framework.