1 #ifndef EventWeightManager_h 2 #define EventWeightManager_h 4 #include "EventWeightBase.hxx" 5 #include "SelectionManager.hxx" 7 #include "ToyExperiment.hxx" 10 const UInt_t NMAXEVENTWEIGHTS=100;
47 std::vector<EventWeightBase*>
GetEventWeights(
const std::vector<Int_t>& indices)
const;
93 nSys = _nEventWeightsEnabled;
116 int _nEventWeightsEnabled;
Int_t GetEventWeightIndex(const std::string &name)
Get the index of a EventWeight registered with the given name.
UInt_t GetNEnabledEventWeights()
Returns the number of enabled EventWeights.
void DumpEventWeights()
Dump all eventWeights.
EventWeightBase * GetEventWeight(const std::string &name) const
Get the EventWeight registered with the given name.
Int_t _eventWeightsEnabled[NMAXEVENTWEIGHTS]
The weight systematics that are enabled.
std::vector< EventWeightBase * > _eventWeights
The systematics that were registered as eventWeights.
UInt_t GetNEventWeights() const
Returns the number of EventWeights.
void InitializeEvent(SelectionManager &sel, AnaEventC &event)
Fill the SystBox for the enabled EventWeights.
std::vector< EventWeightBase * > _eventWeightsWithNull
The systematics that were registered as eventWeights.
void ReplaceEventWeight(Int_t index, EventWeightBase *sys)
Replace one of the existing EventWeightBase.
void FinalizeEvent(AnaEventC &event)
Delete the SystBox for all EventWeights.
void DisableEventWeights(const std::vector< Int_t > &systs)
Disable the EventWeights registered with the given indices.
void EnableAllEventWeights()
Enable all EventWeight eventWeights.
void DisableAllEventWeights()
Disable all eventWeights.
Weight_h ComputeEventWeight(Int_t index, const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox)
Compute EventWeight with a given index. Returns the event normalization weight.
bool HasEventWeights() const
Is there any EventWeight added ?
void AddEventWeight(Int_t index, EventWeightBase *sys)
Add a new Event Weight provided its index in the manager and a pointer to it.
std::vector< EventWeightBase * > & GetEventWeights()
Get the vector of EventWeights.
void EnableEventWeight(Int_t index)
Enable the EventWeight registered with the given index.
void EnableEventWeights(const std::vector< Int_t > &systs)
Enable the EventWeights registered with the given indices.
Weight_h ComputeEventWeights(const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox)
Compute all eventWeights. Returns the total event normalization weight.
const Int_t * GetEnabledEventWeights(int &nSys)
Returns the vector of indices for all enabled EventWeights.
bool HasEventWeight(const std::string &name)
Check if an EventWeight with a given name already exists in the manager.
void DisableEventWeight(Int_t index)
Disable the EventWeight registered with the given index.