ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetValidation
InDetPhysValMonitoring
src
InDetPerfPlot_FakeRate.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetPerfPlot_FakeRate.h
"
6
// #include "TrkValHistUtils/EfficiencyPurityCalculator.h"
7
#include "
xAODTruth/TruthParticle.h
"
8
#include "
xAODTruth/TruthVertex.h
"
9
#include "
InDetPhysValMonitoringUtilities.h
"
10
#include <cmath>
11
#include <regex>
12
13
using namespace
IDPVM
;
14
15
InDetPerfPlot_FakeRate::InDetPerfPlot_FakeRate
(
InDetPlotBase
* pParent,
const
std::string& sDir) :
16
InDetPlotBase
(pParent, sDir),
17
m_fakerate_vs_eta
{},
18
m_fakerate_vs_pt
{},
19
m_fakerate_vs_lowpt
{},
20
m_fakerate_vs_phi
{},
21
m_fakerate_vs_d0
{},
22
m_fakerate_vs_z0
{},
23
m_fakerate_vs_mu
{} {
24
// nop
25
}
26
27
void
28
InDetPerfPlot_FakeRate::initializePlots
() {
29
book
(
m_fakerate_vs_eta
,
"fakerate_vs_eta"
,
"fakerate_vs_eta"
);
30
book
(
m_fakerate_vs_pt
,
"fakerate_vs_pt"
,
"fakerate_vs_pt"
);
31
book
(
m_fakerate_vs_lowpt
,
"fakerate_vs_lowpt"
,
"fakerate_vs_lowpt"
);
32
book
(
m_fakerate_vs_phi
,
"fakerate_vs_phi"
,
"fakerate_vs_phi"
);
33
book
(
m_fakerate_vs_d0
,
"fakerate_vs_d0"
,
"fakerate_vs_d0"
);
34
book
(
m_fakerate_vs_z0
,
"fakerate_vs_z0"
,
"fakerate_vs_z0"
);
35
book
(
m_fakerate_vs_mu
,
"fakerate_vs_mu"
,
"fakerate_vs_mu"
);
36
}
37
38
void
39
InDetPerfPlot_FakeRate::fill
(
const
xAOD::TrackParticle
& track,
const
bool
isFake,
float
weight,
float
mu) {
40
41
double
eta
= track.eta();
42
double
pt = track.pt() / Gaudi::Units::GeV;
// convert MeV to GeV
43
double
phi
= track.phi();
44
double
d0 = track.d0();
45
double
z0 = track.z0();
46
47
fillHisto
(
m_fakerate_vs_eta
,
eta
, isFake, weight);
48
fillHisto
(
m_fakerate_vs_pt
, pt, isFake, weight);
49
fillHisto
(
m_fakerate_vs_lowpt
, pt, isFake, weight);
50
fillHisto
(
m_fakerate_vs_phi
,
phi
, isFake, weight);
51
fillHisto
(
m_fakerate_vs_d0
, d0, isFake, weight);
52
fillHisto
(
m_fakerate_vs_z0
, z0, isFake, weight);
53
fillHisto
(
m_fakerate_vs_mu
, mu, isFake, weight);
54
}
55
56
void
57
InDetPerfPlot_FakeRate::finalizePlots
() {
58
59
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
TruthParticle.h
InDetPerfPlot_FakeRate.h
InDetPhysValMonitoringUtilities.h
TruthVertex.h
InDetPerfPlot_FakeRate::InDetPerfPlot_FakeRate
InDetPerfPlot_FakeRate(InDetPlotBase *pParent, const std::string &dirName)
Definition
InDetPerfPlot_FakeRate.cxx:15
InDetPerfPlot_FakeRate::initializePlots
void initializePlots()
Definition
InDetPerfPlot_FakeRate.cxx:28
InDetPerfPlot_FakeRate::m_fakerate_vs_pt
TEfficiency * m_fakerate_vs_pt
Definition
InDetPerfPlot_FakeRate.h:35
InDetPerfPlot_FakeRate::m_fakerate_vs_d0
TEfficiency * m_fakerate_vs_d0
Definition
InDetPerfPlot_FakeRate.h:38
InDetPerfPlot_FakeRate::m_fakerate_vs_mu
TEfficiency * m_fakerate_vs_mu
Definition
InDetPerfPlot_FakeRate.h:40
InDetPerfPlot_FakeRate::m_fakerate_vs_lowpt
TEfficiency * m_fakerate_vs_lowpt
Definition
InDetPerfPlot_FakeRate.h:36
InDetPerfPlot_FakeRate::m_fakerate_vs_eta
TEfficiency * m_fakerate_vs_eta
Definition
InDetPerfPlot_FakeRate.h:34
InDetPerfPlot_FakeRate::fill
void fill(const xAOD::TrackParticle &track, const bool isFake, float weight, float mu)
Definition
InDetPerfPlot_FakeRate.cxx:39
InDetPerfPlot_FakeRate::m_fakerate_vs_phi
TEfficiency * m_fakerate_vs_phi
Definition
InDetPerfPlot_FakeRate.h:37
InDetPerfPlot_FakeRate::m_fakerate_vs_z0
TEfficiency * m_fakerate_vs_z0
Definition
InDetPerfPlot_FakeRate.h:39
InDetPerfPlot_FakeRate::finalizePlots
void finalizePlots()
Definition
InDetPerfPlot_FakeRate.cxx:57
InDetPlotBase::fillHisto
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
Definition
InDetPlotBase.cxx:82
InDetPlotBase::InDetPlotBase
InDetPlotBase(InDetPlotBase *pParent, const std::string &dirName)
Constructor taking parent node and directory name for plots.
Definition
InDetPlotBase.cxx:35
InDetPlotBase::book
void book(Htype *&pHisto, std::string_view histoIdentifier, std::string_view nameOverride="", std::string_view folder="default")
Helper method to book histograms using an identifier string.
IDPVM
Class to retrieve associated truth from a track, implementing a cached response.
Definition
InDetPhysValMonitoringTool.h:56
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition
Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
Generated on
for ATLAS Offline Software by
1.17.0