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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
master
CI
Core
doc
Examples
Algorithms
Detectors
Framework
Io
Csv
HepMC3
Json
Obj
Performance
Root
include
ACTFW
Io
Root
RootBFieldWriter.hpp
RootMaterialDecorator.hpp
RootMaterialTrackReader.hpp
RootMaterialTrackWriter.hpp
RootMaterialWriter.hpp
RootParticleWriter.hpp
RootPlanarClusterWriter.hpp
RootPropagationStepsWriter.hpp
RootSimHitWriter.hpp
RootTrackParameterWriter.hpp
RootTrajectoryWriter.hpp
RootVertexAndTracksReader.hpp
RootVertexAndTracksWriter.hpp
src
Run
Scripts
Fatras
Plugins
Tests
thirdparty
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RootParticleWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RootParticleWriter.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017-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/SimParticle.hpp
"
16
#include "
ACTFW/Framework/WriterT.hpp
"
17
18
class
TFile;
19
class
TTree;
20
21
namespace
FW {
22
31
class
RootParticleWriter
final :
public
WriterT
<SimParticleContainer> {
32
public
:
33
struct
Config
{
35
std::string
inputParticles
;
37
std::string
filePath
;
39
std::string
fileMode
=
"RECREATE"
;
41
std::string
treeName
=
"particles"
;
42
};
43
48
RootParticleWriter
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
49
51
~RootParticleWriter
() final override;
52
54
ProcessCode
endRun
() final override;
55
56
protected:
61
ProcessCode
writeT
(const
AlgorithmContext
& ctx,
62
const
SimParticleContainer
& particles) 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_particleId
;
74
int32_t
m_particleType
;
76
uint32_t
m_process
;
78
float
m_vx
,
m_vy
,
m_vz
;
79
// Production time in ns.
80
float
m_vt
;
82
float
m_px
,
m_py
,
m_pz
;
84
float
m_m
;
86
float
m_q
;
87
// Derived kinematic quantities
89
float
m_eta
;
91
float
m_phi
;
93
float
m_pt
;
94
// Decoded particle identifier; see Barcode definition for details.
95
uint32_t
m_vertexPrimary
;
96
uint32_t
m_vertexSecondary
;
97
uint32_t
m_particle
;
98
uint32_t
m_generation
;
99
uint32_t
m_subParticle
;
100
};
101
102
}
// namespace FW
acts
blob
master
Examples
Io
Root
include
ACTFW
Io
Root
RootParticleWriter.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:24
using
1.8.2 with
ECCE GitHub integration