ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ReweightUtils
ReweightUtils
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
17
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
:
29
enum
ObjType
{
kMuon
,
kTau
,
kElectron
,
kJet
,
kMuonMO
,
kTauMO
,
kElectronMO
,
kJetMO
,
kDiMuon
,
kDiTau
,
kDiElectron
,
kDiJet
,
kANDed
,
kORed
,
kMOORed
,
kMOANDed
};
30
31
APEvtWeight
(
ObjType
type
);
32
virtual
~APEvtWeight
();
33
void
AddWeightToEvt
(
APWeightEntry
* weight);
34
35
double
GetWeight
();
36
double
GetStdDev
();
37
double
GetVariance
();
38
double
GetSysUncert
();
39
double
GetSysVariance
();
40
41
std::vector< APWeightEntry* >
GetWeightObjects
(
ObjType
type
);
42
unsigned
long
NEntries
();
43
ObjType
GetType
();
44
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);
48
49
ClassDef(
APEvtWeight
,1)
50
51
protected
:
52
void
Compute();
53
std
::
vector
<
std
::
vector
<
APWeightEntry
* > >
m_current_evt_weights
;
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
;
59
ObjType
m_type
;
60
};
61
62
#endif
operator!
bool operator!() const
Test to see if the link can not be dereferenced.
APEvtWeight
Class to calculate the sum of weights ("weighted counter").
Definition
APEvtWeight.h:26
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::GetVariance
double GetVariance()
Returns the variance.
Definition
APEvtWeight.cxx:235
APEvtWeight::GetStdDev
double GetStdDev()
Returns the standard deviation.
Definition
APEvtWeight.cxx:229
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
APEvtWeight::GetType
ObjType GetType()
Returns the type of the event weight (muon, electron, jet, ANDed, ORed).
Definition
APEvtWeight.cxx:263
APEvtWeight::APEvtWeight
APEvtWeight(ObjType type)
Default constructor.
Definition
APEvtWeight.cxx:13
APEvtWeight::GetSysUncert
double GetSysUncert()
Returns the systematic uncertainty (from systematics assigned to weights).
Definition
APEvtWeight.cxx:241
APEvtWeight::~APEvtWeight
virtual ~APEvtWeight()
Default destructor.
Definition
APEvtWeight.cxx:24
APEvtWeight::operator||
const friend APEvtWeight operator||(const APEvtWeight &a_in, const APEvtWeight &b_in)
Operator implementing logical OR.
Definition
APEvtWeight.cxx:128
APEvtWeight::m_isComputed
bool m_isComputed
Flag if calculation has already been performed for current set of input weights.
Definition
APEvtWeight.h:58
APEvtWeight::AddWeightToEvt
void AddWeightToEvt(APWeightEntry *weight)
Adds a weight to the sum of weights.
Definition
APEvtWeight.cxx:28
APEvtWeight::m_variance
double m_variance
Holds the variance.
Definition
APEvtWeight.h:56
APEvtWeight::ObjType
ObjType
Definition
APEvtWeight.h:29
APEvtWeight::kMuonMO
@ kMuonMO
Definition
APEvtWeight.h:29
APEvtWeight::kMOANDed
@ kMOANDed
Definition
APEvtWeight.h:29
APEvtWeight::kElectron
@ kElectron
Definition
APEvtWeight.h:29
APEvtWeight::kJetMO
@ kJetMO
Definition
APEvtWeight.h:29
APEvtWeight::kANDed
@ kANDed
Definition
APEvtWeight.h:29
APEvtWeight::kJet
@ kJet
Definition
APEvtWeight.h:29
APEvtWeight::kDiMuon
@ kDiMuon
Definition
APEvtWeight.h:29
APEvtWeight::kMuon
@ kMuon
Definition
APEvtWeight.h:29
APEvtWeight::kTauMO
@ kTauMO
Definition
APEvtWeight.h:29
APEvtWeight::kTau
@ kTau
Definition
APEvtWeight.h:29
APEvtWeight::kElectronMO
@ kElectronMO
Definition
APEvtWeight.h:29
APEvtWeight::kDiTau
@ kDiTau
Definition
APEvtWeight.h:29
APEvtWeight::kORed
@ kORed
Definition
APEvtWeight.h:29
APEvtWeight::kDiElectron
@ kDiElectron
Definition
APEvtWeight.h:29
APEvtWeight::kMOORed
@ kMOORed
Definition
APEvtWeight.h:29
APEvtWeight::kDiJet
@ kDiJet
Definition
APEvtWeight.h:29
APEvtWeight::m_k_evt_weight
double m_k_evt_weight
Holds the event weight.
Definition
APEvtWeight.h:55
APEvtWeight::NEntries
unsigned long NEntries()
Returns the unweighted number of entries.
Definition
APEvtWeight.cxx:259
APEvtWeight::GetWeight
double GetWeight()
Returns the event weight.
Definition
APEvtWeight.cxx:223
APEvtWeight::operator&&
const friend APEvtWeight operator&&(const APEvtWeight &a_in, const APEvtWeight &b_in)
Operator implementing logical AND.
Definition
APEvtWeight.cxx:42
APEvtWeight::m_type
ObjType m_type
Holds the object type of the event weight (muon, electron, jet or combined).
Definition
APEvtWeight.h:59
APEvtWeight::GetWeightObjects
std::vector< APWeightEntry * > GetWeightObjects(ObjType type)
Returns the vector of weight objects for a specific object type.
Definition
APEvtWeight.cxx:251
APEvtWeight::m_variance_sys
double m_variance_sys
Holds the systematic variance (from systematics assigned to weights).
Definition
APEvtWeight.h:57
APEvtWeight::GetSysVariance
double GetSysVariance()
Returns the systematic variance (from systematics assigned to weights).
Definition
APEvtWeight.cxx:246
APWeightEntry
Class to store a single weight entry (one bin).
Definition
APWeightEntry.h:25
vector
Definition
MultiHisto.h:13
std
STL namespace.
type
protected
#define protected
Definition
testRead.cxx:26
Generated on
for ATLAS Offline Software by
1.17.0