EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
FakeRatePlotTool.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FakeRatePlotTool.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/EventData/TrackParameters.hpp
"
12
#include "
Acts/Utilities/Logger.hpp
"
13
#include "
ActsExamples/Utilities/Helpers.hpp
"
14
#include "
ActsFatras/EventData/Particle.hpp
"
15
16
#include <map>
17
#include <memory>
18
#include <string>
19
20
namespace
ActsExamples {
21
22
// Tools to make fake rate plots to show tracking fake rate.
23
//
24
// The fake rate is investigated for all reco tracks. A track is 'fake' if it's
25
// not matched with truth.
26
class
FakeRatePlotTool
{
27
public
:
29
struct
Config
{
30
std::map<std::string, PlotHelpers::Binning>
varBinning
= {
31
{
"Eta"
,
PlotHelpers::Binning
(
"#eta"
, 40, -4, 4)},
32
{
"Phi"
,
PlotHelpers::Binning
(
"#phi"
, 100, -3.15, 3.15)},
33
{
"Pt"
,
PlotHelpers::Binning
(
"pT [GeV/c]"
, 40, 0, 100)},
34
{
"Num"
,
PlotHelpers::Binning
(
"N"
, 30, -0.5, 29.5)}};
35
};
36
38
struct
FakeRatePlotCache
{
39
TH2F*
nReco_vs_pT
;
40
TH2F*
nTruthMatched_vs_pT
;
41
42
TH2F*
nFake_vs_pT
;
43
44
TH2F*
nReco_vs_eta
;
45
TH2F*
nTruthMatched_vs_eta
;
46
47
TH2F*
nFake_vs_eta
;
48
49
TEfficiency*
fakeRate_vs_pT
;
50
TEfficiency*
fakeRate_vs_eta
;
51
TEfficiency*
fakeRate_vs_phi
;
52
};
53
58
FakeRatePlotTool
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
59
63
void
book
(
FakeRatePlotCache
& fakeRatePlotCache)
const
;
64
70
void
fill
(
FakeRatePlotCache
& fakeRatePlotCache,
71
const
Acts::BoundTrackParameters
& fittedParameters,
72
bool
status)
const
;
73
81
void
fill
(
FakeRatePlotCache
& fakeRatePlotCache,
82
const
ActsFatras::Particle
& truthParticle,
83
size_t
nTruthMatchedTracks,
size_t
nFakeTracks)
const
;
84
88
void
write
(
const
FakeRatePlotCache
& fakeRatePlotCache)
const
;
89
93
void
clear
(
FakeRatePlotCache
& fakeRatePlotCache)
const
;
94
95
private
:
96
Config
m_cfg
;
97
std::unique_ptr<const Acts::Logger>
m_logger
;
98
100
const
Acts::Logger
&
logger
()
const
{
return
*
m_logger
; }
101
};
102
103
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Framework
include
ActsExamples
Validation
FakeRatePlotTool.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:25
using
1.8.2 with
EIC GitHub integration