16 #include "nugen/EventGeneratorBase/GENIE/GENIE2ART.h" 29 #include "nugen/EventGeneratorBase/GENIE/GENIE2ART.h" 70 "${GENIE_XSEC_TUNE}");
78 evgb::SetEventGeneratorListAndTune( evgen_list_name, genie_tune_name );
82 produces<std::vector<MCEventWeight> >();
88 auto mcwghvec = std::make_unique<std::vector<MCEventWeight>>();
92 std::vector<art::Ptr<simb::MCTruth> > mclist;
99 for (
unsigned int inu = 0;
inu < mclist.size(); ++
inu) {
101 mcwghvec->push_back(mcwgh);
112 std::stringstream job_summary;
114 for (
int i=1; i <= 110 ;i++) job_summary <<
"=";
116 job_summary <<
std::setw(20) <<
"WeightCalc" 124 for (
int i=1; i <= 110; i++) job_summary <<
"=";
126 for (
auto it = weightCalcMap.begin(); it!=weightCalcMap.end(); it++) {
127 job_summary <<
std::setw(20) << it->first
128 <<
std::setw(15) << (it->second->fWeightCalcType)
129 <<
std::setw(15) << (it->second->fNcalls)
130 <<
std::setw(15) << (it->second->fNmultisims)
131 <<
std::setw(15) << (it->second->fMinWeight)
132 <<
std::setw(15) << (it->second->fMaxWeight)
133 <<
std::setw(15) << (it->second->fAvgWeight)
136 for (
int i=1; i<=110; i++) job_summary <<
"=";
void produce(art::Event &e) override
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
EDProducer(fhicl::ParameterSet const &pset)
std::string fGenieModuleLabel
Allows to interface to EventWeight calculators.
EventWeight & operator=(EventWeight const &)=delete
Q_EXPORT QTSManip setprecision(int p)
#define DEFINE_ART_MODULE(klass)
std::map< std::string, Weight_t * > GetWeightCalcMap()
Returns the map between calculator name and Weight_t product.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
WeightManager _wgt_manager
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
EventWeight(fhicl::ParameterSet const &p)
size_t Configure(fhicl::ParameterSet const &cfg, Module &module)
Configuration function.
Q_EXPORT QTSManip setw(int w)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
MCEventWeight Run(art::Event &e, const int inu)
Core function (previous call to Configure is needed)
QTextStream & endl(QTextStream &s)