APEvtWeight Class Reference

#include <APEvtWeight.h>

List of all members.

Public Types

enum  ObjType {
  kMuon, kTau, kElectron, kJet,
  kMuonMO, kTauMO, kElectronMO, kJetMO,
  kDiMuon, kDiTau, kDiElectron, kDiJet,
  kANDed, kORed, kMOORed, kMOANDed
}

Public Member Functions

 APEvtWeight (ObjType type)
virtual ~APEvtWeight ()
void AddWeightToEvt (APWeightEntry *weight)
double GetWeight ()
double GetStdDev ()
double GetVariance ()
double GetSysUncert ()
double GetSysVariance ()
std::vector< APWeightEntry * > GetWeightObjects (ObjType type)
unsigned long NEntries ()
ObjType GetType ()

Protected Member Functions

void Compute ()

Protected Attributes

std::vector< std::vector
< APWeightEntry * > > 
_current_evt_weights
unsigned long int _n_entries
double _k_evt_weight
double _variance
double _variance_sys
bool _isComputed
ObjType _type

Friends

const friend APEvtWeight operator&& (const APEvtWeight &a_in, const APEvtWeight &b_in)
const friend APEvtWeight operator|| (const APEvtWeight &a_in, const APEvtWeight &b_in)
const friend APEvtWeight operator! (const APEvtWeight &a_in)

Detailed Description

Class to calculate the sum of weights ("weighted counter")

Calculates the sum of weights taking into account the underlying asymmetric probability distribution. This is done by modelling the pdf and then extracting the corresponding quantiles.

Author:
fabian.Kohn@cern.ch

Constructor & Destructor Documentation

APEvtWeight::APEvtWeight ( ObjType  type  ) 

Default constructor.

APEvtWeight::~APEvtWeight (  )  [virtual]

Default destructor.


Member Function Documentation

void APEvtWeight::AddWeightToEvt ( APWeightEntry weight  ) 

Adds a weight to the sum of weights.

void APEvtWeight::Compute (  )  [protected]

Calculates the event weight for the current entries.

double APEvtWeight::GetStdDev (  ) 

Returns the standard deviation.

double APEvtWeight::GetSysUncert (  ) 

Returns the systematic uncertainty (from systematics assigned to weights).

double APEvtWeight::GetSysVariance (  ) 

Returns the systematic variance (from systematics assigned to weights).

APEvtWeight::ObjType APEvtWeight::GetType (  ) 

Returns the type of the event weight (muon, electron, jet, ANDed, ORed).

double APEvtWeight::GetVariance (  ) 

Returns the variance.

double APEvtWeight::GetWeight (  ) 

Returns the event weight.

vector< APWeightEntry * > APEvtWeight::GetWeightObjects ( ObjType  type  ) 

Returns the vector of weight objects for a specific object type.

unsigned long APEvtWeight::NEntries (  ) 

Returns the unweighted number of entries.


Friends And Related Function Documentation

const friend APEvtWeight operator! ( const APEvtWeight a_in  )  [friend]

Operator implementing negation of weight

const friend APEvtWeight operator&& ( const APEvtWeight a_in,
const APEvtWeight b_in 
) [friend]

Operator implementing logical AND

const friend APEvtWeight operator|| ( const APEvtWeight a_in,
const APEvtWeight b_in 
) [friend]

Operator implementing logical OR


Member Data Documentation

std::vector< std::vector< APWeightEntry* > > APEvtWeight::_current_evt_weights [protected]

Holds the weights for muons, electrons and jets in the current event.

bool APEvtWeight::_isComputed [protected]

Flag if calculation has already been performed for current set of input weights.

double APEvtWeight::_k_evt_weight [protected]

Holds the event weight.

unsigned long int APEvtWeight::_n_entries [protected]

Holds the original amount of unweighted counts ("sum of 1's").

ObjType APEvtWeight::_type [protected]

Holds the object type of the event weight (muon, electron, jet or combined).

double APEvtWeight::_variance [protected]

Holds the variance.

double APEvtWeight::_variance_sys [protected]

Holds the systematic variance (from systematics assigned to weights).


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1