AsgClassificationDecorationAlg.h 1.63 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
/*
  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/

/// @author Tadej Novak <tadej@cern.ch>

#ifndef ASG_ANALYSIS_ALGORITHMS__ASG_CLASSIFICATION_DECORATION_ALG_H
#define ASG_ANALYSIS_ALGORITHMS__ASG_CLASSIFICATION_DECORATION_ALG_H

#include <AnaAlgorithm/AnaAlgorithm.h>
#include <SystematicsHandles/SysListHandle.h>
12
#include <SystematicsHandles/SysReadHandle.h>
13
14
15
16
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
46
47
48
#include <xAODBase/IParticle.h>
#include <xAODBase/IParticleContainer.h>

#include <AsgAnalysisInterfaces/IClassificationTool.h>


namespace CP
{

/// \brief an algorithm for decorating classification using a tool based
/// on the \ref CP::IClassificationTool
class AsgClassificationDecorationAlg final : public EL::AnaAlgorithm
{
  /// \brief the standard constructor
public:
  AsgClassificationDecorationAlg(const std::string& name, 
                                 ISvcLocator* pSvcLocator);


public:
  virtual StatusCode initialize() override;

public:
  virtual StatusCode execute() override;


  /// \brief truth classifier tool handle
private:
    ToolHandle<IClassificationTool> m_tool;

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

  /// \brief particles container handle
private:
49
  CP::SysReadHandle<xAOD::IParticleContainer> m_particlesHandle {
50
51
52
53
54
55
56
57
    this, "particles", "", "the container to use"};

  /// \brief the decoration for the truth classification
private:
  std::string m_classificationDecoration {};

  /// \brief the accessor for \ref m_truthClassificationDecoration
private:
58
  std::unique_ptr<const SG::AuxElement::Decorator<unsigned int> > m_classificationDecorator {};
59
60
61
62
63
};

} // namespace CP

#endif