ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetValidation
InDetSecVertexValidation
src
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
13
#include "
AthenaMonitoring/ManagedMonitorToolBase.h
"
14
#include "
xAODEventInfo/EventInfo.h
"
15
#include "
StoreGate/ReadHandleKey.h
"
16
#include "
xAODTracking/VertexContainer.h
"
17
#include "
src/SecVtxValidationPlots.h
"
18
19
class
PhysValSecVtx
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
(
const
EventContext& ctx)
override
;
32
virtual
StatusCode
procHistograms
()
override
;
33
34
private
:
35
SG::ReadHandleKey< xAOD::EventInfo >
m_eventInfoKey
{
this
,
"EventInfo"
,
"EventInfo"
,
36
"Event info key"
};
37
38
SG::ReadHandleKey< xAOD::VertexContainer >
m_vertexContainerKey
{
this
,
"VertexContainerKey"
,
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 <<
"..."
);
55
ATH_CHECK
(
regHist
(histo, directory,
all
));
56
}
57
plot_collection->initialize();
58
return
StatusCode::SUCCESS;
59
}
60
61
#endif
//> !INDETSECVERTEXVALIDATION_PHYSVALSECVTX_H
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ManagedMonitorToolBase.h
SecVtxValidationPlots.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
VertexContainer.h
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:1345
ManagedMonitorToolBase::all
@ all
Definition
ManagedMonitorToolBase.h:116
ManagedMonitorToolBase::ManagedMonitorToolBase
ManagedMonitorToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
ManagedMonitorToolBase.cxx:339
PhysValSecVtx::PhysValSecVtx
PhysValSecVtx(const std::string &type, const std::string &name, const IInterface *parent)
Definition
PhysValSecVtx.cxx:7
PhysValSecVtx::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition
PhysValSecVtx.h:35
PhysValSecVtx::m_vertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainerKey
Definition
PhysValSecVtx.h:38
PhysValSecVtx::m_secVtxValidationPlots
std::unique_ptr< SecVtxValidationPlots > m_secVtxValidationPlots
Definition
PhysValSecVtx.h:42
PhysValSecVtx::bookHistograms
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
Definition
PhysValSecVtx.cxx:32
PhysValSecVtx::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) override
An inheriting class should either override this function or fillHists().
Definition
PhysValSecVtx.cxx:39
PhysValSecVtx::bookCollection
StatusCode bookCollection(external_collection_t *)
Definition
PhysValSecVtx.h:50
PhysValSecVtx::initialize
virtual StatusCode initialize() override
Definition
PhysValSecVtx.cxx:13
PhysValSecVtx::procHistograms
virtual StatusCode procHistograms() override
An inheriting class should either override this function or finalHists().
Definition
PhysValSecVtx.cxx:58
PhysValSecVtx::~PhysValSecVtx
virtual ~PhysValSecVtx()=default
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
type
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0