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
RootSimHitWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RootSimHitWriter.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2018 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 <cstdint>
12
#include <mutex>
13
#include <string>
14
15
#include "
ACTFW/EventData/SimHit.hpp
"
16
#include "
ACTFW/Framework/WriterT.hpp
"
17
18
class
TFile;
19
class
TTree;
20
21
namespace
FW {
22
31
class
RootSimHitWriter
final :
public
WriterT
<SimHitContainer> {
32
public
:
33
struct
Config
{
35
std::string
inputSimulatedHits
;
37
std::string
filePath
;
39
std::string
fileMode
=
"RECREATE"
;
41
std::string
treeName
=
"hits"
;
42
};
43
48
RootSimHitWriter
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
49
51
~RootSimHitWriter
() final override;
52
54
ProcessCode
endRun
() final override;
55
56
protected:
61
ProcessCode
writeT
(const
AlgorithmContext
& ctx,
62
const
SimHitContainer
&
hits
) final override;
63
64
private:
65
Config
m_cfg
;
66
std::
mutex
m_writeMutex
;
67
TFile*
m_outputFile
=
nullptr
;
68
TTree*
m_outputTree
=
nullptr
;
70
uint32_t
m_eventId
;
72
uint64_t
m_geometryId
;
74
uint64_t
m_particleId
;
76
float
m_tx
,
m_ty
,
m_tz
;
77
// True global hit time in ns.
78
float
m_tt
;
80
float
m_tpx
,
m_tpy
,
m_tpz
,
m_te
;
82
float
m_deltapx
,
m_deltapy
,
m_deltapz
,
m_deltae
;
84
int32_t
m_index
;
85
// Decoded hit surface identifier components.
86
uint32_t
m_volumeId
;
87
uint32_t
m_boundaryId
;
88
uint32_t
m_layerId
;
89
uint32_t
m_approachId
;
90
uint32_t
m_sensitiveId
;
91
};
92
93
}
// namespace FW
acts
blob
master
Examples
Io
Root
include
ACTFW
Io
Root
RootSimHitWriter.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:24
using
1.8.2 with
ECCE GitHub integration