ATLAS Offline Software
KinematicHistAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 #ifndef ASG_ANALYSIS_ALGORITHMS__KINEMATIC_HIST_ALG_H
9 #define ASG_ANALYSIS_ALGORITHMS__KINEMATIC_HIST_ALG_H
10 
17 
18 namespace CP
19 {
25 
26  class KinematicHistAlg final : public EL::AnaAlgorithm
27  {
29  public:
31  StatusCode initialize () override;
32  StatusCode execute () override;
33 
34 
36  private:
38 
40  private:
42  this, "input", "", "the input collection to run on"};
43 
45  private:
47  this, "preselection", "", "the preselection to apply"};
48 
50  private:
51  Gaudi::Property<std::string> m_histPattern {this, "histPattern", "%VAR%_%SYS%", "the pattern for histogram names"};
52 
53 
55  private:
56  struct HistSubgroup
57  {
58  TH1 *pt = nullptr;
59  TH1 *eta = nullptr;
60  TH1 *phi = nullptr;
61  };
62 
63 
65  private:
66  struct HistGroup
67  {
68  TH1 *multiplicity = nullptr;
69  std::vector<HistSubgroup> perObject;
70  };
71 
73  private:
74  std::unordered_map<CP::SystematicSet,HistGroup> m_hist;
75  };
76 }
77 
78 #endif
CP::KinematicHistAlg::initialize
StatusCode initialize() override
Definition: KinematicHistAlg.cxx:25
CP::KinematicHistAlg::m_inputHandle
SysReadHandle< xAOD::IParticleContainer > m_inputHandle
the jet collection we run on
Definition: KinematicHistAlg.h:41
CP::KinematicHistAlg::m_preselection
SysReadSelectionHandle m_preselection
the preselection we apply to our input
Definition: KinematicHistAlg.h:46
PropertyWrapper.h
CP::SysListHandle
a class managing the property to configure the list of systematics to process
Definition: SysListHandle.h:33
CP::KinematicHistAlg::m_systematicsList
SysListHandle m_systematicsList
the systematics list we run
Definition: KinematicHistAlg.h:37
CP::KinematicHistAlg::HistSubgroup::pt
TH1 * pt
Definition: KinematicHistAlg.h:58
SysListHandle.h
CP::KinematicHistAlg::HistGroup::multiplicity
TH1 * multiplicity
Definition: KinematicHistAlg.h:68
CP::SysReadHandle
a data handle for reading systematics varied input data
Definition: SysReadHandle.h:32
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
EL::AnaAlgorithm::AnaAlgorithm
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Definition: AnaAlgorithm.cxx:40
CP::KinematicHistAlg::m_hist
std::unordered_map< CP::SystematicSet, HistGroup > m_hist
the created histograms
Definition: KinematicHistAlg.h:74
SysReadHandle.h
CP::KinematicHistAlg
an algorithm for dumping the kinematics of an IParticle container into histograms
Definition: KinematicHistAlg.h:27
CP::KinematicHistAlg::HistGroup::perObject
std::vector< HistSubgroup > perObject
Definition: KinematicHistAlg.h:69
AnaAlgorithm.h
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition: AnaAlgorithm.h:73
CP::KinematicHistAlg::HistSubgroup::phi
TH1 * phi
Definition: KinematicHistAlg.h:60
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IParticleContainer.h
CP::KinematicHistAlg::HistSubgroup::eta
TH1 * eta
Definition: KinematicHistAlg.h:59
CP::KinematicHistAlg::m_histPattern
Gaudi::Property< std::string > m_histPattern
the pattern for histogram names
Definition: KinematicHistAlg.h:51
SysReadSelectionHandle.h
CP::KinematicHistAlg::HistSubgroup
the histograms we fill per systematic and object
Definition: KinematicHistAlg.h:57
CP::SysReadSelectionHandle
a data handle for reading systematically varied selection properties from objects
Definition: SysReadSelectionHandle.h:32
CP::KinematicHistAlg::HistGroup
the histograms we fill per systematic
Definition: KinematicHistAlg.h:67
CP::KinematicHistAlg::execute
StatusCode execute() override
Definition: KinematicHistAlg.cxx:36