Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
DuplicationPlotTool.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DuplicationPlotTool.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 <cstddef>
17
#include <map>
18
#include <memory>
19
#include <string>
20
21
class
TEfficiency;
22
class
TProfile;
23
namespace
ActsFatras {
24
class
Particle;
25
}
// namespace ActsFatras
26
27
namespace
ActsExamples {
28
29
// Tools to make duplication rate and duplication number plots to show tracking
30
// duplication.
31
//
32
// The duplication is investigated for those truth-matched reco tracks. If there
33
// are a few reco tracks matched to the same truth particle, the reco track with
34
// the highest matching probability is tagges as 'real' and the others are
35
// 'duplicated'.
36
class
DuplicationPlotTool
{
37
public
:
39
struct
Config
{
40
std::map<std::string, PlotHelpers::Binning>
varBinning
= {
41
{
"Eta"
,
PlotHelpers::Binning
(
"#eta"
, 40, -4, 4)},
42
{
"Phi"
,
PlotHelpers::Binning
(
"#phi"
, 100, -3.15, 3.15)},
43
{
"Pt"
,
PlotHelpers::Binning
(
"pT [GeV/c]"
, 40, 0, 100)},
44
{
"Num"
,
PlotHelpers::Binning
(
"N"
, 30, -0.5, 29.5)}};
45
};
46
48
struct
DuplicationPlotCache
{
49
TProfile*
nDuplicated_vs_pT
;
50
TProfile*
nDuplicated_vs_eta
;
51
TProfile*
nDuplicated_vs_phi
;
52
TEfficiency*
duplicationRate_vs_pT
;
53
TEfficiency*
duplicationRate_vs_eta
;
54
TEfficiency*
duplicationRate_vs_phi
;
55
};
56
61
DuplicationPlotTool
(
const
Config
&
cfg
,
Acts::Logging::Level
lvl);
62
66
void
book
(
DuplicationPlotCache
& duplicationPlotCache)
const
;
67
73
void
fill
(
DuplicationPlotCache
& duplicationPlotCache,
74
const
Acts::BoundTrackParameters
& fittedParameters,
75
bool
status
)
const
;
76
82
void
fill
(
DuplicationPlotCache
& duplicationPlotCache,
83
const
ActsFatras::Particle
& truthParticle,
84
size_t
nDuplicatedTracks)
const
;
85
89
void
write
(
const
DuplicationPlotCache
& duplicationPlotCache)
const
;
90
94
void
clear
(
DuplicationPlotCache
& duplicationPlotCache)
const
;
95
96
private
:
97
Config
m_cfg
;
98
std::unique_ptr<const Acts::Logger>
m_logger
;
99
101
const
Acts::Logger
&
logger
()
const
{
return
*
m_logger
; }
102
};
103
104
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Framework
include
ActsExamples
Validation
DuplicationPlotTool.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration