EIC Software
Reference for
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
RootPropagationStepsWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RootPropagationStepsWriter.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 "
Acts/Propagator/detail/SteppingLogger.hpp
"
12
#include <
ActsExamples/Framework/WriterT.hpp
>
13
14
#include <mutex>
15
16
class
TFile;
17
class
TTree;
18
19
namespace
ActsExamples {
20
21
using
PropagationSteps
= std::vector<Acts::detail::Step>;
22
34
class
RootPropagationStepsWriter
35
:
public
WriterT
<std::vector<PropagationSteps>> {
36
public
:
37
struct
Config
{
38
std::string
collection
=
39
"propagation_steps"
;
40
std::string
filePath
=
""
;
41
std::string
fileMode
=
"RECREATE"
;
42
std::string
treeName
=
"propagation_steps"
;
43
TFile*
rootFile
=
nullptr
;
44
};
45
49
RootPropagationStepsWriter
(
const
Config
& cfg,
50
Acts::Logging::Level
level =
Acts::Logging::INFO
);
51
53
~RootPropagationStepsWriter
()
override
;
54
56
ProcessCode
endRun
() final override;
57
58
protected:
64
ProcessCode
writeT
(const
AlgorithmContext
& context,
65
const std::
vector
<
PropagationSteps
>&
steps
) final override;
66
67
private:
68
Config
m_cfg
;
69
std::mutex
m_writeMutex
;
70
TFile*
m_outputFile
;
71
TTree*
m_outputTree
;
72
int
m_eventNr
;
73
std::
vector
<
int
>
m_volumeID
;
74
std::
vector
<
int
>
m_boundaryID
;
75
std::
vector
<
int
>
m_layerID
;
76
std::
vector
<
int
>
m_approachID
;
77
std::
vector
<
int
>
m_sensitiveID
;
78
std::
vector
<
float
>
m_x
;
79
std::
vector
<
float
>
m_y
;
80
std::
vector
<
float
>
m_z
;
81
std::
vector
<
float
>
m_dx
;
82
std::
vector
<
float
>
m_dy
;
83
std::
vector
<
float
>
m_dz
;
84
std::
vector
<
int
>
m_step_type
;
85
std::
vector
<
float
>
m_step_acc
;
86
std::
vector
<
float
>
m_step_act
;
87
std::
vector
<
float
>
m_step_abt
;
88
std::
vector
<
float
>
m_step_usr
;
89
};
90
91
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
Root
include
ActsExamples
Io
Root
RootPropagationStepsWriter.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:25
using
1.8.2 with
EIC GitHub integration