AsgEventScaleFactorAlg.h 2.38 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/

/// @author Tadej Novak


#ifndef ASG_ANALYSIS_ALGORITHMS__ASG_EVENT_SCALE_FACTOR_ALG_H
#define ASG_ANALYSIS_ALGORITHMS__ASG_EVENT_SCALE_FACTOR_ALG_H

#include <AnaAlgorithm/AnaAlgorithm.h>
#include <SelectionHelpers/ISelectionAccessor.h>
#include <SelectionHelpers/SelectionReadHandle.h>
14
#include <SystematicsHandles/SysReadHandle.h>
15
16
#include <SystematicsHandles/SysReadDecorHandle.h>
#include <SystematicsHandles/SysWriteDecorHandle.h>
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <SystematicsHandles/SysListHandle.h>
#include <xAODBase/IParticleContainer.h>
#include <xAODEventInfo/EventInfo.h>

namespace CP
{
  /// \brief an algorithm for calculating per-event scale factors

  class AsgEventScaleFactorAlg final : public EL::AnaAlgorithm
  {
    /// \brief the standard constructor
  public:
    AsgEventScaleFactorAlg (const std::string& name, 
                            ISvcLocator* pSvcLocator);


  public:
    StatusCode initialize () override;

  public:
    StatusCode execute () override;


    /// \brief the systematics list we run
  private:
    SysListHandle m_systematicsList {this};

    /// \brief the event info we run on (empty by default)
  private:
46
    SysReadHandle<xAOD::EventInfo> m_eventInfoHandle {
47
48
49
50
      this, "eventInfo", "EventInfo", "the event info object to run on"};

    /// \brief the jet collection we run on
  private:
51
    SysReadHandle<xAOD::IParticleContainer> m_particleHandle {
52
53
54
55
56
57
58
      this, "particles", "", "the particle collection to run on"};

    /// \brief the preselection we apply to our input
  private:
    SelectionReadHandle m_preselection {
      this, "preselection", "", "the preselection to apply"};

59
60
61
62
63
    /// \brief the decoration for reading systematically aware preselection
  private:
    SysReadDecorHandle<char> m_inputSelectionDecoration {
      this, "inputSelectionDecoration", "", "the decoration for the input selection flag"};

64
65
    /// \brief the decoration for reading the scale factor
  private:
66
    SysReadDecorHandle<float> m_scaleFactorInputDecoration {
67
68
69
70
      this, "scaleFactorInputDecoration", "", "the decoration for the input efficiency scale factor"};

    /// \brief the decoration for writing the scale factor
  private:
71
    SysWriteDecorHandle<float> m_scaleFactorOutputDecoration {
72
73
74
75
76
      this, "scaleFactorOutputDecoration", "", "the decoration for the output efficiency scale factor"};
  };
}

#endif