ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
ReweightUtils
ReweightUtils
McEventWeight.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// Get the mcEventWeight with index #McEventWeightIndex from
8
// EventInfo
9
//
10
// Author: Olivier Arnaez <olivier.arnaez@cern.ch>
12
13
#ifndef MCEVENTWEIGHT_H
14
#define MCEVENTWEIGHT_H 1
15
16
// Include the base class
17
#include "
ReweightUtils/WeightToolBase.h
"
18
19
20
class
McEventWeight
:
public
WeightToolBase
21
{
23
ASG_TOOL_CLASS2
(
McEventWeight
,
IWeightTool
,
IObservableTool
)
24
25
public
:
27
McEventWeight
(
const
std::string& name );
28
30
virtual
~McEventWeight
() {};
31
33
virtual
double
evaluate
(
const
xAOD::IParticle
* part )
const override
;
34
36
virtual
double
getWeight
()
const override
;
37
38
39
private
:
40
//internal function "computing" the weight
41
double
computeWeight
(
const
xAOD::EventInfo
*)
const
;
42
43
unsigned
int
m_McEventWeightIndex
;
44
45
std::string
m_eventInfoName
;
46
bool
m_useTruthEvents
=
false
;
47
48
};
49
50
#endif
//> !MCEVENTWEIGHT_H
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition
AsgToolMacros.h:77
WeightToolBase.h
IObservableTool
Interface for tools that want to calculate a quantity from an xAOD::IParticle.
Definition
IObservableTool.h:32
IWeightTool
Interface for tools that want to calculate a weight from different event information.
Definition
IWeightTool.h:21
McEventWeight::m_eventInfoName
std::string m_eventInfoName
Definition
McEventWeight.h:45
McEventWeight::evaluate
virtual double evaluate(const xAOD::IParticle *part) const override
returns: the value that was calculated from the xAOD::IParticle (composite built event object for ins...
Definition
McEventWeight.cxx:24
McEventWeight::m_McEventWeightIndex
unsigned int m_McEventWeightIndex
Definition
McEventWeight.h:43
McEventWeight::getWeight
virtual double getWeight() const override
returns: the value that was calculated from the usual Athena storegate
Definition
McEventWeight.cxx:66
McEventWeight::computeWeight
double computeWeight(const xAOD::EventInfo *) const
Definition
McEventWeight.cxx:32
McEventWeight::McEventWeight
McEventWeight(const std::string &name)
Create a proper constructor for Athena.
Definition
McEventWeight.cxx:12
McEventWeight::~McEventWeight
virtual ~McEventWeight()
Default destructor.
Definition
McEventWeight.h:30
McEventWeight::m_useTruthEvents
bool m_useTruthEvents
Definition
McEventWeight.h:46
WeightToolBase::WeightToolBase
WeightToolBase(const std::string &name)
Create a proper constructor for Athena.
Definition
WeightToolBase.cxx:14
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:18
Generated on
for ATLAS Offline Software by
1.14.0