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
EDM4hepSimHitReader.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EDM4hepSimHitReader.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2022 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/Utilities/Logger.hpp
"
12
#include "
ActsExamples/DD4hepDetector/DD4hepDetector.hpp
"
13
#include "
ActsExamples/EventData/SimHit.hpp
"
14
#include "
ActsExamples/EventData/SimParticle.hpp
"
15
#include "
ActsExamples/Framework/DataHandle.hpp
"
16
#include "
ActsExamples/Framework/IReader.hpp
"
17
18
#include <memory>
19
#include <string>
20
21
#include <edm4hep/MCParticleCollection.h>
22
#include <podio/ROOTFrameReader.h>
23
24
namespace
ActsExamples {
25
33
class
EDM4hepSimHitReader
final :
public
IReader
{
34
public
:
35
struct
Config
{
37
std::string
inputPath
;
39
std::string
inputParticles
=
"MCParticles"
;
41
std::string
inputSimTrackerHits
=
"ActsSimTrackerHits"
;
43
std::string
outputParticles
;
45
std::string
outputSimHits
;
47
std::shared_ptr<DD4hep::DD4hepDetector>
dd4hepDetector
;
48
};
49
54
EDM4hepSimHitReader
(
const
Config
&
config
,
Acts::Logging::Level
level
);
55
56
std::string
name
() const final;
57
59
std::pair<
size_t
,
size_t
>
availableEvents
() const final;
60
62
ProcessCode
read
(const ActsExamples::
AlgorithmContext
& ctx) final;
63
65
const
Config
&
config
()
const
{
return
m_cfg
; }
66
67
private
:
68
Config
m_cfg
;
69
std::pair<size_t, size_t>
m_eventsRange
;
70
std::unique_ptr<const Acts::Logger>
m_logger
;
71
72
podio::ROOTFrameReader
m_reader
;
73
74
const
Acts::Logger
&
logger
()
const
{
return
*
m_logger
; }
75
76
WriteDataHandle<SimHitContainer>
m_outputSimHits
{
this
,
"OutputSimHits"
};
77
WriteDataHandle<SimParticleContainer>
m_outputParticles
{
this
,
78
"OutputParticles"
};
79
};
80
81
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
EDM4hep
include
ActsExamples
Io
EDM4hep
EDM4hepSimHitReader.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:38
using
1.8.2 with
sPHENIX GitHub integration