ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
EFTracking
FPGATrackSim
FPGATrackSimBankGen
src
FPGATrackSimMatrixMergeAlgo.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
#ifndef FPGATrackSimMatrixMergeAlgo_h
4
#define FPGATrackSimMatrixMergeAlgo_h
5
18
19
20
#include "GaudiKernel/ITHistSvc.h"
21
#include "
AthenaBaseComps/AthAlgorithm.h
"
22
#include "
FPGATrackSimMatrixIO.h
"
23
24
#include "TTree.h"
25
#include "TH1I.h"
26
#include "TH1F.h"
27
28
#include <string>
29
#include <vector>
30
31
class
ITHistSvc;
32
33
34
class
FPGATrackSimMatrixMergeAlgo
:
public
AthAlgorithm
35
{
36
public
:
37
FPGATrackSimMatrixMergeAlgo
(
const
std::string& name, ISvcLocator* pSvcLocator);
38
virtual
~FPGATrackSimMatrixMergeAlgo
() =
default
;
39
StatusCode
initialize
()
override
;
40
// Execute does not do anything for this alg. This class does not process events, everything is done in init and finalize
41
StatusCode
execute
(
const
EventContext& ctx)
override
;
42
StatusCode
finalize
()
override
;
43
44
private
:
45
47
// Objects
48
49
// Main logic. For each sector, store a struct that accumulates the track parameters, hit coordinates, etc.
50
std::vector<AccumulateMap>
m_sector_cum
;
// Index by region
51
53
// Handles
54
55
ServiceHandle<ITHistSvc>
m_tHistSvc
{
this
,
"THistSvc"
,
"THistSvc"
};
56
58
// Configuration
59
60
Gaudi::Property<std::vector<std::string> >
m_fpath
{
this
,
"file_path"
,{},
"vector of files to merge"
};
61
Gaudi::Property<bool>
m_allregion
{
this
,
"allregion"
,
false
,
"Run all regions?"
};
62
Gaudi::Property<int>
m_region
{
this
,
"region"
, 0,
"Region to run"
};
63
Gaudi::Property<int>
m_nRegions
{
this
,
"nbank"
, 96,
"Number of regions"
};
64
Gaudi::Property<bool>
m_Monitor
{
this
,
"Monitor"
,
false
,
"flag to enable the monitor"
};
65
66
67
int
m_region_start
= 0;
68
int
m_region_end
= 0;
69
70
int
m_nFiles
= 0;
71
int
m_nLayers
= 0;
72
int
m_nDim
= 0;
73
int
m_nDim2
= 0;
74
76
// Meta Data
77
78
// Histograms
79
TH1I*
m_h_nSector
=
nullptr
;
80
TH1I*
m_h_nHit
=
nullptr
;
81
TH1F*
m_h_c
=
nullptr
;
82
TH1F*
m_h_d
=
nullptr
;
83
TH1F*
m_h_phi
=
nullptr
;
84
TH1F*
m_h_coto
=
nullptr
;
85
TH1F*
m_h_z
=
nullptr
;
86
88
// Helper Functions
89
90
StatusCode
bookHistograms
();
91
StatusCode
copySliceTree
(TFile *
file
);
92
void
readFiles
();
93
void
readTree
(TTree *matrix_tree,
int
region);
94
std::vector<TTree*>
createMatrixTrees
();
95
void
fillMatrixTrees
(std::vector<TTree*>
const
& matrixTrees);
96
};
97
98
99
#endif
// FPGATrackSimMatrixMergeAlgo_h
100
AthAlgorithm.h
FPGATrackSimMatrixIO.h
Classes to read/write matrix files event by event.
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
FPGATrackSimMatrixMergeAlgo::m_h_phi
TH1F * m_h_phi
Definition
FPGATrackSimMatrixMergeAlgo.h:83
FPGATrackSimMatrixMergeAlgo::readFiles
void readFiles()
Definition
FPGATrackSimMatrixMergeAlgo.cxx:184
FPGATrackSimMatrixMergeAlgo::m_Monitor
Gaudi::Property< bool > m_Monitor
Definition
FPGATrackSimMatrixMergeAlgo.h:64
FPGATrackSimMatrixMergeAlgo::m_nDim
int m_nDim
Definition
FPGATrackSimMatrixMergeAlgo.h:72
FPGATrackSimMatrixMergeAlgo::m_sector_cum
std::vector< AccumulateMap > m_sector_cum
Definition
FPGATrackSimMatrixMergeAlgo.h:50
FPGATrackSimMatrixMergeAlgo::readTree
void readTree(TTree *matrix_tree, int region)
FPGATrackSimMatrixMergeAlgo::m_h_c
TH1F * m_h_c
Definition
FPGATrackSimMatrixMergeAlgo.h:81
FPGATrackSimMatrixMergeAlgo::~FPGATrackSimMatrixMergeAlgo
virtual ~FPGATrackSimMatrixMergeAlgo()=default
FPGATrackSimMatrixMergeAlgo::m_h_coto
TH1F * m_h_coto
Definition
FPGATrackSimMatrixMergeAlgo.h:84
FPGATrackSimMatrixMergeAlgo::m_region
Gaudi::Property< int > m_region
Definition
FPGATrackSimMatrixMergeAlgo.h:62
FPGATrackSimMatrixMergeAlgo::initialize
StatusCode initialize() override
Definition
FPGATrackSimMatrixMergeAlgo.cxx:42
FPGATrackSimMatrixMergeAlgo::finalize
StatusCode finalize() override
Definition
FPGATrackSimMatrixMergeAlgo.cxx:229
FPGATrackSimMatrixMergeAlgo::m_nRegions
Gaudi::Property< int > m_nRegions
Definition
FPGATrackSimMatrixMergeAlgo.h:63
FPGATrackSimMatrixMergeAlgo::bookHistograms
StatusCode bookHistograms()
Definition
FPGATrackSimMatrixMergeAlgo.cxx:96
FPGATrackSimMatrixMergeAlgo::m_nFiles
int m_nFiles
Definition
FPGATrackSimMatrixMergeAlgo.h:70
FPGATrackSimMatrixMergeAlgo::m_fpath
Gaudi::Property< std::vector< std::string > > m_fpath
Definition
FPGATrackSimMatrixMergeAlgo.h:60
FPGATrackSimMatrixMergeAlgo::m_nLayers
int m_nLayers
Definition
FPGATrackSimMatrixMergeAlgo.h:71
FPGATrackSimMatrixMergeAlgo::execute
StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
FPGATrackSimMatrixMergeAlgo.cxx:218
FPGATrackSimMatrixMergeAlgo::fillMatrixTrees
void fillMatrixTrees(std::vector< TTree * > const &matrixTrees)
FPGATrackSimMatrixMergeAlgo::m_allregion
Gaudi::Property< bool > m_allregion
Definition
FPGATrackSimMatrixMergeAlgo.h:61
FPGATrackSimMatrixMergeAlgo::m_h_nHit
TH1I * m_h_nHit
Definition
FPGATrackSimMatrixMergeAlgo.h:80
FPGATrackSimMatrixMergeAlgo::m_region_start
int m_region_start
Definition
FPGATrackSimMatrixMergeAlgo.h:67
FPGATrackSimMatrixMergeAlgo::m_h_d
TH1F * m_h_d
Definition
FPGATrackSimMatrixMergeAlgo.h:82
FPGATrackSimMatrixMergeAlgo::m_h_nSector
TH1I * m_h_nSector
Definition
FPGATrackSimMatrixMergeAlgo.h:79
FPGATrackSimMatrixMergeAlgo::copySliceTree
StatusCode copySliceTree(TFile *file)
Definition
FPGATrackSimMatrixMergeAlgo.cxx:123
FPGATrackSimMatrixMergeAlgo::createMatrixTrees
std::vector< TTree * > createMatrixTrees()
FPGATrackSimMatrixMergeAlgo::m_h_z
TH1F * m_h_z
Definition
FPGATrackSimMatrixMergeAlgo.h:85
FPGATrackSimMatrixMergeAlgo::m_nDim2
int m_nDim2
Definition
FPGATrackSimMatrixMergeAlgo.h:73
FPGATrackSimMatrixMergeAlgo::FPGATrackSimMatrixMergeAlgo
FPGATrackSimMatrixMergeAlgo(const std::string &name, ISvcLocator *pSvcLocator)
Definition
FPGATrackSimMatrixMergeAlgo.cxx:36
FPGATrackSimMatrixMergeAlgo::m_region_end
int m_region_end
Definition
FPGATrackSimMatrixMergeAlgo.h:68
FPGATrackSimMatrixMergeAlgo::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
Definition
FPGATrackSimMatrixMergeAlgo.h:55
ServiceHandle
Definition
ClusterMakerTool.h:36
file
TFile * file
Definition
tile_monitor.h:29
Generated on
for ATLAS Offline Software by
1.17.0