ATLAS Offline Software
PhysValSecVtx.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 //
3 // Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4 //
5 #ifndef INDETSECVERTEXVALIDATION_PHYSVALSECVTX_H
6 #define INDETSECVERTEXVALIDATION_PHYSVALSECVTX_H
7 
8 // STL includes
9 #include <memory>
10 #include <string>
11 #include <vector>
12 
18 
20  : public ManagedMonitorToolBase
21 {
22 
23  public:
24  PhysValSecVtx(const std::string& type,
25  const std::string& name,
26  const IInterface* parent);
27  virtual ~PhysValSecVtx() = default;
28 
29  virtual StatusCode initialize() override;
30  virtual StatusCode bookHistograms() override;
31  virtual StatusCode fillHistograms() override;
32  virtual StatusCode procHistograms() override;
33 
34  private:
35  SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey {this, "EventInfo", "EventInfo",
36  "Event info key"};
37 
39  "VrtSecInclusive_SecondaryVertices", "Key of input vertices"};
40 
41  //Histograms
42  std::unique_ptr<SecVtxValidationPlots> m_secVtxValidationPlots;
43 
44  template<typename external_collection_t>
45  StatusCode bookCollection(external_collection_t*);
46 
47 };
48 
49 template<typename external_collection_t>
50  StatusCode PhysValSecVtx::bookCollection(external_collection_t* plot_collection)
51  {
52  std::vector<HistData> hists = plot_collection->retrieveBookedHistograms();
53  for (auto& [histo, directory] : hists) {
54  ATH_MSG_DEBUG ("Initializing " << histo << " " << histo->GetName() << " " << directory << "...");
56  }
57  plot_collection->initialize();
58  return StatusCode::SUCCESS;
59  }
60 
61 #endif //> !INDETSECVERTEXVALIDATION_PHYSVALSECVTX_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
PhysValSecVtx::bookHistograms
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
Definition: PhysValSecVtx.cxx:32
PhysValSecVtx::initialize
virtual StatusCode initialize() override
Definition: PhysValSecVtx.cxx:13
PhysValSecVtx::~PhysValSecVtx
virtual ~PhysValSecVtx()=default
PhysValSecVtx::fillHistograms
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
Definition: PhysValSecVtx.cxx:39
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
PhysValSecVtx::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: PhysValSecVtx.h:35
SG::ReadHandleKey< xAOD::EventInfo >
PhysValSecVtx::bookCollection
StatusCode bookCollection(external_collection_t *)
Definition: PhysValSecVtx.h:50
ManagedMonitorToolBase.h
DeMoScan.directory
string directory
Definition: DeMoScan.py:80
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MakeTH3DFromTH2Ds.hists
hists
Definition: MakeTH3DFromTH2Ds.py:72
PhysValSecVtx
Definition: PhysValSecVtx.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PhysValSecVtx::m_secVtxValidationPlots
std::unique_ptr< SecVtxValidationPlots > m_secVtxValidationPlots
Definition: PhysValSecVtx.h:42
EventInfo.h
VertexContainer.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SecVtxValidationPlots.h
ManagedMonitorToolBase::all
@ all
Definition: ManagedMonitorToolBase.h:116
PhysValSecVtx::PhysValSecVtx
PhysValSecVtx(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PhysValSecVtx.cxx:7
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
PhysValSecVtx::m_vertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Definition: PhysValSecVtx.h:38
PhysValSecVtx::procHistograms
virtual StatusCode procHistograms() override
An inheriting class should either override this function or finalHists().
Definition: PhysValSecVtx.cxx:60
ManagedMonitorToolBase::regHist
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:1454