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

The maximum number of systematics that is supported. More...

#include <SystematicManager.hxx>

Inheritance diagram for SystematicManager:
HLClonesArray

Public Member Functions

void ApplyVariationSystematics (const ToyExperiment &toy, AnaEventC &event)
 Apply all variationSystematics.
 
Weight_h ApplyWeightSystematics (const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox)
 Aplpy all weightSystematics. Returns the total event normalization weight.
 
Weight_h ApplyWeightSystematics (const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox, Weight_h *weights)
 Apply all weightSystematics. Returns the total event normalization weight and vector of weights as argument (one for each systematic parameter)
 
Weight_h ApplyWeightSystematics (const SelectionBase &sel, const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox, Weight_h *weights)
 Apply all weightSystematics for a given selection. Returns the total event normalization weight and vector of weights as argument (one for each systematic parameter)
 
Weight_h ApplyFluxSystematics (const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox)
 Apply all fluxSystematics. Returns the total event Weight.
 
Weight_h ApplyWeightSystematic (Int_t index, const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &ToyBox)
 Apply weight Systematics with a given index. Returns the event normalization weight.
 
bool UndoVariationSystematics (AnaEventC &event)
 Undo the variation systematic (Undo the variation, that is, go back to the previous values of modified observables.
 
EventVariationBaseGetSystematicVariation (const std::string &name) const
 Get the systematic registered with the given name.
 
EventWeightBaseGetSystematicWeight (const std::string &name) const
 
EventWeightBaseGetSystematicFlux (const std::string &name) const
 
SystematicBaseGetSystematic (const std::string &name) const
 
EventVariationBaseGetSystematicVariation (Int_t index) const
 Get the systematic registered with the given index.
 
EventWeightBaseGetSystematicWeight (Int_t index) const
 
EventWeightBaseGetSystematicFlux (Int_t index) const
 
SystematicBaseGetSystematic (Int_t index) const
 
Int_t GetSystematicVariationIndex (const std::string &name)
 Get the index of a systematic registered with the given name.
 
Int_t GetSystematicWeightIndex (const std::string &name)
 
Int_t GetSystematicFluxIndex (const std::string &name)
 
EventVariationBase ** GetVariationSystematics (int &nSys)
 Get the vector of variationSystematics.
 
EventWeightBase ** GetWeightSystematics (int &nSys)
 Get the vector of weightsSystematics.
 
EventWeightBase ** GetFluxSystematics (int &nSys)
 Get the vector of fluxSystematics.
 
std::vector< SystematicBase * > & GetSystematics ()
 Get the vector containing all systematics (contains NULL pointers)
 
std::vector< SystematicBase * > GetSystematics (const std::vector< Int_t > &indices) const
 Get the vector containing systematics with specific indices.
 
void EnableSystematic (Int_t index)
 Enable the systematic registered with the given index.
 
void DisableSystematic (Int_t index)
 Disable the systematic registered with the given index.
 
void EnableSystematics (const std::vector< Int_t > &systs)
 Enable the systematics registered with the given indices.
 
void DisableSystematics (const std::vector< Int_t > &systs)
 Disable the systematics registered with the given indices.
 
void DisableAllVariationSystematics ()
 Disable all variationSystematics.
 
void EnableAllVariationSystematics ()
 Enable all variationSystematics.
 
void DisableAllWeightSystematics ()
 Disable all weightSystematics.
 
void EnableAllWeightSystematics ()
 Enable all systematic weightSystematics.
 
void DisableAllFluxSystematics ()
 Disable all fluxSystematics.
 
void EnableAllFluxSystematics ()
 Enable all systematic fluxSystematics.
 
void DisableAllSystematics ()
 Disable all Systematics.
 
void EnableAllSystematics ()
 Enable all Systematics.
 
void AddVariationSystematic (Int_t index, EventVariationBase *sys)
 Register an EventVariationBase as a variation systematic.
 
void AddVariationSystematic (Int_t index, const std::string &name, EventVariationBase *sys)
 Register an EventVariationBase as a variation systematic provided the index and name.
 
void ReplaceVariationSystematic (Int_t index, EventVariationBase *sys)
 Replace one of the existing EventVariationBase.
 
void AddWeightSystematic (Int_t index, EventWeightBase *sys)
 Register an SystematicBase as a weight systematic.
 
void AddWeightSystematic (Int_t index, const std::string &name, EventWeightBase *sys)
 Register an SystematicBase as a weight systematic provided the index and name.
 
void ReplaceWeightSystematic (Int_t index, EventWeightBase *sys)
 Replace one of the existing EventWeightBase.
 
void AddFluxSystematic (Int_t index, EventWeightBase *sys)
 Register an SystematicBase as a flux systematic.
 
void AddFluxSystematic (Int_t index, const std::string &name, EventWeightBase *sys)
 Register an SystematicBase as a flux systematic.
 
void ReplaceFluxSystematic (Int_t index, EventWeightBase *sys)
 Replace one of the existing EventWeightBase.
 
void FinalizeEventSystematics (AnaEventC &event)
 
void InitializeEventSystematics (SelectionManager &sel, AnaEventC &event)
 
void Initialize (SelectionManager &sel, Int_t nevents)
 
bool HasSystematics () const
 Is there any systematic added ?
 
UInt_t GetNVariationSystematics () const
 Returns the number of VariationSystematics.
 
UInt_t GetNWeightSystematics () const
 Returns the number of WeightSystematics.
 
UInt_t GetNFluxSystematics () const
 Returns the number of Flux Systematics.
 
const Int_t * GetEnabledWeightSystematics (int &nSys)
 Returns the vector of indices for all enabled weight systematics.
 
UInt_t GetNEnabledWeightSystematics ()
 Returns the number of enabled weight systematics.
 
const Int_t * GetEnabledVariationSystematics (int &nSys)
 Returns the vector of indices for all enabled variation systematics.
 
UInt_t GetNEnabledVariationSystematics ()
 Returns the number of enabled variation systematics.
 
void ReadSystematics (const std::string &file)
 Read the systematics from a file.
 
void DumpSystematics ()
 Dump all systematics.
 
void DumpVariationSystematics ()
 Dump all variationSystematics.
 
void DumpWeightSystematics ()
 Dump all weightSystematics.
 
void DumpFluxSystematics ()
 Dump all fluxSystematics.
 
Int_t GetPDFBin (int syst)
 Gets the PDF bin for a systematic variation with a given with index.
 
void SetPDFBin (int syst, int bin)
 Sets the PDF bin for a systematic variation with a given with index.
 
bool HasSystematic (const std::string &name)
 Check if a systematic already exists.
 
void ConstructCovarianceMatrix ()
 Make the covariance.
 
TMatrixT< double > * GetCovarianceMatrix () const
 Get the covariance matrix.
 
- Public Member Functions inherited from HLClonesArray
 HLClonesArray (const std::string &tree_name, const std::string &tcarray_name, const std::string &class_name, const UInt_t size)
 
void ReadClonesArray (const std::string &file)
 
void WriteClonesArray (TTree &tree)
 
Int_t & GetNObjects ()
 Return the number of steps that have been added.
 
TClonesArray * GetClonesArray ()
 
const std::string & GetClonesArrayName () const
 Return the name of the TClonesArray.
 
const std::string & GetTreeName () const
 Return the name of the tree.
 

Protected Attributes

EventVariationBase_variationSystematics [NMAXSYSTEMATICS]
 The systematics that were registered as variationSystematics.
 
int _nVariationSystematics
 
EventWeightBase_weightSystematics [NMAXSYSTEMATICS]
 The systematics that were registered as weightSystematics.
 
int _nWeightSystematics
 
EventWeightBase_fluxSystematics [NMAXSYSTEMATICS]
 The systematics that were registered as fluxSystematics.
 
int _nFluxSystematics
 
std::vector< SystematicBase * > _systematics
 The systematics that were registered.
 
Int_t _variationSystematicsEnabled [NMAXSYSTEMATICS]
 The variation systematics that are enabled.
 
int _nVariationSystematicsEnabled
 
Int_t _weightSystematicsEnabled [NMAXSYSTEMATICS]
 The weight systematics that are enabled.
 
int _nWeightSystematicsEnabled
 
Int_t _fluxSystematicsEnabled [NMAXSYSTEMATICS]
 The weight systematics that are enabled.
 
int _nFluxSystematicsEnabled
 
TRandom3 _RandomGenerator
 A random generator that can be used to generate throws.
 
SystematicCovariance_covariance
 The associated systematic covariance.
 
- Protected Attributes inherited from HLClonesArray
TChain * _chain
 TChain used to read the "config" tree from the output file.
 
Int_t _NObjects
 The number of steps that were added.
 
TClonesArray * _objects
 
std::string _tcArrayName
 Name of the TClonesArray in the tree.
 
std::string _treeName
 Name of the Tree.
 
std::string _fileName
 Name of the last file read.
 

Detailed Description

The maximum number of systematics that is supported.

Manager for Systematics. A systematic can be of type "variation" or "weight". The former modifies a particular aspect of the Input data. The last computes a event weight. Two different base classes are used EventVariationBase and EventWeightBase This manager handles the registration, enabling and disabling of the systematics.

Definition at line 24 of file SystematicManager.hxx.


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