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
HitsPrinter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file HitsPrinter.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/Digitization/PlanarModuleCluster.hpp
"
12
#include "
Acts/Utilities/Logger.hpp
"
13
#include "
ActsExamples/EventData/GeometryContainers.hpp
"
14
#include "
ActsExamples/EventData/Index.hpp
"
15
#include "
ActsExamples/EventData/SimParticle.hpp
"
16
#include "
ActsExamples/Framework/DataHandle.hpp
"
17
#include "
ActsExamples/Framework/IAlgorithm.hpp
"
18
#include "
ActsExamples/Framework/ProcessCode.hpp
"
19
20
#include <cstddef>
21
#include <string>
22
#include <vector>
23
24
namespace
Acts {
25
class
PlanarModuleCluster;
26
}
// namespace Acts
27
namespace
ActsFatras {
28
class
Barcode;
29
}
// namespace ActsFatras
30
31
namespace
ActsExamples {
32
struct
AlgorithmContext;
33
35
class
HitsPrinter
:
public
IAlgorithm
{
36
public
:
37
using
Clusters
=
ActsExamples::GeometryIdMultimap<Acts::PlanarModuleCluster>
;
38
using
HitParticlesMap
=
ActsExamples::IndexMultimap<ActsFatras::Barcode>
;
39
using
HitIds
= std::vector<size_t>;
40
41
struct
Config
{
43
std::string
inputClusters
;
45
std::string
inputMeasurementParticlesMap
;
47
std::string
inputHitIds
;
48
// Print hits selected by their indices (zero length to disable).
49
size_t
selectIndexStart
= 0
u
;
50
size_t
selectIndexLength
= 0
u
;
51
// Print hits within a certain geometry range (zero to disable).
52
size_t
selectVolume
= 0
u
;
53
size_t
selectLayer
= 0
u
;
54
size_t
selectModule
= 0
u
;
55
};
56
57
HitsPrinter
(
const
Config
&
cfg
,
Acts::Logging::Level
level
);
58
59
ProcessCode
execute
(
const
AlgorithmContext
& ctx)
const override
;
60
61
const
Config
&
config
()
const
{
return
m_cfg
; }
62
63
private
:
64
Config
m_cfg
;
65
66
ReadDataHandle<Clusters>
m_inputClusters
{
this
,
"InputClusters"
};
67
ReadDataHandle<HitParticlesMap>
m_inputMeasurementParticlesMap
{
68
this
,
"InputMeasurementParticlesMaps"
};
69
ReadDataHandle<HitIds>
m_inputHitIds
{
this
,
"InputHitIds"
};
70
};
71
72
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
Printers
ActsExamples
Printers
HitsPrinter.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:37
using
1.8.2 with
sPHENIX GitHub integration