ATLAS Offline Software
APEvtWeight.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
16 
18 #ifndef APEvtWeight_h
19 #define APEvtWeight_h
20 
21 #include "TNamed.h"
22 #include <vector>
23 
24 class APWeightEntry;
25 
26 class APEvtWeight : public TNamed {
27 
28 public:
32  virtual ~APEvtWeight();
35  double GetWeight();
36  double GetStdDev();
37  double GetVariance();
38  double GetSysUncert();
39  double GetSysVariance();
41  std::vector< APWeightEntry* > GetWeightObjects(ObjType type);
42  unsigned long NEntries();
43  ObjType GetType();
45  const friend APEvtWeight operator&&(const APEvtWeight& a_in, const APEvtWeight& b_in);
46  const friend APEvtWeight operator||(const APEvtWeight& a_in, const APEvtWeight& b_in);
47  const friend APEvtWeight operator!(const APEvtWeight& a_in);
49  ClassDef(APEvtWeight,1)
50 
51 protected:
52  void Compute();
54  unsigned long int m_n_entries;
55  double m_k_evt_weight;
56  double m_variance;
57  double m_variance_sys;
58  bool m_isComputed;
60 };
61 
62 #endif
APEvtWeight::GetWeightObjects
std::vector< APWeightEntry * > GetWeightObjects(ObjType type)
Returns the vector of weight objects for a specific object type.
Definition: APEvtWeight.cxx:251
APWeightEntry
Definition: APWeightEntry.h:25
APEvtWeight::m_type
ObjType m_type
Holds the object type of the event weight (muon, electron, jet or combined).
Definition: APEvtWeight.h:59
APEvtWeight::ObjType
ObjType
Definition: APEvtWeight.h:29
APEvtWeight::kMuonMO
@ kMuonMO
Definition: APEvtWeight.h:29
APEvtWeight::GetType
ObjType GetType()
Returns the type of the event weight (muon, electron, jet, ANDed, ORed).
Definition: APEvtWeight.cxx:263
APEvtWeight::kDiElectron
@ kDiElectron
Definition: APEvtWeight.h:29
APEvtWeight::GetVariance
double GetVariance()
Returns the variance.
Definition: APEvtWeight.cxx:235
APEvtWeight::kElectron
@ kElectron
Definition: APEvtWeight.h:29
APEvtWeight::kANDed
@ kANDed
Definition: APEvtWeight.h:29
APEvtWeight::kDiMuon
@ kDiMuon
Definition: APEvtWeight.h:29
APEvtWeight::GetStdDev
double GetStdDev()
Returns the standard deviation.
Definition: APEvtWeight.cxx:229
APEvtWeight::kMuon
@ kMuon
Definition: APEvtWeight.h:29
APEvtWeight::kDiJet
@ kDiJet
Definition: APEvtWeight.h:29
APEvtWeight::kTauMO
@ kTauMO
Definition: APEvtWeight.h:29
APEvtWeight::m_k_evt_weight
double m_k_evt_weight
Holds the event weight.
Definition: APEvtWeight.h:55
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
APEvtWeight::kElectronMO
@ kElectronMO
Definition: APEvtWeight.h:29
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
APEvtWeight
Definition: APEvtWeight.h:26
APEvtWeight::operator||
const friend APEvtWeight operator||(const APEvtWeight &a_in, const APEvtWeight &b_in)
Operator implementing logical OR.
Definition: APEvtWeight.cxx:128
APEvtWeight::m_variance_sys
double m_variance_sys
Holds the systematic variance (from systematics assigned to weights).
Definition: APEvtWeight.h:57
APEvtWeight::AddWeightToEvt
void AddWeightToEvt(APWeightEntry *weight)
Adds a weight to the sum of weights.
Definition: APEvtWeight.cxx:28
APEvtWeight::kJetMO
@ kJetMO
Definition: APEvtWeight.h:29
vector
Definition: MultiHisto.h:13
APEvtWeight::kORed
@ kORed
Definition: APEvtWeight.h:29
APEvtWeight::GetWeight
double GetWeight()
Returns the event weight.
Definition: APEvtWeight.cxx:223
APEvtWeight::operator!
const friend APEvtWeight operator!(const APEvtWeight &a_in)
Operator implementing negation of weight.
Definition: APEvtWeight.cxx:212
APEvtWeight::GetSysVariance
double GetSysVariance()
Returns the systematic variance (from systematics assigned to weights).
Definition: APEvtWeight.cxx:246
APEvtWeight::kJet
@ kJet
Definition: APEvtWeight.h:29
APEvtWeight::m_variance
double m_variance
Holds the variance.
Definition: APEvtWeight.h:56
APEvtWeight::kMOANDed
@ kMOANDed
Definition: APEvtWeight.h:29
APEvtWeight::GetSysUncert
double GetSysUncert()
Returns the systematic uncertainty (from systematics assigned to weights).
Definition: APEvtWeight.cxx:241
APEvtWeight::APEvtWeight
APEvtWeight(ObjType type)
Default constructor.
Definition: APEvtWeight.cxx:13
APEvtWeight::~APEvtWeight
virtual ~APEvtWeight()
Default destructor.
Definition: APEvtWeight.cxx:24
APEvtWeight::kMOORed
@ kMOORed
Definition: APEvtWeight.h:29
APEvtWeight::m_n_entries
unsigned long int m_n_entries
Holds the original amount of unweighted counts ("sum of 1's").
Definition: APEvtWeight.h:54
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
APEvtWeight::operator&&
const friend APEvtWeight operator&&(const APEvtWeight &a_in, const APEvtWeight &b_in)
Operator implementing logical AND.
Definition: APEvtWeight.cxx:42
APEvtWeight::m_current_evt_weights
ClassDef(APEvtWeight, 1) protected std::vector< std::vector< APWeightEntry * > > m_current_evt_weights
< Calculates the event weight for the current entries.
Definition: APEvtWeight.h:49
APEvtWeight::NEntries
unsigned long NEntries()
Returns the unweighted number of entries.
Definition: APEvtWeight.cxx:259
APEvtWeight::m_isComputed
bool m_isComputed
Flag if calculation has already been performed for current set of input weights.
Definition: APEvtWeight.h:58
APEvtWeight::kDiTau
@ kDiTau
Definition: APEvtWeight.h:29
APEvtWeight::kTau
@ kTau
Definition: APEvtWeight.h:29