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
RootPlanarClusterWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RootPlanarClusterWriter.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 <mutex>
12
13
#include "
ACTFW/EventData/GeometryContainers.hpp
"
14
#include "
ACTFW/Framework/WriterT.hpp
"
15
#include "
Acts/Plugins/Digitization/PlanarModuleCluster.hpp
"
16
17
class
TFile;
18
class
TTree;
19
20
namespace
FW {
21
33
class
RootPlanarClusterWriter
34
:
public
WriterT
<GeometryIdMultimap<Acts::PlanarModuleCluster>> {
35
public
:
36
struct
Config
{
38
std::string
inputClusters
;
40
std::string
inputSimulatedHits
;
41
std::string
filePath
=
""
;
42
std::string
fileMode
=
"RECREATE"
;
43
std::string
treeName
=
"clusters"
;
44
TFile*
rootFile
=
nullptr
;
45
};
46
50
RootPlanarClusterWriter
(
const
Config
& cfg,
Acts::Logging::Level
lvl);
51
53
~RootPlanarClusterWriter
()
override
;
54
56
ProcessCode
endRun
() final override;
57
58
protected:
64
ProcessCode
writeT
(const
AlgorithmContext
& ctx,
65
const
GeometryIdMultimap
<Acts::PlanarModuleCluster>&
66
clusters) final override;
67
68
private:
69
Config
m_cfg
;
70
std::
mutex
m_writeMutex
;
71
TFile*
m_outputFile
;
72
TTree*
m_outputTree
;
73
int
m_eventNr
;
74
int
m_volumeID
;
75
int
m_layerID
;
76
int
m_surfaceID
;
77
float
m_x
;
78
float
m_y
;
79
float
m_z
;
80
float
m_t
;
81
float
m_lx
;
82
float
m_ly
;
83
float
m_cov_lx
;
84
float
m_cov_ly
;
85
std::vector<
int
>
m_cell_IDx
;
86
std::vector<
int
>
m_cell_IDy
;
87
std::vector<
float
>
m_cell_lx
;
88
std::vector<
float
>
m_cell_ly
;
89
std::vector<
float
>
m_cell_data
;
90
91
// (optional) the truth position
92
std::vector<
float
>
m_t_gx
;
93
std::vector<
float
>
m_t_gy
;
94
std::vector<
float
>
m_t_gz
;
95
std::vector<
float
>
m_t_gt
;
96
std::vector<
float
>
m_t_lx
;
97
std::vector<
float
>
m_t_ly
;
98
std::vector<
unsigned
long
>
99
m_t_barcode
;
100
};
101
102
}
// namespace FW
acts
blob
master
Examples
Io
Root
include
ACTFW
Io
Root
RootPlanarClusterWriter.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:24
using
1.8.2 with
ECCE GitHub integration