HighLAND
Public Member Functions | Protected Attributes | List of all members
EventWeightManager Class Reference

#include <EventWeightManager.hxx>

Public Member Functions

Weight_h ComputeEventWeights (const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox)
 Compute all eventWeights. Returns the total event normalization weight.
 
Weight_h ComputeEventWeights (const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox, Weight_h *weights)
 Compute all eventWeights. Returns the total event normalization weight and vector of weights as argument (one for each EventWeight)
 
Weight_h ComputeEventWeights (const SelectionBase &sel, const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox, Weight_h *weights)
 Compute all eventWeights for a given selection. Returns the total event normalization weight and vector of weights as argument (one for each EventWeight)
 
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.
 
EventWeightBaseGetEventWeight (const std::string &name) const
 Get the EventWeight registered with the given name.
 
EventWeightBaseGetEventWeight (Int_t index) const
 Get the EventWeight registered with the given index.
 
Int_t GetEventWeightIndex (const std::string &name)
 Get the index of a EventWeight registered with the given name.
 
std::vector< EventWeightBase * > & GetEventWeights ()
 Get the vector of EventWeights.
 
std::vector< EventWeightBase * > GetEventWeights (const std::vector< Int_t > &indices) const
 Get the vector containing EventWeights with specific indices.
 
void EnableEventWeight (Int_t index)
 Enable the EventWeight registered with the given index.
 
void DisableEventWeight (Int_t index)
 Disable the EventWeight registered with the given index.
 
void EnableEventWeights (const std::vector< Int_t > &systs)
 Enable the EventWeights registered with the given indices.
 
void DisableEventWeights (const std::vector< Int_t > &systs)
 Disable the EventWeights registered with the given indices.
 
void DisableAllEventWeights ()
 Disable all eventWeights.
 
void EnableAllEventWeights ()
 Enable all EventWeight eventWeights.
 
void AddEventWeight (Int_t index, EventWeightBase *sys)
 Add a new Event Weight provided its index in the manager and a pointer to it.
 
void AddEventWeight (Int_t index, const std::string &name, EventWeightBase *sys)
 Add a new Event Weight provided its index in the manager, its name and a pointer to it.
 
void ReplaceEventWeight (Int_t index, EventWeightBase *sys)
 Replace one of the existing EventWeightBase.
 
void InitializeEvent (SelectionManager &sel, AnaEventC &event)
 Fill the SystBox for the enabled EventWeights.
 
void FinalizeEvent (AnaEventC &event)
 Delete the SystBox for all EventWeights.
 
void Initialize (SelectionManager &sel, Int_t nevents)
 
bool HasEventWeights () const
 Is there any EventWeight added ?
 
UInt_t GetNEventWeights () const
 Returns the number of EventWeights.
 
const Int_t * GetEnabledEventWeights (int &nSys)
 Returns the vector of indices for all enabled EventWeights.
 
UInt_t GetNEnabledEventWeights ()
 Returns the number of enabled EventWeights.
 
void DumpEventWeights ()
 Dump all eventWeights.
 
bool HasEventWeight (const std::string &name)
 Check if an EventWeight with a given name already exists in the manager.
 

Protected Attributes

std::vector< EventWeightBase * > _eventWeights
 The systematics that were registered as eventWeights.
 
std::vector< EventWeightBase * > _eventWeightsWithNull
 The systematics that were registered as eventWeights.
 
Int_t _eventWeightsEnabled [NMAXEVENTWEIGHTS]
 The weight systematics that are enabled.
 
int _nEventWeightsEnabled
 

Detailed Description

Manager for EventWeights This manager handles the registration, enabling and disabling of the EventWeights.

Definition at line 15 of file EventWeightManager.hxx.


The documentation for this class was generated from the following files: