ECCE @ EIC Software
Reference for
ECCE @ 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 <map>
12
#include <memory>
13
#include <string>
14
15
#include "
ACTFW/Utilities/Helpers.hpp
"
16
#include "
Acts/Utilities/Logger.hpp
"
17
#include "
ActsFatras/EventData/Particle.hpp
"
18
19
namespace
FW {
20
21
// Tools to make fake rate plots to show tracking fake rate.
22
class
FakeRatePlotTool
{
23
public
:
25
struct
Config
{
26
std::map<std::string, PlotHelpers::Binning>
varBinning
= {
27
{
"Eta"
,
PlotHelpers::Binning
(
"#eta"
, 40, -4, 4)},
28
{
"Phi"
,
PlotHelpers::Binning
(
"#phi"
, 100, -3.15, 3.15)},
29
{
"Pt"
,
PlotHelpers::Binning
(
"pT [GeV/c]"
, 20, 0, 100)},
30
{
"Num"
,
PlotHelpers::Binning
(
"N"
, 30, -0.5, 29.5)}};
31
};
32
34
struct
FakeRatePlotCache
{
35
TH1F*
nRecoTracks
;
36
TH1F*
nTruthMatchedTracks
;
37
TH1F*
nFakeTracks
;
38
TEfficiency*
fakerate_vs_eta
;
39
TEfficiency*
fakerate_vs_phi
;
40
TEfficiency*
fakerate_vs_pT
;
41
//@Todo: make duplication number plots with duplication plot tool
42
TProfile*
duplicationNum_vs_eta
;
43
TProfile*
duplicationNum_vs_phi
;
44
TProfile*
duplicationNum_vs_pT
;
45
};
46
51
FakeRatePlotTool
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
52
55
void
book
(
FakeRatePlotCache
& fakeRatePlotCache)
const
;
56
62
void
fill
(
FakeRatePlotCache
& fakeRatePlotCache,
63
const
ActsFatras::Particle
& truthParticle,
bool
status)
const
;
64
72
void
fill
(
FakeRatePlotCache
& fakeRatePlotCache,
73
const
ActsFatras::Particle
& truthParticle,
74
size_t
nTruthMatchedTracks,
size_t
nFakeTracks)
const
;
75
78
void
write
(
const
FakeRatePlotCache
& fakeRatePlotCache)
const
;
79
82
void
clear
(
FakeRatePlotCache
& fakeRatePlotCache)
const
;
83
84
private
:
85
Config
m_cfg
;
86
std::unique_ptr<const Acts::Logger>
m_logger
;
87
89
const
Acts::Logger
&
logger
()
const
{
return
*
m_logger
; }
90
};
91
92
}
// namespace FW
acts
blob
master
Examples
Framework
include
ACTFW
Validation
FakeRatePlotTool.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:23
using
1.8.2 with
ECCE GitHub integration