ATLAS Offline Software
WeightsAgregator.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // Computes the product (multiplication) of the weights provided by
8 // different IWeightTools
9 //
10 // Author: Olivier Arnaez <olivier.arnaez@cern.ch>
12 
13 #ifndef WEIGHTSAGREGATOR_H
14 #define WEIGHTSAGREGATOR_H 1
15 
16 // Include the base class
17 #include "AsgTools/ToolHandle.h"
21 
22 
24  {
27 
28  public:
30  WeightsAgregator( const std::string& name );
31 
33  virtual ~WeightsAgregator() {};
34 
36  virtual StatusCode initialize() override;
37 
39  virtual double evaluate( const xAOD::IParticle* part ) const override;
40 
42  virtual double getWeight() const override;
43 
44 
45  private:
47  std::string m_eventInfoName;
48 
50  ToolHandleArray< IWeightTool > m_toolArray;
51 
52  };
53 
54 #endif //> !WEIGHTSAGREGATOR_H
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
WeightToolBase.h
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
IObservableTool
Interface for tools that want to calculate a quantity from an xAOD::IParticle.
Definition: IObservableTool.h:32
WeightsAgregator::getWeight
virtual double getWeight() const override
returns: the value that was calculated from the usual Athena storegate
Definition: WeightsAgregator.cxx:50
WeightsAgregator::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: WeightsAgregator.cxx:33
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
ToolHandleArray.h
WeightsAgregator::m_eventInfoName
std::string m_eventInfoName
Name of the xAOD::EventInfo object.
Definition: WeightsAgregator.h:47
IWeightTool
Interface for tools that want to calculate a weight from different event information.
Definition: IWeightTool.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
WeightsAgregator::initialize
virtual StatusCode initialize() override
Usual initialize method of the framework.
Definition: WeightsAgregator.cxx:20
WeightsAgregator::WeightsAgregator
WeightsAgregator(const std::string &name)
Create a proper constructor for Athena.
Definition: WeightsAgregator.cxx:11
WeightsAgregator::~WeightsAgregator
virtual ~WeightsAgregator()
Default destructor.
Definition: WeightsAgregator.h:33
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
WeightsAgregator
Definition: WeightsAgregator.h:24
IWeightTool.h
WeightToolBase
Definition: WeightToolBase.h:29
ToolHandle.h
WeightsAgregator::m_toolArray
ToolHandleArray< IWeightTool > m_toolArray
Array of ingredient weight tools.
Definition: WeightsAgregator.h:50