ATLAS Offline Software
McEventWeight.h
Go to the documentation of this file.
1 
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 
43  unsigned int m_McEventWeightIndex;
44 
45  std::string m_eventInfoName;
46  bool m_useTruthEvents = false;
47 
48 };
49 
50 #endif //> !MCEVENTWEIGHT_H
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
WeightToolBase.h
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
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
IObservableTool
Interface for tools that want to calculate a quantity from an xAOD::IParticle.
Definition: IObservableTool.h:32
McEventWeight::computeWeight
double computeWeight(const xAOD::EventInfo *) const
Definition: McEventWeight.cxx:32
McEventWeight
Definition: McEventWeight.h:21
McEventWeight::~McEventWeight
virtual ~McEventWeight()
Default destructor.
Definition: McEventWeight.h:30
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
McEventWeight::m_eventInfoName
std::string m_eventInfoName
Definition: McEventWeight.h:45
McEventWeight::McEventWeight
McEventWeight(const std::string &name)
Create a proper constructor for Athena.
Definition: McEventWeight.cxx:12
IWeightTool
Interface for tools that want to calculate a weight from different event information.
Definition: IWeightTool.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
McEventWeight::m_useTruthEvents
bool m_useTruthEvents
Definition: McEventWeight.h:46
WeightToolBase
Definition: WeightToolBase.h:29
McEventWeight::getWeight
virtual double getWeight() const override
returns: the value that was calculated from the usual Athena storegate
Definition: McEventWeight.cxx:66
McEventWeight::m_McEventWeightIndex
unsigned int m_McEventWeightIndex
Definition: McEventWeight.h:43