ATLAS Offline Software
Loading...
Searching...
No Matches
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
18
19
21 {
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
44
45 std::string m_eventInfoName;
46 bool m_useTruthEvents = false;
47
48};
49
50#endif //> !MCEVENTWEIGHT_H
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Interface for tools that want to calculate a quantity from an xAOD::IParticle.
Interface for tools that want to calculate a weight from different event information.
Definition IWeightTool.h:21
std::string m_eventInfoName
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...
unsigned int m_McEventWeightIndex
virtual double getWeight() const override
returns: the value that was calculated from the usual Athena storegate
double computeWeight(const xAOD::EventInfo *) const
McEventWeight(const std::string &name)
Create a proper constructor for Athena.
virtual ~McEventWeight()
Default destructor.
WeightToolBase(const std::string &name)
Create a proper constructor for Athena.
Class providing the definition of the 4-vector interface.
EventInfo_v1 EventInfo
Definition of the latest event info version.