#include <WeightManager.h>
Public Member Functions | |
WeightManager () | |
~WeightManager () | |
template<typename Module > | |
size_t | Configure (fhicl::ParameterSet const &cfg, Module &module) |
EventWeightMap | Run (art::Event &e, const int inu) |
std::map< std::string, WeightCalc * > | GetWeightCalcMap () |
Private Attributes | |
std::map< std::string, WeightCalc * > | fWeightCalcMap |
A set of custom weight calculators. More... | |
Definition at line 24 of file sbncode/sbncode/SBNEventWeight/Base/WeightManager.h.
|
inline |
Definition at line 26 of file sbncode/sbncode/SBNEventWeight/Base/WeightManager.h.
|
inline |
Definition at line 27 of file sbncode/sbncode/SBNEventWeight/Base/WeightManager.h.
size_t sbn::evwgh::WeightManager::Configure | ( | fhicl::ParameterSet const & | cfg, |
Module & | module | ||
) |
CONFIGURE FUNCTION
0) Looks at the weight_functions fcl parameter to get the name of the calculators
1) Creates the Calculators requested in step 0, and assigne a different random seed to each one
3) The future call WeightManager::Run will run the calculators
cfg | the input parameters for settings |
the | enging creator for the random seed (usually passed with *this) |
Definition at line 66 of file sbncode/sbncode/SBNEventWeight/Base/WeightManager.h.
|
inline |
Returns the map between calculator name and WeightCalcs
Definition at line 58 of file sbncode/sbncode/SBNEventWeight/Base/WeightManager.h.
EventWeightMap sbn::evwgh::WeightManager::Run | ( | art::Event & | e, |
const int | inu | ||
) |
CORE FUNCTION: executes algorithms to assign a weight to the event as requested users.
WeightManager::Configure needs to be called first
0) Loos over all the previously emplaced calculators
1) For each of them calculates the weights (more weight can be requested per calculator)
3) Returns a map from "calculator name" to vector of weights calculated which is available inside EventWeightMap
e | the art event |
inu | the index of the simulated neutrino in the event |
Definition at line 9 of file sbncode/sbncode/SBNEventWeight/Base/WeightManager.cxx.
|
private |
A set of custom weight calculators.
Definition at line 61 of file sbncode/sbncode/SBNEventWeight/Base/WeightManager.h.